xbps: update to 0.32.
This commit is contained in:
parent
db62ad2f9d
commit
79ca82bcc5
4 changed files with 2 additions and 132 deletions
|
@ -1,39 +0,0 @@
|
|||
From 306fe4968e88111a95b28289d086f67d17252844 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Wed, 5 Feb 2014 15:27:35 +0100
|
||||
Subject: [PATCH] xbps-rindex: clear file permission bits before creating our
|
||||
named semaphore.
|
||||
|
||||
Due to the file permission bits (umask(3)) the semaphore wasn't created
|
||||
with correct permissions.
|
||||
---
|
||||
NEWS | 3 +++
|
||||
bin/xbps-rindex/sem.c | 4 ++++
|
||||
2 files changed, 7 insertions(+)
|
||||
|
||||
diff --git a/bin/xbps-rindex/sem.c b/bin/xbps-rindex/sem.c
|
||||
index 8684af1..8cdfa67 100644
|
||||
--- a/bin/xbps-rindex/sem.c
|
||||
+++ b/bin/xbps-rindex/sem.c
|
||||
@@ -36,6 +36,7 @@ struct idxlock *
|
||||
index_lock(struct xbps_handle *xhp)
|
||||
{
|
||||
struct idxlock *il;
|
||||
+ mode_t myumask;
|
||||
|
||||
if ((il = malloc(sizeof(struct idxlock))) == NULL)
|
||||
return NULL;
|
||||
@@ -48,7 +49,10 @@ index_lock(struct xbps_handle *xhp)
|
||||
/*
|
||||
* Create/open the POSIX named semaphore.
|
||||
*/
|
||||
+ myumask = umask(0);
|
||||
il->sem = sem_open(il->semname, O_CREAT, 0660, 1);
|
||||
+ umask(myumask);
|
||||
+
|
||||
if (il->sem == SEM_FAILED) {
|
||||
fprintf(stderr, "%s: failed to create/open named "
|
||||
"semaphore: %s\n", _XBPS_RINDEX, strerror(errno));
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 11e04685ef61116e3e1fe0552d8abfdc4ec5b5b4 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Thu, 6 Feb 2014 11:52:36 +0100
|
||||
Subject: [PATCH] xbps-rindex: [sign] free pubkey data obj after externalizing
|
||||
index-meta.
|
||||
|
||||
Otherwise the externalization process might give unexpected results.
|
||||
---
|
||||
bin/xbps-rindex/sign.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c
|
||||
index e6178b8..1939259 100644
|
||||
--- a/bin/xbps-rindex/sign.c
|
||||
+++ b/bin/xbps-rindex/sign.c
|
||||
@@ -283,14 +283,14 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
xbps_dictionary_set_uint16(meta, "public-key-size", pubkeysize);
|
||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-by", signedby);
|
||||
xbps_dictionary_set_cstring_nocopy(meta, "signature-type", "rsa");
|
||||
- xbps_object_release(data);
|
||||
- data = NULL;
|
||||
-
|
||||
if (!repodata_flush(xhp, repodir, repo->idx, repo->idxfiles, meta)) {
|
||||
fprintf(stderr, "failed to write repodata: %s\n", strerror(errno));
|
||||
- RSA_free(rsa);
|
||||
- return -1;
|
||||
+ rv = -1;
|
||||
+ goto out;
|
||||
}
|
||||
+ xbps_object_release(data);
|
||||
+ data = NULL;
|
||||
+
|
||||
printf("Signed repository (%u package%s)\n",
|
||||
xbps_dictionary_count(repo->idx),
|
||||
xbps_dictionary_count(repo->idx) == 1 ? "" : "s");
|
||||
@@ -298,6 +298,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
out:
|
||||
index_unlock(il);
|
||||
|
||||
+ if (data)
|
||||
+ xbps_object_release(data);
|
||||
if (rsa) {
|
||||
RSA_free(rsa);
|
||||
rsa = NULL;
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From cbe05bd0f4a07c0fcd451c1dc2485bd35b7fb445 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Thu, 6 Feb 2014 12:26:17 +0100
|
||||
Subject: [PATCH] xbps-rindex: [sign] pubkey buffer must be kept until
|
||||
index-meta is externalized too.
|
||||
|
||||
---
|
||||
bin/xbps-rindex/sign.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bin/xbps-rindex/sign.c b/bin/xbps-rindex/sign.c
|
||||
index 1939259..795ab15 100644
|
||||
--- a/bin/xbps-rindex/sign.c
|
||||
+++ b/bin/xbps-rindex/sign.c
|
||||
@@ -128,7 +128,7 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
unsigned int siglen;
|
||||
uint16_t rpubkeysize, pubkeysize;
|
||||
const char *arch, *pkgver, *rsignedby = NULL;
|
||||
- char *binpkg, *binpkg_sig, *buf, *defprivkey;
|
||||
+ char *binpkg, *binpkg_sig, *buf = NULL, *defprivkey;
|
||||
int binpkg_fd, binpkg_sig_fd, rv = 0;
|
||||
bool flush = false;
|
||||
|
||||
@@ -265,7 +265,6 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
if (!xbps_data_equals(rpubkey, data))
|
||||
flush = true;
|
||||
|
||||
- free(buf);
|
||||
|
||||
pubkeysize = RSA_size(rsa) * 8;
|
||||
xbps_dictionary_get_uint16(repo->idxmeta, "public-key-size", &rpubkeysize);
|
||||
@@ -298,6 +297,8 @@ sign_repo(struct xbps_handle *xhp, const char *repodir,
|
||||
out:
|
||||
index_unlock(il);
|
||||
|
||||
+ if (buf)
|
||||
+ free(buf);
|
||||
if (data)
|
||||
xbps_object_release(data);
|
||||
if (rsa) {
|
||||
--
|
||||
1.8.5.3
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.31
|
||||
revision=4
|
||||
patch_args="-Np1"
|
||||
version=0.32
|
||||
revision=1
|
||||
bootstrap=yes
|
||||
conf_files="/etc/xbps/xbps.conf"
|
||||
replaces="xbps>=0"
|
||||
|
|
Loading…
Reference in a new issue