libguestfs: 1.50.1 -> 1.54.0

This commit is contained in:
lukts30 2024-10-17 20:10:35 +02:00 committed by Bjørn Forsman
parent ba1bfda1e8
commit 36b4d9dbb8
2 changed files with 67 additions and 64 deletions

View File

@ -0,0 +1,17 @@
Subject: [PATCH] Revert "perl: Pass @CFLAGS@ through extra_linker_flags"
This reverts commit be06cb048b595200bf7d1cec9684ab7958188b97.
---
--- a/perl/Build.PL.in
+++ b/perl/Build.PL.in
@@ -65,8 +65,6 @@ my $build = Module::Build->new (
'@top_srcdir@/include',
],
extra_linker_flags => [
- '-DGUESTFS_PRIVATE=1',
- split (' ', '@CFLAGS@'),
'-L@top_builddir@/lib/.libs',
'-lguestfs',
],
--
2.44.1

View File

@ -35,7 +35,7 @@
jansson,
getopt,
perlPackages,
ocaml-ng,
ocamlPackages,
libtirpc,
appliance ? null,
javaSupport ? false,
@ -45,17 +45,14 @@
assert appliance == null || lib.isDerivation appliance;
let
# GetoptLong not avaible with newer ocaml
ocamlPackages' = ocaml-ng.ocamlPackages_4_14;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libguestfs";
version = "1.50.1";
version = "1.54.0";
src = fetchurl {
url = "https://libguestfs.org/download/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz";
sha256 = "sha256-Xmhx6I+C5SHjHUQt5qELZJcCN8t5VumdEXsSO1hWWm8=";
url = "https://libguestfs.org/download/${lib.versions.majorMinor finalAttrs.version}-stable/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
sha256 = "sha256-tK+g+P1YAgXqVUjUaLxuQ8O+y5leL2DmMmVSemMFQkY=";
};
strictDeps = true;
@ -80,58 +77,43 @@ stdenv.mkDerivation rec {
GetoptLong
ModuleBuild
])
++ (with ocamlPackages'; [
++ (with ocamlPackages; [
ocaml
findlib
]);
buildInputs =
[
libxcrypt
ncurses
jansson
pcre2
augeas
libxml2
acl
libcap
libcap_ng
libconfig
systemdLibs
fuse
yajl
libvirt
gmp
readline
file
hivex
db
numactl
libapparmor
perlPackages.ModuleBuild
libtirpc
]
++ (with ocamlPackages'; [
ocamlbuild
ocaml_libvirt
gettext-stub
ounit
])
++ [
ocamlPackages'.augeas
(hivex.override { ocamlPackages = ocamlPackages'; })
]
++ lib.optional javaSupport jdk;
buildInputs = [
libxcrypt
ncurses
jansson
pcre2
augeas
libxml2
acl
libcap
libcap_ng
libconfig
systemdLibs
fuse
yajl
libvirt
gmp
readline
file
hivex
db
numactl
libapparmor
perlPackages.ModuleBuild
libtirpc
zstd
ocamlPackages.ocamlbuild
ocamlPackages.ocaml_libvirt
ocamlPackages.ounit
ocamlPackages.augeas
ocamlPackages.ocamlbuild
] ++ lib.optional javaSupport jdk;
prePatch = ''
# build-time scripts
substituteInPlace run.in --replace '#!/bin/bash' '#!${stdenv.shell}'
substituteInPlace ocaml-link.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}'
# $(OCAMLLIB) is read-only "${ocamlPackages'.ocaml}/lib/ocaml"
substituteInPlace ocaml/Makefile.am --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
substituteInPlace ocaml/Makefile.in --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
# some scripts hardcore /usr/bin/env which is not available in the build env
patchShebangs .
'';
configureFlags = [
@ -139,13 +121,17 @@ stdenv.mkDerivation rec {
"--enable-install-daemon"
"--disable-appliance"
"--with-distro=NixOS"
"--disable-perl" # build broken since 1.53.x
"--with-readline"
"CPPFLAGS=-I${lib.getDev libxml2}/include/libxml2"
"INSTALL_OCAMLLIB=${placeholder "out"}/lib/ocaml"
"--with-guestfs-path=${placeholder "out"}/lib/guestfs"
] ++ lib.optionals (!javaSupport) [ "--without-java" ];
patches = [ ./libguestfs-syms.patch ];
patches = [
./libguestfs-syms.patch
# Fixes PERL Sys-Guestfs build failure
./Revert-perl-Pass-CFLAGS-through-extra_linker_flags.patch
];
createFindlibDestdir = true;
@ -197,19 +183,19 @@ stdenv.mkDerivation rec {
runHook postInstallCheck
'';
meta = with lib; {
meta = {
description = "Tools for accessing and modifying virtual machine disk images";
license = with licenses; [
license = with lib.licenses; [
gpl2Plus
lgpl21Plus
];
homepage = "https://libguestfs.org/";
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
offline
lukts30
];
platforms = platforms.linux;
platforms = lib.platforms.linux;
# this is to avoid "output size exceeded"
hydraPlatforms = if appliance != null then appliance.meta.hydraPlatforms else platforms.linux;
hydraPlatforms = if appliance != null then appliance.meta.hydraPlatforms else lib.platforms.linux;
};
}
})