summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use mkdir -p for creating SPECPARTS dirHEADmasterFlorian Festi2023-05-172-2/+2
| | | | | to not error out when invoking %setup more than once or shipping the directory in the sources.
* Enable large file support on 32-bit systems againMichal Domonkos2023-05-172-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace 32-bit sizes in types like off_t with 64-bits when building on 32-bit architectures, to enable large file support there. This fixes a nasty regression introduced in the cmake transition. As autotools would set this flag to 64 automatically for us, applications linking against librpm (such as libdnf, librepo, libsolv or drpm) are already adapted to that and are also building with the value of 64 (explicitly, we never exported this flag through pkg-config ourselves). However, us suddenly expecting 32-bits in those types on 32-bit systems can blow up badly e.g. in functions that take an off_t parameter, like Fseek(). There perhaps aren't that many low-level users of librpm but drpm is one such example where exactly this happens when built against our current master. It calls headerRead(), leading to Fseek() which receives a 64-bit offset parameter where it expects a 32-bit one, thus silently overwriting the following parameter from 1 to 0 (SEEK_CUR to SEEK_SET) which messes up the whole reading sequence in drpm's rpm_read(), producing a failure in drpm's test suite that doesn't make any sense at first sight. While at it, also export the flag through pkg-config so that anyone linking against librpm is now guaranteed to work correctly even if they don't set the flag themselves (kudos to Petr Pisar for suggesting this).
* Silence an apparent false positive warning from gcc in -Og modePanu Matilainen2023-05-111-1/+1
| | | | | | Haven't looked at the assembler but I don't see how xx could be uninitialized by the time it gets to the if(), regardless of the optimization used.
* Test for the variable rather than it's expansion in cmake filesPanu Matilainen2023-05-092-9/+16
| | | | | | | Testing for the expansion was a cmake newbie mistake that can go wrong in weird ways, test for the variable instead, consistently. Don't try to be clever with for-loops, just test for each case separately. This makes it greppable as well.
* Fix bzip2 detectionFlorian Festi2023-05-091-1/+1
| | | | | HAVE_BZLIB_H was not set due to a typo leading to the bz2 support not being compiled in although the library was detected correctly.
* Verify user/group in tests when possiblePanu Matilainen2023-05-051-32/+32
| | | | | Take advantage of root(less) aware $VERIFYOPTS added in commit fb040f16ec09a10c47f968d995c5bb770b8a7a64.
* Don't mask the user verify fail on invalid symlink testPanu Matilainen2023-05-051-2/+2
| | | | This test only runs as root so let it do its job.
* Fix thinko in archive size tag(s) descriptionPanu Matilainen2023-05-031-2/+2
| | | | | | | The archive size tags are on the uncompressed archive, an apparent thinko in 50324700562aa6204d93b1e4e9ae9776ecdeeedb. Fixes: #2498
* Remove second share/ dir from infodir and mandirFlorian Festi2023-05-021-2/+2
| | | | | | | cmake variables and the derived macros. CMAKE_INSTALL_INFODIR and CMAKE_INSTALL_MANDIR already include the datarootdir. So just prepending the prefix is sufficient.
* Fix file signatures getting loaded when not asked forPanu Matilainen2023-04-282-0/+13
| | | | | | | | | | | | Our compound masks for disabling file info bits per operation never got updated to include the two separate file signature types. This was discovered by rpm-ostree on older rpm version crashing on an IMA signature despite passing in RPMFI_FLAGS_ONLY_FILENAMES. Add the file signatures to the most obvious masks, and add a simple test as well. Fixes: #2425
* Make the higher level file info selection flags available to PythonPanu Matilainen2023-04-281-0/+7
| | | | | | | These disabler flags have little other purpose than optimizing cases where you know you only need a certain subset of files for large number of packages. Rather than expose all the individual flags, export just the per-operation level masks to Python.
* Fix leftover "lua.h" import from days long goneMichal Domonkos2023-04-251-1/+1
| | | | | | | We used to bundle our own Lua interpreter but that's not the case for a while... No functional change.
* Use CMake Lua moduleMichal Domonkos2023-04-254-5/+11
| | | | | | | | | | | | | | | | While many distros ship a pkg-config file for Lua, the upstream source tree does not provide one and so we shouldn't rely on it. Turns out, CMake provides a native Lua module so just use that. Unfortunately, the package doesn't define any IMPORTED target so add our own, similarly to how we did this recently with libmagic and libimaevm. Of particular note is that this adds an implicit dependency between CMake and Lua (e.g. Lua 5.4 support was only added in CMake 3.18), but that hopefully won't have much impact on most OS installations out there. Fixes: #2247
* Add pgpVerifySignature2() and pgpPrtParams2()Neal H. Walfield2023-04-209-19/+116
| | | | | | | | | | | | | | | Add new functions pgpVerifySignature2() and pgpPrtParams2(), which are like their earlier versions, but optionally return descriptive error messages (in the case of failure) or lints (in the case of success). Adjust tests accordingly. This requires rpm-sequoia 1.4 or later. See https://github.com/rpm-software-management/rpm-sequoia/issues/39 and https://github.com/rpm-software-management/rpm/issues/2127#issuecomment-1482646398 Fixes #2483.
* Bump CI to Fedora 38Panu Matilainen2023-04-191-1/+1
|
* Have dist (and snapshot) targets automatically pull in the po submodulePanu Matilainen2023-04-131-1/+4
|
* Revert "Oops, require translations for dist tarballs"Panu Matilainen2023-04-131-1/+1
| | | | | | This is actually the wrong thing to depend on. This reverts commit 4e69677ecde58d49ddfa77996862be41e76e1077.
* Oops, require translations for dist tarballsPanu Matilainen2023-04-131-1/+1
|
* 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.