From 630c68c81e8bfa147007554ef35258d125bc8657 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 18 Apr 2013 08:06:04 +0000 Subject: [PATCH] - merged rpm-4_5 branch from PLD --- perl.prov | 2 +- rpm-find-spec-bcond | 2 +- rpm-libmagic-locale.patch | 33 +++++++++++++++++++++++---------- rpm-macros.patch | 2 +- rpm-new-debuginfo.patch | 3 ++- rpm-rpmrc.patch | 22 +++++++++++----------- rpm-unglobal.patch | 11 ++++++----- rpm.platform | 3 ++- rpm.spec | 24 ++++++------------------ rpm.sysconfig | 15 +++++++++++++-- 10 files changed, 66 insertions(+), 51 deletions(-) diff --git a/perl.prov b/perl.prov index 8f1a79d..a494480 100644 --- a/perl.prov +++ b/perl.prov @@ -2,7 +2,7 @@ use strict; # perl.prov - find information about perl modules for RPM -# $Id: perl.prov,v 1.10 2004/05/05 17:13:54 radek Exp $ +# $Id$ # It's questionable if we should provide perl(Foo::Bar) for modules # from outside @INC (possibly shipped with some applications). diff --git a/rpm-find-spec-bcond b/rpm-find-spec-bcond index f641453..f3d479b 100644 --- a/rpm-find-spec-bcond +++ b/rpm-find-spec-bcond @@ -1,6 +1,6 @@ #!/bin/sh # Display bcond (_with_*, _without_*) macros from given spec -# $Id: rpm-find-spec-bcond,v 1.10 2008/02/23 17:33:34 glen Exp $ +# $Id$ if [ "$#" = 0 ]; then echo "Usage: $0 SPEC" diff --git a/rpm-libmagic-locale.patch b/rpm-libmagic-locale.patch index b257407..29fcc32 100644 --- a/rpm-libmagic-locale.patch +++ b/rpm-libmagic-locale.patch @@ -1,22 +1,35 @@ ---- rpm-4.5/lib/rpmfc.c.org 2010-10-06 20:47:04.748417761 +0200 -+++ rpm-4.5/lib/rpmfc.c 2010-10-06 20:48:13.364041124 +0200 -@@ -1356,8 +1356,18 @@ +--- rpm-4.5/lib/rpmfc.c.org 2012-02-29 16:32:05.655058968 +0100 ++++ rpm-4.5/lib/rpmfc.c 2012-02-29 16:36:22.430972834 +0100 +@@ -1114,9 +1114,31 @@ /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */ else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1)) ftype = ""; - else + else { -+ char *old_loc = setlocale(LC_CTYPE, NULL); -+ if (old_loc) { -+ old_loc = xstrdup(old_loc); ++ char *old_ctype = setlocale(LC_CTYPE, NULL); ++ char *old_collate = setlocale(LC_COLLATE, NULL); ++ ++ if (old_ctype) { ++ old_ctype = xstrdup(old_ctype); + setlocale(LC_CTYPE, "C"); + } ++ if (old_collate) { ++ old_collate = xstrdup(old_collate); ++ setlocale(LC_COLLATE, "C"); ++ } ++ ftype = magic_file(ms, s); -+ if (old_loc) { -+ setlocale(LC_CTYPE, old_loc); -+ _free(old_loc); + ++ if (old_ctype) { ++ setlocale(LC_CTYPE, old_ctype); ++ _free(old_ctype); ++ } ++ if (old_collate) { ++ setlocale(LC_COLLATE, old_collate); ++ _free(old_collate); + } + } - ++ if (ftype == NULL) { xx = RPMERR_EXEC; + rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"), diff --git a/rpm-macros.patch b/rpm-macros.patch index 481fae8..e0e14fe 100644 --- a/rpm-macros.patch +++ b/rpm-macros.patch @@ -126,7 +126,7 @@ +#----------------------------------------------------------------- +# CFLAGS and LDFLAGS used to build + -+%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-3 -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}} ++%debuginfocflags %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}} + +%debugcflags -O0 -g -Wall diff --git a/rpm-new-debuginfo.patch b/rpm-new-debuginfo.patch index b7170c0..6a3d9e5 100644 --- a/rpm-new-debuginfo.patch +++ b/rpm-new-debuginfo.patch @@ -11,7 +11,7 @@ # Template for debug information sub-package. --- rpm-4.5/scripts/find-debuginfo.sh.orig 2007-08-31 03:07:02.000000000 +0200 +++ rpm-4.5/scripts/find-debuginfo.sh 2009-09-17 15:22:30.299290490 +0200 -@@ -1,57 +1,327 @@ +@@ -1,57 +1,328 @@ -#!/bin/sh +#!/bin/bash #find-debuginfo.sh - automagically generate debug info and file list @@ -105,6 +105,7 @@ { - eu-strip --remove-comment -f "$1" "$2" || : + local t=$(mktemp "/tmp/rpm.stripped.XXXXXX") ++ objcopy --compress-debug-sections "$2" || exit + eu-strip --remove-comment -f "$1" "$2" -o "$t" || exit + rm -f "$t" +} diff --git a/rpm-rpmrc.patch b/rpm-rpmrc.patch index 834ed4b..1c19c17 100644 --- a/rpm-rpmrc.patch +++ b/rpm-rpmrc.patch @@ -65,17 +65,17 @@ -optflags: atariclone -O2 -g -fomit-frame-pointer -optflags: milan -O2 -g -fomit-frame-pointer -optflags: hades -O2 -g -fomit-frame-pointer -+optflags: i386 -O2 -fno-strict-aliasing -fwrapv -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}} -+optflags: i486 -O2 -fno-strict-aliasing -fwrapv -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}} -+optflags: i586 -O2 -fno-strict-aliasing -fwrapv -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}} -+optflags: i686 -O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}} -+optflags: pentium3 -O2 -fno-strict-aliasing -fwrapv -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}} -+optflags: pentium4 -O2 -fno-strict-aliasing -fwrapv -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}} -+optflags: athlon -O2 -fno-strict-aliasing -fwrapv -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}} -+optflags: ia64 -O2 -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}} -+optflags: x86_64 -O2 -fno-strict-aliasing -fwrapv -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}} -+optflags: amd64 -O2 -fno-strict-aliasing -fwrapv -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}} -+optflags: ia32e -O2 -fno-strict-aliasing -fwrapv -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}} ++optflags: i386 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i386%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i386: %{specflags_i386}}} ++optflags: i486 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i486%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i486: %{specflags_i486}}} ++optflags: i586 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i586%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i586: %{specflags_i586}}} ++optflags: i686 -O2 -pipe -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_i686: %{specflags_i686}}} ++optflags: pentium3 -O2 -pipe -fno-strict-aliasing -fwrapv -march=pentium3%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium3: %{specflags_pentium3}}} ++optflags: pentium4 -O2 -pipe -fno-strict-aliasing -fwrapv -march=pentium4%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_pentium4: %{specflags_pentium4}}} ++optflags: athlon -O2 -pipe -fno-strict-aliasing -fwrapv -march=athlon%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32: %{specflags_ia32}}%{?specflags_athlon: %{specflags_athlon}}} ++optflags: ia64 -O2 -pipe -fno-strict-aliasing -fwrapv%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia64: %{specflags_ia64}}} ++optflags: x86_64 -O2 -pipe -fno-strict-aliasing -fwrapv -march=x86-64%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_x86_64: %{specflags_x86_64}}} ++optflags: amd64 -O2 -pipe -fno-strict-aliasing -fwrapv -march=k8%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_amd64: %{specflags_amd64}}} ++optflags: ia32e -O2 -pipe -fno-strict-aliasing -fwrapv -march=nocona%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ia32e: %{specflags_ia32e}}} + +optflags: alpha -O2 -fno-strict-aliasing -fwrapv -mieee%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}} +optflags: alphaev5 -O2 -fno-strict-aliasing -fwrapv -mieee -mcpu=ev5%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_alpha: %{specflags_alpha}}%{?specflags_alphaev5: %{specflags_alphaev5}}} diff --git a/rpm-unglobal.patch b/rpm-unglobal.patch index 7dbbcb5..965e983 100644 --- a/rpm-unglobal.patch +++ b/rpm-unglobal.patch @@ -1,9 +1,10 @@ ---- rpm-4.5/rpmio/macro.c.org 2009-08-08 15:42:25.574860247 +0200 -+++ rpm-4.5/rpmio/macro.c 2009-08-08 15:47:20.495455961 +0200 -@@ -807,6 +807,41 @@ +--- rpm-4.5/rpmio/macro.c 2009-08-08 15:47:20.495455961 +0200 ++++ rpm-4.5/rpmio/macro.c 2012-11-08 06:37:45.082618600 +0200 +@@ -807,6 +807,42 @@ return se; } ++void delMacroAll(MacroContext mc, const char * n); +/** + * Parse (and execute) macro undefinition. + * @param mc macro context @@ -42,7 +43,7 @@ #ifdef DYING static void dumpME(const char * msg, MacroEntry me) -@@ -1430,6 +1465,10 @@ +@@ -1430,6 +1466,10 @@ s = doUndefine(mb->mc, se); continue; } @@ -53,7 +54,7 @@ if (STREQ("echo", f, fn) || STREQ("warn", f, fn) || -@@ -1984,6 +2023,18 @@ +@@ -1984,6 +2024,18 @@ } } diff --git a/rpm.platform b/rpm.platform index 9229a25..6176f1e 100644 --- a/rpm.platform +++ b/rpm.platform @@ -1,4 +1,4 @@ -# TLD rpm macros +# PLD rpm macros %__id /bin/id %__id_u %{__id} -u @@ -29,6 +29,7 @@ %{__spec_install_post_strip}\ %{__spec_install_post_chrpath}\ %{__spec_install_post_check_so}\ +%{__spec_install_post_check_tmpfiles}\ %{__spec_install_post_compress_docs}\ %{__spec_install_post_compress_modules}\ %{__spec_install_post_py_hardlink}\ diff --git a/rpm.spec b/rpm.spec index dc7d79a..21b6ed9 100644 --- a/rpm.spec +++ b/rpm.spec @@ -25,13 +25,6 @@ %bcond_without system_libmagic # don't use system libmagic %bcond_without suggest_tags # build without Suggest tag (bootstrapping) %bcond_with neon # build with HTTP/WebDAV support (neon library). NOTE: neon libs are in /usr! -# force_cc - force using __cc other than "%{_target_cpu}-tld-linux-gcc" -# force_cxx - force using __cxx other than "%{_target_cpu}-tld-linux-g++" -# force_cpp - force using __cpp other than "%{_target_cpu}-tld-linux-gcc -E" - -#%%define force_cc "%{_target_cpu}-tld-linux-gcc" -#%%define force_cxx "%{_target_cpu}-tld-linux-g++" -#%%define force_cpp '%{_target_cpu}-tld-linux-gcc -E' # versions of required libraries %define reqdb_pkg db4.5 @@ -49,7 +42,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM Summary(uk.UTF-8): Менеджер пакетів від RPM Name: rpm Version: 4.5 -Release: 62 +Release: 70 License: LGPL Group: Base Source0: %{name}-%{version}.tar.gz @@ -75,8 +68,6 @@ Source19: %{name}-macros.gstreamer Source20: macros.php Source21: %{name}-php-requires.php Patch1000: %{name}-new-debuginfo.patch -#Patch1067: %{name}-disable-features.patch -#Patch1070: %{name}-rpmrc-ac.patch #Patch0: %{name}-pl.po.patch Patch1: %{name}-rpmrc.patch Patch2: %{name}-arch.patch @@ -252,10 +243,6 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define specflags -fno-strict-aliasing -#%%define _host_alias %{_target_cpu}-tld-linux%{nil} -#%%define _host_vendor tld -#%%define _vendor tld - %description RPM is a powerful package manager, which can be used to build, install, query, verify, update, and uninstall individual software @@ -533,8 +520,8 @@ Requires: elfutils Requires: file >= 4.17 Requires: fileutils Requires: findutils -# rpmrc patch adds flags specific to gcc >= 3.4 -Requires: gcc >= 5:3.4 +# rpmrc patch adds flags specific to gcc >= 4.7 +Requires: gcc >= 6:4.7.0 Requires: glibc-devel Requires: grep Requires: gzip @@ -689,10 +676,11 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze %prep %setup -q +cp -p %{SOURCE15} . %patch1000 -p1 #%patch0 -p1 -%patch1 -p1 %patch2 -p1 +%patch1 -p1 %patch3 -p1 %patch4 -p1 %patch6 -p1 @@ -1023,7 +1011,7 @@ install -p scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir} cp -p %{SOURCE21} $RPM_BUILD_ROOT%{_rpmlibdir}/php.req.php install -p %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache install -p %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/banner.sh -cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/rpm +cp -p %{name}.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/rpm install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Conflictname diff --git a/rpm.sysconfig b/rpm.sysconfig index 1ad0c52..d370d97 100644 --- a/rpm.sysconfig +++ b/rpm.sysconfig @@ -1,7 +1,6 @@ # This file is intended for setting rpm options that cannot be set as macros # -# NOTE: -# At this moment only few packages use this features. +# NOTE: some packages might not use these features. # How verbose the .rpm scripts/triggers should be? RPM_SCRIPTVERBOSITY=5 @@ -13,3 +12,15 @@ RPM_USERDEL=yes # You can also disable this per service, if service supports it from # /etc/sysconfig/SERVICE #RPM_SKIP_AUTO_RESTART=yes + +# Should package upgrades enable SysV service? +# You don't want to disable this unless you're planning to fully +# migrate to systemd or want serviceless system. +RPM_ENABLE_SYSV_SERVICE=yes + +# Should package upgrades enable systemd service? +# This means migrating init scripts from SysV to systemd. +# If you disable this, systemd units will not be enabled for +# upgraded services. Newly installed packages will still have +# systemd services enabled. +RPM_ENABLE_SYSTEMD_SERVICE=yes -- 2.44.0