#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
#!/bin/sh
# Copyright (C) 2008 Jeff Moe
-# Copyright (C) 2008 Alexandre Oliva <lxoliva@fsfla.org>
+# Copyright (C) 2008, 2009 Alexandre Oliva <lxoliva@fsfla.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
echo Removing blobs from $name
set fnord "$@" -d
shift 2
- $check "$@" $name > $name.deblob
+ $check "$@" -i linux-$kver $name > $name.deblob
check_changed $name
else
clean_file $1
clean_mk CONFIG_ACENIC drivers/net/Makefile
# ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
-# This adds restrictions on top of GPLv2, but after deblobbing,
-# nothing copyrightable remains.
+
+# This file requires prior acceptance of the GPL before you can even
+# run the code in it. It's not clear whether this is a further
+# requirement that would make the distribution incompatible with the
+# GPL, but since nothing remains after we remove the blob, it's
+# irrelevant whether the explicit acceptance would be a problem.
clean_blob drivers/net/starfire_firmware.h
clean_kconfig drivers/net/Kconfig 'ADAPTEC_STARFIRE'
clean_mk CONFIG_ADAPTEC_STARFIRE drivers/net/Makefile
# usage: deblob-check [-S] [-vv] [-s S] [-lDdBbCcXxPpFftVh?H] \
-# [*.tar* patch-* *.patch *.diff]
+# *.tar* patch-* [-i prefix/] *.patch *.diff...
# Look for and report too-long undocumented sequences of numbers
# (generally blobs in disguise) in source files, as well as requests
# -v --verbose: increase verbosity level, for internal debugging. May
# be given at most twice.
+
+# file options:
+
+# --: Don't process command-line options any further. All following
+# arguments are taken as filenames.
+
+# -i --implied-prefix --prefix: prepend the given prefix to each filename
+# listed after this option, when configuring false positives
+# and negatives.
+
+# *.tar*: iterate over all files in the named tar file.
+
+# *.patch, patch-*, *.diff: Look for blobs in the [ +] parts of the
+# *patch, unless --reverse-patch is given, in which case
+# the [ -] parts will be used.
+
+# Anything else is assumed to be a source file.
+
+# *.gz | *.bz2: Decompress automatically.
+
+
# The exit status is only significant for the --list options: it will
# be true if nothing was found, and false otherwise.
;;
esac
+prefix=/
+case $1 in
+--implied-prefix | --prefix| -i)
+ prefix=$2
+ case $prefix in
+ /*/) ;;
+ */) prefix=/$prefix ;;
+ /*) prefix=$prefix/ ;;
+ *) prefix=/$prefix/ ;;
+ esac
+ shift 2 || exit 1
+ ;;
+esac
+
test_mode=false
name=deblob-check
*)
case $1 in
- -- | -l | --list-blobs) shift;;
+ -l | --list-blobs) shift;;
esac
case $1 in
+ -- | --implied-prefix | --prefix | -i) ;;
-*)
if test ! -f "$1"; then
echo "$name: \`$1' given too late or out of the proper sequence." >&2
esac
case $1 in
---) shift;;
+--)
+ sawdashdash=t
+ shift;;
esac
if $test_mode; then
blobna "request_firmware\\(_nowait\\)\\?"
- case /$1 in
+ case $prefix$1 in
/drivers/net/tg3.c)
# This file contains firmwares that we deblob with high
# sensitivity, so make sure the sequences of numbers that are not
accept " }\\(,\\? mem_tbl_5\\(70x\\|705\\|755\\|906\\)\\[\\] = {$sepx$blobpat*$sepx}\\)*;" drivers/net/tg3.c
;;
- /drivers/media/video/gspca/conex.c)
+ ---/drivers/media/video/gspca/conex.c)
# FIXME: we shouldn't have to duplicate this here, but deblob
# doesn't pass us a pathname that matches linux-*.*.*/, and then
# we end up deblobbing false positives.
tempfiles=
trap "status=$?; test -z \"$tempfiles\" || rm -f $tempfiles; (exit $status); exit" 0 1 2 15
+process_arg=
+
# Go through each of the input files in the command line.
for file
do
+ case $process_arg in
+ "") ;;
+ --implied-prefix | --prefix | -i)
+ prefix=$file
+ case $prefix in
+ /*/) ;;
+ */) prefix=/$prefix ;;
+ /*) prefix=$prefix/ ;;
+ *) prefix=/$prefix/ ;;
+ esac
+ process_arg=
+ continue
+ ;;
+ *)
+ echo Internal error with process_arg=$process_arg >&2
+ exit 1
+ ;;
+ esac
+
+ case $sawdashdash$file in
+ --implied-prefix | --prefix | -i)
+ process_arg=$file
+ continue
+ ;;
+ esac
+
# If we print anything whatsoever (even a blank line) while
# processing it, we've failed.
if check "$file"; then
fi
done
+case $process_arg in
+"") ;;
+*)
+ echo Missing argument to $process_arg >&2
+ exit 1
+ ;;
+esac
+
#list: shift $n
#list: exec test $# = 0