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).
#!/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"
---- 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"),
+#-----------------------------------------------------------------
+# 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
# 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
{
- 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"
+}
-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}}}
---- 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
#ifdef DYING
static void
dumpME(const char * msg, MacroEntry me)
-@@ -1430,6 +1465,10 @@
+@@ -1430,6 +1466,10 @@
s = doUndefine(mb->mc, se);
continue;
}
if (STREQ("echo", f, fn) ||
STREQ("warn", f, fn) ||
-@@ -1984,6 +2023,18 @@
+@@ -1984,6 +2024,18 @@
}
}
-# TLD rpm macros
+# PLD rpm macros
%__id /bin/id
%__id_u %{__id} -u
%{__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}\
%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
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 4.5
-Release: 62
+Release: 70
License: LGPL
Group: Base
Source0: %{name}-%{version}.tar.gz
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
%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
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
%prep
%setup -q
+cp -p %{SOURCE15} .
%patch1000 -p1
#%patch0 -p1
-%patch1 -p1
%patch2 -p1
+%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1
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
# 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
# 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