From f4216fc3bd6640e179f8858c0a2c1ae53442ec190c972c13244ff661eeee0acd Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 27 Nov 2022 09:58:56 +0000 Subject: [PATCH 1/4] - Delete system-libs.patch OBS-URL: https://build.opensuse.org/package/show/security:forensics/libuna?expand=0&rev=34 --- libuna.changes | 6 +++++ libuna.spec | 4 +-- system-libs.patch | 66 ----------------------------------------------- 3 files changed, 8 insertions(+), 68 deletions(-) delete mode 100644 system-libs.patch diff --git a/libuna.changes b/libuna.changes index badbba6..8a52f94 100644 --- a/libuna.changes +++ b/libuna.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Nov 26 16:43:24 UTC 2022 - Jan Engelhardt + +- Delete system-libs.patch (not needed - system libs are + autodetected) + ------------------------------------------------------------------- Mon Aug 29 09:30:38 UTC 2022 - Jan Engelhardt diff --git a/libuna.spec b/libuna.spec index 0089046..417e771 100644 --- a/libuna.spec +++ b/libuna.spec @@ -35,7 +35,6 @@ Source: https://github.com/libyal/libuna/releases/download/%version/libu Source2: https://github.com/libyal/libuna/releases/download/%version/libuna-alpha-%version.tar.gz.asc Source3: libuna.keyring Source99: libuna-rpmlintrc -Patch1: system-libs.patch BuildRequires: c_compiler BuildRequires: gettext-tools >= 0.18.1 BuildRequires: libtool @@ -47,6 +46,7 @@ BuildRequires: pkgconfig(libcfile) >= 20220106 %endif BuildRequires: pkgconfig(libclocale) >= 20220107 BuildRequires: pkgconfig(libcnotify) >= 20220108 +# Various notes: https://en.opensuse.org/libyal %description libuna is a library to support Unicode and ASCII (byte string) @@ -92,7 +92,6 @@ applications that want to make use of libuna. %build autoreconf -fi -# see libcdata for version-sc echo "V_%version { global: *; };" >v.sym %configure \ %if "@BUILD_FLAVOR@" == "mini" @@ -100,6 +99,7 @@ echo "V_%version { global: *; };" >v.sym %endif --disable-static --enable-wide-character-type \ LDFLAGS="-Wl,--version-script=$PWD/v.sym" +grep ' local' config.log && exit 1 %make_build %install diff --git a/system-libs.patch b/system-libs.patch deleted file mode 100644 index e4df2b0..0000000 --- a/system-libs.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- - Makefile.am | 12 +++++------- - configure.ac | 7 ++----- - manuals/Makefile.am | 4 +++- - 3 files changed, 10 insertions(+), 13 deletions(-) - -Index: libuna-20210418/Makefile.am -=================================================================== ---- libuna-20210418.orig/Makefile.am -+++ libuna-20210418/Makefile.am -@@ -3,13 +3,11 @@ ACLOCAL_AMFLAGS = -I m4 - SUBDIRS = \ - include \ - common \ -- libcerror \ -- libuna \ -- libcdatetime \ -- libclocale \ -- libcnotify \ -- libcfile \ -- unatools \ -+ libuna -+if MAKE_TOOLS -+SUBDIRS += unatools -+endif -+SUBDIRS += \ - po \ - documents \ - manuals \ -Index: libuna-20210418/configure.ac -=================================================================== ---- libuna-20210418.orig/configure.ac -+++ libuna-20210418/configure.ac -@@ -115,16 +115,13 @@ AC_SUBST( - [SPEC_DATE], - [`date +"%a %b %e %Y" 2> /dev/null`]) - -+AC_ARG_ENABLE([tools], [AS_HELP_STRING([--disable-tools], [Do not build tools])], [make_tools=0], [make_tools=1]) -+AM_CONDITIONAL([MAKE_TOOLS], [test "$make_tools" = 1]) - dnl Generate Makefiles - AC_CONFIG_FILES([Makefile]) - AC_CONFIG_FILES([include/Makefile]) - AC_CONFIG_FILES([common/Makefile]) --AC_CONFIG_FILES([libcerror/Makefile]) - AC_CONFIG_FILES([libuna/Makefile]) --AC_CONFIG_FILES([libcdatetime/Makefile]) --AC_CONFIG_FILES([libclocale/Makefile]) --AC_CONFIG_FILES([libcnotify/Makefile]) --AC_CONFIG_FILES([libcfile/Makefile]) - AC_CONFIG_FILES([unatools/Makefile]) - AC_CONFIG_FILES([po/Makefile.in]) - AC_CONFIG_FILES([po/Makevars]) -Index: libuna-20210418/manuals/Makefile.am -=================================================================== ---- libuna-20210418.orig/manuals/Makefile.am -+++ libuna-20210418/manuals/Makefile.am -@@ -1,6 +1,8 @@ - man_MANS = \ -- unaexport.1 \ - libuna.3 -+if MAKE_TOOLS -+man_MANS += unaexport.1 -+endif - - EXTRA_DIST = \ - unaexport.1 \ From 1e7f89d98ad05e6a81a5be059a341ea986ed4c9f209ada3658da7a8ff20e764f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 27 Nov 2022 10:03:01 +0000 Subject: [PATCH 2/4] OBS-URL: https://build.opensuse.org/package/show/security:forensics/libuna?expand=0&rev=35 --- libuna.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libuna.spec b/libuna.spec index 417e771..290ec28 100644 --- a/libuna.spec +++ b/libuna.spec @@ -99,7 +99,9 @@ echo "V_%version { global: *; };" >v.sym %endif --disable-static --enable-wide-character-type \ LDFLAGS="-Wl,--version-script=$PWD/v.sym" +%if "@BUILD_FLAVOR@" != "mini" grep ' local' config.log && exit 1 +%endif %make_build %install From a65f4c2e5b8669bc66c3d205b8511913c94d0cf1ba0d359e3a34c42ae8bdac54 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 27 Nov 2022 10:28:10 +0000 Subject: [PATCH 3/4] Rework -mini package to build but delete tools Without system-libs.patch, tools will be built, and they will use the bundled libcfile. But we do not need the tools at this stage anyway, so just leave them deleted like before. OBS-URL: https://build.opensuse.org/package/show/security:forensics/libuna?expand=0&rev=36 --- libuna.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libuna.spec b/libuna.spec index 290ec28..43462a1 100644 --- a/libuna.spec +++ b/libuna.spec @@ -106,7 +106,11 @@ grep ' local' config.log && exit 1 %install %make_install -rm -f "%buildroot/%_libdir"/*.la +b="%buildroot" +rm -f "$b/%_libdir"/*.la +%if "@BUILD_FLAVOR@" == "mini" +rm -Rf "$b/%_bindir" "$b/%_mandir/man1" +%endif %post -n %lname%psuffix -p /sbin/ldconfig %postun -n %lname%psuffix -p /sbin/ldconfig From 6de94ab3e1fa9e6c07157574756154f2c8045c4f6849e581c5923f07a3f0098e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 27 Nov 2022 11:04:03 +0000 Subject: [PATCH 4/4] no patching -> no need for autoreconf OBS-URL: https://build.opensuse.org/package/show/security:forensics/libuna?expand=0&rev=37 --- libuna.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/libuna.spec b/libuna.spec index 43462a1..ecdbed2 100644 --- a/libuna.spec +++ b/libuna.spec @@ -36,8 +36,6 @@ Source2: https://github.com/libyal/libuna/releases/download/%version/libu Source3: libuna.keyring Source99: libuna-rpmlintrc BuildRequires: c_compiler -BuildRequires: gettext-tools >= 0.18.1 -BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(libcdatetime) >= 20220104 BuildRequires: pkgconfig(libcerror) >= 20220101 @@ -91,7 +89,6 @@ applications that want to make use of libuna. %autosetup -p1 -n libuna-%version %build -autoreconf -fi echo "V_%version { global: *; };" >v.sym %configure \ %if "@BUILD_FLAVOR@" == "mini"