Relocations are no longer required.

sysboost no longer needs relocation, so we remove it.
This commit is contained in:
wangyuhang 2024-03-28 10:26:26 +08:00
parent deaec7b668
commit 09cd4cf31e

View File

@ -1,14 +1,6 @@
%if %{?openEuler:1}0
%global ENABLE_RELOC 0
%endif
%if %{ENABLE_RELOC}
%global ldflags_options -Wl,--emit-relocs
%endif
Name: bash Name: bash
Version: 5.1.8 Version: 5.1.8
Release: 12 Release: 13
Summary: It is the Bourne Again Shell Summary: It is the Bourne Again Shell
License: GPLv3 License: GPLv3
URL: https://www.gnu.org/software/bash URL: https://www.gnu.org/software/bash
@ -76,16 +68,6 @@ Requires: pkgconf-pkg-config
%description devel %description devel
This package contains development files for %{name}. This package contains development files for %{name}.
%if %{?ENABLE_RELOC}
%package relocation
Summary: Relocations for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: sysboost-devel
%description relocation
This package contains relocations for %{name}.
%endif
%package help %package help
Summary: Documents for %{name} Summary: Documents for %{name}
Buildarch: noarch Buildarch: noarch
@ -101,17 +83,12 @@ Man pages and other related documents for %{name}.
%build %build
autoconf autoconf
%configure --with-bash-malloc=no --with-afs LDFLAGS="%{?ldflags_options}" %configure --with-bash-malloc=no --with-afs
MFLAGS="CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' `getconf LFS_CFLAGS`" MFLAGS="CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' `getconf LFS_CFLAGS`"
make "$MFLAGS" version.h make "$MFLAGS" version.h
make "$MFLAGS" -C builtins make "$MFLAGS" -C builtins
%make_build "$MFLAGS" %make_build "$MFLAGS"
%if %{?ENABLE_RELOC}
objreloc $RPM_BUILD_DIR/%{name}-%{version}/bash
rm -rf $RPM_BUILD_DIR/%{name}-%{version}/bash.prim
%endif
%install %install
%make_install install-headers %make_install install-headers
ln -sf bash %{buildroot}%{_bindir}/sh ln -sf bash %{buildroot}%{_bindir}/sh
@ -120,11 +97,6 @@ install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile
install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout
install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh
%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 # 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 for ea in alias bg cd command fc fg getopts hash jobs read type ulimit umask unalias wait
do do
@ -148,12 +120,6 @@ make check
%{_bindir}/{hash,getopts,jobs,read,type,ulimit,umask,unalias} %{_bindir}/{hash,getopts,jobs,read,type,ulimit,umask,unalias}
%config(noreplace) %{_sysconfdir}/profile.d/alias.sh %config(noreplace) %{_sysconfdir}/profile.d/alias.sh
%if %{ENABLE_RELOC}
%files relocation
%defattr(-,root,root)
/usr/lib/relocation/%{_bindir}/bash.relocation
%endif
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/%{name} %{_includedir}/%{name}
@ -171,6 +137,12 @@ make check
%exclude %{_infodir}/dir %exclude %{_infodir}/dir
%changelog %changelog
* Wed Mar 27 2024 wangyuhang <wangyuhang27@huawei.com> -5.1.8-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Relocations are no longer required.
* Fri Dec 15 2023 wangyuhang <wangyuhang27@huawei.com> -5.1.8-12 * Fri Dec 15 2023 wangyuhang <wangyuhang27@huawei.com> -5.1.8-12
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA