!83 Generate available relocations for sysboost

From: @ironictwist 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2023-05-12 10:36:14 +00:00 committed by Gitee
commit d0261965fe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: bash Name: bash
Version: 5.1.8 Version: 5.1.8
Release: 7 Release: 8
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
@ -56,6 +56,14 @@ Requires: pkgconf-pkg-config
%description devel %description devel
This package contains development files for %{name}. This package contains development files for %{name}.
%package reloc
Summary: Relocations for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: sysboost-devel
%description reloc
This package contains relocations for %{name}.
%package help %package help
Summary: Documents for %{name} Summary: Documents for %{name}
Buildarch: noarch Buildarch: noarch
@ -71,12 +79,14 @@ Man pages and other related documents for %{name}.
%build %build
autoconf autoconf
%configure --with-bash-malloc=no --with-afs %configure --with-bash-malloc=no --with-afs LDFLAGS="-Wl,--emit-relocs"
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"
objreloc $RPM_BUILD_DIR/%{name}-%{version}/bash
%install %install
%make_install install-headers %make_install install-headers
ln -sf bash %{buildroot}%{_bindir}/sh ln -sf bash %{buildroot}%{_bindir}/sh
@ -85,6 +95,8 @@ 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
install -pDm 750 $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation %{buildroot}%{_bindir}/bash.relocation
# 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
@ -108,6 +120,10 @@ 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
%files reloc
%defattr(744,root,root)
%{_bindir}/bash.relocation
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/%{name} %{_includedir}/%{name}
@ -125,6 +141,12 @@ make check
%exclude %{_infodir}/dir %exclude %{_infodir}/dir
%changelog %changelog
* Sat May 6 2023 liutie <liutie4@huawei.com> -5.1.8-8
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: Generate available relocations for sysboost
* Mon Jan 16 2023 wangyuhang <wangyuhang27@huawei.com> -5.1.8-7 * Mon Jan 16 2023 wangyuhang <wangyuhang27@huawei.com> -5.1.8-7
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA
@ -290,4 +312,4 @@ make check
- DESC:1000 Forbidden non root user to clear history - DESC:1000 Forbidden non root user to clear history
* Mon Oct 08 2018 licunlong <licunlong@huawei.com> - 4.4.23-5 * Mon Oct 08 2018 licunlong <licunlong@huawei.com> - 4.4.23-5
- Package Initialization - Package Initialization