!97 add relocation package for bash
From: @a-carter-bear Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
21a2fc53a5
38
bash.spec
38
bash.spec
@ -1,3 +1,9 @@
|
|||||||
|
%global ENABLE_RELOC 1
|
||||||
|
|
||||||
|
%if %{ENABLE_RELOC}
|
||||||
|
%global ldflags_options -Wl,--emit-relocs
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: bash
|
Name: bash
|
||||||
Version: 5.2.15
|
Version: 5.2.15
|
||||||
Release: 1
|
Release: 1
|
||||||
@ -47,6 +53,16 @@ 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: Relocation for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildRequires: native-turbo-tools
|
||||||
|
|
||||||
|
%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
|
||||||
@ -62,12 +78,16 @@ 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="%{?ldflags_options}"
|
||||||
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
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install install-headers
|
%make_install install-headers
|
||||||
ln -sf bash %{buildroot}%{_bindir}/sh
|
ln -sf bash %{buildroot}%{_bindir}/sh
|
||||||
@ -75,6 +95,9 @@ install -pDm 644 %SOURCE1 %{buildroot}/etc/skel/.bashrc
|
|||||||
install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile
|
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}
|
||||||
|
install -pD $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation %{buildroot}%{_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
|
||||||
@ -99,6 +122,13 @@ 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(400,root,root,-)
|
||||||
|
%dir %attr(500, root, root) %{_bindir}
|
||||||
|
%attr(400, root, root) %{_bindir}/bash.relocation
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/%{name}
|
%{_includedir}/%{name}
|
||||||
@ -116,6 +146,12 @@ make check
|
|||||||
%exclude %{_infodir}/dir
|
%exclude %{_infodir}/dir
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 4 2023 longwei <longwei27@huawei.com> -5.2.15-2
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Add relocation package
|
||||||
|
|
||||||
* Mon Jul 17 2023 wangyuhang <wangyuhang27@huawei.com> -5.2.15-1
|
* Mon Jul 17 2023 wangyuhang <wangyuhang27@huawei.com> -5.2.15-1
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user