Debian Bug report logs - #1004939
debhelper: Drop -DCMAKE_SKIP_RPATH=on in compat v14

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper@packages.debian.org>; Source for debhelper is src:debhelper (PTS, buildd, popcon).

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Thu, 3 Feb 2022 23:36:01 UTC

Severity: normal

Found in version debhelper/13.6

Fixed in version debhelper/13.7

Done: Niels Thykier <niels@thykier.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, vagrant@reproducible-builds.org, reproducible-bugs@lists.alioth.debian.org, Debhelper Maintainers <debhelper@packages.debian.org>:
Bug#1004939; Package debhelper. (Thu, 03 Feb 2022 23:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to vagrant@reproducible-builds.org, reproducible-bugs@lists.alioth.debian.org, Debhelper Maintainers <debhelper@packages.debian.org>. (Thu, 03 Feb 2022 23:36:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: debhelper: Drop -DCMAKE_SKIP_RPATH=on in compat v14
Date: Thu, 03 Feb 2022 15:32:59 -0800
[Message part 1 (text/plain, inline)]
Package: debhelper
Version: 13.6
Severity: normal
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath toolchain
X-Debbugs-Cc: Vagrant Cascadian <vagrant@reproducible-builds.org>, reproducible-bugs@lists.alioth.debian.org

The debhelper compat level v14 is still experimental, and I think it
might be worth dropping -DCMAKE_SKIP_RPATH=on, as there are cases where
it actually can trigger build failures, while
-DCMAKE_BUILD_PATH_USE_ORIGIN=ON can provide all of the reproducibility
benefits, with less liklihood to trigger build failures.

From the debhelper manpage:

  The cmake buildsystem now passes -DCMAKE_SKIP_RPATH=ON and
  -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON to cmake(1) to avoid some
  reproducibility issues.

  This can cause issues with running binaries directly from the build
  directories as they might now require a manually set LD_LIBRARY_PATH.
  If you need to override this change, we recommend that you try to pass
  the -DCMAKE_SKIP_RPATH=OFF option first to see if that fixes the
  problem (leaving CMAKE_BUILD_RPATH_USE_ORIGIN at its new default).
  This should undo the need for LD_LIBRARY_PATH and avoid the
  reproducibility issues on Linux, where $ORIGIN is supported by the
  runtime linkers.

If -DCMAKE_SKIP_RPATH=ON was not included in the first place, this
latter section could be dropped and it would be easier for affected
package maintainers to adopt debhelper v14 (e.g. not having to
explicitly override the default with -DCMAKE_SKIP_RPATH=OFF) while still
gaining the reproducibility benefits.

I am not aware of cases where having -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON
but not -DCMAKE_SKIP_RPATH=ON triggers reproducibility issues.

Are there issues with embedding relative RPATHs as
-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON does, or other strong reasons to
exclude RPATH entirely by default?


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper@packages.debian.org>:
Bug#1004939; Package debhelper. (Wed, 16 Feb 2022 13:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Andrea Pappacoda <andrea@pappacoda.it>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper@packages.debian.org>. (Wed, 16 Feb 2022 13:33:03 GMT) (full text, mbox, link).


Message #10 received at 1004939@bugs.debian.org (full text, mbox, reply):

From: Andrea Pappacoda <andrea@pappacoda.it>
To: 1004939@bugs.debian.org
Subject: re: debhelper: Drop -DCMAKE_SKIP_RPATH=on in compat v14
Date: Wed, 16 Feb 2022 14:22:33 +0100
Hi, I think that CMAKE_SKIP_RPATH a bit extreme too. Also, setting both 
options doesn't make much sense, as CMAKE_SKIP_RPATH completely avoids 
setting the rpath, so CMAKE_BUILD_RPATH_USE_ORIGIN does nothing :/

If you really want to avoid having an rpath in the installed package 
you could set the CMAKE_SKIP_INSTALL_RPATH option, that strips the 
rpath on install (it may be enabled by default, I'm not sure) but keeps 
it in the build tree so that you can run tests without having to mess 
with env vars.

But if what you are trying to solve is a reproducibility issue then 
CMAKE_BUILD_RPATH_USE_ORIGIN should be enough, and shouldn't even break 
existing workflows.

-- 
OpenPGP key: 66DE F152 8299 0C21 99EF  A801 A8A1 28A8 AB1C EE49





Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper@packages.debian.org>:
Bug#1004939; Package debhelper. (Sat, 05 Mar 2022 23:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper@packages.debian.org>. (Sat, 05 Mar 2022 23:33:03 GMT) (full text, mbox, link).


Message #15 received at 1004939@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: Andrea Pappacoda <andrea@pappacoda.it>, 1004939@bugs.debian.org
Subject: re: debhelper: Drop -DCMAKE_SKIP_RPATH=on in compat v14
Date: Sat, 05 Mar 2022 15:30:10 -0800
[Message part 1 (text/plain, inline)]
On 2022-02-16, Andrea Pappacoda wrote:
> Hi, I think that CMAKE_SKIP_RPATH a bit extreme too. Also, setting both 
> options doesn't make much sense, as CMAKE_SKIP_RPATH completely avoids 
> setting the rpath, so CMAKE_BUILD_RPATH_USE_ORIGIN does nothing :/

Well, it makes it "easy" to fallback to CMAKE_BUILD_RPATH_USE_ORIGIN,
but I think in this case that CMAKE_BUILD_RPATH_USE_ORIGIN should be the
default...


> If you really want to avoid having an rpath in the installed package 
> you could set the CMAKE_SKIP_INSTALL_RPATH option, that strips the 
> rpath on install (it may be enabled by default, I'm not sure) but keeps 
> it in the build tree so that you can run tests without having to mess 
> with env vars.

Using CMAKE_SKIP_INSTALL_RPATH still results in a different BuildId
embedded in the binary when built under a different build path. Even
though the build path is eventually removed, the BuildId is calculated
before it is removed...


> But if what you are trying to solve is a reproducibility issue then
> CMAKE_BUILD_RPATH_USE_ORIGIN should be enough, and shouldn't even
> break existing workflows.

That's been my experience so far, I've confirmed this with buidl testing
for many of the ~160 packages documented at:

  https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper@packages.debian.org>:
Bug#1004939; Package debhelper. (Mon, 14 Mar 2022 15:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper@packages.debian.org>. (Mon, 14 Mar 2022 15:18:02 GMT) (full text, mbox, link).


Message #20 received at 1004939@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 1004939@bugs.debian.org
Subject: re: debhelper: Drop -DCMAKE_SKIP_RPATH=on in compat v14
Date: Mon, 14 Mar 2022 08:15:44 -0700
[Message part 1 (text/plain, inline)]
On 2022-03-05, Vagrant Cascadian wrote:
> On 2022-02-16, Andrea Pappacoda wrote:
>> But if what you are trying to solve is a reproducibility issue then
>> CMAKE_BUILD_RPATH_USE_ORIGIN should be enough, and shouldn't even
>> break existing workflows.
>
> That's been my experience so far, I've confirmed this with buidl testing
> for many of the ~160 packages documented at:
>
>   https://tests.reproducible-builds.org/debian/issues/unstable/cmake_rpath_contains_build_path_issue.html

And now well over 360 packages!

So far, I think I can count the number of packages on one hand which
FTBFS with -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON, while
-DCMAKE_SKIP_RPATH=ON seemed to have a few hundred, if I remember
correctly.

By my understanding in both cases, the actual RPATH is removed from the
binary, so it only affects the Build ID... I'm not sure what the
advantage of -DCMAKE_SKIP_RPATH=ON is, other than backwards
compatibility with older versions of cmake?


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Reply sent to Niels Thykier <niels@thykier.net>:
You have taken responsibility. (Sun, 17 Apr 2022 09:51:05 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sun, 17 Apr 2022 09:51:05 GMT) (full text, mbox, link).


Message #25 received at 1004939-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1004939-close@bugs.debian.org
Subject: Bug#1004939: fixed in debhelper 13.7
Date: Sun, 17 Apr 2022 09:48:50 +0000
Source: debhelper
Source-Version: 13.7
Done: Niels Thykier <niels@thykier.net>

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1004939@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <niels@thykier.net> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 17 Apr 2022 09:42:46 +0000
Source: debhelper
Architecture: source
Version: 13.7
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <debhelper@packages.debian.org>
Changed-By: Niels Thykier <niels@thykier.net>
Closes: 994204 1002800 1004939
Changes:
 debhelper (13.7) unstable; urgency=medium
 .
   [ Niels Thykier ]
   * dh_installalternatives: Improve validation of alternative files to
     catch some "obvious" copy-waste mistakes.
   * dh: Invoke dh_installalternatives after dh_link in compat 14 or
     later. Thanks to Colin Watson for the suggestion.
     (Closes: #1002800)
   * cmake.pm: Drop -DCMAKE_SKIP_RPATH=on in compat v14.  Thanks to
     Vagrant Cascadian for the suggestion and the investigative work on
     this topic.  (Closes: #1004939)
   * debhelper-compat-upgrade-checklist.pod: New file.
   * debhelper.pod: Move list of supported compat levels and the related
     upgrade checklist into debhelper-compat-upgrade-checklist.pod.
     This means you now need `man 7 debhelper-compat-upgrade-checklist`
     to see the upgrade checklist.
   * dh_installdebconf: Support -D/--define command line parameters
     (mirroring those from dh_installdeb).
   * Dh_Lib.pm: Cope with "?=" as assignment operator in substvars files
     to be future proof with (possible) planned addition of "optional
     substvars.  At the moment, debhelper will still always use "=" when
     adding a substvar but it will now preserve "?=" operator if an
     existing substvar is modified.
 .
   [ Guillem Jover ]
   * autoconf.pm: Add support for autotest test suites by passing the
     TESTSUITEFLAGS environment variable to `make test`.
 .
   [ Dave Jones ]
   * Rewrite handling of stop services to use the `preinst` when using
     --no-restart-after-upgrade.  This fixes a regression caused by
     the fix for #989155.  (Closes: #994204)
 .
   [ Johannes Schauer Marin Rodrigues ]
   * dh_installmenu: Respect DPKG_ROOT when checking for update-menus.
     Note this implementation assumes update-menus is present both
     inside and outside the chroot to activate.  If it is absent on
     either side, the update-menus call is skipped.
 .
   [ Gioele Barabucci ]
   * dh_installsysusers: Invoke systemd-sysusers even when DPKG_ROOT
     is set (relying on `--root`).
   * dh_installpam: In compat 14, install pam snippets into
     `/usr/lib/pam.d` instead of `/etc/pam.d`.  Remember to remove
     (now) obsolete conffiles when you bump to compat 14.
 .
   [ Andreas Hübner ]
   * debhelper.pod: Correct spelling of DEB_BUILD_MAINT_OPTIONS.
Checksums-Sha1:
 4b056295e349b904ab53e20bccb0942a4da8114f 1781 debhelper_13.7.dsc
 5ada71660423bd027535a8f1fa5491fe8c432e54 570648 debhelper_13.7.tar.xz
 c99dd52162c862013c803eb51de8279920645205 5109 debhelper_13.7_source.buildinfo
Checksums-Sha256:
 addaef09b019eff48fda58ae0068236a7bf23658954eca0c9aa47e1847f386fa 1781 debhelper_13.7.dsc
 552e91ff96e1bd844d549496cb1712b32ae9c5f39e17da8b1c779bd718e4dc49 570648 debhelper_13.7.tar.xz
 4058efc2b7ee56fd7038e1f9be1de708c480c328fa9125df4601cfd85330666c 5109 debhelper_13.7_source.buildinfo
Files:
 a1b9c2d33c6661b6d76ae32d15b12f73 1781 devel optional debhelper_13.7.dsc
 04087c766181d84e011717c0a1ddc22a 570648 devel optional debhelper_13.7.tar.xz
 672e0c980e9a95ade3d78d14ba349a13 5109 devel optional debhelper_13.7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEE8f9dDX4ALfD+VfsMplt42+Z8eqwFAmJb4V8SHG5pZWxzQHRo
eWtpZXIubmV0AAoJEKZbeNvmfHqs6lkQANodDElgvIIMY2MT5/vyZ3UXfbvEemj/
u9VgFdtd0GSHxhEBnN38M/9SBR0+4B6wPugcQkvAXIh1I19ULh+q6gpznGOMCsZX
+Zx/pi/brQI5D09uSyKqaYTVj5N0IS3Z/eHYQ03BgdK14bT9QFwmHs8P5wYS43k/
o97GHmJ/XiVTSHeNDbkS20TjefDNLAFbBmNM+XVZz0MfJx2UUNut3NwvfCVZhGCM
E11KrkHzRyt8WIVy8Ox9WRkga/vJbZ2HmqmYrBkH6eTN4TtZ7KaH2y5LXkk5HVSe
e1LlmMNzKji2PBYR3DbELV/EQrXtch2RDtcI/JAMGbre4Q54hcgzwmjtA11yXblb
y6BXCpgs2SRB9rUF9gPJw95+pa6w8yUtg84mY9ncS5zuNyySZvKKetnCgo9PVZFZ
G3R95JlkQz8O1z5cweCHXKksDGJbbO8nrtVhYBrPfafvKDrP2KX8ANvw/0yL4Pyd
uvnKAHXfs8v2tDOhBKDg7+CXBmBKpilMMPzg6lL1Obljxpt70yJ+UgxIcKW/vMrI
+rZpLYGruDKUBB7N5JhJjzRN4W3U0j8HNL8UDa/UXJydFuiPeUQGtddcc2SDD0BE
WZXNsrcJ7QO1CYNPAWuEDKIisPm8TmnMQy0gAEtuW7vzlkDv3Ajp9pStltRrvfQr
4nBCyCUF8mdm
=jNFp
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 18 May 2022 07:28:29 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 09:53:17 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.