xbps: update to 0.43.
This commit is contained in:
parent
4a50d00f69
commit
452c446a43
srcpkgs
|
@ -2,8 +2,8 @@
|
|||
#
|
||||
# NOTE: keep this package synchronized with "srcpkgs/xbps".
|
||||
pkgname=xbps-static
|
||||
version=0.42
|
||||
revision=3
|
||||
version=0.43
|
||||
revision=1
|
||||
build_style=configure
|
||||
short_desc="The XBPS package system utilities - static binaries"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
From 4ee6f943ddb0d97fada7144f47780cc1d7f20f11 Mon Sep 17 00:00:00 2001
|
||||
From: Juan RP <xtraeme@gmail.com>
|
||||
Date: Tue, 23 Dec 2014 10:52:54 +0100
|
||||
Subject: [PATCH] libfetch: fix races in the cache connection code.
|
||||
|
||||
Tested by @Gottox.
|
||||
---
|
||||
NEWS | 4 +---
|
||||
lib/fetch/common.c | 9 +++++++++
|
||||
lib/plist_fetch.c | 14 +-------------
|
||||
3 files changed, 11 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/lib/fetch/common.c b/lib/fetch/common.c
|
||||
index 1ea017b..edd8e89 100644
|
||||
--- lib/fetch/common.c
|
||||
+++ lib/fetch/common.c
|
||||
@@ -66,6 +66,8 @@
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
+#include <pthread.h>
|
||||
+
|
||||
#include "fetch.h"
|
||||
#include "common.h"
|
||||
|
||||
@@ -333,6 +335,7 @@ fetch_connect(struct url *url, int af, int verbose)
|
||||
return (conn);
|
||||
}
|
||||
|
||||
+static pthread_mutex_t cache_mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
static conn_t *connection_cache;
|
||||
static int cache_global_limit = 0;
|
||||
static int cache_per_host_limit = 0;
|
||||
@@ -379,6 +382,7 @@ fetch_cache_get(const struct url *url, int af)
|
||||
{
|
||||
conn_t *conn, *last_conn = NULL;
|
||||
|
||||
+ pthread_mutex_lock(&cache_mtx);
|
||||
for (conn = connection_cache; conn; conn = conn->next_cached) {
|
||||
if (conn->cache_url->port == url->port &&
|
||||
strcmp(conn->cache_url->scheme, url->scheme) == 0 &&
|
||||
@@ -391,9 +395,12 @@ fetch_cache_get(const struct url *url, int af)
|
||||
last_conn->next_cached = conn->next_cached;
|
||||
else
|
||||
connection_cache = conn->next_cached;
|
||||
+
|
||||
+ pthread_mutex_unlock(&cache_mtx);
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
+ pthread_mutex_unlock(&cache_mtx);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -414,6 +421,7 @@ fetch_cache_put(conn_t *conn, int (*closecb)(conn_t *))
|
||||
return;
|
||||
}
|
||||
|
||||
+ pthread_mutex_lock(&cache_mtx);
|
||||
global_count = host_count = 0;
|
||||
last = NULL;
|
||||
for (iter = connection_cache; iter;
|
||||
@@ -435,6 +443,7 @@ fetch_cache_put(conn_t *conn, int (*closecb)(conn_t *))
|
||||
conn->cache_close = closecb;
|
||||
conn->next_cached = connection_cache;
|
||||
connection_cache = conn;
|
||||
+ pthread_mutex_unlock(&cache_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.2.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'xbps'
|
||||
pkgname=xbps
|
||||
version=0.42
|
||||
revision=3
|
||||
version=0.43
|
||||
revision=1
|
||||
bootstrap=yes
|
||||
build_style=configure
|
||||
short_desc="The XBPS package system utilities"
|
||||
|
@ -9,7 +9,7 @@ maintainer="Juan RP <xtraeme@gmail.com>"
|
|||
homepage="https://github.com/voidlinux/xbps"
|
||||
license="2-clause-BSD"
|
||||
distfiles="https://github.com/voidlinux/xbps/archive/${version}.tar.gz"
|
||||
checksum=22a8ae9b81ffb4727c9500c428bd5e70085b1e8605f82fa7bfa367c1cbc65fbc
|
||||
checksum=53f0e52eed657ae3ef8140a4ac18d151711e2dcbc6121619a0f68db17c7e40d2
|
||||
|
||||
makedepends="zlib-devel libressl-devel libarchive-devel>=3.1.2"
|
||||
depends="xbps-triggers>=0.75"
|
||||
|
|
Loading…
Reference in New Issue