Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM 4.20.0 ALPHA2 #3107

Merged
merged 85 commits into from
May 17, 2024
Merged

RPM 4.20.0 ALPHA2 #3107

merged 85 commits into from
May 17, 2024

Conversation

dmnks
Copy link
Contributor

@dmnks dmnks commented May 17, 2024

Mostly all cherry picks from master, with the exception of the C++ conversion patches. The preparation work (such as type cleanups) for the C++ conversion is included here, though, to make backporting patches onto this stable branch easier going forward.

Here's a full gitrebase todo for completeness:

drop 7a75dc6ae Bump version to 5.99.90 to begin a new devel cycle

# PR #3017: First batch of v6 package format (labels: none)
drop 89d9873c6 Start a v6 format draft doc
drop ef29c4e7c Add tests for v6 package structure and digests, equal to v4 just now
drop c1ee38812 First commit of rpm v6: add version switch, drop obsolete signature tags
drop 8b25d0204 Introduce new payloadsize + alt tags in the v6 main header
drop a93bf67a4 Always use long filesizes and the "new" non-cpio payload format on v6
drop a40b6e9a7 Add a new unique v6-only reserved signature tag below header base
drop af81cb8cc Add rpm package format version as a tag to >= v6 packages.
drop 5a685fb5e Don't populate os and arch in the lead structure
drop cf1c52115 Bump the rpm version in the lead to 4 for v6 packages

pick bffbc1f7a Add support for a _buildtime macro for setting the build time manually
pick efdc48900 Support clamping the file mtime to the build time
pick 9059e6ab3 Add a deprecation warning for clamp_mtime_to_source_date_epoch
pick aa7c57c0b Document the build_mtime_policy macro
pick 2fe4a4833 Revert the buildtime test for now
pick 6ea108209 Bring back the test of the buildtime macro

# PR #3019: Type pedantry and similar cleanups in preparation for c++ (labels: cleanup)
pick b75565ab9 Eliminate anonymous embedded struct use in filelist
pick 495552cb2 Drop a redundant helper variable
pick 9eb849064 String literals should be const char *
pick 7bb2dcd8d rpmTag/rpmTagVal type pedantry
pick 5bf65deff signal() returns sighandler_t, not void *
pick 4d63588df Avoid rpm tag signedness issues in build tables + related code
pick 1e97f4498 Fix couple of RPMTAG/RPMDBI type mismatches
pick 850b30171 Use proper callback types in psm notify wrapper
pick d4b066382 Introduce and use RPMRICHOP_NONE to fix int/enum mismatches
pick 401d845d9 Add c++ guards to internal headers and sources as needed
pick 3a2b04c96 Avoid relying on writable string literals in macros
pick 7445a092f Lift %shrink out of doFoo()
pick 5010191f6 Work around C++ restriction on forward declarations
pick f75cd15f8 Wrap rpmio inner file pointer access behind typed helper function
pick 9a345d191 Use an union for the zstd compress/decompress streams instead
pick ce6c3812a Avoid c++ reserved keywords new, class and namespace
pick 38b260214 readline callback const correctness

# PR #3022: Another batch of type and language trivia for c++ (labels: none)
pick bb24c99f5 Avoid c++ reserved keywords, part II
pick ace5dc587 Pointer const correctness
pick 8a141a116 Avoid char * to string literal conversions related to rpmfcExec() argv
pick fbcc57cfc Use a non-standard extension for the non-standard tagtbl file
pick 689554a02 More rpmTag/rpmTagVal pedantry
pick 886631457 Fix int/enum type mixup in rpmtdType() and rpmtdClass()
pick 4174de56d Fix couple of obvious'ish signed narrowing issues in rpmio code
pick 5b1cb92c4 Always use _free() over rfree() when assigning the return value

pick 76d53ab52 Unbreak build when imaevm.h is not present on the system
pick b96abccec Don't bother including fsverity headers when not building it
pick fec1bd8d2 Add the "issuer fingerprint" subpacket type

# PR #3027: Another batch of c++ preparation trivia (labels: none)
pick 437b5a106 Avoid jumping over variable declarations
pick 56a6701cd Add c++ guard to ndb internal headers
pick 00a1b89a7 Use the actual rpmRC enum in ndb where relevant for internal APIs
pick 396c8e820 Handle Lua header C++ guards centrally in rpmlua.h
pick 5231d5f54 Make rpmmacro_internal.h self-standing, ie include what you use
pick f8a72afbd Fix pointer bogosity in rpmlog callback
pick 656c8e75f Fixup missed constification in Lua readline callback
pick 9a69f0b74 Make rpmTagType an integer type to avoid complications
pick 2269c6dbe Fixup enum/int mismatches in header format extensions
pick 62f7e756e Drop unnecessary initialization from a static variable

pick 0a2866467 Fix int/enum mismatch in rpmtsImportPubkey() return code handling

# PR #3025: Add + use rpmdsIsSysuser() API for testing and decoding sysuser provides (labels: API cleanup python)
pick 5ce560483 Add rpmdsIsSysuser() function for testing and decoding sysusers provides
pick ee528ce09 Take advantage of rpmdsIsSysuser() for the tag extension + psm code

# PR #3028: Switch most of rpm over to C++ (labels: none)
drop 47974f492 Add a top-level option to compile with C++, doesn't do anything yet
pick 62840a3cd Add casts that C++ requires but C doesn't across librpmio
pick a8ef47798 Add casts that C++ requires but C doesn't across librpm
pick 58c3f3bc5 Add casts that C++ requires but C doesn't across librpmbuild
pick 24f388e5e Add casts that C++ requires but C doesn't across librpmsign
pick 37cdcc292 Add casts that C++ requires but C doesn't across cli tools
drop e2f2982c9 Switch to C++ for the majority of codebase
drop 8c7d8d941 Remove the WITH_CXX option, this is a one-way street

# fixup for 58c3f3bc5
pick 1fe3e3594 Fix one missed explicit cast for C++ due to typo in makefiles

pick a38582178 Fix an ancient memleak on %caps() parsing, add tests

# PR #3034: Allow signing with ECDSA keys (labels: none)
pick ef0afa856 Allow signing with ECDSA keys
pick 983dd21fa Add testcases for Ed25519 and NIST P-256

pick fa9b6497b Make the %rmbuild test package noarch as it should be
pick 3185d47bd Parse dynamic spec parts for rpmbuild -bl
pick 200c91ff7 Relax openssl version requirement
pick 4e9458ecc Add the "Primary Binding" pgp signature type

# PR #3054: Convert a bunch of librpmio stuff to native C++ (labels: cleanup)
drop 0d1071b99 Minimally convert digest code to native c++ allocation
drop 7462ad4db Natively allocate rpmio structs
drop ad80c1761 Natively allocate internal rpmlua structs
drop 9af6b4f39 Replace internal Lua print buffer with a C++ string
drop 344e837f1 Replace internal Lua printing stack with a C++ stack
drop 172196288 Use C++ constructs for rpmlog internal storage
drop 59984c66c Use a c++ string for macro expansion buffer
drop eb561c88b Use c++ string for rpmExpand() helper buffer
drop 7e558e3de Natively allocate keyring and pubkey structs
drop 317dadbdb Natively allocate expression most parser structs

# PR #3047: Fix build scriptlet append/prepend interaction with Buildsystem (labels: bug)
pick c97c48225 Refactor getSection() to more generally useful
pick d5c8423da Refactor build script parse calls to a helper
pick bf46dcf36 Fix build scriptlet append/prepend interaction with Buildsystem

pick 68d0f3119 Adapt tests to current state of the "legacy" parser
# breaking commit dropped above
drop e6d6b49f2 Unbreak zstd compression from 7462ad4dbe215315e80323b592bfc7f455ebcd99
pick 695b5c252 Fix multiply defined local macros escaping scope

# PR #3060: Another bunch of misc C++ conversion/cleanups (labels: cleanup)
pick e2722fd42 Take advantage of rvasprintf() in rpmlog()
drop 5f7be7109 Use strings as keyid and STL map for keyring storage
drop 99e26b9df Replace homegrown mallocing getcwd() with filesystem::current_path()
drop bac494c35 Replace a couple of local IO buffers with a vector
drop f23483f62 Replace temporary argv array in Lua posix.exec() with a vector

pick 667e32cd9 Fix spelling and grammar in conditionalbuilds.md

# PR #3062: Convert macro table to STL containers + native strings (labels: cleanup)
drop e571df4b9 Add copy control and in particular, destructor to the macro context
drop a39bb9359 Convert macro table to STL containers + native strings
drop 1f66db345 Untangle the per-name stack from the macro entry struct

# PR #3066: Convert a bunch of librpm stuff to native C++ allocation (and containers) (labels: cleanup)
drop a0e3dcfaf Natively allocate rpmte structs and temporary colors vector
drop 930942dc4 Natively allocate rpmts, rpmtsi, rpmtxn and tsMembers
drop 22a4c3227 Natively allocate rpmds, rpmfiles and rpmfi mains structs
drop c20f030f7 Natively allocate rpmps and rpmprob structs, use vector for prob storage
drop b287bdcad Natively allocate main header related structs
drop 87b5627f0 Natively allocate bunch of miscellaneous librpm structs
drop 8113f2819 Natively allocate main rpmdb related structs
drop d89561b62 Use a vector for index iterator offset storage
drop ee3f62df5 Use an unordered map for the rpmdb verify cache
drop 553d8d86f Natively allocate rpmfs structs
drop 8f6c05bcd Natively allocate fingerprint cache
drop d10b17658 Natively allocate plugin structures, use a vector for storage

pick b8d8bfab0 Fix header source/patch names disagreeing with src.rpm contents
pick dde4fe5cf Drop architecture from %builddir path

# PR #3071: Automatically reload rpm configuration on mismatching BuildArch (labels: none)
pick b2058cea1 Don't emit target build into on --quiet
pick 96467dce1 Automatically reload rpm configuration on mismatching BuildArch

pick 18f7e5395 Remove C++ guards from internal headers

# PR #3075: Convert rpmal to use STL containers (labels: none)
drop 6b814894b Use vectors for returning multiple values from rpmalAll*()
drop 869cd5405 Natively allocate rpmal struct itself
drop ab93126bb Use a vector for rpmal available package storage
drop 39119680d Replace home-grown hashes with STL unordered_map in rpmal

drop 058c96c26 Implement proper user/group lookup caching with STL maps

# PR #3077: Convert packageHash to STL unordered_map (labels: none)
drop 247ddbacf Replace the annoying keyid stash with an STL set
drop 6834c3f44 Natively allocate the main file trigger structs
drop e0633683d Convert packageHash to STL unordered_map
drop e7e92f209 Replace rpmhash with an STL set for basename cache
drop bbb28b3fe Replace dependency lookup cache with an STL unordered map

drop 97c0889cb Replace rpmhash with STL unordered_map in headerformat cache
pick 0f6ed3c68 Simplify rpmfi replaced sized management

# PR #3081: Use an STL vector for the transaction main rpmte pointer storage (labels: cleanup)
drop 5cc22767b Use an STL vector for the transaction main rpmte pointer storage
drop 16759ef47 Convert orderInfo array to a vector

pick f69fae984 Delete leftover file trigger definitions

# PR #3084: Always create %specpartsdir on build (labels: none)
pick 570f3b693 Simplify doBuildDir() and use appropriate macros as well
pick f3f9f2c7b Always create %specpartsdir on build

pick 853569459 Add proper logic for debuginfo enablement
pick 71f2ca495 cmake: move os-release parsing into oci branch
pick ed1f2da3d Fix test-suite under Fedora 40 modern C rules

pick 54a3912e8 Free old cookie value to prevent a memory leak
pick 69c837a43 Improve the debuginfo enablement backwards compatibility
pick 4fc4ee91f Clean up applyAttr() and rpmfcHelper() interaction

# PR #3099: Convert major librpmbuild structs to native C++ allocation / initialization (labels: none)
drop 23a0d2bf4 Natively allocate rpmfc main structures
drop dd4bcdb38 Natively allocate the spec and its package structs
drop 84ac70dde Natively initialize the file list structure
drop 143780448 Natively allocate special dir structs and related entries
drop f555b7dc9 Natively allocate spec read and file stacks
drop e8b944ef4 Use a C++ string for StringBuf internally
drop 03ae9720a Natively allocate the spec listiter macro fu
drop 910b6602f Store trigger file info natively in STL vectors
drop ed79a4b68 Natively allocate spec source and selinux policy structs
drop ffa7bc8e7 Use an STL vector for spec file records storage
drop 7e6435ea6 Replace rpmhash with STL unordered_multimap in file rename tracking
drop 749f1cea9 Convert file attribute tracking hash from rpmhash to STL

# PR #3102: Convert various dependency generator data structures over to STL (labels: none)
drop 556d514e0 Permit appending native strings to StringBuf
drop 1c4c473d9 Use STL vector and strings for file and type in file classifier
drop 6acc21074 Use STL string for file classifier buildroot
drop 4a3eb7a04 Use vectors for various file classifier storages
drop 6bd1e431f Replace all ARGI_t uses with STL vector in file classifier
pick fac825c3c Add tests for file dependency normalization behavior
drop 09776f12a Use STL vector for dependency generator file dependency storage
drop 656589180 Use STL vector file attribute types too
drop b22a469a3 Replace a manually allocated local array with a vector in depgen
drop 5e7ba2104 Use an STL string for constructing the macro in rpmfcAttrMacroV()

pick fd056ff39 Fix a regression on dependency generator namespace directive

# Rebase 7188cf8ec..fd056ff39 onto 7188cf8ec (161 commands)
#
# Commands:
# pick <commit> = use commit
# drop <commit> = remove commit, not suitable
# noop <commit> = remove commit, already applied
#      <commit> = remove commit, not reviewed yet
#
# These lines MUST NOT be re-ordered; they are executed from top to bottom.
#
# vim:syntax=gitrebase

mlschroe and others added 30 commits May 16, 2024 15:02
This is useful for reproducible builds and testcases testing time
related things. It is similar to the _buildhost macro added in
commit 2258825.

(cherry picked from commit bffbc1f)
This makes the file mtime more reproducible and consistent. The
package build time is set before the build is started, so every
new file will get the same time.

(cherry picked from commit efdc489)
Adapt the test cases. Also add a test for the new clamp_to_buildtime
policy.

(cherry picked from commit 9059e6a)
(cherry picked from commit 2fe4a48)
C++ doesn't like this...

(cherry picked from commit b75565a)
(cherry picked from commit 495552c)
In particular, spec->nextline is written to, so pointing it to
a string literal is undefined behavior. NULL seems to achieve
the same.

(cherry picked from commit 9eb8490)
rpmTag doesn't include anything suitable for a sentinel value, so don't
use it in array initializers. rpmTagVal works for that, but it's an
unsigned type so use 0 instead of -1.

(cherry picked from commit 7bb2dcd)
rpmTagVal is unsigned so we can't really have these -1's in there.
Tag works for this purpose just as well - assuming I spotted all the
explicit comparisons to -1 in the depMsgs code.

(cherry picked from commit 4d63588)
This hack here is illegal in c++. Just strdup() the silly little string,
it's not like this is a performance critical spot.

(cherry picked from commit 3a2b04c)
This really belongs to a separate function in the first place, and doing
so allows us to turn 'b' into a const char *, which in turn makes
the assignment to string literal "" in the url2path case legitimate.
Fun times and no functional changes.

(cherry picked from commit 7445a09)
Forward declarations to structs like we have in rpmio isn't legitimate
C++, as a minimal bandaid solution declare them as extern in the
internal header, and limit visibility.

(cherry picked from commit 5010191)
Otherwise we'd need casts for each of these accesses, having a function
allows doing more if necessary.

(cherry picked from commit f75cd15)
Cleaner than void pointer and avoid casting.

(cherry picked from commit 9a345d1)
(cherry picked from commit 38b2602)
(cherry picked from commit ace5dc5)
ARGV_const_t is defined the way it is for compatibility with exec*(),
which expects "char *argv[]" arguments, as explained in eg
https://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html

Since that const mismatch is inherently unfixable, fix the place that we
can - the pointers to string literals in our structs - and cast away
what we cannot hope to fix.

(cherry picked from commit 8a141a1)
Capital .C is sometimes used for C++ which this file certainly is not...

(cherry picked from commit fbcc57c)
(cherry picked from commit 689554a)
pmatilai and others added 24 commits May 16, 2024 15:04
Moving logic from switch-cases to data structures is always good,
and so is reducing duplication of names and the like.

(cherry picked from commit d5c8423)
The append and prepend modes got added before the declarative
Buildsystem, and did not get thoroughly tested with it. The existing
%build -a test didn't actually work but automake handling the build
in %install masked the issue embarrasingly. As the Buildsystem is parsed
after everything else, there's no way the previous append/prepend
implementation could work correctly with it.

Do what we should've done from the start: collect any prepend/append
stuff into separate data structures and apply them after everything
else has been parsed. This also lifts the artificial sounding
restriction wrt the corresponding main section:it's really the right
thing to do, even if it's a bit more code.

Make the tests wrt buildsystem much more thorough to ensure it all
really works, blush.

Fixes: rpm-software-management#3024
(cherry picked from commit bf46dcf)
We define two new test macros RPMOUTPUT_SEQUOIA and RPMOUTPUT_LEGACY
to make it easier to write parser dependent test output in the
test cases.

(cherry picked from commit 68d0f31)
freeArgs() only popped any local macros once, so if a local macro was
pushed multiple times, whether through %define or multiple identical
options getting passed, we leaked any remaining macros to the outside
scope.

Simply pop the local macros in a loop to fix. Have the internal
popMacro() return the previous pointer (if any) to simplify the job.
We even had an expected-fail test for this, now passing, but add a
more straightforward reproducer too.

This bug was circa 26 years old. Some might call it vintage at this point.

Fixes: rpm-software-management#3056
(cherry picked from commit 695b5c2)
rpmlog() predates rvasprintf() by something like two decades, but no
reason not to use it now. One malloc() down, yay.

(cherry picked from commit e2722fd)
If sources or patches in the spec are defined via a macro that does not
yet exist, it'll still work for building if the macro has been defined
by that time as there's another round of expansion there. But this can
leave the source/patch names inserted to the header disagreeing with
what actually ended up in the source package, eg in the testcase
you'd previously get '%{somemacro}-2.0.tar.gz' in the header whereas
the src.rpm had the right contents.

While defining sources this way seems mad and brittle, it does actually
work for building rpms and there's a whole ecosystem of packages relying
on it in Fedora. So lets at least be consistent about it, and re-expand
the source paths once more before inserting in the header, because
that's what happens for them in the actual build as well.

Originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=2233878

(cherry picked from commit b8d8bfa)
This causes more issues than it solves, at least presently. For one,
when BuildArch is used it typically causes the path to disagree with the
actual arch (eg on noarch packages). Which looks weird and causes yet
other issues in turn. The other issue, raised by Neal Gompa, is that
it can cause superfluous path differences in noarch subpackages, which
sharing the noarch package across multiple architectures in at least
koji.

Use -build suffix instead of %{_arch}. -build may seem redundant since
by default it's in BUILD directory already, but this makes it more
obvious in cases where the default is overridden (eg fedpkg overrides to
current directory), and helps differentiating it from the %buildsubdir
directory commonly created by %setup.

Suggested-by: Neal Gompa <[email protected]>
(cherry picked from commit dde4fe5)
Kinda related to 1261b41,
quiet means quiet and since this isn't using rpmlog() we need to filter
manually.

(cherry picked from commit b2058ce)
When BuildArch is encountered during spec parse, rpm recurses the
parse, but this doesn't reset/reload the global configuration and macros
to match. So eg a "BuildArch: noarch" package gets built with a
dramatically different macros depending on whether "--target noarch"
was used or not, whereas people expect it to be the same - after all we
give zero indication that anything might be wrong when --target wasn't
specified.

Automatically detect and handle this condition in the rpmbuild tool:
if the spec parse architecture disagrees with our loaded configuration,
request a reparse with reloaded configuration for the matching target.
This ensures 'rpmbuild -bb noarch.spec' and 'rpmbuild -bb --target
noarch noarch.spec' run with the same exact configuration.
Doing this also fixes the situation where build-time macro expansion
of build scriptlets (for template bits and dynamically generated spec
parts) yields totally different (bogus) than in the initial spec parse.
This also goes for RPM_ARCH environment and similar.

Avoid --undefine for dependency generation test, it doesn't work.
--undefine with --target was always broken, now it's just more visible
since it automatically applies to BuildArch too. Fixing that is a
separate matter (rpm-software-management#3070).

A more sophisticated fix could be having a stack of macro contexts that we
copy, push and pop as necessary. That ought to solve the undefine too.

Fixes: rpm-software-management#3049
(cherry picked from commit 96467dc)
While these were necessary to get things going, they are only
counterproductive now: we want to be able to freely use C++ features
inside rpm.

(cherry picked from commit 18f7e53)
rpmfi always internally stores 64bit sizes since 4.6.0, there's no
reason to do anything else with replaced sizes either.

(cherry picked from commit 0f6ed3c)
These just are leftovers from 861e92f
where trigger stuff was moved to their own header.

(cherry picked from commit f69fae9)
Realize that rpmExpand() can be passed everything that rstrscat(), only
it expands too. Silly me.

(cherry picked from commit 570f3b6)
There's no reason %specpartsdir should be dependent on %setup use,
just create it when we create the build directory too. Update tests
accordingly.

The spec parse test is noteworthy, the specparts dir creation no longer
shows up in spec parse output, which certainly is the way it should be:
this is rpm internal infrastructure stuff and nothing to do with spec
*parse*, this all only takes place during builds.

Fixes: rpm-software-management#3063
(cherry picked from commit f3f9f2c)
All these years, enabling debuginfo has required distros to hijack the
spec %install section with a macro like this:

    %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
    %%install\
    %{nil}

This for a widely used, longtime upstream supported feature is just
gross, and also very non-obvious, feeble and whatnot. And totally
prevents the new append/prepend options from being used with %install.

Take advantage of several newish features to make this happen: we need
expressions to properly handle the numeric %_enable_debug_packages value
from a macro, and if enabled, output the debuginfo template as a dynamic
.specpart.

Enable debuginfo on Linux by default in the platform configuration.
Notably noarch should not have debuginfo so it's disabled in the
platform configuration - since 96467dc
we can now actually rely on the platform configuration being valid,
so we can drop the "%ifnarch noarch" from the debug package check.
Further streamlining should be possible.

Note that the old %install hack MUST BE REMOVED from distros now.

As a nice bonus, this makes debuginfo work for packages that don't use
%setup. Add an explicit test for this in the "rpmbuild %caps" test.
specstep.spec needs to be made noarch here, otherwise it'll now try
to produce debuginfo and fail.

Co-authored-by: Florian Festi <[email protected]>

Fixes: rpm-software-management#2204
Fixes: rpm-software-management#1878
(cherry picked from commit 8535694)
os-release parsing is only needed for OCI usage, so move it inside the
appropriate branch. Saves some operations at build time when not needed,
and also it is necessary as not all OSes define VERSION_ID (e.g.: Debian
Unstable and Archlinux)

(cherry picked from commit 71f2ca4)
Multiple tests are failing on Fedora 40 due to their distro-wide
C modernization effort, which cause our ancient "hello world" package
to fail due to implicit printf() function usage.

There are two separate issues here:
- hello-autopatch.spec had off-by-one in its patch application, causing
  the modernization patch to not apply (see rpm-software-management#3093 for the reason)
- others were using the original hello-1.0-1.src.rpm from 2007 with
  some very outdated practises, code and md5 hashes

Update the src.rpm, removing silly fubar while we're at it. Regenerated
now on x86_64 so adjust the test-expectation, and update the python archive
test to calculate sha256 instead. And, fix the autopatch test numbers.

(cherry picked from commit ed1f2da)
This keeps the old behaviour of overriding the cookie. This may not me
correct as the code looks like it reads the cookie from the srpm when
doing rpmbuild --rebuild for the purpose of preserving it. Otoh the
current behaviour with overriding it even in this case has been around
for years. This whole cookie business seems to have some other issues,
too, and needs further investigation. Here we are only trying to fix the
memory leak.

(cherry picked from commit 54a3912)
Move the enablement logic to %__spec_install_template where it can be
buried with relatively little danger of being overridden by distros or
packagers. It's moderately annoying as the logic isn't no longer neatly in
one spot, but %__spec_install_post is commonly overridden by distros
and even packages, and in particular we don't want to have packages
copy-paste all this stuff along, because that makes making any changes
to this stuff even harder than it already is.

This should be entirely backwards compatible with all the pre-existing
%__spec_install_post overrides.

Co-authored-by: Florian Festi <[email protected]>
(cherry picked from commit 69c837a)
Apply the attributes in applyAttr() as per the name, and pass *that*
index array to rpmfcHelper() which only needs to concern itself with
generating the path arrays as per the used protocol.

No functional changes, doing this in "raw C" because this refactor
is worth cherry-picking to 4.20 too, but also because doing this
first makes converting to STL easier.

(cherry picked from commit 4fc4ee9)
There were no tests whatsoever for versioned file dependency
normalization, add some. This reveals that only filter unversioned
dependencies, but we do not filter multiple versions. I don't know
whether this is intended or not, but considering this is only done
for requires, recommends and suggests, we probably should.

(cherry picked from commit fac825c)
Commit ce6c381 accidentally changed
this namespace string literal too, oops. Possible because there was
no test on it, so add one.

(backported from commit fd056ff)
Commit 5ce5604 added a new public API
function so bump the minor lib version, "pin" the new test hashes also.
@dmnks dmnks added the release Release creation label May 17, 2024
@dmnks dmnks self-assigned this May 17, 2024
@dmnks dmnks merged commit 3b3c948 into rpm-software-management:rpm-4.20.x May 17, 2024
1 check passed
@soig
Copy link
Contributor

soig commented Jun 1, 2024 via email

@soig
Copy link
Contributor

soig commented Jun 1, 2024 via email

@pmatilai
Copy link
Member

pmatilai commented Jun 3, 2024

@soig, a closed PR is not a place to report, much less track issues. Open a new ticket per issue to have them looked at, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release creation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants