!105 remove path /usr/bin for sub package relocation and fix issue about not stripped
From: @ironictwist Reviewed-by: @licunlong Signed-off-by: @licunlong
This commit is contained in:
commit
de07f51d4f
33
bash.spec
33
bash.spec
@ -1,4 +1,6 @@
|
|||||||
|
%if %{?openEuler:1}0
|
||||||
%global ENABLE_RELOC 1
|
%global ENABLE_RELOC 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{ENABLE_RELOC}
|
%if %{ENABLE_RELOC}
|
||||||
%global ldflags_options -Wl,--emit-relocs,-pie
|
%global ldflags_options -Wl,--emit-relocs,-pie
|
||||||
@ -6,7 +8,7 @@
|
|||||||
|
|
||||||
Name: bash
|
Name: bash
|
||||||
Version: 5.2.15
|
Version: 5.2.15
|
||||||
Release: 3
|
Release: 4
|
||||||
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
|
||||||
@ -78,14 +80,24 @@ 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}
|
%if %{?ENABLE_RELOC}
|
||||||
objreloc $RPM_BUILD_DIR/%{name}-%{version}/bash
|
mkdir relocation
|
||||||
|
pushd relocation
|
||||||
|
ln -s ../configure .
|
||||||
|
%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_build "$MFLAGS"
|
||||||
|
objreloc bash
|
||||||
|
strip bash
|
||||||
|
mv -f bash ../
|
||||||
|
popd
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -96,8 +108,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
|
||||||
%if %{?ENABLE_RELOC}
|
%if %{?ENABLE_RELOC}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir}
|
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation%{_bindir}
|
||||||
install -pD $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir}
|
install -pD $RPM_BUILD_DIR/%{name}-%{version}/relocation/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation%{_bindir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# bug #820192, need to add execable alternatives for regular built-ins
|
# bug #820192, need to add execable alternatives for regular built-ins
|
||||||
@ -126,8 +138,7 @@ make check
|
|||||||
%if %{?ENABLE_RELOC}
|
%if %{?ENABLE_RELOC}
|
||||||
%files relocation
|
%files relocation
|
||||||
%defattr(400,root,root,-)
|
%defattr(400,root,root,-)
|
||||||
%dir %attr(500, root, root) %{_bindir}
|
%attr(400, root, root) /usr/lib/relocation%{_bindir}/bash.relocation
|
||||||
%attr(400, root, root) /usr/lib/relocation%{_libdir}/bash.relocation
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
@ -147,7 +158,13 @@ make check
|
|||||||
%exclude %{_infodir}/dir
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Aug 8 2023 longwei <longwei27@huawei.com> -5.2.15-3
|
* Tue Aug 29 2023 liutie <liutie4@huawei.com> -5.2.15-4
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:remove path /usr/bin for sub package relocation and fix issue
|
||||||
|
|
||||||
|
* Tue Aug 8 2023 longwei <longwei27@huawei.com> -5.2.15-3
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
- SUG:NA
|
- SUG:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user