basebuilder_pel7ppc64lebuilder0
5 years ago
12 changed files with 530 additions and 36 deletions
@ -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: |
@ -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" |
||||
|
@ -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 \ |
@ -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; |
||||
} |
@ -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]+)\)/; |
||||
+ } |
||||
+ |
||||
+} |
@ -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" |
@ -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. */ |
||||
|
@ -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; |
||||
} |
Loading…
Reference in new issue