xbps: merge patch from git to fix a xbps-rindex(8) --sign issue.
This commit is contained in:
parent
711108f92c
commit
00856e2304
2 changed files with 36 additions and 1 deletions
|
@ -0,0 +1,35 @@
|
|||
From e86f9def03b4330363ac0604e660ff4f0a980a39 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Sat, 30 Nov 2013 08:04:37 +0100
|
||||
Subject: [PATCH] xbps-rindex: fix #25 (--sign unnecessarily regenerates
|
||||
<arch>-repodata).
|
||||
|
||||
---
|
||||
NEWS | 2 ++
|
||||
bin/xbps-rindex/sign.c | 9 +++++++++
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c
|
||||
index 1f791e1..510b326 100644
|
||||
--- bin/xbps-rindex/sign.c
|
||||
+++ bin/xbps-rindex/sign.c
|
||||
@@ -188,7 +188,16 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
meta = xbps_dictionary_create();
|
||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-by", signedby);
|
||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-type", "rsa");
|
||||
+ /*
|
||||
+ * If the signature in repo has not changed do not generate the
|
||||
+ * repodata file again.
|
||||
+ */
|
||||
data = xbps_data_create_data_nocopy(sig, siglen);
|
||||
+ if (xbps_data_equals_data(data, sig, siglen)) {
|
||||
+ fprintf(stderr, "Not signing again, matched signature found.\n");
|
||||
+ rv = 0;
|
||||
+ goto out;
|
||||
+ }
|
||||
xbps_dictionary_set(meta, "signature", data);
|
||||
|
||||
buf = pubkey_from_privkey(rsa);
|
||||
--
|
||||
1.8.4.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.27
|
||||
revision=2
|
||||
revision=3
|
||||
bootstrap=yes
|
||||
build_style=configure
|
||||
configure_args="--prefix=/usr --sysconfdir=/etc --enable-static --enable-debug"
|
||||
|
|
Loading…
Reference in a new issue