Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pgloader for openSUSE:Factory checked in at 2023-11-15 21:10:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pgloader (Old) and /work/SRC/openSUSE:Factory/.pgloader.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pgloader" Wed Nov 15 21:10:19 2023 rev:2 rq:1126548 version:3.6.9 Changes: -------- --- /work/SRC/openSUSE:Factory/pgloader/pgloader.changes 2023-02-10 14:34:22.413581082 +0100 +++ /work/SRC/openSUSE:Factory/.pgloader.new.17445/pgloader.changes 2023-11-15 21:13:45.683706367 +0100 @@ -1,0 +2,7 @@ +Mon Nov 13 17:49:27 UTC 2023 - Jan Engelhardt <jeng...@inai.de> + +- Partially undo change from Wed Aug 18 07:46:37 UTC 2021 and + replace the way the program is packaged following new findings + about how SBCL works. [boo#1215562] + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pgloader.spec ++++++ --- /var/tmp/diff_new_pack.bNeMbV/_old 2023-11-15 21:14:00.256244028 +0100 +++ /var/tmp/diff_new_pack.bNeMbV/_new 2023-11-15 21:14:00.280244914 +0100 @@ -39,6 +39,7 @@ %else BuildRequires: libopenssl-devel %endif +Requires: /usr/bin/sbcl %description pgloader imports data from different kind of sources and COPY it into @@ -55,7 +56,7 @@ from the pgloader command directly. %prep -%setup -q -n %{name}-bundle-%{version} +%autosetup -n %{name}-bundle-%{version} %build export CFLAGS="%{optflags}" @@ -65,25 +66,34 @@ %if "%{_arch}" == "i386" || "%{_arch}" == "arm" export DYNSIZE="DYNSIZE=1024" %endif -%make_build V=1 ${DYNSIZE} %{name} - -%install -install -d %{buildroot}%{_bindir} # -# SBCL produces ELF files that -# (1.) have excessive gaps and which could be fixed by objcopy/strip/etc. -# (2.) do not have any .debug_* sections, therefore rpm's debuginfo -# mechanism (would do strip) does not trigger at all. +# SBCL "programs" are similar to self-extracting archives, i.e. they are +# comprised of a well-known stub plus some data appended. Such appendages +# (called "core" in SBCL) are generally prone to getting removed by e.g. +# strip, upx, etc. +# +# Build just the core. This has two benefits: +# * reuse /usr/bin/sbcl interpreter and save bytes +# * the core itself is not ELF, so not subject to strip # -# Hence this copyin-copyout call with objcopy, which reduces filesize from 20MB -# to 300KB. +%make_build V=1 ${DYNSIZE} COMPRESS_CORE_OPT="--compress-core --core-only" %{name} + +%install +# That core is likely arch-dependent, so place into libexecdir not datadir. # -objcopy bin/pgloader %{buildroot}%{_bindir}/pgloader +mkdir -p "%{buildroot}/%{_bindir}" "%{buildroot}/%{_libexecdir}/%{name}" +cp bin/pgloader "%{buildroot}/%{_libexecdir}/%{name}/" +cat >"%{buildroot}/%{_bindir}/pgloader" <<-EOF + #!/bin/sh + exec /usr/bin/sbcl --core %{_libexecdir}/%{name}/pgloader "\$@" +EOF +chmod a+x "%{buildroot}/%{_bindir}/pgloader" -%fdupes %{buildroot} +%fdupes %{buildroot}/%{_prefix} %files %license local-projects/%{name}-%{version}/LICENSE %doc local-projects/%{name}-%{version}/README.md local-projects/%{name}-%{version}/TODO.md %{_bindir}/pgloader +%{_libexecdir}/%{name}/