From 08663ee8f6e915988de892a36f8de76ca2dcbdbd Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 26 Oct 2024 18:42:24 +0800 Subject: [PATCH] do not produce perllocal.pod and packlist when installing perl bindings --- ...uild-failure-due-to-automake-upgrade.patch | 15 ------ backport-misc-adjust-to-libxml-2.12.patch | 50 +++++++++++++++++++ lasso-perl-bindings-build-options.patch | 11 ++++ lasso.spec | 33 ++++++------ 4 files changed, 77 insertions(+), 32 deletions(-) delete mode 100644 Fix-build-failure-due-to-automake-upgrade.patch create mode 100644 backport-misc-adjust-to-libxml-2.12.patch create mode 100644 lasso-perl-bindings-build-options.patch diff --git a/Fix-build-failure-due-to-automake-upgrade.patch b/Fix-build-failure-due-to-automake-upgrade.patch deleted file mode 100644 index 69e2f5f..0000000 --- a/Fix-build-failure-due-to-automake-upgrade.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nur a/autogen.sh b/autogen.sh ---- a/autogen.sh 2021-04-29 21:10:58.149803718 +0800 -+++ b/autogen.sh 2024-07-22 17:15:47.682690860 +0800 -@@ -27,7 +27,10 @@ - DIE=1 - } - --if automake-1.16 --version < /dev/null > /dev/null 2>&1; then -+if automake-1.17 --version < /dev/null > /dev/null 2>&1; then -+ AUTOMAKE=automake-1.17 -+ ACLOCAL=aclocal-1.17 -+elif automake-1.16 --version < /dev/null > /dev/null 2>&1; then - AUTOMAKE=automake-1.16 - ACLOCAL=aclocal-1.16 - elif automake-1.15 --version < /dev/null > /dev/null 2>&1; then diff --git a/backport-misc-adjust-to-libxml-2.12.patch b/backport-misc-adjust-to-libxml-2.12.patch new file mode 100644 index 0000000..3b5ac5c --- /dev/null +++ b/backport-misc-adjust-to-libxml-2.12.patch @@ -0,0 +1,50 @@ +From cbe2c45455d93ed793dc4be59e3d2d26f1bd1111 Mon Sep 17 00:00:00 2001 +From: Benjamin Dauvergne +Date: Wed, 24 Jan 2024 15:15:39 +0100 +Subject: [PATCH] misc: adjust to structured error callback argument change in + libxml2 2.12 (#86080) + +--- + lasso/lasso.c | 8 +++++++- + lasso/xml/tools.c | 9 ++++++++- + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/lasso/lasso.c b/lasso/lasso.c +index 42b7d6bb..bc75f5e6 100644 +--- a/lasso/lasso.c ++++ b/lasso/lasso.c +@@ -138,7 +138,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) + #include "types.c" + + static void +-lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error) ++lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error ++#else ++ xmlErrorPtr error ++#endif ++ ) + { + g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message); + } +diff --git a/lasso/xml/tools.c b/lasso/xml/tools.c +index bbc87d9f..4d5fa78a 100644 +--- a/lasso/xml/tools.c ++++ b/lasso/xml/tools.c +@@ -1450,7 +1450,14 @@ lasso_concat_url_query(const char *url, const char *query) + } + } + +-static void structuredErrorFunc (void *userData, xmlErrorPtr error) { ++static void structuredErrorFunc (void *userData, ++#if LIBXML_VERSION >= 21200 ++ const xmlError *error ++#else ++ xmlErrorPtr error ++#endif ++ ) ++{ + *(int*)userData = error->code; + } + diff --git a/lasso-perl-bindings-build-options.patch b/lasso-perl-bindings-build-options.patch new file mode 100644 index 0000000..129805f --- /dev/null +++ b/lasso-perl-bindings-build-options.patch @@ -0,0 +1,11 @@ +--- lasso-2.8.2/bindings/perl/Makefile.am.orig 2024-10-26 13:00:36.875545200 +0800 ++++ lasso-2.8.2/bindings/perl/Makefile.am 2024-10-26 13:03:52.835188200 +0800 +@@ -38,7 +38,7 @@ + done; \ + chmod -R u+rwX $(TOCOPY); \ + fi; +- $(AM_V_SUBMAKE) $(PERL) Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) PREFIX=$(prefix) CCFLAGS="$(LASSO_XS_CFLAGS)" INC="-I. -I$(top_srcdir) -I$(srcdir)" LIBS="`$(top_builddir)/lasso-src-config --libs` $(LDFLAGS)" OPTIMIZE="-g" $(AM_V_SUBMAKE_POSTFIX) ++ $(AM_V_SUBMAKE) $(PERL) Makefile.PL INSTALLDIRS=vendor DESTDIR=$(DESTDIR) PREFIX=$(prefix) CCFLAGS="$(LASSO_XS_CFLAGS)" INC="-I. -I$(top_srcdir) -I$(srcdir)" LIBS="$(LDFLAGS) `$(top_builddir)/lasso-src-config --libs`" NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="-g" $(AM_V_SUBMAKE_POSTFIX) + + Lasso.xs Lasso.pm: lang.py typemap-in typemap-out + $(AM_V_GEN) $(PYTHON) $(top_srcdir)/bindings/bindings.py -l perl --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) diff --git a/lasso.spec b/lasso.spec index 2fd5218..1e1c69d 100644 --- a/lasso.spec +++ b/lasso.spec @@ -1,11 +1,12 @@ Name: lasso Version: 2.8.2 -Release: 2 +Release: 3 Summary: Liberty Alliance Single Sign On -License: GPLv2+ +License: GPL-2.0-or-later URL: http://lasso.entrouvert.org/ Source: http://dev.entrouvert.org/lasso/lasso-%{version}.tar.gz -Patch0001: Fix-build-failure-due-to-automake-upgrade.patch +Patch0001: lasso-perl-bindings-build-options.patch +Patch6001: backport-misc-adjust-to-libxml-2.12.patch Requires: xmlsec1 >= 1.2.25-4 BuildRequires: autoconf automake check-devel glib2-devel gtk-doc libtool @@ -47,11 +48,7 @@ Requires: python3 lasso = %{version}-%{release} The package provide Python language bindings for the lasso (Liberty Alliance Single Sign On)library. -%package help -Summary: Help document for the lasso packages - -%description help -Help document for the lasso packages +%package_help %prep %autosetup -n lasso-%{version} -p1 @@ -60,31 +57,29 @@ sed -i -E -e '/^#![[:blank:]]*(\/usr\/bin\/env[[:blank:]]+python[^3]?\>) \ |(/usr/bin/env[[:blank:]]+python[^3]?)' *` %build -./autogen.sh +autoreconf -fi %configure --enable-php5=no --with-python=%{__python3} -%make_build CFLAGS="%{optflags}" +%make_build %check -make check CK_TIMEOUT_MULTIPLIER=10 +%make_build check CK_TIMEOUT_MULTIPLIER=10 %install %make_install exec_prefix=%{_prefix} DESTDIR=%{buildroot} -find %{buildroot} -type f -name '*.la' -exec rm -f {} \; -find %{buildroot} -type f -name '*.a' -exec rm -f {} \; -find %{buildroot} \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; +%delete_la_and_a + find %{buildroot}/usr/lib*/perl5 -type f -print | sed "s@^%{buildroot}@@g" > lasso-perl-filelist if [ "$(cat lasso-perl-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig + +rm -fr %{buildroot}%{_datadir}/doc/ %files %license COPYING %{_libdir}/liblasso.so.3* -%exclude %{_defaultdocdir}/lasso %files devel %{_includedir}/lasso @@ -99,6 +94,10 @@ fi %doc AUTHORS NEWS README %changelog +* Sat Oct 26 2024 Funda Wang - 2.8.2-3 +- do not produce perllocal.pod and packlist when installing perl bindings +- adjust to structured error callback argument change in libxml2 2.12 + * Mon Jul 22 2024 yuanlipeng - 2.8.2-2 - Fix build failure due to automake upgrade -- Gitee