summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Document the library version update schemerpm-4.19.0-alphaPanu Matilainen2023-04-121-1/+6
|
* Bump the soname in anticipation of the 4.19 alpha releasePanu Matilainen2023-04-122-6/+6
| | | | We've removed a tonne of obsolete APIs in this release so...
* Install /etc/dbus-1/system.d/org.rpm.confFlorian Festi2023-04-111-0/+4
| | | | | | | | | which was accidentially dropped when converting to cmake Use CMAKE_INSTALL_FULL_SYSCONFDIR as it expands to /etc instead of /usr/etc Resolves: #2474
* Handle IMA as an imported target, take IIMichal Domonkos2023-04-112-2/+5
| | | | Another attempt at commit 7184fb80137363e39d79e2b5a0eb2c4fb060cc2e.
* Axe outdated multiple build areas docPanu Matilainen2023-04-113-51/+0
|
* Don't rely on pkg-config for libmagic just yetMichal Domonkos2023-04-112-2/+9
| | | | | | | This fixes a regression from automake where we also didn't use pkg-config for libmagic. Fixes: #2246
* Include pre-built API docs and man pages in dist tarballsPanu Matilainen2023-04-113-5/+36
| | | | | | | | | | | | | | | | | | | | There are multiple strange details buried in this all, such as having to run the main tarball creation in VERBATIM mode due to git submodule foreach variables, and because of that we can't use globs in the other commands but have to mask them behind other rules to do other steps and then concatenate the tarballs at end. On the build side we need to manually test for the presence of pre-built content in the source directory (normally that content would be in binary directories) and install differently in absence of the tooling that could actually build those docs. While at it, put both the API docs and man pages in their expected destinations, install(FILES .. TYPE MAN) is not aware of sections (:facepalm:) and just puts stuff into the root man directory. With DOC that is expected, but not where packaging expects to find it. Except that we're now *installing* the API docs too, put them under rpm/API docs without any extra html directories in between.
* Match the produced (compressed) tarball name in the target namePanu Matilainen2023-04-111-2/+3
|
* Add ChangeLog to the dist tarballPanu Matilainen2023-04-111-0/+9
|
* Use WITH_IMAEVM in cmake fileFlorian Festi2023-04-111-1/+1
| | | | as that's was we actually use
* Add WITH_FAPOLICYD build optionFlorian Festi2023-04-111-0/+1
| | | | | defaulting to ON. The if clauses were already in place just the option line was missing.
* Revert "Handle IMA as an imported target"Panu Matilainen2023-04-062-7/+2
| | | | | | This has brainfarts and is broken. This reverts commit 7184fb80137363e39d79e2b5a0eb2c4fb060cc2e.
* Bump our CMake requirement to 3.18Panu Matilainen2023-04-062-2/+2
| | | | | | | We already violate the 3.12 requirement in a place or two, and there are many nice things in the later releases. 3.18 is three years old and is available pretty much anywhere that is even remotely relevant for us.
* Handle IMA as an imported targetPanu Matilainen2023-04-062-2/+7
| | | | | | | Most of our dependencies are imported targets already, so while for just one site this isn't actually any shorter in terms of LoC it's more consistent with the surroundings in the consuming site, and more so if we ever need to link to this from some other place.
* Let cmake handle checking for mandatory componentsPanu Matilainen2023-04-061-5/+2
| | | | | Both find_path() and find_library() accept REQUIRED argument, use it instead of rolling our own.
* Add translations to dist tarballs (if po submodule is present)Panu Matilainen2023-04-041-3/+8
|
* Include translations in dist tarballsPanu Matilainen2023-04-041-2/+6
|
* Update translation submodule for new translations and targetsPanu Matilainen2023-04-041-0/+0
|
* Fix translation directory not getting added on out-of-tree buildsPanu Matilainen2023-04-041-1/+1
|
* Remove RPM_MASK_RETURN_TYPE from rpmTagReturnType_e; make it a macroDavid Cantrell2023-04-031-2/+2
| | | | | | | | | | | | | | | | | RPM_MASK_RETURN_TYPE is 0xffff0000 which is UINT_MAX. Per ISO C, enumerator values must be in the signed int range. gcc is more forgiving with this than certain versions of clang and if you are on a random system, such as FreeBSD 13.1 with clang 13.0.0, you will get this error when trying to compile software that links with librpm and uses the rpm headers: error: ISO C restricts enumerator values to range of 'int' (4294901760 is too large) [-Werror,-Wpedantic] Similar to the other enums in rpmtag.h, RPM_MASK_RETURN_TYPE is not actually a value used from the enum, so take it out of the enum and make it a macro. Signed-off-by: David Cantrell <dcantrell@redhat.com>
* Bring RPM_MASK_RETURN_TYPE in to the signed int rangeDavid Cantrell2023-04-031-1/+1
| | | | | | | | | | | | | | | | | Set to 0xffff0000 (or 4294901760), I was getting: error: ISO C restricts enumerator values to range of 'int' (4294901760 is too large) [-Werror,-Wpedantic] This happened not when building rpm itself, but when building rpminspect which links with librpm and uses rpm's headers. The system in question was FreeBSD 13.1 which has clang 13.0.0. It is a corner case, but I like testing things on non-Linux platforms as often as I can to find errors like this. With this change, the rpm test suite passes for me. Signed-off-by: David Cantrell <dcantrell@redhat.com>
* Fix typo in cmake ruleFlorian Festi2023-04-031-1/+1
| | | | that breaks the OpenSSL build of the interenal PGP parser
* Added more details to the doc about what is returned by the macros '%-x' and ↵Ralf Habacker2023-04-031-2/+2
| | | | | | '%-x*' Fixes: #2457
* Fix docs on weak user requires macro namePanu Matilainen2023-03-312-2/+2
| | | | | | The code in commit 6e03ef19a6b166d7b35ca0952e6091f557b892ca uses single underscore as intended but the macros file + docs got two due to whatever brainlapse.
* Add %preuntrans and %postuntrans to spec docsPanu Matilainen2023-03-301-2/+4
|
* Document %description and put %package to its own sectionPanu Matilainen2023-03-301-11/+14
|
* Briefly document %attr() and %defattr() in the manualPanu Matilainen2023-03-301-0/+25
|
* Add rough documentation for user and group handlingPanu Matilainen2023-03-302-0/+80
|
* Add a proper testcase for full sysusers.d file automationPanu Matilainen2023-03-302-0/+106
|
* Autogenerate requires for users and groups in packages from file dataPanu Matilainen2023-03-303-9/+39
| | | | | | | | | | | | | Ensure proper installation order and dependencies for custom user/group usage across packages. These are effectively Requires(pre,postun) dependencies to prefer during install and preserve the dependency for installed packages as well. These new requires require distro level bootstrapping of sorts to get the provides into place first. To make that less painful, allow turning the requires into recommends so they wont cause hard failures but will still cause the right thing to happen when ordering (and depsolving too) for the packages that do have the provides already.
* Automatically create sysuser users and groups on installPanu Matilainen2023-03-3010-2/+226
| | | | | | | | | | | | | | | | | | | | Add a new built-in %sysusers scriptlet that executes before unpacking files and creates any sysuser users and groups provided by this package. This scriptlet gets called with the same arguments as %pre, and sysusers.d(5) lines are fed into the stdin of the script (ie similar to file triggers). systemd-sysusers is the native solution, but compatibility with non-systemd distros can be achieved by pointing %__systemd_sysusers to a script that translates the sysusers.d(5) lines into adduser/addgroup calls or similar. Unlike all the other package-related scripts, this runs from the outside of a possible chroot to have access to the user-creation utilities from the start of the transaction even in case of initial installation. Users and groups are never deleted, on purpose, as that would lead to uid/gid reuse and consequently, data leak and general weirdness.
* Make rpmscript machinery chroot-awarePanu Matilainen2023-03-303-2/+44
| | | | | | Normally all scriptlets are of course chrooted when the installation is, but we're about to get an exception to that. No functional changes, just adding necessary infrastructure for the next steps.
* Add a tag extension to decode sysuser lines from user/group providesPanu Matilainen2023-03-304-0/+37
|
* Generate user() and group() provides from packaged sysusers.d filesPanu Matilainen2023-03-303-1/+56
| | | | | | | | | | | | | | | | | | | Encode the actual sysusers.d line as base64 in the EVR string to be passed to systemd-sysusers (or a compatibility script) by rpm during installation. The source string is \0 padded as needed to avoid base64's '=' padding in the output as this is not a welcome character in EVR strings. For example: u dnsmasq - "Dnsmasq DHCP and DNS server" /var/lib/dnsmasq user(dnsmasq) = dSBkbnNtYXNxIC0gIkRuc21hc3EgREhDUCBhbmQgRE5TIHNlcnZlciIgL3Zhci9saWIvZG5zbWFzcQAA group(dnsmasq) The EVR string is omitted from the group as that gets created as a side-effect of the user creation and does not require calling systemd-sysusers.
* Generate user/group provides from packaged /etc/passwd and /etc/groupPanu Matilainen2023-03-302-1/+15
| | | | | | | These often come from a separate package that is installed early on and form the basis of system users and groups, augmented by sysusers from other packages. We don't want to create such users, but we need to be aware of where they come from for dependency resolution and ordering.
* Make build parallelism memory and address-space aware (#804)Panu Matilainen2023-03-302-12/+3
| | | | | | | | | | | | | Take advantage of the new %{getncpus:proc/thread} functionality when calculating the number of processes/threads to use during build. The goal here is to avoid gross overallocation of processes/threads on constrained systems. In particular threads on 32bit systems where address space is limited, but also to allow packagers to easily tune for gigantic build jobs such as webkit that may overwhelm otherwise adequate systems. Fixes: #804, RhBug:1118734
* Make rpmio parallelism memory awarePanu Matilainen2023-03-301-9/+1
| | | | | | Take advantage of the new %{getncpus:thread} functionality when calculating the number of threads to use for io stream compression (when not in parallel region)
* Add optional total/proc/thread arguments to %{getncpus} macroPanu Matilainen2023-03-304-9/+118
| | | | | | | | | | | | | | | "total" equals calling with no arguments, "proc" and "thread" consider further constraints, what is implemented here is heuristics based on available physical memory and address-space and %_smp_tasksize_proc / %_smp_tasksize_thread tunables. Change the previous %getncpus related tests to use %getconfdir instead, they are testing unexpected arguments behavior for this type of macro, not %getncpus itself. Add a test for the actual functionality: if nproc is available, test that our total matches with that, and that defining tasksize to total memory only allocates one thread. Optimally we'd test separately for 32bit address space limitations but that gets tough when we have no idea where this will be executed.
* Conditionally display VCS tag in --info queryŁukasz Stelmach2023-03-301-0/+1
|
* Call RPM_CONFIGDIR just that consistentlyPanu Matilainen2023-03-3010-17/+17
| | | | | | For whatever historical reasons RPMCONFIGDIR was used in automake whereas the environment variable is RPM_CONFIGDIR. Just call it that everywhere.
* Honor rpm vendor setting from cmake, use a saner namePanu Matilainen2023-03-303-5/+5
| | | | | | | | | | The vendor was hardwired to "redhat" as a leftoever from early cmake bootstrapping phase and bugs in the surrounding logic. Simplify the setup somewhat: call the setting RPM_VENDOR and pass that around in the code tree as well. The CANON fubar along with other similar weirdness can thus remain hidden in the makemacros() cmake function. Reported and initial patch by Neil Gompa.
* Restore snapshot make target in cmakePanu Matilainen2023-03-301-12/+24
| | | | | | | | | | Refactor the dist rule into a slightly more generic function that we can call with suitable values for generating dist and snapshot tarballs. This includes preliminaries for requiring a tag for dist tarball but that involves further complications so not done yet. Local HEAD is not exactly the right thing to be building dist tarballs from.
* Add a note about CI tests to contributing guidelinesPanu Matilainen2023-03-241-0/+1
|
* Add test case for macro '%**'Ralf Habacker2023-03-241-0/+12
|
* Add documentation for shell like macro '%**'Ralf Habacker2023-03-241-0/+1
|
* Eliminate code duplication from rpmdsNext()Panu Matilainen2023-03-221-6/+2
| | | | Now that we can, let rpmdsSetIx() take care of the details.
* Kick out rpmds debugging remnantsPanu Matilainen2023-03-221-7/+0
| | | | I'll add the printf() if I need it...
* Kick out one last remaining nopromote remnant from the ABIPanu Matilainen2023-03-222-6/+0
| | | | | | Globally exported variables like this are evil. This one hasn't done anything in a while, just forgotten. We're bumping soname so we're free to remove cruft like this.
* Make rpmdsSetIx() somewhat sanePanu Matilainen2023-03-222-3/+3
| | | | | | | | | | | rpmdsSetIx() has shared the same flaw that was fixed for rpmfiSetFX() in commit 318efbaec80a90f1d9ac76d0cd433f6ea3c103fa: sometimes -1 means success and sometimes it means error. And like in that case, this is so broken that nobody can have relied on the behavior (we had one internal user which was lucky if anything). At least as bad is that it never actually bothered to check whether the newly set index is valid.
* rpmdsSetIx() sanity in rpmdsSearch()Panu Matilainen2023-03-221-10/+6
| | | | | | We have rpmdsCompareIndex(), use it so we don't need to muck around with the iterator index and attempt to restore with the broken API that rpmdsSetIx() is. Cleans up the code quite a bit.