Skip to content

Commit

Permalink
Merge pull request #1417 from vpodzime/master-deps-2024-05-13_11_32_4…
Browse files Browse the repository at this point in the history
…2_581739

Dependency updates
  • Loading branch information
vpodzime authored May 28, 2024
2 parents 0bf319b + 1246b78 commit c657fa4
Show file tree
Hide file tree
Showing 55 changed files with 671 additions and 106 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,35 +128,35 @@ File `install-dependencies` and the relevant subdirectories in `deps-packaging`
| CFEngine version | 3.18.x | 3.21.x | master | Notes |
| -------------------------------------------------------------------------------- | ------ | ------ | ------ | ------------------------ |
| [diffutils](https://ftpmirror.gnu.org/diffutils/) | 3.10 | 3.10 | 3.10 | |
| [libacl](http://download.savannah.gnu.org/releases/acl/) | 2.3.1 | 2.3.1 | 2.3.1 | |
| [libattr](http://download.savannah.gnu.org/releases/attr/) | 2.5.1 | 2.5.1 | 2.5.1 | |
| [libcurl](http://curl.haxx.se/download.html) | 8.5.0 | 8.5.0 | 8.1.2 | |
| [libacl](http://download.savannah.gnu.org/releases/acl/) | 2.3.2 | 2.3.2 | 2.3.2 | |
| [libattr](http://download.savannah.gnu.org/releases/attr/) | 2.5.2 | 2.5.2 | 2.5.2 | |
| [libcurl](http://curl.haxx.se/download.html) | 8.7.1 | 8.7.1 | 8.7.1 | |
| [libgnurx](http://www.gnu.org/software/rx/rx.html) | 2.5.1 | 2.5.1 | 2.5.1 | Windows Enterprise agent |
| [libiconv](http://ftp.gnu.org/gnu/libiconv/) | 1.17 | 1.17 | 1.17 | Needed by libxml2 |
| [libxml2](http://xmlsoft.org/sources/) | 2.12.3 | 2.12.3 | 2.11.4 | |
| [libxml2](http://xmlsoft.org/sources/) | 2.12.6 | 2.12.6 | 2.12.6 | |
| [libyaml](http://pyyaml.org/wiki/LibYAML) | 0.2.5 | 0.2.5 | 0.2.5 | |
| [LMDB](https://github.com/LMDB/lmdb/) | 0.9.31 | 0.9.31 | 0.9.30 | |
| [OpenLDAP](http://www.openldap.org/software/download/OpenLDAP/openldap-release/) | 2.6.6 | 2.6.6 | 2.6.4 | Enterprise agent only |
| [OpenSSL](http://openssl.org/) | 1.1.1w | 3.0.12 | 3.1.1 | |
| [LMDB](https://github.com/LMDB/lmdb/) | 0.9.32 | 0.9.32 | 0.9.32 | |
| [OpenLDAP](http://www.openldap.org/software/download/OpenLDAP/openldap-release/) | 2.6.7 | 2.6.7 | 2.6.7 | Enterprise agent only |
| [OpenSSL](http://openssl.org/) | 1.1.1w | 3.0.13 | 3.3.0 | |
| [PCRE](http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/) | 8.45 | 8.45 | - | |
| [PCRE2](https://github.com/PCRE2Project/pcre2/releases/) | - | - | 10.42 | |
| [PCRE2](https://github.com/PCRE2Project/pcre2/releases/) | - | - | 10.43 | |
| [pthreads-w32](ftp://sourceware.org/pub/pthreads-win32/) | 2-9-1 | 2-9-1 | 2-9-1 | Windows Enterprise agent |
| [SASL2](https://cyrusimap.org/mediawiki/index.php/Downloads) | 2.1.28 | 2.1.28 | 2.1.28 | Solaris Enterprise agent |
| [zlib](http://www.zlib.net/) | 1.3 | 1.3 | 1.2.13 | |
| [zlib](http://www.zlib.net/) | 1.3.1 | 1.3.1 | 1.3.1 | |
| libgcc | | | | AIX and Solaris only |

### Enterprise Hub dependencies:

| CFEngine version | 3.18.x | 3.21.x | master |
| --------------------------------------------------- | ------ | ------ | ------ |
| [Apache](http://httpd.apache.org/) | 2.4.58 | 2.4.58 | 2.4.57 |
| [Apache](http://httpd.apache.org/) | 2.4.59 | 2.4.59 | 2.4.59 |
| [APR](https://apr.apache.org/) | 1.7.4 | 1.7.4 | 1.7.4 |
| [apr-util](https://apr.apache.org/) | 1.6.3 | 1.6.3 | 1.6.3 |
| [Git](https://www.kernel.org/pub/software/scm/git/) | 2.43.0 | 2.43.0 | 2.41.0 |
| [Git](https://www.kernel.org/pub/software/scm/git/) | 2.45.1 | 2.45.1 | 2.45.1 |
| [libexpat](https://libexpat.github.io/) | - | - | 2.5.0 |
| [PHP](http://php.net/) | 8.0.30 | 8.2.13 | 8.2.7 |
| [PostgreSQL](http://www.postgresql.org/) | 13.13 | 15.5 | 15.3 |
| [rsync](https://download.samba.org/pub/rsync/) | 3.2.7 | 3.2.7 | 3.2.7 |
| [PHP](http://php.net/) | 8.0.30 | 8.2.19 | 8.3.7 |
| [PostgreSQL](http://www.postgresql.org/) | 13.14 | 15.6 | 16.3 |
| [rsync](https://download.samba.org/pub/rsync/) | 3.3.0 | 3.3.0 | 3.3.0 |

* [MinGW-w64](http://sourceforge.net/projects/mingw-w64/) **OUTDATED** needed
for [redmine#2932](https://dev.cfengine.com/issues/2932)
Expand Down
1 change: 0 additions & 1 deletion build-scripts/labels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ PACKAGES_HUB_x86_64_linux_redhat_7
PACKAGES_HUB_x86_64_linux_redhat_8
PACKAGES_HUB_x86_64_linux_redhat_9

PACKAGES_HUB_x86_64_linux_ubuntu_16
PACKAGES_HUB_x86_64_linux_ubuntu_18
PACKAGES_HUB_x86_64_linux_ubuntu_20
PACKAGES_HUB_x86_64_linux_ubuntu_22
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/apache/cfbuild-apache.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define apache_version 2.4.58
%define apache_version 2.4.59
%global __os_install_post %{nil}

Summary: CFEngine Build Automation -- apache
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/apache/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
503a7da4a4a27fd496037998b17078dc9fe004db32c657c96cce8356b8aa2eb6 httpd-2.4.58.tar.gz
e4ec4ce12c6c8f5a794dc2263d126cb1d6ef667f034c4678ec945d61286e8b0f httpd-2.4.59.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/git/cfbuild-git.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define git_version 2.42.1
%define git_version 2.45.1

Summary: CFEngine Build Automation -- git
Name: cfbuild-git
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/git/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
839d75c91ddfa9f7534f7b0888e462e3ad1422bb8ef12ec35f6261cea18efe33 git-2.42.1.tar.gz
10acb581993061e616be9c5674469335922025a666318e0748cb8306079fef24 git-2.45.1.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/libacl/cfbuild-libacl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define acl_version 2.3.1
%define acl_version 2.3.2

Summary: CFEngine Build Automation -- libacl
Name: cfbuild-libacl
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/libacl/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af acl-2.3.1.tar.gz
5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c acl-2.3.2.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/libattr/cfbuild-libattr.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define attr_version 2.5.1
%define attr_version 2.5.2

Summary: CFEngine Build Automation -- libattr
Name: cfbuild-libattr
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/libattr/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8 attr-2.5.1.tar.gz
39bf67452fa41d0948c2197601053f48b3d78a029389734332a6309a680c6c87 attr-2.5.2.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/libcurl-hub/cfbuild-libcurl-hub.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define curl_version 8.4.0
%define curl_version 8.7.1

Summary: CFEngine Build Automation -- libcurl
Name: cfbuild-libcurl-hub
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/libcurl-hub/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 curl-8.4.0.tar.gz
f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495 curl-8.7.1.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/libcurl/cfbuild-libcurl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define curl_version 8.4.0
%define curl_version 8.7.1

Summary: CFEngine Build Automation -- libcurl
Name: cfbuild-libcurl
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/libcurl/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
816e41809c043ff285e8c0f06a75a1fa250211bbfb2dc0a037eeef39f1a9e427 curl-8.4.0.tar.gz
f91249c87f68ea00cf27c44fdfa5a78423e41e71b7d408e5901a9896d905c495 curl-8.7.1.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/libxml2/cfbuild-libxml2.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define libxml_version 2.11.5
%define libxml_version 2.12.6

Summary: CFEngine Build Automation -- libxml2
Name: cfbuild-libxml2
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/libxml2/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3727b078c360ec69fa869de14bd6f75d7ee8d36987b071e6928d4720a28df3a6 libxml2-2.11.5.tar.xz
889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb libxml2-2.12.6.tar.xz
2 changes: 1 addition & 1 deletion deps-packaging/libxml2/source
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://download.gnome.org/sources/libxml2/2.11/
https://download.gnome.org/sources/libxml2/2.12/
3 changes: 2 additions & 1 deletion deps-packaging/lmdb/0003-Autoconf-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deleted file mode 100644
index f254511..0000000
--- a/libraries/liblmdb/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
@@ -1,118 +0,0 @@
-# Makefile for liblmdb (Lightning memory-mapped database library).
-
-########################################################################
Expand Down Expand Up @@ -99,6 +99,7 @@ index f254511..0000000
-mtest4: mtest4.o liblmdb.a
-mtest5: mtest5.o liblmdb.a
-mtest6: mtest6.o liblmdb.a
-mplay: mplay.o liblmdb.a
-
-mdb.o: mdb.c lmdb.h midl.h
- $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/lmdb/cfbuild-lmdb.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define lmdb_version 0.9.31
%define lmdb_version 0.9.32

Summary: CFEngine Build Automation -- lmdb
Name: cfbuild-lmdb
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/lmdb/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f7aecdd1bcc69fb32bb33d8544cfe50f8e9e916f366d598a268e1f43ee9c7603 openldap-LMDB_0.9.31.tar.gz
c0937223bba3c37c896809883a3c9b43049354578b239d6ed2476236a87f40c9 openldap-LMDB_0.9.32.tar.gz
2 changes: 1 addition & 1 deletion deps-packaging/lmdb/source
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.31/
https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.32/
2 changes: 1 addition & 1 deletion deps-packaging/openldap/cfbuild-openldap-aix.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define openldap_version 2.6.6
%define openldap_version 2.6.7

Summary: CFEngine Build Automation -- openldap
Name: cfbuild-openldap
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/openldap/cfbuild-openldap.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define openldap_version 2.6.6
%define openldap_version 2.6.7

Summary: CFEngine Build Automation -- openldap
Name: cfbuild-openldap
Expand Down
2 changes: 1 addition & 1 deletion deps-packaging/openldap/distfiles
Original file line number Diff line number Diff line change
@@ -1 +1 @@
082e998cf542984d43634442dbe11da860759e510907152ea579bdc42fe39ea0 openldap-2.6.6.tgz
cd775f625c944ed78a3da18a03b03b08eea73c8aabc97b41bb336e9a10954930 openldap-2.6.7.tgz

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
From 03111c77b640febbfaefc9ab6519e85f8b595100 Mon Sep 17 00:00:00 2001
From: Vratislav Podzimek <[email protected]>
Date: Tue, 14 May 2024 13:23:40 +0200
Subject: [PATCH] Avoid using Interlocked*64() Windows functions if not
available

InterlockedAnd64() and others are not available on VS2010
x86. There are already implementations of replacements for other
functions, such as InterlockedOr64(). Apply the same approach to
fix the errors.

Inspired by openssl/openssl#24326.
---
crypto/threads_win.c | 81 ++++++++++++++++++++++++++++++++++++++------
1 file changed, 71 insertions(+), 10 deletions(-)

diff --git a/crypto/threads_win.c b/crypto/threads_win.c
index 8428869963..36d38aa919 100644
--- a/crypto/threads_win.c
+++ b/crypto/threads_win.c
@@ -23,7 +23,7 @@
* only VC++ 2008 or earlier x86 compilers.
*/

-#if (defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER <= 1600)
+#if defined(_M_IX86)
# define NO_INTERLOCKEDOR64
#endif

@@ -104,8 +104,15 @@ struct rcu_lock_st {
CRYPTO_CONDVAR *alloc_signal;
CRYPTO_MUTEX *prior_lock;
CRYPTO_CONDVAR *prior_signal;
+ CRYPTO_RWLOCK *rw_lock;
};

+static int CRYPTO_atomic_add64(uint64_t *val, uint64_t op, uint64_t *ret,
+ CRYPTO_RWLOCK *lock);
+
+static int CRYPTO_atomic_and(uint64_t *val, uint64_t op, uint64_t *ret,
+ CRYPTO_RWLOCK *lock);
+
/*
* Called on thread exit to free the pthread key
* associated with this thread, if any
@@ -154,6 +161,7 @@ CRYPTO_RCU_LOCK *ossl_rcu_lock_new(int num_writers)
return NULL;

new->write_lock = ossl_crypto_mutex_new();
+ new->rw_lock = CRYPTO_THREAD_lock_new();
new->alloc_signal = ossl_crypto_condvar_new();
new->prior_signal = ossl_crypto_condvar_new();
new->alloc_lock = ossl_crypto_mutex_new();
@@ -165,13 +173,15 @@ CRYPTO_RCU_LOCK *ossl_rcu_lock_new(int num_writers)
|| new->prior_signal == NULL
|| new->write_lock == NULL
|| new->alloc_lock == NULL
- || new->prior_lock == NULL) {
+ || new->prior_lock == NULL
+ || new->rw_lock == NULL) {
OPENSSL_free(new->qp_group);
ossl_crypto_condvar_free(&new->alloc_signal);
ossl_crypto_condvar_free(&new->prior_signal);
ossl_crypto_mutex_free(&new->alloc_lock);
ossl_crypto_mutex_free(&new->prior_lock);
ossl_crypto_mutex_free(&new->write_lock);
+ CRYPTO_THREAD_lock_free(new->rw_lock);
OPENSSL_free(new);
new = NULL;
}
@@ -187,20 +197,27 @@ void ossl_rcu_lock_free(CRYPTO_RCU_LOCK *lock)
ossl_crypto_mutex_free(&lock->alloc_lock);
ossl_crypto_mutex_free(&lock->prior_lock);
ossl_crypto_mutex_free(&lock->write_lock);
+ CRYPTO_THREAD_lock_free(lock->rw_lock);
OPENSSL_free(lock);
}

static inline struct rcu_qp *get_hold_current_qp(CRYPTO_RCU_LOCK *lock)
{
uint32_t qp_idx;
+ uint32_t tmp;
+ uint64_t tmp64;

/* get the current qp index */
for (;;) {
- qp_idx = InterlockedOr(&lock->reader_idx, 0);
- InterlockedAdd64(&lock->qp_group[qp_idx].users, VAL_READER);
- if (qp_idx == InterlockedOr(&lock->reader_idx, 0))
+ CRYPTO_atomic_load_int(&lock->reader_idx, (int *)&qp_idx,
+ lock->rw_lock);
+ CRYPTO_atomic_add64(&lock->qp_group[qp_idx].users, VAL_READER, &tmp64,
+ lock->rw_lock);
+ CRYPTO_atomic_load_int(&lock->reader_idx, (int *)&tmp, lock->rw_lock);
+ if (qp_idx == tmp)
break;
- InterlockedAdd64(&lock->qp_group[qp_idx].users, -VAL_READER);
+ CRYPTO_atomic_add64(&lock->qp_group[qp_idx].users, -VAL_READER, &tmp64,
+ lock->rw_lock);
}

return &lock->qp_group[qp_idx];
@@ -264,7 +281,9 @@ void ossl_rcu_read_unlock(CRYPTO_RCU_LOCK *lock)
if (data->thread_qps[i].lock == lock) {
data->thread_qps[i].depth--;
if (data->thread_qps[i].depth == 0) {
- ret = InterlockedAdd64(&data->thread_qps[i].qp->users, -VAL_READER);
+ CRYPTO_atomic_add64(&data->thread_qps[i].qp->users,
+ -VAL_READER, (uint64_t *)&ret,
+ lock->rw_lock);
OPENSSL_assert(ret >= 0);
data->thread_qps[i].qp = NULL;
data->thread_qps[i].lock = NULL;
@@ -279,6 +298,7 @@ static struct rcu_qp *update_qp(CRYPTO_RCU_LOCK *lock)
uint64_t new_id;
uint32_t current_idx;
uint32_t tmp;
+ uint64_t tmp64;

ossl_crypto_mutex_lock(lock->alloc_lock);
/*
@@ -302,8 +322,10 @@ static struct rcu_qp *update_qp(CRYPTO_RCU_LOCK *lock)
lock->id_ctr++;

new_id = VAL_ID(new_id);
- InterlockedAnd64(&lock->qp_group[current_idx].users, ID_MASK);
- InterlockedAdd64(&lock->qp_group[current_idx].users, new_id);
+ CRYPTO_atomic_and(&lock->qp_group[current_idx].users, ID_MASK, &tmp64,
+ lock->rw_lock);
+ CRYPTO_atomic_add64(&lock->qp_group[current_idx].users, new_id, &tmp64,
+ lock->rw_lock);

/* update the reader index to be the prior qp */
tmp = lock->current_alloc_idx;
@@ -338,7 +360,7 @@ void ossl_synchronize_rcu(CRYPTO_RCU_LOCK *lock)

/* wait for the reader count to reach zero */
do {
- count = InterlockedOr64(&qp->users, 0);
+ CRYPTO_atomic_load(&qp->users, &count, lock->rw_lock);
} while (READER_COUNT(count) != 0);

/* retire in order */
@@ -566,6 +588,45 @@ int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b)
return (a == b);
}

+static int CRYPTO_atomic_add64(uint64_t *val, uint64_t op, uint64_t *ret,
+ CRYPTO_RWLOCK *lock)
+{
+#if (defined(NO_INTERLOCKEDOR64))
+ if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
+ return 0;
+ *val += op;
+ *ret = *val;
+
+ if (!CRYPTO_THREAD_unlock(lock))
+ return 0;
+
+ return 1;
+#else
+ *ret = (uint64_t)InterlockedAdd64((LONG64 volatile *)val, (LONG64)op);
+ return 1;
+#endif
+}
+
+static int CRYPTO_atomic_and(uint64_t *val, uint64_t op, uint64_t *ret,
+ CRYPTO_RWLOCK *lock)
+{
+#if (defined(NO_INTERLOCKEDOR64))
+ if (lock == NULL || !CRYPTO_THREAD_write_lock(lock))
+ return 0;
+ *val &= op;
+ *ret = *val;
+
+ if (!CRYPTO_THREAD_unlock(lock))
+ return 0;
+
+ return 1;
+#else
+ *ret = (uint64_t)InterlockedAnd64((LONG64 volatile *)val, (LONG64)op) & op;
+ return 1;
+#endif
+}
+
+
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock)
{
*ret = (int)InterlockedExchangeAdd((long volatile *)val, (long)amount) + amount;
--
2.44.0

Loading

0 comments on commit c657fa4

Please sign in to comment.