Browse Source

rpm package update

Signed-off-by: basebuilder_pel7ppc64lebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64lebuilder0 4 years ago
parent
commit
8e1dbca4ab
  1. 27
      SOURCES/rpm-4.11.3-brp-python-bytecompile-Fix-when-default-python-is-no.patch
  2. 86
      SOURCES/rpm-4.11.x-add-g-libs.patch
  3. 77
      SOURCES/rpm-4.11.x-disk-space-calculation.patch
  4. 81
      SOURCES/rpm-4.11.x-perl.req-6.patch
  5. 38
      SOURCES/rpm-4.11.x-provide-audit-events.patch
  6. 104
      SOURCES/rpm-4.11.x-remove-perl-provides-from-requires.patch
  7. 28
      SOURCES/rpm-4.11.x-setcaps.patch
  8. 8
      SOURCES/rpm-4.12.x-rpmSign-return-value-correction.patch
  9. 53
      SOURCES/rpm-4.13.x-bad-owner-group.patch
  10. 17
      SOURCES/rpm-4.13.x-enable_noghost_option.patch
  11. 4
      SOURCES/rpm-4.13.x-fix_find_debuginfo_opts_g.patch
  12. 43
      SPECS/rpm.spec

27
SOURCES/rpm-4.11.3-brp-python-bytecompile-Fix-when-default-python-is-no.patch

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
--- rpm-4.11.3/scripts/brp-python-bytecompile.old 2014-02-05 14:04:02.000000000 +0100
+++ rpm-4.11.3/scripts/brp-python-bytecompile 2019-03-25 09:43:06.272804044 +0100
@@ -6,12 +6,6 @@
exit 0
fi
-# If we don't have a python interpreter, avoid changing anything.
-default_python=${1:-/usr/bin/python}
-if [ ! -x "$default_python" ]; then
- exit 0
-fi
-
# Figure out how deep we need to descend. We could pick an insanely high
# number and hope it's enough, but somewhere, somebody's sure to run into it.
depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \
@@ -55,6 +49,11 @@
fi
done
+# If we don't have a python interpreter, avoid changing anything.
+default_python=${1:-/usr/bin/python}
+if [ ! -x "$default_python" ]; then
+ exit 0
+fi
# Handle other locations in the filesystem using the default python
# implementation:

86
SOURCES/rpm-4.11.x-add-g-libs.patch

@ -0,0 +1,86 @@ @@ -0,0 +1,86 @@
--- rpm-4.11.3/scripts/find-debuginfo.sh.old 2019-01-02 13:14:10.283068553 +0100
+++ rpm-4.11.3/scripts/find-debuginfo.sh 2019-03-21 09:36:06.196400883 +0100
@@ -3,6 +3,7 @@
#for inclusion in an rpm spec file.
#
# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] [-m]
+# [--g-libs]
# [-o debugfiles.list]
# [--run-dwz] [--dwz-low-mem-die-limit N]
# [--dwz-max-die-limit N]
@@ -10,6 +11,8 @@
# [builddir]
#
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
+# The --g-libs flag says to use strip -g instead of full strip ONLY on DSOs.
+# Options -g and --g-libs are mutually exclusive.
# The --strict-build-id flag says to exit with failure status if
# any ELF binary processed fails to contain a build-id note.
# The -r flag says to use eu-strip --reloc-debug-sections.
@@ -32,6 +35,9 @@
# With -g arg, pass it to strip on libraries or executables.
strip_g=false
+# With --g-libs arg, pass it to strip on libraries.
+strip_glibs=false
+
# with -r arg, pass --reloc-debug-sections to eu-strip.
strip_r=false
@@ -65,6 +71,9 @@
dwz_max_die_limit=$2
shift
;;
+ --g-libs)
+ strip_glibs=true
+ ;;
-g)
strip_g=true
;;
@@ -100,6 +109,11 @@
shift
done
+if ("$strip_g" = "true") && ("$strip_glibs" = "true"); then
+ echo >&2 "*** ERROR: -g and --g-libs cannot be used together"
+ exit 2
+fi
+
i=0
while ((i < nout)); do
outs[$i]="$BUILDDIR/${outs[$i]}"
@@ -132,6 +146,9 @@
application/x-sharedlib*) g=-g ;;
application/x-executable*) g=-g ;;
esac
+ $strip_glibs && case "$(file -bi "$2")" in
+ application/x-sharedlib*) g=-g ;;
+ esac
eu-strip --remove-comment $r $g -f "$1" "$2" || exit
chmod 444 "$1" || exit
}
@@ -317,7 +334,23 @@
chmod u-w "$f"
fi
- $include_minidebug && add_minidebug "${debugfn}" "$f"
+ # strip -g implies we have full symtab, don't add mini symtab in that case.
+ # It only makes sense to add a minisymtab for executables and shared
+ # libraries. Other executable ELF files (like kernel modules) don't need it.
+ if [ "$include_minidebug" = "true" -a "$strip_g" = "false" ]; then
+ skip_mini=true
+ if [ "$strip_glibs" = "false" ]; then
+ case "$(file -bi "$f")" in
+ application/x-sharedlib*) skip_mini=false ;;
+ esac
+ fi
+ case "$(file -bi "$f")" in
+ application/x-sharedlib*) skip_mini=false ;;
+ application/x-executable*) skip_mini=false ;;
+ application/x-pie-executable*) skip_mini=false ;;
+ esac
+ $skip_mini || add_minidebug "${debugfn}" "$f"
+ fi
echo "./${f#$RPM_BUILD_ROOT}" >> "$ELFBINSFILE"

77
SOURCES/rpm-4.11.x-disk-space-calculation.patch

@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
--- rpm-4.11.3/lib/transaction.c.old 2019-01-02 13:14:10.304068576 +0100
+++ rpm-4.11.3/lib/transaction.c 2019-02-28 11:03:32.164403544 +0100
@@ -368,6 +368,11 @@
return rConflicts;
}
+static rpm_loff_t DivideHardlinkSize(int nlink, rpm_loff_t originalSize)
+{
+ return (originalSize / nlink) + 1;
+}
+
/**
* handleInstInstalledFiles.
* @param ts transaction set
@@ -384,6 +389,8 @@
{
rpmfs fs = rpmteGetFileStates(p);
int isCfgFile = ((rpmfiFFlagsIndex(otherFi, ofx) | rpmfiFFlagsIndex(fi, fx)) & RPMFILE_CONFIG);
+ rpm_loff_t otherFileSize;
+ int nlink;
if (XFA_SKIPPING(rpmfsGetAction(fs, fx)))
return;
@@ -445,7 +452,15 @@
action = rpmfiDecideFateIndex(otherFi, ofx, fi, fx, skipMissing);
rpmfsSetAction(fs, fx, action);
}
- rpmfiSetFReplacedSizeIndex(fi, fx, rpmfiFSizeIndex(otherFi, ofx));
+
+ otherFileSize = rpmfiFSizeIndex(otherFi, ofx);
+
+ /* Only an appropriate fraction of the file size of a hardlink */
+ nlink = rpmfiFNlinkIndex(otherFi, ofx);
+ if (nlink > 1)
+ otherFileSize = DivideHardlinkSize(nlink, otherFileSize);
+
+ rpmfiSetFReplacedSizeIndex(fi, fx, otherFileSize);
}
/**
@@ -470,6 +485,8 @@
rpmfileAttrs FFlags;
struct rpmffi_s * recs;
int numRecs;
+ rpm_loff_t fileSize;
+ int nlink;
if (XFA_SKIPPING(rpmfsGetAction(fs, i)))
continue;
@@ -633,9 +650,15 @@
break;
}
+ fileSize = rpmfiFSizeIndex(fi, i);
+ nlink = rpmfiFNlinkIndex(fi, i);
+ /* Only an appropriate fraction of the file sizeof a hardlink */
+ if (nlink > 1)
+ fileSize = DivideHardlinkSize(nlink, fileSize);
+
/* Update disk space info for a file. */
rpmtsUpdateDSI(ts, fpEntryDev(fpc, fiFps), fpEntryDir(fpc, fiFps),
- rpmfiFSizeIndex(fi, i), rpmfiFReplacedSizeIndex(fi, i),
+ fileSize, rpmfiFReplacedSizeIndex(fi, i),
fixupSize, rpmfsGetAction(fs, i));
}
--- rpm-4.11.3/lib/rpmfi.h.old 2014-02-05 14:04:02.000000000 +0100
+++ rpm-4.11.3/lib/rpmfi.h 2019-01-07 09:57:40.407787724 +0100
@@ -396,7 +396,7 @@
#define RPMFI_FLAGS_ERASE \
(RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
- RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \
+ RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
RPMFI_NOFILEVERIFYFLAGS)
#define RPMFI_FLAGS_INSTALL \

81
SOURCES/rpm-4.11.x-perl.req-6.patch

@ -0,0 +1,81 @@ @@ -0,0 +1,81 @@
--- rpm-4.11.3/scripts/perl.req.old 2019-05-26 15:41:33.316395021 +0200
+++ rpm-4.11.3/scripts/perl.req 2019-05-26 14:08:38.248028422 +0200
@@ -90,10 +90,10 @@
sub compute_global_requires {
-# restrict require to all non provided by the file
- foreach my $moduler (sort keys %require) {
- if (exists $provide{$moduler} && length($require{$moduler}) == 0) {
- $require = delete $require{$moduler};
+# restrict require_removable to all non provided by the file
+ foreach my $moduler (sort keys %require_removable) {
+ if (exists $provide{$moduler} && length($require_removable{$moduler}) == 0) {
+ $require_removable = delete $require_removable{$moduler};
}
}
# store requires to global_requires
@@ -107,8 +107,21 @@
$global_require{$module} = $newver;
}
}
+
+# store requires_removable to global_requires
+ foreach my $module (sort keys %require_removable) {
+ my $oldver = $global_require{$module};
+ my $newver = $require_removable{$module};
+ if ($oldver) {
+ $global_require{$module} = $newver
+ if ($HAVE_VERSION && $newver && version->new($oldver) < $newver);
+ } else {
+ $global_require{$module} = $newver;
+ }
+ }
# remove all local requires and provides
undef %require;
+ undef %require_removable;
undef %provide;
}
@@ -124,6 +137,18 @@
}
}
+sub add_require_removable {
+ my ($module, $newver) = @_;
+ my $oldver = $require_removable{$module};
+ if ($oldver) {
+ $require_removable{$module} = $newver
+ if ($HAVE_VERSION && $newver && version->new($oldver) < $newver);
+ }
+ else {
+ $require_removable{$module} = $newver;
+ }
+}
+
sub process_file {
my ($file) = @_;
@@ -286,7 +311,6 @@
# if the module starts with /, it is an absolute path to a file
if ($module =~ m(^/)) {
- print "$module\n";
next;
}
@@ -346,7 +370,13 @@
add_require($_, undef) for split(' ', $1);
}
elsif ($version =~ /(["'])([^"']+)\1/) {
- add_require($2, undef);
+ # requires like "use base name" can be removed if they are
+ # provided in the same file
+ if (($whitespace eq "") && ($statement eq "use") && ($module eq "base")) {
+ add_require_removable($2, undef);
+ } else {
+ add_require($2, undef);
+ }
}
next;
}

38
SOURCES/rpm-4.11.x-provide-audit-events.patch

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
@@ -334,6 +334,22 @@
AC_SUBST(WITH_POPT_INCLUDE)
AC_SUBST(WITH_POPT_LIB)

+
+#=================
+# Check for audit library.
@ -26,12 +26,12 @@ @@ -26,12 +26,12 @@
--- rpm-4.11.3/lib/Makefile.am.old 2014-09-05 13:51:05.000000000 +0200
+++ rpm-4.11.3/lib/Makefile.am 2018-05-28 13:24:17.309657132 +0200
@@ -47,6 +47,7 @@
@WITH_SELINUX_LIB@ \
@WITH_CAP_LIB@ \
@WITH_ACL_LIB@ \
@WITH_SELINUX_LIB@ \
@WITH_CAP_LIB@ \
@WITH_ACL_LIB@ \
+ @WITH_AUDIT_LIB@ \
@LIBINTL@

@LIBINTL@
if WITH_LUA
--- rpm-4.11.3/lib/rpmte.c.old 2018-05-25 09:02:29.173209513 +0200
+++ rpm-4.11.3/lib/rpmte.c 2018-06-18 10:38:02.929670757 +0200
@ -40,13 +40,13 @@ @@ -40,13 +40,13 @@
*/
#include "system.h"
+#include <libaudit.h>

#include <rpm/rpmtypes.h>
#include <rpm/rpmlib.h> /* RPM_MACHTABLE_* */
@@ -22,6 +23,16 @@

#include "debug.h"

+#ifndef AUDIT_SOFTWARE_UPDATE
+#define AUDIT_SOFTWARE_UPDATE 1138
+#endif
@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
* A single package instance to be installed/removed atomically.
*/
@@ -698,7 +709,15 @@

switch (rpmteType(te)) {
case TR_ADDED:
- h = rpmteDBInstance(te) ? rpmteDBHeader(te) : rpmteFDHeader(te);
@ -74,13 +74,13 @@ @@ -74,13 +74,13 @@
+ }
+ h = rpmteFDHeader(te);
+ }
break;
break;
case TR_REMOVED:
h = rpmteDBHeader(te);
h = rpmteDBHeader(te);
@@ -904,6 +923,41 @@
return rc;
}

+/*
+ * Input variables:
+ * te - transaction element
@ -120,9 +120,9 @@ @@ -120,9 +120,9 @@
{
ARGV_const_t colls;
@@ -977,5 +1031,10 @@
failed = rpmteMarkFailed(te);
failed = rpmteMarkFailed(te);
}

+ if (auditEnabled) {
+ audit_rpm_install(te, 0, auditGpgResult, failed ? 0 : 1);
+ auditEnabled = 0;
@ -135,7 +135,7 @@ @@ -135,7 +135,7 @@
@@ -25,6 +25,9 @@
static unsigned int nextkeyid = 0;
static unsigned int * keyids;

+extern int auditGpgResult;
+extern int auditEnabled;
+
@ -143,14 +143,14 @@ @@ -143,14 +143,14 @@
* Translate and merge legacy signature tags into header.
* @param h header (dest)
@@ -646,7 +649,10 @@

/** @todo Implement disable/enable/warn/error/anal policy. */
rc = rpmVerifySignature(keyring, &sigtd, sig, ctx, &msg);
-
-
+
+ if (auditEnabled && (sig != NULL))
+ auditGpgResult = (rc == 0);
+
switch (rc) {
case RPMRC_OK: /* Signature is OK. */
rpmlog(RPMLOG_DEBUG, "%s: %s", fn, msg);
rpmlog(RPMLOG_DEBUG, "%s: %s", fn, msg);

104
SOURCES/rpm-4.11.x-remove-perl-provides-from-requires.patch

@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
--- rpm-4.11.3/scripts/perl.req.old 2019-01-02 13:14:10.258068525 +0100
+++ rpm-4.11.3/scripts/perl.req 2019-02-28 11:00:57.200220227 +0100
@@ -42,18 +42,29 @@
$HAVE_VERSION = 0;
eval { require version; $HAVE_VERSION = 1; };
+use File::Basename;
+my $dir = dirname($0);
+$HAVE_PROV = 0;
+if ( -e "$dir/perl.prov" ) {
+ $HAVE_PROV = 1;
+ $prov_script = "$dir/perl.prov";
+}
if ("@ARGV") {
- foreach (@ARGV) {
- process_file($_);
+ foreach my $file (@ARGV) {
+ process_file($file);
+ process_file_provides($file);
+ compute_global_requires();
}
} else {
# notice we are passed a list of filenames NOT as common in unix the
# contents of the file.
- foreach (<>) {
- process_file($_);
+ foreach my $file (<>) {
+ process_file($file);
+ process_file_provides($file);
+ compute_global_requires();
}
}
@@ -61,8 +72,9 @@
foreach $perlver (sort keys %perlreq) {
print "perl >= $perlver\n";
}
-foreach $module (sort keys %require) {
- if (length($require{$module}) == 0) {
+
+foreach my $module (sort keys %global_require) {
+ if (length($global_require{$module}) == 0) {
print "perl($module)\n";
} else {
@@ -70,13 +82,35 @@
# operators. Also I will need to change the processing of the
# $RPM_* variable when I upgrade.
- print "perl($module) >= $require{$module}\n";
+ print "perl($module) >= $global_require{$module}\n";
}
}
exit 0;
-
+sub compute_global_requires {
+
+# restrict require to all non provided by the file
+ foreach my $moduler (sort keys %require) {
+ if (exists $provide{$moduler} && length($require{$moduler}) == 0) {
+ $require = delete $require{$moduler};
+ }
+ }
+# store requires to global_requires
+ foreach my $module (sort keys %require) {
+ my $oldver = $global_require{$module};
+ my $newver = $require{$module};
+ if ($oldver) {
+ $global_require{$module} = $newver
+ if ($HAVE_VERSION && $newver && version->new($oldver) < $newver);
+ } else {
+ $global_require{$module} = $newver;
+ }
+ }
+# remove all local requires and provides
+ undef %require;
+ undef %provide;
+}
sub add_require {
my ($module, $newver) = @_;
@@ -328,3 +362,17 @@
return;
}
+
+sub process_file_provides {
+
+ my ($file) = @_;
+ chomp $file;
+
+ return if (! $HAVE_PROV);
+
+ my @result = readpipe( "$prov_script $file" );
+ foreach my $prov (@result) {
+ $provide{$1} = undef if $prov =~ /perl\(([_:a-zA-Z0-9]+)\)/;
+ }
+
+}

28
SOURCES/rpm-4.11.x-setcaps.patch

@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
--- rpm-4.11.3/rpmpopt.in.old 2019-01-02 13:14:10.222068485 +0100
+++ rpm-4.11.3/rpmpopt.in 2019-01-02 13:36:46.212326391 +0100
@@ -52,6 +52,25 @@
--pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep '^ch '|grep -v \(none\))|sh" \
--POPTdesc=$"set user/group ownership of files in a package"
+
+rpm alias --setcaps -q --qf \
+ "[if \[ -f %{FILENAMES:shescape} -a ! -L %{FILENAMES:shescape} \]; then\n\
+%|FILECAPS?{ if \[ -n %{FILECAPS:shescape} \]; then\n\
+ setcap %{FILECAPS:shescape} %{FILENAMES:shescape}\n\
+ el}:{ }|if \[ -n \"\$(getcap %{FILENAMES:shescape})\" \]; then\n\
+ setcap -r %{FILENAMES:shescape}\n\
+ fi\n\
+fi\n]" \
+ --pipe "sh" \
+ --POPTdesc=$"set capabilities of files in a package"
+
+rpm alias --restore -q --qf \
+ '[ rpm --setugids %{NAME:shescape}; \
+ rpm --setperms %{NAME:shescape}; \
+ rpm --setcaps %{NAME:shescape}; \n]' --pipe "sh" \
+ --POPTdesc=$"restore file/directory permissions"
+
+
rpm alias --conflicts --qf \
"[%|VERBOSE?{%{CONFLICTFLAGS:deptype}: }:{}|%{CONFLICTNEVRS}\n]" \
--POPTdesc=$"list capabilities this package conflicts with"

8
SOURCES/rpm-4.12.x-rpmSign-return-value-correction.patch

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
--- rpm-4.11.3/sign/rpmgensig.c.old 2014-09-05 13:49:16.000000000 +0200
+++ rpm-4.11.3/sign/rpmgensig.c 2018-05-03 10:58:37.104522827 +0200
@@ -506,6 +506,7 @@
}
goto exit;
}
}
goto exit;
}
+ res = -1;
}

/* Reallocate the signature into one contiguous region. */

53
SOURCES/rpm-4.13.x-bad-owner-group.patch

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
--- rpm-4.11.3/build/files.c.old 2019-01-02 13:14:10.217068479 +0100
+++ rpm-4.11.3/build/files.c 2019-03-20 13:18:38.290142740 +0100
@@ -2015,23 +2015,32 @@
flp->fl_mode &= S_IFMT;
flp->fl_mode |= fl.def.ar.ar_fmode;
}
+
if (fl.def.ar.ar_user) {
flp->uname = fl.def.ar.ar_user;
} else {
flp->uname = rpmstrPoolId(fl.pool, rpmugUname(flp->fl_uid), 1);
}
+ if (! flp->uname) {
+ flp->uname = rpmstrPoolId(fl.pool, rpmugUname(getuid()), 1);
+ }
+ if (! flp->uname) {
+ flp->uname = rpmstrPoolId(fl.pool, "root", 1);
+ }
+
if (fl.def.ar.ar_group) {
flp->gname = fl.def.ar.ar_group;
} else {
flp->gname = rpmstrPoolId(fl.pool, rpmugGname(flp->fl_gid), 1);
}
- flp->langs = xstrdup("");
-
- if (! (flp->uname && flp->gname)) {
- rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), diskPath);
- fl.processingFailed = 1;
+ if (! flp->gname) {
+ flp->gname = rpmstrPoolId(fl.pool, rpmugGname(getgid()), 1);
+ }
+ if (! flp->gname) {
+ flp->gname = rpmstrPoolId(fl.pool, "root", 1);
}
+ flp->langs = xstrdup("");
fl.files.used++;
}
argvFree(files);
--- rpm-4.11.3/build/parsePrep.c.old 2013-11-22 11:31:31.000000000 +0100
+++ rpm-4.11.3/build/parsePrep.c 2019-03-20 13:19:33.705172465 +0100
@@ -29,10 +29,6 @@
urlfn, strerror(errno));
return RPMRC_FAIL;
}
- if (!rpmugUname(sb.st_uid) || !rpmugGname(sb.st_gid)) {
- rpmlog(RPMLOG_ERR, _("Bad owner/group: %s\n"), urlfn);
- return RPMRC_FAIL;
- }
return RPMRC_OK;
}

17
SOURCES/rpm-4.13.x-enable_noghost_option.patch

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
[\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
- [\fB--nocaps\fR] [\fB--noconfig\fR]
+ [\fB--nocaps\fR] [\fB--noconfig\fR] [\fB--noghost\fR]

.SS "install-options"
.PP
@@ -683,6 +683,9 @@
@ -22,24 +22,25 @@ @@ -22,24 +22,25 @@
--- rpm-4.11.3/lib/poptQV.c.old 2018-05-10 12:29:26.716304826 +0200
+++ rpm-4.11.3/lib/poptQV.c 2018-05-11 14:08:36.389255974 +0200
@@ -182,7 +182,7 @@
N_("list files in package"), NULL },

N_("list files in package"), NULL },
/* Duplicate file attr flags from packages into command line options. */
- { "noghost", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN,
+ { "noghost", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
&rpmQVKArgs.qva_fflags, RPMFILE_GHOST,
&rpmQVKArgs.qva_fflags, RPMFILE_GHOST,
N_("skip %%ghost files"), NULL },
{ "noconfig", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN,
--- rpm-4.11.3/lib/verify.c.old 2018-05-10 12:29:26.715304826 +0200
+++ rpm-4.11.3/lib/verify.c 2018-05-11 14:17:16.474959233 +0200
@@ -453,6 +453,11 @@
rpmlog(RPMLOG_NOTICE, "%s\n", buf);
buf = _free(buf);
}
+
rpmlog(RPMLOG_NOTICE, "%s\n", buf);
buf = _free(buf);
}
+
+ /* Filter out missing %ghost/%missingok errors from final result */
+ if (fileAttrs & (RPMFILE_MISSINGOK|RPMFILE_GHOST))
+ verifyResult &= ~RPMVERIFY_LSTATFAIL;
+
}
rpmfiFree(fi);

4
SOURCES/rpm-4.13.x-fix_find_debuginfo_opts_g.patch

@ -12,11 +12,11 @@ @@ -12,11 +12,11 @@
@@ -29,7 +29,7 @@
# All file names in switches are relative to builddir (. if not given).
#

-# With -g arg, pass it to strip on libraries.
+# With -g arg, pass it to strip on libraries or executables.
strip_g=false

# with -r arg, pass --reloc-debug-sections to eu-strip.
@@ -130,6 +130,7 @@
$strip_r && r=--reloc-debug-sections

43
SPECS/rpm.spec

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}35%{?dist}
Release: %{?snapver:0.%{snapver}.}40%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2
@ -92,6 +92,11 @@ Patch189: rpm-4.12.x-rpmSign-return-value-correction.patch @@ -92,6 +92,11 @@ Patch189: rpm-4.12.x-rpmSign-return-value-correction.patch
Patch190: rpm-4.13.x-fix_find_debuginfo_opts_g.patch
Patch191: rpm-4.13.x-enable_noghost_option.patch
Patch192: rpm-4.11.x-provide-audit-events.patch
Patch193: rpm-4.11.x-setcaps.patch
Patch194: rpm-4.11.x-disk-space-calculation.patch
Patch195: rpm-4.11.x-remove-perl-provides-from-requires.patch
Patch196: rpm-4.13.x-bad-owner-group.patch
Patch197: rpm-4.11.x-perl.req-6.patch

# Filter soname dependencies by name
Patch200: rpm-4.11.x-filter-soname-deps.patch
@ -118,6 +123,7 @@ Patch312: rpm-4.11.x-man-systemd-inhibit.patch @@ -118,6 +123,7 @@ Patch312: rpm-4.11.x-man-systemd-inhibit.patch
Patch313: rpm-4.11.x-quiet-signing.patch
Patch314: rpm-4.11.x-export-verifysigs-to-python.patch


# Temporary Patch to provide support for updates
Patch400: rpm-4.10.90-rpmlib-filesystem-check.patch
# Disable plugins
@ -133,6 +139,13 @@ Patch502: rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch @@ -133,6 +139,13 @@ Patch502: rpm-4.13.x-RPMCALLBACK_ELEM_PROGRESS-available-header.patch
# Backport of reinstall functionality from 4.12
# https://bugzilla.redhat.com/show_bug.cgi?id=1466650
Patch503: rpm-4.11.x-reinstall.patch
Patch504: rpm-4.11.x-add-g-libs.patch

# Fix brp-python-bytecompile script to work with Python 3 packages
# https://bugzilla.redhat.com/show_bug.cgi?id=1691402
# Fixed upstream:
# https://github.com/rpm-software-management/rpm/commit/a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be
Patch505: rpm-4.11.3-brp-python-bytecompile-Fix-when-default-python-is-no.patch

# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@ -156,7 +169,7 @@ BuildRequires: fakechroot @@ -156,7 +169,7 @@ BuildRequires: fakechroot

# XXX generally assumed to be installed but make it explicit as rpm
# is a bit special...
BuildRequires: redhat-rpm-config
BuildRequires: powerel-rpm-config
BuildRequires: gawk
BuildRequires: elfutils-devel >= 0.112
BuildRequires: elfutils-libelf-devel
@ -365,6 +378,11 @@ Requires: rpm-libs%{_isa} = %{version}-%{release} @@ -365,6 +378,11 @@ Requires: rpm-libs%{_isa} = %{version}-%{release}
%patch190 -p1 -b .find_debuginfo_opts
%patch191 -p1 -b .noghost
%patch192 -p1 -b .audit-events
%patch193 -p1 -b .setcaps
%patch194 -p1 -b .diskspace
%patch195 -p1 -b .perl.req5
%patch196 -p1 -b .badowner
%patch197 -p1 -b .perl.req6

%patch200 -p1 -b .filter-soname-deps
%patch201 -p1 -b .dont-filter-ld64
@ -396,6 +414,8 @@ Requires: rpm-libs%{_isa} = %{version}-%{release} @@ -396,6 +414,8 @@ Requires: rpm-libs%{_isa} = %{version}-%{release}
%patch501 -p1 -b .elem-progress
%patch502 -p1 -b .elem-progress-header
%patch503 -p1 -b .reinstall
%patch504 -p1 -b .g-libs
%patch505 -p1 -b .brp-python-bytecompile

%if %{with int_bdb}
ln -s db-%{bdbver} db
@ -420,7 +440,7 @@ export CPPFLAGS CFLAGS LDFLAGS @@ -420,7 +440,7 @@ export CPPFLAGS CFLAGS LDFLAGS
--libdir=%{_libdir} \
--build=%{_target_platform} \
--host=%{_target_platform} \
--with-vendor=redhat \
--with-vendor=powerel \
%{!?with_int_bdb: --with-external-db} \
%{!?with_plugins: --disable-plugins} \
--with-lua \
@ -627,6 +647,23 @@ exit 0 @@ -627,6 +647,23 @@ exit 0
%doc COPYING doc/librpm/html/*

%changelog
* Sun May 26 2019 Pavlina Moravcova Varekova <pmoravco@redhat.com> - 4.11.3-40
- Remove only special perl dependencies provided in the same file (#1570181)

* Thu Mar 21 2019 Tomas Orsava <torsava@redhat.com> - 4.11.3-39
- Fix brp-python-bytecompile script to work with Python 3 packages (#1691402)

* Thu Mar 21 2019 Pavlina Moravcova Varekova <pmoravco@redhat.com> - 4.11.3-38
- Add flag to use strip -g instead of full strip on DSOs (#1663264)

* Wed Mar 20 2019 Pavlina Moravcova Varekova <pmoravco@redhat.com> - 4.11.3-37
- Use user and group of the rpmbuild process or root for sources (#1572772)

* Thu Feb 28 2019 Pavlina Moravcova Varekova <pmoravco@redhat.com> - 4.11.3-36
- Add popt-based options --setcaps and --restore (#1550745)
- Improve hardlink handling in disk space calculation (#1491786)
- Remove perl dependencies that are provided in the same file (#1570181)

* Tue Jun 19 2018 Pavlina Moravcova Varekova <pmoravco@redhat.com> - 4.11.3-35
- Correct "root_dir" output in audit event (#1555326)


Loading…
Cancel
Save