diff --git a/clean_perl b/clean_perl index b9da34592ffff0bb1973194520df2db6777a1220..1a1214acff90838628e80c33a6bec5bc21646bda 100755 --- a/clean_perl +++ b/clean_perl @@ -11,7 +11,7 @@ perl -MConfig -e 'unlink "$ENV{RPM_BUILD_ROOT}$Config{installarchlib}/perllocal. for i in $(find $d -name "*.bs"); do if [ -s $i ]; then - echo "non empty .bs file, please mail rgarciasuarez@mandriva.com about this!" + echo "non empty .bs file" else rm -f $i fi diff --git a/dist.sh b/dist.sh index 0c9eed2b0cb4cd7d6c1ff435e48ed5b8888da964..5aaa6c12590e8bebbddf5803cc20bf7f2b8e9858 100755 --- a/dist.sh +++ b/dist.sh @@ -4,12 +4,7 @@ # License: GPL # This is a script to output the value for the %{dist} # tag. The dist tag takes the following format: .$type$num -# Where $type is one of: el, fc, rh -# (for RHEL, Fedora Core, and RHL, respectively) # And $num is the version number of the distribution. -# NOTE: We can't detect Rawhide or Fedora Test builds properly. -# If we successfully detect the version number, we output the -# dist tag. Otherwise, we exit with no output. RELEASEFILE=/etc/anolis-release diff --git a/fix-libtool-ltmain-from-overlinking b/fix-libtool-ltmain-from-overlinking index b6b97e3ea58fb9fe963fc7394f24e5d41a4b483e..3a2e2e7e47047e0fa44b36439bb8ff7f3005ac76 100755 --- a/fix-libtool-ltmain-from-overlinking +++ b/fix-libtool-ltmain-from-overlinking @@ -1,7 +1,7 @@ #!/bin/sh if [ -e ltmain.sh ]; then - echo "Fixing libtool's ltmain.sh to prevent overlinking (cf http://wiki.mandriva.com/en/Overlinking)" + echo "Fixing libtool's ltmain.sh to prevent overlinking" # a similar patch has been applied in ltmain.sh in libtool package # but this works even if autoreconf is not called diff --git a/macros b/macros index 6491930340d756d8a9cd9ec3bd1602281e3997a1..2f4d46c36b6ac0b7b7b08fadd5b748a01628b32b 100644 --- a/macros +++ b/macros @@ -328,8 +328,7 @@ print(result) # we don't escape symbols '~', '"', etc. so be careful when changing this %_hardening_ldflags -Wl,-z,now %[ "%{toolchain}" == "gcc" ? "-specs=/usr/lib/rpm/anolis/anolis-hardened-ld" : "" ] -# Harden packages by default for Fedora 23+: -# https://fedorahosted.org/fesco/ticket/1384 (accepted on 2014-02-11) +# Harden packages by default for Anolis: # Use "%undefine _hardened_build" to disable. %_hardened_build 1 %_hardened_cflags %{?_hardened_build:%{_hardening_cflags}} @@ -362,7 +361,7 @@ print(result) %_ld_as_needed 1 %_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed} -# LTO is the default in Fedora. +# LTO is the default in Anolis. # "%define _lto_cflags %{nil}" to opt out # # We currently have -ffat-lto-objects turned on out of an abundance of @@ -394,7 +393,7 @@ print(result) #============================================================================== # ---- Generic auto req/prov filtering macros # -# http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering +# https://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering # prevent anything matching from being scanned for provides %filter_provides_in(P) %{expand: \ diff --git a/macros.anolis-misc b/macros.anolis-misc index 274084904dd5ab267e1385cf63376001457ca3af..cd96f106392eb7445a951ed3bf9b7ee3b844a85d 100644 --- a/macros.anolis-misc +++ b/macros.anolis-misc @@ -1,4 +1,4 @@ -# Fedora macros, safe to use after the SRPM build stage +# Anolis macros, safe to use after the SRPM build stage # Lists files matching inclusion globs, excluding files matching exclusion # globs diff --git a/macros.anolis-misc-srpm b/macros.anolis-misc-srpm index f88e0455a84189da8d77be13867006d6ef305aa8..2d4000a606d6aab4495c9a670c16e0ae720e83a4 100644 --- a/macros.anolis-misc-srpm +++ b/macros.anolis-misc-srpm @@ -1,4 +1,4 @@ -# Fedora macros, safe to use at SRPM build stage +# Anolis macros, safe to use at SRPM build stage # A directory for rpm macros %rpmmacrodir /usr/lib/rpm/macros.d @@ -49,6 +49,7 @@ anolis.new_package(source_name, pkg_name, name_suffix, first, verbose) # -p query Provides besides name # (-r is useless when combined with -p, because # using -p means querying via Provides tag) +# output 0 if package not installed # # Usage example: # Requires: openssl-libs >= %{installed_version_of openssl-libs} @@ -62,5 +63,5 @@ anolis.new_package(source_name, pkg_name, name_suffix, first, verbose) %installed_version_of(rp) %(\ rpm -q %{-p:--whatprovides} %1 > /dev/null && \ %{-p: rpm -q --provides $(rpm -q --whatprovides %1) | grep '%1 =' | awk -F' = ' '{print $2}' } \ -%{!-p: rpm -q --queryformat="%%|EPOCH?{%%{EPOCH}:}:{}|%%{VERSION}%{-r:-%%{RELEASE}}" %1} +%{!-p: rpm -q --queryformat="%%|EPOCH?{%%{EPOCH}:}:{}|%%{VERSION}%{-r:-%%{RELEASE}}" %1} || echo 0 ) diff --git a/system-rpm-config.spec b/system-rpm-config.spec index 27917e1b04bdca7cfd66076cca17730e02d611ad..a025ce47de538b6186605f90841fcfe2220891ee 100644 --- a/system-rpm-config.spec +++ b/system-rpm-config.spec @@ -1,4 +1,4 @@ -%define anolis_release 27 +%define anolis_release 28 Summary: Anolis OS specific rpm configuration files Name: system-rpm-config @@ -210,6 +210,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %license MulanPSL %changelog +* Wed Mar 08 2023 Funda Wang - 1:23-28 +- Fix output of installed_version_of macro when package is not installed +- Cleanup macros + * Fri Feb 24 2023 Chunmei Xu - 1:23-27 - remove __brp_relink_symlinks temporarily