Bug#696492: devscripts: [uscan] fails unnecessarily when directory pattern matches a non-directory
Package: devscripts Version: 2.12.6 Severity: normal As can be seen below, (.+) matches non-directories (such as HEADER.html), then when uscan tries to descend into them, it fails the entire run rather than trying the next maybe-directory that was matched. $ cat ubuntu-desktop-amd64.watch version=3 ftp://ftp.mirrorservice.org/sites/releases.ubuntu.com/(.+)/ubuntu-(.+)-desktop-amd64.iso.torrent \ debian ./uscan $ uscan --debug --upstream-version 12.10 --package ubuntu-desktop-amd64 --watchfile ubuntu-desktop-amd64.watch --download --pasv --destdir ../bin -- In ubuntu-desktop-amd64.watch, processing watchfile line: ftp://ftp.mirrorservice.org/sites/releases.ubuntu.com/(.+)/ubuntu-(.+)-desktop-amd64.iso.torrent debian ./uscan uscan debug: dir=>/sites/releases.ubuntu.com/ dirpattern=>(.+) uscan debug: requesting URL ftp://ftp.mirrorservice.org/sites/releases.ubuntu.com/ uscan debug: received content: lrwxrwxrwx1 ftp ftp 5 Mar 19 2010 10.04 -> lucid lrwxrwxrwx1 ftp ftp 5 Feb 16 2012 10.04.4 -> lucid lrwxrwxrwx1 ftp ftp 7 Sep 01 2011 11.10 -> oneiric lrwxrwxrwx1 ftp ftp 7 Mar 01 2012 12.04 -> precise lrwxrwxrwx1 ftp ftp 7 Aug 23 22:47 12.04.1 -> precise lrwxrwxrwx1 ftp ftp 7 Sep 06 17:39 12.10 -> quantal lrwxrwxrwx1 ftp ftp 5 Mar 20 2008 8.04 -> hardy lrwxrwxrwx1 ftp ftp 5 Jan 28 2010 8.04.4 -> hardy -rw-rw-r--1 ftp ftp22 Feb 01 2006 FOOTER.html -rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html drwxrwxr-x2 ftp ftp 4096 Sep 21 11:18 cdicons drwxrwxr-x4 ftp ftp 4096 Sep 27 18:27 edubuntu -rw-rw-r--1 ftp ftp 1150 Jun 16 2011 favicon.ico drwxrwxr-x2 ftp ftp 4096 Mar 30 2011 hardy drwxrwxr-x3 ftp ftp 4096 Jan 24 2011 include drwxrwxr-x2 ftp ftp 4096 Nov 02 12:01 jigit drwxrwxr-x6 ftp ftp 4096 Nov 02 11:59 kubuntu drwxrwxr-x2 ftp ftp 4096 Feb 19 2012 lucid drwxrwxr-x2 ftp ftp 4096 Oct 13 2011 oneiric drwxrwxr-x2 ftp ftp 4096 Oct 16 17:12 precise drwxrwxr-x2 ftp ftp 4096 Oct 18 15:10 quantal lrwxrwxrwx1 ftp ftp 1 Jul 31 2007 releases -> . -rw-rw-r--1 ftp ftp49 Oct 29 2009 robots.txt [End of received content] uscan debug: matching pattern (.+) -- Found the following matching dirs: lrwxrwxrwx1 ftp ftp 5 Mar 19 2010 10.04 -> lucid lrwxrwxrwx1 ftp ftp 5 Feb 16 2012 10.04.4 -> lucid lrwxrwxrwx1 ftp ftp 7 Sep 01 2011 11.10 -> oneiric lrwxrwxrwx1 ftp ftp 7 Mar 01 2012 12.04 -> precise lrwxrwxrwx1 ftp ftp 7 Aug 23 22:47 12.04.1 -> precise lrwxrwxrwx1 ftp ftp 7 Sep 06 17:39 12.10 -> quantal lrwxrwxrwx1 ftp ftp 5 Mar 20 2008 8.04 -> hardy lrwxrwxrwx1 ftp ftp 5 Jan 28 2010 8.04.4 -> hardy -rw-rw-r--1 ftp ftp22 Feb 01 2006 FOOTER.html -rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html drwxrwxr-x2 ftp ftp 4096 Sep 21 11:18 cdicons drwxrwxr-x4 ftp ftp 4096 Sep 27 18:27 edubuntu -rw-rw-r--1 ftp ftp 1150 Jun 16 2011 favicon.ico drwxrwxr-x2 ftp ftp 4096 Mar 30 2011 hardy drwxrwxr-x3 ftp ftp 4096 Jan 24 2011 include drwxrwxr-x2 ftp ftp 4096 Nov 02 12:01 jigit drwxrwxr-x6 ftp ftp 4096 Nov 02 11:59 kubuntu drwxrwxr-x2 ftp ftp 4096 Feb 19 2012 lucid drwxrwxr-x2 ftp ftp 4096 Oct 13 2011 oneiric drwxrwxr-x2 ftp ftp 4096 Oct 16 17:12 precise drwxrwxr-x2 ftp ftp 4096 Oct 18 15:10 quantal lrwxrwxrwx1 ftp ftp 1 Jul 31 2007 releases -> . -rw-rw-r--1 ftp ftp49 Oct 29 2009 robots.txt uscan debug: newest_dir => '-rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html' uscan debug: requesting URL ftp://ftp.mirrorservice.org/sites/releases.ubuntu.com/-rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html/ uscan warning: In watchfile ubuntu-desktop-amd64.watch, reading FTP directory ftp://ftp.mirrorservice.org/sites/releases.ubuntu.com/-rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html/ failed: 404 File '-rw-rw-r--1 ftp ftp 1902 Nov 02 11:59 HEADER.html' not found 1 -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (500, 'unstable'
Bug#721939: mk-build-deps: match the version of the corresponding package
Package: devscripts Version: 2.13.3 Severity: normal Hi, it would be nice if mk-build-deps generated .debs whose Version is the same as the .dsc it is building from. Then you could correctly store the *.debs of older versions instead of hacking the filename to be something other than the Version contained inside it. One motivation is so you could informally distribute the resulting .deb and have version upgrades work correctly. Obviously I do not expect devscripts to officially support this usage, but it would be nice if it worked. -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages devscripts depends on: ii dpkg-dev 1.16.10 ii libc6 2.17-92 ii perl 5.14.2-21 ii python3 3.3.2-15 Versions of packages devscripts recommends: ii at3.1.13-2 ii curl 7.32.0-1 ii dctrl-tools 2.23 ii debian-keyring2013.07.31 ii dput 0.9.6.4 ii equivs2.0.9 ii fakeroot 1.18.4-2 ii gnupg 1.4.14-1 ii libcrypt-ssleay-perl 0.58-1 ii libdistro-info-perl 0.11 ii libencode-locale-perl 1.03-1 ii libjson-perl 2.59-1 ii libparse-debcontrol-perl 2.005-4 ii libsoap-lite-perl 0.716-1 ii liburi-perl 1.60-1 ii libwww-perl 6.05-1 ii lintian 2.5.15 ii man-db2.6.5-2 ii patch 2.7.1-3 ii patchutils0.3.2-2 ii python3-debian0.1.21+nmu2 ii python3-magic 1:5.14-2 ii sensible-utils0.0.9 ii strace4.5.20-2.3 ii unzip 6.0-9 ii wdiff 1.1.2-1 ii wget 1.14-2 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages devscripts suggests: ii bsd-mailx [mailx]8.1.2-0.2006cvs-1 ii build-essential 11.6 pn cvs-buildpackage pn devscripts-el ii gnuplot 4.6.3-2 ii gpgv 1.4.14-1 ii heirloom-mailx [mailx] 12.5-2 ii libauthen-sasl-perl 2.1500-1 ii libfile-desktopentry-perl0.04-3 ii libnet-smtp-ssl-perl 1.01-3 pn libterm-size-perl ii libtimedate-perl 1.2000-1 ii libyaml-syck-perl1.27-2 ii mutt 1.5.21-6.3 ii openssh-client [ssh-client] 1:6.2p2-6 pn svn-buildpackage ii w3m 0.5.3-11 -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#728198: devscripts: debuild (& others) must reject debian/rules actions on unpatched source trees
Package: devscripts Version: 2.13.4 Severity: important It does not make sense to build or clean an unpatched source tree, since the applied patches are considered strictly *part of the source package*. However, `debuild build/clean`, and probably many other tools, still allows this to happen without any warning. This is partly a fault of policy which is very loose on what is a correct state to initiate build actions from; I will file a separate bug for that too. http://www.debian.org/doc/debian-policy/ch-source.html -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages devscripts depends on: ii dpkg-dev 1.16.12 ii libc62.17-93 ii perl 5.18.1-4 ii python3 3.3.2-17 pn python3:any Versions of packages devscripts recommends: ii at3.1.14-1 ii curl 7.32.0-1 ii dctrl-tools 2.23 ii debian-keyring2013.07.31 ii dput 0.9.6.4 ii equivs2.0.9 ii fakeroot 1.18.4-2 ii gnupg 1.4.15-1.1 ii libcrypt-ssleay-perl 0.58-1+b1 ii libdistro-info-perl 0.11 ii libencode-locale-perl 1.03-1 ii libjson-perl 2.59-1 ii libparse-debcontrol-perl 2.005-4 ii libsoap-lite-perl 0.716-1 ii liburi-perl 1.60-1 ii libwww-perl 6.05-1 ii lintian 2.5.19 ii man-db2.6.5-2 ii patch 2.7.1-3 ii patchutils0.3.2-2 ii python3-debian0.1.21+nmu2 ii python3-magic 1:5.14-2 ii sensible-utils0.0.9 ii strace4.5.20-2.3 ii unzip 6.0-9 ii wdiff 1.1.2-1 ii wget 1.14-4 ii xz-utils 5.1.1alpha+20120614-2 Versions of packages devscripts suggests: ii bsd-mailx [mailx]8.1.2-0.20131005cvs-1 ii build-essential 11.6 pn cvs-buildpackage pn devscripts-el ii gnuplot 4.6.3-2 ii gpgv 1.4.15-1.1 ii heirloom-mailx [mailx] 12.5-2 ii libauthen-sasl-perl 2.1500-1 ii libfile-desktopentry-perl0.07-1 ii libnet-smtp-ssl-perl 1.01-3 pn libterm-size-perl ii libtimedate-perl 1.2000-1 ii libyaml-syck-perl1.27-2+b1 ii mutt 1.5.21-6.4 ii openssh-client [ssh-client] 1:6.2p2-6 pn svn-buildpackage ii w3m 0.5.3-11 -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#728198: devscripts: debuild (& others) must reject debian/rules actions on unpatched source trees
On 29/10/13 12:14, Ximin Luo wrote: > Package: devscripts > Version: 2.13.4 > Severity: important > > It does not make sense to build or clean an unpatched source tree, since the > applied patches are considered strictly *part of the source package*. However, > `debuild build/clean`, and probably many other tools, still allows this to > happen without any warning. > > This is partly a fault of policy which is very loose on what is a correct > state > to initiate build actions from; I will file a separate bug for that too. > > http://www.debian.org/doc/debian-policy/ch-source.html > To clarify, I'm talking about the source format 3.0 (quilt), where the application of patches is considered to be the responsibility of dpkg-source rather than the build process itself. If this basic check isn't done, bugs like this [1] happen to developers that don't know about all the precise details of how build infrastructure works. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728097 -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#728198: devscripts: debuild (& others) must reject debian/rules actions on unpatched source trees
On 29/10/13 14:23, Bill Allombert wrote: > On Tue, Oct 29, 2013 at 12:14:16PM +0000, Ximin Luo wrote: >> Package: devscripts >> Version: 2.13.4 >> Severity: important >> >> It does not make sense to build or clean an unpatched source tree, since the >> applied patches are considered strictly *part of the source package*. >> However, >> `debuild build/clean`, and probably many other tools, still allows this to >> happen without any warning. > > I think I understand Ximin issue: > > debclean can fail in a source tree when using the source format "3.0 quilt", > if 'debian/rules clean' requires the patches to be applied to work, for > example > an upstream Makefile is fixed, > because debclean does not make sure the patches are applied. > > Cheers, > Thanks, Bill! Yes that's what I meant. One possible way to fix this, is to change `debuild $TARGET` so that it runs: $ dpkg-source --before-build $ debian/rules $TARGET $ dpkg-source --after-build instead of just `debian/rules $TARGET`. This works for my use case, but I'm less certain if it is "completely correct". -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#728198: devscripts: debuild (& others) must reject debian/rules actions on unpatched source trees
reopen 728198 reassign 728198 dpkg-dev retitle 728198 dpkg-buildpackage, debuild, et al, must reject debian/rules actions on unpatched source trees affects 728198 +devscripts On 29/10/13 15:18, James McCoy wrote: > On Tue, Oct 29, 2013 at 12:14:16PM +0000, Ximin Luo wrote: >> It does not make sense to build or clean an unpatched source tree, since the >> applied patches are considered strictly *part of the source package*. >> However, >> `debuild build/clean`, and probably many other tools, still allows this to >> happen without any warning. > > This is not a bug in debuild. “debuild $target” should behave similar to > “dpkg-buildpackage -T $target” and as stated in dpkg-buildpackage(1): > > 1. It prepares the build environment by setting various environment >variables (see ENVIRONMENT) and calls dpkg-source >--before-build (unless -T or --target has been used). > … > 3. If a specific target has been selected with the -T or >--target option, it calls that target and stops here. Otherwise >it calls fakeroot debian/rules clean to clean the build-tree >(unless -nc is specified). > > From this, we can see that when a specific target is provided: > a) “dpkg-source --before-build” (which is what applies the patches) >should not be called and > b) “debian/rules $target” will be called directly and then the build >will stop. > > The expection when a specific target is going to be run is that the > working tree is in a proper state to run that target. > > When a target isn't specified, debuild runs dpkg-source > --before-build/--after-build just like dpkg-buildpackage does. > > This has previously been discussed in #628481[0]. > > [0]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628481#16 > > Cheers, > I'm sorry, closing this bug is a lazy cop-out that ignores a legitimate usability issue. Right now I cannot easily cleanup after a build; I do not want to use -tc because I'd like to examine the build products manually first, and manually running `dpkg-source --{before,after}-build` is usability bullshit. I agree there is an "expectation [..] that the working tree is in a proper state", but this is enforced no-where by the user-facing tools. Fixing the behaviour as I suggested DOES NOT BREAK ANYTHING, since it simply puts the tree into the state it is *supposed to already be in*. What's more, it might even expose subtle bugs where maintainers are incorrectly depending on a non-patched tree, for example #728097. That bug would not even exist if this issue had been properly detected by the build tools. X -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git signature.asc Description: OpenPGP digital signature ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#814049: /usr/bin/uscan: uscan gives invalid example in manpage for github tags
Package: devscripts Version: 2.15.10 Severity: normal File: /usr/bin/uscan Dear Maintainer, In uscan's manpage, it gives this example for github tags: version=4 opts="filenamemangle="s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%-$1.tar.gz%" \ https://github.com///tags \ (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate However when I actually use it: version=4 opts="filenamemangle="s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%baka-mplayer-$1.tar.gz%" \ https://github.com/u8sand/Baka-MPlayer/tags \ (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate uscan tells me: uscan warn: In debian/watch, potentially unsafe or malformed filenamemangle pattern: '"s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%baka-mplayer-$1.tar.gz%' found. Skipping watchline https://github.com/u8sand/Baka-MPlayer/tags (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate 1 This is bad for two reasons: - many people will copy this out of the manpage - it gives me no indication on why it's unsafe nor how to fix my watch file Please fix? Thanks, X -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- export DEBSIGN_PROGRAM="gpg2" -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'stable'), (300, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages devscripts depends on: ii dpkg-dev 1.18.4 ii libc62.21-7 ii perl 5.20.2-6 pn python3:any Versions of packages devscripts recommends: ii apt 1.2.1 ii at 3.1.18-2 ii curl7.47.0-1 ii dctrl-tools 2.24-2 ii debian-keyring 2016.01.20 ii dput0.9.6.4 ii equivs 2.0.9+nmu1 ii fakeroot1.20.2-1 ii file1:5.25-2 ii gnupg 1.4.20-1 ii gnupg2 2.1.11-2 ii libdistro-info-perl 0.14 ii libencode-locale-perl 1.05-1 ii libjson-perl2.90-1 ii liblwp-protocol-https-perl 6.06-2 ii libsoap-lite-perl 1.19-1 ii liburi-perl 1.71-1 ii libwww-perl 6.15-1 ii lintian 2.5.40.2 ii man-db 2.7.5-1 ii patch 2.7.5-1 ii patchutils 0.3.4-1 ii python3-debian 0.1.27 ii python3-magic 1:5.25-2 ii sensible-utils 0.0.9 ii strace 4.10-3 ii unzip 6.0-20 ii wdiff 1.2.2-1+b1 ii wget1.17.1-1+b1 ii xz-utils5.1.1alpha+20120614-2.1 Versions of packages devscripts suggests: ii bsd-mailx [mailx]8.1.2-0.20150408cvs-1 ii build-essential 11.7 pn cvs-buildpackage pn debbindiff pn devscripts-el ii gnuplot 4.6.6-3 ii gpgv 1.4.20-1 ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl0.22-1 ii libnet-smtp-ssl-perl 1.03-1 pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl1.29-1 ii mozilla-devscripts 0.44 ii mutt 1.5.24-1+b1 ii openssh-client [ssh-client] 1:7.1p2-2 ii s-nail [mailx] 14.8.6-1 pn svn-buildpackage ii w3m 0.5.3-26 -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#814049: /usr/bin/uscan: uscan gives invalid example in manpage for github tags
Ximin Luo: > In uscan's manpage, it gives this example for github tags: > > version=4 > > opts="filenamemangle="s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%-$1.tar.gz%" \ > https://github.com///tags \ > (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate > > [..] > > uscan warn: In debian/watch, potentially unsafe or malformed filenamemangle > pattern: > '"s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%baka-mplayer-$1.tar.gz%' found. Skipping > watchline > https://github.com/u8sand/Baka-MPlayer/tags (?:.*?/)?v?(\d[\d.]*)\.tar\.gz > debian uupdate > 1 OK, this can be fixed by changing 'filenamemangle="' to 'filenamemangle=' (remove the double-quote). However, the error message is still pretty vague. What does "unsafe" mean? Could you at least make two different error messages for the "unsafe" vs "malformed" cases? Also I am getting this as further output: uscan: Don't downloading upstream package: baka-mplayer-2.0.4.tar.gz uscan: Start checking for common possible upstream OpenPGP signature files uscan: End checking for common possible upstream OpenPGP signature files uscan: Successfully downloaded package baka-mplayer-2.0.4.tar.gz uscan warn: No upstream tarball downloaded. No further processing with mk_origtargz ... 1 No actual tarball is download, but it's not obvious given the final two messages state directly opposite things. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch master updated (63f1f41 -> 1a1d95f)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch master in repository devscripts. from 63f1f41 Add closes entry for debclean breakage new 1a1d95f debrepro: fix man page, add build products to .gitignore The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore | 2 ++ scripts/debrepro.pod | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debrepro: fix man page, add build products to .gitignore
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch master in repository devscripts. commit 1a1d95f94aa674142ec3b67f22cce13fccc8aa39 Author: Ximin Luo Date: Fri Nov 25 18:19:27 2016 +0100 debrepro: fix man page, add build products to .gitignore --- .gitignore | 2 ++ scripts/debrepro.pod | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1b6a686..00c05c6 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,8 @@ scripts/debi scripts/debpkg scripts/debpkg-wrapper scripts/debrelease +scripts/debrepro +scripts/debrepro.1 scripts/debrsign scripts/debsign scripts/debsnap diff --git a/scripts/debrepro.pod b/scripts/debrepro.pod index e0de6e4..050ed10 100644 --- a/scripts/debrepro.pod +++ b/scripts/debrepro.pod @@ -92,7 +92,7 @@ future with regards to the current time. =over -=item 0 +=item 0Z<> Package is reproducible. @@ -101,11 +101,11 @@ same binaries, under the set of variations that B tests. Other sources of non-determinism in builds that are not yet tested might still affect builds in the wild. -=item 1 +=item 1Z<> Package is not reproducible. -=item 2 +=item 2Z<> The given input is not a valid Debian source package. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#845659: debpatch: New script, "Apply a debdiff to a Debian source package"
Package: devscripts Version: 2.16.10 Severity: wishlist Tags: patch Dear Maintainer, As part of the Reproducible Builds effort, I've written a tool called debpatch(1), see the branch here: https://anonscm.debian.org/cgit/collab-maint/devscripts.git/commit/?h=pu/debpatch To quote the README entry I added: - debpatch: Apply unified diffs of two Debian source packages, such as those generated by debdiff, to a target Debian source package. Any changes to debian/changelog are dealt with specially, to avoid the conflicts that changelog diffs typically produce when applied naively. May be used to check that old patches still apply to newer versions of those packages. [python3-unidiff, quilt] In the broader context, we have a lot of unapplied patches for R-B and we're not sure if they still work - whether they apply, or make the newer version of a package reproducible once applied. This tool automates the process of applying old patches to newer package versions, and I'm also writing R-B specific scripts that will use this tool to do continuous integration on our old patches, and alert the right people if anything fails. X -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable'), (300, 'unstable'), (200, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages devscripts depends on: ii dpkg-dev 1.18.13 ii libc62.24-5 ii perl 5.24.1~rc3-3 pn python3:any Versions of packages devscripts recommends: ii apt 1.3.1 ii at 3.1.20-1 ii curl7.50.1-1 ii dctrl-tools 2.24-2 ii debian-keyring 2016.09.04 ii dput0.10.3 ii equivs 2.0.9+nmu1 ii fakeroot1.21-2 ii file1:5.29-1 ii gnupg 2.1.15-4 ii gnupg2 2.1.15-4 ii libdistro-info-perl 0.14 ii libencode-locale-perl 1.05-1 ii liblwp-protocol-https-perl 6.06-2 ii libsoap-lite-perl 1.20-1 ii liburi-perl 1.71-1 ii libwww-perl 6.15-1 ii licensecheck3.0.24-1 ii lintian 2.5.49 ii man-db 2.7.5-1 ii patch 2.7.5-1 ii patchutils 0.3.4-2 ii python3-debian 0.1.29 ii python3-magic 1:5.29-1 ii python3-unidiff 0.5.2-1 ii sensible-utils 0.0.9 ii strace 4.13-0.1 ii unzip 6.0-20 ii wdiff 1.2.2-1+b1 ii wget1.18-4 ii xz-utils5.2.2-1.2 Versions of packages devscripts suggests: ii adequate 0.15.1 pn autopkgtest pn bls-standalone ii bsd-mailx [mailx]8.1.2-0.20160123cvs-3 ii build-essential 12.2 pn check-all-the-things pn cvs-buildpackage pn devscripts-el ii diffoscope 62 ii disorderfs 0.5.1-1 pn dose-extra pn duck pn faketime ii gnuplot 5.0.5+dfsg1-2 ii gpgv 2.1.15-4 pn how-can-i-help ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl0.22-1 pn libnet-smtps-perl pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl1.29-1+b2 ii mozilla-devscripts 0.47 ii mutt 1.7.1-2 ii openssh-client [ssh-client] 1:7.3p1-1 ii piuparts 0.72 ii quilt0.63-5 pn ratt pn reprotest ii s-nail [mailx] 14.8.14-1 pn svn-buildpackage pn w3m -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debpatch created (now a8237eb)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. at a8237eb debpatch: New script, "Apply a debdiff to a Debian source package" This branch includes the following new commits: new a8237eb debpatch: New script, "Apply a debdiff to a Debian source package" The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debpatch: New script, "Apply a debdiff to a Debian source package"
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit a8237eb963cb7b0d6e0e818ad70589765ceb93ba Author: Ximin Luo Date: Fri Nov 25 18:33:34 2016 +0100 debpatch: New script, "Apply a debdiff to a Debian source package" --- README| 7 ++ conf.default.in | 4 + debian/changelog | 4 + debian/control| 4 + debian/copyright | 16 +++ po4a/devscripts-po4a.conf | 2 + scripts/Makefile | 2 +- scripts/debdiff.1 | 1 + scripts/debpatch | 311 ++ scripts/debpatch.1| 108 10 files changed, 458 insertions(+), 1 deletion(-) diff --git a/README b/README index 575d3d4..8c9ca11 100644 --- a/README +++ b/README @@ -97,6 +97,13 @@ And now, in mostly alphabetical order, the scripts: ability to install the package with a very short command is very useful when troubleshooting packages. +- debpatch: Apply unified diffs of two Debian source packages, such as those + generated by debdiff, to a target Debian source package. Any changes to + debian/changelog are dealt with specially, to avoid the conflicts that + changelog diffs typically produce when applied naively. May be used to check + that old patches still apply to newer versions of those packages. + [python3-unidiff, quilt] + - debpkg: A wrapper for dpkg used by debi to allow convenient testing of packages. For debpkg to work, it needs to be made setuid root, and this needs to be performed by the sysadmin -- it is not diff --git a/conf.default.in b/conf.default.in index e043136..48633dd 100644 --- a/conf.default.in +++ b/conf.default.in @@ -280,6 +280,10 @@ # debc recognises the DEBRELEASE_DEBS_DIR variable; see debrelease # below for more information. +# debpatch +# +# No variables currently + # debpkg # # No variables currently diff --git a/debian/changelog b/debian/changelog index ae2b897..2fa6913 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,10 @@ devscripts (2.16.10) UNRELEASED; urgency=medium + Require a '--' between debuild options and debian/rules target so we know where options end. (Closes: #845566) + [ Ximin Luo ] + * debpatch: ++ New script, Apply a debdiff to a Debian source package. (Closes: #845659) + -- Afif Elghraoui Wed, 23 Nov 2016 23:50:46 -0800 devscripts (2.16.9) unstable; urgency=medium diff --git a/debian/control b/debian/control index 9c64a0b..523a3e8 100644 --- a/debian/control +++ b/debian/control @@ -66,6 +66,7 @@ Recommends: apt, patchutils, python3-debian (>= 0.1.15), python3-magic, +python3-unidiff, sensible-utils, strace, unzip, @@ -98,6 +99,7 @@ Suggests: adequate, mozilla-devscripts, mutt, piuparts, + quilt, ratt, reprotest, ssh-client, @@ -149,6 +151,8 @@ Description: scripts to make the life of a Debian Package maintainer easier added and removed files. Use the diffoscope package for deep comparisons. [wdiff, patchutils] - debi: install a just-built package + - debpatch: apply unified diffs of two Debian source packages, such as those +generated by debdiff, to a target source package [python3-unidiff, quilt] - debpkg: dpkg wrapper to be able to manage/test packages without su - debrepro: reproducibility tester for Debian packages [faketime, diffoscope, disorderfs] diff --git a/debian/copyright b/debian/copyright index a4a78e5..ea20cfe 100644 --- a/debian/copyright +++ b/debian/copyright @@ -81,6 +81,22 @@ License: GPL-3+ On Debian systems, the complete text of the GNU General Public License version 3 can be found in the /usr/share/common-licenses/GPL-3 file. +Files: scripts/debpatch* +Copyright: 2016 Ximin Luo +License: GPL-3+ + 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in the /usr/share/common-licenses/GPL-3 file. + Files: doc/suspicious-source.1 doc/wrap-and-sort.1 scripts/devscripts/* diff --git a/po4a/devscripts-po4a.conf b/po4a/devscripts-po4a.conf index 7061e06..56629f1 100644 --- a/po4a/devscripts-po4a.conf +++ b/po4a/devscripts-po4a.conf @@ -44,6 +44,8 @@ $lang:$lang/debdiff.$lang
Bug#846365: debrepro: warn about faketime and allow alternative values
Package: devscripts Version: 2.16.10 Severity: normal Tags: patch Dear Maintainer, Running debrepro on glibc causes an infinite loop in the second build (13 days+ build before I interrupted it). I didn't yet figure out the root cause of this in the glibc buildscripts, but faketime causing problems like this is a known issue with it, and people are not really expected to work around it. So debrepro should at least document this, and ideally make it possible to disable the time variation or do something else for it. For example, I could make the glibc build work by instead using: vary 'fakeroot debian/rules binary' \ 'faketime "@$SOURCE_DATE_EPOCH" fakeroot debian/rules binary' although the downside is that the time variation may only be a few seconds if a DD wanted to run debrepro as part of standard pre-upload QA checks. X -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable'), (300, 'unstable'), (200, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages devscripts depends on: ii dpkg-dev 1.18.15 ii libc62.24-5 ii perl 5.24.1~rc3-3 pn python3:any Versions of packages devscripts recommends: ii apt 1.3.1 ii at 3.1.20-1 ii curl7.50.1-1 ii dctrl-tools 2.24-2 ii debian-keyring 2016.09.04 ii dput0.11.0 ii equivs 2.0.9+nmu1 ii fakeroot1.21-2 ii file1:5.29-1 ii gnupg 2.1.16-2 ii gnupg2 2.1.16-2 ii libdistro-info-perl 0.14 ii libencode-locale-perl 1.05-1 ii liblwp-protocol-https-perl 6.06-2 ii libsoap-lite-perl 1.20-1 ii liburi-perl 1.71-1 ii libwww-perl 6.15-1 ii licensecheck3.0.24-1 ii lintian 2.5.49 ii man-db 2.7.5-2 ii patch 2.7.5-1 ii patchutils 0.3.4-2 ii python3-debian 0.1.29 ii python3-magic 1:5.29-1 ii sensible-utils 0.0.9 ii strace 4.13-0.1 ii unzip 6.0-20 ii wdiff 1.2.2-1+b1 ii wget1.18-4 ii xz-utils5.2.2-1.2 Versions of packages devscripts suggests: ii adequate 0.15.1 ii autopkgtest 4.2.1 pn bls-standalone ii bsd-mailx [mailx]8.1.2-0.20160123cvs-3 ii build-essential 12.2 pn check-all-the-things pn cvs-buildpackage pn devscripts-el ii diffoscope 62 ii disorderfs 0.5.1-1 pn dose-extra pn duck pn faketime ii gnuplot 5.0.5+dfsg1-4 ii gpgv 2.1.16-2 pn how-can-i-help ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl0.22-1 pn libnet-smtps-perl pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl1.29-1+b2 ii mozilla-devscripts 0.47 ii mutt 1.7.1-3 ii openssh-client [ssh-client] 1:7.3p1-3+b1 ii piuparts 0.72 pn ratt ii reprotest0.4 ii s-nail [mailx] 14.8.14-1 pn svn-buildpackage pn w3m -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#846365: debrepro: warn about faketime and allow alternative values
Antonio Terceiro: > On Wed, Nov 30, 2016 at 05:52:04PM +0100, Ximin Luo wrote: >> Package: devscripts >> Version: 2.16.10 >> Severity: normal >> Tags: patch >> >> Dear Maintainer, >> >> Running debrepro on glibc causes an infinite loop in the second build (13 >> days+ build before I interrupted it). I didn't yet figure out the root cause >> of this in the glibc buildscripts, but faketime causing problems like this is >> a known issue with it, and people are not really expected to work around it. >> >> So debrepro should at least document this, and ideally make it possible to >> disable the time variation or do something else for it. For example, I could >> make the glibc build work by instead using: >> >> vary 'fakeroot debian/rules binary' \ >> 'faketime "@$SOURCE_DATE_EPOCH" fakeroot debian/rules binary' > > the current version is not calling debian/rules directly anymore, nor has > $SOURCE_DATE_EPOCH. it looks like this: > > vary 'dpkg-buildpackage -b -us -uc' \ > 'faketime +213days+7hours+13minutes dpkg-buildpackage -b -us -uc' > > can you please make sure you are running the latest version, and if so, let me > now if it still doesn't work for you? > Hi Antonio, the bug is about the +213days value, so based on what you described it would still exist in the new version. I will test it again to confirm, but this will take a few more days. The suggested fix is to use a value that is in the past instead of the future, but still after the latest entry in d/changelog. One doesn't have to set SOURCE_DATE_EPOCH, merely calling dpkg-parsechangelog would be fine. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#846365: debrepro: warn about faketime and allow alternative values
Antonio Terceiro: > On Wed, Nov 30, 2016 at 07:11:00PM +0000, Ximin Luo wrote: >> Antonio Terceiro: >>> On Wed, Nov 30, 2016 at 05:52:04PM +0100, Ximin Luo wrote: >>>> Package: devscripts >>>> Version: 2.16.10 >>>> Severity: normal >>>> Tags: patch >>>> >>>> Dear Maintainer, >>>> >>>> Running debrepro on glibc causes an infinite loop in the second build (13 >>>> days+ build before I interrupted it). I didn't yet figure out the root >>>> cause >>>> of this in the glibc buildscripts, but faketime causing problems like this >>>> is >>>> a known issue with it, and people are not really expected to work around >>>> it. >>>> >>>> So debrepro should at least document this, and ideally make it possible to >>>> disable the time variation or do something else for it. For example, I >>>> could >>>> make the glibc build work by instead using: >>>> >>>> vary 'fakeroot debian/rules binary' \ >>>> 'faketime "@$SOURCE_DATE_EPOCH" fakeroot debian/rules binary' >>> >>> the current version is not calling debian/rules directly anymore, nor has >>> $SOURCE_DATE_EPOCH. it looks like this: >>> >>> vary 'dpkg-buildpackage -b -us -uc' \ >>> 'faketime +213days+7hours+13minutes dpkg-buildpackage -b -us -uc' >>> >>> can you please make sure you are running the latest version, and if so, let >>> me >>> now if it still doesn't work for you? >>> >> >> Hi Antonio, the bug is about the +213days value, so based on what you >> described it would still exist in the new version. I will test it >> again to confirm, but this will take a few more days. >> >> The suggested fix is to use a value that is in the past instead of the >> future, but still after the latest entry in d/changelog. One doesn't >> have to set SOURCE_DATE_EPOCH, merely calling dpkg-parsechangelog >> would be fine. > > Can you try this instead: > > future=$(date -d '+213days+7hours+13minutes' +%s) > faketime "@$future" dpkg-buildpackage -b -us -uc > Hi Antonio, why do you think this would have a different effect? Everything that `man faketime` says indicates that all the 3 options that you described would behave identically. Nevertheless, I am testing it now, but I think you are wasting time here. I told you already, faketime has known problems like this. It is perfectly expected that this +213 days value will cause something to break. That is why we don't just add it to dpkg-buildpackage and say "everything is reproducible" already. If for some magical reason it turns out it is not at fault here for glibc, it will still cause something *else* to break in the future. So an option to disable it is prudent. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#846365: debrepro: warn about faketime and allow alternative values
Ximin Luo: > > Thank you! The behaviour specifically for glibc_2.24-5 is like this: > > make[2]: Warning: File 'o-iterator.mk' has modification time 18411205 s in > the future > running CONFIG_SHELL=/bin/bash /bin/bash > /tmp/debrepro.afKzxbwOYw/build/source/configure --host=x86_64-linux-gnu > --build=x86_64-linux-gnu --prefix=/usr --enable-add-ons=libidn, > --without-selinux --enable-stackguard-randomization --enable-obsolete-rpc > --with-pkgversio > n=Debian GLIBC 2.24-5.1 --with-bugurl=http://www.debian.org/Bugs/ > --with-headers=/tmp/debrepro.afKzxbwOYw/build/source/debian/include > --enable-kernel=2.6.32 --with-selinux --enable-multi-arch > --enable-lock-elision build_alias=x86_64-linux-gnu host_alias=x86_64-linux- > gnu CC=x86_64-linux-gnu-gcc-6 CPPFLAGS=-isystem > /tmp/debrepro.afKzxbwOYw/build/source/debian/include CXX=: --no-create > --no-recursion > > [... runs some tests ...] > > make[2]: Warning: File 'o-iterator.mk' has modification time 18411180 s in > the future > running CONFIG_SHELL=/bin/bash /bin/bash > /tmp/debrepro.afKzxbwOYw/build/source/configure --host=x86_64-linux-gnu > --build=x86_64-linux-gnu --prefix=/usr --enable-add-ons=libidn, > --without-selinux --enable-stackguard-randomization --enable-obsolete-rpc > --with-pkgversio > n=Debian GLIBC 2.24-5.1 --with-bugurl=http://www.debian.org/Bugs/ > --with-headers=/tmp/debrepro.afKzxbwOYw/build/source/debian/include > --enable-kernel=2.6.32 --with-selinux --enable-multi-arch > --enable-lock-elision build_alias=x86_64-linux-gnu host_alias=x86_64-linux- > gnu CC=x86_64-linux-gnu-gcc-6 CPPFLAGS=-isystem > /tmp/debrepro.afKzxbwOYw/build/source/debian/include CXX=: --no-create > --no-recursion > > [... runs the same tests again ...] > > [... etc ...] > > It would probably be theoretically possible to reduce this to a minimal test > case, but based on previous things I was told about make, I'm not sure if > it's worth the effort. You might also try increasing the timestamps of all > the source files in the second build by the same amount, but again I'm not > sure it's worth the effort. > BTW, I just found out that faketime also intercepts and fakes stat(2) calls by default. This is not documented in the manpage, only in README.gz. That might explain the errors above. You can set NO_FAKE_STAT=1 to leave out this behaviour. I think when we're systematically varying different things, we want to do this. I have done this for reprotest, in the git repo. I will also test this to see if it fixes the glibc build issue that I described, and report back with more details. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#845659: debpatch: New script, "Apply a debdiff to a Debian source package"
Ximin Luo: > Package: devscripts > Version: 2.16.10 > Severity: wishlist > Tags: patch > > Dear Maintainer, > > As part of the Reproducible Builds effort, I've written a tool called > debpatch(1), see the branch here: > > https://anonscm.debian.org/cgit/collab-maint/devscripts.git/commit/?h=pu/debpatch > > To quote the README entry I added: > > - debpatch: Apply unified diffs of two Debian source packages, such as those > generated by debdiff, to a target Debian source package. Any changes to > debian/changelog are dealt with specially, to avoid the conflicts that > changelog diffs typically produce when applied naively. May be used to check > that old patches still apply to newer versions of those packages. > [python3-unidiff, quilt] > > In the broader context, we have a lot of unapplied patches for R-B and we're > not > sure if they still work - whether they apply, or make the newer version of a > package reproducible once applied. This tool automates the process of applying > old patches to newer package versions, and I'm also writing R-B specific > scripts > that will use this tool to do continuous integration on our old patches, and > alert the right people if anything fails. > > [..] Hi devscripts team, Any news on this? I would also be happy to merge this myself (I have the access) but I thought it would be good to ask for a review first, since I haven't contributed to this repo before. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#855282: debsign: support .buildinfo files
Package: devscripts Version: 2.17.1 Severity: wishlist Dear Maintainer, dpkg since version 1.18.19 has been signing buildinfo files by default. debsign at the moment will ignore these and leave them unsigned. It would be good to support them. Ximin -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- Not present -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (300, 'unstable'), (200, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages devscripts depends on: ii dpkg-dev 1.18.22 ii libc62.24-9 ii perl 5.24.1-1 pn python3:any Versions of packages devscripts recommends: ii apt 1.4~rc1 ii at 3.1.20-3 ii curl7.52.1-2 ii dctrl-tools 2.24-2 ii debian-keyring 2017.01.20 ii dput0.12.0 ii equivs 2.0.9+nmu1 ii fakeroot1.21-3.1 ii file1:5.29-3 ii gnupg 2.1.18-3 ii gnupg2 2.1.18-3 ii libdistro-info-perl 0.14 ii libdpkg-perl1.18.22 ii libencode-locale-perl 1.05-1 ii libgit-wrapper-perl 0.047-1 ii liblist-compare-perl0.53-1 ii liblwp-protocol-https-perl 6.06-2 ii libsoap-lite-perl 1.20-1 ii liburi-perl 1.71-1 ii libwww-perl 6.15-1 ii licensecheck3.0.29-1 ii lintian 2.5.50.1 ii man-db 2.7.6.1-2 ii patch 2.7.5-1 ii patchutils 0.3.4-2 ii python3-debian 0.1.30 ii python3-magic 1:5.29-3 ii sensible-utils 0.0.9 ii strace 4.15-2 ii unzip 6.0-21 ii wdiff 1.2.2-2 ii wget1.18-4 ii xz-utils5.2.2-1.2 Versions of packages devscripts suggests: ii adequate 0.15.1 ii autopkgtest 4.3 pn bls-standalone ii bsd-mailx [mailx]8.1.2-0.20160123cvs-3 ii build-essential 12.3 pn check-all-the-things pn cvs-buildpackage pn devscripts-el ii diffoscope 67 ii disorderfs 0.5.1-1 pn dose-extra pn duck ii faketime 0.9.6-7 ii gnuplot 5.0.5+dfsg1-5 ii gpgv 2.1.18-3 pn how-can-i-help ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl0.22-1 pn libnet-smtps-perl pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl1.29-1+b2 pn mozilla-devscripts ii mutt 1.7.2-1 ii openssh-client [ssh-client] 1:7.4p1-6 ii piuparts 0.75 pn ratt ii reprotest0.6 pn svn-buildpackage pn w3m -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debsign-buildinfo created (now 4b49b79)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debsign-buildinfo in repository devscripts. at 4b49b79 Update documentation to describe new behaviour with buildinfo This branch includes the following new commits: new 0207d94 When signing .changes, also sign .buildinfo files that they refer to new 7595830 Refactor code and add support for signing .buildinfo files directly new 4b49b79 Update documentation to describe new behaviour with buildinfo The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 03/03: Update documentation to describe new behaviour with buildinfo
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 4b49b79d49a8b58fd3cea896a964dc121e14d1e1 Author: Ximin Luo Date: Thu Feb 16 18:18:12 2017 +0100 Update documentation to describe new behaviour with buildinfo --- scripts/debsign.1 | 64 ++ scripts/debsign.sh | 31 +- 2 files changed, 46 insertions(+), 49 deletions(-) diff --git a/scripts/debsign.1 b/scripts/debsign.1 index 58ae301..900a61c 100644 --- a/scripts/debsign.1 +++ b/scripts/debsign.1 @@ -5,17 +5,14 @@ debsign \- sign a Debian .changes and .dsc file pair using GPG \fBdebsign\fR [\fIoptions\fR] [\fIchanges-file\fR|\fIdsc-file\fR|\fIcommands-file\fR ...] .SH DESCRIPTION \fBdebsign\fR mimics the signing aspects (and bugs) of -\fBdpkg-buildpackage\fR(1). It takes either an unsigned \fI.dsc\fR -file or an unsigned \fI.changes\fR file (along with the associated -unsigned \fI.dsc\fR file found by replacing the architecture name and -\fI.changes\fR by \fI.dsc\fR if it appears in the \fI.changes\fR -file), and signs them using the GNU Privacy Guard. It is -careful to calculate the size and checksums of the newly signed -\fI.dsc\fR file and replace the original values in the \fI.changes\fR -file. +\fBdpkg-buildpackage\fR(1). It takes a \fI.dsc\fR, \fI.buildinfo\fR, or +\fI.changes\fR file and signs it, and any child \fI.dsc\fR, +\fI.buildinfo\fR, or \fI.changes\fR files directly or indirectly +referenced by it, using the GNU Privacy Guard. It is careful to +calculate the size and checksums of any newly signed child files and +replace the original values in the parent file. .PP -If a \fI.changes\fR, \fI.dsc\fR or \fI.commands\fR file is specified, -it is signed, otherwise, \fIdebian/changelog\fR is parsed to determine +If no file is specified, \fIdebian/changelog\fR is parsed to determine the name of the \fI.changes\fR file to look for in the parent directory. .PP @@ -25,25 +22,28 @@ and the name specified in the Uploader field is used for signing. .PP This utility is useful if a developer must build a package on one machine where it is unsafe to sign it; they need then only transfer -the small \fI.dsc\fR and \fI.changes\fR files to a safe machine and -then use the \fBdebsign\fR program to sign them before +the small \fI.dsc\fR, \fI.buildinfo\fR and \fI.changes\fR files to a +safe machine and then use the \fBdebsign\fR program to sign them before transferring them back. This process can be automated in two ways. -If the files to be signed live on the \fBremote\fR machine, the \fB\-r\fR -option may be used to copy them to the local machine and back again -after signing. If the files live on the \fBlocal\fR machine, then they may -be transferred to the remote machine for signing using -\fBdebrsign\fR(1). +If the files to be signed live on the \fBremote\fR machine, the +\fB\-r\fR option may be used to copy them to the local machine and back +again after signing. If the files live on the \fBlocal\fR machine, then +they may be transferred to the remote machine for signing using +\fBdebrsign\fR(1). However note that it is probably safer to have your +trusted signing machine use \fBdebsign\fR to connect to the untrusted +non-signing machine, rather than using \fBdebrsign\fR to make the +connection in the reverse direction. .PP This program can take default settings from the \fBdevscripts\fR configuration files, as described below. .SH OPTIONS .TP .B \-r \fR[\fIusername\fB@\fR]\fIremotehost\fR -The \fI.changes\fR and \fI.dsc\fR files live on the specified remote -host. In this case, a \fI.changes\fR file must be explicitly named, -with an absolute directory or one relative to the remote home +The files to be signed live on the specified remote host. In this case, +a \fI.dsc\fR, \fI.buildinfo\fR or \fI.changes\fR file must be explicitly +named, with an absolute directory or one relative to the remote home directory. \fBscp\fR will be used for the copying. The -\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIchanges\fR syntax is +\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIfilename\fR syntax is permitted as an alternative. Wildcards (\fB*\fR etc.) are allowed. .TP .B \-p\fIprogname\fR @@ -89,10 +89,9 @@ signed file is found the user is asked if he or she likes to use the current signature. .TP \fB\-\-debs\-dir\fR \fIDIR\fR -Look for the \fI.changes\fR and \fI.dsc\fR files in directory -\fIDIR\fR instead of the parent of the source directory. This should -either be an absolute path or relative to the top of the source -directory. +Look for the files to be signed in directory \fIDIR\fR instead of the +parent of the source directory. This should either be an absolute path +or relative to the top of the source directory. .TP \fB\-\-no-conf\fR, \fB\-\-noconf\fR Do not read any configuration files. This can only be used as the @@ -123,14
[devscripts] 02/03: Refactor code and add support for signing .buildinfo files directly
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 75958305e940d00cf7e3e2b0038e167b5d5468f0 Author: Ximin Luo Date: Thu Feb 16 17:24:35 2017 +0100 Refactor code and add support for signing .buildinfo files directly --- scripts/debsign.sh | 246 - 1 file changed, 149 insertions(+), 97 deletions(-) diff --git a/scripts/debsign.sh b/scripts/debsign.sh index 91dd9b7..c409b50 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -27,6 +27,8 @@ set -e PRECIOUS_FILES=0 PROGNAME=`basename $0` MODIFIED_CONF_MSG='Default settings modified by devscripts configuration files:' +HAVE_SIGNED="" +NUM_SIGNED=0 # Temporary directories signingdir="" @@ -160,11 +162,14 @@ mustsetvar () { # of dpkg-buildpackage, because we do not know all of the necessary # information when this function is read first. signfile () { +local type=$1 +local file=$2 +local signas=$3 local savestty=$(stty -g 2>/dev/null) || true mksigningdir -UNSIGNED_FILE="$signingdir/$(basename "$1")" +UNSIGNED_FILE="$signingdir/$(basename "$file")" ASCII_SIGNED_FILE="${UNSIGNED_FILE}.asc" -(cat "$1" ; echo "") > "$UNSIGNED_FILE" +(cat "$file" ; echo "") > "$UNSIGNED_FILE" gpgversion=`$signcommand --version | head -n 1 | cut -d' ' -f3` gpgmajorversion=`echo $gpgversion | cut -d. -f1` @@ -172,7 +177,7 @@ signfile () { if [ $gpgmajorversion -gt 1 -o $gpgminorversion -ge 4 ] then - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --list-options no-show-policy-urls \ --armor --textmode --output "$ASCII_SIGNED_FILE"\ "$UNSIGNED_FILE" || \ @@ -182,7 +187,7 @@ signfile () { exit $SAVESTAT } else - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --no-show-policy-url \ --armor --textmode --output "$ASCII_SIGNED_FILE" \ "$UNSIGNED_FILE" || \ @@ -195,7 +200,9 @@ signfile () { stty $savestty 2>/dev/null || true echo PRECIOUS_FILES=$(($PRECIOUS_FILES + 1)) -movefile "$ASCII_SIGNED_FILE" "$1" +HAVE_SIGNED="${HAVE_SIGNED:+${HAVE_SIGNED}, }$type" +NUM_SIGNED=$((NUM_SIGNED + 1)) +movefile "$ASCII_SIGNED_FILE" "$file" } withecho () { @@ -381,7 +388,10 @@ ensure_local_copy() { local type="$4" if [ -n "$remotehost" ] then - withecho scp "$remotehost:$remotefile" "$file" + if [ ! -f "$file" ] + then + withecho scp "$remotehost:$remotefile" "$file" + fi fi if [ ! -f "$file" -o ! -r "$file" ] @@ -487,6 +497,106 @@ guess_signas() { echo "${signkey:-$maintainer}" } +maybesign_dsc() { +local signas="$1" +local remotehost="$2" +local remotedsc="$3" +local dsc="$4" + +ensure_local_copy "$remotehost" "$remotedsc" "$dsc" dsc +if check_already_signed "$dsc" dsc; then + echo "Leaving current signature unchanged." >&2 + return +fi + +withecho signfile dsc "$dsc" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$dsc" "$remotehost:$remotedsc" + PRECIOUS_FILES=$(($PRECIOUS_FILES - 1)) +fi +} + +maybesign_buildinfo() { +local signas="$1" +local remotehost="$2" +local remotebuildinfo="$3" +local buildinfo="$4" +local remotedsc="$5" +local dsc="$6" + +ensure_local_copy "$remotehost" "$remotebuildinfo" "$buildinfo" buildinfo +if check_already_signed "$buildinfo" "buildinfo"; then + echo "Leaving current signature unchanged." >&2 + return +fi + +if grep -q `basename "$dsc"` "$buildinfo"; then + maybesign_dsc "$signas" "$remotehost" "$remotedsc" "$dsc" + withtempfile buildinfo "$buildinfo" fixup_buildinfo "$dsc" +fi + +withecho signfile buildinfo "$buildinfo" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$buildinfo" "$remotehost:$remot
[devscripts] 01/03: When signing .changes, also sign .buildinfo files that they refer to
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 0207d9493a24decfba5e533c2efa75e1e2e335db Author: Ximin Luo Date: Thu Feb 16 16:19:38 2017 +0100 When signing .changes, also sign .buildinfo files that they refer to --- scripts/debsign.bash_completion | 1 + scripts/debsign.sh | 312 2 files changed, 193 insertions(+), 120 deletions(-) diff --git a/scripts/debsign.bash_completion b/scripts/debsign.bash_completion index 05edd8a..7d396f9 100644 --- a/scripts/debsign.bash_completion +++ b/scripts/debsign.bash_completion @@ -20,6 +20,7 @@ _debsign() *) COMPREPLY=( $( compgen -G "${cur}*.changes" +compgen -G "${cur}*.buildinfo" compgen -G "${cur}*.dsc" compgen -G "${cur}*.commands" compgen -W "$options" | grep "^$cur" diff --git a/scripts/debsign.sh b/scripts/debsign.sh index 403bb4c..91dd9b7 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -114,6 +114,10 @@ temp_filename() { echo "$filename" } +to_bool() { +if "$@"; then echo true; else echo false; fi +} + movefile() { if [ -w "$(dirname "$2")" ]; then mv -f -- "$1" "$2" @@ -199,14 +203,24 @@ withecho () { "$@" } +file_is_already_signed() { +test "$(head -n 1 "$1")" = "-BEGIN PGP SIGNED MESSAGE-" +} + +unsignfile() { +UNSIGNED_FILE="$(temp_filename "$1" "unsigned")" + +sed -e '1,/^$/d; /^$/,$d' "$1" > "$UNSIGNED_FILE" +movefile "$UNSIGNED_FILE" "$1" +} + # Has the dsc file already been signed, perhaps from a previous, partially # successful invocation of debsign? We give the user the option of # resigning the file or accepting it as is. Returns success if already # and failure if the file needs signing. Parameters: $1=filename, # $2=file description for message (dsc or changes) check_already_signed () { -[ "`head -n 1 \"$1\"`" = "-BEGIN PGP SIGNED MESSAGE-" ] || \ - return 1 +file_is_already_signed "$1" || return 1 local resign if [ "$opt_re_sign" = "true" ]; then @@ -228,10 +242,7 @@ check_already_signed () { [ "$resign" = "true" ] || \ return 0 -UNSIGNED_FILE="$(temp_filename "$1" "unsigned")" - -sed -e '1,/^$/d; /^$/,$d' "$1" > "$UNSIGNED_FILE" -movefile "$UNSIGNED_FILE" "$1" +withecho unsignfile "$1" return 1 } @@ -363,6 +374,119 @@ if [ -z "$signcommand" ]; then exit 1 fi +ensure_local_copy() { +local remotehost="$1" +local remotefile="$2" +local file="$3" +local type="$4" +if [ -n "$remotehost" ] +then + withecho scp "$remotehost:$remotefile" "$file" +fi + +if [ ! -f "$file" -o ! -r "$file" ] +then + echo "$PROGNAME: Can't find or can't read $type file $file!" >&2 + exit 1 +fi +} + +fixup_control() { +local filter_out="$1" +local childtype="$2" +local parenttype="$3" +local child="$4" +local parent="$5" +test -r "$child" || { + echo "$PROGNAME: Can't read .$childtype file $child!" >&2 + return 1 +} + +local md5=$(md5sum "$child" | cut -d' ' -f1) +local sha1=$(sha1sum "$child" | cut -d' ' -f1) +local sha256=$(sha256sum "$child" | cut -d' ' -f1) +perl -i -pe 'BEGIN { +'" \$file=\"$child\"; \$md5=\"$md5\"; "' +'" \$sha1=\"$sha1\"; \$sha256=\"$sha256\"; "' +$size=(-s $file); ($base=$file) =~ s|.*/||; +$infiles=0; $insha1=0; $insha256=0; $format=""; +} +if(/^Format:\s+(.*)/) { + $format=$1; + die "Unrecognised .$parenttype format: $format\n" + unless $format =~ /^\d+(\.\d+)*$/; + ($major, $minor) = split(/\./, $format); + $major+=0;$minor+=0; + die "Unsupported .$parenttype format: $format\n" + if('"$filter_out"'); +} +/^Files:/i && ($infiles=1,$insha1=0,$insha256=0); +if(/^Checksums-Sha1:/i) {$insha1=1;$infiles=0;$insha256=0;} +elsif(/^Checksums-Sha256:/i) { + $insha256=1;$infiles=0;
Bug#855282: debsign: support .buildinfo files
Control: tags + patch Hi all, I've done an initial implementation here: https://anonscm.debian.org/cgit/collab-maint/devscripts.git/log/?h=pu/debsign-buildinfo Please review! I haven't yet updated debrsign but I think that program is a bit pointless anyway, and have documented this in debsign(1): "note that it is probably safer to have your trusted signing machine use \fBdebsign\fR to connect to the untrusted non-signing machine, rather than using \fBdebrsign\fR to make the connection in the reverse direction." X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/02: Refactor code and add support for signing .buildinfo files directly
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit acdf14aaf161c24736802f1314a477de95fb12cd Author: Ximin Luo Date: Thu Feb 16 17:24:35 2017 +0100 Refactor code and add support for signing .buildinfo files directly --- scripts/debsign.sh | 248 - 1 file changed, 150 insertions(+), 98 deletions(-) diff --git a/scripts/debsign.sh b/scripts/debsign.sh index 91dd9b7..be62c2e 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -27,6 +27,8 @@ set -e PRECIOUS_FILES=0 PROGNAME=`basename $0` MODIFIED_CONF_MSG='Default settings modified by devscripts configuration files:' +HAVE_SIGNED="" +NUM_SIGNED=0 # Temporary directories signingdir="" @@ -160,11 +162,14 @@ mustsetvar () { # of dpkg-buildpackage, because we do not know all of the necessary # information when this function is read first. signfile () { +local type=$1 +local file=$2 +local signas=$3 local savestty=$(stty -g 2>/dev/null) || true mksigningdir -UNSIGNED_FILE="$signingdir/$(basename "$1")" +UNSIGNED_FILE="$signingdir/$(basename "$file")" ASCII_SIGNED_FILE="${UNSIGNED_FILE}.asc" -(cat "$1" ; echo "") > "$UNSIGNED_FILE" +(cat "$file" ; echo "") > "$UNSIGNED_FILE" gpgversion=`$signcommand --version | head -n 1 | cut -d' ' -f3` gpgmajorversion=`echo $gpgversion | cut -d. -f1` @@ -172,7 +177,7 @@ signfile () { if [ $gpgmajorversion -gt 1 -o $gpgminorversion -ge 4 ] then - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --list-options no-show-policy-urls \ --armor --textmode --output "$ASCII_SIGNED_FILE"\ "$UNSIGNED_FILE" || \ @@ -182,7 +187,7 @@ signfile () { exit $SAVESTAT } else - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --no-show-policy-url \ --armor --textmode --output "$ASCII_SIGNED_FILE" \ "$UNSIGNED_FILE" || \ @@ -195,7 +200,9 @@ signfile () { stty $savestty 2>/dev/null || true echo PRECIOUS_FILES=$(($PRECIOUS_FILES + 1)) -movefile "$ASCII_SIGNED_FILE" "$1" +HAVE_SIGNED="${HAVE_SIGNED:+${HAVE_SIGNED}, }$type" +NUM_SIGNED=$((NUM_SIGNED + 1)) +movefile "$ASCII_SIGNED_FILE" "$file" } withecho () { @@ -381,7 +388,10 @@ ensure_local_copy() { local type="$4" if [ -n "$remotehost" ] then - withecho scp "$remotehost:$remotefile" "$file" + if [ ! -f "$file" ] + then + withecho scp "$remotehost:$remotefile" "$file" + fi fi if [ ! -f "$file" -o ! -r "$file" ] @@ -487,6 +497,106 @@ guess_signas() { echo "${signkey:-$maintainer}" } +maybesign_dsc() { +local signas="$1" +local remotehost="$2" +local remotedsc="$3" +local dsc="$4" + +ensure_local_copy "$remotehost" "$remotedsc" "$dsc" dsc +if check_already_signed "$dsc" dsc; then + echo "Leaving current signature unchanged." >&2 + return +fi + +withecho signfile dsc "$dsc" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$dsc" "$remotehost:$remotedsc" + PRECIOUS_FILES=$(($PRECIOUS_FILES - 1)) +fi +} + +maybesign_buildinfo() { +local signas="$1" +local remotehost="$2" +local remotebuildinfo="$3" +local buildinfo="$4" +local remotedsc="$5" +local dsc="$6" + +ensure_local_copy "$remotehost" "$remotebuildinfo" "$buildinfo" buildinfo +if check_already_signed "$buildinfo" "buildinfo"; then + echo "Leaving current signature unchanged." >&2 + return +fi + +if grep -q `basename "$dsc"` "$buildinfo"; then + maybesign_dsc "$signas" "$remotehost" "$remotedsc" "$dsc" + withtempfile buildinfo "$buildinfo" fixup_buildinfo "$dsc" +fi + +withecho signfile buildinfo "$buildinfo" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$buildinfo" "$remotehost:$remot
[devscripts] 02/02: Update documentation to describe new behaviour with buildinfo
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 35978b09c16c1986170f0e82f7fff9c81b409b7e Author: Ximin Luo Date: Thu Feb 16 18:18:12 2017 +0100 Update documentation to describe new behaviour with buildinfo --- scripts/debsign.1 | 64 ++ scripts/debsign.sh | 31 +- 2 files changed, 46 insertions(+), 49 deletions(-) diff --git a/scripts/debsign.1 b/scripts/debsign.1 index 58ae301..900a61c 100644 --- a/scripts/debsign.1 +++ b/scripts/debsign.1 @@ -5,17 +5,14 @@ debsign \- sign a Debian .changes and .dsc file pair using GPG \fBdebsign\fR [\fIoptions\fR] [\fIchanges-file\fR|\fIdsc-file\fR|\fIcommands-file\fR ...] .SH DESCRIPTION \fBdebsign\fR mimics the signing aspects (and bugs) of -\fBdpkg-buildpackage\fR(1). It takes either an unsigned \fI.dsc\fR -file or an unsigned \fI.changes\fR file (along with the associated -unsigned \fI.dsc\fR file found by replacing the architecture name and -\fI.changes\fR by \fI.dsc\fR if it appears in the \fI.changes\fR -file), and signs them using the GNU Privacy Guard. It is -careful to calculate the size and checksums of the newly signed -\fI.dsc\fR file and replace the original values in the \fI.changes\fR -file. +\fBdpkg-buildpackage\fR(1). It takes a \fI.dsc\fR, \fI.buildinfo\fR, or +\fI.changes\fR file and signs it, and any child \fI.dsc\fR, +\fI.buildinfo\fR, or \fI.changes\fR files directly or indirectly +referenced by it, using the GNU Privacy Guard. It is careful to +calculate the size and checksums of any newly signed child files and +replace the original values in the parent file. .PP -If a \fI.changes\fR, \fI.dsc\fR or \fI.commands\fR file is specified, -it is signed, otherwise, \fIdebian/changelog\fR is parsed to determine +If no file is specified, \fIdebian/changelog\fR is parsed to determine the name of the \fI.changes\fR file to look for in the parent directory. .PP @@ -25,25 +22,28 @@ and the name specified in the Uploader field is used for signing. .PP This utility is useful if a developer must build a package on one machine where it is unsafe to sign it; they need then only transfer -the small \fI.dsc\fR and \fI.changes\fR files to a safe machine and -then use the \fBdebsign\fR program to sign them before +the small \fI.dsc\fR, \fI.buildinfo\fR and \fI.changes\fR files to a +safe machine and then use the \fBdebsign\fR program to sign them before transferring them back. This process can be automated in two ways. -If the files to be signed live on the \fBremote\fR machine, the \fB\-r\fR -option may be used to copy them to the local machine and back again -after signing. If the files live on the \fBlocal\fR machine, then they may -be transferred to the remote machine for signing using -\fBdebrsign\fR(1). +If the files to be signed live on the \fBremote\fR machine, the +\fB\-r\fR option may be used to copy them to the local machine and back +again after signing. If the files live on the \fBlocal\fR machine, then +they may be transferred to the remote machine for signing using +\fBdebrsign\fR(1). However note that it is probably safer to have your +trusted signing machine use \fBdebsign\fR to connect to the untrusted +non-signing machine, rather than using \fBdebrsign\fR to make the +connection in the reverse direction. .PP This program can take default settings from the \fBdevscripts\fR configuration files, as described below. .SH OPTIONS .TP .B \-r \fR[\fIusername\fB@\fR]\fIremotehost\fR -The \fI.changes\fR and \fI.dsc\fR files live on the specified remote -host. In this case, a \fI.changes\fR file must be explicitly named, -with an absolute directory or one relative to the remote home +The files to be signed live on the specified remote host. In this case, +a \fI.dsc\fR, \fI.buildinfo\fR or \fI.changes\fR file must be explicitly +named, with an absolute directory or one relative to the remote home directory. \fBscp\fR will be used for the copying. The -\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIchanges\fR syntax is +\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIfilename\fR syntax is permitted as an alternative. Wildcards (\fB*\fR etc.) are allowed. .TP .B \-p\fIprogname\fR @@ -89,10 +89,9 @@ signed file is found the user is asked if he or she likes to use the current signature. .TP \fB\-\-debs\-dir\fR \fIDIR\fR -Look for the \fI.changes\fR and \fI.dsc\fR files in directory -\fIDIR\fR instead of the parent of the source directory. This should -either be an absolute path or relative to the top of the source -directory. +Look for the files to be signed in directory \fIDIR\fR instead of the +parent of the source directory. This should either be an absolute path +or relative to the top of the source directory. .TP \fB\-\-no-conf\fR, \fB\-\-noconf\fR Do not read any configuration files. This can only be used as the @@ -123,14
[devscripts] branch pu/debsign-buildinfo updated (4b49b79 -> 35978b0)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debsign-buildinfo in repository devscripts. discards 4b49b79 Update documentation to describe new behaviour with buildinfo discards 7595830 Refactor code and add support for signing .buildinfo files directly new acdf14a Refactor code and add support for signing .buildinfo files directly new 35978b0 Update documentation to describe new behaviour with buildinfo This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (4b49b79) \ N -- N -- N refs/heads/pu/debsign-buildinfo (35978b0) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debsign.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debsign-buildinfo updated (35978b0 -> 1a769e1)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debsign-buildinfo in repository devscripts. discards 35978b0 Update documentation to describe new behaviour with buildinfo discards acdf14a Refactor code and add support for signing .buildinfo files directly new 0b4258b Refactor code and add support for signing .buildinfo files directly new 1a769e1 Update documentation to describe new behaviour with buildinfo This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (35978b0) \ N -- N -- N refs/heads/pu/debsign-buildinfo (1a769e1) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debsign.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 02/02: Update documentation to describe new behaviour with buildinfo
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 1a769e16b75b6ced7a74f03a6a79af9b2cb706b0 Author: Ximin Luo Date: Thu Feb 16 18:18:12 2017 +0100 Update documentation to describe new behaviour with buildinfo --- scripts/debsign.1 | 64 ++ scripts/debsign.sh | 31 +- 2 files changed, 46 insertions(+), 49 deletions(-) diff --git a/scripts/debsign.1 b/scripts/debsign.1 index 58ae301..900a61c 100644 --- a/scripts/debsign.1 +++ b/scripts/debsign.1 @@ -5,17 +5,14 @@ debsign \- sign a Debian .changes and .dsc file pair using GPG \fBdebsign\fR [\fIoptions\fR] [\fIchanges-file\fR|\fIdsc-file\fR|\fIcommands-file\fR ...] .SH DESCRIPTION \fBdebsign\fR mimics the signing aspects (and bugs) of -\fBdpkg-buildpackage\fR(1). It takes either an unsigned \fI.dsc\fR -file or an unsigned \fI.changes\fR file (along with the associated -unsigned \fI.dsc\fR file found by replacing the architecture name and -\fI.changes\fR by \fI.dsc\fR if it appears in the \fI.changes\fR -file), and signs them using the GNU Privacy Guard. It is -careful to calculate the size and checksums of the newly signed -\fI.dsc\fR file and replace the original values in the \fI.changes\fR -file. +\fBdpkg-buildpackage\fR(1). It takes a \fI.dsc\fR, \fI.buildinfo\fR, or +\fI.changes\fR file and signs it, and any child \fI.dsc\fR, +\fI.buildinfo\fR, or \fI.changes\fR files directly or indirectly +referenced by it, using the GNU Privacy Guard. It is careful to +calculate the size and checksums of any newly signed child files and +replace the original values in the parent file. .PP -If a \fI.changes\fR, \fI.dsc\fR or \fI.commands\fR file is specified, -it is signed, otherwise, \fIdebian/changelog\fR is parsed to determine +If no file is specified, \fIdebian/changelog\fR is parsed to determine the name of the \fI.changes\fR file to look for in the parent directory. .PP @@ -25,25 +22,28 @@ and the name specified in the Uploader field is used for signing. .PP This utility is useful if a developer must build a package on one machine where it is unsafe to sign it; they need then only transfer -the small \fI.dsc\fR and \fI.changes\fR files to a safe machine and -then use the \fBdebsign\fR program to sign them before +the small \fI.dsc\fR, \fI.buildinfo\fR and \fI.changes\fR files to a +safe machine and then use the \fBdebsign\fR program to sign them before transferring them back. This process can be automated in two ways. -If the files to be signed live on the \fBremote\fR machine, the \fB\-r\fR -option may be used to copy them to the local machine and back again -after signing. If the files live on the \fBlocal\fR machine, then they may -be transferred to the remote machine for signing using -\fBdebrsign\fR(1). +If the files to be signed live on the \fBremote\fR machine, the +\fB\-r\fR option may be used to copy them to the local machine and back +again after signing. If the files live on the \fBlocal\fR machine, then +they may be transferred to the remote machine for signing using +\fBdebrsign\fR(1). However note that it is probably safer to have your +trusted signing machine use \fBdebsign\fR to connect to the untrusted +non-signing machine, rather than using \fBdebrsign\fR to make the +connection in the reverse direction. .PP This program can take default settings from the \fBdevscripts\fR configuration files, as described below. .SH OPTIONS .TP .B \-r \fR[\fIusername\fB@\fR]\fIremotehost\fR -The \fI.changes\fR and \fI.dsc\fR files live on the specified remote -host. In this case, a \fI.changes\fR file must be explicitly named, -with an absolute directory or one relative to the remote home +The files to be signed live on the specified remote host. In this case, +a \fI.dsc\fR, \fI.buildinfo\fR or \fI.changes\fR file must be explicitly +named, with an absolute directory or one relative to the remote home directory. \fBscp\fR will be used for the copying. The -\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIchanges\fR syntax is +\fR[\fIusername\fB@\fR]\fIremotehost\fB:\fIfilename\fR syntax is permitted as an alternative. Wildcards (\fB*\fR etc.) are allowed. .TP .B \-p\fIprogname\fR @@ -89,10 +89,9 @@ signed file is found the user is asked if he or she likes to use the current signature. .TP \fB\-\-debs\-dir\fR \fIDIR\fR -Look for the \fI.changes\fR and \fI.dsc\fR files in directory -\fIDIR\fR instead of the parent of the source directory. This should -either be an absolute path or relative to the top of the source -directory. +Look for the files to be signed in directory \fIDIR\fR instead of the +parent of the source directory. This should either be an absolute path +or relative to the top of the source directory. .TP \fB\-\-no-conf\fR, \fB\-\-noconf\fR Do not read any configuration files. This can only be used as the @@ -123,14
[devscripts] 01/02: Refactor code and add support for signing .buildinfo files directly
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 0b4258b893617d69d0a840da4bf2341299d5afb4 Author: Ximin Luo Date: Thu Feb 16 17:24:35 2017 +0100 Refactor code and add support for signing .buildinfo files directly --- scripts/debsign.sh | 248 - 1 file changed, 150 insertions(+), 98 deletions(-) diff --git a/scripts/debsign.sh b/scripts/debsign.sh index 91dd9b7..633ae52 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -27,6 +27,8 @@ set -e PRECIOUS_FILES=0 PROGNAME=`basename $0` MODIFIED_CONF_MSG='Default settings modified by devscripts configuration files:' +HAVE_SIGNED="" +NUM_SIGNED=0 # Temporary directories signingdir="" @@ -160,11 +162,14 @@ mustsetvar () { # of dpkg-buildpackage, because we do not know all of the necessary # information when this function is read first. signfile () { +local type="$1" +local file="$2" +local signas="$3" local savestty=$(stty -g 2>/dev/null) || true mksigningdir -UNSIGNED_FILE="$signingdir/$(basename "$1")" +UNSIGNED_FILE="$signingdir/$(basename "$file")" ASCII_SIGNED_FILE="${UNSIGNED_FILE}.asc" -(cat "$1" ; echo "") > "$UNSIGNED_FILE" +(cat "$file" ; echo "") > "$UNSIGNED_FILE" gpgversion=`$signcommand --version | head -n 1 | cut -d' ' -f3` gpgmajorversion=`echo $gpgversion | cut -d. -f1` @@ -172,7 +177,7 @@ signfile () { if [ $gpgmajorversion -gt 1 -o $gpgminorversion -ge 4 ] then - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --list-options no-show-policy-urls \ --armor --textmode --output "$ASCII_SIGNED_FILE"\ "$UNSIGNED_FILE" || \ @@ -182,7 +187,7 @@ signfile () { exit $SAVESTAT } else - $signcommand --local-user "$2" --clearsign \ + $signcommand --local-user "$signas" --clearsign \ --no-show-policy-url \ --armor --textmode --output "$ASCII_SIGNED_FILE" \ "$UNSIGNED_FILE" || \ @@ -195,7 +200,9 @@ signfile () { stty $savestty 2>/dev/null || true echo PRECIOUS_FILES=$(($PRECIOUS_FILES + 1)) -movefile "$ASCII_SIGNED_FILE" "$1" +HAVE_SIGNED="${HAVE_SIGNED:+${HAVE_SIGNED}, }$type" +NUM_SIGNED=$((NUM_SIGNED + 1)) +movefile "$ASCII_SIGNED_FILE" "$file" } withecho () { @@ -381,7 +388,10 @@ ensure_local_copy() { local type="$4" if [ -n "$remotehost" ] then - withecho scp "$remotehost:$remotefile" "$file" + if [ ! -f "$file" ] + then + withecho scp "$remotehost:$remotefile" "$file" + fi fi if [ ! -f "$file" -o ! -r "$file" ] @@ -487,6 +497,106 @@ guess_signas() { echo "${signkey:-$maintainer}" } +maybesign_dsc() { +local signas="$1" +local remotehost="$2" +local remotedsc="$3" +local dsc="$4" + +ensure_local_copy "$remotehost" "$remotedsc" "$dsc" dsc +if check_already_signed "$dsc" dsc; then + echo "Leaving current signature unchanged." >&2 + return +fi + +withecho signfile dsc "$dsc" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$dsc" "$remotehost:$remotedsc" + PRECIOUS_FILES=$(($PRECIOUS_FILES - 1)) +fi +} + +maybesign_buildinfo() { +local signas="$1" +local remotehost="$2" +local remotebuildinfo="$3" +local buildinfo="$4" +local remotedsc="$5" +local dsc="$6" + +ensure_local_copy "$remotehost" "$remotebuildinfo" "$buildinfo" buildinfo +if check_already_signed "$buildinfo" "buildinfo"; then + echo "Leaving current signature unchanged." >&2 + return +fi + +if grep -q `basename "$dsc"` "$buildinfo"; then + maybesign_dsc "$signas" "$remotehost" "$remotedsc" "$dsc" + withtempfile buildinfo "$buildinfo" fixup_buildinfo "$dsc" +fi + +withecho signfile buildinfo "$buildinfo" "$signas" + +if [ -n "$remotehost" ] +then + withecho scp "$buildinfo&
[devscripts] branch pu/debsign-buildinfo updated (1a769e1 -> 6c582f8)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debsign-buildinfo in repository devscripts. from 1a769e1 Update documentation to describe new behaviour with buildinfo new 6c582f8 Improve .buildinfo support The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debsign.sh | 19 +-- scripts/dscverify.pl | 7 --- 2 files changed, 17 insertions(+), 9 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: Improve .buildinfo support
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debsign-buildinfo in repository devscripts. commit 6c582f8ae1bcec1e34877f78e00d099628a816c1 Author: Guillem Jover Date: Fri Feb 17 06:04:27 2017 +0100 Improve .buildinfo support --- scripts/debsign.sh | 19 +-- scripts/dscverify.pl | 7 --- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/scripts/debsign.sh b/scripts/debsign.sh index ede3aa7..4b2b22c 100755 --- a/scripts/debsign.sh +++ b/scripts/debsign.sh @@ -418,7 +418,7 @@ fixup_control() { '" \$file=\"$child\"; \$md5=\"$md5\"; "' '" \$sha1=\"$sha1\"; \$sha256=\"$sha256\"; "' $size=(-s $file); ($base=$file) =~ s|.*/||; -$infiles=0; $insha1=0; $insha256=0; $format=""; +$infiles=0; $inmd5=0; $insha1=0; $insha256=0; $format=""; } if(/^Format:\s+(.*)/) { $format=$1; @@ -429,19 +429,26 @@ fixup_control() { die "Unsupported .$parenttype format: $format\n" if('"$filter_out"'); } -/^Files:/i && ($infiles=1,$insha1=0,$insha256=0); -if(/^Checksums-Sha1:/i) {$insha1=1;$infiles=0;$insha256=0;} +/^Files:/i && ($infiles=1,$inmd5=0,$insha1=0,$insha256=0); +if(/^Checksums-Sha1:/i) {$insha1=1;$infiles=0;$inmd5=0;$insha256=0;} elsif(/^Checksums-Sha256:/i) { - $insha256=1;$infiles=0;$insha1=0; + $insha256=1;$infiles=0;$inmd5=0;$insha1=0; +} elsif(/^Checksums-Md5:/i) { + $inmd5=1;$infiles=0;$insha1=0;$insha256=0; } elsif(/^Checksums-.*?:/i) { die "Unknown checksum format: $_\n"; } -/^\s*$/ && ($infiles=0,$insha1=0,$insha256=0); +/^\s*$/ && ($infiles=0,$inmd5=0,$insha1=0,$insha256=0); if ($infiles && /^ (\S+) (\d+) (\S+) (\S+) \Q$base\E\s*$/) { $_ = " $md5 $size $3 $4 $base\n"; $infiles=0; } +if ($inmd5 && + /^ (\S+) (\d+) \Q$base\E\s*$/) { +$_ = " $md5 $size $base\n"; +$inmd5=0; +} if ($insha1 && /^ (\S+) (\d+) \Q$base\E\s*$/) { $_ = " $sha1 $size $base\n"; @@ -455,7 +462,7 @@ fixup_control() { } fixup_buildinfo() { -fixup_control '$major < 1 and $minor < 2' dsc buildinfo "$@" +fixup_control '$major != 0 or $minor > 2' dsc buildinfo "$@" } fixup_changes() { diff --git a/scripts/dscverify.pl b/scripts/dscverify.pl index 8bc0857..381ebff 100755 --- a/scripts/dscverify.pl +++ b/scripts/dscverify.pl @@ -198,7 +198,7 @@ sub process_file { } } -if ($file =~ /\.changes$/ and $out =~ /^Format:\s*(.*)$/mi) { +if ($file =~ /\.(changes|buildinfo)$/ and $out =~ /^Format:\s*(.*)$/mi) { my $format = $1; unless ($format =~ /^(\d+)\.(\d+)$/) { xwarn "$file has an unrecognised format: $format\n"; @@ -207,7 +207,8 @@ sub process_file { my ($major, $minor) = split /\./, $format; $major += 0; $minor += 0; - unless ($major == 1 and $minor <= 8) { + if ($file =~ /\.changes$/ and ($major != 1 or $minor > 8) or + $file =~ /\.buildinfo$/ and ($major != 0 or $minor > 2)) { xwarn "$file is an unsupported format: $format\n"; return; } @@ -220,7 +221,7 @@ sub process_file { } my @checksums = map { split /\n/ } $out =~ /^Checksums-(\S+):\s*\n/mgi; -@checksums = grep {!/^Sha(1|256)$/i} @checksums; +@checksums = grep {!/^(Md5|Sha(1|256))$/i} @checksums; if (@checksums) { xwarn "$file contains unsupported checksums:\n" . join (", ", @checksums) . "\n"; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#855282: debsign: support .buildinfo files
James McCoy: > On Mon, Mar 06, 2017 at 11:45:20PM -0500, James McCoy wrote: >> On Thu, Feb 16, 2017 at 05:23:00PM +0000, Ximin Luo wrote: >>> I've done an initial implementation here: >>> >>> https://anonscm.debian.org/cgit/collab-maint/devscripts.git/log/?h=pu/debsign-buildinfo >>> >>> Please review! >> >> This was merged and uploaded in 2.17.2. However, now I see that >> buildinfo files may be arch-qualified even with a _source.changes (e.g., >> by using "sbuild -A --source-only-changes"). That's not currently >> handled properly since "debsign foo_ver_source.changes" expects >> "foo_ver_source.buildinfo" to exist. >> >> Should debsign be deriving the path for the buildinfo from the contents >> of the changes file? > > I've changed all of the "child file" handling to use this approach in > 4a4238dbf1e789e998cf047ea0f006e982fba56b. That seems cleaner than > debsign replicating logic to determine the names of related files. > > [..] Looks good, yes that is better. Also thanks for fixing the auto-detection of the signer, that was my fault. In 0207d9493a24decfba5e533c2efa75e1e2e335db I deduplicated two pieces of code that looked the same but was actually different, and should have picked the other one to use. :/ X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 02/02: debpatch: rewrite to use debian.changelog python module
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit 290b7ffbe10e50a35b3e369dd4db7a101ae8e9cd Author: Ximin Luo Date: Tue Apr 18 20:49:21 2017 +0200 debpatch: rewrite to use debian.changelog python module This allows us to avoid dpkg-parsechangelog and mostly dch. Also tidy up some other things based on reviewer feedback. --- debian/copyright | 20 +--- scripts/debpatch | 139 - scripts/debpatch.1 | 4 ++ 3 files changed, 59 insertions(+), 104 deletions(-) diff --git a/debian/copyright b/debian/copyright index 438c48e..f3f40dc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -21,8 +21,8 @@ the GPL, version 2 or later. - annotate-output, debdiff and nmudiff are released under version 2 (only) of the GPL. -- debsnap, diff2patches and git-deborig are released under version 3 - or later of the GPL +- debpatch, debsnap, diff2patches and git-deborig are released under + version 3 or later of the GPL - deb-reversion is under the Artistic License version 2.0. @@ -82,22 +82,6 @@ License: GPL-3+ On Debian systems, the complete text of the GNU General Public License version 3 can be found in the /usr/share/common-licenses/GPL-3 file. -Files: scripts/debpatch* -Copyright: 2016 Ximin Luo -License: GPL-3+ - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - On Debian systems, the complete text of the GNU General Public License - version 3 can be found in the /usr/share/common-licenses/GPL-3 file. - Files: doc/suspicious-source.1 doc/wrap-and-sort.1 scripts/devscripts/* diff --git a/scripts/debpatch b/scripts/debpatch index fd861e3..578392a 100755 --- a/scripts/debpatch +++ b/scripts/debpatch @@ -20,6 +20,7 @@ Depends on dpkg-dev, devscripts, python3-unidiff, quilt. """ import argparse +import email.utils import hashlib import io import logging @@ -30,6 +31,9 @@ import shutil import subprocess import sys import tempfile +import time + +from debian.changelog import Changelog, ChangeBlock dirname = os.path.dirname basename = os.path.basename @@ -40,22 +44,6 @@ DCH_DUMMY_TAIL = "\n -- debpatch dummy tool Thu, 01 Jan TRY_ENCODINGS = ["utf-8", "latin-1"] DISTRIBUTION_DEFAULT = "experimental" -def parse_dch(dch_str, *args): -return subprocess.run( -["dpkg-parsechangelog", "-l-", "-c1"] + list(args), -input=dch_str, -check=True, -universal_newlines=True, -stdout=subprocess.PIPE, -).stdout.rstrip() - -def read_dch(dch_str): -dch = {} -for i in ("Version", "Distribution", "Urgency", "Maintainer"): -dch[i] = parse_dch(dch_str, "-S"+i) -dch["Changes"] = "".join(parse_dch(dch_str, "-SChanges").splitlines(True)[3:]) -return dch - def is_dch(path): return (basename(path) == 'changelog' and basename(dirname(path)) == 'debian' @@ -72,68 +60,42 @@ def read_dch_patch(dch_patch): target_str = hunk_lines_to_str(hunk.target_lines()) # here we assume the debdiff has enough context to see the previous version # this should be true all the time in practice -source_version = parse_dch(source_str, "-SVersion") -target = read_dch(target_str) +source_version = str(Changelog(source_str, 1)[0].version) +target = Changelog(target_str, 1)[0] return source_version, target def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_run): -# Do not change this text, unless you also add logic to detect markers from -# previously-released versions. -marker = "Patch %s applied by debpatch(1)." % patch_name -if marker in current["Changes"]: -logging.info("patch %s already applied to d/changelog", patch_name) -return target["Version"] - +target_version = str(target.version) dch_args = [] dch_env = dict(os.environ) -if target["Distribution"] == "UNRELEASED": -# UNRELEASED causes hard-to-reason-about behaviours in dch, let's avoid that -newdist = current["Distribution"] if current["Distribution"] != "UNRELEASED" else DISTRIBUTION_DEFAULT -logging.info("using
[devscripts] branch pu/debpatch updated (a8237eb -> 290b7ff)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. from a8237eb debpatch: New script, "Apply a debdiff to a Debian source package" adds 3e71ba3 debuild: Handle difference in where dpkg-bp/debuild run hooks adds 1c4eb32 Remove unneeded reference copy of dpkg-buildpackage adds 502c773 Fix flake8 issues adds fd4bab1 releasing package devscripts version 2.16.10 adds f60c5c6 debuild: Don't set a hook to just "cd ..; " adds f678a72 debclean: do not descend into subdirs if cwd is already a package adds b21c026 debclean: adapt manpage to reflect reality adds e04fbcd fix typo adds 7eb6e3e fix inconsistent indentation adds aebc45d debclean: fix the test for debian/changelog adds 452366d debuild: Clear @ARGV when running lintian adds be8e87d debrepro: add -s/--skip option to skip any of the supported variations adds 6c7a06a debrepro: set indentation to 4 spaces, no tabs adds d2d6ae9 releasing package devscripts version 2.16.11 adds f3f8e32 mergechanges: Add handling for buildinfo files adds 602d25c debuild: Run lintian (and hook) directly adds 1c5d5f8 Fix format of closes annotations in changelog adds b79305c debrepro: tell taketime to leave stat() alone adds 2343096 releasing package devscripts version 2.16.12 adds 7ac2a9d uscan: Add .sign to the default OpenPGP extensions list adds 2c07bad debuild: Pass -tc through to dpkg-buildpackage adds 45b96c6 releasing package devscripts version 2.16.13 adds 363043b new script: git-deborig adds bce34b8 have git-deborig use Dpkg::Changelog::Parse adds 6547791 grep-excuses: Ignore new --- header line in autoremovals.yaml.cgi adds d74a573 git-deborig: Avoid using the shell when running git-archive adds 23e7000 git-deborig: Fix git config key in spawn adds 02cee8b git-deborig: Replace --format in spawn adds 8d60127 git-deborig: Refactor to permit archiving branches adds 260003a git-deborig(1): See also git-archive(1) adds 6122126 git-deborig: Remove to_file option when calling spawn() adds d2607be git-deborig: Bump copyright years adds 856719a Use command to find gpg binary rather than check path adds cc24c1e wrap-and-sort: Support debian/clean files adds 215fcdd Remove dcut.bash_completion so src:dput can provide it adds 67a38da dget: Verify/propagate errors when processing a dsc adds a3f6845 releasing package devscripts version 2.17.0 adds 2d7171e Fix Bug#851590: uscan: PyPI packages location change adds a39de33 dscverify: Add support for .buildinfo files adds a1b6bfd Update changelog with the previous changes adds 9f61c6c dscverify: Remove reference to the long gone debian-maintainers package. adds 70675c6 test_package_lifecycle: Import patch from Ubuntu to have the test pass on their builders too adds 1bfeb14 debian/tests/control: Depend on build-essential. adds 91b83eb d/changelog: fix version, `dch -i` fail adds afff746 debian/tests/control: Spell build-essential correctly adds 00a3307 test_package_lifecycle: Ignore debhelper's create-stamp logs adds 5990baf releasing package devscripts version 2.17.1 adds c5012cb deb-reversion: Fix new-version spec in LONGOPTS adds ae554f5 rc-alert: add bug URL to the output adds c9e4a8e wrap-and-sort: Add missing build dependency fields adds 08f44cb d/control: use /git/ instead of /cgit/ in Vcs-Browser adds e1a18a8 grep-excuses: Convert all embedded elements to new lines adds 0207d94 When signing .changes, also sign .buildinfo files that they refer to adds 0b4258b Refactor code and add support for signing .buildinfo files directly adds 1a769e1 Update documentation to describe new behaviour with buildinfo adds 6c582f8 Improve .buildinfo support adds 226ab8f Merge remote-tracking branch 'origin/pu/debsign-buildinfo' adds 1a3304a test_package_lifecycle: Add handling for buildinfo signing adds 62d9a8b Add mozilla-devscripts to tests' Depends adds 9ec90db Remove Ryan Niebur from Uploaders after a requests from the MIA Team adds 51b5e50 Add support for finalized .buildinfo format 1.0 adds 6c5983b Small grammar tweak for MIA changelog adds ac14d8e releasing package devscripts version 2.17.2 adds 763ab8e debsign: Prefer Changed-By when detecting signer adds 4a4238d debsign: Determine related filenames from .changes/.buildinfo adds 448a301 debsign: Fix typo, derive_childinfo → derive_childfile adds 7998098 debsign: Refactor remote file handl
[devscripts] 01/02: Merge branch 'master' into pu/debpatch
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit f2985ac424cd0dfe029b9a46d574e551ca224df1 Merge: a8237eb 3ff2f9d Author: Ximin Luo Date: Tue Apr 18 20:48:58 2017 +0200 Merge branch 'master' into pu/debpatch .gitignore | 2 + Makefile.common| 3 +- README | 3 + debian/NEWS| 2 +- debian/changelog | 193 +- debian/control | 12 +- debian/copyright | 3 +- debian/tests/control | 2 +- po4a/devscripts-po4a.conf | 2 + scripts/bts.pl | 2 + scripts/chdist.bash_completion | 6 +- scripts/chdist.pl | 12 +- scripts/dcut.bash_completion | 57 scripts/deb-reversion.sh | 2 +- scripts/debcheckout.pl | 5 +- scripts/debclean.1 | 5 +- scripts/debclean.sh| 9 +- scripts/debcommit.pl | 3 +- scripts/debdiff.pl | 2 +- scripts/debrepro.pod | 19 +- scripts/debrepro.sh| 211 +-- scripts/debsign.1 | 64 +++-- scripts/debsign.bash_completion| 1 + scripts/debsign.sh | 530 - scripts/debuild.1 | 20 ++ scripts/debuild.pl | 88 +- scripts/dget.pl| 7 +- scripts/dpkg-buildpackage-snapshot | 267 --- scripts/dscverify.1| 15 +- scripts/dscverify.pl | 22 +- scripts/git-deborig.pl | 186 + scripts/grep-excuses.pl| 9 +- scripts/mergechanges.sh| 6 +- scripts/namecheck.pl | 8 +- scripts/rc-alert.pl| 3 + scripts/sadt | 1 + scripts/suspicious-source | 1 + scripts/svnpath.pl | 7 +- scripts/uscan.pl | 34 ++- scripts/who-permits-upload.pl | 2 +- scripts/who-uploads.sh | 8 +- scripts/wnpp-alert.sh | 2 +- scripts/wrap-and-sort | 6 + test/test_package_lifecycle| 79 -- test/test_uscan_mangle | 29 +- 45 files changed, 1201 insertions(+), 749 deletions(-) diff --cc debian/changelog index 2fa6913,4015df8..c09fdce --- a/debian/changelog +++ b/debian/changelog @@@ -1,4 -1,182 +1,186 @@@ - devscripts (2.16.10) UNRELEASED; urgency=medium + devscripts (2.17.6) UNRELEASED; urgency=medium + + [ Osamu Aoki ] + * uscan: + + Update manpage on the github.com behavior and the alternative + shorthand form. (Closes: #836507, #859089) + + [ Adam D. Barratt ] + * uscan: fix a typo in the manpage + * debdiff: fix a typo + + [ Paul Wise ] + * chdist: + + add support for running aptitude + * debcheckout: + + handle cgit URLs too. Thanks to Rhonda for the suggestion. + * Make various scripts work when HOME is unset: + bts chdist debcommit dscverify grep-excuses + namecheck rc-alert svnpath wnpp-alert + ++ [ Ximin Luo ] ++ * debpatch: +++ New script, Apply a debdiff to a Debian source package. (Closes: #845659) ++ + -- Osamu Aoki Fri, 31 Mar 2017 02:03:30 +0900 + + devscripts (2.17.5) unstable; urgency=medium + + * Create GNUPGHOME in /tmp to fix CI failures due to long path names. + + -- James McCoy Sat, 18 Mar 2017 21:18:46 -0400 + + devscripts (2.17.4) unstable; urgency=medium + + * debsign: + + Don't try to sign a buildinfo file when one isn't listed in the + changes/dsc. (Closes: #857964) + + -- James McCoy Thu, 16 Mar 2017 22:41:27 -0400 + + devscripts (2.17.3) unstable; urgency=medium + + * debsign: + + Fix auto-detection of the signer. Regression introduced in 2.17.2. + (Closes: #857537) + + Determine the names of related files from the file listings in + .changes/.buildinfo. (Closes: #857536) + + In remote mode, ensure files are copied locally before trying to use + them. Regression introduced in 2.17.2. (Closes: #857716) + + -- James McCoy Wed, 15 Mar 2017 23:28:00 -0400 + + devscripts (2.17.2) unstable; urgency=medium + + [ James McCoy ] + * deb-reversion: + + Correct parsing of long-form --new-version switch. (Closes: #853919) + * grep-excuses: + + Improve robustness of HTML parsing to avoid issues like #856104, until + grep-excuses is converted to consume YAML. + * debsign: + + Add support for *.buildinfo files. Thanks to Ximin Luo and Guillem + Jover for the patches! (Closes: #855282) + * debian/tests/control: Add mozilla-devscripts to Depends, as needed by + mk-origtargz's tests. + + [ Antonio Terceiro ] + * rc-alert: +
[devscripts] branch pu/debpatch updated (290b7ff -> 3a4d217)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. from 290b7ff debpatch: rewrite to use debian.changelog python module new 3a4d217 debpatch: raise an error when a patch tries to edit the same entry The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debpatch | 3 +++ 1 file changed, 3 insertions(+) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debpatch: raise an error when a patch tries to edit the same entry
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit 3a4d217e82c07572f30751b90678d4933a1ad898 Author: Ximin Luo Date: Tue Apr 18 21:00:05 2017 +0200 debpatch: raise an error when a patch tries to edit the same entry --- scripts/debpatch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/debpatch b/scripts/debpatch index 578392a..0686db9 100755 --- a/scripts/debpatch +++ b/scripts/debpatch @@ -62,6 +62,9 @@ def read_dch_patch(dch_patch): # this should be true all the time in practice source_version = str(Changelog(source_str, 1)[0].version) target = Changelog(target_str, 1)[0] +if source_version == str(target.version): +# TODO: it could be possible to deal with this, but is a bit complex +raise ValueError("don't (yet) know how to deal with d/changelog patch that edits the same version") return source_version, target def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_run): -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#845659: debpatch: New script, "Apply a debdiff to a Debian source package"
James McCoy: > On Thu, Jan 05, 2017 at 04:18:00PM +0000, Ximin Luo wrote: >> Ximin Luo: >>> As part of the Reproducible Builds effort, I've written a tool called >>> debpatch(1), see the branch here: >>> [..] >> >> Hi devscripts team, >> >> Any news on this? > > Apologies for not giving this a review sooner. > >> I would also be happy to merge this myself (I have >> the access) but I thought it would be good to ask for a review first, >> since I haven't contributed to this repo before. > > I agree with Sean that it would be good to not to have another > reimplementation of changelog merging. However, if dpkg-mergechangelogs > doesn't provide the functionality you need, I would recommend looking at > python3-debian's debian.changelog module. I think that would probably > be easier than trying to twist dch into doing the work. > Sorry for the delay, I have now made these changes. dpkg-mergechangelogs seemed interesting but actually does a different job - it merges different entries by total ordering on Debian version numbers, and it does a normal 3-way merge when changes to the same entry are detected. This type of merging seems more suited to packages that have already been released. For example, it was unable to merge my pu/debpatch branch with the current master, and I had to resolve that manually. OTOH debpatch is for rebasing unreleased changes on top of new released packages. So what we want here is to plonk any added extra changelog entry, on top of the new base, and adjust the version number accordingly. I have switched to using debian.changelog though, thanks for the tip. I also got rid of some dirty "this is already applied" logic and removed some arbitrary limits. https://anonscm.debian.org/cgit/collab-maint/devscripts.git/log/?h=pu/debpatch Pushed there ^ but also would be happy to squash these commits if you prefer. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debpatch updated (3a4d217 -> 4b70e20)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. from 3a4d217 debpatch: raise an error when a patch tries to edit the same entry new 4b70e20 debpatch: fix --source-version when d/changelog is present The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debpatch | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debpatch: fix --source-version when d/changelog is present
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit 4b70e202d9b32022133e484fe497892a1415cab6 Author: Ximin Luo Date: Wed Apr 19 22:20:23 2017 +0200 debpatch: fix --source-version when d/changelog is present --- scripts/debpatch | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/debpatch b/scripts/debpatch index 0686db9..f3e006e 100755 --- a/scripts/debpatch +++ b/scripts/debpatch @@ -41,6 +41,7 @@ C = subprocess.check_call # this can be any valid value, it doesn't appear in the final output DCH_DUMMY_TAIL = "\n -- debpatch dummy tool Thu, 01 Jan 1970 00:00:00 +\n\n" +CHBLOCK_DUMMY_PACKAGE = "debpatch PLACEHOLDER" TRY_ENCODINGS = ["utf-8", "latin-1"] DISTRIBUTION_DEFAULT = "experimental" @@ -62,9 +63,6 @@ def read_dch_patch(dch_patch): # this should be true all the time in practice source_version = str(Changelog(source_str, 1)[0].version) target = Changelog(target_str, 1)[0] -if source_version == str(target.version): -# TODO: it could be possible to deal with this, but is a bit complex -raise ValueError("don't (yet) know how to deal with d/changelog patch that edits the same version") return source_version, target def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_run): @@ -119,17 +117,14 @@ def check_patch(patch_str, *args, **kwargs): def debpatch(patch, patch_name, args): # don't change anything if... -dry_run = args.target_version - -with open(args.changelog) as fp: -current = Changelog(fp.read()) +dry_run = args.target_version or args.source_version changelog = list(filter(lambda x: is_dch(x.path), patch)) if not changelog: logging.info("no debian/changelog in patch: %s" % args.patch_file) old_version = None target = ChangeBlock( -package = current[0].package, +package = CHBLOCK_DUMMY_PACKAGE, author = "%s <%s>" % (os.getenv("DEBFULLNAME"), os.getenv("DEBEMAIL")), date = email.utils.formatdate(time.time(), localtime=True), version = None, @@ -149,6 +144,12 @@ def debpatch(patch, patch_name, args): print(old_version) return False +# read this here so --source-version can work even without a d/changelog +with open(args.changelog) as fp: +current = Changelog(fp.read()) +if target.package == CHBLOCK_DUMMY_PACKAGE: +target.package = current[0].package + if not dry_run: patch_str = str(patch) if check_patch(patch_str, "-N"): -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#865427: devscripts: dcmd should exit non-zero on special failures like permission denied
Package: devscripts Version: 2.17.6 Severity: normal Dear Maintainer, $ chmod -r dpkg_1.18.24.dsc $ dcmd --diff echo dpkg_1.18.24.dsc /usr/bin/dcmd: 76: /usr/bin/dcmd: cannot open dpkg_1.18.24.dsc: Permission denied dpkg_1.18.24.dsc $ echo $? 0 By contrast, on a normal error it exits 1: $ chmod +r dpkg_1.18.24.dsc $ dcmd --diff echo dpkg_1.18.24.dsc $ echo $? 1 -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- export DEBSIGN_PROGRAM="gpg2" -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'buildd-unstable'), (300, 'unstable'), (100, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages devscripts depends on: ii dpkg-dev 1.18.24 ii libc6 2.24-11 ii libfile-homedir-perl 1.00-1 ii perl 5.24.1-3 ii python3 3.5.3-1 Versions of packages devscripts recommends: ii apt 1.4.6 ii at 3.1.20-3 ii curl7.52.1-5 ii dctrl-tools 2.24-2+b1 ii debian-keyring 2017.05.28 ii dput0.12.1 ii equivs 2.0.9+nmu1 ii fakeroot1.21-3.1 ii file1:5.30-1 ii gnupg 2.1.18-6 ii gnupg2 2.1.18-6 ii libdistro-info-perl 0.14 ii libdpkg-perl1.18.24 ii libencode-locale-perl 1.05-1 ii libgit-wrapper-perl 0.047-1 ii liblist-compare-perl0.53-1 ii liblwp-protocol-https-perl 6.06-2 ii libsoap-lite-perl 1.20-1 ii liburi-perl 1.71-1 ii libwww-perl 6.15-1 ii licensecheck3.0.29-1 ii lintian 2.5.50.4 ii man-db 2.7.6.1-2 ii patch 2.7.5-1+b2 ii patchutils 0.3.4-2 ii python3-debian 0.1.30 ii python3-magic 1:5.30-1 ii sensible-utils 0.0.9 ii strace 4.15-2 ii unzip 6.0-21 ii wdiff 1.2.2-2 ii wget1.18-5 ii xz-utils5.2.2-1.2+b1 Versions of packages devscripts suggests: ii adequate 0.15.1 ii autopkgtest 4.4 pn bls-standalone ii bsd-mailx [mailx]8.1.2-0.20160123cvs-4 ii build-essential 12.3 pn check-all-the-things pn cvs-buildpackage pn devscripts-el ii diffoscope 78 ii disorderfs 0.5.1-1+b1 pn dose-extra pn duck ii faketime 0.9.6-7+b1 ii gnuplot 5.0.5+dfsg1-6 ii gpgv 2.1.18-6 ii how-can-i-help 15 ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl0.22-1 pn libnet-smtps-perl pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl1.29-1+b2 ii mozilla-devscripts 0.47 ii mutt 1.7.2-1 ii openssh-client [ssh-client] 1:7.4p1-10 ii piuparts 0.77 pn ratt ii reprotest0.6.2 pn svn-buildpackage pn w3m -- no debconf information ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debpatch updated (4b70e20 -> a52b87b)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. from 4b70e20 debpatch: fix --source-version when d/changelog is present new aa18b6d debpatch: Work around dpkg #865430 adds ad90af3 debrepro: check for dependencies before doing any builds adds 51e909f debsign: Fix signing a dsc directly adds 7f47730 Add libfile-homedir-perl to Build-Depends adds 2a1d230 Update French translation adds a5b29a8 wnpp-check.1: Clean up man formatting adds 5c2cb31 po4a update adds adee662 trivial unfuzzy adds 1e3e827 releasing package devscripts version 2.17.6 adds b5c4410 Switch from /org to /srv in paths on debian.org servers adds 7b445ad debchange: target stretch when doing --bpo adds 793b8e8 Document previous change adds a99950b debchange.pl: Replace dpkg call with Dpkg::Version::compare_version adds f154b48 debsnap: parse the dsc file when downloading source packages. adds 6d74c41 debchange: Support $codename{,-{proposed-updates,security}} as well as (old)stable-foo, etc adds bd3b2ce close bug new a52b87b Merge branch 'master' into pu/debpatch The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 41 +- debian/control |1 + po4a/po/de.po | 3760 +-- po4a/po/devscripts.pot | 2678 -- po4a/po/fr.po | 5731 +++- scripts/bts.pl |2 +- scripts/debchange.pl | 20 +- scripts/debpatch | 13 +- scripts/debrepro.pod |4 + scripts/debrepro.sh| 21 + scripts/debsign.sh |2 +- scripts/debsnap.pl | 65 +- scripts/dscverify.1|2 +- scripts/dscverify.pl |2 +- scripts/rc-alert.pl|2 +- scripts/wnpp-check.1 |2 +- test/test_debchange|7 + 17 files changed, 7145 insertions(+), 5208 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/02: debpatch: Work around dpkg #865430
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit aa18b6d5d5356c1e20ea53bd4104589d75376ce9 Author: Ximin Luo Date: Wed Jun 28 16:20:31 2017 +0200 debpatch: Work around dpkg #865430 --- scripts/debpatch | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/debpatch b/scripts/debpatch index f3e006e..09b7d53 100755 --- a/scripts/debpatch +++ b/scripts/debpatch @@ -45,6 +45,11 @@ CHBLOCK_DUMMY_PACKAGE = "debpatch PLACEHOLDER" TRY_ENCODINGS = ["utf-8", "latin-1"] DISTRIBUTION_DEFAULT = "experimental" +def workaround_dpkg_865430(dscfile, origdir, stdout): +f = subprocess.check_output(["dcmd", "--tar", "echo", dscfile]).rstrip() +if not os.path.exists(os.path.join(origdir.encode("utf-8"), os.path.basename(f))): +C(["dcmd", "--tar", "cp", dscfile, origdir], stdout=stdout) + def is_dch(path): return (basename(path) == 'changelog' and basename(dirname(path)) == 'debian' @@ -243,16 +248,18 @@ def main(args): os.chdir(args.orig_dsc_or_dir) debpatch(patch, patch_name, args) elif os.path.isfile(args.orig_dsc_or_dir): -parts = os.path.splitext(os.path.basename(args.orig_dsc_or_dir)) +dscfile = args.orig_dsc_or_dir +parts = os.path.splitext(os.path.basename(dscfile)) if parts[1] != ".dsc": -raise ValueError("unrecognised patch target: %s" % args.orig_dsc_or_dir) +raise ValueError("unrecognised patch target: %s" % dscfile) extractdir = args.directory if args.directory else tempfile.mkdtemp() if not os.path.isdir(extractdir): os.makedirs(extractdir) try: builddir = os.path.join(extractdir, parts[0]) # dpkg-source doesn't like existing dirs -C(["dpkg-source", "-x", "--skip-patches", args.orig_dsc_or_dir, builddir], stdout=stdout) +C(["dpkg-source", "-x", "--skip-patches", dscfile, builddir], stdout=stdout) origdir = os.getcwd() +workaround_dpkg_865430(dscfile, origdir, stdout) os.chdir(builddir) did_patch = debpatch(patch, patch_name, args) if dry_run or not did_patch: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 02/02: Merge branch 'master' into pu/debpatch
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit a52b87b3b12eecb4a6eae05ef9313f6f7dd71026 Merge: aa18b6d bd3b2ce Author: Ximin Luo Date: Wed Jun 28 16:23:30 2017 +0200 Merge branch 'master' into pu/debpatch debian/changelog | 41 +- debian/control |1 + po4a/po/de.po | 3760 +-- po4a/po/devscripts.pot | 2678 -- po4a/po/fr.po | 5731 +++- scripts/bts.pl |2 +- scripts/debchange.pl | 20 +- scripts/debrepro.pod |4 + scripts/debrepro.sh| 21 + scripts/debsign.sh |2 +- scripts/debsnap.pl | 65 +- scripts/dscverify.1|2 +- scripts/dscverify.pl |2 +- scripts/rc-alert.pl|2 +- scripts/wnpp-check.1 |2 +- test/test_debchange|7 + 16 files changed, 7135 insertions(+), 5205 deletions(-) diff --cc debian/changelog index c09fdce,730824f..27b05d5 --- a/debian/changelog +++ b/debian/changelog @@@ -1,4 -1,24 +1,28 @@@ - devscripts (2.17.6) UNRELEASED; urgency=medium + devscripts (2.17.7) UNRELEASED; urgency=medium + + [ Paul Wise ] + * Switch from /org to /srv in paths on debian.org servers + + [ Mattia Rizzolo ] + * debchange: + + Target stretch-backports with --bpo. + + Support $codename{,-{proposed-updates,security}} as well. Closes: #789587 + + [ Hilko Bengen ] + * debchange: + + Replace dpkg call with Dpkg::Version::compare_version (Closes: #854366) + + [ Cyril Brulebois ] + * debsnap: + + parse the dsc file when downloading source packages. (Closes: #862668) + ++ [ Ximin Luo ] ++ * debpatch: +++ New script, Apply a debdiff to a Debian source package. (Closes: #845659) ++ + -- Paul Wise Sat, 17 Jun 2017 13:11:35 +0800 + + devscripts (2.17.6) unstable; urgency=medium [ Osamu Aoki ] * uscan: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debpatch: mention that it needs python3-debian
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/debpatch in repository devscripts. commit c60bcf3b58cd823c912bed5b9850482f7d7d0792 Author: Ximin Luo Date: Wed Jun 28 16:28:48 2017 +0200 debpatch: mention that it needs python3-debian --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index a426cfb..f331c6f 100644 --- a/README +++ b/README @@ -102,7 +102,7 @@ And now, in mostly alphabetical order, the scripts: debian/changelog are dealt with specially, to avoid the conflicts that changelog diffs typically produce when applied naively. May be used to check that old patches still apply to newer versions of those packages. - [python3-unidiff, quilt] + [python3-debian, python3-unidiff, quilt] - debpkg: A wrapper for dpkg used by debi to allow convenient testing of packages. For debpkg to work, it needs to be made setuid root, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/debpatch updated (a52b87b -> c60bcf3)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/debpatch in repository devscripts. from a52b87b Merge branch 'master' into pu/debpatch new c60bcf3 debpatch: mention that it needs python3-debian The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#845659: debpatch: New script, "Apply a debdiff to a Debian source package"
Ximin Luo: > James McCoy: >> On Thu, Jan 05, 2017 at 04:18:00PM +0000, Ximin Luo wrote: >>> Ximin Luo: >>>> As part of the Reproducible Builds effort, I've written a tool called >>>> debpatch(1), see the branch here: >>>> [..] >>> >>> Hi devscripts team, >>> >>> Any news on this? >> >> Apologies for not giving this a review sooner. >> >>> I would also be happy to merge this myself (I have >>> the access) but I thought it would be good to ask for a review first, >>> since I haven't contributed to this repo before. >> >> I agree with Sean that it would be good to not to have another >> reimplementation of changelog merging. However, if dpkg-mergechangelogs >> doesn't provide the functionality you need, I would recommend looking at >> python3-debian's debian.changelog module. I think that would probably >> be easier than trying to twist dch into doing the work. >> > > Sorry for the delay, I have now made these changes. > > dpkg-mergechangelogs seemed interesting but actually does a different job - > it merges different entries by total ordering on Debian version numbers, and > it does a normal 3-way merge when changes to the same entry are detected. > This type of merging seems more suited to packages that have already been > released. For example, it was unable to merge my pu/debpatch branch with the > current master, and I had to resolve that manually. > > OTOH debpatch is for rebasing unreleased changes on top of new released > packages. So what we want here is to plonk any added extra changelog entry, > on top of the new base, and adjust the version number accordingly. > > I have switched to using debian.changelog though, thanks for the tip. I also > got rid of some dirty "this is already applied" logic and removed some > arbitrary limits. > > https://anonscm.debian.org/cgit/collab-maint/devscripts.git/log/?h=pu/debpatch > > Pushed there ^ but also would be happy to squash these commits if you prefer. > I've updated git (pu/debpatch branch) with a few more minor changes. Is it OK if I merge this into master now? X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch master updated (c3ba6fc -> 108f51f)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch master in repository devscripts. from c3ba6fc debrepro: make second build with disorderfs at the same location new 108f51f debpatch: add missing copyright info The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: scripts/debpatch | 2 ++ scripts/debpatch.1 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debpatch: add missing copyright info
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch master in repository devscripts. commit 108f51f5eaef21b84193c77adaa1eba8d9d1983f Author: Ximin Luo Date: Mon Jul 3 12:57:52 2017 +0200 debpatch: add missing copyright info --- scripts/debpatch | 2 ++ scripts/debpatch.1 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/debpatch b/scripts/debpatch index 5e0e5f3..9b326ab 100755 --- a/scripts/debpatch +++ b/scripts/debpatch @@ -1,4 +1,6 @@ #!/usr/bin/python3 +# Copyright (c) 2016-2017, Ximin Luo +# # 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 the Free Software Foundation; either version 3 diff --git a/scripts/debpatch.1 b/scripts/debpatch.1 index e94f55c..9b60186 100644 --- a/scripts/debpatch.1 +++ b/scripts/debpatch.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2016, Ximin Luo +.\" Copyright (c) 2016-2017, Ximin Luo .\" .\" This program is free software; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: Rename debpatch to debdiff-apply. (Closes: #867738, #867743)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch master in repository devscripts. commit 2b5d7f24c02d5a6d3432b305c62b7eca09247685 Author: Ximin Luo Date: Mon Jul 10 18:56:09 2017 +0200 Rename debpatch to debdiff-apply. (Closes: #867738, #867743) --- README | 14 +++--- conf.default.in | 8 debian/changelog| 6 ++ debian/control | 4 ++-- debian/copyright| 2 +- po4a/devscripts-po4a.conf | 4 ++-- scripts/Makefile| 2 +- scripts/{debpatch => debdiff-apply} | 14 +++--- scripts/{debpatch.1 => debdiff-apply.1} | 18 +- scripts/debdiff.1 | 2 +- 10 files changed, 40 insertions(+), 34 deletions(-) diff --git a/README b/README index b4ad148..000ab35 100644 --- a/README +++ b/README @@ -90,6 +90,13 @@ And now, in mostly alphabetical order, the scripts: For a deeper comparison one can use the diffoscope package. [wdiff, patchutils] +- debdiff-apply: Apply unified diffs of two Debian source packages, such as + those generated by debdiff, to a target Debian source package. Any changes + to debian/changelog are dealt with specially, to avoid the conflicts that + changelog diffs typically produce when applied naively. May be used to check + that old patches still apply to newer versions of those packages. + [python3-debian, python3-unidiff, quilt] + - debi: Installs the current package by using the setuid root debpkg script described below. It assumes that the current package has just been built (for example by debuild), and the .deb lives in the @@ -97,13 +104,6 @@ And now, in mostly alphabetical order, the scripts: ability to install the package with a very short command is very useful when troubleshooting packages. -- debpatch: Apply unified diffs of two Debian source packages, such as those - generated by debdiff, to a target Debian source package. Any changes to - debian/changelog are dealt with specially, to avoid the conflicts that - changelog diffs typically produce when applied naively. May be used to check - that old patches still apply to newer versions of those packages. - [python3-debian, python3-unidiff, quilt] - - debpkg: A wrapper for dpkg used by debi to allow convenient testing of packages. For debpkg to work, it needs to be made setuid root, and this needs to be performed by the sysadmin -- it is not diff --git a/conf.default.in b/conf.default.in index 48633dd..4998bf2 100644 --- a/conf.default.in +++ b/conf.default.in @@ -275,15 +275,15 @@ # Unpack tarballs found in the top level source directory. # DEBDIFF_UNPACK_TARBALLS=yes +# debdiff-apply +# +# No variables currently + # debi # # debc recognises the DEBRELEASE_DEBS_DIR variable; see debrelease # below for more information. -# debpatch -# -# No variables currently - # debpkg # # No variables currently diff --git a/debian/changelog b/debian/changelog index 19d5978..9bf7577 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +devscripts (2.17.8) UNRELEASED; urgency=medium + + * Rename debpatch to debdiff-apply. (Closes: #867738, #867743) + + -- Ximin Luo Mon, 10 Jul 2017 18:54:04 +0200 + devscripts (2.17.7) unstable; urgency=medium [ Paul Wise ] diff --git a/debian/control b/debian/control index b5bdf3c..92e24c7 100644 --- a/debian/control +++ b/debian/control @@ -157,9 +157,9 @@ Description: scripts to make the life of a Debian Package maintainer easier - debdiff: compare two versions of a Debian package to check for added and removed files. Use the diffoscope package for deep comparisons. [wdiff, patchutils] - - debi: install a just-built package - - debpatch: apply unified diffs of two Debian source packages, such as those + - debdiff-apply: apply unified diffs of two Debian source packages, such as generated by debdiff, to a target source package [python3-unidiff, quilt] + - debi: install a just-built package - debpkg: dpkg wrapper to be able to manage/test packages without su - debrepro: reproducibility tester for Debian packages [faketime, diffoscope, disorderfs] diff --git a/debian/copyright b/debian/copyright index f3f40dc..c22adda 100644 --- a/debian/copyright +++ b/debian/copyright @@ -21,7 +21,7 @@ the GPL, version 2 or later. - annotate-output, debdiff and nmudiff are released under version 2 (only) of the GPL. -- debpatch, debsnap, diff2patches and git-deborig are released under +- debdiff-apply, debsnap, diff2patches and git-deborig are released under version 3 or later of the GPL - deb-reversion is under the Artistic License version 2.0. diff --git a/po4a/devscripts-po4a.conf b/po4a/devscripts-po4a.conf index 792c2db..da7d782 100644 --- a/po4a/devscripts-po4a.conf +++
[devscripts] branch master updated (efa001f -> 2b5d7f2)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch master in repository devscripts. from efa001f releasing package devscripts version 2.17.7 new 2b5d7f2 Rename debpatch to debdiff-apply. (Closes: #867738, #867743) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: README | 14 +++--- conf.default.in | 8 debian/changelog| 6 ++ debian/control | 4 ++-- debian/copyright| 2 +- po4a/devscripts-po4a.conf | 4 ++-- scripts/Makefile| 2 +- scripts/{debpatch => debdiff-apply} | 14 +++--- scripts/{debpatch.1 => debdiff-apply.1} | 18 +- scripts/debdiff.1 | 2 +- 10 files changed, 40 insertions(+), 34 deletions(-) rename scripts/{debpatch => debdiff-apply} (96%) rename scripts/{debpatch.1 => debdiff-apply.1} (92%) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: debdiff-apply: actually install it, by adding it to setup.py
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch master in repository devscripts. commit 116beb7d45907ef9d01fea4c1907e8b8a93ef666 Author: Ximin Luo Date: Wed Jul 12 15:17:12 2017 +0200 debdiff-apply: actually install it, by adding it to setup.py --- debian/changelog | 4 scripts/Makefile | 1 + scripts/setup.py | 6 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index db97ffd..5714688 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ devscripts (2.17.9) UNRELEASED; urgency=medium * debrepro: + support skipping the 'time' variation. + [ Ximin Luo ] + * debdiff-apply: ++ Actually install it in the debian package, by adding it to setup.py + -- Adam D. Barratt Tue, 11 Jul 2017 21:15:37 +0100 devscripts (2.17.8) unstable; urgency=medium diff --git a/scripts/Makefile b/scripts/Makefile index 4fe2ea4..ece5455 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -23,6 +23,7 @@ BC_BUILD_DIR:=bash_completion COMPLETION = $(patsubst %.bash_completion,$(BC_BUILD_DIR)/%,$(COMPL_FILES)) COMPL_DIR := $(shell pkg-config --variable=completionsdir bash-completion) PKGNAMES:=wnpp-alert wnpp-check mk-build-deps rmadison mass-bug debsnap dd-list build-rdeps who-uploads transition-check getbuildlog dcontrol grep-excuses rc-alert whodepends dget pts-subscribe pts-unsubscribe debcheckout +# also update the list in setup.py PYTHON3_SCRIPTS:=debdiff-apply sadt suspicious-source wrap-and-sort GEN_MAN1S += debrepro.1 devscripts.1 mk-origtargz.1 uscan.1 diff --git a/scripts/setup.py b/scripts/setup.py index e376d07..69884a5 100755 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -12,11 +12,7 @@ if os.path.exists(changelog): if match: version = match.group(1) -scripts = [ -'sadt', -'suspicious-source', -'wrap-and-sort', -] +scripts = "debdiff-apply sadt suspicious-source wrap-and-sort".split() if __name__ == '__main__': setup( -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch master updated (b71acd6 -> 116beb7)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch master in repository devscripts. from b71acd6 debrepro: support skipping the 'time' variation new 116beb7 debdiff-apply: actually install it, by adding it to setup.py The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 scripts/Makefile | 1 + scripts/setup.py | 6 +- 3 files changed, 6 insertions(+), 5 deletions(-) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch master updated (28b9619 -> 3902723)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch master in repository devscripts. from 28b9619 add bug # to the changelog new 3902723 d/control: add B-D for testing debdiff-apply The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/control | 1 + 1 file changed, 1 insertion(+) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: d/control: add B-D for testing debdiff-apply
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch master in repository devscripts. commit 390272344219b2f6c043fb9d0c187c2e86ea1d7e Author: Ximin Luo Date: Tue Jul 18 17:02:09 2017 +0200 d/control: add B-D for testing debdiff-apply --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 92e24c7..f59f268 100644 --- a/debian/control +++ b/debian/control @@ -33,6 +33,7 @@ Build-Depends: bash-completion, python3-flake8, python3-magic, python3-setuptools, + python3-unidiff , shunit2 (>= 2.1.6), unzip, wdiff, -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#868260: devscripts: phantom script debdiff-apply
On Sat, 15 Jul 2017 22:20:06 +0200 gregor herrmann wrote: > On Thu, 13 Jul 2017 21:24:16 -0400, James McCoy wrote: > > > On Thu, Jul 13, 2017 at 10:59:43PM +0200, gregor herrmann wrote: > > > I looked at the source package, without finding anything obvious. > > > And rebuilding the package fails without internet access in the > > > chroot (and/or with http_proxy set in the chroot). > > > > It certainly shouldn't require internet access. However, we do run some > > uscan tests and uscan honors proxy settings in the environment. > > > > I guess we should be clearing any of those when testing, just in case > > they happen to leak into the test environment. > > Indeed, with the attache patch tge uscan tests seem to pass. > (There might be more variables to consider and better places to unset > them ...) > > > > I still get the following test failure afterwards: > > [,,] > > == > FAIL: test_debdiff-apply (devscripts.test.test_help.HelpTestCase) I pushed a fix to git, adding a B-D on debdiff-apply's dependency python3-unidiff. Together with your uscan http_proxy patch, does this fix all the tests for you? If not, it might be good if we export http_proxy = http://127.0.0.1:9/ and https_proxy = https://127.0.0.1:9/ in d/rules, pybuild does this automatically already - https://wiki.debian.org/Python/Pybuild#debian.2Fcontrol X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#868260: devscripts: phantom script debdiff-apply
gregor herrmann: > On Tue, 18 Jul 2017 15:13:00 +0000, Ximin Luo wrote: > >>> I still get the following test failure afterwards: >>> >>> [,,] >>> >>> == >>> FAIL: test_debdiff-apply (devscripts.test.test_help.HelpTestCase) > >> I pushed a fix to git, adding a B-D on debdiff-apply's dependency >> python3-unidiff. Together with your uscan http_proxy patch, does >> this fix all the tests for you? > > Thanks! > Yes, git HEAD plus my changes from Saturday make the tests pass. > >> If not, it might be good if we export http_proxy = >> http://127.0.0.1:9/ and https_proxy = https://127.0.0.1:9/ in >> d/rules, pybuild does this automatically already - >> https://wiki.debian.org/Python/Pybuild#debian.2Fcontrol > > I'm afraid this doesn't work, the build still fails > [..] > OK, in that case I've applied your uscan patch to devscripts git. I'll leave the task of releasing this fix, to one of the regular maintainers. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] branch pu/mk-origtargz-argmax created (now 3fa9a36)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a change to branch pu/mk-origtargz-argmax in repository devscripts. at 3fa9a36 Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`) This branch includes the following new commits: new 3fa9a36 Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
[devscripts] 01/01: Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`)
This is an automated email from the git hooks/post-receive script. infinity0 pushed a commit to branch pu/mk-origtargz-argmax in repository devscripts. commit 3fa9a36bb4f352c07a3537cb597aaf734ce936f1 Author: Ximin Luo Date: Sat Jan 13 17:22:02 2018 +0100 Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`) --- scripts/mk-origtargz.pl | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/mk-origtargz.pl b/scripts/mk-origtargz.pl index 4299b93..4533899 100644 --- a/scripts/mk-origtargz.pl +++ b/scripts/mk-origtargz.pl @@ -571,11 +571,13 @@ if ($do_repack || $deletecount) { # We have to use piping because --delete is broken otherwise, as documented # at https://www.gnu.org/software/tar/manual/html_node/delete.html if (@to_delete) { - spawn(exec => ['tar', '--delete', @to_delete ], - from_file => $destfiletar, - to_file => $destfiletar . ".tmp", - wait_child => 1) if scalar(@to_delete) > 0; - move ($destfiletar . ".tmp", $destfiletar); + while (my @next_n = splice @to_delete, 0, 16384) { + spawn(exec => ['tar', '--delete', @next_n ], + from_file => $destfiletar, + to_file => $destfiletar . ".tmp", + wait_child => 1) if scalar(@next_n) > 0; + move ($destfiletar . ".tmp", $destfiletar); + } } compress_archive($destfiletar, $destfile, $compression); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Bug#855464: devscripts: [mk-origtargz] Fails to create tar if too many files excluded
Package: devscripts Version: 2.17.12 Followup-For: Bug #855464 Dear Maintainer, I've implemented a patch here: https://anonscm.debian.org/cgit/collab-maint/devscripts.git/diff/?id=pu/mk-origtargz-argmax&id2=master it is not the most correct - ARG_MAX is measured in bytes, and it assumes that 16384 command-line arguments will fit within this - but it is simple and it works for rustc. Perhaps the OP can test if it works for him too. X -- Package-specific info: --- /etc/devscripts.conf --- --- ~/.devscripts --- export DEBSIGN_PROGRAM="gpg2" -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'buildd-unstable'), (500, 'stable'), (300, 'unstable'), (100, 'experimental'), (1, 'experimental-debug') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.14.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages devscripts depends on: ii dpkg-dev 1.19.0.4 ii libc6 2.25-5 ii libfile-homedir-perl 1.002-1 ii perl 5.26.1-3 ii python3 3.6.4-1 ii sensible-utils0.0.11 Versions of packages devscripts recommends: ii apt 1.6~alpha6 ii at 3.1.20-3.1 ii curl7.57.0-1 ii dctrl-tools 2.24-2+b1 ii debian-keyring 2017.11.24 ii dput-ng [dput] 1.15 ii equivs 2.1.0 ii fakeroot1.22-2 ii file1:5.32-1 ii gnupg 2.2.4-1 ii gnupg2 2.2.4-1 ii libdistro-info-perl 0.17 ii libdpkg-perl1.19.0.4 ii libencode-locale-perl 1.05-1 ii libgit-wrapper-perl 0.047-1 ii liblist-compare-perl0.53-1 ii liblwp-protocol-https-perl 6.07-2 ii libsoap-lite-perl 1.26-1 ii liburi-perl 1.72-2 ii libwww-perl 6.31-1 ii licensecheck3.0.31-2 ii lintian 2.5.67 ii man-db 2.7.6.1-4 ii patch 2.7.5-1+b2 ii patchutils 0.3.4-2 ii python3-apt 1.4.0~beta3+b1 ii python3-debian 0.1.31 ii python3-magic 1:5.32-1 ii python3-requests2.18.4-1 ii python3-unidiff 0.5.4-1 ii python3-xdg 0.25-4 ii strace 4.19-1 ii unzip 6.0-21 ii wdiff 1.2.2-2 ii wget1.19.2-1 ii xz-utils5.2.2-1.3 Versions of packages devscripts suggests: ii adequate 0.15.1 ii autopkgtest 5.1 pn bls-standalone ii bsd-mailx [mailx] 8.1.2-0.20160123cvs-4 ii build-essential 12.4 pn check-all-the-things pn cvs-buildpackage pn devscripts-el ii diffoscope90 ii disorderfs0.5.2-2 pn dose-extra pn duck ii faketime 0.9.6-7+b1 ii gnuplot 5.2.2+dfsg1-2 ii gnuplot-x11 [gnuplot] 5.2.2+dfsg1-2 ii gpgv 2.2.4-1 ii how-can-i-help15 ii libauthen-sasl-perl 2.1600-1 ii libfile-desktopentry-perl 0.22-1 pn libnet-smtps-perl pn libterm-size-perl ii libtimedate-perl 2.3000-2 ii libyaml-syck-perl 1.29-1+b3 ii mozilla-devscripts0.47 ii mutt 1.9.2-1 ii openssh-client [ssh-client] 1:7.6p1-2 ii piuparts 0.83 ii postgresql-client-10 [postgresql-client] 10.1-2 ii quilt 0.63-8.2 pn ratt ii reprotest 0.7.7 pn svn-buildpackage pn w3m -- no debconf information -- debsums errors found: debsums: changed file /usr/bin/mk-origtargz (from devscripts package) ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Re: Good but ... mk-origtargz Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`)
Osamu Aoki: > Hi, > > [..] > > This looks a reasonable patch. But I don't know why you chose > 16384=0x400 as the max figure. > > Following your comment, I tried on my local machine > $ getconf ARG_MAX > 2097152 > > This is bigger than 16384. > > If this is different on different system, why not dynamically check and > set it with some safety margin like `getconf ARG_MAX` - 16 etc.? > Hi Osamu, ARG_MAX is measured in bytes, not number of arguments. I calculated 16384 as 2M / 128, 128 being a generously-high estimated value for "average path length" in debian packages. I agree it would be clearer to replace 16384 with `getconf ARG_MAX / AV_PATH_LENGTH_EST` and define AV_PATH_LENGTH_EST = 128 near the top, but my perl knowledge is very basic and I wasn't sure of the best way to shell out to another program. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
Re: Good but ... mk-origtargz Allow more files to be deleted than can fit inside argv (`getconf ARG_MAX`)
Osamu Aoki: > > Maybe before discussing technical solutions, we should know what issues > we are addressing by this modification. Is there a real cases which you > need to have this patch? > I need this for rustc. Try "apt-get source rustc" now and "uscan --verbose", it will fail. I had to locally patch mk-origtargz for it to work. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git ___ devscripts-devel mailing list devscripts-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel