Forwarding to the list.

(I did proofread the bug report before sending it, but missed adding the
X-Debbugs-Cc header because the "master copy" I was diffing against —
the copy of #823123 in my inbox — didn't have that header, even though
it did get X-Debbugs-Cc'd to this list.)

----- Forwarded message from Daniel Shahaf <> -----

Date: Sun, 01 May 2016 19:51:37 +0000
From: Daniel Shahaf <>
To: Debian Bug Tracking System <>
Subject: Bug#823174: ros-pluginlib: debian/rules uses non-portable shell 
syntax; please make the build reproducible (shell)
Message-ID: <20160501195137.21143.31130.reportbug@fujitsu.shahaf.local2>
X-Mailer: reportbug 6.6.3

Source: ros-pluginlib
Version: 1.10.1-3
Severity: minor
Tags: patch
Usertags: environment

Dear Maintainer,

While working on the “reproducible builds” effort, we have noticed that
ros-pluginlib could not be built reproducibly; the diff between two
builds is:
    │   │   │   │ 
    │   │   │   │ 

This difference is down to debian/rules calling echo(1) with an argument
that contains a literal backslash.  The behaviour of echo(1) in that
case is (according to POSIX) implementation-defined.  Since debian/rules
uses echo(1) from the building user's shell, the build output differs
when the building user uses SHELL=bash v. SHELL=dash:

    % s=\'foo\\\\bar\'; LC_ALL=C dash -c "echo $s" 
    % s=\'foo\\\\bar\'; LC_ALL=C bash -c "echo $s" 

The following patch removes the use of implementation-defined behaviour:

diff --git a/debian/rules b/debian/rules
index 9e5b691..c867402 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ override_dh_auto_test:
-       echo 
 >> build/catkin_generated/installspace/pluginlibConfig.cmake
+       printf 'add_definitions(-DCMAKE_LIBRARY_ARCHITECTURE=\\"%s\\")' 
        dh_auto_install --destdir=debian/tmp

This patch should also make the build reproducible, but I didn't test that.

Note that when built under bash, pluginlibConfig.cmake would contain
additional backslashes; I'm not sure what their effect would be.



----- End forwarded message -----

Reproducible-builds mailing list

Reply via email to