diff --git a/bash.spec b/bash.spec index 2fcedcbfab1cb35c74dfe5a4a606a01278426e82..df2ba512e5c54151536c585a97cda0d22c1f58d9 100644 --- a/bash.spec +++ b/bash.spec @@ -1,6 +1,14 @@ +%if %{?openEuler:1}0 +%global ENABLE_RELOC 0 +%endif + +%if %{ENABLE_RELOC} +%global ldflags_options -Wl,--emit-relocs +%endif + Name: bash Version: 5.1.8 -Release: 8 +Release: 9 Summary: It is the Bourne Again Shell License: GPLv3 URL: https://www.gnu.org/software/bash @@ -56,13 +64,15 @@ Requires: pkgconf-pkg-config %description devel This package contains development files for %{name}. -%package reloc +%if %{?ENABLE_RELOC} +%package relocation Summary: Relocations for %{name} Requires: %{name} = %{version}-%{release} BuildRequires: sysboost-devel -%description reloc +%description relocation This package contains relocations for %{name}. +%endif %package help Summary: Documents for %{name} @@ -79,13 +89,16 @@ Man pages and other related documents for %{name}. %build autoconf -%configure --with-bash-malloc=no --with-afs LDFLAGS="-Wl,--emit-relocs" +%configure --with-bash-malloc=no --with-afs LDFLAGS="%{?ldflags_options}" MFLAGS="CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' `getconf LFS_CFLAGS`" make "$MFLAGS" version.h make "$MFLAGS" -C builtins %make_build "$MFLAGS" +%if %{?ENABLE_RELOC} objreloc $RPM_BUILD_DIR/%{name}-%{version}/bash +rm -rf $RPM_BUILD_DIR/%{name}-%{version}/bash.prim +%endif %install %make_install install-headers @@ -95,7 +108,10 @@ install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh -install -pDm 750 $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation %{buildroot}%{_bindir}/bash.relocation +%if %{?ENABLE_RELOC} +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_bindir} +install -pDm 400 $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_bindir}/bash.relocation +%endif # bug #820192, need to add execable alternatives for regular built-ins for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait @@ -120,9 +136,11 @@ make check %{_bindir}/{hash,getopts,jobs,read,type,ulimit,umask,unalias} %config(noreplace) %{_sysconfdir}/profile.d/alias.sh -%files reloc -%defattr(744,root,root) -%{_bindir}/bash.relocation +%if %{ENABLE_RELOC} +%files relocation +%defattr(-,root,root) +/usr/lib/relocation/%{_bindir}/bash.relocation +%endif %files devel %defattr(-,root,root) @@ -141,6 +159,12 @@ make check %exclude %{_infodir}/dir %changelog +* Mon Jun 5 2023 liutie - 5.1.8-9 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: Fixed the issue of not stripped + * Sat May 6 2023 liutie -5.1.8-8 - Type:enhancement - ID:NA