From d69c7b25fd97416c0b8162601ec9e7ac93a2a7bb Mon Sep 17 00:00:00 2001 From: Tie Liu Date: Tue, 22 Aug 2023 19:43:19 +0800 Subject: [PATCH] Remove /usr/bin in the sub package to fix path conflicts and fix issue --- bash.spec | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/bash.spec b/bash.spec index b60400d..7ab4f1a 100644 --- a/bash.spec +++ b/bash.spec @@ -6,7 +6,7 @@ Name: bash Version: 5.2.15 -Release: 2 +Release: 3 Summary: It is the Bourne Again Shell License: GPLv3 URL: https://www.gnu.org/software/bash @@ -78,14 +78,23 @@ Man pages and other related documents for %{name}. %build 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`" make "$MFLAGS" version.h make "$MFLAGS" -C builtins %make_build "$MFLAGS" %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 %install @@ -96,8 +105,8 @@ 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 %if %{?ENABLE_RELOC} -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir} -install -pD $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir} +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation%{_bindir} +install -pD $RPM_BUILD_DIR/%{name}-%{version}/relocation/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation%{_bindir} %endif # bug #820192, need to add execable alternatives for regular built-ins @@ -126,8 +135,7 @@ make check %if %{?ENABLE_RELOC} %files relocation %defattr(400,root,root,-) -%dir %attr(500, root, root) %{_bindir} -%attr(400, root, root) /usr/lib/relocation%{_libdir}/bash.relocation +%attr(400, root, root) /usr/lib/relocation%{_bindir}/bash.relocation %endif %files devel @@ -147,6 +155,12 @@ make check %exclude %{_infodir}/dir %changelog +* Tue Aug 29 2023 liutie -5.2.15-3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:remove path /usr/bin for sub package relocation and fix issue + * Fri Aug 4 2023 longwei -5.2.15-2 - Type:enhancement - ID:NA -- Gitee