Date: Friday, October 7, 2022 @ 12:11:09
  Author: foxboron
Revision: 457320

upgpkg: pacman 6.0.2-2: fix source paths

Added:
  pacman/trunk/fix-source-path.patch
Modified:
  pacman/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |    8 +++++++-
 fix-source-path.patch |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-10-07 12:08:15 UTC (rev 457319)
+++ PKGBUILD    2022-10-07 12:11:09 UTC (rev 457320)
@@ -3,7 +3,7 @@
 
 pkgname=pacman
 pkgver=6.0.2
-pkgrel=1
+pkgrel=2
 pkgdesc="A library-based package manager with dependency support"
 arch=('x86_64')
 url="https://www.archlinux.org/pacman/";
@@ -21,13 +21,19 @@
 validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD'  # Allan McRae 
<[email protected]>
               'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory 
(pacman) <[email protected]>
 
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.xz{,.sig}
+        fix-source-path.patch
         pacman.conf
         makepkg.conf)
 sha256sums=('7d8e3e8c5121aec0965df71f59bedf46052c6cf14f96365c4411ec3de0a4c1a5'
             'SKIP'
+            'fec94ba412510bb91386b9b433ddbe76e30027d50a44d9298965311b8dc82937'
             '606e55f06c297d2b508bc4438890b229a1abaa68b0374a2d7f94c8e7be6792d7'
             '072020e34f2c55b94a9a486829a7eadab0a830ddb4d8e759b0c4e6cf1bde73a6')
 
+prepare() {
+  cd "${pkgname}-${pkgver}"
+  patch -Np1 < "$srcdir/fix-source-path.patch"  
+}
 
 build() {
   cd "$pkgname-$pkgver"

Added: fix-source-path.patch
===================================================================
--- fix-source-path.patch                               (rev 0)
+++ fix-source-path.patch       2022-10-07 12:11:09 UTC (rev 457320)
@@ -0,0 +1,41 @@
+commit e3868984e84b87c606ee7db419d7a189a1278bc3
+Author: Morten Linderud <[email protected]>
+Date:   Thu Oct 6 12:00:51 2022 +0200
+
+    strip: fix unique source paths
+    
+    `${pkgbase}` was added to the wrong invocation. This ensures we are
+    producing correct debug packages.
+    
+    Example from the package:
+    
+        /usr/src/debug/pacman/pacman-6.0.2/src/pacman/callback.c
+        /usr/src/debug/pacman/pacman-6.0.2/src/pacman/callback.h
+        /usr/src/debug/pacman/pacman-6.0.2/src/pacman/check.c
+        /usr/src/debug/pacman/pacman-6.0.2/src/pacman/check.h
+    
+    Fixes: 776b7c1e75f2 ("debugflags: Ensure we have unique source paths")
+    Signed-off-by: Morten Linderud <[email protected]>
+
+diff --git a/scripts/libmakepkg/tidy/strip.sh.in 
b/scripts/libmakepkg/tidy/strip.sh.in
+index 91c66f13..01af6e03 100644
+--- a/scripts/libmakepkg/tidy/strip.sh.in
++++ b/scripts/libmakepkg/tidy/strip.sh.in
+@@ -47,7 +47,7 @@ source_files() {
+ 
+       LANG=C debugedit --no-recompute-build-id \
+               --base-dir "${srcdir}" \
+-              --dest-dir "${dbgsrcdir}/${pkgbase}" \
++              --dest-dir "${dbgsrcdir}" \
+               --list-file /dev/stdout "$1" \
+               | sort -zu | tr '\0' '\n'
+ }
+@@ -141,7 +141,7 @@ tidy_strip() {
+               if check_option "debug" "y"; then
+ 
+                       
dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug"
+-                      dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}"
++                      dbgsrcdir="${DBGSRCDIR:-/usr/src/debug}/${pkgbase}"
+                       dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@$dbgsrcdir"
+                       mkdir -p "$dbgdir" "$dbgsrc"
+               fi

Reply via email to