Bug#1016340: openssh: FTBFS: Failed to copy 'etc/ssh/sshd_config': No such file or directory at /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7.
Hi Colin, Thanks for the report. I first copied dh-exec-install-rename from dh-exec 0.23.4 and compiled OpenSSL fine. The odd thing is that 0.23.4 was out but 0.24 was on Salsa but never released. 0.25 was just an update of the Salsa version and 0.26 was the re-introduction of the patches for 0.23.4. Anyway, 0.26 is on Salsa and is the current version. A diff between these files showed only a few lines to a) cater for dh-exec-install-move and fix Bug #831786 I thought it had to do with the move side of things but it turns out it was the fix that was the issue! I commented out the following in /usr/share/dh-exec/dh-exec-install-rename if (defined ($ENV{"DH_INTERNAL_OPTIONS"}) && $ENV{"DH_INTERNAL_OPTIONS"} =~ /-[ai]/) { $noop = 0; } I'm not really sure why this causes the problem, but it definitely sets something off. - Craig On Fri, 12 Aug 2022 at 00:56, Colin Watson wrote: > Control: clone -1 -2 > Control: reassign -2 dh-exec > Control: retitle -2 dh-exec-install-rename sometimes moves rather than > copies > > On Fri, Jul 29, 2022 at 08:40:48PM +0200, Lucas Nussbaum wrote: > > During a rebuild of all packages in sid, your package failed to build > > on amd64. > > > > > > Relevant part (hopefully): > > > make[1]: Entering directory '/<>' > > > # Remove version control tags to avoid unnecessary conffile > > > # resolution steps for administrators. > > > sed -i '/\$OpenBSD:/d' \ > > > debian/tmp/etc/ssh/moduli \ > > > debian/tmp/etc/ssh/ssh_config \ > > > debian/tmp/etc/ssh/sshd_config > > > dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb > > > dh_install -popenssh-client-udeb -popenssh-server-udeb \ > > > --sourcedir=debian/build-udeb > > > Failed to copy 'etc/ssh/sshd_config': No such file or directory at > /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7. > > > dh_install: error: debian/openssh-server.install (executable config) > returned exit code 127 > > > make[1]: *** [debian/rules:163: override_dh_install-arch] Error 25 > > This seems to be a dh-exec regression, and when I fixed that I ran into > additional regressions behind it. I'm a bit confused at this point. > You should be able to reproduce all these problems by building openssh > 1:9.0p1-1. All this used to work with dh-exec 0.23.4 - see e.g.: > > > https://buildd.debian.org/status/fetch.php?pkg=openssh=amd64=1%3A9.0p1-1%2Bb1=1652555012=0 > > https://launchpadlibrarian.net/598976391/buildlog_ubuntu-kinetic-amd64.openssh_1%3A9.0p1-1_BUILDING.txt.gz > > The first problem here is that dh_install is run multiple times, and the > first one moves a file out of debian/tmp/ when it's only supposed to > copy. This looks like a simple typo in dh-exec-install-rename; it tries > to copy from a couple of different paths, but for the second one it > calls "move" rather than "cp", which is surely just a mistake. Patch > for that follows: > > diff --git a/lib/dh-exec-install-rename b/lib/dh-exec-install-rename > index 06fe885..2c269e8 100755 > --- a/lib/dh-exec-install-rename > +++ b/lib/dh-exec-install-rename > @@ -66,9 +66,9 @@ if (/([^\s]*)\s+=>\s+([^\s]*)/ || /^=>\s+([^\s]*)/) { > die "Failed to move '$src': $!"; > } else { > cp ($src, File::Spec->catfile ($debpath, $dstfile)) or > -move (File::Spec->catfile ("debian/tmp", $src), > - File::Spec->catfile ($debpath, $dstfile)) or > - die "Failed to copy '$src': $!"; > +cp (File::Spec->catfile ("debian/tmp", $src), > +File::Spec->catfile ($debpath, $dstfile)) or > +die "Failed to copy '$src': $!"; > } > } > > > The second dh_install command does the same copies even though it isn't > supposed to be processing those packages, which is when we hit the > failure. Horrible, but maybe that's just how debhelper handles > executable config files and dh-exec doesn't get much choice? Not sure. > (Relatedly, though it doesn't affect openssh, how can > dh-exec-install-move possibly work properly if every dh_install run will > end up moving files regardless of whether it's operating on the package > in question?) > > After applying the above fix, the build gets further, and I get to: > >dh_missing > dh_missing: warning: > dh-exec.aqR1q_B1/etc/ufw/applications.d/openssh-server exists in debian/tmp > but is not installed to anywhere (related file: > "debian/tmp/dh-exec._KAY3sIj/etc/ufw/applications.d/openssh-server") > dh_missing: warning: > dh-exec.aqR1q_B1/usr/share/apport/package-hooks/openssh-server.py exists in > debian/tmp but is not installed to anywhere (related file: > "debian/tmp/dh-exec._KAY3sIj/usr/share/apport/package-hooks/openssh-server.py") > dh_missing: warning: dh-exec.aqR1q_B1/usr/share/openssh/sshd_config exists > in debian/tmp but is not installed to anywhere (related file: > "debian/tmp/dh-exec._KAY3sIj/usr/share/openssh/sshd_config") > dh_missing: warning:
Bug#1016340: openssh: FTBFS: Failed to copy 'etc/ssh/sshd_config': No such file or directory at /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7.
Control: clone -1 -2 Control: reassign -2 dh-exec Control: retitle -2 dh-exec-install-rename sometimes moves rather than copies On Fri, Jul 29, 2022 at 08:40:48PM +0200, Lucas Nussbaum wrote: > During a rebuild of all packages in sid, your package failed to build > on amd64. > > > Relevant part (hopefully): > > make[1]: Entering directory '/<>' > > # Remove version control tags to avoid unnecessary conffile > > # resolution steps for administrators. > > sed -i '/\$OpenBSD:/d' \ > > debian/tmp/etc/ssh/moduli \ > > debian/tmp/etc/ssh/ssh_config \ > > debian/tmp/etc/ssh/sshd_config > > dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb > > dh_install -popenssh-client-udeb -popenssh-server-udeb \ > > --sourcedir=debian/build-udeb > > Failed to copy 'etc/ssh/sshd_config': No such file or directory at > > /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7. > > dh_install: error: debian/openssh-server.install (executable config) > > returned exit code 127 > > make[1]: *** [debian/rules:163: override_dh_install-arch] Error 25 This seems to be a dh-exec regression, and when I fixed that I ran into additional regressions behind it. I'm a bit confused at this point. You should be able to reproduce all these problems by building openssh 1:9.0p1-1. All this used to work with dh-exec 0.23.4 - see e.g.: https://buildd.debian.org/status/fetch.php?pkg=openssh=amd64=1%3A9.0p1-1%2Bb1=1652555012=0 https://launchpadlibrarian.net/598976391/buildlog_ubuntu-kinetic-amd64.openssh_1%3A9.0p1-1_BUILDING.txt.gz The first problem here is that dh_install is run multiple times, and the first one moves a file out of debian/tmp/ when it's only supposed to copy. This looks like a simple typo in dh-exec-install-rename; it tries to copy from a couple of different paths, but for the second one it calls "move" rather than "cp", which is surely just a mistake. Patch for that follows: diff --git a/lib/dh-exec-install-rename b/lib/dh-exec-install-rename index 06fe885..2c269e8 100755 --- a/lib/dh-exec-install-rename +++ b/lib/dh-exec-install-rename @@ -66,9 +66,9 @@ if (/([^\s]*)\s+=>\s+([^\s]*)/ || /^=>\s+([^\s]*)/) { die "Failed to move '$src': $!"; } else { cp ($src, File::Spec->catfile ($debpath, $dstfile)) or -move (File::Spec->catfile ("debian/tmp", $src), - File::Spec->catfile ($debpath, $dstfile)) or - die "Failed to copy '$src': $!"; +cp (File::Spec->catfile ("debian/tmp", $src), +File::Spec->catfile ($debpath, $dstfile)) or +die "Failed to copy '$src': $!"; } } The second dh_install command does the same copies even though it isn't supposed to be processing those packages, which is when we hit the failure. Horrible, but maybe that's just how debhelper handles executable config files and dh-exec doesn't get much choice? Not sure. (Relatedly, though it doesn't affect openssh, how can dh-exec-install-move possibly work properly if every dh_install run will end up moving files regardless of whether it's operating on the package in question?) After applying the above fix, the build gets further, and I get to: dh_missing dh_missing: warning: dh-exec.aqR1q_B1/etc/ufw/applications.d/openssh-server exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec._KAY3sIj/etc/ufw/applications.d/openssh-server") dh_missing: warning: dh-exec.aqR1q_B1/usr/share/apport/package-hooks/openssh-server.py exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec._KAY3sIj/usr/share/apport/package-hooks/openssh-server.py") dh_missing: warning: dh-exec.aqR1q_B1/usr/share/openssh/sshd_config exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec._KAY3sIj/usr/share/openssh/sshd_config") dh_missing: warning: dh-exec.aqR1q_B1/usr/share/openssh/sshd_config.md5sum exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec._KAY3sIj/usr/share/openssh/sshd_config.md5sum") dh_missing: warning: dh-exec.eZqm_1C4/usr/share/apport/package-hooks/openssh-client.py exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec.eqEKo0TP/usr/share/apport/package-hooks/openssh-client.py") dh_missing: warning: dh-exec.slLLJC8v/usr/lib/openssh/gnome-ssh-askpass exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec.kGOu1t93/usr/lib/openssh/gnome-ssh-askpass") dh_missing: warning: etc/ssh/sshd_config exists in debian/tmp but is not installed to anywhere (related file: "debian/tmp/dh-exec._KAY3sIj/usr/share/openssh/sshd_config") dh_missing: error: missing files, aborting While detecting missing files, dh_missing noted some files with a similar name to those that were missing. This error /might/ be resolved by replacing references to the
Bug#1016340: openssh: FTBFS: Failed to copy 'etc/ssh/sshd_config': No such file or directory at /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7.
Source: openssh Version: 1:9.0p1-1 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs User: lu...@debian.org Usertags: ftbfs-20220728 ftbfs-bookworm Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > make[1]: Entering directory '/<>' > # Remove version control tags to avoid unnecessary conffile > # resolution steps for administrators. > sed -i '/\$OpenBSD:/d' \ > debian/tmp/etc/ssh/moduli \ > debian/tmp/etc/ssh/ssh_config \ > debian/tmp/etc/ssh/sshd_config > dh_install -Nopenssh-client-udeb -Nopenssh-server-udeb > dh_install -popenssh-client-udeb -popenssh-server-udeb \ > --sourcedir=debian/build-udeb > Failed to copy 'etc/ssh/sshd_config': No such file or directory at > /usr/share/dh-exec/dh-exec-install-rename line 68, <> line 7. > dh_install: error: debian/openssh-server.install (executable config) returned > exit code 127 > make[1]: *** [debian/rules:163: override_dh_install-arch] Error 25 The full build log is available from: http://qa-logs.debian.net/2022/07/28/openssh_9.0p1-1_unstable.log All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220728;users=lu...@debian.org or: https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20220728=lu...@debian.org=1=1=1=1#results A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! If you reassign this bug to another package, please marking it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.