summarylogtreecommitdiffstats
path: root/0001-aurbuild-backport-fix-for-236.patch
blob: 73f43c84c5f0bff14ba6fb352a3a3277ae655848 (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
40
From 79b42b1252ff70ba46cb7fff077ab5afa0115568 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/3] 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.16.1