Hi, this has been bothering me for days and I can't find the reason. It is probably something very trivial, but I don't get it. I have a workaround, but I'd like to understand what went wrong here.
TL;DR: There is an unexplained linefeed difference in one file in the orig.tar.xz2 generated by gbp that is only visible in one branch, possibly after DEP-14 conversion, and only happens when using export=WC. I use a pretty much standard (I think) development environment using gbp-buildpackage and sbuild on my workstation tracking Buster. For years I had this in my ~/.gbp.conf --- [buildpackage] export = WC export-dir = ../build-area --- this worked fine for all packages I'm (co)maintaining, I cannot recall ever having issues with this. I like this setting because it allows me to quickly testbuild a local change using my standard tooling without committing it first. I have also used this workflow for the last couple of src:bind9 uploads, including the latest 1:9.11.5.P4+dfsg-1 . Up until a few days ago, including my latest upload, the bind9 repository on salsa (https://salsa.debian.org/dns-team/bind9) was in the default gbp layout. Ondrej thankfully converted the repo into the DEP-14 layout by renaming the branches, but afaics they are still the same commits. I cannot easily check right now because the git checkout from before the conversion is on a laptop I don't have with me at the moment. It COULD be unrelated to the dep-14 conversion, but I think it's related. This is where things get weird. When I clone the repo and try to build the debian/buster branch, dpkg-source errors out about an unexpected upstream change berni@BOTOX:~/debian$ gbp clone g...@salsa.debian.org:dns-team/bind9.git gbp:info: Cloning from 'g...@salsa.debian.org:dns-team/bind9.git' berni@BOTOX:~/debian/bind9$ git checkout debian/buster Branch 'debian/buster' folgt nun Remote-Branch 'debian/buster' von 'origin'. Zu neuem Branch 'debian/buster' gewechselt berni@BOTOX:~/debian/bind9$ gbp buildpackage --git-builder="sbuild --source-only-changes " gbp:info: Tarballs 'bind9_9.11.5.P4+dfsg.orig.tar.xz' not found at '../' gbp:info: Exporting 'WC' to '/ssdpool/bulkhome/berni/debian/build-area/bind9-tmp' gbp:info: Moving '/ssdpool/bulkhome/berni/debian/build-area/bind9-tmp' to '/ssdpool/bulkhome/berni/debian/build-area/bind9-9.11.5.P4+dfsg' gbp:info: Performing the build dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 05_non-linux.diff dpkg-source: info: applying 07_multiarch.diff dpkg-source: info: applying 10_min-cache-ttl.diff dpkg-source: info: applying 25_library_paths.diff dpkg-source: info: applying 33_resource_missing_include.diff dpkg-source: info: applying 34_prepare_native_pkcs11.diff dpkg-source: info: applying 75_ctxstart_no_sighandling.diff dpkg-source: info: applying 80_reproducible_build.diff dpkg-source: info: applying Add_--install-layout=deb_to_setup.py_call.patch dpkg-source: info: applying skip-rtld-deepbind-for-dyndb.diff dh clean --with python3 --fail-missing --exclude=.la --exclude=lwresd --exclude=__pycache__ debian/rules override_dh_auto_clean make[1]: Entering directory '/ssdpool/bulkhome/berni/debian/build-area/bind9-9.11.5.P4+dfsg' rm -rf bin/named-pkcs11 rm -rf bin/dnssec-pkcs11 rm -rf lib/isc-pkcs11 rm -rf lib/dns-pkcs11 if [ -f version.bak ]; then cp version.bak version; fi dh_auto_clean -B build dh_auto_clean -B build-udeb make[1]: Leaving directory '/ssdpool/bulkhome/berni/debian/build-area/bind9-9.11.5.P4+dfsg' dh_autoreconf_clean -O--fail-missing -O--exclude=.la -O--exclude=lwresd -O--exclude=__pycache__ dh_clean -O--fail-missing -O--exclude=.la -O--exclude=lwresd -O--exclude=__pycache__ dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building bind9 using existing ./bind9_9.11.5.P4+dfsg.orig.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: local changes detected, the modified files are: bind9-9.11.5.P4+dfsg/contrib/dlz/example/win32/dxdriver.dsw dpkg-source: info: you can integrate the local changes with dpkg-source --commit dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/bind9_9.11.5.P4+dfsg-1.diff.cqPGYG E: Failed to package source directory /ssdpool/bulkhome/berni/debian/build-area/bind9-9.11.5.P4+dfsg gbp:error: 'sbuild --source-only-changes ' failed: it exited with 1 The diff (attached) shows the single file "contrib/dlz/example/win32/dxdriver.dsw", which we definitely never touch in Debian, being converted from "\n" to "\r\n" line terminators. I don't get where this comes from. There is no difference between the upstream tag being used to generate the orig.tar.xz2 and the debian/buster branch, in both there are DOS crlf endings berni@BOTOX:~/debian/bind9$ git diff upstream/9.11.5.P4+dfsg..debian/buster contrib/dlz/example/win32/dxdriver.dsw berni@BOTOX:~/debian/bind9$ file contrib/dlz/example/win32/dxdriver.dsw contrib/dlz/example/win32/dxdriver.dsw: ASCII text, with CRLF line terminators The file also has the same md5sum of course. 1e1ae7c74ba27f413309900c930aca61 contrib/dlz/example/win32/dxdriver.dsw However, in the generated tar.xz the file has "\n" line terminators and thus a different md5sum (1e1ae7c74ba27f413309900c930aca61). The generated orig.tar.xz2 has the same md5sum (b59921f04a722b0a30fab88dcf256449) as the one currently in the archive. bind-9.11.5-P4/contrib/dlz/example/win32/dxdriver.dsw: ASCII text Now comes the catch: - if I remove export=WC, debian/buster branch builds fine, ALTHOUGH the file is still different in the .orig.tar.xz and the md5sum matches the one in the archive - debian/master (9.11.6) builds fine with export=WC and without it I have no idea where the line terminators difference in one single branch in one single file that is never used in Debian builds comes from. I don't think it's the pristine-tar data, when I remove the generated orig.tar.xz and have it regenerated with --git-no-pristine-tar it has a different md5sum (so pristine tar is apparently not used), but the file in the archive still has a different linefeed than the one in the git archive. Help :-) Thanks, Bernhard
Description: <short summary of the patch> TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . bind9 (1:9.11.5.P4+dfsg-1) unstable; urgency=high . [ Bernhard Schmidt ] * New upstream version 9.11.5.P4+dfsg - CVE-2018-5744: A specially crafted packet can cause named to leak memory - CVE-2018-5745: An assertion failure can occur if a trust anchor rolls over to an unsupported key algorithm when using managed-keys - CVE-2019-6465: Controls for zone transfers might not be properly applied to Dynamically Loadable Zones (DLZs) if the zones are writable. * d/watch: Do not use beta or RC versions * d/libdns1104.symbols: fix symbols-file-contains-debian-revision for dnstap symbols . [ Ondřej Surý ] * Add new upstream GPG signing-key Author: Bernhard Schmidt <be...@debian.org> --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: <vendor|upstream|other>, <url of original patch> Bug: <url in upstream bugtracker> Bug-Debian: https://bugs.debian.org/<bugnumber> Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> Forwarded: <no|not-needed|url proving that it has been forwarded> Reviewed-By: <name and email of someone who approved the patch> Last-Update: 2019-03-11 --- bind9-9.11.5.P4+dfsg.orig/contrib/dlz/example/win32/dxdriver.dsw +++ bind9-9.11.5.P4+dfsg/contrib/dlz/example/win32/dxdriver.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "dxdriver"=.\dxdriver.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "dxdriver"=.\dxdriver.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### +