Mark Wielaard 79f78c
commit 173e5642a97c535f8bdaac5bf88854a103cc125b
Mark Wielaard 79f78c
Author: Mark Wielaard <mark@klomp.org>
Mark Wielaard 79f78c
Date:   Mon Jun 26 13:35:48 2017 +0200
Mark Wielaard 79f78c
Mark Wielaard 79f78c
    Update find-debuginfo.sh options and macros documentation.
Mark Wielaard 79f78c
    
Mark Wielaard 79f78c
    This adds some missing documentation for rpm macros and find-debuginfo.sh
Mark Wielaard 79f78c
    options that were recently added (or renamed). -j N, --build-id-seed SEED,
Mark Wielaard 79f78c
    --unique-debug-suffix SUFFIX and --unique-debug-src-base BASE.
Mark Wielaard 79f78c
    
Mark Wielaard 79f78c
    Signed-off-by: Mark Wielaard <mark@klomp.org>
Mark Wielaard 79f78c
Mark Wielaard 79f78c
diff --git a/macros.in b/macros.in
Mark Wielaard 79f78c
index b095719..3e9b73f 100644
Mark Wielaard 79f78c
--- a/macros.in
Mark Wielaard 79f78c
+++ b/macros.in
Mark Wielaard 79f78c
@@ -522,8 +522,9 @@ package or when debugging this package.\
Mark Wielaard 79f78c
 
Mark Wielaard 79f78c
 # Whether build-ids should be made unique between package version/releases
Mark Wielaard 79f78c
 # when generating debuginfo packages. If set to 1 this will pass
Mark Wielaard 79f78c
-# --ver-rel "%{VERSION}-%{RELEASE}" to find-debuginfo.sh which will pass it
Mark Wielaard 79f78c
-# onto debugedit --build-id-seed to be used to prime the build-id note hash.
Mark Wielaard 79f78c
+# --build-id-seed "%{VERSION}-%{RELEASE}" to find-debuginfo.sh which will
Mark Wielaard 79f78c
+# pass it onto debugedit --build-id-seed to be used to prime the build-id
Mark Wielaard 79f78c
+# note hash.
Mark Wielaard 79f78c
 %_unique_build_ids	1
Mark Wielaard 79f78c
 
Mark Wielaard 79f78c
 # Do not recompute build-ids but keep whatever is in the ELF file already.
Mark Wielaard 79f78c
@@ -533,15 +534,16 @@ package or when debugging this package.\
Mark Wielaard 79f78c
 
Mark Wielaard 79f78c
 # Whether .debug files should be made unique between package version,
Mark Wielaard 79f78c
 # release and architecture. If set to 1 this will pass
Mark Wielaard 79f78c
-# --unique-debug-arch "%{_arch}" to find-debuginfo.sh to create
Mark Wielaard 79f78c
-# debuginfo files which end in -<ver>-<rel>.<arch>.debug
Mark Wielaard 79f78c
+# --unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch} find-debuginfo.sh
Mark Wielaard 79f78c
+# to create debuginfo files which end in -<ver>-<rel>.<arch>.debug
Mark Wielaard 79f78c
 # Requires _unique_build_ids.
Mark Wielaard 79f78c
 %_unique_debug_names	1
Mark Wielaard 79f78c
 
Mark Wielaard 79f78c
 # Whether the /usr/debug/src/<package> directories should be unique between
Mark Wielaard 79f78c
 # package version, release and architecture. If set to 1 this will pass
Mark Wielaard 79f78c
-# --unique-debug-src-base "%{name}" to find-debuginfo.sh to name the
Mark Wielaard 79f78c
-# directory under /usr/debug/src as <name>-<ver>-<rel>.<arch>
Mark Wielaard 79f78c
+# --unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}" to
Mark Wielaard 79f78c
+# find-debuginfo.sh to name the directory under /usr/debug/src as
Mark Wielaard 79f78c
+# <name>-<ver>-<rel>.<arch>.
Mark Wielaard 79f78c
 %_unique_debug_srcs	1
Mark Wielaard 79f78c
 
Mark Wielaard 79f78c
 # Whether rpm should put debug source files into its own subpackage
Mark Wielaard 79f78c
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
Mark Wielaard 79f78c
index 0233d92..85a862f 100755
Mark Wielaard 79f78c
--- a/scripts/find-debuginfo.sh
Mark Wielaard 79f78c
+++ b/scripts/find-debuginfo.sh
Mark Wielaard 79f78c
@@ -3,11 +3,14 @@
Mark Wielaard 79f78c
 #for inclusion in an rpm spec file.
Mark Wielaard 79f78c
 #
Mark Wielaard 79f78c
 # Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] [-m] [-i] [-n]
Mark Wielaard 79f78c
+#	 		   [-j N]
Mark Wielaard 79f78c
 #	 		   [-o debugfiles.list]
Mark Wielaard 79f78c
 #	 		   [-S debugsourcefiles.list]
Mark Wielaard 79f78c
 #			   [--run-dwz] [--dwz-low-mem-die-limit N]
Mark Wielaard 79f78c
 #			   [--dwz-max-die-limit N]
Mark Wielaard 79f78c
-#			   [--build-id-seed VERSION-RELEASE]
Mark Wielaard 79f78c
+#			   [--build-id-seed SEED]
Mark Wielaard 79f78c
+#			   [--unique-debug-suffix SUFFIX]
Mark Wielaard 79f78c
+#			   [--unique-debug-src-base BASE]
Mark Wielaard 79f78c
 #			   [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
Mark Wielaard 79f78c
 #			   [builddir]
Mark Wielaard 79f78c
 #
Mark Wielaard 79f78c
@@ -19,6 +22,9 @@
Mark Wielaard 79f78c
 # The -i flag says to include a .gdb_index section in the .debug file.
Mark Wielaard 79f78c
 # The -n flag says to not recompute the build-id.
Mark Wielaard 79f78c
 #
Mark Wielaard 79f78c
+# The -j N option will spawn N processes to do the debuginfo extraction
Mark Wielaard 79f78c
+# in parallel.
Mark Wielaard 79f78c
+#
Mark Wielaard 79f78c
 # A single -o switch before any -l or -p switches simply renames
Mark Wielaard 79f78c
 # the primary output file from debugfiles.list to something else.
Mark Wielaard 79f78c
 # A -o switch that follows a -p switch or some -l switches produces
Mark Wielaard 79f78c
@@ -31,11 +37,21 @@
Mark Wielaard 79f78c
 # if available, and --dwz-low-mem-die-limit and --dwz-max-die-limit
Mark Wielaard 79f78c
 # provide detailed limits.  See dwz(1) -l and -L option for details.
Mark Wielaard 79f78c
 #
Mark Wielaard 79f78c
-# If --build-id-seed VERSION-RELEASE is given then debugedit is called to
Mark Wielaard 79f78c
-# update the build-ids it finds adding the VERSION-RELEASE string as
Mark Wielaard 79f78c
-# seed to recalculate the build-id hash.  This makes sure the
Mark Wielaard 79f78c
-# build-ids in the ELF files are unique between versions and releases
Mark Wielaard 79f78c
-# of the same package.
Mark Wielaard 79f78c
+# If --build-id-seed SEED is given then debugedit is called to
Mark Wielaard 79f78c
+# update the build-ids it finds adding the SEED as seed to recalculate
Mark Wielaard 79f78c
+# the build-id hash.  This makes sure the build-ids in the ELF files
Mark Wielaard 79f78c
+# are unique between versions and releases of the same package.
Mark Wielaard 79f78c
+# (Use --build-id-seed "%{VERSION}-%{RELEASE}".)
Mark Wielaard 79f78c
+#
Mark Wielaard 79f78c
+# If --unique-debug-suffix SUFFIX is given then the debug files created
Mark Wielaard 79f78c
+# for <FILE> will be named <FILE>-<SUFFIX>.debug.  This makes sure .debug
Mark Wielaard 79f78c
+# are unique between package version, release and architecture.
Mark Wielaard 79f78c
+# (Use --unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}".)
Mark Wielaard 79f78c
+#
Mark Wielaard 79f78c
+# If --unique-debug-src-base BASE is given then the source directory
Mark Wielaard 79f78c
+# will be called /usr/debug/src/<BASE>.  This makes sure the debug source
Mark Wielaard 79f78c
+# directories are unique between package version, release and architecture.
Mark Wielaard 79f78c
+# (Use --unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}".)
Mark Wielaard 79f78c
 #
Mark Wielaard 79f78c
 # All file names in switches are relative to builddir (. if not given).
Mark Wielaard 79f78c
 #