Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libxcrypt for openSUSE:Factory 
checked in at 2023-03-17 17:00:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libxcrypt (Old)
 and      /work/SRC/openSUSE:Factory/.libxcrypt.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libxcrypt"

Fri Mar 17 17:00:44 2023 rev:17 rq:1071514 version:4.4.33

Changes:
--------
--- /work/SRC/openSUSE:Factory/libxcrypt/libxcrypt.changes      2022-12-02 
13:11:59.461474954 +0100
+++ /work/SRC/openSUSE:Factory/.libxcrypt.new.31432/libxcrypt.changes   
2023-03-17 17:00:46.208582554 +0100
@@ -1,0 +2,5 @@
+Fri Mar 10 20:29:48 UTC 2023 - Giuliano Belinassi <[email protected]>
+
+- Enable livepatching support on x86_64.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libxcrypt.spec ++++++
--- /var/tmp/diff_new_pack.4266wd/_old  2023-03-17 17:00:46.788585593 +0100
+++ /var/tmp/diff_new_pack.4266wd/_new  2023-03-17 17:00:46.792585614 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package libxcrypt
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -29,6 +29,13 @@
 Source3:        baselibs.conf
 BuildRequires:  pkgconfig
 
+# Enable support for livepatching.
+%ifarch x86_64
+%bcond_without livepatching
+%else
+%bcond_with livepatching
+%endif
+
 %description
 libxcrypt is a modern library for one-way hashing of passwords.  It
 supports DES, MD5, SHA-2-256, SHA-2-512, and bcrypt-based password
@@ -94,6 +101,7 @@
 # Disable LTO due to symbol versioning (boo#1138833):
 # (https://en.opensuse.org/openSUSE:LTO#Symbol_versioning).
 %define _lto_cflags %{nil}
+
 %configure                     \
   --disable-silent-rules       \
   --enable-shared              \
@@ -101,9 +109,38 @@
   --enable-obsolete-api=suse   \
   --enable-hashes=all          \
   --with-pkgconfigdir=%{_libdir}/pkgconfig
+
+%if %{with livepatching}
+%make_build CFLAGS="$CFLAGS -fpatchable-function-entry=16,14 -fdump-ipa-clones"
+%else
 %make_build
+%endif
 
 %install
+
+%if %{with livepatching}
+%define tar_basename libxcrypt-livepatch-%{version}-%{release}
+%define tar_package_name %{tar_basename}.%{_arch}.tar.xz
+%define clones_dest_dir %{tar_basename}/%{_arch}
+
+# Ipa-clones are files generated by gcc which logs changes made across
+# functions, and we need to know such changes to build livepatches
+# correctly. These files are intended to be used by the livepatch
+# developers and may be retrieved by using `osc getbinaries`.
+#
+# Create ipa-clones destination folder and move clones there.
+mkdir -p ipa-clones/%{clones_dest_dir}
+find . -name "*.ipa-clones" ! -empty \
+       -exec cp -t ipa-clones/%{clones_dest_dir} --parents {} +
+
+# Create tarball with ipa-clones.
+tar -cJf %{tar_package_name} -C ipa-clones \
+    --owner root --group root --sort name %{tar_basename}
+
+# Copy tarball to the OTHER folder to store it as artifact.
+cp %{tar_package_name} %{_topdir}/OTHER
+%endif
+
 %make_install
 rm -v %{buildroot}%{_libdir}/*.la
 

Reply via email to