Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b46c8c1baf | ||
|
|
7216bd099b | ||
|
|
ea303f388f | ||
|
|
c0f21942dd | ||
|
|
4db7149a82 | ||
|
|
7ce89990c4 |
2 changed files with 176 additions and 77 deletions
157
pl.spec
157
pl.spec
|
|
@ -1,3 +1,6 @@
|
|||
# Whether to run tests
|
||||
%bcond ctest 1
|
||||
|
||||
# Name of the architecture-specific lib directory
|
||||
%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
|
||||
# Use zlib-ng directly rather than via the zlib compatibility interface
|
||||
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
|
||||
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: fdupes
|
||||
BuildRequires: findutils
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: ninja-build
|
||||
|
|
@ -49,8 +67,6 @@ BuildRequires: pkgconfig(libarchive)
|
|||
BuildRequires: libdb-devel
|
||||
# crypt
|
||||
BuildRequires: libxcrypt-devel
|
||||
# http
|
||||
BuildRequires: js-jquery
|
||||
# jpl
|
||||
%ifarch %{java_arches}
|
||||
BuildRequires: java-25-devel
|
||||
|
|
@ -64,7 +80,6 @@ BuildRequires: libstemmer-devel
|
|||
# ODBC
|
||||
BuildRequires: pkgconfig(odbc)
|
||||
# SSL
|
||||
BuildRequires: openssl
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
# sweep
|
||||
BuildRequires: emacs-devel
|
||||
|
|
@ -89,11 +104,21 @@ BuildRequires: pkgconfig(yaml-0.1)
|
|||
# Doc building
|
||||
# Gated to Fedora as EL is currently missing tex(a4wide.sty)
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: tex(latex)
|
||||
BuildRequires: tex(a4.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(url.sty)
|
||||
BuildRequires: texlive-courier
|
||||
BuildRequires: texlive-helvetic
|
||||
BuildRequires: texlive-latex
|
||||
BuildRequires: texlive-latex-base-dev
|
||||
BuildRequires: texlive-times
|
||||
%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
|
||||
# compiler, and therefore is a development package itself.
|
||||
License: %{shrink:
|
||||
BSD-2-Clause AND
|
||||
(Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND
|
||||
BSD-3-Clause AND
|
||||
dtoa AND
|
||||
LicenseRef-Fedora-Public-Domain AND
|
||||
MIT AND
|
||||
Unicode-DFS-2016 AND
|
||||
Zlib
|
||||
BSD-2-Clause
|
||||
AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later)
|
||||
AND BSD-3-Clause
|
||||
AND dtoa
|
||||
AND LicenseRef-Fedora-Public-Domain
|
||||
AND MIT
|
||||
AND Unicode-DFS-2016
|
||||
AND Zlib
|
||||
}
|
||||
Summary: ISO/Edinburgh-style Prolog interpreter - core system
|
||||
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
|
||||
License: %{shrink:
|
||||
BSD-2-Clause AND
|
||||
Beerware AND
|
||||
(Brian-Gladman-3-Clause OR GPL-1.0-or-later) AND
|
||||
(BSD-2-Clause OR Artistic-2.0) AND
|
||||
BSD-3-Clause AND
|
||||
GFDL-1.3-no-invariants-or-later AND
|
||||
(GPL-1.0-or-later OR Artistic-1.0-Perl) AND
|
||||
GPL-2.0-or-later WITH SWI-exception AND
|
||||
GPL-3.0-or-later AND
|
||||
LGPL-2.0-or-later AND
|
||||
LicenseRef-Fedora-Public-Domain AND
|
||||
MIT AND
|
||||
Unicode-DFS-2016 AND
|
||||
W3C AND
|
||||
Zlib
|
||||
BSD-2-Clause
|
||||
AND Beerware
|
||||
AND (Brian-Gladman-3-Clause OR GPL-1.0-or-later)
|
||||
AND (BSD-2-Clause OR Artistic-2.0)
|
||||
AND BSD-3-Clause
|
||||
AND GFDL-1.3-no-invariants-or-later
|
||||
AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
|
||||
AND GPL-2.0-or-later WITH SWI-exception
|
||||
AND GPL-3.0-or-later
|
||||
AND LGPL-2.0-or-later
|
||||
AND LicenseRef-Fedora-Public-Domain
|
||||
AND MIT
|
||||
AND Unicode-DFS-2016
|
||||
AND W3C
|
||||
AND Zlib
|
||||
}
|
||||
Summary: ISO/Edinburgh-style Prolog interpreter - core packages
|
||||
Requires: swi-prolog-core%{?_isa} = %{version}-%{release}
|
||||
|
|
@ -240,17 +265,17 @@ but no GUI components.
|
|||
|
||||
%package -n swi-prolog-win
|
||||
License: %{shrink:
|
||||
BSD-2-Clause AND
|
||||
CC-BY-SA-3.0 AND
|
||||
FBM AND
|
||||
GPL-2.0-or-later WITH Bison-exception-2.2 AND
|
||||
HPND-Pbmplus AND
|
||||
IJG AND
|
||||
Knuth-CTAN AND
|
||||
LicenseRef-Fedora-Public-Domain AND
|
||||
PostgreSQL AND
|
||||
Spencer-99 AND
|
||||
TCL
|
||||
BSD-2-Clause
|
||||
AND CC-BY-SA-3.0
|
||||
AND FBM
|
||||
AND GPL-2.0-or-later WITH Bison-exception-2.2
|
||||
AND HPND-Pbmplus
|
||||
AND IJG
|
||||
AND Knuth-CTAN
|
||||
AND LicenseRef-Fedora-Public-Domain
|
||||
AND PostgreSQL
|
||||
AND Spencer-99
|
||||
AND TCL
|
||||
}
|
||||
Summary: ISO/Edinburgh-style Prolog interpreter - with GUI support
|
||||
Requires: swi-prolog-cli%{?_isa} = %{version}-%{release}
|
||||
|
|
@ -335,10 +360,10 @@ embedded database.
|
|||
|
||||
%package -n swi-prolog-doc
|
||||
License: %{shrink:
|
||||
BSD-2-Clause AND
|
||||
CC-BY-SA-3.0 AND
|
||||
Knuth-CTAN AND
|
||||
LPPL-1.3c
|
||||
BSD-2-Clause
|
||||
AND CC-BY-SA-3.0
|
||||
AND Knuth-CTAN
|
||||
AND LPPL-1.3c
|
||||
}
|
||||
Summary: Documentation and examples for SWI-Prolog
|
||||
BuildArch: noarch
|
||||
|
|
@ -355,10 +380,10 @@ This package provides documentation and examples.
|
|||
|
||||
%package -n swi-prolog-test
|
||||
License: %{shrink:
|
||||
BSD-2-Clause AND
|
||||
GPL-2.0-or-later AND
|
||||
GPL-2.0-or-later WITH SWI-exception AND
|
||||
LGPL-2.1-or-later
|
||||
BSD-2-Clause
|
||||
AND GPL-2.0-or-later
|
||||
AND GPL-2.0-or-later WITH SWI-exception
|
||||
AND LGPL-2.1-or-later
|
||||
}
|
||||
Summary: Tests and checks for SWI-Prolog
|
||||
BuildArch: noarch
|
||||
|
|
@ -379,7 +404,6 @@ package, you do not.
|
|||
%autopatch -p1 -m1
|
||||
cp -p %{SOURCE2} .
|
||||
|
||||
%conf
|
||||
# Fix the installation path on 64-bit systems
|
||||
if [ "%{_lib}" = "lib64" ]; then
|
||||
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
|
||||
|
||||
%generate_buildrequires
|
||||
cd packages/mqi/python
|
||||
%pyproject_buildrequires
|
||||
%pyproject_buildrequires -d packages/mqi/python
|
||||
|
||||
%build
|
||||
%conf -p
|
||||
%ifarch %{java_arches}
|
||||
export JAVA_HOME=%{java_home}
|
||||
export LD_LIBRARY_PATH=%{java_home}/lib/server
|
||||
|
|
@ -422,21 +445,7 @@ export LD_LIBRARY_PATH=%{java_home}/lib/server
|
|||
export DISABLE_PKGS="jpl"
|
||||
%endif
|
||||
|
||||
# Configure
|
||||
%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
|
||||
|
||||
%build -p
|
||||
# Help latex2html find the bibliographies
|
||||
for d in $(find . -name gen); do
|
||||
target=$(dirname $d)
|
||||
|
|
@ -444,15 +453,12 @@ for d in $(find . -name gen); do
|
|||
cp -p $d/*.bbl %{_vpath_builddir}/$target
|
||||
done
|
||||
|
||||
# Build
|
||||
%cmake_build
|
||||
|
||||
%build -a
|
||||
# Switch back before installing; see above
|
||||
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
|
||||
%cmake_install
|
||||
|
||||
# Scripts with shebang should be executable
|
||||
chmod 0755 \
|
||||
|
|
@ -527,15 +533,12 @@ mv %{buildroot}%{_libdir}/swipl/desktop/prolog-mime.xml \
|
|||
%{buildroot}%{_datadir}/mime/packages
|
||||
rmdir %{buildroot}%{_libdir}/swipl/desktop
|
||||
|
||||
# Link duplicates
|
||||
%fdupes %{buildroot}%{_datadir}/swipl
|
||||
%fdupes %{buildroot}%{_libdir}/swipl
|
||||
|
||||
%check
|
||||
%check -p
|
||||
# Test with the original jpl.pl, since the new version refers to paths that
|
||||
# don't exist; then switch back.
|
||||
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
|
||||
|
||||
%files -n swi-prolog
|
||||
|
|
|
|||
96
swipl-10.0.2-openssl4.patch
Normal file
96
swipl-10.0.2-openssl4.patch
Normal 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));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue