summarylogtreecommitdiffstats
path: root/0001-aurbuild-backport-fix-for-236.patch
blob: 355a9050b8efaae90a72b082ca2a52cc9cd3ed6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 9c28c606c12b244a1034fbc7693ffe7894d86d7b Mon Sep 17 00:00:00 2001
From: Alad Wenter <alad@mailbox.org>
Date: Fri, 6 Oct 2017 23:03:14 +0200
Subject: [PATCH 1/7] aurbuild: backport fix for #236

---
 bin/aurbuild | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/aurbuild b/bin/aurbuild
index 05df8b0..4672372 100755
--- a/bin/aurbuild
+++ b/bin/aurbuild
@@ -110,6 +110,7 @@ root=$(canonicalize_path "${root-$server}")
 if [[ -w $root/ && -r $root/ ]]; then
     # File: custom.db -> custom.db.tar
     db_path=$(readlink -f "$root/$database".db)
+    files_path=$(readlink -f "$root/$database".files)
 else
     error "$argv0: $root: permission denied"
     exit 13
@@ -168,8 +169,13 @@ while read -r -u "$fd" pkg _; do
 
     # https://github.com/vodik/repose/issues/46
     if ((sign_pkg)); then
-        gpg "${gpg_args[@]}" --output "$var_tmp/${db_path##*/}".sig "$db_path"
-        mv -bv "$var_tmp/${db_path##*/}".sig -t "$root"
+        for i in "$db_path" "$files_path"; do
+            # https://github.com/AladW/aurutils/issues/236
+            i_sig=$var_tmp/${i##*/}.sig
+
+            gpg "${gpg_args[@]}" --output "$i_sig" "$i"
+            mv -bv "$i_sig" -t "$root"
+        done
     fi
 
     if ((chroot)); then
-- 
2.11.0