Compare commits

...

308 Commits
f21 ... master

Author SHA1 Message Date
Fedora Release Engineering 76cdb88b46 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 07:56:43 +00:00
Fedora Release Engineering 0ebeb5e42f - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 05:54:57 +00:00
Peter Robinson 767e7a50a0 rebuild for ima-evm-utils 1.3 2020-07-26 13:53:37 +01:00
Tom Callaway 97e353c02c rebuild for lua 5.4 2020-06-29 22:41:11 -04:00
Panu Matilainen 621aa87bba Rebase to rpm 4.16.0 beta3 2020-06-24 11:37:24 +03:00
Panu Matilainen f7ecc585d0 Fix prefix search on sqlite backend (many file triggers not running) 2020-06-10 10:40:39 +03:00
Panu Matilainen b9a32bc4b3 Unbreak metainfo() provide generation 2020-06-08 12:00:05 +03:00
Panu Matilainen 220819b9e7 Don't auto-enable _flush_io on non-rotational media, it's too costly 2020-06-03 10:25:34 +03:00
Panu Matilainen bd27fcf3b7 Rebase to rpm 4.16.0 beta1 2020-06-01 09:51:16 +03:00
Panu Matilainen 03c8fed85d Move scriptlets to a more logical space in the spec
Accidentally slopped into middle of %files sections by yours truly.
2020-06-01 09:50:30 +03:00
Miro Hrončok 08269f4d3c Rebuilt for Python 3.9 2020-05-22 20:17:50 +02:00
Panu Matilainen 422abdab32 Fix segfault when trying to use unknown database backend 2020-05-12 12:56:04 +03:00
Panu Matilainen d451552090 Switch default database to sqlite (#1818910)
Newly created databases will be sqlite unless overridden in configuration.

If BDB database is detected at %posttrans of rpm itself, it's flagged
for rebuild in the next reboot. This will serve two purposes: the primary
objective is obviously to convert to configured (ie sqlite) format,
but as a secondary side-effect, any remaining BDB databases will get
a much needed maintenance rebuild from time to time.
2020-05-07 09:15:38 +03:00
Panu Matilainen 82d52d2b3a Use traditional comments instead of %dnl to preserve boostrappability 2020-05-07 08:40:26 +03:00
Panu Matilainen 13e726e8eb Handle rpmdb-rebuild service enablement for upgrades
Discussed in https://pagure.io/fesco/issue/2382, deemed to not require
any exceptions although this is a bit of an unusual path.

%triggerun as opposed to seemingly more obvious %triggerin is used to
ensure preset files have already been updated without adding new
ordering constraints.
2020-05-04 10:17:42 +03:00
Panu Matilainen 1b2c14f39a Fix questionable uses of %{name} and %{version} in the spec
%{name} and %{version} refer to the name and version strings of the
package that will be built and shouldn't be used for things that
do not honor those macros. Such as pre-existing or predetermined
filenames.

De-facto packaging practises over multiple decade liberally (ab)use
these and various other macros in places they don't belong - if rpm itself
doesn't follow its own rules then how can we expect anybody else to do so...

This doesn't change anything as is, but enables both Name: and Version:
to be changed arbitrarily without breaking the package build, which is
how it should optimally be. If this was strictly followed then scl-utils
would've been a walk in the park. Relatively speaking.
2020-04-23 11:00:47 +03:00
Panu Matilainen 931d61f432 Fix regression(s) on build dependency resolution
Upstream ticket https://github.com/rpm-software-management/rpm/issues/1189
2020-04-22 15:43:23 +03:00
Panu Matilainen b070660329 Remember to actually add the .service file, doh...
Should've been in commit c091c2fcdc
2020-04-22 12:18:02 +03:00
Panu Matilainen c091c2fcdc Add rpmdb-rebuild systemd service
This can be activated with 'touch /var/lib/rpm/.rebuilddb' to perform
rpmdb rebuild on next reboot. The immediate motivation is having a place
to perform automatic database format conversion in a reasonably safe
manner, but could also serve recovery purposes.
2020-04-22 12:00:38 +03:00
Panu Matilainen 9f5580ba45 Warn on undefined macros in buildtree setup macros (#1820349) 2020-04-20 14:18:05 +03:00
Panu Matilainen b48020478b Dumb copy-paste error with patch numbers, sigh. 2020-04-09 14:56:35 +03:00
Panu Matilainen 999c698ec1 Fix regression causing all ELF files classified as OCaml 2020-04-09 14:55:12 +03:00
Panu Matilainen 6715757024 Fix invalid path passed to parametric macro generators 2020-04-06 14:40:01 +03:00
Panu Matilainen 8332f4fa64 Fix db lock files not getting packaged
Commit a5c4573419 caused a literal
/var/lib/rpm/.*.* file to be packaged as a ghost instead of the db lock
files it was supposed to catch. Ensure any hidden db locks get copied
too after initializing. Thanks to Thierry Vignaud for spotting.
2020-04-02 12:48:24 +03:00
Panu Matilainen 52a9ca7aad Move bdb specific systemd-tmpfiles cleanup crutch behind the bdb bcond 2020-04-01 14:10:37 +03:00
Panu Matilainen a5c4573419 Rebase to rpm 4.16.0 alpha
- Add bconds for and enable sqlite, ndb and bdb_ro database backends
- Add bcond for disabling bdb backend
- Drop lmdb bcond, the backend was removed upstream
- Ensure all database backend files are owned
- Fix external environment causing test-suite failures in spec build
- Re-enable hard test-suite failures again
2020-03-31 13:54:46 +03:00
Fedora Release Engineering 5a0eaf89ad - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 17:51:32 +00:00
Panu Matilainen 47d58abc40 Obsolete python2-rpm to fix upgrade path (#1775113) 2020-01-09 13:01:09 +02:00
Panu Matilainen aa9697a386 Rebase to 4.15.1
Seems that one of the arm patches didn't get reverted upstream which
requires us to carry it here. Oh, poo.
2019-11-18 13:46:45 +02:00
Adam Williamson 7cf9f46d11 Really revert armv8 detection improvements (apply patch)
Peter added the patch to the repo but forgot to add it to the
spec file.
2019-11-14 10:15:02 -08:00
Peter Robinson 2be34826de Revert armv8 detection improvements 2019-10-23 22:38:51 +01:00
Stephen Gallagher 197455deb6
Revert aliasing arm64 to aarch64
Resolves: rhbz#1763831

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2019-10-21 13:38:12 -04:00
Panu Matilainen 534022dd6d Revert problematic sub-variants of armv8 (#1691430) 2019-10-18 14:56:50 +03:00
Panu Matilainen d09b7311d5 Drop python2 bindings for good (#1761211)
This means a breakup with F31 branch, but I dont want to add tonne of
conditional build foobar for a dying breed. Bye bye Python 2, and RIP.
2019-10-17 14:25:24 +03:00
Adam Williamson 706be6f0fd Revert systemd inhibit plugin's calling of dbus_shutdown (#1750575) 2019-10-15 17:23:50 -07:00
Panu Matilainen 5c57b11a0f Update to rpm 4.15.0 final 2019-09-26 13:22:19 +03:00
Panu Matilainen 41f9713949 Update to 4.15.0-rc1 2019-08-28 13:32:19 +03:00
Panu Matilainen 48ff1fa7e0 Fix some issues in the thread cap logic 2019-08-27 14:25:07 +03:00
Panu Matilainen dce71ded33 Re-enable test-suite, temporarily disabled during alpha troubleshooting 2019-08-26 11:35:43 +03:00
Panu Matilainen a0095d14ee Try again with less broken capping patches... 2019-08-23 14:12:34 +03:00
Panu Matilainen d678a6a69f Cap number of threads on 32bit platforms (#1729382)
Also drop %_lto_cflags macro (reverted upstream) before people
start adapting its use.
2019-08-23 13:52:16 +03:00
Panu Matilainen c9c421374c Restore strict order of build scriptlet stdout/stderr output 2019-08-23 13:32:44 +03:00
Miro Hrončok ac67522da9 Rebuilt for Python 3.8 2019-08-15 18:22:00 +02:00
Miro Hrončok d962bff879 Rebuilt for libimaevm.so.1 2019-07-31 20:01:44 +02:00
Fedora Release Engineering e4c27a9cdf - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 18:45:35 +00:00
Igor Gnatenko b419b5cbcd
Backport patch to not set RPMTAG_BUILDTIME to SOURCE_DATE_EPOCH
We have enabled SOURCE_DATE_EPOCH, but it changed behavior of
RPMTAG_BUILDTIME. We need to restore it…

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-07-20 18:30:29 +02:00
Panu Matilainen 0052ff9134 Rebase to 4.15.0 beta 2019-06-27 11:08:03 +03:00
Panu Matilainen 70d62ac48f Fix excessive TLS use, part II (#1722181) 2019-06-20 15:15:06 +03:00
Panu Matilainen 894aa7a821 Fix excessive TLS use (#1722181) 2019-06-20 14:00:13 +03:00
Panu Matilainen d8b230b992 Drop buildarch again now that python_provide no longer needs it (#1720139) 2019-06-19 09:39:06 +03:00
Panu Matilainen c45704ba93 Temporarily re-enable buildarch macro for python_provide macro use (#1720139) 2019-06-14 10:37:34 +03:00
Panu Matilainen 67fd2db9f5 Reorg patches as per upstream status 2019-06-14 10:34:02 +03:00
Panu Matilainen 49f11812bc Don't fail build trying to kill a non-existent process (#1720143) 2019-06-13 12:59:03 +03:00
Igor Gnatenko 5965610d18
Fix build of binary packages in parallel
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 14:59:33 +02:00
Igor Gnatenko 7c70aabe3a
Bump release
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 13:45:55 +02:00
Igor Gnatenko 82285fa5c1
Copy changelog in one thread at a time
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 13:45:21 +02:00
Igor Gnatenko 7b81210f7b
Try fix for omp crash
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 12:48:53 +02:00
Igor Gnatenko c065605b86
Revert generation of binary packages in parallel
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-11 00:09:36 +02:00
Igor Gnatenko 68ce99e7f4
Try some probably non-working fix
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 23:46:44 +02:00
Igor Gnatenko 81c625136e
Switch back to 4.15-alpha
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 23:40:51 +02:00
Igor Gnatenko 0cd3bd878c
Next bisect (18c92e6fe)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 23:13:47 +02:00
Igor Gnatenko 9e921777c3
Next bisect (d86c0c28a)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 22:48:09 +02:00
Igor Gnatenko 6b35a985c8
Next bisect (272431d34)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 22:27:45 +02:00
Igor Gnatenko 68e6f54804
Next bisect (8da6654e3)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 22:04:22 +02:00
Igor Gnatenko f1d1d8f7d0
Next bisect (a5d7c6caf)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 21:35:23 +02:00
Igor Gnatenko 1484f717c2
Fix build
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 20:54:26 +02:00
Igor Gnatenko 3d63652e9b
Start bisect (57899bd3b)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 20:48:07 +02:00
Igor Gnatenko 5c48e03971
fix file list
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 20:30:42 +02:00
Igor Gnatenko 6f6aff51ae
chmod +x proper rpmbuild
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 20:23:42 +02:00
Igor Gnatenko 8d4a190d35
Add wrapper to export MALLOC_CHECK_=3
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 20:21:58 +02:00
Igor Gnatenko 9e41d42924
Disable tests temporarily
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 19:14:43 +02:00
Igor Gnatenko 472245e661
Build with -fsanitize=address
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 19:08:57 +02:00
Igor Gnatenko 055ecdaa97
Disable tests temporarily
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 17:58:13 +02:00
Igor Gnatenko cb6bbe0cd7
Add fullstop for audit plugin description
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 17:16:14 +02:00
Igor Gnatenko b52e74b1e1
Drop Group tag from audit plugin
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-10 17:15:52 +02:00
Panu Matilainen 0a7d172130 Update to rpm 4.15.0 alpha
- New rpm-plugin-audit sub-package
- Rebase patches as necessary
- Drop the evil python3 string monkey-patching
- Drop no longer needed LUA_COMPAT defines and friends and use
  %set_build_flags instead.
- python and perl macros and helper scripts are gone
2019-06-10 13:12:47 +03:00
Panu Matilainen d958e93dd1 More spec cleanups
- Drop support for sanitizer build, it never really worked anyway
- Drop leftover build-dependency on binutils-devel
- Truncate changelog to rpm 4.14.x (last two years)
2019-06-10 10:45:58 +03:00
Panu Matilainen 398bbf6b67 Spec cleanups
- Drop support for Fedora < 28 builds
- Drop leftover BDB-related compiler flag foo
2019-06-10 10:25:58 +03:00
Panu Matilainen d90bd67908 Avoid DNS use in test-suite, drop obsolete patches
Use pre-determined buildhost in test-suite to avoid DNS usage, sometimes
the builder DNS config is whacked which causes crazy slowdown of our builds.

Drop obsolete specspo and gpg2 related patches, specspo is gone for
seven years and gpg2 preferral is upstream in a different form (thanks
to Igor Gnatenko for pointing these out)
2019-06-07 13:59:22 +03:00
Igor Gnatenko bda4949bed Use py2/3 macros for building and installing the bindings 2019-06-07 10:34:46 +03:00
Igor Gnatenko 66e2ef5d88
End description with fullstop
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-02 14:27:37 +02:00
Panu Matilainen 3abc97620b Support build-id generation from compressed ELF files (#1650072) 2019-05-21 12:25:27 +03:00
Igor Gnatenko 2688218e05
Suggest gdb-minimal
References: https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-05-03 18:12:54 +02:00
Panu Matilainen 81329c3ca8 Replace deprecated __global_ldflags uses with build_ldflags macro 2019-04-25 15:04:30 +03:00
Panu Matilainen c7bd807f7c Fix excessive reference counting on faked string .decode() 2019-04-11 10:38:45 +03:00
Panu Matilainen d4f7fd8c04 Make the Python 3 API actually usable (#1693751)
All string data from rpm is now returned as surrogate-escaped utf-8
string objects. 99.999% of that data IS utf-8 encoded to begin with,
returning bytes is plain broken.

As a temporary crutch,  monkey-patch a .decode() method to returned strings
to give users time to migrate from the long-standing broken behavior.
2019-04-10 11:52:40 +03:00
Panu Matilainen 57b4e922b2 Debuginfo fixes:
Generate minidebug for PIE executables on file >= 5.33 too
Backport find-debuginfo --g-libs option for glibc's benefit (#1661512)
2019-04-10 10:28:12 +03:00
Fedora Release Engineering 9519e9e6d1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 11:34:43 +00:00
Igor Gnatenko 1aed509f16 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:45 +01:00
Panu Matilainen 52b5a90d43 Meh, rpmtests isn't getting re-generated so patch it directly
...as otherwise the new modularity tag causes test-suite failure
2018-12-19 15:31:34 +02:00
Panu Matilainen af9bdc4611 Backport the new modularity label tag (#1650286) 2018-12-19 15:18:04 +02:00
Panu Matilainen 6c9430bd2a Acutlly add the patch for the previous comment (yeah its Monday alright) 2018-11-19 13:18:52 +02:00
Panu Matilainen 1eb187d393 Take prefix into account when compressing man pages etc for Flatpak builds
From the original PR (https://src.fedoraproject.org/rpms/rpm/pull-request/15):

    The way that a Flatpak works is that the runtime is mounted at /usr
    and the application and included libraries are mounted at /app. So
    the application and included libraries need to be rebuilt with
    a prefix of /app.

This patch makes brp-compress find man pages and info pages under current
prefix, avoiding the name for spec file changes for the rebuild.
2018-11-19 12:56:21 +02:00
Panu Matilainen 06f829d1d3 Selinux plugin requires a base policy to work (#1641631) 2018-10-24 17:18:58 +03:00
Panu Matilainen 4fa277df97 Rebase to rpm 4.14.2.1 2018-10-22 14:39:48 +03:00
Igor Gnatenko 69ee4d255a
Push name/epoch/version/release macro before invoking depgens
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-10-17 12:58:11 +02:00
Igor Gnatenko 5460ad1e17
Resurrect long since broken Lua library path
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-10-16 11:24:03 +02:00
Panu Matilainen 4ba57b66ab - Actually fail build on test-suite failures again
- Invoke python2 explicitly from test-suite to unbreak build, part II
2018-10-12 09:10:21 +03:00
Panu Matilainen 106f86a617 Cleanup more 10+ year old cruft:
- Drop duplicate BDB buildrequire
- Drop nowadays unnecessary BDB macro foo
- Drop nowadays unnecessary manual libcap dependency

Relevant and necessary in their day, but not anymore.
2018-10-11 16:53:06 +03:00
Panu Matilainen 3f81427a28 - Fix build when systemd is not installed (duh) 2018-10-11 14:46:47 +03:00
Panu Matilainen d58b662497 - Own all rpmdb files and ensure the list remains up to date
- Drop redundant verify exclusions on rpmdb ghosts
2018-10-11 14:29:55 +03:00
Panu Matilainen 2a29f1e128 - Erm, really use the macro for tmpfiles.d path
- Erm, don't nuke buildroot at beginning of %%install
- Use modern build/install helper macros
2018-10-11 14:15:40 +03:00
Panu Matilainen 85cd9c475b - Eh, selinux plugin dependency condition was upside down (#1493267)
- Drop no longer necessary condition over imaevm name
- Drop no longer necessary obsolete on compat-librpm3
2018-10-11 12:53:16 +03:00
Panu Matilainen 9a8f2080d7 - Fix ancient Python GIL locking bug (#1632488)
- Use the appropriate macro for tmpfiles.d now that one exists
2018-10-11 10:58:38 +03:00
Panu Matilainen 06b8b7f066 Update to rpm 4.14.2 final 2018-08-21 14:26:20 +03:00
Panu Matilainen 8d934fd72d Move python-macro-helper to main package where the macros are (#1577860) 2018-08-13 15:11:25 +03:00
Panu Matilainen cae019c19a Update to rpm 4.14.2-rc2 2018-08-08 17:12:55 +03:00
Florian Festi 026fff0d83 - Wrap zstd Requires in build condition 2018-08-07 11:24:30 +02:00
Igor Gnatenko adbe3634b5
Decompress DWARF compressed ELF sections
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-21 10:16:39 +02:00
Fedora Release Engineering 95db6548b8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 03:43:24 +00:00
Miro Hrončok 8029c4e85b Rebuilt for Python 3.7 2018-07-02 18:24:09 +02:00
Panu Matilainen 816a8d9b50 Doh, always forgetting new-sources.. 2018-06-29 15:44:27 +03:00
Panu Matilainen 22e1547001 Update to rpm 4.14.2-rc1
Additionally...
- Patching test-suite for python2 too painful, just sed it instead
- Fix premature version increment from previous changelog entries, oops
2018-06-29 15:43:00 +03:00
Panu Matilainen e79d625c87 Make it actually build, sigh
- Ehm, need to patch the autogenerated rpmtests script too for python2
- Ehm, it's ldconfig_scriptlets not scripts
- Drop the non-working python envvar magic from obsoleted change
2018-06-29 12:04:11 +03:00
Panu Matilainen 8b3e871c1f Invoke python2 explicitly from test-suite to unbreak build 2018-06-29 11:16:01 +03:00
Panu Matilainen 7d7537244d Remove direct ldconfig calls, use compat macros instead 2018-06-29 11:00:36 +03:00
Miro Hrončok b86c75e7b0 Rebuilt for Python 3.7 2018-06-15 12:25:41 +02:00
Miro Hrončok 364d038b55 Backport upstream solution to make brp-python-bytecompile automagic part opt-outable
See https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
2018-05-28 14:12:32 +02:00
Mark Wielaard 43ea916f2f find-debuginfo.sh: Handle application/x-pie-executable
Resolves: #1581224
2018-05-22 23:01:41 +02:00
Igor Gnatenko 99d6687a36
Split rpm-build-libs to one more subpackage rpm-sign-libs
This is the only package in default buildroot pulling in gnupg2 which
pulls gnutls, libgcrypt, nettle…

Acked-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-20 11:34:17 +01:00
Panu Matilainen 29c140818d Explicitly BuildRequire gcc and make 2018-02-19 11:21:50 +02:00
Igor Gnatenko 91f61a528c
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:05:57 +01:00
Panu Matilainen a83817c556 Avoid unnecessary macro helper dependency on /usr/bin/python (#1538657)
Also fix release of previous changelog entry
2018-01-31 16:11:44 +02:00
Miro Hrončok f974a6c3d8 Fix patch number (two sixes) 2018-01-30 13:43:55 +01:00
Tomas Orsava 0670d684d5 Add envvar that will be present during RPM build
Part of a Fedora Change for F28: "Avoid /usr/bin/python in RPM build"
https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
2018-01-30 13:32:10 +01:00
Petr Viktorin 3f65cd7a41 Skip automatic Python byte-compilation if *.py files are not present 2018-01-30 10:48:34 +01:00
Florian Weimer c6d1f7c3e0 Rebuild to work around gcc bug leading to librpm miscompilation (#1538648) 2018-01-25 16:41:43 +01:00
Panu Matilainen eb1281d241 Avoid nuking the new python-macro-helper along with dep generators (#1535692) 2018-01-18 10:45:58 +02:00
Panu Matilainen 8219d71cbb Rebase to rpm 4.14.1 2018-01-16 13:39:27 +02:00
Igor Gnatenko 193c8871cc Fix typo in Obsoletes
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-11-07 12:51:46 +01:00
Igor Gnatenko e6d364fc15 Remove platform-python bits
Platform Python didn't prove to work.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-11-06 15:04:31 +01:00
Panu Matilainen 1a61b7b072 - Move selinux plugin dependency to selinux-policy in Fedora >= 28 (#1493267) 2017-10-26 09:32:14 +03:00
Panu Matilainen 7f79c17b8e Medicine for bogus test-suite failures in buildsys/mock
- Dump out test-suite log in case of failures again
- Don't assume per-user groups in test-suite
2017-10-12 17:10:14 +03:00
Panu Matilainen 9c3c353fc6 Rebase to rpm 4.14.0 final 2017-10-12 12:27:37 +03:00
Troy Dawson baaf8b93db Cleanup spec file conditionals 2017-10-10 13:54:20 -07:00
Panu Matilainen cae5fc9f6f Add build conditionals for zstd and lmdb support, actually enable zstd 2017-10-03 16:51:31 +03:00
Panu Matilainen 0cd499eaca Spec cleanups
Move the actual release number out into the open where it's like,
well, visible. Eliminate double negations on libarchive andxz build
conditionals.
2017-10-03 16:49:15 +03:00
Panu Matilainen b4ee3799d1 BuildRequire gnupg2 for the testsuite 2017-09-29 21:11:36 +03:00
Panu Matilainen 7e9150e88a ima-evm-utils only has a -devel package in fedora >= 28 2017-09-29 11:31:49 +03:00
Panu Matilainen 4e78f8672e Rebase to rpm 4.14.0-rc2 2017-09-28 17:16:34 +03:00
Panu Matilainen 822c26c12e Fix Ftell() past 2GB on 32bit architectures (#1492587) 2017-09-18 16:29:23 +03:00
Panu Matilainen aa109fa4c6 Seems ima-evm-utils grew a -devel package now - good, update our builddep 2017-09-07 12:53:01 +03:00
Panu Matilainen 37398b20d6 Actually honor with/without libimaevm option, doh
Also in rpm 4.14 imaevm support require ima-evm-utils >= 1.0
due to changed API.
2017-09-07 12:29:39 +03:00
Panu Matilainen 1dda23dab1 - Rebase to rpm 4.14.0-rc1 (http://rpm.org/wiki/Releases/4.14.0)
- Re-enable SHA256 header digest generation (see #1480407)
2017-09-06 18:41:01 +03:00
Panu Matilainen fefe4f03a3 Band-aid for DB_VERSION_MISMATCH errors on glibc updates (#1465809) 2017-08-28 19:39:24 +03:00
Miro Hrončok d2519961ce Add patch for consistency with python-rpm-generators 2017-08-24 14:00:38 +02:00
Panu Matilainen 67d7133dc4 Remove ugly kludges from posttrans script, BDB handles this now
Recent libdb handles environment version mismatch automatically and
does a better job of it than we ever could, don't mess with it.
Other than that, it hasn't been really doing it's alleged job in
many years because first yum and then dnf started doing a separate
verify step after the transaction which recreates the environment...
2017-08-24 11:56:54 +03:00
Panu Matilainen 6f54bf086a Silence harmless but bogus error message on noarch packages (#1482144) 2017-08-18 16:17:46 +03:00
Miro Hrončok 4d1adcf80e Build with platform_python 2017-08-17 20:19:05 +02:00
Iryna Shcherbina 412abe2ac1 Platform-python bootstrap: step 1 - build without platform_python
Changes needed for Platform Python Stack change (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack):
- Add platform-python bytecompilation patch: platform-python-bytecompile.patch
- Add platform python deps generator patch: platform-python-abi.patch
- Add a platform-python subpackage and remove system python related declarations
- Build rpm without platform_python for bytecompilation (already set in spec file)

When platform-python package is built, switch to `%bcond_without platform_python`
to build platform-python-rpm subpackage.
2017-08-15 11:09:05 +02:00
Panu Matilainen 351ab49315 Disable macro argument quoting as a band-aid to #1481025
Too many existing macros heavily rely on quotes passing untouched,
needs a different approach upstream.
2017-08-14 11:51:21 +03:00
Panu Matilainen 14f55d6b22 Disable SHA256 header-only digest generation temporarily (#1480407)
There's a bug in rpm 4.13.x rpmkeys -K signature checking that chokes
on unknown tags it's supposed to ignore like older rpm versions do.
Unfortunately that means all active Fedora versions are affected,
so disabling the SHA256 header-only digest generation temporarily to
give time to deal with the other versions.
2017-08-11 09:51:16 +03:00
Panu Matilainen 39cbfb7d94 Doh, remember to upload sources too 2017-08-10 20:54:45 +03:00
Panu Matilainen 353b5cc65e Rebase to rpm 4.13.90 aka 4.14.0-alpha (#1474836) 2017-08-10 20:24:40 +03:00
Igor Gnatenko 4341d10fdf don't ignore test results
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-31 14:48:02 +02:00
Igor Gnatenko 31f6752731 Move _debuginfo_subpackages and _debugsource_packages to redhat-rpm-config
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-31 14:46:51 +02:00
Igor Gnatenko 8896954ef2 Update latest patches from merged versions
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-29 10:12:20 +02:00
Igor Gnatenko 53960f5052 Backport fixes for debuginfo subpackages
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-28 19:35:07 +02:00
Igor Gnatenko 908fe913e5 Backport trivial fix for debugsourcefiles.list ending up in random dir
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-26 07:31:52 +02:00
Igor Gnatenko 768c60d619 ignore test results
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-25 21:58:12 +02:00
Igor Gnatenko 11a51d900b Enable debugsource and debuginfo subpackages by default
As agreed on #fedora-devel with Dennis Gilmore that rel-eng tooling
requires some small changes and even if we miss something, it can
be fixed later.

(08:43:55 PM) dgilmore: we have the immediate tools we know need updating and the changes should be simple
(08:44:13 PM) dgilmore: so I am okay if rpm changed its behaviour right now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-25 21:26:32 +02:00
Igor Gnatenko e3181b4ffb Make sure that test results are not ignored
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-24 08:42:04 +02:00
Mark Wielaard 54b0c6f766 4.13.0.1-35 - Fix rpmfd_write on big endian arches. 2017-07-23 23:55:58 +02:00
Mark Wielaard ce3660feb6 Fix rpmfd_write on big endian arches. 2017-07-23 23:53:57 +02:00
Mark Wielaard b7548d7b53 find-debuginfo.sh: Remove non-allocated NOBITS sections from minisymtab. 2017-07-21 16:13:51 +02:00
Igor Gnatenko 85793f4048 Revert "Band-aid for python library versioning inadequacies (#1435135)"
It's not needed anymore and requires rebuilding RPM each time python updates.

This reverts commit fca9dfc3c7.
2017-07-20 15:32:47 +02:00
Mark Wielaard 284dc31743 Add find-debuginfo.sh: Add --keep-section and --remove-section
Resolves: #1465997
2017-07-18 15:49:11 +02:00
Igor Gnatenko 323283e27f Add automatic provides debuginfo(build-id) = ... into debuginfo subpackages
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-12 11:04:25 +02:00
Igor Gnatenko 3992a6874b Fix brokeness when using %filter_setup (RHBZ #1468476)
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-07 11:39:52 +02:00
Mark Wielaard e9309e79ee 4.13.0.1-29 - Use file list to explicitly set mode for build-id dirs/files
Resolves: #1452893, #1458839
2017-07-04 14:13:04 +02:00
Igor Gnatenko 082d5d0331 Track all patches on pagure and git format-patch them since they are cherry-picked
This will give us more correct patches which is easier to rebase and they are taken
from real upstream.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-07-03 14:34:01 +02:00
Mark Wielaard 97b56ab27d 4.13.0.1-28 2017-06-30 15:51:17 +02:00
Mark Wielaard 79f78cc3d5 Add find-debuginfo-and-macro-docs.patch. 2017-06-28 23:17:47 +02:00
Mark Wielaard 1501796e3f Add find-debuginfo-dwz-multi.patch. 2017-06-28 23:05:54 +02:00
Mark Wielaard 7a3daadb26 Add find-debuginfo-filter-built-ins.patch. 2017-06-28 22:25:38 +02:00
Mark Wielaard 6e205bd77e Add debugedit-prefix.patch. 2017-06-28 22:24:24 +02:00
Mark Wielaard f04311b662 4.13.0.1-27 2017-06-28 15:21:55 +02:00
Mark Wielaard 326fa8d2ef Add find-debuginfo-split-traversal-and-extraction-fix.patch (#1465170) 2017-06-28 15:12:58 +02:00
Igor Gnatenko 34e0e8c813 rebase patches
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-06-28 12:37:07 +02:00
Igor Gnatenko d7aa14bcd4 Backport patches for rich dependencies from dependency generators
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-06-28 12:29:48 +02:00
Mark Wielaard da3af5788b Add support for debugsource and debuginfo subpackages
- find-debuginfo-untangle-unique-build-options.patch
- debugsrc-and-sub-debuginfo-packages.patch
2017-06-25 13:17:18 +02:00
Mark Wielaard a11f229741 Backport parallel debuginfo processing. 2017-06-23 16:24:36 +02:00
Mark Wielaard 117a783617 Fix resetting attr flags in buildid creation (#1449732) 2017-05-30 11:48:59 +02:00
Panu Matilainen 7bc220d2a2 Python dependency generators live in python-rpm-generators now (#1444925) 2017-05-23 12:21:52 +03:00
Panu Matilainen 0123653c89 Fix rpmsign python module import failing (#1393659) 2017-05-23 11:49:46 +03:00
Florian Festi ebc71181c9 The %srcdir macro is presuming the version will have a format `x.y.z`
and fails when presented with a longer version `4.13.0.1`.

In addition, the download location changed from `rpm.org` to `ftp.rpm.org`.

Resolves: #1447417
2017-05-03 16:17:00 +02:00
Mark Wielaard 968a569040 Fix rpmbuild world writable empty (tmp) dirs in debuginfo (#641022) 2017-04-25 17:45:30 +02:00
Mark Wielaard 9eaad7b89c Add find-debuginfo.sh -n (debugedit --no-recompute-build-id) option. 2017-04-16 18:23:38 +02:00
Mark Wielaard e589ca1992 Minisymtab should only be added for executables or shared libraries. 2017-04-16 18:23:20 +02:00
Panu Matilainen f90c3447a3 gpg path must not depend on %%_prefix and such (#1437726) 2017-03-31 12:16:12 +03:00
Panu Matilainen b9ddc1fd31 Fix problems in previous commit, related to #1435135:
- Work around missing python[23] during build dependency parse
- Include ISA in the new python library version dependencies too
2017-03-27 12:52:49 +03:00
Panu Matilainen fca9dfc3c7 Band-aid for python library versioning inadequacies (#1435135)
Apparently Python upstream doesn't care about library versioning
for "minor" things like new symbols being added, defeating automatic
dependency tracking both at rpm and linker level. For random program
X not working until Python is updated too is a minor inconvenience,
but system updater breaking is not fun. Band-aid the situation with
manually inserted dependencies on the full Python version used
for compilation.
2017-03-27 12:22:04 +03:00
Mark Wielaard 0277786e14 Unbreak short-circuited binary builds (#1434235). 2017-03-27 10:37:53 +02:00
Mark Wielaard bc4decbc5f Add fix for off by one adding DW_FORM_string replacement (#1434347) 2017-03-21 17:04:02 +01:00
Mark Wielaard 915296ceec Add fix for build-ids in non-executable ELF files (#1433837) 2017-03-20 10:20:58 +01:00
Mark Wielaard 20cf529b3c Add tests fix for sed file build-id regexp matching. 2017-03-20 09:56:43 +01:00
Mark Wielaard c6952c6366 Fix reading and updating (cross-endian) build-id information. 2017-03-17 20:54:07 +01:00
Mark Wielaard 434eb9a375 Do not process build-ids for noarch packages. 2017-03-17 10:59:33 +01:00
Mark Wielaard 03607fe128 Add fix for debugedit replace debug_line files. 2017-03-16 22:27:59 +01:00
Igor Gnatenko 72b4743645 rebase openssl patch
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-03-16 16:37:08 +01:00
Igor Gnatenko 7f27803262 Switch to OpenSSL (RHBZ #1390624)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-03-16 16:11:11 +01:00
Mark Wielaard 3e1463c90d Add fix to reset buildid file attributes. (#1432372) 2017-03-15 20:13:28 +01:00
Mark Wielaard 1a7230a63a Add fixup fix for build-id warnings on object files (#1430587) 2017-03-10 10:07:16 +01:00
Mark Wielaard b70aa8f2a7 Really add fix for missing_build_ids_terminate_build without __debug_package. 2017-03-09 15:59:12 +01:00
Mark Wielaard f66868c678 Add fix for missing_build_ids_terminate_build without __debug_package. 2017-03-09 15:58:09 +01:00
Mark Wielaard 74c3099433 Add fix for build-id warnings on object files (#1430587) 2017-03-09 13:18:23 +01:00
Panu Matilainen 5b4d9835cd Mark Wielaard's backports for debuginfo parallel installation etc (#1427970) 2017-03-08 11:33:04 +02:00
Panu Matilainen e3416e53e4 Fix incorrect version in latest changelog entry 2017-03-08 11:19:16 +02:00
Pavlina Moravcova Varekova b50c8542c2 Fix number of references on spec_Type (#1426578) 2017-02-24 12:41:41 +01:00
Tomas Orsava cef3bf8220 Fix handling of Python wheels by pythondistdeps.py --provides (#1421776) 2017-02-16 13:54:19 +01:00
Panu Matilainen d2ed0e9c50 Doh, remember to actually upload rpm 4.13.0.1 2017-02-16 13:24:37 +02:00
Panu Matilainen 4fb16e5212 Update to rpm 4.13.0.1 2017-02-16 12:33:06 +02:00
Florian Festi e38c401574 - Fix Python byte compilation for Python3 only packages
- Fixes #1411588
2017-02-14 14:25:11 +01:00
Fedora Release Engineering 056ac06464 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 11:50:33 +00:00
Panu Matilainen 4324465d43 Resurrect debuginfo GDB index generation (#1410907) 2017-01-23 15:45:57 +02:00
Panu Matilainen 8fcb9658d2 Fix malformed packages being generated around 4GB boundary (#1405570) 2017-01-23 15:45:35 +02:00
Igor Gnatenko 21fe6e8963 use python3 instead of system-python for rpm-build
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-06 15:06:51 +01:00
Igor Gnatenko e5922a6b43 Add Requires: python-setuptools for rpm-build (RHBZ #1410631)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-06 15:02:24 +01:00
Peter Robinson 3258296da3 Rebuild for Python 3.6 2016-12-21 11:10:27 +00:00
Igor Gnatenko 6a38aee710 Switch rpm-build to system-python (RHBZ #1405483)
References: https://bugzilla.redhat.com/show_bug.cgi?id=1405483
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-18 16:44:02 +01:00
Charalampos Stratakis eadbbd1b84 Rebuild for Python 3.6 2016-12-10 12:56:50 +01:00
Igor Gnatenko 62c1bd02da Fix arch-dependent requires in subpackages (RHBZ #1398591)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-12-03 13:24:36 +01:00
Igor Gnatenko a3e7120bb2 Fix arch-dependent requires in subpackages (RHBZ #1398591)
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-11-25 13:20:42 +01:00
Panu Matilainen ec7193f9fa Expand python subpackage obsoletion range (related: #1394125)
Since everything from F23 to rawhide is moving to 4.13.0 based
rpm the obsoletion range needs to match anything older than rawhide.
2016-11-11 10:19:07 +02:00
Panu Matilainen d3306a5d53 Fix invalid memory access on %transfiletriggerpostun (#1284645) 2016-11-07 15:09:30 +02:00
Thierry Vignaud 9e615fd4e0 Fix references to package names, re-enable test-suite 2016-11-07 14:49:13 +02:00
Panu Matilainen dcc21c353f Rebase to rpm 4.13.0 final 2016-11-03 13:33:38 +02:00
Panu Matilainen 32a2500e40 Fix harmless unused variable warning from fedora-specspo patch
Fedora specspo version is much simpler than the upstream one and
doesn't need to change languages etc, just drop the unused foa
tripping warnings.o
2016-11-02 08:01:35 +02:00
Panu Matilainen cf4d3ed708 Rebase to rpm 4.13.0-rc2 2016-10-20 18:39:56 +03:00
Richard W.M. Jones 9c2066b222 Add upstream patches for riscv64 architecture support.
These two patches are upstream already.  A third patch is also
upstream, but it is not needed with the older RPM we have, so I didn't
include it.
2016-09-23 15:30:01 +01:00
Igor Gnatenko adf839f07a Backport patch for missing import in Python dependency generator
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-24 15:48:12 +02:00
Kalev Lember 6534c05904 Fix -python2 and -python3 subpackage obsoleting from .42 2016-08-24 11:36:10 +02:00
Igor Gnatenko 68f46ed226 Use %%python_provide for python3 subpackage
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-23 11:59:19 +02:00
Igor Gnatenko 7cf326913f Backport fixes to ignore .egg-link files in Python dependency generator
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-22 16:12:03 +02:00
Igor Gnatenko 7defdb873e add conditional to build with ndb
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-13 10:35:20 +02:00
Florian Festi 485d8d8288 - Enable --majorver-provides in Python dependency generator 2016-08-12 11:11:52 +02:00
Igor Gnatenko 76e0e5ca63 Add %%{?system_python_abi}; Fixes and cleanups
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-08-09 18:17:41 +02:00
Fedora Release Engineering ce564aa882 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-19 12:32:00 +00:00
Petr Písař cd3a538d79 Drop rpm-build's dependency on perl-generators
This removes the last run-time dependency on Perl and frees minimal
build root from the Perl. See
<https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl>.
2016-07-18 16:17:29 +02:00
Florian Festi 5d3e134418 - Pass relevant files to new Python dependency generator
by passing all files in the PYthon directories
2016-07-15 12:30:29 +02:00
Florian Festi 82f61bba7f - Add new Python dependency generator (provides only for now) (#1340885) 2016-06-13 16:06:01 +02:00
Florian Festi ae2bf135f8 - Add support for _buildhost macro (#1309367) 2016-06-02 16:02:52 +02:00
Lubos Kardos b1ea7e94ff - Fix signing with non-ASCII uid keys
- Resolves: #1243963
2016-05-23 11:05:25 +02:00
Lubos Kardos 2f3f5c83b5 - Use armv7hl isa for all armhfp (armv7h*l) arches
- Resolves: #1326871
2016-05-19 13:18:47 +02:00
Lubos Kardos 933370a6b7 - Filter unversioned deps if corresponding versioned deps exist
- Resolves: #678605
2016-05-17 16:20:23 +02:00
Lubos Kardos 177601750a - Fix sigsegv in stringFormat()
- Resolves: #1316903
- Fix reading rpmtd behind its size in formatValue()
- Resolves: #1316896
2016-04-25 15:17:59 +02:00
Lubos Kardos 9f6c27f43a - escape % chars in previous changelog record 2016-04-15 11:53:25 +02:00
Lubos Kardos 20d5c660aa - Enable --no-backup-if-mismatch by default in %patch macro
- Resolves: #884755
- Add %{_default_patch_flags} to %__patch which is used in %autosetup
- Use fuzz settings for %autopatch/%autosetup
2016-04-15 11:25:09 +02:00
Lubos Kardos ea526e71ec - Make creating index records consistent for rich and rich-weak deps
- Resolves: #1325982
2016-04-14 13:50:52 +02:00
Lubos Kardos 761a0d9ec7 - Add RPMCALLBACK_ELEM_PROGRESS callback type (needed by dnf) 2016-04-12 16:49:54 +02:00
Igor Gnatenko 5d2cf89172 fix bogus date in %changelog
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2016-04-09 11:00:40 +02:00
Lubos Kardos 20901a7b46 - Fix non-working combination of %lang and %doc directive
- Resolves: #1254483
2016-04-06 11:36:13 +02:00
Lubos Kardos 0b025ec5a1 - Add posix.redirect2null
- Resolves: #1287918
2016-03-10 15:31:16 +01:00
Florian Festi 6fa824a46b Add description to plugin-systemd-inhibit 2016-02-29 10:59:58 +01:00
Florian Festi 43e89ed19f - Fix ExclusiveArch/ExcludeArch for noarch packages
- Resolves: #1298668
2016-02-26 11:23:45 +01:00
Florian Festi 13b1b5af07 Fix date in changelog 2016-02-26 08:13:10 +01:00
Florian Festi 985d349b70 - Fix dependencies for RemovePathPostfixes
- Resolves: #1306559
2016-02-25 16:59:56 +01:00
Florian Festi eb90463d6a - Add support for MIPS release 6
- Add mips32 mips64 mipsel and mipseb macros
- Resolves: #1285116
2016-02-19 14:38:42 +01:00
Florian Festi 0d0e45ddf5 Also block idle and sleep in the systemd-inhibit plugin
Resolves: #1297984
2016-02-19 14:38:38 +01:00
Lubos Kardos fbda200dd8 - Remove size limit when expanding macros
- Resolves: #1301677
2016-02-02 17:15:04 +01:00
Lubos Kardos 8b1762e954 - Harden rpm package again, previous attempt had to be reverted
- Resolves: #1289734
2016-02-01 16:52:08 +01:00
Lubos Kardos 933c30b2f0 - Remove setting %%_gnu macro explictly, no more needed
- Related: #1303265
2016-02-01 14:38:14 +01:00
Lubos Kardos 3d139e0cf5 - Revert using %%configure, it causes problems
- Temporary set %%_gnu macro explictly, just for one build
- Resolves: #1303265
2016-02-01 14:15:28 +01:00
Lubos Kardos 6f4d9623c3 - Use %%configure macro, harden rpm package
- Resolves: #1289734
2016-01-29 16:21:57 +01:00
Lubos Kardos ee86e21cbd - Escape %%autosetup in previous changelog record 2016-01-19 16:59:50 +01:00
Lubos Kardos a0329136e3 - Fix %autosetup not to cause errors during run of rpmspec tool
- Resolves: #1293687
2016-01-19 16:20:24 +01:00
Lubos Kardos cc1db15b09 - Fix recursive calling of rpmdeps tool
- Resolves: #1297557
2016-01-15 16:11:38 +01:00
Florian Festi d0fa66b1d4 Add support for %missingok as a standalone file attribute 2016-01-15 15:25:44 +01:00
Lubos Kardos ece6f42375 - Fix not chrooting transaction file triggers 2016-01-15 14:54:25 +01:00
Lubos Kardos 3bf18080b5 - Add possibility to disable file triggers
- Fix unwanted multiple execution of file triggers in dnf
- Resolves: #1282115
2015-11-23 16:16:27 +01:00
Peter Robinson 0a236df57d Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 2015-11-12 12:02:21 +00:00
Lubos Kardos f545271021 - Fix crash when parsing corrupted RPM file
- Resolves: #1273360
2015-11-06 16:24:27 +01:00
Lubos Kardos aa8a7b2897 Fix SIGSEGV in case of old unsupported gpg keys
Resolves: #1277464
2015-11-06 13:10:56 +01:00
Jaromir Capik d5562c9440 Adding STAGE2 bootstrap recipe 2015-11-04 16:38:18 +01:00
Lubos Kardos 3631545efd - Ignore SIGPIPE signals during execucton of scriptlets
- Resolves: #1264198
2015-10-30 14:55:06 +01:00
Florian Festi 627b9bf773 - Move /usr/lib/rpm/fileattrs directory from rpm-build to rpm
- Resolves: #1272766
2015-10-30 11:36:21 +01:00
Lubos Kardos c235b191f3 - Fix reading a memory right after the end of an allocated area
- Resolves: 1260248
- Add support for various types of dependencies to rpmdeps tool
- Resolves: 1247092
- fix %%autopatch when patch do not exist
- Resolves: 1244172
2015-10-23 16:06:19 +02:00
Lubos Kardos b73ac86cf5 - If %_wrong_version_format_terminate_build is 1 then terminate build
in case that version format is wrong i. e. epoch is not unsigned
  integer or version contains more separators (":", "-").
  %_wrong_version_format_terminate_build is 1 by deafault
- Resolves: 1251453
2015-10-23 14:42:40 +02:00
Robert Kuska 26ad4d8717 Rebuilt for Python3.5 rebuild 2015-10-14 11:50:50 +02:00
Florian Festi 392d6caed5 - Fix selinux plugin for permissive mode 2015-10-12 12:56:07 +02:00
Florian Festi 2e60cb3797 - Fix new rich dependency syntax 2015-09-07 17:27:40 +02:00
Kalev Lember 72ba7dafee Obsolete compat-librpm3
Make sure that F23->F24 upgrades remove the temporary compat-librpm3
subpackage.
2015-09-05 22:28:51 +02:00
Florian Festi 592510cfdb - Update to upstream 4.13.0-rc1 release 2015-09-02 19:51:49 +02:00
Lubos Kardos d407fb640c - Fix last occurence of PyString 2015-08-10 14:43:51 +02:00
Lubos Kardos 659760a576 - Add --filetriggers option to show info about file triggers 2015-08-06 15:48:15 +02:00
Lubos Kardos ad8c4238ac - If globbing of a filename fails, try use the filename without globbing.
- Related: #1246743
- Modify rpmIsGlob() to be more precise and compatible with glob().
- Related: #1246743
2015-08-03 17:43:23 +02:00
Lubos Kardos 977533abf2 - Don't warn when an escaped macro is in a comment
- Related: #1224660
2015-07-30 16:50:54 +02:00
Florian Festi 77efb7ee50 - Fix compressed patches
- Resolves: #1247248
2015-07-27 19:00:10 +02:00
Lubos Kardos ee316a0bf8 - Enable braces expansion in rpmGlob()
- Resolves: 1246743
2015-07-27 13:56:58 +02:00
Florian Festi 632722fbed - Update to upstream alpha release 2015-07-24 14:16:58 +02:00
Florian Festi fcbbffb488 - Add support for MIPS platform
- Resolves: #1242786
2015-07-15 10:01:30 +02:00
Florian Festi 8341ec3f15 - Fix Python import directive for more strict Python3 search rules
- Resolves: #1236493
2015-06-29 12:18:50 +02:00
Lubos Kardos 7aff53e3ab - Allow gpg to get passphrase by itself
- resolves: #1228234
2015-06-19 11:28:32 +02:00
Dennis Gilmore 966f2e339b - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-18 22:32:18 +00:00
Florian Festi 5510dc282d - Add --whatrecommends and friends
- resolves: #1231247
2015-06-12 18:07:38 +02:00
Florian Festi 7307a5ee39 - Fix references to go sources in debuginfo packages
- resolves: #1184221
2015-04-15 10:04:09 +02:00
Lubos Kardos dabd097bc0 - Fix wrong use of variable strip_g in find-debuginfo.sh
- resolves: #1207434
2015-03-31 11:08:45 +02:00
Lubos Kardos e972e4365d - Fix segmentation fault
- resolves: #1206750
2015-03-30 09:44:42 +02:00
Lubos Kardos 9fa2c4edfb - Forgot to add patch into git in previous commit. 2015-03-27 16:32:14 +01:00
Lubos Kardos fa230ece28 - Pass _find_debuginfo_opts -g to eu-strip for executables
- resolves: #1186563
- add_minidebug is not ran when strip_g is set
- related: #1186563
2015-03-27 16:23:43 +01:00
Lubos Kardos 4b03dd3bed - fix "--excludedocs" option
- resolves: #1192625
2015-03-20 14:59:59 +01:00
Florian Festi 02c36c0471 - Fix spec to allow building without plugins (#1182385) 2015-03-20 10:18:48 +01:00
Than Ngo 445502c59d - bump release and rebuild so that koji-shadow can rebuild it
against new gcc on secondary arch
2015-03-16 22:48:06 +01:00
Till Maas 25cfed606c Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
2015-02-21 22:26:06 +01:00
Richard W.M. Jones 68c26ef62d Include upstream patch to fix find-debuginfo (http://www.rpm.org/ticket/887). 2015-02-17 14:08:50 +00:00
Tom Callaway 9008d010c6 rebuild for lua 5.3 2015-01-16 10:21:35 -05:00
Lubos Kardos 2474acb1d0 - Add check against malicious CPIO file name size
- Fixes CVE-2014-8118
- Resolves #1168715
- Fix race condidition where unchecked data is exposed in the file system
- Fixes CVE-2013-6435
- Resolves #1039811
2014-12-12 17:06:03 +01:00
Panu Matilainen dca944eea4 - Axe unused generator scripts forcing a perl dependency (#1158580, #1158583) 2014-10-30 15:51:14 +02:00
17 changed files with 695 additions and 1854 deletions

22
.gitignore vendored
View File

@ -18,3 +18,25 @@
/rpm-4.12.0-rc1.tar.bz2
/rpm-4.12.0.tar.bz2
/rpm-4.12.0.1.tar.bz2
/rpm-4.12.90.tar.bz2
/rpm-4.13.0-rc1.tar.bz2
/rpm-4.13.0-rc2.tar.bz2
/rpm-4.13.0.tar.bz2
/rpm-4.13.0.1.tar.bz2
/rpm-4.13.90-git14002.tar.bz2
/rpm-4.14.0-rc1.tar.bz2
/rpm-4.14.0-rc2.tar.bz2
/rpm-4.14.0.tar.bz2
/rpm-4.14.1.tar.bz2
/rpm-4.14.2-rc1.tar.bz2
/rpm-4.14.2-rc2.tar.bz2
/rpm-4.14.2.tar.bz2
/rpm-4.14.2.1.tar.bz2
/rpm-4.14.90-git14653.tar.bz2
/rpm-4.15.0-beta.tar.bz2
/rpm-4.15.0-rc1.tar.bz2
/rpm-4.15.0.tar.bz2
/rpm-4.15.1.tar.bz2
/rpm-4.15.90-git14971.tar.bz2
/rpm-4.16.0-beta1.tar.bz2
/rpm-4.16.0-beta3.tar.bz2

View File

@ -0,0 +1,95 @@
From 2426c2a066e44f4d9a342585e76cdbdb0a8a2db1 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 23 Oct 2019 20:22:19 +0100
Subject: [PATCH] Revert "Improve ARM detection"
This reverts commit 8c3a7b8fa92b49a811fe36b60857b12f5d7db8a8.
This is the final piece in fixing rhbz 1691430. It's a clean revert
so let's do that for F-31 and we can discuss the details later.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
lib/rpmrc.c | 37 +++++++++----------------------------
1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 0806e1b07..cada3f788 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -82,7 +82,6 @@ struct rpmOption {
static struct rpmat_s {
const char *platform;
uint64_t hwcap;
- uint64_t hwcap2;
} rpmat;
typedef struct defaultEntry_s {
@@ -951,9 +950,6 @@ static int is_geode(void)
#if defined(__linux__)
-#ifndef AT_HWCAP2 /* glibc < 2.18 */
-#define AT_HWCAP2 26
-#endif
/**
* Populate rpmat structure with auxv values
*/
@@ -967,7 +963,6 @@ static void read_auxv(void)
if (!rpmat.platform)
rpmat.platform = "";
rpmat.hwcap = getauxval(AT_HWCAP);
- rpmat.hwcap2 = getauxval(AT_HWCAP2);
#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -989,9 +984,6 @@ static void read_auxv(void)
case AT_HWCAP:
rpmat.hwcap = auxv.a_un.a_val;
break;
- case AT_HWCAP2:
- rpmat.hwcap2 = auxv.a_un.a_val;
- break;
}
}
close(fd);
@@ -1225,27 +1217,16 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
# if !defined(HWCAP_ARM_VFPv3)
# define HWCAP_ARM_VFPv3 (1 << 13)
# endif
-# if !defined(HWCAP2_AES)
-# define HWCAP2_AES (1 << 0)
-# endif
- /*
- * un.machine is armvXE, where X is version number and E is
- * endianness (b or l)
- */
- if (rstreqn(un.machine, "armv", 4)) {
- char endian = un.machine[strlen(un.machine)-1];
- char *modifier = un.machine + 5;
- /* keep armv7, armv8, armv9, armv10, ... */
- while(risdigit(*modifier))
- modifier++;
- if (rpmat.hwcap & HWCAP_ARM_VFPv3)
- *modifier++ = 'h';
- if (rpmat.hwcap2 & HWCAP2_AES)
- *modifier++ = 'c';
+ if (rstreq(un.machine, "armv7l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFPv3) {
if (rpmat.hwcap & HWCAP_ARM_NEON)
- *modifier++ = 'n';
- *modifier++ = endian;
- *modifier++ = 0;
+ strcpy(un.machine, "armv7hnl");
+ else
+ strcpy(un.machine, "armv7hl");
+ }
+ } else if (rstreq(un.machine, "armv6l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFP)
+ strcpy(un.machine, "armv6hl");
}
# endif /* arm*-linux */
--
2.23.0

View File

@ -0,0 +1,30 @@
From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 21 Jul 2018 10:13:04 +0200
Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections
debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
scripts/find-debuginfo.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 90a44942d..7b01bc036 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -357,6 +357,9 @@ do_file()
get_debugfn "$f"
[ -f "${debugfn}" ] && return
+ echo "explicitly decompress any DWARF compressed ELF sections in $f"
+ eu-elfcompress -q -p -t none "$f"
+
echo "extracting debug info from $f"
# See also cpio SOURCEFILE copy. Directories must match up.
debug_base_name="$RPM_BUILD_DIR"
--
2.18.0

34
STAGE2-rpm Normal file
View File

@ -0,0 +1,34 @@
#requires popt
#requires nss-softokn
#requires nss
#requires file
#requires libarchive
#requires libdb4
#requires redhat-rpm-config
#requires lua
#requires autoconf
#requires pkgconfig
(cd $SRC/rpm-*/ && autoreconf -vif)
mcd $BUILDDIR/rpm
$SRC/rpm-*/configure $TCONFIGARGS \
--build=${TARGET} \
--host=${TARGET} \
--target=${TARGET} \
CPPFLAGS="-I/usr/include/nspr -I/usr/include/nss3 -DPACKAGE -DPACKAGE_VERSION" \
--libdir=/usr/lib${SUFFIX} \
--with-external-db \
--disable-static \
--with-lua \
--localstatedir=/var
make $J
make $J install
mkdir -p /etc/rpm
mkdir -p /var/lib/rpm
rpm --initdb

View File

@ -1,101 +0,0 @@
--- rpm-4.10.0/scripts/find-debuginfo.sh 2012-03-20 09:07:25.000000000 +0100
+++ rpm-4.10.0/scripts/find-debuginfo.sh.jj 2012-06-19 12:32:33.147503858 +0200
@@ -4,6 +4,8 @@
#
# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r]
# [-o debugfiles.list]
+# [--run-dwz] [--dwz-low-mem-die-limit N]
+# [--dwz-max-die-limit N]
# [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
# [builddir]
#
@@ -20,6 +22,10 @@
# The -p argument is an grep -E -style regexp matching the a file name,
# and must not use anchors (^ or $).
#
+# The --run-dwz flag instructs find-debuginfo.sh to run the dwz utility
+# if available, and --dwz-low-mem-die-limit and --dwz-max-die-limit
+# provide detailed limits. See dwz(1) -l and -L option for details.
+#
# All file names in switches are relative to builddir (. if not given).
#
@@ -32,6 +38,11 @@ strip_r=false
# Barf on missing build IDs.
strict=false
+# DWZ parameters.
+run_dwz=false
+dwz_low_mem_die_limit=
+dwz_max_die_limit=
+
BUILDDIR=.
out=debugfiles.list
nout=0
@@ -40,6 +51,17 @@ while [ $# -gt 0 ]; do
--strict-build-id)
strict=true
;;
+ --run-dwz)
+ run_dwz=true
+ ;;
+ --dwz-low-mem-die-limit)
+ dwz_low_mem_die_limit=$2
+ shift
+ ;;
+ --dwz-max-die-limit)
+ dwz_max_die_limit=$2
+ shift
+ ;;
-g)
strip_g=true
;;
@@ -266,6 +288,37 @@ while read nlinks inum f; do
fi
done || exit
+# Invoke the DWARF Compressor utility.
+if $run_dwz && type dwz >/dev/null 2>&1 \
+ && [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
+ dwz_files="`cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug`"
+ if [ -n "${dwz_files}" ]; then
+ dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
+ dwz_multifile_suffix=
+ dwz_multifile_idx=0
+ while [ -f "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}${dwz_multifile_suffix}" ]; do
+ let ++dwz_multifile_idx
+ dwz_multifile_suffix=".${dwz_multifile_idx}"
+ done
+ dwz_multfile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
+ dwz_opts="-h -q -r -m .dwz/${dwz_multifile_name}"
+ mkdir -p "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz"
+ [ -n "${dwz_low_mem_die_limit}" ] \
+ && dwz_opts="${dwz_opts} -l ${dwz_low_mem_die_limit}"
+ [ -n "${dwz_max_die_limit}" ] \
+ && dwz_opts="${dwz_opts} -L ${dwz_max_die_limit}"
+ ( cd "${RPM_BUILD_ROOT}/usr/lib/debug" && dwz $dwz_opts $dwz_files )
+ # Remove .dwz directory if empty
+ rmdir "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz" 2>/dev/null
+ if [ -f "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}" ]; then
+ id="`readelf -Wn "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}" \
+ 2>/dev/null | sed -n 's/^ Build ID: \([0-9a-f]\+\)/\1/p'`"
+ [ -n "$id" ] \
+ && make_id_link "$id" "/usr/lib/debug/.dwz/${dwz_multifile_name}" .debug
+ fi
+ fi
+fi
+
# For each symlink whose target has a .debug file,
# make a .debug symlink to that file.
find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
--- rpm-4.10.0/macros.in 2012-03-20 09:07:25.000000000 +0100
+++ rpm-4.10.0/macros.in.jj 2012-06-19 12:32:33.147503858 +0200
@@ -176,7 +176,7 @@
# the script. See the script for details.
#
%__debug_install_post \
- %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
+ %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
# Template for debug information sub-package.

View File

@ -1,98 +0,0 @@
--- rpm-4.10.0/macros.in 2012-06-11 11:16:21.216952339 +0200
+++ rpm-4.10.0/macros.in.minidebug 2012-06-11 11:16:23.686912455 +0200
@@ -175,7 +175,7 @@
# the script. See the script for details.
#
%__debug_install_post \
- %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
+ %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
# Template for debug information sub-package.
@@ -418,6 +418,12 @@ package or when debugging this package.\
#%_missing_build_ids_terminate_build 1
#
+# Include minimal debug information in build binaries.
+# Requires _enable_debug_packages.
+#
+#%_include_minidebuginfo 1
+
+#
# Use internal dependency generator rather than external helpers?
%_use_internal_dependency_generator 1
--- rpm-4.10.0/scripts/find-debuginfo.sh 2012-06-11 11:16:09.698138273 +0200
+++ rpm-4.10.0/scripts/find-debuginfo.sh.minidebug 2012-06-11 11:16:13.399078526 +0200
@@ -2,7 +2,7 @@
#find-debuginfo.sh - automagically generate debug info and file list
#for inclusion in an rpm spec file.
#
-# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r]
+# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] [-m]
# [-o debugfiles.list]
# [--run-dwz] [--dwz-low-mem-die-limit N]
# [--dwz-max-die-limit N]
@@ -29,6 +29,9 @@ strip_g=false
# with -r arg, pass --reloc-debug-sections to eu-strip.
strip_r=false
+# with -m arg, add minimal debuginfo to binary.
+include_minidebug=false
+
# Barf on missing build IDs.
strict=false
@@ -43,6 +46,9 @@ while [ $# -gt 0 ]; do
-g)
strip_g=true
;;
+ -m)
+ include_minidebug=true
+ ;;
-o)
if [ -z "${lists[$nout]}" -a -z "${ptns[$nout]}" ]; then
out=$2
@@ -105,6 +111,32 @@ strip_to_debug()
chmod 444 "$1" || exit
}
+add_minidebug()
+{
+ local debuginfo="$1"
+ local binary="$2"
+
+ local dynsyms=`mktemp`
+ local funcsyms=`mktemp`
+ local keep_symbols=`mktemp`
+ local mini_debuginfo=`mktemp`
+
+ # Extract the dynamic symbols from the main binary, there is no need to also have these
+ # in the normal symbol table
+ nm -D "$binary" --format=posix --defined-only | awk '{ print $1 }' | sort > "$dynsyms"
+ # Extract all the text (i.e. function) symbols from the debuginfo
+ nm "$debuginfo" --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t") print $1 }' | sort > "$funcsyms"
+ # Keep all the function symbols not already in the dynamic symbol table
+ comm -13 "$dynsyms" "$funcsyms" > "$keep_symbols"
+ # Copy the full debuginfo, keeping only a minumal set of symbols and removing some unnecessary sections
+ objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols="$keep_symbols" "$debuginfo" "$mini_debuginfo" &> /dev/null
+ #Inject the compressed data into the .gnu_debugdata section of the original binary
+ xz "$mini_debuginfo"
+ mini_debuginfo="${mini_debuginfo}.xz"
+ objcopy --add-section .gnu_debugdata="$mini_debuginfo" "$binary"
+ rm -f "$dynsyms" "$funcsyms" "$keep_symbols" "$mini_debuginfo"
+}
+
# Make a relative symlink to $1 called $3$2
shopt -s extglob
link_relative()
@@ -260,6 +292,9 @@ while read nlinks inum f; do
chmod u-w "$f"
fi
+ $include_minidebug && add_minidebug "${debugfn}" "$f"
+
+
if [ -n "$id" ]; then
make_id_link "$id" "$dn/$(basename $f)"
make_id_link "$id" "/usr/lib/debug$dn/$bn" .debug

View File

@ -1,394 +0,0 @@
--- rpm-4.11.1-rc1-orig/Makefile.am 2013-06-07 12:19:21.000000000 +0200
+++ rpm-4.11.1-rc1/Makefile.am 2013-06-24 18:34:06.342894002 +0200
@@ -162,6 +162,10 @@ rpmlibexec_PROGRAMS += elfdeps
elfdeps_SOURCES = tools/elfdeps.c
elfdeps_LDADD = rpmio/librpmio.la
elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
+
+rpmlibexec_PROGRAMS += sepdebugcrcfix
+sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
+sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@
endif
endif
--- rpm-4.11.1-rc1-orig/scripts/find-debuginfo.sh 2013-06-24 17:20:55.407538301 +0200
+++ rpm-4.11.1-rc1/scripts/find-debuginfo.sh 2013-06-24 18:34:41.270897302 +0200
@@ -114,10 +114,12 @@ done
LISTFILE="$BUILDDIR/$out"
SOURCEFILE="$BUILDDIR/debugsources.list"
LINKSFILE="$BUILDDIR/debuglinks.list"
+ELFBINSFILE="$BUILDDIR/elfbins.list"
> "$SOURCEFILE"
> "$LISTFILE"
> "$LINKSFILE"
+> "$ELFBINSFILE"
debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
@@ -316,6 +318,7 @@ while read nlinks inum f; do
$include_minidebug && add_minidebug "${debugfn}" "$f"
+ echo "./${f#$RPM_BUILD_ROOT}" >> "$ELFBINSFILE"
if [ -n "$id" ]; then
make_id_link "$id" "$dn/$(basename $f)"
@@ -354,6 +357,10 @@ if $run_dwz && type dwz >/dev/null 2>&1
fi
fi
+# dwz invalidates .gnu_debuglink CRC32 in the main files.
+cat "$ELFBINSFILE" |
+(cd "$RPM_BUILD_ROOT"; xargs -d '\n' /usr/lib/rpm/sepdebugcrcfix usr/lib/debug)
+
# For each symlink whose target has a .debug file,
# make a .debug symlink to that file.
find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
--- rpm-4.11.1-rc1-orig/tools/sepdebugcrcfix.c 1970-01-01 01:00:00.000000000 +0100
+++ rpm-4.11.1-rc1/tools/sepdebugcrcfix.c 2013-06-24 18:31:54.927881439 +0200
@@ -0,0 +1,344 @@
+/* Copyright (C) 2013 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Version 2013-06-24. */
+
+#define _GNU_SOURCE
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <endian.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <error.h>
+#include <libelf.h>
+#include <gelf.h>
+#include <bfd.h>
+
+#define _(x) x
+#define static_assert(expr) \
+ extern int never_defined_just_used_for_checking[(expr) ? 1 : -1]
+#ifndef min
+# define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
+static_assert (sizeof (unsigned long) >= sizeof (uint32_t));
+
+typedef int bool;
+static const bool false = 0, true = 1;
+
+/* This is bfd_calc_gnu_debuglink_crc32 from bfd/opncls.c. */
+static unsigned long
+ calc_gnu_debuglink_crc32 (unsigned long crc,
+ const unsigned char *buf,
+ bfd_size_type len)
+{
+ static const unsigned long crc32_table[256] =
+ {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+ 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+ 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+ 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+ 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+ 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+ 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+ 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+ 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+ 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+ 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+ 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+ 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+ 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+ 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+ 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+ 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+ 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+ 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+ 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+ 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+ 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+ 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+ 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+ 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+ 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+ 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+ 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+ 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+ 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+ 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+ 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+ 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+ 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+ 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+ 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+ 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+ 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+ 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+ 0x2d02ef8d
+ };
+ const unsigned char *end;
+
+ crc = ~crc & 0xffffffff;
+ for (end = buf + len; buf < end; ++ buf)
+ crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+ return ~crc & 0xffffffff;
+}
+
+static size_t updated_count, matched_count, failed_count;
+
+static const char *usr_lib_debug;
+
+static bool
+crc32 (const char *fname, const char *base_fname, uint32_t *crcp)
+{
+ char *reldir = strdup (base_fname);
+ if (reldir == NULL)
+ error (1, 0, _("out of memory"));
+ char *s = reldir + strlen (reldir);
+ while (s > reldir && s[-1] != '/')
+ *--s = '\0';
+ char *debugname;
+ if (asprintf (&debugname, "%s/%s/%s", usr_lib_debug, reldir, fname) <= 0)
+ error (1, 0, _("out of memory"));
+ free (reldir);
+ int fd = open (debugname, O_RDONLY);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open \"%s\""), debugname);
+ return false;
+ }
+ off64_t size = lseek64 (fd, 0, SEEK_END);
+ if (size == -1)
+ {
+ error (0, errno, _("cannot get size of \"%s\""), debugname);
+ return false;
+ }
+ off_t offset = 0;
+ uint32_t crc = 0;
+ void *buf = NULL;
+ while (offset < size)
+ {
+ const size_t maplen = min (0x10000, size - offset);
+ void *map = NULL;
+ if (buf == NULL)
+ {
+ map = mmap (NULL, maplen, PROT_READ, MAP_PRIVATE | MAP_POPULATE,
+ fd, offset);
+ if (map == MAP_FAILED)
+ {
+ error (0, errno, _("cannot map 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ map = NULL;
+ }
+ }
+ if (map == NULL)
+ {
+ if (buf == NULL)
+ {
+ buf = malloc (maplen);
+ if (buf == NULL)
+ error (1, 0, _("out of memory"));
+ }
+ ssize_t got = pread (fd, buf, maplen, offset);
+ if (got != maplen)
+ {
+ error (0, errno, _("cannot read 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ free (buf);
+ free (debugname);
+ return false;
+ }
+ }
+ crc = calc_gnu_debuglink_crc32 (crc, map ?: buf, maplen);
+ if (map && munmap (map, maplen) != 0)
+ error (1, errno, _("cannot unmap 0x%llx bytes at offset 0x%llx "
+ "of file \"%s\""),
+ (unsigned long long) maplen, (unsigned long long) offset,
+ debugname);
+ offset += maplen;
+ }
+ free (buf);
+ if (close (fd) != 0)
+ {
+ error (0, errno, _("cannot close \"%s\""), debugname);
+ free (debugname);
+ return false;
+ }
+ free (debugname);
+ *crcp = crc;
+ return true;
+}
+
+static bool
+process (Elf *elf, int fd, const char *fname)
+{
+ GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem);
+ if (ehdr == NULL)
+ {
+ error (0, 0, _("cannot get ELF header of \"%s\""), fname);
+ return false;
+ }
+ if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB
+ && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)
+ {
+ error (0, 0, _("invalid ELF endianity of \"%s\""), fname);
+ return false;
+ }
+ Elf_Scn *scn = NULL;
+ const char scnname[] = ".gnu_debuglink";
+ while ((scn = elf_nextscn (elf, scn)) != NULL)
+ {
+ GElf_Shdr shdr_mem, *shdr = gelf_getshdr (scn, &shdr_mem);
+ if (shdr == NULL)
+ {
+ error (0, 0, _("cannot get section # %zu in \"%s\""),
+ elf_ndxscn (scn), fname);
+ continue;
+ }
+ const char *sname = elf_strptr (elf, ehdr->e_shstrndx, shdr->sh_name);
+ if (sname == NULL)
+ {
+ error (0, 0, _("cannot get name of section # %zu in \"%s\""),
+ elf_ndxscn (scn), fname);
+ continue;
+ }
+ if (strcmp (sname, scnname) != 0)
+ continue;
+ Elf_Data *data = elf_getdata (scn, NULL);
+ if (data == NULL)
+ {
+ error (0, 0, _("cannot get data of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ if ((data->d_size & 3) != 0)
+ {
+ error (0, 0, _("invalid size of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ const uint8_t *zerop = memchr (data->d_buf, '\0', data->d_size);
+ const uint8_t *crcp = (zerop == NULL
+ ? NULL
+ : (const uint8_t *) ((uintptr_t) (zerop + 1 + 3)
+ & -4));
+ if (crcp + 4 != (uint8_t *) data->d_buf + data->d_size)
+ {
+ error (0, 0, _("invalid format of section \"%s\" # %zu in \"%s\""),
+ scnname, elf_ndxscn (scn), fname);
+ continue;
+ }
+ uint32_t had_crc_targetendian = *(const uint32_t *) crcp;
+ uint32_t had_crc = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
+ ? le32toh (had_crc_targetendian)
+ : be32toh (had_crc_targetendian));
+ uint32_t crc;
+ if (! crc32 (data->d_buf, fname, &crc))
+ return false;
+ if (crc == had_crc)
+ {
+ matched_count++;
+ return true;
+ }
+ updated_count++;
+ off64_t seekto = (shdr->sh_offset + data->d_off
+ + (crcp - (const uint8_t *) data->d_buf));
+ uint32_t crc_targetendian = (ehdr->e_ident[EI_DATA] == ELFDATA2LSB
+ ? htole32 (crc) : htobe32 (crc));
+ ssize_t wrote = pwrite (fd, &crc_targetendian, sizeof (crc_targetendian),
+ seekto);
+ if (wrote != sizeof (crc_targetendian))
+ {
+ error (0, 0, _("cannot write new CRC to 0x%llx "
+ "inside section \"%s\" # %zu in \"%s\""),
+ (unsigned long long) seekto, scnname, elf_ndxscn (scn), fname);
+ return false;
+ }
+ return true;
+ }
+ error (0, 0, _("cannot find section \"%s\" in \"%s\""), scnname, fname);
+ return false;
+}
+
+int
+main (int argc, char **argv)
+{
+ if (argc < 2)
+ error (1, 0, _("usr/lib/debug [<relative filenames>...]"));
+ usr_lib_debug = argv[1];
+ if (elf_version (EV_CURRENT) == EV_NONE)
+ error (1, 0, _("error initializing libelf: %s"), elf_errmsg (-1));
+ for (int argi = 2; argi < argc; argi++)
+ {
+ const char *fname = argv[argi];
+ int fd = open64 (fname, O_RDWR);
+ if (fd == -1)
+ {
+ error (0, errno, _("cannot open \"%s\""), fname);
+ failed_count++;
+ continue;
+ }
+ bool failed = false;
+ Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
+ if (elf == NULL)
+ {
+ error (0, 0, _("cannot open \"%s\" as ELF: %s"), fname,
+ elf_errmsg (-1));
+ failed = true;
+ }
+ else
+ {
+ if (! process (elf, fd, fname))
+ failed = true;
+ if (elf_end (elf) != 0)
+ {
+ error (0, 0, _("cannot close \"%s\" as ELF: %s"), fname,
+ elf_errmsg (-1));
+ failed = true;
+ }
+ }
+ if (close (fd) != 0)
+ {
+ error (0, errno, _("cannot close \"%s\""), fname);
+ failed = true;
+ }
+ if (failed)
+ failed_count++;
+ }
+ printf ("%s: Updated %zu CRC32s, %zu CRC32s did match.\n", argv[0],
+ updated_count, matched_count);
+ if (failed_count)
+ printf ("%s: Failed for %zu files.\n", argv[0], failed_count);
+ return failed_count == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
+}

View File

@ -1,76 +0,0 @@
commit 104856ea17161eb3a508913c2b7ed701f2e4f6aa
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Tue Oct 7 15:37:21 2014 +0300
Unbreak size and archive size generation on big-endian systems
- Fix regression from commit 68bddc353a7ea87ea00ad957858cd509e845e84c,
accessing a 64bit int as if it were a 32bit one doesn't make it one.
diff --git a/build/pack.c b/build/pack.c
index 28834dc..15f005a 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -273,9 +273,6 @@ static rpmRC generateSignature(char *SHA1, uint8_t *MD5, rpm_loff_t size,
{
Header sig = NULL;
struct rpmtd_s td;
- rpmTagVal sizetag;
- rpmTagVal payloadtag;
- rpm_tagtype_t typetag;
rpmRC rc = RPMRC_OK;
char *reservedSpace;
int spaceSize = 0;
@@ -297,29 +294,33 @@ static rpmRC generateSignature(char *SHA1, uint8_t *MD5, rpm_loff_t size,
td.data = MD5;
headerPut(sig, &td, HEADERPUT_DEFAULT);
+ rpmtdReset(&td);
+ td.count = 1;
if (payloadSize < UINT32_MAX) {
- sizetag = RPMSIGTAG_SIZE;
- payloadtag = RPMSIGTAG_PAYLOADSIZE;
- typetag = RPM_INT32_TYPE;
+ rpm_off_t p = payloadSize;
+ rpm_off_t s = size;
+ td.type = RPM_INT32_TYPE;
+
+ td.tag = RPMSIGTAG_PAYLOADSIZE;
+ td.data = &p;
+ headerPut(sig, &td, HEADERPUT_DEFAULT);
+
+ td.tag = RPMSIGTAG_SIZE;
+ td.data = &s;
+ headerPut(sig, &td, HEADERPUT_DEFAULT);
} else {
- sizetag = RPMSIGTAG_LONGSIZE;
- payloadtag = RPMSIGTAG_LONGARCHIVESIZE;
- typetag = RPM_INT64_TYPE;
- }
+ rpm_loff_t p = payloadSize;
+ rpm_loff_t s = size;
+ td.type = RPM_INT64_TYPE;
- rpmtdReset(&td);
- td.tag = payloadtag;
- td.count = 1;
- td.type = typetag;
- td.data = &payloadSize;
- headerPut(sig, &td, HEADERPUT_DEFAULT);
+ td.tag = RPMSIGTAG_LONGARCHIVESIZE;
+ td.data = &p;
+ headerPut(sig, &td, HEADERPUT_DEFAULT);
- rpmtdReset(&td);
- td.tag = sizetag;
- td.count = 1;
- td.type = typetag;
- td.data = &size;
- headerPut(sig, &td, HEADERPUT_DEFAULT);
+ td.tag = RPMSIGTAG_LONGSIZE;
+ td.data = &s;
+ headerPut(sig, &td, HEADERPUT_DEFAULT);
+ }
spaceSize = rpmExpandNumeric("%{__gpg_reserved_space}");
if(spaceSize > 0) {

View File

@ -1,39 +0,0 @@
diff --git a/lib/rpmarchive.h b/lib/rpmarchive.h
index fab2d58..85079ca 100644
--- a/lib/rpmarchive.h
+++ b/lib/rpmarchive.h
@@ -23,6 +23,7 @@ enum rpmfilesErrorCodes {
RPMERR_ENOENT = -10,
RPMERR_ENOTEMPTY = -11,
RPMERR_FILE_SIZE = -12,
+ RPMERR_ITER_SKIP = -13,
RPMERR_OPEN_FAILED = -32768,
RPMERR_CHMOD_FAILED = -32769,
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
index 384a6c9..2fba707 100644
--- a/lib/rpmfi.c
+++ b/lib/rpmfi.c
@@ -821,7 +821,10 @@ int rpmfiNext(rpmfi fi)
{
int next = -1;
if (fi != NULL) {
- next = fi->next(fi);
+ do {
+ next = fi->next(fi);
+ } while (next == RPMERR_ITER_SKIP);
+
if (next >= 0 && next < rpmfilesFC(fi->files)) {
fi->i = next;
fi->j = rpmfilesDI(fi->files, fi->i);
@@ -1942,6 +1945,10 @@ static int iterReadArchiveNext(rpmfi fi)
rpm_loff_t fsize = 0;
rpm_mode_t mode = rpmfilesFMode(fi->files, fx);
+ /* %ghost in payload, should not be there but rpm < 4.11 sometimes did this */
+ if (rpmfilesFFlags(fi->files, fx) & RPMFILE_GHOST)
+ return RPMERR_ITER_SKIP;
+
if (S_ISREG(mode)) {
const int * links;
uint32_t numlinks = rpmfilesFLinks(fi->files, fx, &links);

View File

@ -1,32 +0,0 @@
commit 6ce2d43e2533505aa252159bfa8cc799965655bb
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Wed Oct 1 09:59:21 2014 +0300
Dont wait for transaction lock within scriptlets (RhBug:1135596)
- Packages doing stupid things like rpm -U/-i/-e from their scriptlets
can and will get hung waiting on the transaction lock, which can
prompt users to kill the entire transaction, possibly with severe
consequences. Starting with rpm >= 4.12 we also take the transaction
lock for importing public keys, which seems to have caught one of
the bigger fishes in the pond (Google Chrome packages).
- Only wait when stdin is a tty, this affects more than scriptlets but
most likely we dont want to wait for locks in those situations either.
diff --git a/lib/rpmlock.c b/lib/rpmlock.c
index 7696cbe..9c07654 100644
--- a/lib/rpmlock.c
+++ b/lib/rpmlock.c
@@ -124,10 +124,11 @@ rpmlock rpmlockNew(const char *lock_path, const char *descr)
int rpmlockAcquire(rpmlock lock)
{
int locked = 0; /* assume failure */
+ int maywait = isatty(STDIN_FILENO); /* dont wait within scriptlets */
if (lock) {
locked = rpmlock_acquire(lock, RPMLOCK_WRITE);
- if (!locked && (lock->openmode & RPMLOCK_WRITE)) {
+ if (!locked && (lock->openmode & RPMLOCK_WRITE) && maywait) {
rpmlog(RPMLOG_WARNING, _("waiting for %s lock on %s\n"),
lock->descr, lock->path);
locked = rpmlock_acquire(lock, (RPMLOCK_WRITE|RPMLOCK_WAIT));

View File

@ -2,14 +2,14 @@ diff -up rpm-4.9.1.1/macros.in.jx rpm-4.9.1.1/macros.in
--- rpm-4.9.1.1/macros.in.jx 2011-08-03 16:19:05.000000000 -0400
+++ rpm-4.9.1.1/macros.in 2011-08-08 09:41:52.981064316 -0400
@@ -674,9 +674,10 @@ print (t)\
RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
+ RPM_LD_FLAGS=\"%{?__global_ldflags}\"\
+ RPM_LD_FLAGS=\"%{?build_ldflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS\
RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{name}\"\
RPM_PACKAGE_NAME=\"%{NAME}\"\

View File

@ -8,5 +8,5 @@ diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
+ export CONFIG_SITE\
\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
%{verbose:set -x}\
umask 022\

View File

@ -1,12 +0,0 @@
diff -up rpm-4.8.1/macros.in.gpg2 rpm-4.8.1/macros.in
--- rpm-4.8.0/macros.in.gpg2 2011-01-17 12:17:38.000000000 +0200
+++ rpm-4.8.0/macros.in 2011-01-17 12:17:59.000000000 +0200
@@ -40,7 +40,7 @@
%__cp @__CP@
%__cpio @__CPIO@
%__file @__FILE@
-%__gpg @__GPG@
+%__gpg %{_bindir}/gpg2
%__grep @__GREP@
%__gzip @__GZIP@
%__id @__ID@

View File

@ -1,78 +0,0 @@
diff --git a/lib/tagexts.c b/lib/tagexts.c
index dc0e0fb..e0a5d1f 100644
--- a/lib/tagexts.c
+++ b/lib/tagexts.c
@@ -478,59 +478,29 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
*/
static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags)
{
- int rc;
+ int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
#if defined(ENABLE_NLS)
- char * dstring = rpmExpand(_macro_i18ndomains, NULL);
-
- td->type = RPM_STRING_TYPE;
- td->data = NULL;
- td->count = 0;
-
- if (dstring && *dstring) {
- char *domain, *de;
- const char * langval;
- char * msgkey;
- const char * msgid;
-
- rasprintf(&msgkey, "%s(%s)", headerGetString(h, RPMTAG_NAME),
- rpmTagGetName(tag));
-
- /* change to en_US for msgkey -> msgid resolution */
- langval = getenv(language);
- (void) setenv(language, "en_US", 1);
- ++_nl_msg_cat_cntr;
+ if (rc) {
+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
+ const char *domain;
- msgid = NULL;
for (domain = dstring; domain != NULL; domain = de) {
+ const char *msgid = td->data;
+ const char *msg = NULL;
+
de = strchr(domain, ':');
if (de) *de++ = '\0';
- msgid = dgettext(domain, msgkey);
- if (msgid != msgkey) break;
- }
-
- /* restore previous environment for msgid -> msgstr resolution */
- if (langval)
- (void) setenv(language, langval, 1);
- else
- unsetenv(language);
- ++_nl_msg_cat_cntr;
-
- if (domain && msgid) {
- td->data = dgettext(domain, msgid);
- td->data = xstrdup(td->data); /* XXX xstrdup has side effects. */
- td->count = 1;
- td->flags = RPMTD_ALLOCED;
+ msg = dgettext(domain, td->data);
+ if (msg != msgid) {
+ free(td->data);
+ td->data = xstrdup(msg);
+ break;
+ }
}
- dstring = _free(dstring);
- free(msgkey);
- if (td->data)
- return 1;
+ free(dstring);
}
-
- free(dstring);
#endif
- rc = headerGet(h, tag, td, HEADERGET_ALLOC);
return rc;
}

1505
rpm.spec

File diff suppressed because it is too large Load Diff

19
rpmdb-rebuild.service Normal file
View File

@ -0,0 +1,19 @@
[Unit]
Description=RPM database rebuild
ConditionPathExists=/var/lib/rpm/.rebuilddb
# This should run before any daemons that may open the rpmdb
DefaultDependencies=no
After=sysinit.target
Before=basic.target shutdown.target
Conflicts=shutdown.target
# In case /var is remote-mounted
RequiresMountsFor=/var
[Service]
Type=oneshot
ExecStart=/usr/bin/rpmdb --rebuilddb
ExecStartPost=rm -f /var/lib/rpm/.rebuilddb
[Install]
WantedBy=basic.target

View File

@ -1 +1 @@
c06a691765252d2b381a7942a9669856 rpm-4.12.0.1.tar.bz2
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032