From 507b086c1af803ee0870bcc33ad6f53d646261ca Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 9 Oct 2022 12:16:58 +0800 Subject: [PATCH 1/2] add remove-info-dir script from mandriva/mageia --- remove-info-dir | 20 ++++++++++++++++++++ system-rpm-config.spec | 9 +++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 remove-info-dir diff --git a/remove-info-dir b/remove-info-dir new file mode 100644 index 0000000..a79cd4a --- /dev/null +++ b/remove-info-dir @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z "$RPM_BUILD_ROOT" ]; then + echo "No build root defined" >&2 + exit 1 +fi + +if [ ! -d "$RPM_BUILD_ROOT" ]; then + echo "Invalid build root" >&2 + exit 1 +fi + +INFODIR=`rpm --eval %{_infodir}/dir` + +dir="$RPM_BUILD_ROOT/$INFODIR" + +if [ -f $dir -a ! -L $dir ]; then + rm -f $dir +fi + diff --git a/system-rpm-config.spec b/system-rpm-config.spec index abfbb14..e82bf82 100644 --- a/system-rpm-config.spec +++ b/system-rpm-config.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 Summary: Anolis OS specific rpm configuration files Name: system-rpm-config Version: 23 @@ -51,6 +51,7 @@ Source301: find-requires # Misc helper scripts Source400: dist.sh Source401: gpgverify +Source402: remove-info-dir # 2022-05-25 Snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git Source500: config.guess @@ -121,6 +122,7 @@ install -p -m 755 -t %{buildroot}%{rrcdir} config.* install -p -m 755 -t %{buildroot}%{rrcdir} dist.sh install -p -m 755 -t %{buildroot}%{rrcdir} gpgverify install -p -m 755 -t %{buildroot}%{rrcdir} brp-* +install -p -m 755 -t %{buildroot}%{rrcdir} remove-info-dir install -p -m 755 -t %{buildroot}%{rrcdir} find-* mkdir -p %{buildroot}%{rrcdir}/find-provides.d @@ -132,7 +134,6 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} compatibiliy-deps.sh mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.* - mkdir -p %{buildroot}%{_fileattrsdir} install -p -m 644 -t %{buildroot}%{_fileattrsdir} *.attr @@ -153,6 +154,7 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %{rrcdir}/find-provides %{rrcdir}/find-requires %{rrcdir}/brp-ldconfig +%{rrcdir}/remove-info-dir %{_fileattrsdir}/*.attr %{_rpmconfigdir}/compatibiliy-deps.sh %{_rpmconfigdir}/macros.d/macros.*-srpm @@ -170,6 +172,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %license MulanPSL %changelog +* Sun Oct 09 2022 Funda Wang - 23.7 +- add remove-info-dir script from mandriva/mageia for automatically removal of unwanted /usr/share/info/dir + * Fri Sep 30 2022 Chunmei Xu - 23.6 - add abi and api fileattr to provides abi/api -- Gitee From 9f1f9327c0171363a7ab9afe9c70de9c8e2ba8af Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 9 Oct 2022 16:47:26 +0800 Subject: [PATCH 2/2] add remove-info-dir into post macro --- macros | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macros b/macros index 2a6c4f5..888d97e 100644 --- a/macros +++ b/macros @@ -249,6 +249,8 @@ print(result) %__brp_llvm_compile_lto_elf /usr/lib/rpm/anolis/brp-llvm-compile-lto-elf %{build_cflags} %{build_ldflags} +%__brp_remove_info_dir /usr/lib/rpm/anolis/remove-info-dir + # note: %%__os_install_post_python is defined in python-srpm-macros and contains several policies # don't remove it from %%__os_install_post unless coordinating the change with Python maintainers # packagers, don't undefine the entire macro, see the individual macros in /usr/lib/rpm/macros.d/macros.python-srpm @@ -265,6 +267,7 @@ print(result) %{?__brp_check_rpaths} \ %{?__brp_mangle_shebangs} \ %{?__brp_remove_la_files} \ + %{?__brp_remove_info_dir} \ %{__os_install_post_python} \ %{nil} -- Gitee