Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Python Maint
b46c8c1baf Rebuilt for Python 3.15.0b4 ABI change 2026-07-22 10:52:03 +02:00
Fedora Release Engineering
7216bd099b Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 17:18:08 +00:00
Jerry James
ea303f388f Use the cmake declarative buildsystem
- Drop unused BuildRequires
2026-07-14 19:23:08 -06:00
Yaakov Selkowitz
c0f21942dd Rebuilt for openssl 4.0 2026-06-12 19:28:14 -04:00
Python Maint
4db7149a82 Rebuilt for Python 3.15 2026-06-03 23:37:25 +02:00
Jerry James
7ce89990c4 Adapt to changes in OpenSSL 4.0 2026-04-14 14:01:23 -06:00
2 changed files with 176 additions and 77 deletions

157
pl.spec
View file

@ -1,3 +1,6 @@
# Whether to run tests
%bcond ctest 1
# Name of the architecture-specific lib directory # Name of the architecture-specific lib directory
%global swipl_arch %{_target_cpu}-linux %global swipl_arch %{_target_cpu}-linux
@ -25,12 +28,27 @@ Patch2: swipl-8.2.0-unbundle-libstemmer.patch
Patch3: swipl-9.2.7-inclpr-math.patch Patch3: swipl-9.2.7-inclpr-math.patch
# Use zlib-ng directly rather than via the zlib compatibility interface # Use zlib-ng directly rather than via the zlib compatibility interface
Patch4: swipl-10.0.1-zlib-ng.patch Patch4: swipl-10.0.1-zlib-ng.patch
# Adapt to changes in OpenSSL 4.0
# https://github.com/SWI-Prolog/packages-ssl/pull/174
Patch5: swipl-10.0.2-openssl4.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86} ExcludeArch: %{ix86}
BuildSystem: cmake
BuildOption(conf): -DBUILD_PDF_DOCUMENTATION:BOOL=%{?fedora:ON}%{!?fedora:OFF}
BuildOption(conf): -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir}
BuildOption(conf): -DCPACK_GENERATOR:STRING=RPM
BuildOption(conf): -DINSTALL_TESTS:BOOL=ON
BuildOption(conf): -DJQUERYDIR:PATH=%{_datadir}/javascript/jquery/latest
BuildOption(conf): -DSKIP_SSL_TESTS:BOOL=ON
BuildOption(conf): -DSWIPL_INSTALL_IN_LIB:BOOL=ON
BuildOption(conf): -DSWIPL_INSTALL_IN_SHARE:BOOL=ON
BuildOption(conf): -DSWIPL_VERSIONED_DIR:BOOL=OFF
BuildOption(conf): -DSYSTEM_LIBEDIT:BOOL=ON
BuildOption(conf): -DUSE_TCMALLOC:BOOL=ON
BuildOption(conf): -G Ninja
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: findutils BuildRequires: findutils
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: ninja-build BuildRequires: ninja-build
@ -49,8 +67,6 @@ BuildRequires: pkgconfig(libarchive)
BuildRequires: libdb-devel BuildRequires: libdb-devel
# crypt # crypt
BuildRequires: libxcrypt-devel BuildRequires: libxcrypt-devel
# http
BuildRequires: js-jquery
# jpl # jpl
%ifarch %{java_arches} %ifarch %{java_arches}
BuildRequires: java-25-devel BuildRequires: java-25-devel
@ -64,7 +80,6 @@ BuildRequires: libstemmer-devel
# ODBC # ODBC
BuildRequires: pkgconfig(odbc) BuildRequires: pkgconfig(odbc)
# SSL # SSL
BuildRequires: openssl
BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(openssl)
# sweep # sweep
BuildRequires: emacs-devel BuildRequires: emacs-devel
@ -89,11 +104,21 @@ BuildRequires: pkgconfig(yaml-0.1)
# Doc building # Doc building
# Gated to Fedora as EL is currently missing tex(a4wide.sty) # Gated to Fedora as EL is currently missing tex(a4wide.sty)
%if 0%{?fedora} %if 0%{?fedora}
BuildRequires: tex(latex) BuildRequires: tex(a4.sty)
BuildRequires: tex(a4wide.sty) BuildRequires: tex(a4wide.sty)
BuildRequires: tex(color.sty)
BuildRequires: tex(dcolumn.sty)
BuildRequires: tex(fancyvrb.sty)
BuildRequires: tex(graphicx.sty)
BuildRequires: tex(hyperref.sty)
BuildRequires: tex(ifpdf.sty)
BuildRequires: tex(longtable.sty)
BuildRequires: tex(tabulary.sty) BuildRequires: tex(tabulary.sty)
BuildRequires: tex(url.sty)
BuildRequires: texlive-courier BuildRequires: texlive-courier
BuildRequires: texlive-helvetic BuildRequires: texlive-helvetic
BuildRequires: texlive-latex
BuildRequires: texlive-latex-base-dev
BuildRequires: texlive-times BuildRequires: texlive-times
%endif %endif
@ -154,14 +179,14 @@ This is a metapackage, which installs the full SWI-Prolog suite, except tests.
# and other development files are included in this package. It is a Prolog # and other development files are included in this package. It is a Prolog
# compiler, and therefore is a development package itself. # compiler, and therefore is a development package itself.
License: %{shrink: License: %{shrink:
BSD-2-Clause AND BSD-2-Clause
(Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later)
BSD-3-Clause AND AND BSD-3-Clause
dtoa AND AND dtoa
LicenseRef-Fedora-Public-Domain AND AND LicenseRef-Fedora-Public-Domain
MIT AND AND MIT
Unicode-DFS-2016 AND AND Unicode-DFS-2016
Zlib AND Zlib
} }
Summary: ISO/Edinburgh-style Prolog interpreter - core system Summary: ISO/Edinburgh-style Prolog interpreter - core system
Recommends: swi-prolog-bdb%{?_isa} = %{version}-%{release} Recommends: swi-prolog-bdb%{?_isa} = %{version}-%{release}
@ -180,21 +205,21 @@ This package contains the core SWI-Prolog system.
%package -n swi-prolog-core-packages %package -n swi-prolog-core-packages
License: %{shrink: License: %{shrink:
BSD-2-Clause AND BSD-2-Clause
Beerware AND AND Beerware
(Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later)
(BSD-2-Clause OR Artistic-2.0) AND AND (BSD-2-Clause OR Artistic-2.0)
BSD-3-Clause AND AND BSD-3-Clause
GFDL-1.3-no-invariants-or-later AND AND GFDL-1.3-no-invariants-or-later
(GPL-1.0-or-later OR Artistic-1.0-Perl) AND AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
GPL-2.0-or-later WITH SWI-exception AND AND GPL-2.0-or-later WITH SWI-exception
GPL-3.0-or-later AND AND GPL-3.0-or-later
LGPL-2.0-or-later AND AND LGPL-2.0-or-later
LicenseRef-Fedora-Public-Domain AND AND LicenseRef-Fedora-Public-Domain
MIT AND AND MIT
Unicode-DFS-2016 AND AND Unicode-DFS-2016
W3C AND AND W3C
Zlib AND Zlib
} }
Summary: ISO/Edinburgh-style Prolog interpreter - core packages Summary: ISO/Edinburgh-style Prolog interpreter - core packages
Requires: swi-prolog-core%{?_isa} = %{version}-%{release} Requires: swi-prolog-core%{?_isa} = %{version}-%{release}
@ -240,17 +265,17 @@ but no GUI components.
%package -n swi-prolog-win %package -n swi-prolog-win
License: %{shrink: License: %{shrink:
BSD-2-Clause AND BSD-2-Clause
CC-BY-SA-3.0 AND AND CC-BY-SA-3.0
FBM AND AND FBM
GPL-2.0-or-later WITH Bison-exception-2.2 AND AND GPL-2.0-or-later WITH Bison-exception-2.2
HPND-Pbmplus AND AND HPND-Pbmplus
IJG AND AND IJG
Knuth-CTAN AND AND Knuth-CTAN
LicenseRef-Fedora-Public-Domain AND AND LicenseRef-Fedora-Public-Domain
PostgreSQL AND AND PostgreSQL
Spencer-99 AND AND Spencer-99
TCL AND TCL
} }
Summary: ISO/Edinburgh-style Prolog interpreter - with GUI support Summary: ISO/Edinburgh-style Prolog interpreter - with GUI support
Requires: swi-prolog-cli%{?_isa} = %{version}-%{release} Requires: swi-prolog-cli%{?_isa} = %{version}-%{release}
@ -335,10 +360,10 @@ embedded database.
%package -n swi-prolog-doc %package -n swi-prolog-doc
License: %{shrink: License: %{shrink:
BSD-2-Clause AND BSD-2-Clause
CC-BY-SA-3.0 AND AND CC-BY-SA-3.0
Knuth-CTAN AND AND Knuth-CTAN
LPPL-1.3c AND LPPL-1.3c
} }
Summary: Documentation and examples for SWI-Prolog Summary: Documentation and examples for SWI-Prolog
BuildArch: noarch BuildArch: noarch
@ -355,10 +380,10 @@ This package provides documentation and examples.
%package -n swi-prolog-test %package -n swi-prolog-test
License: %{shrink: License: %{shrink:
BSD-2-Clause AND BSD-2-Clause
GPL-2.0-or-later AND AND GPL-2.0-or-later
GPL-2.0-or-later WITH SWI-exception AND AND GPL-2.0-or-later WITH SWI-exception
LGPL-2.1-or-later AND LGPL-2.1-or-later
} }
Summary: Tests and checks for SWI-Prolog Summary: Tests and checks for SWI-Prolog
BuildArch: noarch BuildArch: noarch
@ -379,7 +404,6 @@ package, you do not.
%autopatch -p1 -m1 %autopatch -p1 -m1
cp -p %{SOURCE2} . cp -p %{SOURCE2} .
%conf
# Fix the installation path on 64-bit systems # Fix the installation path on 64-bit systems
if [ "%{_lib}" = "lib64" ]; then if [ "%{_lib}" = "lib64" ]; then
sed -e 's,lib\(/\${SWIPL_INSTALL_DIR}\),lib64\1,' \ sed -e 's,lib\(/\${SWIPL_INSTALL_DIR}\),lib64\1,' \
@ -410,10 +434,9 @@ ln -s %{_texmf_main}/tex/texinfo/texinfo.tex packages/xpce/man/info
cp -p customize/README.md README-customize.md cp -p customize/README.md README-customize.md
%generate_buildrequires %generate_buildrequires
cd packages/mqi/python %pyproject_buildrequires -d packages/mqi/python
%pyproject_buildrequires
%build %conf -p
%ifarch %{java_arches} %ifarch %{java_arches}
export JAVA_HOME=%{java_home} export JAVA_HOME=%{java_home}
export LD_LIBRARY_PATH=%{java_home}/lib/server export LD_LIBRARY_PATH=%{java_home}/lib/server
@ -422,21 +445,7 @@ export LD_LIBRARY_PATH=%{java_home}/lib/server
export DISABLE_PKGS="jpl" export DISABLE_PKGS="jpl"
%endif %endif
# Configure %build -p
%cmake \
-DBUILD_PDF_DOCUMENTATION:BOOL=%{?fedora:ON}%{!?fedora:OFF} \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
-DCPACK_GENERATOR:STRING=RPM \
-DINSTALL_TESTS:BOOL=ON \
-DJQUERYDIR:PATH=%{_datadir}/javascript/jquery/latest \
-DSKIP_SSL_TESTS:BOOL=ON \
-DSWIPL_INSTALL_IN_LIB:BOOL=ON \
-DSWIPL_INSTALL_IN_SHARE:BOOL=ON \
-DSWIPL_VERSIONED_DIR:BOOL=OFF \
-DSYSTEM_LIBEDIT:BOOL=ON \
-DUSE_TCMALLOC:BOOL=ON \
-G Ninja
# Help latex2html find the bibliographies # Help latex2html find the bibliographies
for d in $(find . -name gen); do for d in $(find . -name gen); do
target=$(dirname $d) target=$(dirname $d)
@ -444,15 +453,12 @@ for d in $(find . -name gen); do
cp -p $d/*.bbl %{_vpath_builddir}/$target cp -p $d/*.bbl %{_vpath_builddir}/$target
done done
# Build %build -a
%cmake_build
# Switch back before installing; see above # Switch back before installing; see above
cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl
%install %install -a
# See <http://www.swi-prolog.org/build/guidelines.html> for file layout # See <http://www.swi-prolog.org/build/guidelines.html> for file layout
%cmake_install
# Scripts with shebang should be executable # Scripts with shebang should be executable
chmod 0755 \ chmod 0755 \
@ -527,15 +533,12 @@ mv %{buildroot}%{_libdir}/swipl/desktop/prolog-mime.xml \
%{buildroot}%{_datadir}/mime/packages %{buildroot}%{_datadir}/mime/packages
rmdir %{buildroot}%{_libdir}/swipl/desktop rmdir %{buildroot}%{_libdir}/swipl/desktop
# Link duplicates %check -p
%fdupes %{buildroot}%{_datadir}/swipl
%fdupes %{buildroot}%{_libdir}/swipl
%check
# Test with the original jpl.pl, since the new version refers to paths that # Test with the original jpl.pl, since the new version refers to paths that
# don't exist; then switch back. # don't exist; then switch back.
cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl cp -p packages/jpl/jpl.pl.jni packages/jpl/jpl.pl
%ctest
%check -a
cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl cp -p packages/jpl/jpl.pl.install packages/jpl/jpl.pl
%files -n swi-prolog %files -n swi-prolog

View file

@ -0,0 +1,96 @@
--- swipl-10.0.2/packages/ssl/ssl4pl.c.orig 2026-01-22 12:39:26.000000000 -0700
+++ swipl-10.0.2/packages/ssl/ssl4pl.c 2026-04-14 12:05:12.521302862 -0600
@@ -74,6 +74,12 @@
#define SSL_MAX_CERT_KEY_PAIRS 12
+#if OPENSSL_API_LEVEL < 40000
+#define ASN1_STRING_get0_data(x) (x)->data
+#define ASN1_STRING_length(x) (x)->length
+#define ASN1_STRING_type(x) (x)->type
+#endif
+
typedef int BOOL;
#ifndef TRUE
#define TRUE 1
@@ -458,12 +464,12 @@ unify_asn1_time(term_t term, const ASN1_
{ time_t result = 0;
char buffer[24];
char* pbuffer = buffer;
- size_t length = time->length;
- char * source = (char *)time->data;
+ size_t length = ASN1_STRING_length(time);
+ const char * source = (const char *)ASN1_STRING_get0_data(time);
struct tm time_tm;
time_t lSecondsFromUTC;
- if (time->type == V_ASN1_UTCTIME)
+ if (ASN1_STRING_type(time) == V_ASN1_UTCTIME)
{ if ((length < 11) || (length > 17))
{ ssl_deb(2, "Unable to parse time - expected either 11 or 17 chars,"
" not %d", length);
@@ -679,7 +685,7 @@ unify_hash(term_t hash, const ASN1_OBJEC
static int
-unify_name(term_t term, X509_NAME* name)
+unify_name(term_t term, const X509_NAME* name)
{ int ni;
term_t list = PL_copy_term_ref(term);
term_t item = PL_new_term_ref();
@@ -688,8 +694,8 @@ unify_name(term_t term, X509_NAME* name)
return PL_unify_term(term, PL_CHARS, "<null>");
for (ni = 0; ni < X509_NAME_entry_count(name); ni++)
- { X509_NAME_ENTRY* e = X509_NAME_get_entry(name, ni);
- ASN1_STRING* entry_data = X509_NAME_ENTRY_get_data(e);
+ { const X509_NAME_ENTRY* e = X509_NAME_get_entry(name, ni);
+ const ASN1_STRING* entry_data = X509_NAME_ENTRY_get_data(e);
unsigned char *utf8_data;
int rc;
@@ -775,7 +781,7 @@ unify_crl(term_t term, X509_CRL* crl)
unify_hash(hash, palg->algorithm, i2d_X509_CRL_INFO_wrapper, crl->crl) &&
#endif
unify_asn1_time(next_update, X509_CRL_get0_nextUpdate(crl)) &&
- unify_bytes_hex(signature, psig->length, psig->data) &&
+ unify_bytes_hex(signature, ASN1_STRING_length(psig), ASN1_STRING_get0_data(psig)) &&
PL_unify_term(term,
PL_LIST, 5,
PL_FUNCTOR, FUNCTOR_issuername1,
@@ -1325,7 +1331,7 @@ fetch_public_key(term_t Field, X509* cer
static foreign_t
fetch_crls(term_t Field, X509* cert)
{ unsigned int crl_ext_id;
- X509_EXTENSION * crl_ext = NULL;
+ const X509_EXTENSION * crl_ext = NULL;
crl_ext_id = X509_get_ext_by_NID(cert, NID_crl_distribution_points, -1);
crl_ext = X509_get_ext(cert, crl_ext_id);
@@ -1352,7 +1358,7 @@ fetch_crls(term_t Field, X509* cert)
{ name = sk_GENERAL_NAME_value(point->distpoint->name.fullname, j);
if (name != NULL && name->type == GEN_URI)
{ if (!(PL_unify_list(crl_list, crl_item, crl_list) &&
- PL_unify_atom_chars(crl_item, (const char *)name->d.ia5->data)))
+ PL_unify_atom_chars(crl_item, (const char *)ASN1_STRING_get0_data(name->d.ia5))))
{
CRL_DIST_POINTS_free(distpoints);
return FALSE;
@@ -1379,7 +1385,7 @@ fetch_crls(term_t Field, X509* cert)
static foreign_t
fetch_sans(term_t Field, X509* cert)
{ unsigned int san_ext_id;
- X509_EXTENSION * san_ext = NULL;
+ const X509_EXTENSION * san_ext = NULL;
san_ext_id = X509_get_ext_by_NID(cert, NID_subject_alt_name, -1);
san_ext = X509_get_ext(cert, san_ext_id);
@@ -1418,7 +1424,7 @@ fetch_signature(term_t Field, X509* cert
{ GET0SIG_CONST_T ASN1_BIT_STRING *psig;
GET0SIG_CONST_T X509_ALGOR *palg;
X509_get0_signature(&psig, &palg, cert);
- return unify_bytes_hex(Field, psig->length, psig->data);
+ return unify_bytes_hex(Field, ASN1_STRING_length(psig), ASN1_STRING_get0_data(psig));
}