Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pam for openSUSE:Factory checked in at 2023-03-19 00:30:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pam (Old) and /work/SRC/openSUSE:Factory/.pam.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pam" Sun Mar 19 00:30:06 2023 rev:128 rq:1072045 version:1.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/pam/pam.changes 2023-01-27 10:17:44.836024168 +0100 +++ /work/SRC/openSUSE:Factory/.pam.new.31432/pam.changes 2023-03-19 00:30:07.499962216 +0100 @@ -1,0 +2,5 @@ +Fri Mar 10 18:27:09 UTC 2023 - Giuliano Belinassi <[email protected]> + +- Enable livepatching support on x86_64. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pam.spec ++++++ --- /var/tmp/diff_new_pack.mPmDBH/_old 2023-03-19 00:30:08.603967453 +0100 +++ /var/tmp/diff_new_pack.mPmDBH/_new 2023-03-19 00:30:08.607967472 +0100 @@ -15,6 +15,26 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550 +# Enable livepatching support for SLE15-SP4 onwards. It requires +# compiler support introduced there. +%define livepatchable 1 + +# Set variables for livepatching. +%define _other %{_topdir}/OTHER +%define tar_basename pam-livepatch-%{version}-%{release} +%define tar_package_name %{tar_basename}.%{_arch}.tar.xz +%define clones_dest_dir %{tar_basename}/%{_arch} +%else +# Unsupported operating system. +%define livepatchable 0 +%endif + +%ifnarch x86_64 +# Unsupported architectures must have livepatch disabled. +%define livepatchable 0 +%endif + %bcond_with debug %define flavor @BUILD_FLAVOR@%{nil} @@ -184,6 +204,9 @@ %if !%{with debug} CFLAGS="$CFLAGS -DNDEBUG" %endif +%if %{livepatchable} +CFLAGS="$CFLAGS -fpatchable-function-entry=16,14 -fdump-ipa-clones" +%endif %configure \ --includedir=%{_includedir}/security \ --docdir=%{_docdir}/pam \ @@ -197,6 +220,33 @@ %endif %make_build + +%if %{livepatchable} + +# 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 list of ipa-clones. +find . -name "*.ipa-clones" ! -empty | sed 's/^\.\///g' | sort > ipa-clones.list + +# Create ipa-clones destination folder and move clones there. +mkdir -p ipa-clones/%{clones_dest_dir} +while read f; do + _dest=ipa-clones/%{clones_dest_dir}/$f + mkdir -p ${_dest%/*} + cp $f $_dest +done < ipa-clones.list + +# Create tar package with the clone files. +tar cfJ %{tar_package_name} -C ipa-clones %{tar_basename} + +# Copy tar package to the OTHERS folder +cp %{tar_package_name} %{_other} + +%endif # livepatchable + gcc -fwhole-program -fpie -pie -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE %{optflags} -I%{_builddir}/Linux-PAM-%{version}/libpam/include %{SOURCE10} -o %{_builddir}/unix2_chkpwd -L%{_builddir}/Linux-PAM-%{version}/libpam/.libs -lpam %if %{build_main} @@ -213,6 +263,7 @@ mkdir -p -m 755 %{buildroot}%{_libdir} # For compat reasons mkdir -p %{buildroot}%{_distconfdir}/pam.d + %make_install /sbin/ldconfig -n %{buildroot}%{libdir} # Install documentation
