This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f277fc2e8e0fd80017e0fd4088789a09737c5c3a

commit f277fc2e8e0fd80017e0fd4088789a09737c5c3a
Author: Guillem Jover <[email protected]>
AuthorDate: Sat Aug 11 03:34:24 2018 +0200

    dpkg-gensymbols: Add new -l option
    
    This option will make it possible to stop using LD_LIBRARY_PATH when
    calling this script.
---
 debian/changelog           |  2 ++
 man/dpkg-gensymbols.man    | 11 +++++++++++
 scripts/dpkg-gensymbols.pl |  3 +++
 3 files changed, 16 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 849710fe8..90f81981d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -91,6 +91,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
     the end, instead of after each stanza.
   * Add support for dumping all dpkg-query --status and --print-avail records
     from the database when no arguments are specified. Closes: #616342
+  * Add new dpkg-gensymbols -l option to avoid having to abuse LD_LIBRARY_PATH
+    for cross-build paths.
   * Architecture support:
     - Add support for riscv64 CPU. Closes: #822914
       Thanks to Manuel A. Fernandez Montecelo <[email protected]>
diff --git a/man/dpkg-gensymbols.man b/man/dpkg-gensymbols.man
index a708b5e96..36aaf9a3a 100644
--- a/man/dpkg-gensymbols.man
+++ b/man/dpkg-gensymbols.man
@@ -436,6 +436,17 @@ the \fBFile::Glob\fP(3perl) manual page for details) in 
\fIlibrary-file\fR
 to match multiple libraries with a single argument (otherwise you need
 multiple \fB\-e\fR).
 .TP
+.BI \-l directory
+Prepend
+.I directory
+to the list of directories to search for private shared libraries
+(since dpkg 1.19.1). This option can be used multiple times.
+
+Note: Use this option instead of setting \fBLD_LIBRARY_PATH\fP,
+as that environment variable is used to control the run-time linker
+and abusing it to set the shared library paths at build-time can be
+problematic when cross-compiling for example.
+.TP
 .BI \-I filename
 Use \fIfilename\fR as reference file to generate the symbols file
 that is integrated in the package itself.
diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl
index ef0992883..afc84015d 100755
--- a/scripts/dpkg-gensymbols.pl
+++ b/scripts/dpkg-gensymbols.pl
@@ -63,6 +63,7 @@ sub usage {
 'Usage: %s [<option>...]')
     . "\n\n" . g_(
 'Options:
+  -l<library-path>         add directory to private shared library search list.
   -p<package>              generate symbols file for package.
   -P<package-build-dir>    temporary build directory instead of debian/tmp.
   -e<library>              explicitly list libraries to scan.
@@ -97,6 +98,8 @@ while (@ARGV) {
        $oppackage = ${^POSTMATCH};
        my $err = pkg_name_is_illegal($oppackage);
        error(g_("illegal package name '%s': %s"), $oppackage, $err) if $err;
+    } elsif (m/^-l(.*)$/) {
+        Dpkg::Shlibs::add_library_dir($1);
     } elsif (m/^-c(\d)?$/) {
        $compare = $1 // 1;
     } elsif (m/^-q$/) {

-- 
Dpkg.Org's dpkg

Reply via email to