commit 66ac70a597ba95517dfb8495e9e1a9ef254c37ea (HEAD -> rpm-4.19.x, tag: rpm-4.19.0-release, upstream/rpm-4.19.x)
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Sep 19 12:06:02 2023 +0200

    Preparing for rpm 4.19.0 release

commit 5f595dbfecd141ebf2d77735aa710b2656779319
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Wed Sep 13 10:48:07 2023 +0300

    Fix compile regression from 071be753cf05b2753efb0d3c51d4fa59b9641d09
    
    A declaration immediately following a label is not valid C99, as crazy
    as it is in a language that otherwise allows free placement of declarations.
    It looks like something people forgot to update in the standard, first
    in C99 and apparently C11 too. Recent gcc doesn't complain about it
    but it doesn't make it right.
    
    Suggested-by: Dmitry Mikushin <dmitry@kernelgen.org>
    (cherry picked from commit 34d983fa2a9b9276fc540b6bd554605b2c72689a)

commit 347cd05f93f8639a964331015eeb88e083295351 (tag: rpm-4.19.0-rc1, origin/rpm-4.19.x)
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Sep 4 10:39:26 2023 +0200

    Preparing for rpm 4.19.0-rc1

commit 4bcda7344505ce2368b5e02867725d5df9aadd3d
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 14:33:36 2023 +0200

    Update translation submodule for new translations
    
    (cherry picked from commit 4a12e3fc2163a1b61958be438db9d6a6ccee66f0)

commit 14905a3e7cab8ac760a7d9460204f506fb7d0c5d
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Fri Sep 1 15:26:18 2023 +0300

    Always run tests without --nouser and --nogroup, now that we can
    
    With the new container based test-suite we no longer need these hacks.
    Leaving the mknod conditional in place though as that may still be
    restricted.
    
    (cherry picked from commit 7d017eef51bd3138aad0a7859e76e7bfafd3951a)

commit 5c061827c09ccaf976210fe88e9aad421b543dbd
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Fri Sep 1 10:39:08 2023 +0300

    Run the test-suite with plugins enabled now that we can, yay
    
    (cherry picked from commit 4712c9c37bbf28f56f1e386df788dac440cc4cb8)

commit 3045b776ce511d030da5fbd92d4fceb73521f066
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Fri Sep 1 10:33:41 2023 +0300

    Emit a debug message instead of silence when DBus unavailable
    
    Make systemd_inhibit plugin behave identically to dbus_announce in the
    previous commit: when DBus service isn't available, emit a debug level
    message rather than completely suppressing the message to keep things
    troubleshootable.
    
    (cherry picked from commit 5f23d76eb90d17daa80732295fd74d01681d765f)

commit c7ab4cfa9c61dc1cb4bcba7dc45e9e18aece0a85
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Fri Sep 1 10:25:03 2023 +0300

    Suppress inhibition lock warning message when DBus service is not available
    
    Same as commit 708e61307bc3fd027b016fdf5a1d1a5274c1843c, this message
    will just annoy and confuse users in situations where DBus service is
    not running at all, such as single-user mode and minimal container type
    environments. Like our own test-suite. Rather than entirely suppress
    the error, issue a debug log though.
    
    (cherry picked from commit 071be753cf05b2753efb0d3c51d4fa59b9641d09)

commit 94a95a32298488a0a46cb73149a8f13c72e10154
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Thu Apr 6 15:03:33 2023 +0300

    Export our libraries as a cmake find_package() config
    
    This is a fair amount of annoying voodoo boilerplate compared to what I
    would've expected, but the ability to just `find_package(rpm)` is
    very nice on the (API) user side.
    
    Fixes: #2471
    (cherry picked from commit 6ec0e4069e61fca3a5391c65effe72b2c782730d)

commit c37b466f6eace5a75f6c3a0baafdf119351b147a
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Thu Aug 31 09:55:52 2023 +0300

    Clean up hashtype definitions
    
    Always #undef the "parameters" right after definition to make sure
    they're always free for the next user. Which avoids annoying
    double-undefs all over the place.
    
    (cherry picked from commit ffd55686abdfdadf6d854be18e52fa7536dadc8f)

commit be7e30d5b6f18c9ce6c1a476395c3aa661e89204
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Tue Aug 29 13:19:15 2023 +0300

    Document the main differences between rpm-sequoia and internal parser
    
    Fixes: #2346
    (cherry picked from commit 5f98b1aa4817d5923caef42208e32eb34094e94b)

commit 944c218235cb06e4e54988e492478e03b5e03ecc
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 28 17:14:45 2023 +0300

    Add a build tunables section to the reference manual
    
    The descriptions are terse and I've inevitably missed a whole bunch
    of stuff here, but it's a start.
    
    Fixes: #2466
    (cherry picked from commit 3687458aa0e02e7d2fe50a028693a93260628446)

commit a7834728ac40edf89978c6437f78d10f28916fb5
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 28 16:22:56 2023 +0300

    Drop an extraneous Dependencies section from the spec manual
    
    (cherry picked from commit 33c0478f96122cb8f1e8191a1879379822e0a9a7)

commit d96d6380fce322001846625d2f804fe207f3960a
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 28 16:20:45 2023 +0300

    Polish the build process docs a bit
    
    Replace source links to documentation (we have it now!) and various
    more cosmetic tweaks.
    
    (cherry picked from commit c10877b6bcceb99eae8b0df97ee25bcc82bbb9e3)

commit e01c49b726df1d39610c50bc1d94ac0c6fbd832f
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Wed Aug 23 13:22:07 2023 +0300

    Fix misleading error message on some invalid filetrigger conditions (#2584)
    
    We used to test the first argument in parseScript() and then again
    for all arguments in parseRCPOT(), with different error messages in
    each case as if they were separate issues. Only, the one in parseRCPOT()
    didn't get a chance to execute because it was caught by checkDep() before
    it (probably added after the file trigger check was initially added) and
    so for invalid file trigger conditions (such as an unexpanded macro), you'd
    get a very misleading error about dependency tokens where an absolute path
    is expected, and worse, it was reporting an incorrect line and a line
    number while at it.
    
    Measure twice, cut once doesn't apply here. Check once and be consistent
    about reporting it. Due to the way triggers are handled, we can't
    report the line number correctly so don't even try, the wrong line
    number is far worse than not having it at all. Add some tests to go.
    
    Fixes: #2584
    (cherry picked from commit 21457de886faf2415500a8bb7cc6c816d72939ef)

commit f5530bb54120b2d2a8ae0fb152c222b4fb8a1b39
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Tue Aug 15 14:52:50 2023 +0300

    Default to C.UTF-8 locale, allow fallback to C
    
    Mostly everything around us is UTF-8 these days, we need to get on with
    the times. Especially now that glibc >= 2.35 finally supports it too.
    Default to C.UTF-8 but allow disabling it via cmake option to fallback
    to the traditional C locale instead.
    
    Fixes: #2587
    (cherry picked from commit 3be76d71448279a29674cba753fc7ad811b7931c)

commit 653796bc82cc311f6af7ebd2ff6f8b99aa481794
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 21 13:42:43 2023 +0300

    Behave more consistently when target arch %optflags are not defined
    
    You're about to fall into a deep dark hole, proceed at your own risk.
    
    When building for a target architecture with no defined %optflags
    (such as noarch), one would think that %optflags would be empty. Not so in
    rpm, instead we get %optflags for the detected architecture, and there
    are packages which rely on this behavior. And in this particular dark
    corner, buildarchtranslate is not applied so one can get drastically
    different %optflags than you'd get without an explicit --target, on the
    same system. Which can break builds.
    
    This behavior is just WRONG, %optflags should always reflect the target
    architecture. But as long as there's no %_host_optflags, lets at least try
    to be consistent about it. When we fall back to detected architecture
    %optflags, at least use the ones after buildarchtranslate to return
    consistent data within a host.
    
    This supposedly fixes the case where our newly added x86_64
    subarchitecture definitions haven't been overridden in vendor config and
    somebody's noarch package uses cmake to install data, and falls over due
    to nonsensical optflags from rpm.
    
    Initial report: https://bugzilla.redhat.com/show_bug.cgi?id=2231727
    
    (cherry picked from commit 59bbb932e5a546152a28cea9036958c324669b82)

commit db2dbbd1e91a0bc2f6be1a0e65dd0dced9f974a8
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Tue Aug 22 14:03:37 2023 +0300

    Move the %_sysusersdir definition to a more logical spot
    
    Commit c7fd9fed9951dc884c345eb9280987389b291c41 introduced %_sysusersdir
    into the group of global configure-related macros but that's not what
    it's related to at all, it's only related to our sysusers integration
    feature. Move it where it really belongs.
    
    (cherry picked from commit 0e336e24c927b892dc63f723f3b85b066e5bddc6)

commit da078bc2f4401ce282a307c3b0209b65e5b8bd63
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Tue Aug 22 13:42:27 2023 +0300

    Revert recent %_root_prefix macro addition (RhBug:2233454)
    
    Commit cececfb6851234aca3e8d102de1c192c6bdf3e67 introduced %_root_prefix
    macro but this clashes with pre-existing use in scl-utils:
    https://bugzilla.redhat.com/show_bug.cgi?id=223345:
    
    Just query the value from pkg-config if available and otherwise use
    hardcoded value pointing to /usr instead. We don't need an intermediate
    global macro for this.
    
    (cherry picked from commit 24f974cff9e9559f3ab308661572740ea432f2a3)

commit 38f298099beb5b2f1d07884bd893e8a72be61207
Author: Daan De Meyer <daan.j.demeyer@gmail.com>
Date:   Thu Aug 3 21:36:43 2023 +0200

    Add aliases for weak dependency queries to rpmspec.
    
    These are all available on the rpm CLI so let's make them available
    on the rpmspec CLI as well.
    
    (cherry picked from commit aa0d6d8109b9d43188873f3c8e51d106cc061f5d)

commit ac726afff04622ccebfeac38935ea2e540020db5
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 17 18:02:07 2023 +0200

    Avoid warning about double --chdir in "make check"
    
    Newer versions of Bubblewrap emit a warning for some select options
    (--chdir included) about only the last occurrence having effect, which
    is what happens in "make check" due to the --chdir override.
    
    Instead, just cd to the /srv directory in a shell and then run rpmtests
    from there, sigh.  It's not the prettiest but it's better than always
    printing the spurious warning.
    
    (cherry picked from commit 5e9c71296e8cd6c5f2f5a6188b303bbd7a2c74db)

commit 387df13126999e42d67fd6ca27a27bdda8a59a64
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 17 15:40:06 2023 +0200

    Prevent build dir from becoming annoyingly sticky
    
    With OverlayFS and unshare(1) being used in the test-suite, some of the
    directories in the test tree, sandbox and rpmtests.dir/ end up missing
    read/write or execute (for directories) permissions which means removing
    them requires excessive force in the form of "unshare -r rm -rf".
    
    CMake is clever enough to adjust the permissions behind the scenes on
    "make clean" but manual removal should just work too, so fix that with
    chmod(1) in the clean_up() trap.
    
    (cherry picked from commit 94ee5c6c23168ebcaa96e992414af4049844e933)

commit ee49da9e5abbf5236bd0e90a3c491f7a9aeb43af
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 17 17:25:49 2023 +0200

    Move exit trap to a function in mktree.fedora
    
    This is more flexible as we can now add more commands to the trap, see
    the next commit.
    
    No functional changes.
    
    (cherry picked from commit 4fa00264308056d5db26f29707a381ff10141caa)

commit 89f983d83e9a7956ee5eeed611261b4aaa3751a4
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 17 14:00:08 2023 +0200

    Enable DNS resolution in "make shell"
    
    Networking is currently enabled in test containers (we don't use
    --unshare-net) but for domain names to be resolvable, we need an
    /etc/resolv.conf, too, so add it from the host, similar to how e.g.
    Podman does it.
    
    We don't need network access in the test-suite but it can be handy for
    interactive testing in "make shell", e.g. to allow gdb to fetch
    debuginfo data through debuginfod automatically.
    
    (cherry picked from commit 87f1b4545bfdd6d5d09e9c8bb31f8fb96d5313aa)

commit b4eeac2fd414cbc80194b0350b07f4357f951800
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 19:10:29 2023 +0200

    Export the same DNF command-line in "make env"
    
    When managing the test tree with DNF, it's actually desirable to use the
    same options that were used during the tree construction (especially the
    cachedir), so just do that.
    
    (cherry picked from commit 3701e4893ea9f758abad0bff907096d33bafb693)

commit dc2a90f1ca47ab65e17642c5047c3f573b67965c
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 17:38:33 2023 +0200

    Extend the MOTD in "make env" with a bit more info
    
    (cherry picked from commit c3ecf8ac443477d1a6c9ea7fa3ca0d1cdca6776f)

commit 471c39fcecb5dd75e4dc9c3da033bd37c284196d
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 17:23:38 2023 +0200

    Terminate stray bwrap processes on test failures
    
    (cherry picked from commit 8e9ff82f5559001722766cb13abb5c81f41efda4)

commit e36e87e5e912559040ef58cabcc85d11a2d0babf
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 16:20:50 2023 +0200

    Point RPM to correct database in Dockerfile
    
    This just mirrors what mktree.fedora does already, and is only relevant
    in "make shell" when using the mktree.podman backend, no other
    functional change here.
    
    (cherry picked from commit db35781bf1a3a0f10e101759d8421cdeb2cc56c1)

commit 333a978f77f12a54d7dc7933b171e0709d3135f3
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 13:59:27 2023 +0200

    Set standard, consistent HOME path in tests
    
    Use /root instead of / (in runroot) or $PWD (in atlocal).  We already do
    this in "make shell" so that the root user's dotfiles (e.g. ~/.bashrc)
    are loaded from the base image, this commit extends that to "make env"
    and fixes the following:
    
      - Calling "runroot rpm -qa" interactively now works as expected since
        the rpmdb from the base image built by mktree.fedora (which
        overrides %_dbpath in /root/.rpmmacros) is used
    
      - The user's native prompt is now used, instead of the shell's default
    
    This commit has no effect on the tests themselves since we initialize an
    empty rpmdb before use anyway.
    
    There was no technical reason for HOME being set to /, really, other
    than it being a historical artifact from the fakechroot era.
    
    (cherry picked from commit 258548166223eb5544d7e644a8fd9d8f4b363474)

commit 800427ca86ac87a5833c52a773983e0b2968e7ef
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Wed Aug 16 13:31:01 2023 +0200

    Fix infinite recursion in "make env"
    
    Using which(1) in a shell function that's supposed to shadow the
    original command is silly, it just results in a recursive call.  What
    was I thinking?
    
    Instead, use "command" which is a better fit, see "help command".
    
    (cherry picked from commit 1c3264ed887472e500d35638b81cdfa2e071d7d8)

commit a60b981eb1a05bdc0db271485f77e5ffb1926e7a
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 10 17:38:19 2023 +0200

    Clean up dnf() function in "make env"
    
    The "function" keyword is not needed (not POSIX either) and which(1) is
    better than hardcoding the path.
    
    No functional change.
    
    (cherry picked from commit 44c76481e75342b6f9e1994d1bb7f83575341c55)

commit cb705c766ed836aa5704fb2e8fb493062cc5527b
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 10 14:28:51 2023 +0200

    Simplify BYPRODUCTS in "make tree"
    
    The inner structure of mktree.output/ should be treated as an
    implementation detail of the mktree backend in use.  All we care for
    here is that it's purged on a "make clean".
    
    No functional change since only mktree.fedora uses this directory
    currently and it already recreates the other contents (inst/) on each
    rebuild anyway.
    
    (cherry picked from commit ebd0905a3f78fd7d8e28125b00f78a069427c852)

commit 17ff3d2f704c339fdd54c1279d304e89e4f9a2c5
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 10 14:27:32 2023 +0200

    Support common mktree.fedora image in build dirs
    
    Using multiple out-of-source build directories (e.g. for topic branches
    or experiments) currently means redownloading and recreating the base OS
    image in each of them.  This is slow, ineffective and just not needed
    since the image isn't specific to the build and can just be reused.
    
    To fix it, if a mktree.output/ directory exists in the source directory,
    use that, otherwise just use the build directory like we always did so
    that all build artifacts remain in the build directory unless told
    otherwise (which some may prefer).
    
    This means the feature can be enabled by simply creating an empty
    mktree.output/ directory in the source directory.  This is inspired by
    mkosi(1), much like many other things in mktree.
    
    We shall document this later, too.
    
    If the source directory happens to be a git-worktree(1), go look into
    the common worktree for mktree.output/.  This ensures that worktrees, if
    one uses them, are not treated as separate source directories and will
    reuse the same image, too.
    
    If using a common mktree.output/, also use a common mktree.cache/ (DNF
    metadata and package cache) as separating those two makes little sense
    in such a case.
    
    (cherry picked from commit e1ff74c4e5376bc844a244687537fef81145e2bf)

commit 6b1f9e827948db32168c12bdd996cb7a76eb818b
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Wed Aug 16 10:18:20 2023 +0300

    Stop looking for apparently non-existent 7zip command
    
    Since the initial commit 185596818f763af1249f19161f38134ee93092d2, we've
    primarily looked for a command named "7zip" but defaulted to 7za when
    not found. Looking closer it seems that there never was any command
    called 7zip at all, at least in the OSS landscape. So don't default to
    something that doesn't even exist, which also means we'll land on an
    actually working value if/when 7z[a] doesn't happen to be present at
    build-time (there's no other reason for it to be there).
    
    Related to #2608
    
    (cherry picked from commit 095502dc0933731eb5a8e877e1c383b8c5e7af44)

commit 79c31962628001cd117fe17d89cbcc97f87e0fe8
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 14 12:31:06 2023 +0300

    Look for alternative implementations of 7zip, like autoconf did
    
    Fixes a regression from the cmake transition where we'd just assume 7zip
    as the name of the executable when previously we looked through 7zip,
    7za and 7a. Resume the former behavior.
    
    Fixes: #2608
    (cherry picked from commit f9775b454e1969a8d5c8d8b7435817876ed79482)

commit 7fb96740fa7d38011f67b45589a2fe58fd868287
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 14 12:29:11 2023 +0300

    Unroll the utility finding loop in cmake for flexibility + readability
    
    We need more flexibility than a simple array can provide, and with
    all the name munging, it's not particularly obvious as to what
    values are set and how. Supposedly no functional changes here.
    
    (cherry picked from commit bbb289e303d8c72b9e35410e593b8d92b006bec1)

commit 75546263f11b5da294d2e4e7dfc08e9aa78c063a
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Mon Aug 14 09:58:20 2023 +0300

    Remove duplicate line
    
    Initially accidentally added in 9e8f57bf7abdc26262467d20c5a636547c09a277
    and then amusingly commit 1bd14464b9c6206602d1553fd24db7385e64ef55
    indentation fixed.
    
    Fixes: #2613
    (cherry picked from commit 194eb101663b721810096097458c582530e9c3fa)

commit 87da0b5b926db5d4f3ac48c46676b8747db54b60
Author: Dirk Müller <dirk@dmllr.de>
Date:   Tue Aug 8 13:53:38 2023 +0200

    Rewrite --last to just use sed for formatting
    
    This is the only dependency on awk in the runtime commandline part of
    rpm, which is bloating minimal container images a bit. We can rewrite
    that into a single sed statement. We love you anyway, awk.
    
    (cherry picked from commit 224095542246e762617d38e2096fdeba13d266e3)

commit 1fbd827ec67dbb8287fd698da90eac453569bf23
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 3 17:01:17 2023 +0200

    Bump actions/checkout from v2 to latest (v3)
    
    This should've been part of the previous commit, just got forgotten.
    
    (cherry picked from commit 2043f2ac57ae2690cc1b11242f040085df8eed83)

commit f56caf48f64b86a42fbef56bb88ac90b0e625504
Author: Neal Gompa <neal@gompa.dev>
Date:   Fri Jul 28 01:16:24 2023 -0400

    CI: Add initial GitHub Actions configuration
    
    Fixes: #2569
    (cherry picked from commit d4cad0f26aec183e9eb4f42533b91b30c0c04e80)

commit f38ecc573c622d66a9eb8c5570fc28d54682b09e
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Aug 3 15:46:52 2023 +0200

    Add support for --interactive in mktree.podman
    
    Pass this option, if specified, to $PODMAN.  This is needed for
    unattended use of mktree.podman where no tty is allocated, such as
    GitHub Actions.
    
    Use it as follows:
    
      ./mktree.podman check --interactive=false ...
    
    Default to true (by keeping -i in the command line) still, it allows
    CTRL-C to work when running the script interactively.
    
    Based on a patch by @Conan-Kudo.
    
    (cherry picked from commit 23875394605183c62db010b3d7bba9a4c5d656e1)

commit 9cc14f2c1b6d63ec48b93ab0a00af2a78309ed50 (tag: rpm-4.19.0-beta)
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 10:25:24 2023 +0200

    Preparing for rpm 4.19.0-beta

commit cd3fa8a5491d0e9d1575ccad4b72e5feeea70443
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 14:33:36 2023 +0200

    Update translation submodule for new translations
    
    (cherry picked from commit 39ebe1e62333ebe811b8825f3caa0ecbff631328)

commit dd2ccea54b57d4e55f505e136b32f1e71314ee1f
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 12:21:01 2023 +0200

    Add back ima-evm-utils to mktree.fedora, oops
    
    We actually do need this library in the test tree, in case the build is
    configured with -DWITH_IMAEVM=ON which links librpmsign to it, it's not
    a plugin.  We already include libfsverity for the same reason.
    
    This is a fixup for commit 4c41faf7a592a5bb484cf7d645cc247d850d776a.
    
    (cherry picked from commit 1d8a67485fff3d770b5cb4072b1558d9fad91f54)

commit b683e4d1c021d7f94eb78660516a27ba88dbd79c
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 10:37:24 2023 +0200

    Remove forgotten ENABLE_CI cmake option
    
    We no longer have the ci/ directory as the Dockerfile has been moved to
    tests/ and the "make ci" target is now added automatically if Podman or
    Docker is available, so no need for ENABLE_CI anymore.
    
    (cherry picked from commit 02a5151e3eaca789fbf565ee6e7e07f0d5f6d25a)

commit baccabac04c7f36252450b5b2a54a3dfed60f2db
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Aug 1 11:27:11 2023 +0200

    Add back Docker support to CMake
    
    When using the mktree.podman backend (either through "make check"
    directly or "make ci"), detect and choose Docker if Podman is not
    available.
    
    This fixes a regression from the original "make ci" where we also
    supported Docker, and should've been part of commit
    3b2e5eba187feef56b113a59e88aa05634a471d3.
    
    (cherry picked from commit 35a3d229300338fd448373acc27b99a170bebaa7)

commit 323d0e0c27c528c08e70bf02f84082addccd59f8
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 31 14:03:10 2023 +0200

    Minimize the package set in mktree.fedora
    
    We don't need audit and ima-evm-utils, those are for the plugins which
    we disable in the tests.  We do, however, need popt and shadow-utils
    (pulled in by the above) so list those explicitly.
    
    This also conveniently removes systemd (pulled in by audit) which we no
    longer need since commit 2bdd7d7cbd77b13abf512bb919abe7f0537a2c45.  To
    future-proof, though, exclude systemd-udev which is not needed in
    containers.
    
    Lastly, remove gdb-headless which is redundant since we already install
    gdb-minimal.
    
    As a nice side effect, this fixes the spurious warning during the DNF
    transaction that comes from systemctl(1) through the %systemd_post macro
    used by audit (about requiring a /proc mount in the installroot).
    
    (cherry picked from commit 4c41faf7a592a5bb484cf7d645cc247d850d776a)

commit 3ef4f7e045509432c01586d321b61e4c7102c270
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 31 13:59:31 2023 +0200

    Disable systemd-inhibit in mktree.fedora
    
    This plugin doesn't work with --installroot and only prints a spurious
    warning, disable it.
    
    Refactor the contents of .rpmmacros now that we have more than one line
    in it.
    
    (cherry picked from commit d7f7c8b1d3abba725a2d518a0cacbae833be4b9e)

commit 069d628a80708d591297aced6870926f615a7b1f
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Fri Jul 28 14:34:25 2023 +0200

    Merge mktree.native into mktree.fedora
    
    Don't make any assumptions about how other Linux distros would need to
    implement the mktree interface.  We simply don't know how much logic
    could be shared between such native backends before some are actually
    written.
    
    Right now, we only have one such backend, for Fedora, that's a sample
    size too small to draw any conclusions.  Let's worry about refactoring
    when it actually makes sense and stick with the most basic layout till
    then.
    
    As an example, while unshare(1) works for running DNF as an unprivileged
    user, it does not seem to work with other package managers and tools
    that I've tried such as zypper or debootstrap.  Those may need another
    way of doing this or even require sudo(8).  Also, --map-auto only exists
    in the newer unshare(1) versions, older versions would need manual
    mapping.
    
    This also simplifies the "env" command quite a bit, which is nice.
    
    No functional changes otherwise.
    
    (cherry picked from commit a1ca8e345d08e45705b9361bf4a366ed65c0c5a8)

commit 80a88fd051f286c7ef46ef743d8a7e09875c5db5
Author: Zoltán Böszörményi <zboszor@gmail.com>
Date:   Fri Jul 28 12:16:56 2023 +0200

    Allow setting platform macro settings externally (#2585)
    
    * Allow setting platform macro settings externally
    
    By default, rpm installs a series of default platforms based on
    the CPU architecture names in subdirectories called
    
        /usr/lib/platform/<arch>-<os>
    
    This is enough for regular Linux distributions. However, some
    distributions may use more specific platform names that refer to
    particular computer systems, like SBCs or specific CPU tuning when
    compiling.
    
    If the platform subdirectory does not exist in /usr/lib/platform
    then rpmbuild does not work.
    
    Allow creating such custom platform subdirectory with feeding
    the necessary data using external variables: RPM_CUSTOM_ARCH,
    RPM_CUSTOM_ISANAME, RPM_CUSTOM_ISABITS, RPM_CUSTOM_CANONARCH
    and RPM_CUSTOM_CANONCOLOR
    
    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
    
    ---------
    
    Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
    Co-authored-by: Florian Festi <ffesti@redhat.com>
    (cherry picked from commit fde03ae33d55b160a31a6c54946880dcdf8fd0d6)

commit ccdca0973243c6ed197cdaf0f21b3ac49b4e9e37
Author: Florian Festi <ffesti@redhat.com>
Date:   Fri Jul 28 09:46:01 2023 +0200

    Set default shell to /sbin/nologin
    
    as this is the default location. Moving the the /bin and /sbin content
    into the /usr directories is a distribution dependent thing inherited
    from the Fedora script.
    
    (cherry picked from commit 077afb85925d04067ebd38bfa520cec0e36f5bbf)

commit 0f3e44803080c679762155d652ec314ec0877f68
Author: Florian Festi <ffesti@redhat.com>
Date:   Tue Jul 25 12:08:42 2023 +0200

    Check inside --root when querying for files
    
    rpm -qf checks if the argument actually exists if it can't be found in
    the rpmdb and gives different messages based on that.
    
    This was done without taking the root dir into account leading to wrong
    messages if the file only exists in the root dir but not outside.
    
    Resolves: #2576
    (cherry picked from commit 3e820eaa4c8cb94a63338366cbf014dc5264eba2)

commit 42b82d9a550ade799a4a16a02661fce451b9a7e9
Author: Florian Festi <ffesti@redhat.com>
Date:   Wed Jul 26 15:01:35 2023 +0200

    Duplicate filename before passing it to basename
    
    basename is allowed change the string passed to it. While we don't need
    the filename after that just casting away the const seems a bit too
    hacky.
    
    (cherry picked from commit 3fa2ae78db9b31edb4c22f3b5cd36c6c972947f1)

commit 8457ad0b55e585bf97bd577bbcfc65853f3dc2fd
Author: Calvin Buckley <calvin@cmpct.info>
Date:   Tue Jul 11 19:22:41 2023 -0300

    Fix missing basename include on macOS
    
    (cherry picked from commit b2e67642fd8cb64d8cb1cca9e759396c1c10807d)

commit 31d1f8ca096f1947920743f6c79a4d1ea100aa9e
Author: Calvin Buckley <calvin@cmpct.info>
Date:   Tue Jul 11 19:16:11 2023 -0300

    Fix missing signal.h include
    
    macOS doesn't include this by default, so the signal functions
    won't be found with -Wimplicit-function-declaration.
    
    (cherry picked from commit f07875392a09228b1a25c1763a50bbbd0f6798c2)

commit 5b9dfee24163ca54e4db3cd729dcd5b10894eda2
Author: Florian Festi <ffesti@redhat.com>
Date:   Fri Jul 14 10:45:01 2023 +0200

    Replace systemd-sysusers by new sysusers.sh script
    
    for user and group creation. It creates system users and groups based
    on files in the format described in sysusers.d(5) using useradd and groupadd.
    
    Only supports the --root, --replace and -help parameters.
    
    (cherry picked from commit 2bdd7d7cbd77b13abf512bb919abe7f0537a2c45)

commit dc2303fab04a05b3c7c1494125bb9da3da714177
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Jul 25 21:25:49 2023 +0200

    Mount the common tree snapshot as read-only
    
    This ensures no single test can (accidentally or intentionally) alter
    the shared tree and influence the subsequent tests.
    
    It also makes us comply with the following OverlayFS requirement:
    
        Changes to the underlying filesystems while part of a mounted
        overlay filesystem are not allowed. If the underlying filesystem is
        changed, the behavior of the overlay is undefined, though it will
        not result in a crash or deadlock.
    
    This could have previously been violated when running parallel tests.
    
    Contrary to what I thought in commit
        cf8716f204f1eed196ca7ae905288261e0c88c3b,
    to make this work, all we need is to mount a new tmpfs at /tmp in the
    snapshot, as that's where some of the processes (patch(1) in particular)
    need to write.
    
    Update the comment in mktree.rootfs accordingly, too.
    
    (cherry picked from commit 68a36d1d857fb2ec362d757cff08b41d26b7e267)

commit de61899d78d25d0ccdc8a5d19dfb2f6c87b03b82
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 24 21:39:10 2023 +0200

    Add mktree.podman backend
    
    This backend uses Podman with the bundled Dockerfile to build the test
    image.  RPM is built in a container as that's part of the Dockerfile.
    
    This makes the test-suite more portable since only Podman needs to be
    installed when using this backend.  That's especially useful in a CI
    environment where we may not have a native backend for whatever OS the
    VM is running, e.g. Ubuntu LTS in Semaphore CI.
    
    Since it must be able to run without a build system in place, make it
    also usable as a standalone script.  For more portability, allow for
    Docker to be selected in place of Podman by invoking it via a symlink
    (multi-call).
    
    We used to have a "make ci" target previously, add it back now and point
    it to the script.
    
    Make it also serve as a fallback backend now.
    
    (cherry picked from commit 3b2e5eba187feef56b113a59e88aa05634a471d3)

commit 87c30c7ddb420160cbcac903ed178af0f792fb98
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Jul 25 17:12:46 2023 +0200

    Add mktree.rootfs backend
    
    Useful when building RPM in a disposable container or VM, see the
    comment block for details.  This is also a prerequisite for the next
    commit.
    
    (cherry picked from commit d30f55fde01985e85705358cb308f7253571d86e)

commit 040942f2ac986dad3cd397c574889181b9586aba
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Tue Jul 18 10:57:22 2023 +0200

    Refactor cmake
    
    No functional change, just prepare the ground for the next commit.
    
    (cherry picked from commit 750923966a19e87306f14911f0ba5aca1e24c632)

commit 7d7568cd16e161ea4b84d806a4a65101cd4ae5db
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 24 21:48:33 2023 +0200

    Add mktree.common
    
    No functional change, just prepare the ground for the next commits.
    
    (cherry picked from commit fb7835ba94ff5a008f594f98b0a988214b2d1986)

commit d790435fdf09764c72ead9ce89c2d6e3e1fd4cc9
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Fri Jul 7 15:54:41 2023 +0200

    Turn Dockerfile into a standalone RPM image
    
    So far we've only used the Dockerfile for *building* RPM and then
    running the test-suite in a container.  Make it actually useful for
    building a complete RPM image out of the source tree.  That's the
    typical purpose of a Dockerfile in a project, after all.
    
    Not much is missing, just basically remove the stock RPM installation
    and replace it with our own.
    
    After this commit, one can just run
    
      podman build -t rpm -f tests/Dockerfile .
      podman run -it rpm
    
    to get a shell with the current checkout built and installed, as a
    podman-based alternative to the native "make shell" support.
    
    To run the new test-suite (in our CI) using this image, a bit more work
    is needed so we'll leave that for the next commits.
    
    Also add a .dockerignore file so that the _build subdirectory that we
    "officially" support is not needlessly copied to the image if present.
    
    (cherry picked from commit 4ecdaee453e5a128cada8fa9ed3d8304120baf68)

commit 57193a1f677b90c4bf331e3f6ea8980c84cdc202
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Fri Jul 7 15:53:45 2023 +0200

    Drop ci/ directory, move Dockerfile to tests/
    
    Leave Dockerfile.debian out for now as it would need adjustment to the
    new test-suite and that's not really the focus right now.  It was only
    experimental at this point and not really used in CI, anyway.  We may
    add it back at some point, though.
    
    This is in preparation for the next commits.
    
    (cherry picked from commit 53df9991e1d69ac0abc1d56747d8963726ff379c)

commit 9f8d6a3ea119b96254a52084df1499f05a3a7785
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 24 18:38:06 2023 +0200

    Add support for mktree backends
    
    Choose a suitable mktree implementation ("backend") at configure time.
    Prefer one that's named after the host OS but allow to override.  Turn
    the existing mktree into a template and move the Fedora bits to a new
    Fedora backend.
    
    This allows the test-suite to support other (Linux) distros on the host,
    provided that someone writes and contributes backends for them.
    
    It also allows for supporting completely different image building
    methods which is what we're going to do next.
    
    (cherry picked from commit 23944be20b288cae0b9317309c629bd4a2cea187)

commit c444b478ff6c338e6d2e160876f1173ef9779758
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 24 21:45:01 2023 +0200

    Rename mktree.in
    
    No functional change, just prepare the ground for the next commit.
    
    (cherry picked from commit c779f5d3e529ceb44c364f591f68b4ee38ad9dd2)

commit 2fa5b1932f5f9ce18e861e9d3fc8e7cee1e30bfd
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 10 19:38:54 2023 +0200

    Place TESTPROGS binaries into PATH
    
    This makes the test-suite script standalone so that it can be run from
    any location in the filesystem (provided that atlocal is adjacent to it)
    which will be useful in the next commits.
    
    (cherry picked from commit 8ff93e71fd3600ceb731d40892be88818e6e8a96)

commit 6fb6c862c9a8a4be7078ba64c29a6435dd0cd843
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 24 17:19:11 2023 +0200

    Add convenience DNF wrapper to "make env"
    
    (cherry picked from commit 3d0f2d79a874f664a962792937a4f22a27c1f800)

commit 0a3ac8c13cf4bf77f749431de6d9ec1b0a5a769d
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Thu Jul 20 16:43:00 2023 +0200

    Base per-test snapshots on the root filesystem
    
    Now that we mount a snapshot at /, we don't need the other one, so drop
    it and refer RPMTREE to the former.
    
    The snapshot must remain writable due to some of the tests launching
    programs that store temporary files outside of the test directory, e.g.
    those using run().
    
    This means per-test snapshots will now be based on a writable tree,
    however that's fine since no single test is (or ever was) supposed to
    make destructive changes to the root filesystem anyway.
    
    (cherry picked from commit cf8716f204f1eed196ca7ae905288261e0c88c3b)

commit 1c9b5243d92f7d2cacb020b5fb70fe21b317997e
Author: Michal Domonkos <mdomonko@redhat.com>
Date:   Mon Jul 17 10:37:01 2023 +0200

    Containerize the whole test-suite
