rpm: 4.18.1 -> 4.20.0 (#354695)

authored by Arthur Gautier and committed by GitHub 28bebcb0 feee132c

+68 -75
+48 -73
pkgs/tools/package-management/rpm/default.nix
··· 1 1 { stdenv 2 2 , lib 3 3 , pkg-config 4 - , autoreconfHook 5 - , pandoc 6 - , fetchpatch2 4 + , cmake 7 5 , fetchurl 8 - , cpio 9 6 , zlib 10 7 , bzip2 11 8 , file 12 9 , elfutils 13 - , libbfd 14 - , libgcrypt 15 10 , libarchive 16 - , nspr 17 - , nss 11 + , readline 12 + , audit 18 13 , popt 19 - , db 20 14 , xz 21 - , python 15 + , python3 22 16 , lua 23 17 , llvmPackages 24 18 , sqlite ··· 26 20 , libcap 27 21 , apple-sdk_13 28 22 , darwinMinVersionHook 23 + , openssl 24 + #, libselinux 25 + , rpm-sequoia 26 + , gettext 27 + , systemd 28 + , bubblewrap 29 + , autoconf 29 30 , gnupg 30 31 }: 31 32 32 33 stdenv.mkDerivation rec { 33 34 pname = "rpm"; 34 - version = "4.18.1"; 35 + version = "4.20.0"; 35 36 36 37 src = fetchurl { 37 38 url = "https://ftp.osuosl.org/pub/rpm/releases/rpm-${lib.versions.majorMinor version}.x/rpm-${version}.tar.bz2"; 38 - hash = "sha256-N/O0LAlmlB4q0/EP3jY5gkplkdBxl7qP0IacoHeeH1Y="; 39 + hash = "sha256-Vv92OM/5i1bUp1A/9ZvHnygabd/82g0jjAgr7ftfvns="; 39 40 }; 40 41 41 - patches = [ 42 - # Resolves `error: expected expression` on clang 43 - # See: https://github.com/rpm-software-management/rpm/issues/2435. 44 - (fetchpatch2 { 45 - url = "https://github.com/rpm-software-management/rpm/commit/b960c0b43a080287a7c13533eeb2d9f288db1414.diff?full_index=1"; 46 - hash = "sha256-0f7YOL2xR07xgAEN32oRbOjPsAsVmKFVtTLXUOeFAa8="; 47 - }) 48 - # Fix missing includes required to build on Darwin. 49 - # See: https://github.com/rpm-software-management/rpm/pull/2571. 50 - (fetchpatch2 { 51 - url = "https://github.com/rpm-software-management/rpm/commit/f07875392a09228b1a25c1763a50bbbd0f6798c2.diff?full_index=1"; 52 - hash = "sha256-DLpzMApRCgI9zqheglFtqL8E1vq9X/aQa0HMnIAQgk8="; 53 - }) 54 - (fetchpatch2 { 55 - url = "https://github.com/rpm-software-management/rpm/commit/b2e67642fd8cb64d8cb1cca9e759396c1c10807d.diff?full_index=1"; 56 - hash = "sha256-q3fIBfiUJVmw6Vi2/Bo/zX6/cqTM7aFnskKfMVK3DlU="; 57 - }) 42 + postPatch = '' 43 + sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python3.sitePackages}#' python/CMakeLists.txt 44 + sed -i 's#PATHS ENV MYPATH#PATHS ENV PATH#' CMakeLists.txt 45 + ''; 46 + 47 + outputs = [ 48 + "out" "man" 49 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ 50 + "dev" 58 51 ]; 59 - 60 - outputs = [ "out" "dev" "man" ]; 61 52 separateDebugInfo = true; 62 53 63 - nativeBuildInputs = [ autoreconfHook pkg-config pandoc ]; 64 - buildInputs = [ cpio zlib zstd bzip2 file libarchive libgcrypt nspr nss db xz python lua sqlite gnupg ] 54 + nativeBuildInputs = [ cmake pkg-config autoconf python3 gettext ] 55 + ++ lib.optionals stdenv.hostPlatform.isLinux [ bubblewrap ]; 56 + buildInputs = [ bzip2 zlib zstd file libarchive xz lua sqlite openssl readline rpm-sequoia gnupg ] 65 57 ++ lib.optional stdenv.cc.isClang llvmPackages.openmp 66 - ++ lib.optional stdenv.hostPlatform.isLinux libcap 58 + ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap audit systemd ] 67 59 ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_13 (darwinMinVersionHook "13.0") ]; 68 60 69 - # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements 70 - propagatedBuildInputs = [ popt nss db bzip2 libarchive libbfd ] 71 - ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform elfutils) elfutils; 72 - 73 - env.NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; 74 - 75 - configureFlags = [ 76 - "--with-external-db" 77 - "--with-lua" 78 - "--enable-python" 79 - "--enable-ndb" 80 - "--enable-sqlite" 81 - "--enable-zstd" 82 - "--localstatedir=/var" 83 - "--sharedstatedir=/com" 84 - ] ++ lib.optional stdenv.hostPlatform.isLinux "--with-cap"; 85 - 86 - postPatch = '' 87 - substituteInPlace Makefile.am --replace '@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp' "" 88 - ''; 61 + patches = lib.optionals stdenv.hostPlatform.isDarwin [ 62 + ./sighandler_t-macos.patch 63 + ]; 89 64 90 - preFixup = '' 91 - # Don't keep a reference to RPM headers or manpages 92 - for f in $out/lib/rpm/platform/*/macros; do 93 - substituteInPlace $f --replace "$dev" "/rpm-dev-path-was-here" 94 - substituteInPlace $f --replace "$man" "/rpm-man-path-was-here" 95 - done 96 - 97 - # Avoid macros like '%__ld' pointing to absolute paths 98 - for tool in ld nm objcopy objdump strip; do 99 - sed -i $out/lib/rpm/macros -e "s/^%__$tool.*/%__$tool $tool/" 100 - done 65 + cmakeFlags = [ 66 + "-DWITH_DBUS=OFF" 67 + # libselinux is missing propagatedBuildInputs 68 + "-DWITH_SELINUX=OFF" 69 + ] ++ lib.optionals stdenv.hostPlatform.isLinux [ 70 + "-DMKTREE_BACKEND=rootfs" 71 + ] ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ 72 + # Test suite rely on either podman or bubblewrap 73 + "-DENABLE_TESTSUITE=OFF" 101 74 102 - # Avoid helper scripts pointing to absolute paths 103 - for tool in find-provides find-requires; do 104 - sed -i $out/lib/rpm/$tool -e "s#/usr/lib/rpm/#$out/lib/rpm/#" 105 - done 75 + "-DWITH_CAP=OFF" 76 + "-DWITH_AUDIT=OFF" 77 + "-DWITH_ACL=OFF" 78 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 79 + "-DWITH_LIBELF=OFF" 80 + "-DWITH_LIBDW=OFF" 81 + ]; 106 82 107 - # symlinks produced by build are incorrect 108 - ln -sf $out/bin/{rpm,rpmquery} 109 - ln -sf $out/bin/{rpm,rpmverify} 110 - ''; 83 + # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements 84 + propagatedBuildInputs = [ popt ] 85 + ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform elfutils) elfutils; 111 86 112 87 enableParallelBuilding = true; 113 88
+19
pkgs/tools/package-management/rpm/sighandler_t-macos.patch
··· 1 + Revert "signal() returns sighandler_t, not void *" 2 + 3 + sadly, on darwin, sighandler_t is not defined 4 + 5 + This reverts commit 7bb4dfd0bcadc7c6177d6fe88a4bcccf7fac98b9 6 + 7 + diff --git a/build/rpmfc.c b/build/rpmfc.c 8 + index 86dd36d14..48643a321 100644 9 + --- a/build/rpmfc.c 10 + +++ b/build/rpmfc.c 11 + @@ -295,7 +295,7 @@ static int getOutputFrom(ARGV_t argv, 12 + return -1; 13 + } 14 + 15 + - sighandler_t oldhandler = signal(SIGPIPE, SIG_IGN); 16 + + void *oldhandler = signal(SIGPIPE, SIG_IGN); 17 + 18 + child = fork(); 19 + if (child < 0) {
-1
pkgs/top-level/all-packages.nix
··· 5210 5210 rosenpass-tools = callPackage ../tools/networking/rosenpass/tools.nix { }; 5211 5211 5212 5212 rpm = callPackage ../tools/package-management/rpm { 5213 - python = python3; 5214 5213 lua = lua5_4; 5215 5214 }; 5216 5215
+1 -1
pkgs/top-level/python-packages.nix
··· 14023 14023 rply = callPackage ../development/python-modules/rply { }; 14024 14024 14025 14025 rpm = toPythonModule (pkgs.rpm.override { 14026 - inherit python; 14026 + python3 = self.python; 14027 14027 }); 14028 14028 14029 14029 rpmfile = callPackage ../development/python-modules/rpmfile { };