Debian Bug report logs - #977416
klayout: reproducible builds: /usr/bin/klayout broken when /bin/sh points to bash

version graph

Package: src:klayout; Maintainer for src:klayout is Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>;

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

Date: Mon, 14 Dec 2020 22:30:02 UTC

Severity: normal

Tags: patch

Fixed in version klayout/0.27.11-1

Done: Carsten Schoenert <c.schoenert@t-online.de>

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, reproducible-bugs@lists.alioth.debian.org, Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>:
Bug#977416; Package src:klayout. (Mon, 14 Dec 2020 22:30:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>. (Mon, 14 Dec 2020 22:30:03 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: klayout: reproducible builds: /usr/bin/klayout broken when /bin/sh points to bash
Date: Mon, 14 Dec 2020 14:26:40 -0800
[Message part 1 (text/plain, inline)]
Source: klayout
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: shell
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

When /bin/sh points to bash, the generated /usr/bin/klayout contains the
'\n' character intended instead of the intended newline.

  https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/klayout.html

  ./usr/bin/klayout
  1 #!/bin/sh	 
  2 LD_LIBRARY_PATH=/usr/lib/klayout·exec·/usr/lib/klayout/klayout·"$@"  1 #!/bin/sh\nLD_LIBRARY_PATH=/usr/lib/klayout·exec·/usr/lib/klayout/klayout·"$@"


The attached patch fixes this by making two calls to echo when
generating /usr/bin/klayout.


This patch alone does not resolve all reproducibility issues (e.g. build
paths), but when combined with the timestamp patch just submitted,
should result in a reproducible build when it lands in bullseye, where
build paths are not varied.


Thanks for maintaining klayout!


live well,
  vagrant
[0002-debian-rules-Generate-klayout-script-consistently-re.patch (text/x-diff, inline)]
From cbf4cbff1b977a0f0e34c4054ed558fe98f8273b Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 14 Dec 2020 20:22:43 +0000
Subject: [PATCH 2/2] debian/rules: Generate klayout script consistently
 regardless of shell.

The behavior of 'echo "\n"' is different when /bin/sh points to bash
vs. dash, resulting in a broken /usr/bin/klayout script.

Call echo twice instead to ensure reproducibility regardless of which
shell is used.
---
 debian/rules | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index dc35ce0..8353543 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,7 +32,8 @@ override_dh_auto_install:
 	mkdir -p debian/klayout/usr/lib/klayout
 	CC=$(CC) CXX=$(CXX) OBJCOPY=objcopy AR=$(AR) CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" ./build.sh -qt5 -option $(EXTRA_MAKE_OPTIONS) -expert -qmake /usr/lib/$(MULTIARCH)/qt5/bin/qmake -bin $(CURDIR)/debian/klayout/usr/lib/klayout
 	mkdir -p debian/klayout/usr/bin
-	echo "#!/bin/sh\nLD_LIBRARY_PATH=/usr/lib/klayout exec /usr/lib/klayout/klayout \"\$$@\"" > debian/klayout/usr/bin/klayout
+	echo '#!/bin/sh' > debian/klayout/usr/bin/klayout
+	echo "LD_LIBRARY_PATH=/usr/lib/klayout exec /usr/lib/klayout/klayout \"\$$@\"" >> debian/klayout/usr/bin/klayout
 	chmod +x debian/klayout/usr/bin/klayout
 	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/db/__init__.py
 	chmod -x debian/klayout/usr/lib/klayout/pymod/klayout/db/pcell_declaration_helper.py
-- 
2.29.2

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

Reply sent to Carsten Schoenert <c.schoenert@t-online.de>:
You have taken responsibility. (Sat, 03 Sep 2022 15:03:11 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sat, 03 Sep 2022 15:03:11 GMT) (full text, mbox, link).


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

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 977416-close@bugs.debian.org
Subject: Bug#977416: fixed in klayout 0.27.11-1
Date: Sat, 03 Sep 2022 14:58:56 +0000
Source: klayout
Source-Version: 0.27.11-1
Done: Carsten Schoenert <c.schoenert@t-online.de>

We believe that the bug you reported is fixed in the latest version of
klayout, 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 977416@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Carsten Schoenert <c.schoenert@t-online.de> (supplier of updated klayout 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: Sat, 03 Sep 2022 12:05:18 +0200
Source: klayout
Architecture: source
Version: 0.27.11-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>
Changed-By: Carsten Schoenert <c.schoenert@t-online.de>
Closes: 977415 977416
Changes:
 klayout (0.27.11-1) unstable; urgency=medium
 .
   * Team upload
 .
   [ Carsten Schoenert ]
   * [0d74036] d/gbp.conf: Adding more default data
   * [2eb4aba] New upstream version 0.27.11
   * [bcace71] d/control: Increase debhelper to version 13
   * [8655ff8] d/control: Increase Standards-Version to 4.6.1
     No further changes needed.
   * [348c911] d/README.source: Adding basic information about source
 .
   [ Thomas Dorch ]
   * [3faff17] fixed debian/watch so it tracks klayout git releases
   * [0e78a4d] New upstream version 0.27.8
   * [356e3c7] d/copyright: Update copyright data
   * [972efd8] d/rules: Reorganize permission setting on *.py files
   * [58b24ac] d/watch: Update to version 4
   * [8b24c59] Rebuild patch queue from patch-queue branch
     Added patch:
     Set-KLAYOUT_VERSION_DATE-in-version.sh-using-value-from-S.patch
     (Closes: #977415)
   * [52264e0] fix lintian warning about ldconfig trigger
 .
   [ Vagrant Cascadian ]
   * [7cbcf66] d/rules: Generate wrapper consistently regardless of shell
     (Closes: #977416)
 .
   [ Thomas Dorch ]
Checksums-Sha1:
 216d9a8aa41a5eb62b114bd4c1a123c82cf90476 2087 klayout_0.27.11-1.dsc
 522b538ab93b69c31755296d4c64927d77f93506 57376311 klayout_0.27.11.orig.tar.gz
 316e628dda30a9b06a76cc580299748afb47e2ba 7640 klayout_0.27.11-1.debian.tar.xz
 59e9df74ce01acbe134eee1678c82338f3ae742d 13223 klayout_0.27.11-1_amd64.buildinfo
Checksums-Sha256:
 50844db0368884aeaf790e22cfa8ee595382933f291d278c11a49aeb8b5f675f 2087 klayout_0.27.11-1.dsc
 cc14c4840504c6b623548c0af1600c933791b2c76d012bda3468a3610b3ae15a 57376311 klayout_0.27.11.orig.tar.gz
 8c17116d6cb8056d898197433972e062fb5197368dfeaa1281c53b5b8c2ae0f1 7640 klayout_0.27.11-1.debian.tar.xz
 2d0e351e9907851e3507b61b4b7f78471d9c9477c7052846b5edfb659d4f84d2 13223 klayout_0.27.11-1_amd64.buildinfo
Files:
 a91b1a67bf31a843e790c01075baff1a 2087 electronics optional klayout_0.27.11-1.dsc
 430da00986aefc56391a273e82bef32e 57376311 electronics optional klayout_0.27.11.orig.tar.gz
 512e5dd93cdf14bf19caeefb3858bfe0 7640 electronics optional klayout_0.27.11-1.debian.tar.xz
 c6dbe1945492411db27d20c6c31cbbec 13223 electronics optional klayout_0.27.11-1_amd64.buildinfo

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

iQIzBAEBCgAdFiEEtw38bxNP7PwBHmKqgwFgFCUdHbAFAmMTY9IACgkQgwFgFCUd
HbCGBA//XsiO57lgjX6aiMZVS4IxbFTwc7mm6Hs2GhGG/NS/2/8FmnOfpkrde2tB
Gx27tz/ScVxXacTVQoVcC5zzs4SiIcIp0qbAsnqtMUpsQOwMp5LnXapcWIE7Yv8t
dQkcIWkHz5RHsLe2cFUTMMeJIMDMa8uU+yW21hhvHq8Olwc/i1Aduv4louGLS3h6
mAw7vrzKUL18CB5a6lt+/QXJNlz9BLAcEzcbsc7DOvn+AiDA5VL8am2Ob/RYmOG4
vnAPWsAL7/mPbXw2znITZFeIlWj5QfyspbxQID0I+thRZNts5SCUVNH6l7QBMmZY
EEYjJcLBhITnWQ3MZZECd85j+q/I6ETuUNAmii98UIkzDhWvXzZ+kjgqK3GX0or1
2Oo3rIKtdXbOYOdtNoVdJy4hdobcFBioTVAVG1f94wC1B/QPpXSCOqKK/iEkOEyp
5RI/GGmaXFSDfaYXBRjQoYwmvBZqCYiyNHfIN+rIfEKTpWScvHIJRJokUhUXssdk
Gc+R5rl73tmW0Jdidfq+cVvkDdTYP/nv1EL9ql02iulJkHsho0yFgYNzuKJLqRtb
0a7giB/mzXP7vsA1k7VFrs6GRoAgvdoeNtY4NdXnxFyeBa4gkUZOjKMi9KPp1S2B
ZMJhUdw/xT+GylKixjaCAe/yKW2S61J5EzaM48csE7ZhJYaO2G4=
=cMPL
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 20 Oct 2022 07:25:51 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 12:50:47 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.