diff --git a/generate-compatibility-deps b/generate-compatibility-deps index aee43e393897e48311307b6a7b4569ed95785b55..b8721ec5c9eb0bcd02353cb1e4b7e5d2e995f5c4 100755 --- a/generate-compatibility-deps +++ b/generate-compatibility-deps @@ -38,8 +38,8 @@ for dir in $sbindir $bindir ; do for f in $(ls $RPM_BUILD_ROOT/$dir) ; do full_name=$RPM_BUILD_ROOT/$dir/$f if file $full_name | grep executable > /dev/null 2>&1; then - if $full_name --help > /dev/null 2>&1; then - $full_name --help > $f-option.list + if $full_name --help > /dev/null 2>&1; then + $full_name --help > $f-option.list elif $full_name -help > /dev/null 2>&1; then $full_name -help > $f-option.list elif $full_name help > /dev/null 2>&1; then @@ -55,6 +55,12 @@ done pushd $RPM_BUILD_ROOT/$abidir for f in $(ls) do - echo "$f" | grep -q -E '\.dump$' || echo "$f" | grep -q -E '\-option.list$' || rm -f ./$f + # check buildroot in abi/api files + if cat $f | grep "BUILDROOT" > /dev/null 2>&1; then + sed -e '/BUILDROOT/d' $f > $f.new + mv $f.new $f + fi + # remove unexpected files or directories + echo "$f" | grep -q -E '\.dump$' || echo "$f" | grep -q -E '\-option.list$' || rm -rf ./$f done popd diff --git a/system-rpm-config.spec b/system-rpm-config.spec index 12ac6fabca537d25be928e53f5edb89bd7c15473..4e98aaffad4a56d351e35efc957e109d1a8ff1c5 100644 --- a/system-rpm-config.spec +++ b/system-rpm-config.spec @@ -1,4 +1,4 @@ -%define anolis_release 12 +%define anolis_release 13 Summary: Anolis OS specific rpm configuration files Name: system-rpm-config @@ -180,6 +180,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %license MulanPSL %changelog +* Thu Oct 27 2022 Chunmei Xu - 23.13 +- generate-compatibility-deps: process BUILDROOT in api files + * Tue Oct 25 2022 Chunmei Xu - 23.12 - generate-compatibility-deps: fix empty api files