From: lxoliva Date: Fri, 23 Jan 2009 23:30:34 +0000 (+0000) Subject: Adjust GPL-compatibility coment about starfire_firmware.h. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=3c3df054bbccdee55cd51f8a83bc898b5c96331c;p=releases.git Adjust GPL-compatibility coment about starfire_firmware.h. Add --implied-prefix support to deblob-check. Use it in deblob-. git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4699 559672b5-ba27-0410-b829-e8f1faed8b1b --- diff --git a/deblob-2.6.21 b/deblob-2.6.21 index d41d4872ec4..1c87d8da62f 100755 --- a/deblob-2.6.21 +++ b/deblob-2.6.21 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -324,8 +324,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.22 b/deblob-2.6.22 index c0975744454..079e77aad04 100755 --- a/deblob-2.6.22 +++ b/deblob-2.6.22 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -324,8 +324,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.23 b/deblob-2.6.23 index 5fa3ba87757..90200347940 100755 --- a/deblob-2.6.23 +++ b/deblob-2.6.23 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -329,8 +329,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.24 b/deblob-2.6.24 index f9b0236c05a..d9e7f6ffde5 100755 --- a/deblob-2.6.24 +++ b/deblob-2.6.24 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -329,8 +329,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.25 b/deblob-2.6.25 index 85a84d78cfd..90558f49c71 100755 --- a/deblob-2.6.25 +++ b/deblob-2.6.25 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -329,8 +329,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.26 b/deblob-2.6.26 index 40e2f8c2750..6e1508c689c 100755 --- a/deblob-2.6.26 +++ b/deblob-2.6.26 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -90,7 +90,7 @@ clean_blob () { 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 @@ -329,8 +329,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.27 b/deblob-2.6.27 index 930ccb9c16b..4772c9dc22c 100755 --- a/deblob-2.6.27 +++ b/deblob-2.6.27 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -86,7 +86,7 @@ clean_blob () { 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 @@ -344,8 +344,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-2.6.28 b/deblob-2.6.28 index 5e1c709d180..127885e917e 100755 --- a/deblob-2.6.28 +++ b/deblob-2.6.28 @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) 2008 Jeff Moe -# Copyright (C) 2008 Alexandre Oliva +# Copyright (C) 2008, 2009 Alexandre Oliva # # 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 @@ -86,7 +86,7 @@ clean_blob () { 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 @@ -354,8 +354,12 @@ clean_kconfig drivers/net/Kconfig 'ACENIC' 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 diff --git a/deblob-check b/deblob-check index 1231bfc4163..3280b044d7e 100755 --- a/deblob-check +++ b/deblob-check @@ -26,7 +26,7 @@ # 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 @@ -110,6 +110,27 @@ # -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. @@ -262,6 +283,20 @@ case $1 in ;; 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 @@ -387,9 +422,10 @@ q 1;" *) 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 @@ -410,7 +446,9 @@ q 1;" esac case $1 in ---) shift;; +--) + sawdashdash=t + shift;; esac if $test_mode; then @@ -534,7 +572,7 @@ set_except () { 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 @@ -544,7 +582,7 @@ set_except () { 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. @@ -2256,9 +2294,37 @@ pass=: 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 @@ -2270,6 +2336,14 @@ do fi done +case $process_arg in +"") ;; +*) + echo Missing argument to $process_arg >&2 + exit 1 + ;; +esac + #list: shift $n #list: exec test $# = 0