From a92317e9020e41224a8c3f1536b4eb74c1192538 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 5 Jul 2024 10:59:25 +0200 Subject: [PATCH 01/14] Update to version 2.1.0 Drop EPEL 7 support from spec file (EOL) --- sources | 2 +- voms.spec | 81 ++++++++----------------------------------------------- 2 files changed, 12 insertions(+), 71 deletions(-) diff --git a/sources b/sources index a60e94b..38b583f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (voms-2.1.0-rc5.tar.gz) = 41a2bc249582c84239fbb1b187cc07e84717752665b017e9004969de4062d801c2228a88bfeb8d3d59f18ee4e923df24fa89fdb6a3bf99776ca9db675bd1099d +SHA512 (voms-2.1.0.tar.gz) = 753e57b04ee7bc3e874b7c749b2e885e7bbe3d2c779315dcfb2176506d65754f2d5997d7ec408e169fd17ea699d9571a13442fba623e9881024920e24119732f diff --git a/voms.spec b/voms.spec index cb2c9fb..2321ed8 100644 --- a/voms.spec +++ b/voms.spec @@ -1,19 +1,13 @@ %global _hardened_build 1 -%if %{?fedora}%{!?fedora:0} >= 25 || %{?rhel}%{!?rhel:0} >= 8 -%global use_systemd 1 -%else -%global use_systemd 0 -%endif - Name: voms Version: 2.1.0 -Release: 0.35.rc5%{?dist} +Release: 1%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 URL: https://italiangrid.github.io/voms/ -Source0: https://github.com/italiangrid/%{name}/archive/v%{version}-rc5/%{name}-%{version}-rc5.tar.gz +Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # Post-install setup instructions: Source1: %{name}.INSTALL @@ -27,9 +21,7 @@ BuildRequires: pkgconfig BuildRequires: libxslt BuildRequires: docbook-style-xsl BuildRequires: doxygen -%if %{use_systemd} BuildRequires: systemd-rpm-macros -%endif %description The Virtual Organization Membership Service (VOMS) is an attribute authority @@ -95,16 +87,8 @@ services. %package server Summary: Virtual Organization Membership Service Server Requires: %{name}%{?_isa} = %{version}-%{release} - -Requires(pre): shadow-utils -%if %{use_systemd} +Requires(pre): shadow-utils %{?systemd_requires} -%else -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts -Requires(postun): initscripts -%endif %description server The Virtual Organization Membership Service (VOMS) is an attribute authority @@ -117,7 +101,7 @@ authorization purposes. This package provides the VOMS service. %prep -%setup -q -n %{name}-%{version}-rc5 +%setup -q ./autogen.sh @@ -133,21 +117,10 @@ install -m 644 -p %{SOURCE1} README.Fedora rm %{buildroot}%{_libdir}/*.la -%if %{use_systemd} mkdir -p %{buildroot}%{_unitdir} install -m 644 -p systemd/%{name}@.service %{buildroot}%{_unitdir} rm %{buildroot}%{_initrddir}/%{name} rm %{buildroot}%{_sysconfdir}/sysconfig/%{name} -%else -# Turn off default enabling of the service -sed -e 's/\(chkconfig: \)\w*/\1-/' \ - -e '/Default-Start/d' \ - -e 's/\(Default-Stop:\s*\).*/\10 1 2 3 4 5 6/' \ - -i %{buildroot}%{_initrddir}/%{name} -%endif - -mkdir -p %{buildroot}%{_pkgdocdir} -install -m 644 -p AUTHORS README.md %{buildroot}%{_pkgdocdir} mkdir -p %{buildroot}%{_pkgdocdir}/VOMS_C_API cp -pr doc/apidoc/api/VOMS_C_API/html %{buildroot}%{_pkgdocdir}/VOMS_C_API @@ -167,8 +140,6 @@ for b in voms-proxy-init voms-proxy-info voms-proxy-destroy; do touch %{buildroot}%{_mandir}/man1/${b}.1 done -%ldconfig_scriptlets - %posttrans # Recover /etc/vomses... if [ -r %{_sysconfdir}/vomses.rpmsave -a ! -r %{_sysconfdir}/vomses ] ; then @@ -180,14 +151,6 @@ getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || useradd -r -g %{name} \ -d %{_sysconfdir}/%{name} -s /sbin/nologin -c "VOMS Server Account" %{name} -%if %{use_systemd} -# Remove old init config when systemd is used -/sbin/service voms stop >/dev/null 2>&1 || : -/sbin/chkconfig --del voms >/dev/null 2>&1 || : -%endif - -%if %{use_systemd} - %post server if [ $1 -eq 1 ] ; then systemctl daemon-reload >/dev/null 2>&1 || : @@ -209,26 +172,6 @@ if [ $1 -ge 1 ] ; then done fi -%else - -%post server -if [ $1 = 1 ]; then - /sbin/chkconfig --add %{name} -fi - -%preun server -if [ $1 = 0 ]; then - /sbin/service %{name} stop >/dev/null 2>&1 || : - /sbin/chkconfig --del %{name} -fi - -%postun server -if [ $1 -ge 1 ]; then - /sbin/service %{name} condrestart >/dev/null 2>&1 || : -fi - -%endif - %pre clients-cpp if [ $1 -gt 1 ]; then for c in voms-proxy-init voms-proxy-info voms-proxy-destroy; do @@ -287,9 +230,8 @@ fi %dir %{_sysconfdir}/grid-security/vomsdir %dir %{_datadir}/%{name} %{_datadir}/%{name}/vomses.template -%doc %dir %{_pkgdocdir} -%doc %{_pkgdocdir}/AUTHORS -%doc %{_pkgdocdir}/README.md +%doc AUTHORS +%doc README.md %license LICENSE %files devel @@ -301,9 +243,9 @@ fi %files doc %doc %dir %{_pkgdocdir} -%doc %{_pkgdocdir}/AUTHORS %doc %{_pkgdocdir}/VOMS_C_API %doc %{_pkgdocdir}/VOMS_CC_API +%doc AUTHORS %license LICENSE %files clients-cpp @@ -327,12 +269,7 @@ fi %files server %{_sbindir}/%{name} -%if %{use_systemd} %{_unitdir}/%{name}@.service -%else -%{_initrddir}/%{name} -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%endif %attr(-,voms,voms) %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/grid-security/%{name} %attr(-,voms,voms) %dir %{_localstatedir}/log/%{name} @@ -347,6 +284,10 @@ fi %doc README.Fedora %changelog +* Fri Jul 05 2024 Mattias Ellert - 2.1.0-1 +- Update to version 2.1.0 +- Drop EPEL 7 support from spec file (EOL) + * Tue Jun 18 2024 Mattias Ellert - 2.1.0-0.35.rc5 - Update to version 2.1.0-rc5 From d8f7f1939f2bd8661fa6c2ce46ef2a15418482cc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:59:40 +0000 Subject: [PATCH 02/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index 2321ed8..957b862 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -284,6 +284,9 @@ fi %doc README.Fedora %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jul 05 2024 Mattias Ellert - 2.1.0-1 - Update to version 2.1.0 - Drop EPEL 7 support from spec file (EOL) From 0b8fe8a2c67e329551c9854a6b48311377deae1a Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 31 Oct 2024 15:47:47 +0100 Subject: [PATCH 03/14] Rebuild for gsoap 2.8.135 (Fedora 42) Add additional ghost files to package (rpmlint) --- voms.spec | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/voms.spec b/voms.spec index 957b862..8c6299d 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -87,7 +87,7 @@ services. %package server Summary: Virtual Organization Membership Service Server Requires: %{name}%{?_isa} = %{version}-%{release} -Requires(pre): shadow-utils +%{?sysusers_requires_compat} %{?systemd_requires} %description server @@ -130,14 +130,16 @@ mkdir -p %{buildroot}%{_pkgdocdir}/VOMS_CC_API cp -pr doc/apidoc/api/VOMS_CC_API/html %{buildroot}%{_pkgdocdir}/VOMS_CC_API rm -f %{buildroot}%{_pkgdocdir}/VOMS_CC_API/html/installdox +mkdir -p %{buildroot}%{_sysconfdir}/alternatives for b in voms-proxy-init voms-proxy-info voms-proxy-destroy; do ## Rename client binaries mv %{buildroot}%{_bindir}/${b} %{buildroot}%{_bindir}/${b}2 - touch %{buildroot}/%{_bindir}/${b} - chmod 755 %{buildroot}/%{_bindir}/${b} + ln -s %{_bindir}/${b}2 %{buildroot}%{_sysconfdir}/alternatives/${b} + ln -s %{_sysconfdir}/alternatives/${b} %{buildroot}%{_bindir}/${b} ## and man pages mv %{buildroot}%{_mandir}/man1/${b}.1 %{buildroot}%{_mandir}/man1/${b}2.1 - touch %{buildroot}%{_mandir}/man1/${b}.1 + ln -s %{_mandir}/man1/${b}2.1.gz %{buildroot}%{_sysconfdir}/alternatives/${b}.1.gz + ln -s %{_sysconfdir}/alternatives/${b}.1.gz %{buildroot}%{_mandir}/man1/${b}.1.gz done %posttrans @@ -258,6 +260,9 @@ fi %ghost %{_bindir}/voms-proxy-destroy %ghost %{_bindir}/voms-proxy-info %ghost %{_bindir}/voms-proxy-init +%ghost %{_sysconfdir}/alternatives/voms-proxy-destroy +%ghost %{_sysconfdir}/alternatives/voms-proxy-info +%ghost %{_sysconfdir}/alternatives/voms-proxy-init %{_mandir}/man1/voms-proxy-destroy2.1* %{_mandir}/man1/voms-proxy-info2.1* %{_mandir}/man1/voms-proxy-init2.1* @@ -266,6 +271,9 @@ fi %ghost %{_mandir}/man1/voms-proxy-destroy.1* %ghost %{_mandir}/man1/voms-proxy-info.1* %ghost %{_mandir}/man1/voms-proxy-init.1* +%ghost %{_sysconfdir}/alternatives/voms-proxy-destroy.1* +%ghost %{_sysconfdir}/alternatives/voms-proxy-info.1* +%ghost %{_sysconfdir}/alternatives/voms-proxy-init.1* %files server %{_sbindir}/%{name} @@ -284,6 +292,10 @@ fi %doc README.Fedora %changelog +* Thu Oct 31 2024 Mattias Ellert - 2.1.0-3 +- Rebuild for gsoap 2.8.135 (Fedora 42) +- Add additional ghost files to package (rpmlint) + * Sat Jul 20 2024 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From b2236981d606f16c54f7233ff0ca7f7f40f1227c Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 19 Jan 2025 08:54:20 +0100 Subject: [PATCH 04/14] Fix compilation with GCC 15 --- ...ix-compilation-with-GCC-15-Fedora-42.patch | 244 ++++++++++++++++++ voms.spec | 8 +- 2 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-compilation-with-GCC-15-Fedora-42.patch diff --git a/0001-Fix-compilation-with-GCC-15-Fedora-42.patch b/0001-Fix-compilation-with-GCC-15-Fedora-42.patch new file mode 100644 index 0000000..3c18772 --- /dev/null +++ b/0001-Fix-compilation-with-GCC-15-Fedora-42.patch @@ -0,0 +1,244 @@ +From cac5a5bcfc9c250f45097e907391482a7e20534d Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Thu, 16 Jan 2025 15:53:41 +0100 +Subject: [PATCH] Fix compilation with GCC 15 (Fedora 42) + +GCC 15 has improved diagnostics and detects more incompatible pointer +type errors than earlier versions. Especially function pointers being +assigned pointers to function with the wrong type and/or number of +arguments are better detected. + +This commit fixes the compilation with GCC 15 on Fedora 42. +--- + src/ac/newformat.c | 2 +- + src/ac/write.c | 2 +- + src/client/vomsclient.cc | 6 +++--- + src/include/sslutils.h | 8 ++++---- + src/server/vomsd-rest.cc | 8 ++++---- + src/sslutils/sslutils.c | 20 ++++++++++---------- + src/utils/vomsfake.cc | 6 +++--- + 7 files changed, 26 insertions(+), 26 deletions(-) + +diff --git a/src/ac/newformat.c b/src/ac/newformat.c +index 6b7dd8e..98d7834 100644 +--- a/src/ac/newformat.c ++++ b/src/ac/newformat.c +@@ -197,5 +197,5 @@ EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey) + + int AC_verify(X509_ALGOR *algor1, ASN1_BIT_STRING *signature,char *data, EVP_PKEY *pkey) + { +- return ASN1_verify((int (*)())i2d_AC_INFO, algor1, signature, data, pkey); ++ return ASN1_verify((i2d_of_void *)i2d_AC_INFO, algor1, signature, data, pkey); + } +diff --git a/src/ac/write.c b/src/ac/write.c +index 3a8ef27..a239518 100644 +--- a/src/ac/write.c ++++ b/src/ac/write.c +@@ -482,7 +482,7 @@ int writeac(X509 *issuerc, STACK_OF(X509) *issuerstack, X509 *holder, EVP_PKEY * + md = EVP_sha1(); + } + +- ASN1_sign((int (*)())i2d_AC_INFO, a->acinfo->alg, a->sig_alg, a->signature, ++ ASN1_sign((i2d_of_void *)i2d_AC_INFO, a->acinfo->alg, a->sig_alg, a->signature, + (char *)a->acinfo, pkey, md); + + *ac = a; +diff --git a/src/client/vomsclient.cc b/src/client/vomsclient.cc +index bdbf144..333b7fb 100644 +--- a/src/client/vomsclient.cc ++++ b/src/client/vomsclient.cc +@@ -100,10 +100,10 @@ bool dontverifyac = false; + + extern "C" { + +-static int (*pw_cb)() = NULL; ++static pem_password_cb *pw_cb = NULL; + + +-static int pwstdin_callback(char * buf, int num, UNUSED(int w)) ++static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) + { + int i; + +@@ -472,7 +472,7 @@ Client::Client(int argc, char ** argv) : + /* allow password from stdin */ + + if (pwstdin) +- pw_cb = (int (*)())(pwstdin_callback); ++ pw_cb = pwstdin_callback; + + + /* file used */ +diff --git a/src/include/sslutils.h b/src/include/sslutils.h +index 7c155a3..fc277f6 100644 +--- a/src/include/sslutils.h ++++ b/src/include/sslutils.h +@@ -354,7 +354,7 @@ int proxy_load_user_cert_and_key_pkcs12(const char *user_cert, + X509 **cert, + STACK_OF(X509) **stack, + EVP_PKEY **pkey, +- int (*pw_cb) ()); ++ pem_password_cb *pw_cb); + + int + proxy_get_filenames( +@@ -369,7 +369,7 @@ int + proxy_load_user_cert( + const char * user_cert, + X509 ** certificate, +- int (*pw_cb)(), ++ pem_password_cb * pw_cb, + unsigned long * hSession); + + int +@@ -377,7 +377,7 @@ proxy_load_user_key( + EVP_PKEY ** private_key, + X509 * ucert, + const char * user_key, +- int (*pw_cb)(), ++ pem_password_cb * pw_cb, + unsigned long * hSession); + + void +@@ -514,7 +514,7 @@ int PRIVATE determine_filenames(char **cacert, char **certdir, char **outfile, + char **certfile, char **keyfile, int noregen); + int load_credentials(const char *certname, const char *keyname, + X509 **cert, STACK_OF(X509) **stack, EVP_PKEY **key, +- int (*callback)()); ++ pem_password_cb *callback); + int PRIVATE load_certificate_from_file(FILE *file, X509 **cert, + STACK_OF(X509) **stack); + +diff --git a/src/server/vomsd-rest.cc b/src/server/vomsd-rest.cc +index 5303348..5e7ad9b 100644 +--- a/src/server/vomsd-rest.cc ++++ b/src/server/vomsd-rest.cc +@@ -44,18 +44,18 @@ extern "C" { + #include "fqan.h" + #include "data.h" + +-static int (*pw_cb)() = NULL; ++static pem_password_cb *pw_cb = NULL; + static bool makeACSSL(vomsresult &vr, SSL *ssl, const std::string& command, const std::string &orderstring, const std::string& targets, int requested, VOMSServer *v); + static int makeACREST(struct soap *soap, const std::string& command, const std::string& orderstring, const std::string& targets, int requested, int unknown); + int http_get(soap *soap); +-static int pwstdin_callback(char * buf, int num, UNUSED(int w)); ++static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)); + static bool get_parameter(char **path, char **name, char **value); + + extern VOMSServer *selfpointer; + extern void *logh; + extern char *maingroup; + +-static int pwstdin_callback(char * buf, int num, UNUSED(int w)) ++static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) + { + int i; + +@@ -82,7 +82,7 @@ makeACSSL(vomsresult &vr, SSL *ssl, const std::string& command, const std::strin + X509 *realholder = get_real_cert(holder, chain); + X509 *issuer = NULL; + EVP_PKEY *key = NULL; +- pw_cb =(int (*)())(pwstdin_callback); ++ pw_cb = pwstdin_callback; + char *hostcert = (char*)"/etc/grid-security/hostcert.pem"; + char *hostkey = (char*)"/etc/grid-security/hostkey.pem"; + +diff --git a/src/sslutils/sslutils.c b/src/sslutils/sslutils.c +index 931d1a3..596fe55 100644 +--- a/src/sslutils/sslutils.c ++++ b/src/sslutils/sslutils.c +@@ -2782,7 +2782,7 @@ Parameters: + Returns: + **********************************************************************/ + +-static int cert_load_pkcs12(BIO *bio, int (*pw_cb)(), X509 **cert, EVP_PKEY **key, STACK_OF(X509) **chain) ++static int cert_load_pkcs12(BIO *bio, pem_password_cb *pw_cb, X509 **cert, EVP_PKEY **key, STACK_OF(X509) **chain) + { + PKCS12 *p12 = NULL; + char *password = NULL; +@@ -2798,7 +2798,7 @@ static int cert_load_pkcs12(BIO *bio, int (*pw_cb)(), X509 **cert, EVP_PKEY **ke + int sz = 0; + + if (pw_cb) +- sz = pw_cb(buffer, 1024, 0); ++ sz = pw_cb(buffer, 1024, 0, NULL); + else + if (EVP_read_pw_string(buffer, 1024, EVP_get_pw_prompt(), 0) != -1) + sz = strlen(buffer); +@@ -2826,7 +2826,7 @@ int PRIVATE proxy_load_user_cert_and_key_pkcs12(const char *user_cert, + X509 **cert, + STACK_OF(X509) **stack, + EVP_PKEY **pkey, +- int (*pw_cb) ()) ++ pem_password_cb *pw_cb) + { + BIO *bio = BIO_new_file(user_cert, "rb"); + int res = cert_load_pkcs12(bio, pw_cb, cert, pkey, stack); +@@ -2852,9 +2852,9 @@ int PRIVATE proxy_load_user_cert_and_key_pkcs12(const char *user_cert, + int PRIVATE + proxy_load_user_cert( + const char * user_cert, +- X509 ** certificate, +- UNUSED(int (*pw_cb)()), +- UNUSED(unsigned long * hSession)) ++ X509 ** certificate, ++ UNUSED(pem_password_cb * pw_cb), ++ UNUSED(unsigned long * hSession)) + { + int status = -1; + FILE * fp; +@@ -2985,13 +2985,13 @@ proxy_load_user_key( + EVP_PKEY ** private_key, + X509 * ucert, + const char * user_key, +- int (*pw_cb)(), +- UNUSED(unsigned long * hSession)) ++ pem_password_cb * pw_cb, ++ UNUSED(unsigned long * hSession)) + { + int status = -1; + FILE * fp; + EVP_PKEY * ucertpkey; +- int (*xpw_cb)(); ++ pem_password_cb * xpw_cb; + + if (!private_key) + return 0; +@@ -3467,7 +3467,7 @@ err: + + int load_credentials(const char *certname, const char *keyname, + X509 **cert, STACK_OF(X509) **stack, EVP_PKEY **key, +- int (*callback)()) ++ pem_password_cb *callback) + { + STACK_OF(X509) *chain = NULL; + +diff --git a/src/utils/vomsfake.cc b/src/utils/vomsfake.cc +index 31e7085..7e867ee 100644 +--- a/src/utils/vomsfake.cc ++++ b/src/utils/vomsfake.cc +@@ -109,9 +109,9 @@ bool quiet = false; + + extern "C" { + +-static int (*pw_cb)() = NULL; ++static pem_password_cb *pw_cb = NULL; + +-static int pwstdin_callback(char * buf, int num, UNUSED(int w)) ++static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) + { + int i; + +@@ -431,7 +431,7 @@ Fake::Fake(int argc, char ** argv) : confile(conf_file_name), + /* allow password from stdin */ + + if(pwstdin) +- pw_cb = (int (*)())(pwstdin_callback); ++ pw_cb = pwstdin_callback; + + /* with --debug prints configuration files used */ + +-- +2.48.0 + diff --git a/voms.spec b/voms.spec index 8c6299d..6ac26cb 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -10,6 +10,8 @@ URL: https://italiangrid.github.io/voms/ Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # Post-install setup instructions: Source1: %{name}.INSTALL +# https://github.com/italiangrid/voms/pull/140 +Patch0: 0001-Fix-compilation-with-GCC-15-Fedora-42.patch BuildRequires: make BuildRequires: gcc-c++ @@ -102,6 +104,7 @@ This package provides the VOMS service. %prep %setup -q +%patch -P0 -p1 ./autogen.sh @@ -292,6 +295,9 @@ fi %doc README.Fedora %changelog +* Sun Jan 19 2025 Mattias Ellert - 2.1.0-4 +- Fix compilation with GCC 15 + * Thu Oct 31 2024 Mattias Ellert - 2.1.0-3 - Rebuild for gsoap 2.8.135 (Fedora 42) - Add additional ghost files to package (rpmlint) From 6e8806dc9a46ba63daa801a081ed58a77d63badc Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sat, 8 Mar 2025 19:21:29 +0100 Subject: [PATCH 05/14] Move user/group creation logic to sysusers.d fragment --- voms-sysusers.conf | 2 ++ voms.spec | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 voms-sysusers.conf diff --git a/voms-sysusers.conf b/voms-sysusers.conf new file mode 100644 index 0000000..285c016 --- /dev/null +++ b/voms-sysusers.conf @@ -0,0 +1,2 @@ +# Name ID GECOS Home directory Shell +u voms - "VOMS Server Account" /etc/voms - diff --git a/voms.spec b/voms.spec index 6ac26cb..e7430d7 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -10,6 +10,8 @@ URL: https://italiangrid.github.io/voms/ Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # Post-install setup instructions: Source1: %{name}.INSTALL +# System user creation config +Source2: %{name}-sysusers.conf # https://github.com/italiangrid/voms/pull/140 Patch0: 0001-Fix-compilation-with-GCC-15-Fedora-42.patch @@ -125,6 +127,9 @@ install -m 644 -p systemd/%{name}@.service %{buildroot}%{_unitdir} rm %{buildroot}%{_initrddir}/%{name} rm %{buildroot}%{_sysconfdir}/sysconfig/%{name} +mkdir -p %{buildroot}%{_sysusersdir} +install -m 644 -p %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf + mkdir -p %{buildroot}%{_pkgdocdir}/VOMS_C_API cp -pr doc/apidoc/api/VOMS_C_API/html %{buildroot}%{_pkgdocdir}/VOMS_C_API rm -f %{buildroot}%{_pkgdocdir}/VOMS_C_API/html/installdox @@ -152,9 +157,7 @@ if [ -r %{_sysconfdir}/vomses.rpmsave -a ! -r %{_sysconfdir}/vomses ] ; then fi %pre server -getent group %{name} >/dev/null || groupadd -r %{name} -getent passwd %{name} >/dev/null || useradd -r -g %{name} \ - -d %{_sysconfdir}/%{name} -s /sbin/nologin -c "VOMS Server Account" %{name} +%sysusers_create_compat %{SOURCE2} %post server if [ $1 -eq 1 ] ; then @@ -292,9 +295,13 @@ fi %{_datadir}/%{name}/voms_replica_master_setup.sh %{_datadir}/%{name}/voms_replica_slave_setup.sh %{_mandir}/man8/voms.8* +%{_sysusersdir}/%{name}.conf %doc README.Fedora %changelog +* Sat Mar 08 2025 Mattias Ellert - 2.1.0-5 +- Move user/group creation logic to sysusers.d fragment + * Sun Jan 19 2025 Mattias Ellert - 2.1.0-4 - Fix compilation with GCC 15 From 93ed5d5c8a4c0ce085e859e61abb42636094219c Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Fri, 28 Mar 2025 06:40:15 +0100 Subject: [PATCH 06/14] Update to version 2.1.2 Drop patch accepted upstream --- ...ix-compilation-with-GCC-15-Fedora-42.patch | 244 ------------------ sources | 2 +- voms.spec | 11 +- 3 files changed, 7 insertions(+), 250 deletions(-) delete mode 100644 0001-Fix-compilation-with-GCC-15-Fedora-42.patch diff --git a/0001-Fix-compilation-with-GCC-15-Fedora-42.patch b/0001-Fix-compilation-with-GCC-15-Fedora-42.patch deleted file mode 100644 index 3c18772..0000000 --- a/0001-Fix-compilation-with-GCC-15-Fedora-42.patch +++ /dev/null @@ -1,244 +0,0 @@ -From cac5a5bcfc9c250f45097e907391482a7e20534d Mon Sep 17 00:00:00 2001 -From: Mattias Ellert -Date: Thu, 16 Jan 2025 15:53:41 +0100 -Subject: [PATCH] Fix compilation with GCC 15 (Fedora 42) - -GCC 15 has improved diagnostics and detects more incompatible pointer -type errors than earlier versions. Especially function pointers being -assigned pointers to function with the wrong type and/or number of -arguments are better detected. - -This commit fixes the compilation with GCC 15 on Fedora 42. ---- - src/ac/newformat.c | 2 +- - src/ac/write.c | 2 +- - src/client/vomsclient.cc | 6 +++--- - src/include/sslutils.h | 8 ++++---- - src/server/vomsd-rest.cc | 8 ++++---- - src/sslutils/sslutils.c | 20 ++++++++++---------- - src/utils/vomsfake.cc | 6 +++--- - 7 files changed, 26 insertions(+), 26 deletions(-) - -diff --git a/src/ac/newformat.c b/src/ac/newformat.c -index 6b7dd8e..98d7834 100644 ---- a/src/ac/newformat.c -+++ b/src/ac/newformat.c -@@ -197,5 +197,5 @@ EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey) - - int AC_verify(X509_ALGOR *algor1, ASN1_BIT_STRING *signature,char *data, EVP_PKEY *pkey) - { -- return ASN1_verify((int (*)())i2d_AC_INFO, algor1, signature, data, pkey); -+ return ASN1_verify((i2d_of_void *)i2d_AC_INFO, algor1, signature, data, pkey); - } -diff --git a/src/ac/write.c b/src/ac/write.c -index 3a8ef27..a239518 100644 ---- a/src/ac/write.c -+++ b/src/ac/write.c -@@ -482,7 +482,7 @@ int writeac(X509 *issuerc, STACK_OF(X509) *issuerstack, X509 *holder, EVP_PKEY * - md = EVP_sha1(); - } - -- ASN1_sign((int (*)())i2d_AC_INFO, a->acinfo->alg, a->sig_alg, a->signature, -+ ASN1_sign((i2d_of_void *)i2d_AC_INFO, a->acinfo->alg, a->sig_alg, a->signature, - (char *)a->acinfo, pkey, md); - - *ac = a; -diff --git a/src/client/vomsclient.cc b/src/client/vomsclient.cc -index bdbf144..333b7fb 100644 ---- a/src/client/vomsclient.cc -+++ b/src/client/vomsclient.cc -@@ -100,10 +100,10 @@ bool dontverifyac = false; - - extern "C" { - --static int (*pw_cb)() = NULL; -+static pem_password_cb *pw_cb = NULL; - - --static int pwstdin_callback(char * buf, int num, UNUSED(int w)) -+static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) - { - int i; - -@@ -472,7 +472,7 @@ Client::Client(int argc, char ** argv) : - /* allow password from stdin */ - - if (pwstdin) -- pw_cb = (int (*)())(pwstdin_callback); -+ pw_cb = pwstdin_callback; - - - /* file used */ -diff --git a/src/include/sslutils.h b/src/include/sslutils.h -index 7c155a3..fc277f6 100644 ---- a/src/include/sslutils.h -+++ b/src/include/sslutils.h -@@ -354,7 +354,7 @@ int proxy_load_user_cert_and_key_pkcs12(const char *user_cert, - X509 **cert, - STACK_OF(X509) **stack, - EVP_PKEY **pkey, -- int (*pw_cb) ()); -+ pem_password_cb *pw_cb); - - int - proxy_get_filenames( -@@ -369,7 +369,7 @@ int - proxy_load_user_cert( - const char * user_cert, - X509 ** certificate, -- int (*pw_cb)(), -+ pem_password_cb * pw_cb, - unsigned long * hSession); - - int -@@ -377,7 +377,7 @@ proxy_load_user_key( - EVP_PKEY ** private_key, - X509 * ucert, - const char * user_key, -- int (*pw_cb)(), -+ pem_password_cb * pw_cb, - unsigned long * hSession); - - void -@@ -514,7 +514,7 @@ int PRIVATE determine_filenames(char **cacert, char **certdir, char **outfile, - char **certfile, char **keyfile, int noregen); - int load_credentials(const char *certname, const char *keyname, - X509 **cert, STACK_OF(X509) **stack, EVP_PKEY **key, -- int (*callback)()); -+ pem_password_cb *callback); - int PRIVATE load_certificate_from_file(FILE *file, X509 **cert, - STACK_OF(X509) **stack); - -diff --git a/src/server/vomsd-rest.cc b/src/server/vomsd-rest.cc -index 5303348..5e7ad9b 100644 ---- a/src/server/vomsd-rest.cc -+++ b/src/server/vomsd-rest.cc -@@ -44,18 +44,18 @@ extern "C" { - #include "fqan.h" - #include "data.h" - --static int (*pw_cb)() = NULL; -+static pem_password_cb *pw_cb = NULL; - static bool makeACSSL(vomsresult &vr, SSL *ssl, const std::string& command, const std::string &orderstring, const std::string& targets, int requested, VOMSServer *v); - static int makeACREST(struct soap *soap, const std::string& command, const std::string& orderstring, const std::string& targets, int requested, int unknown); - int http_get(soap *soap); --static int pwstdin_callback(char * buf, int num, UNUSED(int w)); -+static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)); - static bool get_parameter(char **path, char **name, char **value); - - extern VOMSServer *selfpointer; - extern void *logh; - extern char *maingroup; - --static int pwstdin_callback(char * buf, int num, UNUSED(int w)) -+static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) - { - int i; - -@@ -82,7 +82,7 @@ makeACSSL(vomsresult &vr, SSL *ssl, const std::string& command, const std::strin - X509 *realholder = get_real_cert(holder, chain); - X509 *issuer = NULL; - EVP_PKEY *key = NULL; -- pw_cb =(int (*)())(pwstdin_callback); -+ pw_cb = pwstdin_callback; - char *hostcert = (char*)"/etc/grid-security/hostcert.pem"; - char *hostkey = (char*)"/etc/grid-security/hostkey.pem"; - -diff --git a/src/sslutils/sslutils.c b/src/sslutils/sslutils.c -index 931d1a3..596fe55 100644 ---- a/src/sslutils/sslutils.c -+++ b/src/sslutils/sslutils.c -@@ -2782,7 +2782,7 @@ Parameters: - Returns: - **********************************************************************/ - --static int cert_load_pkcs12(BIO *bio, int (*pw_cb)(), X509 **cert, EVP_PKEY **key, STACK_OF(X509) **chain) -+static int cert_load_pkcs12(BIO *bio, pem_password_cb *pw_cb, X509 **cert, EVP_PKEY **key, STACK_OF(X509) **chain) - { - PKCS12 *p12 = NULL; - char *password = NULL; -@@ -2798,7 +2798,7 @@ static int cert_load_pkcs12(BIO *bio, int (*pw_cb)(), X509 **cert, EVP_PKEY **ke - int sz = 0; - - if (pw_cb) -- sz = pw_cb(buffer, 1024, 0); -+ sz = pw_cb(buffer, 1024, 0, NULL); - else - if (EVP_read_pw_string(buffer, 1024, EVP_get_pw_prompt(), 0) != -1) - sz = strlen(buffer); -@@ -2826,7 +2826,7 @@ int PRIVATE proxy_load_user_cert_and_key_pkcs12(const char *user_cert, - X509 **cert, - STACK_OF(X509) **stack, - EVP_PKEY **pkey, -- int (*pw_cb) ()) -+ pem_password_cb *pw_cb) - { - BIO *bio = BIO_new_file(user_cert, "rb"); - int res = cert_load_pkcs12(bio, pw_cb, cert, pkey, stack); -@@ -2852,9 +2852,9 @@ int PRIVATE proxy_load_user_cert_and_key_pkcs12(const char *user_cert, - int PRIVATE - proxy_load_user_cert( - const char * user_cert, -- X509 ** certificate, -- UNUSED(int (*pw_cb)()), -- UNUSED(unsigned long * hSession)) -+ X509 ** certificate, -+ UNUSED(pem_password_cb * pw_cb), -+ UNUSED(unsigned long * hSession)) - { - int status = -1; - FILE * fp; -@@ -2985,13 +2985,13 @@ proxy_load_user_key( - EVP_PKEY ** private_key, - X509 * ucert, - const char * user_key, -- int (*pw_cb)(), -- UNUSED(unsigned long * hSession)) -+ pem_password_cb * pw_cb, -+ UNUSED(unsigned long * hSession)) - { - int status = -1; - FILE * fp; - EVP_PKEY * ucertpkey; -- int (*xpw_cb)(); -+ pem_password_cb * xpw_cb; - - if (!private_key) - return 0; -@@ -3467,7 +3467,7 @@ err: - - int load_credentials(const char *certname, const char *keyname, - X509 **cert, STACK_OF(X509) **stack, EVP_PKEY **key, -- int (*callback)()) -+ pem_password_cb *callback) - { - STACK_OF(X509) *chain = NULL; - -diff --git a/src/utils/vomsfake.cc b/src/utils/vomsfake.cc -index 31e7085..7e867ee 100644 ---- a/src/utils/vomsfake.cc -+++ b/src/utils/vomsfake.cc -@@ -109,9 +109,9 @@ bool quiet = false; - - extern "C" { - --static int (*pw_cb)() = NULL; -+static pem_password_cb *pw_cb = NULL; - --static int pwstdin_callback(char * buf, int num, UNUSED(int w)) -+static int pwstdin_callback(char * buf, int num, UNUSED(int w), UNUSED(void *u)) - { - int i; - -@@ -431,7 +431,7 @@ Fake::Fake(int argc, char ** argv) : confile(conf_file_name), - /* allow password from stdin */ - - if(pwstdin) -- pw_cb = (int (*)())(pwstdin_callback); -+ pw_cb = pwstdin_callback; - - /* with --debug prints configuration files used */ - --- -2.48.0 - diff --git a/sources b/sources index 38b583f..81f64a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (voms-2.1.0.tar.gz) = 753e57b04ee7bc3e874b7c749b2e885e7bbe3d2c779315dcfb2176506d65754f2d5997d7ec408e169fd17ea699d9571a13442fba623e9881024920e24119732f +SHA512 (voms-2.1.2.tar.gz) = c6aaa10ade0c3bcf5f6f73432811ff2c65cb2c946c22ec86daeec2d372080331183dbbafac216fbc8034174f4e213ee70be333222a612a8183f6f4079a1e9691 diff --git a/voms.spec b/voms.spec index e7430d7..0d44b47 100644 --- a/voms.spec +++ b/voms.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: voms -Version: 2.1.0 -Release: 5%{?dist} +Version: 2.1.2 +Release: 1%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -12,8 +12,6 @@ Source0: https://github.com/italiangrid/%{name}/archive/v%{version}/%{name}-%{ve Source1: %{name}.INSTALL # System user creation config Source2: %{name}-sysusers.conf -# https://github.com/italiangrid/voms/pull/140 -Patch0: 0001-Fix-compilation-with-GCC-15-Fedora-42.patch BuildRequires: make BuildRequires: gcc-c++ @@ -106,7 +104,6 @@ This package provides the VOMS service. %prep %setup -q -%patch -P0 -p1 ./autogen.sh @@ -299,6 +296,10 @@ fi %doc README.Fedora %changelog +* Thu Mar 27 2025 Mattias Ellert - 2.1.2-1 +- Update to version 2.1.2 +- Drop patch accepted upstream + * Sat Mar 08 2025 Mattias Ellert - 2.1.0-5 - Move user/group creation logic to sysusers.d fragment From d0923b36ea784dbd14c70c6993e8d1062dc930a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:12:59 +0000 Subject: [PATCH 07/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index 0d44b47..9bddf50 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -296,6 +296,9 @@ fi %doc README.Fedora %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Thu Mar 27 2025 Mattias Ellert - 2.1.2-1 - Update to version 2.1.2 - Drop patch accepted upstream From 11674535920e8dfb7bb0df4b852bf977e76e29f5 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Sun, 21 Dec 2025 05:01:09 +0100 Subject: [PATCH 08/14] Update to version 2.1.3 --- sources | 2 +- voms.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 81f64a5..cc1111c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (voms-2.1.2.tar.gz) = c6aaa10ade0c3bcf5f6f73432811ff2c65cb2c946c22ec86daeec2d372080331183dbbafac216fbc8034174f4e213ee70be333222a612a8183f6f4079a1e9691 +SHA512 (voms-2.1.3.tar.gz) = c17af601591cd9bdbb678e1db638cd33033cc73b3c5b16e117c8c47e211e5f19e7a105af55095bc2267dc5889c08fba20d340917c61a68b45ba2a76bdffb8f0d diff --git a/voms.spec b/voms.spec index 9bddf50..f9c8368 100644 --- a/voms.spec +++ b/voms.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: voms -Version: 2.1.2 -Release: 2%{?dist} +Version: 2.1.3 +Release: 1%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -73,7 +73,7 @@ Provides: voms-clients = %{version}-%{release} Obsoletes: voms-clients < 2.0.12-3 Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives +Requires(preun): %{_sbindir}/update-alternatives %description clients-cpp The Virtual Organization Membership Service (VOMS) is an attribute authority @@ -203,7 +203,7 @@ fi --slave %{_mandir}/man1/voms-proxy-destroy.1.gz voms-proxy-destroy-man \ %{_mandir}/man1/voms-proxy-destroy2.1.gz -%postun clients-cpp +%preun clients-cpp if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove voms-proxy-init \ %{_bindir}/voms-proxy-init2 @@ -296,6 +296,9 @@ fi %doc README.Fedora %changelog +* Sat Dec 20 2025 Mattias Ellert - 2.1.3-1 +- Update to version 2.1.3 + * Fri Jul 25 2025 Fedora Release Engineering - 2.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 42fa62a075d87dcb4484feb1f16686d73571eaaf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:02:45 +0000 Subject: [PATCH 09/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index f9c8368..d7620d2 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -296,6 +296,9 @@ fi %doc README.Fedora %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 2.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Sat Dec 20 2025 Mattias Ellert - 2.1.3-1 - Update to version 2.1.3 From f1a6157295d27d16bfdfc1ee7d6b3ef26a6ab013 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 20 Jan 2026 13:13:04 +0100 Subject: [PATCH 10/14] Rebuild for gsoap 2.8.139 (Fedora 44) --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index d7620d2..c0cf071 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -296,6 +296,9 @@ fi %doc README.Fedora %changelog +* Tue Jan 20 2026 Mattias Ellert - 2.1.3-3 +- Rebuild for gsoap 2.8.139 (Fedora 44) + * Sat Jan 17 2026 Fedora Release Engineering - 2.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 0bd8b7964ee7907f070c3812cad609a2cd258aea Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Wed, 29 Apr 2026 16:14:45 +0200 Subject: [PATCH 11/14] Fix build with OpenSSL 4.0 (opaque ASN1_STRING, const X509, removed ERR_STATE) --- voms-openssl4.patch | 374 ++++++++++++++++++++++++++++++++++++++++++++ voms.spec | 8 +- 2 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 voms-openssl4.patch diff --git a/voms-openssl4.patch b/voms-openssl4.patch new file mode 100644 index 0000000..5b96532 --- /dev/null +++ b/voms-openssl4.patch @@ -0,0 +1,374 @@ +diff -ruN a/src/ac/validate.cc b/src/ac/validate.cc +--- a/src/ac/validate.cc 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/ac/validate.cc 2026-04-29 15:38:19.136425930 +0200 +@@ -205,8 +205,8 @@ + } + + v.version = 1; +- v.siglen = ac->signature->length; +- v.signature = std::string((char*)ac->signature->data, ac->signature->length); ++ v.siglen = ASN1_STRING_length(ac->signature); ++ v.signature = std::string((char*)ASN1_STRING_get0_data(ac->signature), ASN1_STRING_length(ac->signature)); + bn = ASN1_INTEGER_to_BN(ac->acinfo->serial, NULL); + char *bnstring = BN_bn2hex(bn); + v.serial = std::string(bnstring); +@@ -294,15 +294,15 @@ + if (X509_NAME_cmp(name->d.dirn, X509_get_subject_name(issuer))) + ERROR(AC_ERR_ISSUER_NAME); + +- if (ac->acinfo->serial->length>20) ++ if (ASN1_STRING_length(ac->acinfo->serial)>20) + ERROR(AC_ERR_SERIAL); + } + + b = ac->acinfo->validity->notBefore; + a = ac->acinfo->validity->notAfter; + +- v.date1 = std::string((char*)b->data, b->length); +- v.date2 = std::string((char*)a->data, a->length); ++ v.date1 = std::string((char*)ASN1_STRING_get0_data(b), ASN1_STRING_length(b)); ++ v.date2 = std::string((char*)ASN1_STRING_get0_data(a), ASN1_STRING_length(a)); + + if (valids & VERIFY_DATE) { + time_t ctime, dtime; +@@ -315,8 +315,8 @@ + ctime += 300; + dtime = ctime-600; + +- if ((a->type != V_ASN1_GENERALIZEDTIME) || +- (b->type != V_ASN1_GENERALIZEDTIME)) ++ if ((ASN1_STRING_type(a) != V_ASN1_GENERALIZEDTIME) || ++ (ASN1_STRING_type(b) != V_ASN1_GENERALIZEDTIME)) + ERROR(AC_ERR_DATES); + + if (((X509_cmp_time(b, &vertime) >= 0) && +@@ -379,7 +379,7 @@ + /* put policyAuthority in voms struct */ + data = sk_GENERAL_NAME_value(capattr->names, 0); + if (data->type == GEN_URI) { +- v.voname = std::string((char*)data->d.ia5->data, data->d.ia5->length); ++ v.voname = std::string((char*)ASN1_STRING_get0_data(data->d.ia5), ASN1_STRING_length(data->d.ia5)); + std::string::size_type point = v.voname.find("://"); + + if (point != std::string::npos) { +@@ -398,10 +398,10 @@ + for (int i=0; itype == V_ASN1_OCTET_STRING)) ++ if (!(ASN1_STRING_type(capname) == V_ASN1_OCTET_STRING)) + return AC_ERR_ATTRIB_FQAN; + +- std::string str = std::string((char*)capname->data, capname->length); ++ std::string str = std::string((char*)ASN1_STRING_get0_data(capname), ASN1_STRING_length(capname)); + std::string::size_type top_group_size = top_group.size(); + std::string::size_type str_size = str.size(); + +@@ -556,14 +556,14 @@ + if (key->keyid) { + unsigned char hashed[SHA_DIGEST_LENGTH]; + +- ASN1_BIT_STRING* pubkey = X509_get0_pubkey_bitstr(iss); +- if (!SHA1(pubkey->data, +- pubkey->length, ++ const ASN1_BIT_STRING* pubkey = X509_get0_pubkey_bitstr(iss); ++ if (!SHA1(ASN1_STRING_get0_data(pubkey), ++ ASN1_STRING_length(pubkey), + hashed)) + ret = AC_ERR_EXT_KEY; + +- if ((memcmp(key->keyid->data, hashed, 20) != 0) && +- (key->keyid->length == 20)) ++ if ((memcmp(ASN1_STRING_get0_data(key->keyid), hashed, 20) != 0) && ++ (ASN1_STRING_length(key->keyid) == 20)) + ret = AC_ERR_EXT_KEY; + } + else { +@@ -574,7 +574,7 @@ + (X509_get0_serialNumber(iss)))) + ret = AC_ERR_EXT_KEY; + +- if (key->serial->type != GEN_DIRNAME) ++ if (ASN1_STRING_type(key->serial) != GEN_DIRNAME) + ret = AC_ERR_EXT_KEY; + + if (X509_NAME_cmp(sk_GENERAL_NAME_value((key->issuer), 0)->d.dirn, +@@ -632,15 +632,15 @@ + AC_ATTRIBUTE *at = sk_AC_ATTRIBUTE_value(atts, j); + + struct attribute a; +- a.name = std::string((char*)at->name->data, at->name->length); +- a.value = std::string((char*)at->value->data, at->value->length); +- a.qualifier = std::string((char*)at->qualifier->data, at->qualifier->length); ++ a.name = std::string((char*)ASN1_STRING_get0_data(at->name), ASN1_STRING_length(at->name)); ++ a.value = std::string((char*)ASN1_STRING_get0_data(at->value), ASN1_STRING_length(at->value)); ++ a.qualifier = std::string((char*)ASN1_STRING_get0_data(at->qualifier), ASN1_STRING_length(at->qualifier)); + + al.attributes.push_back(a); + } + + gn = sk_GENERAL_NAME_value(holder->grantor, 0); +- al.grantor = std::string((char*)gn->d.ia5->data, gn->d.ia5->length); ++ al.grantor = std::string((char*)ASN1_STRING_get0_data(gn->d.ia5), ASN1_STRING_length(gn->d.ia5)); + + rd->attributes->push_back(al); + } +diff -ruN a/src/api/ccapi/api_util.cc b/src/api/ccapi/api_util.cc +--- a/src/api/ccapi/api_util.cc 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/api/ccapi/api_util.cc 2026-04-29 16:05:24.239940677 +0200 +@@ -139,7 +139,7 @@ + int index = X509_get_ext_by_NID(cert, nid, -1); + + if (index >= 0) +- return X509_get_ext(cert, index); ++ return const_cast(X509_get_ext(cert, index)); + else + return NULL; + } +@@ -157,17 +157,17 @@ + + ext = get_ext(cert, "incfile"); + if (ext) { +- ASN1_OCTET_STRING* value = X509_EXTENSION_get_data(ext); ++ const ASN1_OCTET_STRING* value = X509_EXTENSION_get_data(ext); + assert(value && "X509_EXTENSION_get_data failed"); +- extra_data = std::string(reinterpret_cast(value->data), value->length); ++ extra_data = std::string(reinterpret_cast(ASN1_STRING_get0_data(value)), ASN1_STRING_length(value)); + found = true; + } + + ext = get_ext(cert, "vo"); + if (ext) { +- ASN1_OCTET_STRING* value = X509_EXTENSION_get_data(ext); ++ const ASN1_OCTET_STRING* value = X509_EXTENSION_get_data(ext); + assert(value && "X509_EXTENSION_get_data failed"); +- workvo = std::string(reinterpret_cast(value->data), value->length); ++ workvo = std::string(reinterpret_cast(ASN1_STRING_get0_data(value)), ASN1_STRING_length(value)); + } + + return found; +@@ -423,7 +423,7 @@ + return NULL; + } + +- std::string voname((const char *)name->d.ia5->data, 0, name->d.ia5->length); ++ std::string voname((const char *)ASN1_STRING_get0_data(name->d.ia5), 0, ASN1_STRING_length(name->d.ia5)); + std::string::size_type cpos = voname.find("://"); + std::string hostname; + +diff -ruN a/src/api/ccapi/voms_api.cc b/src/api/ccapi/voms_api.cc +--- a/src/api/ccapi/voms_api.cc 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/api/ccapi/voms_api.cc 2026-04-29 16:05:14.064784528 +0200 +@@ -1025,8 +1025,8 @@ + AC_TARGET *name = NULL; + name = sk_AC_TARGET_value(target->targets, i); + if (name->name->type == GEN_URI) +- targets.push_back(std::string((char*)(name->name->d.ia5->data), +- name->name->d.ia5->length)); ++ targets.push_back(std::string((char*)ASN1_STRING_get0_data(name->name->d.ia5), ++ ASN1_STRING_length(name->name->d.ia5))); + } + } + AC_TARGETS_free(target); +diff -ruN a/src/include/sslutils.h b/src/include/sslutils.h +--- a/src/include/sslutils.h 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/include/sslutils.h 2026-04-29 14:45:17.997509299 +0200 +@@ -403,8 +403,8 @@ + int + proxy_check_issued( + X509_STORE_CTX * ctx, +- X509 * x, +- X509 * issuer); ++ const X509 * x, ++ const X509 * issuer); + + int + proxy_verify_certchain( +diff -ruN a/src/sslutils/proxy.c b/src/sslutils/proxy.c +--- a/src/sslutils/proxy.c 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/sslutils/proxy.c 2026-04-29 15:21:22.859426069 +0200 +@@ -543,8 +543,9 @@ + oct = ASN1_OCTET_STRING_new(); + assert(oct != NULL && "ASN1_OCTET_STRING_new failed"); + +- oct->data = der; +- oct->length = len; ++ ASN1_STRING_set0(oct, der, len); ++ ++ + ex7 = X509_EXTENSION_create_by_NID(NULL, v3nid, 1 /*critical*/, oct); + + ASN1_OCTET_STRING_free(oct); +@@ -683,8 +684,7 @@ + goto err; + } + +- ex_oct->data = (unsigned char*)data; +- ex_oct->length = datalen; ++ ASN1_STRING_set0(ex_oct, (unsigned char*)data, datalen); + + if (!(ex = X509_EXTENSION_create_by_OBJ(NULL, ex_obj, crit, ex_oct))) { + PRXYerr(PRXYERR_F_PROXY_SIGN,PRXYERR_R_CLASS_ADD_EXT); +@@ -694,8 +694,7 @@ + + if (ex_oct) { + /* avoid spurious free of the contents. */ +- ex_oct->length = 0; +- ex_oct->data = NULL; ++ ASN1_STRING_set0(ex_oct, NULL, 0); + ASN1_OCTET_STRING_free(ex_oct); + } + +@@ -806,10 +805,10 @@ + ASN1_BIT_STRING *usage = X509_get_ext_d2i(cert, NID_key_usage, NULL, NULL); + + if (usage) { +- if (usage->length > 0) +- keyusage = usage->data[0]; +- if (usage->length > 1) +- keyusage |= usage->data[1] << 8; ++ if (ASN1_STRING_length(usage) > 0) ++ keyusage = ASN1_STRING_get0_data(usage)[0]; ++ if (ASN1_STRING_length(usage) > 1) ++ keyusage |= ASN1_STRING_get0_data(usage)[1] << 8; + + ASN1_BIT_STRING_free(usage); + } +diff -ruN a/src/sslutils/proxycertinfo.c b/src/sslutils/proxycertinfo.c +--- a/src/sslutils/proxycertinfo.c 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/sslutils/proxycertinfo.c 2026-04-29 14:44:27.158966391 +0200 +@@ -107,9 +107,9 @@ + BIO_printf(out, "%*sPolicy Language: ", indent, ""); + i2a_ASN1_OBJECT(out, pci->proxyPolicy->policyLanguage); + BIO_puts(out, "\n"); +- if (pci->proxyPolicy->policy && pci->proxyPolicy->policy->data) ++ if (pci->proxyPolicy->policy && ASN1_STRING_get0_data(pci->proxyPolicy->policy)) + BIO_printf(out, "%*sPolicy Text: %s\n", indent, "", +- pci->proxyPolicy->policy->data); ++ ASN1_STRING_get0_data(pci->proxyPolicy->policy)); + return 1; + } + +@@ -142,11 +142,11 @@ + { + if(policy->policy) + { +- (*length) = policy->policy->length; +- if(*length > 0 && policy->policy->data) ++ (*length) = ASN1_STRING_length(policy->policy); ++ if(*length > 0 && ASN1_STRING_get0_data(policy->policy)) + { + unsigned char * copy = malloc(*length); +- memcpy(copy, policy->policy->data, *length); ++ memcpy(copy, ASN1_STRING_get0_data(policy->policy), *length); + return copy; + } + } +diff -ruN a/src/sslutils/sslutils.c b/src/sslutils/sslutils.c +--- a/src/sslutils/sslutils.c 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/sslutils/sslutils.c 2026-04-29 14:45:33.014031670 +0200 +@@ -404,10 +404,12 @@ + void PRIVATE + ERR_set_continue_needed(void) + { ++#if OPENSSL_VERSION_NUMBER < 0x40000000L + ERR_STATE *es; + es = ERR_get_state(); + es->err_data_flags[es->top] = + es->err_data_flags[es->top] | ERR_DISPLAY_CONTINUE_NEEDED; ++#endif + } + + +@@ -1669,8 +1671,8 @@ + + int PRIVATE + proxy_check_issued(UNUSED(X509_STORE_CTX * ctx), +- X509 * x, +- X509 * issuer) ++ const X509 * x, ++ const X509 * issuer) + { + int return_value; + int return_code = 1; +@@ -3268,7 +3270,7 @@ + struct tm tm; + int size = 0; + +- switch (ctm->type) { ++ switch (ASN1_STRING_type(ctm)) { + case V_ASN1_UTCTIME: + size=10; + break; +@@ -3277,8 +3279,8 @@ + break; + } + p = buff1; +- i = ctm->length; +- str = (char *)ctm->data; ++ i = ASN1_STRING_length(ctm); ++ str = (char *)ASN1_STRING_get0_data(ctm); + if ((i < 11) || (i > 17)) { + return 0; + } +@@ -3311,7 +3313,7 @@ + + tm.tm_isdst = 0; + int index = 0; +- if (ctm->type == V_ASN1_UTCTIME) { ++ if (ASN1_STRING_type(ctm) == V_ASN1_UTCTIME) { + tm.tm_year = (buff1[index++]-'0')*10; + tm.tm_year += (buff1[index++]-'0'); + } +diff -ruN a/src/sslutils/voms_cert_type.c b/src/sslutils/voms_cert_type.c +--- a/src/sslutils/voms_cert_type.c 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/sslutils/voms_cert_type.c 2026-04-29 15:05:46.737365952 +0200 +@@ -256,11 +256,11 @@ + + ne_data = X509_NAME_ENTRY_get_data(ne); + +- if (ne_data->length == 5 && !memcmp(ne_data->data,"proxy",5)) ++ if (ASN1_STRING_length(ne_data) == 5 && !memcmp(ASN1_STRING_get0_data(ne_data),"proxy",5)) + { + *cert_type = VOMS_CERT_TYPE_GSI_2_PROXY; + } +- else if (ne_data->length == 13 && !memcmp(ne_data->data,"limited proxy",13)) ++ else if (ASN1_STRING_length(ne_data) == 13 && !memcmp(ASN1_STRING_get0_data(ne_data),"limited proxy",13)) + { + *cert_type = VOMS_CERT_TYPE_GSI_2_LIMITED_PROXY; + } +@@ -293,7 +293,7 @@ + ne_data = X509_NAME_ENTRY_get_data(ne); + + if ((new_ne = X509_NAME_ENTRY_create_by_NID( NULL, NID_commonName, +- ne_data->type, ne_data->data, -1)) == NULL){ ++ ASN1_STRING_type(ne_data), ASN1_STRING_get0_data(ne_data), -1)) == NULL){ + + result = voms_validation_error( + PRXYERR_R_ERROR_BUILDING_SUBJECT, +diff -ruN a/src/utils/voms_proxy_info.cc b/src/utils/voms_proxy_info.cc +--- a/src/utils/voms_proxy_info.cc 2025-12-18 13:39:27.000000000 +0100 ++++ b/src/utils/voms_proxy_info.cc 2026-04-29 16:06:20.035319031 +0200 +@@ -466,18 +466,10 @@ + static ASN1_TIME * + convtime(std::string data) + { +- ASN1_TIME *t= ASN1_TIME_new(); +- +- t->data = (unsigned char*)strdup(data.data()); +- t->length = data.size(); +- switch(t->length) { +- case 10: +- t->type = V_ASN1_UTCTIME; +- break; +- case 15: +- t->type = V_ASN1_GENERALIZEDTIME; +- break; +- default: ++ ASN1_TIME *t = ASN1_TIME_new(); ++ if (!t) ++ return NULL; ++ if (!ASN1_TIME_set_string(t, data.c_str())) { + ASN1_TIME_free(t); + return NULL; + } diff --git a/voms.spec b/voms.spec index c0cf071..de614d6 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -13,6 +13,8 @@ Source1: %{name}.INSTALL # System user creation config Source2: %{name}-sysusers.conf +Patch0: voms-openssl4.patch + BuildRequires: make BuildRequires: gcc-c++ BuildRequires: openssl-devel @@ -104,6 +106,7 @@ This package provides the VOMS service. %prep %setup -q +%patch 0 -p1 -b .openssl4 ./autogen.sh @@ -296,6 +299,9 @@ fi %doc README.Fedora %changelog +* Wed Apr 29 2026 Dmitry Belyavskiy - 2.1.3-4 +- Fix build with OpenSSL 4.0 (opaque ASN1_STRING, const X509, removed ERR_STATE) + * Tue Jan 20 2026 Mattias Ellert - 2.1.3-3 - Rebuild for gsoap 2.8.139 (Fedora 44) From ed993e5794420da661ad776c9ac761e29536e75c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 12 Jun 2026 16:41:18 -0400 Subject: [PATCH 12/14] Rebuilt for openssl 4.0 --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index de614d6..8a6153a 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -299,6 +299,9 @@ fi %doc README.Fedora %changelog +* Fri Jun 12 2026 Yaakov Selkowitz - 2.1.3-5 +- Rebuilt for openssl 4.0 + * Wed Apr 29 2026 Dmitry Belyavskiy - 2.1.3-4 - Fix build with OpenSSL 4.0 (opaque ASN1_STRING, const X509, removed ERR_STATE) From 54b6a3dbb5a8842e7a14c6435fba28afdd8734fb Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 15 Jun 2026 06:42:22 -0400 Subject: [PATCH 13/14] Rebuilt for gsoap 2.8.142 --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index 8a6153a..8e9297f 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -299,6 +299,9 @@ fi %doc README.Fedora %changelog +* Mon Jun 15 2026 Yaakov Selkowitz - 2.1.3-6 +- Rebuilt for gsoap 2.8.142 + * Fri Jun 12 2026 Yaakov Selkowitz - 2.1.3-5 - Rebuilt for openssl 4.0 From 8ed4ff1058416973c17843d3647f49dd6b973c07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:36:52 +0000 Subject: [PATCH 14/14] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- voms.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/voms.spec b/voms.spec index 8e9297f..c501ac4 100644 --- a/voms.spec +++ b/voms.spec @@ -2,7 +2,7 @@ Name: voms Version: 2.1.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Virtual Organization Membership Service License: Apache-2.0 @@ -299,6 +299,9 @@ fi %doc README.Fedora %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 2.1.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Mon Jun 15 2026 Yaakov Selkowitz - 2.1.3-6 - Rebuilt for gsoap 2.8.142