Size: 1798
Comment:
|
Size: 15558
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
NonFreeIETFDocuments -------------------- |
|
Line 6: | Line 3: |
Background ---------- This page provides background information on IETF RFC/I-Ds within Debian. |
== Background == The majority of IETF documents, such as RFCs, are not licensed under DFSG-free terms, and should thus not be included in Debian's main. However, RFC documents are frequently included in many packages that would otherwise be free software. Some care is required to remove then when packaging software for Debian. Some links to discussion of the license problems: * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=199810 * TBA add debian-legal links * http://josefsson.org/bcp78broken/ |
Line 16: | Line 18: |
In particular, the last file above says: | In particular, the etch_rc_policy.txt document above says: |
Line 22: | Line 24: |
Some links to discussion of the license problems: |
== Status == All non-free RFC files in non-source packages are believed to be reported, see: * http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=nonfree-doc;users=debian-release@lists.debian.org;nam0=Severity;pri0=severity:critical,grave,serious,important,normal,minor,wishlist;nam1=License;ttl1=GNU%20Free%20Documentation%20License,Open%20Publication%20License,RFC%20License,Other%20License:%20Unmodifiable,Test;pri1=tag:gfdl,opl,rfc,unmodifiable;nam2=Status;pri2=pending:pending,forwarded,pending-fixed,fixed,done,absent;ttl2=Outstanding,Forwarded,Pending%20Upload,Fixed%20in%20NMU,Resolved,From%20other%20Branch,Unknown%20Pending%20Status;nam3=Classification;pri3=pending=pending%2Btag=wontfix,pending=pending%2Btag=moreinfo,pending=pending%2Btag=patch,pending=pending%2Btag=confirmed,pending=pending;ttl3=Will%20Not%20Fix,More%20information%20needed,Patch%20Available,Confirmed,Unclassified;ord3=2,3,4,1,0,5#_2_2_0_4 Currently I'm investigating source packages too. A list of packages with non-free files in them are found at: * http://josefsson.org/bcp78broken/ietf-in-src.txt On 2006-10-16, I sent bug reports for RFC/I-Ds in source packages too. They are now visible through the first linke in this section. Some raised a concern that there may be false positives in the list. I modified the script (see last on this page) to compute MD5's on the RFC in the source packages, and run diff+cmp on the files if the MD5 doesn't match. The output from the script is published at: * http://josefsson.org/bcp78broken/debian-ietf-documents-diff.txt I went through the reports manually, and there were one unclear case which most likely indicate a false positive, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393411 On 2006-10-24 I modified the script to recursively look into archives-within-archives in the source packages, to find deeply nested documents too. Some more occurances were found and reported. == Known exceptions == These documents have been made available under a free license: * The I-D draft-morgan-ident-ext-04.txt See http://bugs.debian.org/390658 * The I-D's draft-riikonen-presence-attrs-03.txt, draft-riikonen-silc-commands-06.txt, draft-riikonen-silc-flags-payloads-04.txt, draft-riikonen-silc-ke-auth-08.txt, draft-riikonen-silc-pp-09.txt, and draft-riikonen-silc-spec-08.txt See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393408 and http://packages.debian.org/changelogs/pool/main/s/silc-toolkit/current/copyright The following may hold but is questionable: * US-authored RFCs earlier than RFC around RFC 1000-1100. These did not carry a copyright notice, and since the US did not sign the Berne convention until 1989, they are in the public domain. The RFC editor has something else to say on this {{{ From: RFC Editor <rfc-editor@rfc-editor.org> Subject: Re: Copyright and copying conditions for RFC 1510? To: Simon Josefsson <jas@extundo.com> Cc: RFC Editor <rfc-editor@rfc-editor.org> Date: Mon, 16 Dec 2002 11:07:28 -0800 Simon, The copyright statement applies retroactively. Please follow the instructions as stated at: ftp://ftp.rfc-editor.org/in-notes/rfc-editor/rfc-copyright-story Thank you. RFC Editor On Sun, Dec 15, 2002 at 10:38:30AM +0100, Simon Josefsson wrote: > rfc1510.txt does not mention copyright or copying condition. Does the > copyright notice in > > ftp://ftp.rfc-editor.org/in-notes/rfc-editor/rfc-copyright-story > > apply retroactively? If not, do you know who owns the copyright of > the document and what the copying conditions are? > > Thanks. }}} == Template for RFC authors to release additional rights == If you as a RFC editor wish to grant additional rights within the document directly, to avoid having the Debian community ask you for additional rights later on, you may include the following text in the document. Similar text has been approved in RFCs before (e.g., RFC 3492, RFC 4501) and the IETF do not appear to object to this practice. {{{ x. Copying conditions The author(s) agree to grant third parties the irrevocable right to copy, use and distribute the work, with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works do not contain misleading author, version, name of work, or endorsement information. }}} The text is derived from draft-josefsson-ipr-notice-update. == Template requesting additional rights from RFC authors == This is based on RFC 4663 and draft-josefsson-ipr-rules-update (see <http://josefsson.org/bcp78broken/>). {{{ Subject: Requesting additional rights to RFC xxxx Dear Author, The Debian GNU/Linux distribution wishes to incorporate the IETF RFC xxxx as part of its distribution, and to allow users to develop, modify and evolve the document. Under IETF policies that were in effect during the development of RFC xxxx, the authors of contributions to the IETF standards retain copyright with respect to such contributions. Because you are an author of said document, the Debian community hereby requests that you kindly agree to release your contributions in RFC xxxx under the license below, for inclusion in Debian. I agree to grant third parties the irrevocable right to copy, use and distribute the work, with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works: (a) do not contain misleading author, version, name of work, or endorsement information, and (b) do not claim endorsement of the modified work by the Contributor, or any organization the Contributor belongs to, the Internet Engineering Task Force (IETF), Internet Research Task Force (IRTF), Internet Engineering Steering Group (IESG), Internet Architecture Board (IAB), Internet Assigned Numbers Authority (IANA), Internet Society (ISOC), Request For Comments (RFC) Editor, or any combination or variation of such terms (including without limitation the IETF "4 diamonds" logo), or any terms that are confusingly similar thereto, and (c) remove any claims of status as an Internet Standard, including without limitation removing the RFC boilerplate. The IETF suggests that any citation or excerpt of unmodified text reference the RFC or other document from which the text is derived. To indicate that you agree to these terms, please reply to this e-mail and quote the license above and indicate that you agree to this. If you prefer another widely recognized free license instead, the following ones are also fine: * the 3-clause BSD license http://www.gnu.org/licenses/info/BSD_3Clause.html * the GNU GPL version 2 http://www.fsf.org/licensing/licenses/gpl.txt * the Expat license http://www.jclark.com/xml/copying.txt Sincerely yours, Simon Josefsson }}} == Bug report template == This will be used for the reports on non-free RFCs in source packages. {{{ Subject: Source package contains non-free IETF RFC Severity: serious Package: [package] Version: [version] User: debian-release@lists.debian.org Usertags: nonfree-doc rfc Hi! This source package contains the following files from the IETF under non-free license terms: FILES The license on RFC/I-Ds is not DFSG-free, see: |
Line 25: | Line 201: |
* TBA add debian-legal links * http://josefsson.org/bcp78broken/ Status ------ All RFCs in non-source packages are believed to be reported, see: * http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=nonfree-doc;users=debian-release@lists.debian.org;nam0=Severity;pri0=severity:critical,grave,serious,important,normal,minor,wishlist;nam1=License;ttl1=GNU%20Free%20Documentation%20License,Open%20Publication%20License,RFC%20License,Other%20License:%20Unmodifiable,Test;pri1=tag:gfdl,opl,rfc,unmodifiable;nam2=Status;pri2=pending:pending,forwarded,pending-fixed,fixed,done,absent;ttl2=Outstanding,Forwarded,Pending%20Upload,Fixed%20in%20NMU,Resolved,From%20other%20Branch,Unknown%20Pending%20Status;nam3=Classification;pri3=pending=pending%2Btag=wontfix,pending=pending%2Btag=moreinfo,pending=pending%2Btag=patch,pending=pending%2Btag=confirmed,pending=pending;ttl3=Will%20Not%20Fix,More%20information%20needed,Patch%20Available,Confirmed,Unclassified;ord3=2,3,4,1,0,5#_2_2_0_4 Currently I'm investigating source packages too. A list of packages with RFCs in them are found at: * http://josefsson.org/bcp78broken/ietf-in-src.txt |
* http://release.debian.org/removing-non-free-documentation * http://wiki.debian.org/NonFreeIETFDocuments The etch release policy says binary and source packages must each be free: * http://release.debian.org/etch_rc_policy.txt The severity is serious, because this violates the Debian policy: * http://www.debian.org/doc/debian-policy/ch-archive.html#s-dfsg There are (at least) three ways to fix this problem. In order of preference: 1. Ask the author of the RFC to re-license the RFC under a free license. A template for this e-mail request can be found at http://wiki.debian.org/NonFreeIETFDocuments 2. Remove the non-free material from the source, e.g., by re-packaging the upstream archive and adding a 'dfsg' version name to it. 3. Move the package to non-free. General discussions are kindly requested to take place on debian-legal or debian-devel in the thread with Subject: "Non-free IETF RFC/I-Ds in source packages". Thanks, Simon }}} == Theory of operation == 1. Rsync the Debian repository. The file is called debian-rsync. {{{ #!/bin/sh # debian-rsync: Mirror a Debian repository. # Written by Simon Josefsson <simon@josefsson.org> during September # 2006. Released under GPLv2 or later. See # <http://wiki.debian.org/NonFreeIETFDocuments>. MIRROR=ftp.se.debian.org::debian OUT=/data/debian rsync -av --exclude Sources.diff $MIRROR/dists/testing/main/source \ $OUT/dists/testing/main/ rsync -av --exclude Packages.diff $MIRROR/dists/testing/main/binary-i386 \ $OUT/dists/testing/main/ rsync -av --exclude Sources.diff $MIRROR/dists/unstable/main/source \ $OUT/dists/unstable/main/ rsync -av --exclude Packages.diff $MIRROR/dists/unstable/main/binary-i386 \ $OUT/dists/unstable/main/ LIST=$(rsync $MIRROR/pool/main/ \ | grep '^drwx' \ | awk '{print $5}' \ | grep -v -e '^.$') for i in $LIST; do echo Working in $i... rsync -av --delete --delete-excluded \ --exclude '*.udeb' \ --exclude '*_alpha.deb' \ --exclude '*_amd64.deb' \ --exclude '*_arm.deb' \ --exclude '*_hppa.deb' \ --exclude '*_hurd-i386.deb' \ --exclude '*_ia64.deb' \ --exclude '*_m68k.deb' \ --exclude '*_mips.deb' \ --exclude '*_mipsel.deb' \ --exclude '*_powerpc.deb' \ --exclude '*_s390.deb' \ --exclude '*_sparc.deb' \ $MIRROR/pool/main/$i $OUT/pool/main/ done }}} 2. Get list of package contents. There are two files here, first tar-recursive and then debian-unpack. {{{ #!/bin/sh # tar-recursive: Recursively list members of an archive. # Inspired by find-in-tars by Timo Juhani Lindfors # <timo.lindfors@iki.fi>, but re-written by Simon Josefsson # <simon@josefsson.org> during September 2006. Released under GPLv2 # or later. See <http://wiki.debian.org/NonFreeIETFDocuments>. for archive in "$@"; do case "$archive" in *.tar.gz) MEMBERS=`tar tvfz $archive | awk '{print $6}'`;; *.tar.bz2) MEMBERS=`tar tvfj $archive | awk '{print $6}'`;; *.jar) MEMBERS=`unzip -vqq $archive | awk '{print $8}'`;; *.zip) MEMBERS=`unzip -vqq $archive | awk '{print $8}'`;; esac for member in $MEMBERS; do echo $member case "$member" in *.tar.gz | *.tar.bz2 | *.jar | *.zip) echo recursing into $archive $member 1>&2 tempdir=`mktemp -d -t tar-recursive.XXXXXXXXXX` || exit 1 case "$archive" in *.tar.gz) tar xfz $archive -C $tempdir $member err=$? ;; *.tar.bz2) tar xfj $archive -C $tempdir $member err=$? ;; *.jar) unzip -q $archive $member -d $tempdir err=$? ;; *.zip) unzip -q $archive $member -d $tempdir err=$? ;; esac if test "$err" != "0"; then echo "tar failed on $member with error $?" 1>&2 exit 1 fi echo $member tar-recursive $tempdir/$member | sed "s@^@$member:@" rm -fr $tempdir ;; esac done done }}} {{{ #!/bin/sh # debian-unpack: Extract a list of members in *.orig.tar.gz in a # Debian repository. # Written by Simon Josefsson <simon@josefsson.org> during September # 2006. Released under GPLv2 or later. See # <http://wiki.debian.org/NonFreeIETFDocuments>. OUT=/data/debian mkdir -p $OUT/contents/ find $OUT/pool/main -name \*.orig.tar.gz | ( while read file; do oldIFS=$IFS IFS=/ set -- $file IFS=$oldIFS dir=$6 pkg=$7 basename=$8 # echo file $file dir $dir pkg $pkg basename $basename if ! test -f $OUT/contents/$basename; then echo unpacking $file tar-recursive $file > $OUT/contents/$basename if [ "x$?" != "x0" ]; then echo "tar failed on $filename with error $?" 1>&2 exit 1 fi fi done) }}} 3. Search for RFC matches. (note: this one isn't updated to use the same contents file generated by more modern scripts above. It is preserved here until there is a better script available.) {{{ DIR=/data/debian SRCLIST=$DIR/dists/testing/main/source/Sources RFCDIR=/home/jas/rfc TMP=/tmp IDURL=http://bgp.potaroo.net/ietf/all-ids/ gzip -cd $SRCLIST.gz > $SRCLIST cd $DIR/contents find . -type f|sort|xargs egrep \ -e rfc[0-9]+\.txt \ -e draft-.*[0-9][0-9]\.txt \ | ( while read line; do oldIFS=$IFS IFS=: set -- $line IFS=$oldIFS file=$1 file=`echo $file | sed 's,^./,,g'` pkg=`echo $file | sed 's,_.*,,g'` ver=`grep -A 3 "^Package: $pkg\$" $SRCLIST | grep ^Version: | sed 's/Version: //'` # echo line $line # echo file $file if test -n "$lastfile" -a "$file" != "$lastfile"; then if test -n "$files"; then echo pkg $lastpkg ver $lastver lastfile $lastfile files $files X=$DIR/bad/$lastpkg-$lastver/ mkdir -p $X cd $X f=`find $DIR/pool/main -name $lastfile` for i in $files; do echo tar xfz $f $i tar xfz $f $i if echo $i | grep -q '.bz2$'; then echo bzip2 -d $i bzip2 -d $i i=`echo $i | sed 's/.bz2$//'` fi md5in=`cat $i | md5sum` echo $md5in $i base=`basename $i` rfc=`echo $base | sed 's/rfc0*/rfc/'` if ! test -f $RFCDIR/$rfc; then # Probably some unknown draft... pushd $RFCDIR if ! wget $IDURL/$rfc 2>&1; then echo FETCH-FAIL $rfc fi popd fi md5real=`cat $RFCDIR/$rfc | md5sum` echo $md5real $RFCDIR/$rfc if test "$md5in" != "$md5real"; then echo MISMATCH $rfc diff -urw $i $RFCDIR/$rfc 2>&1 cmp $i $RFCDIR/$rfc 2>&1 else echo MATCH $rfc fi done fi files="" fi if grep -q $file $SRCLIST; then set -- $line files="$files $6" fi lastfile=$file lastpkg=$pkg lastver=$ver done echo last pkg $pkg ver $ver files $files ) }}} |
This page provides information on IETF RFC/I-Ds within Debian.
Background
The majority of IETF documents, such as RFCs, are not licensed under DFSG-free terms, and should thus not be included in Debian's main. However, RFC documents are frequently included in many packages that would otherwise be free software. Some care is required to remove then when packaging software for Debian.
Some links to discussion of the license problems:
- TBA add debian-legal links
Some general background:
In particular, the etch_rc_policy.txt document above says:
- DFSG-freeness
- All content in main and contrib must meet the DFSG, both in .debs and in the source (including the .orig.tar.gz)
Status
All non-free RFC files in non-source packages are believed to be reported, see:
Currently I'm investigating source packages too. A list of packages with non-free files in them are found at:
On 2006-10-16, I sent bug reports for RFC/I-Ds in source packages too. They are now visible through the first linke in this section.
Some raised a concern that there may be false positives in the list. I modified the script (see last on this page) to compute MD5's on the RFC in the source packages, and run diff+cmp on the files if the MD5 doesn't match. The output from the script is published at:
I went through the reports manually, and there were one unclear case which most likely indicate a false positive, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393411
On 2006-10-24 I modified the script to recursively look into archives-within-archives in the source packages, to find deeply nested documents too. Some more occurances were found and reported.
Known exceptions
These documents have been made available under a free license:
- The I-D draft-morgan-ident-ext-04.txt
- The I-D's draft-riikonen-presence-attrs-03.txt, draft-riikonen-silc-commands-06.txt, draft-riikonen-silc-flags-payloads-04.txt, draft-riikonen-silc-ke-auth-08.txt, draft-riikonen-silc-pp-09.txt, and draft-riikonen-silc-spec-08.txt
The following may hold but is questionable:
- US-authored RFCs earlier than RFC around RFC 1000-1100.
- These did not carry a copyright notice, and since the US did not sign the Berne convention until 1989, they are in the public domain.
The RFC editor has something else to say on this
From: RFC Editor <rfc-editor@rfc-editor.org> Subject: Re: Copyright and copying conditions for RFC 1510? To: Simon Josefsson <jas@extundo.com> Cc: RFC Editor <rfc-editor@rfc-editor.org> Date: Mon, 16 Dec 2002 11:07:28 -0800 Simon, The copyright statement applies retroactively. Please follow the instructions as stated at: ftp://ftp.rfc-editor.org/in-notes/rfc-editor/rfc-copyright-story Thank you. RFC Editor On Sun, Dec 15, 2002 at 10:38:30AM +0100, Simon Josefsson wrote: > rfc1510.txt does not mention copyright or copying condition. Does the > copyright notice in > > ftp://ftp.rfc-editor.org/in-notes/rfc-editor/rfc-copyright-story > > apply retroactively? If not, do you know who owns the copyright of > the document and what the copying conditions are? > > Thanks.
- These did not carry a copyright notice, and since the US did not sign the Berne convention until 1989, they are in the public domain.
Template for RFC authors to release additional rights
If you as a RFC editor wish to grant additional rights within the document directly, to avoid having the Debian community ask you for additional rights later on, you may include the following text in the document. Similar text has been approved in RFCs before (e.g., RFC 3492, RFC 4501) and the IETF do not appear to object to this practice.
x. Copying conditions The author(s) agree to grant third parties the irrevocable right to copy, use and distribute the work, with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works do not contain misleading author, version, name of work, or endorsement information.
The text is derived from draft-josefsson-ipr-notice-update.
Template requesting additional rights from RFC authors
This is based on RFC 4663 and draft-josefsson-ipr-rules-update (see <http://josefsson.org/bcp78broken/>).
Subject: Requesting additional rights to RFC xxxx Dear Author, The Debian GNU/Linux distribution wishes to incorporate the IETF RFC xxxx as part of its distribution, and to allow users to develop, modify and evolve the document. Under IETF policies that were in effect during the development of RFC xxxx, the authors of contributions to the IETF standards retain copyright with respect to such contributions. Because you are an author of said document, the Debian community hereby requests that you kindly agree to release your contributions in RFC xxxx under the license below, for inclusion in Debian. I agree to grant third parties the irrevocable right to copy, use and distribute the work, with or without modification, in any medium, without royalty, provided that, unless separate permission is granted, redistributed modified works: (a) do not contain misleading author, version, name of work, or endorsement information, and (b) do not claim endorsement of the modified work by the Contributor, or any organization the Contributor belongs to, the Internet Engineering Task Force (IETF), Internet Research Task Force (IRTF), Internet Engineering Steering Group (IESG), Internet Architecture Board (IAB), Internet Assigned Numbers Authority (IANA), Internet Society (ISOC), Request For Comments (RFC) Editor, or any combination or variation of such terms (including without limitation the IETF "4 diamonds" logo), or any terms that are confusingly similar thereto, and (c) remove any claims of status as an Internet Standard, including without limitation removing the RFC boilerplate. The IETF suggests that any citation or excerpt of unmodified text reference the RFC or other document from which the text is derived. To indicate that you agree to these terms, please reply to this e-mail and quote the license above and indicate that you agree to this. If you prefer another widely recognized free license instead, the following ones are also fine: * the 3-clause BSD license http://www.gnu.org/licenses/info/BSD_3Clause.html * the GNU GPL version 2 http://www.fsf.org/licensing/licenses/gpl.txt * the Expat license http://www.jclark.com/xml/copying.txt Sincerely yours, Simon Josefsson
Bug report template
This will be used for the reports on non-free RFCs in source packages.
{{{ Subject: Source package contains non-free IETF RFC Severity: serious Package: [package] Version: [version] User: debian-release@lists.debian.org Usertags: nonfree-doc rfc
Hi!
This source package contains the following files from the IETF under non-free license terms:
FILES The license on RFC/I-Ds is not DFSG-free, see:
The etch release policy says binary and source packages must each be free:
The severity is serious, because this violates the Debian policy:
There are (at least) three ways to fix this problem. In order of preference:
1. Ask the author of the RFC to re-license the RFC under a free
- license. A template for this e-mail request can be found at
2. Remove the non-free material from the source, e.g., by re-packaging
- the upstream archive and adding a 'dfsg' version name to it.
3. Move the package to non-free.
General discussions are kindly requested to take place on debian-legal or debian-devel in the thread with Subject: "Non-free IETF RFC/I-Ds in source packages".
Thanks, Simon }}}
Theory of operation
1. Rsync the Debian repository.
The file is called debian-rsync.
# debian-rsync: Mirror a Debian repository. # Written by Simon Josefsson <simon@josefsson.org> during September # 2006. Released under GPLv2 or later. See # <http://wiki.debian.org/NonFreeIETFDocuments>. MIRROR=ftp.se.debian.org::debian OUT=/data/debian rsync -av --exclude Sources.diff $MIRROR/dists/testing/main/source \ $OUT/dists/testing/main/ rsync -av --exclude Packages.diff $MIRROR/dists/testing/main/binary-i386 \ $OUT/dists/testing/main/ rsync -av --exclude Sources.diff $MIRROR/dists/unstable/main/source \ $OUT/dists/unstable/main/ rsync -av --exclude Packages.diff $MIRROR/dists/unstable/main/binary-i386 \ $OUT/dists/unstable/main/ LIST=$(rsync $MIRROR/pool/main/ \ | grep '^drwx' \ | awk '{print $5}' \ | grep -v -e '^.$') for i in $LIST; do echo Working in $i... rsync -av --delete --delete-excluded \ --exclude '*.udeb' \ --exclude '*_alpha.deb' \ --exclude '*_amd64.deb' \ --exclude '*_arm.deb' \ --exclude '*_hppa.deb' \ --exclude '*_hurd-i386.deb' \ --exclude '*_ia64.deb' \ --exclude '*_m68k.deb' \ --exclude '*_mips.deb' \ --exclude '*_mipsel.deb' \ --exclude '*_powerpc.deb' \ --exclude '*_s390.deb' \ --exclude '*_sparc.deb' \ $MIRROR/pool/main/$i $OUT/pool/main/ done
2. Get list of package contents.
There are two files here, first tar-recursive and then debian-unpack.
# tar-recursive: Recursively list members of an archive. # Inspired by find-in-tars by Timo Juhani Lindfors # <timo.lindfors@iki.fi>, but re-written by Simon Josefsson # <simon@josefsson.org> during September 2006. Released under GPLv2 # or later. See <http://wiki.debian.org/NonFreeIETFDocuments>. for archive in "$@"; do case "$archive" in *.tar.gz) MEMBERS=`tar tvfz $archive | awk '{print $6}'`;; *.tar.bz2) MEMBERS=`tar tvfj $archive | awk '{print $6}'`;; *.jar) MEMBERS=`unzip -vqq $archive | awk '{print $8}'`;; *.zip) MEMBERS=`unzip -vqq $archive | awk '{print $8}'`;; esac for member in $MEMBERS; do echo $member case "$member" in *.tar.gz | *.tar.bz2 | *.jar | *.zip) echo recursing into $archive $member 1>&2 tempdir=`mktemp -d -t tar-recursive.XXXXXXXXXX` || exit 1 case "$archive" in *.tar.gz) tar xfz $archive -C $tempdir $member err=$? ;; *.tar.bz2) tar xfj $archive -C $tempdir $member err=$? ;; *.jar) unzip -q $archive $member -d $tempdir err=$? ;; *.zip) unzip -q $archive $member -d $tempdir err=$? ;; esac if test "$err" != "0"; then echo "tar failed on $member with error $?" 1>&2 exit 1 fi echo $member tar-recursive $tempdir/$member | sed "s@^@$member:@" rm -fr $tempdir ;; esac done done
# debian-unpack: Extract a list of members in *.orig.tar.gz in a # Debian repository. # Written by Simon Josefsson <simon@josefsson.org> during September # 2006. Released under GPLv2 or later. See # <http://wiki.debian.org/NonFreeIETFDocuments>. OUT=/data/debian mkdir -p $OUT/contents/ find $OUT/pool/main -name \*.orig.tar.gz | ( while read file; do oldIFS=$IFS IFS=/ set -- $file IFS=$oldIFS dir=$6 pkg=$7 basename=$8 # echo file $file dir $dir pkg $pkg basename $basename if ! test -f $OUT/contents/$basename; then echo unpacking $file tar-recursive $file > $OUT/contents/$basename if [ "x$?" != "x0" ]; then echo "tar failed on $filename with error $?" 1>&2 exit 1 fi fi done)
3. Search for RFC matches.
(note: this one isn't updated to use the same contents file generated by more modern scripts above. It is preserved here until there is a better script available.)
DIR=/data/debian SRCLIST=$DIR/dists/testing/main/source/Sources RFCDIR=/home/jas/rfc TMP=/tmp IDURL=http://bgp.potaroo.net/ietf/all-ids/ gzip -cd $SRCLIST.gz > $SRCLIST cd $DIR/contents find . -type f|sort|xargs egrep \ -e rfc[0-9]+\.txt \ -e draft-.*[0-9][0-9]\.txt \ | ( while read line; do oldIFS=$IFS IFS=: set -- $line IFS=$oldIFS file=$1 file=`echo $file | sed 's,^./,,g'` pkg=`echo $file | sed 's,_.*,,g'` ver=`grep -A 3 "^Package: $pkg\$" $SRCLIST | grep ^Version: | sed 's/Version: //'` # echo line $line # echo file $file if test -n "$lastfile" -a "$file" != "$lastfile"; then if test -n "$files"; then echo pkg $lastpkg ver $lastver lastfile $lastfile files $files X=$DIR/bad/$lastpkg-$lastver/ mkdir -p $X cd $X f=`find $DIR/pool/main -name $lastfile` for i in $files; do echo tar xfz $f $i tar xfz $f $i if echo $i | grep -q '.bz2$'; then echo bzip2 -d $i bzip2 -d $i i=`echo $i | sed 's/.bz2$//'` fi md5in=`cat $i | md5sum` echo $md5in $i base=`basename $i` rfc=`echo $base | sed 's/rfc0*/rfc/'` if ! test -f $RFCDIR/$rfc; then # Probably some unknown draft... pushd $RFCDIR if ! wget $IDURL/$rfc 2>&1; then echo FETCH-FAIL $rfc fi popd fi md5real=`cat $RFCDIR/$rfc | md5sum` echo $md5real $RFCDIR/$rfc if test "$md5in" != "$md5real"; then echo MISMATCH $rfc diff -urw $i $RFCDIR/$rfc 2>&1 cmp $i $RFCDIR/$rfc 2>&1 else echo MATCH $rfc fi done fi files="" fi if grep -q $file $SRCLIST; then set -- $line files="$files $6" fi lastfile=$file lastpkg=$pkg lastver=$ver done echo last pkg $pkg ver $ver files $files )