Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ee6f82f
Remove libreport support from mdadm
oliviacrain Jan 21, 2022
f6ac607
Conditionally pull in perl-Sys-Virt test deps
oliviacrain Jan 21, 2022
7a7b367
Fix dependency resolution for ocaml-ctypes
oliviacrain Jan 21, 2022
5f49edd
Upgrade to latest ocaml-gettext
oliviacrain Jan 21, 2022
e1fe4f8
Fix ocaml-ounit build
oliviacrain Jan 21, 2022
ba72d23
Upgrade ocaml-base to latest
oliviacrain Jan 21, 2022
48edd08
Upgrade ocaml-migrate-parsetree to latest
oliviacrain Jan 21, 2022
9f89efa
Upgrade ocaml-stdio to 0.15.0
oliviacrain Jan 21, 2022
573efda
Upgrade ocaml-parsexp to 0.15.0
oliviacrain Jan 21, 2022
8ef2b51
Upgrade ocaml-ppxlib to 0.24.0
oliviacrain Jan 21, 2022
c49e687
Upgrade ocaml-sexplib to 0.15.0
oliviacrain Jan 21, 2022
b008d1c
Upgrade ocaml-sexplib0 to 0.15.0
oliviacrain Jan 21, 2022
4a5354c
Upgrade supermin to 5.2.1
oliviacrain Jan 21, 2022
b475400
Fixup libguestfs patches and configuration
oliviacrain Jan 21, 2022
b4eddcc
Remove gpgcheck, re-add check section in supermin
oliviacrain Jan 21, 2022
4757d5f
Remove git BR from perl-Sys-Virt
oliviacrain Jan 21, 2022
6663f57
Add comment on thread kill atch in ocaml-ounit
oliviacrain Jan 21, 2022
b6c02b9
libguestfs requested changes
oliviacrain Jan 21, 2022
c198cd7
Typo fix, gitignore addition, remove archive
oliviacrain Jan 21, 2022
d2c7907
Remove source1 in supermin
oliviacrain Jan 21, 2022
52ed6c8
Remove sig from supermin json
oliviacrain Jan 21, 2022
39187ff
libguestfs sigs fix
oliviacrain Jan 21, 2022
46f3f22
Fix supermin json
oliviacrain Jan 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions SPECS-EXTENDED/libguestfs/libguestfs-config-rpm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 3950979b8f49a743ac976551b16284340539d6df Mon Sep 17 00:00:00 2001
From: Alexandre Iooss <[email protected]>
Date: Fri, 27 Aug 2021 16:47:24 +0200
Subject: [PATCH] build: Define HAVE_RPM, HAVE_DPKG and HAVE_PACMAN

When using option `--with-distro`, `HAVE_RPM`, `HAVE_DPKG` and
`HAVE_PACMAN` are not defined and make the configure phase fail.
This makes sure that these conditionals are always defined.

(cherry picked from commit 210959cc344d6a4a1e3afa26d276b130651def74)
---
m4/guestfs-appliance.m4 | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/m4/guestfs-appliance.m4 b/m4/guestfs-appliance.m4
index 8b9ddcb5d..66aea5f98 100644
--- a/m4/guestfs-appliance.m4
+++ b/m4/guestfs-appliance.m4
@@ -114,16 +114,16 @@ AC_ARG_WITH([distro],
AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO])
fi
]
- AM_CONDITIONAL([HAVE_RPM],
- [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
- [*], [false])])
- AM_CONDITIONAL([HAVE_DPKG],
- [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
- [*], [false])])
- AM_CONDITIONAL([HAVE_PACMAN],
- [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
- [*], [false])])
)
+AM_CONDITIONAL([HAVE_RPM],
+ [AS_CASE([$DISTRO], [REDHAT | SUSE | OPENMANDRIVA | MAGEIA ], [true],
+ [*], [false])])
+AM_CONDITIONAL([HAVE_DPKG],
+ [AS_CASE([$DISTRO], [DEBIAN | UBUNTU ], [true],
+ [*], [false])])
+AM_CONDITIONAL([HAVE_PACMAN],
+ [AS_CASE([$DISTRO], [ARCHLINUX | FRUGALWARE ], [true],
+ [*], [false])])
AC_SUBST([DISTRO])

dnl Add extra packages to the appliance.
32 changes: 32 additions & 0 deletions SPECS-EXTENDED/libguestfs/libguestfs-ocaml413compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From cc4ecbe236914f9b391ecf3815008547472632f8 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <[email protected]>
Date: Tue, 2 Mar 2021 10:39:15 +0000
Subject: [PATCH] mlstdutils/std_utils.ml: Fix for OCaml 4.12.

We were using a default function from somewhere called "compare"
instead of the actual function (Pervasives.compare / Stdlib.compare).
Since the wrong default function was used it had a different type from
what we expected:

File "std_utils.ml", line 312, characters 36-37:
312 | | (y, y') :: _ when cmp x y = 0 -> y'
^
Error: This expression has type int but an expression was expected of type
'weak1 list -> int
---
common/mlstdutils/std_utils.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml
index 4237ea5..8847717 100644
--- a/common/mlstdutils/std_utils.ml
+++ b/common/mlstdutils/std_utils.ml
@@ -307,7 +307,7 @@ module List = struct
| x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs
| _ -> invalid_arg "combine3"

- let rec assoc_lbl ?(cmp = compare) ~default x = function
+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
| [] -> default
| (y, y') :: _ when cmp x y = 0 -> y'
| _ :: ys -> assoc_lbl ~cmp ~default x ys
2 changes: 1 addition & 1 deletion SPECS-EXTENDED/libguestfs/libguestfs.signatures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"copy-patches.sh": "9e0112d9b85f80f48697ffefbb6cc3a1eda527ea5ff065f48e08440dfba573e8",
"guestfish.sh": "5efae0e6b38c7a137265bc1f3988dc9734a99a08a87ffbcfa1715aefe3982d29",
"libguestfs-1.44.0.tar.gz": "0ec7b44a4c50e928583c56099da31ceb9680766043bd7d468f3ca7b741c55d21",
"yum.conf.in": "b391659cc5cd6ce3b48613429aaec4fab26543fb0b185d03597613475cd34755"
"yum.conf.in": "2ca1e0ea6814436211715f14975e211263db10f09fca1fdef51c5aa3fe52a357"
}
}
106 changes: 34 additions & 72 deletions SPECS-EXTENDED/libguestfs/libguestfs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ Distribution: Mariner
# Unbreak the linker.
%undefine _strict_symbol_defs_build

%bcond_with applicances
%bcond_without applicances
%bcond_with php
%bcond_with inspect-icons

Summary: Access and modify virtual machine disk images
Name: libguestfs
Version: 1.44.0
Release: 2%{?dist}
Release: 4%{?dist}
License: LGPLv2+

# Source and patches.
Expand All @@ -60,6 +62,10 @@ Source6: yum.conf.in
# Maintainer script which helps with handling patches.
Source8: copy-patches.sh

# Upstream patches not present in 1.44.0
Patch0: libguestfs-ocaml413compat.patch
Patch1: libguestfs-config-rpm.patch

%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
%endif
Expand Down Expand Up @@ -99,7 +105,9 @@ BuildRequires: xz-devel
BuildRequires: zip
BuildRequires: unzip
BuildRequires: systemd-units
%if %{with inspect-icons}
BuildRequires: netpbm-progs
%endif
BuildRequires: icoutils
BuildRequires: libvirt-daemon-kvm >= 5.3.0
BuildRequires: perl(Expect)
Expand Down Expand Up @@ -187,11 +195,9 @@ BuildRequires: genisoimage
BuildRequires: gfs2-utils
BuildRequires: grep
BuildRequires: gzip
BuildRequires: hfsplus-tools
BuildRequires: hivex
BuildRequires: iproute
BuildRequires: iputils
BuildRequires: jfsutils
BuildRequires: kernel
BuildRequires: kmod
BuildRequires: kpartx
Expand All @@ -205,7 +211,6 @@ BuildRequires: lsscsi
BuildRequires: lvm2
BuildRequires: lzop
BuildRequires: mdadm
BuildRequires: nilfs-utils
BuildRequires: ntfs-3g ntfsprogs ntfs-3g-system-compression
BuildRequires: openssh-clients
BuildRequires: parted
Expand All @@ -215,7 +220,6 @@ BuildRequires: policycoreutils
BuildRequires: procps
BuildRequires: psmisc
BuildRequires: qemu-img
BuildRequires: reiserfs-utils
BuildRequires: rsync
BuildRequires: scrub
BuildRequires: sed
Expand Down Expand Up @@ -323,11 +327,7 @@ For enhanced features, install:

libguestfs-forensics adds filesystem forensics support
libguestfs-gfs2 adds Global Filesystem (GFS2) support
libguestfs-hfsplus adds HFS+ (Mac filesystem) support
libguestfs-inspect-icons adds support for inspecting guest icons
libguestfs-jfs adds JFS support
libguestfs-nilfs adds NILFS v2 support
libguestfs-reiserfs adds ReiserFS support
libguestfs-rescue enhances virt-rescue shell with more tools
libguestfs-rsync rsync to/from guest filesystems
libguestfs-ufs adds UFS (BSD) support
Expand Down Expand Up @@ -385,47 +385,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}

%description gfs2
This adds GFS2 support to %{name}. Install it if you want to process
disk images containing GFS2.


%package hfsplus
Summary: HFS+ support for %{name}
License: LGPLv2+
Requires: %{name}%{?_isa} = %{version}-%{release}

%description hfsplus
This adds HFS+ support to %{name}. Install it if you want to process
disk images containing HFS+ / Mac OS Extended filesystems.


%package jfs
Summary: JFS support for %{name}
License: LGPLv2+
Requires: %{name}%{?_isa} = %{version}-%{release}

%description jfs
This adds JFS support to %{name}. Install it if you want to process
disk images containing JFS.


%package nilfs
Summary: NILFS support for %{name}
License: LGPLv2+
Requires: %{name}%{?_isa} = %{version}-%{release}

%description nilfs
This adds NILFS v2 support to %{name}. Install it if you want to process
disk images containing NILFS v2.


%package reiserfs
Summary: ReiserFS support for %{name}
License: LGPLv2+
Requires: %{name}%{?_isa} = %{version}-%{release}

%description reiserfs
This adds ReiserFS support to %{name}. Install it if you want to process
disk images containing ReiserFS.
disk images containing GFS2.Exiting due to strict setting


%package rescue
Expand Down Expand Up @@ -480,6 +440,7 @@ disk images containing ZFS.
%endif


%if %{with inspect-icons}
%package inspect-icons
Summary: Additional dependencies for inspecting guest icons
License: LGPLv2+
Expand All @@ -497,6 +458,7 @@ inspect non-Linux guests and display icons from them.

The only reason this is a separate package is to avoid core libguestfs
having to depend on Perl. See https://bugzilla.redhat.com/1194158
%endif


%package tools-c
Expand Down Expand Up @@ -809,10 +771,18 @@ fi
mv README README.orig
sed 's/@VERSION@/%{version}/g' < %{SOURCE4} > README

mkdir cachedir repo
find /var/cache/{dnf,tdnf} -type f -name '*.rpm' -print0 | \
xargs -0 -n 1 cp -t repo
createrepo_c repo
sed -e "s|@PWD@|$(pwd)|" %{SOURCE6} > yum.conf


%build
%{configure} \
PYTHON=%{__python3} \
--with-distro=REDHAT \
--with-supermin-packager-config=$(pwd)/yum.conf \
--with-default-backend=libvirt \
--with-qemu="qemu-system-%{_build_arch} qemu" \
--disable-php \
Expand Down Expand Up @@ -912,16 +882,11 @@ function move_to
}

move_to curl zz-packages-dib
move_to debootstrap zz-packages-dib
move_to kpartx zz-packages-dib
move_to qemu-img zz-packages-dib
move_to which zz-packages-dib
move_to sleuthkit zz-packages-forensics
move_to gfs2-utils zz-packages-gfs2
move_to hfsplus-tools zz-packages-hfsplus
move_to jfsutils zz-packages-jfs
move_to nilfs-utils zz-packages-nilfs
move_to reiserfs-utils zz-packages-reiserfs
move_to iputils zz-packages-rescue
move_to lsof zz-packages-rescue
move_to openssh-clients zz-packages-rescue
Expand All @@ -934,10 +899,6 @@ move_to xfsprogs zz-packages-xfs
move_to zfs-fuse zz-packages-zfs
%endif

# On Fedora you need kernel-modules-extra to be able to mount
# UFS (BSD) filesystems.
echo "kernel-modules-extra" > zz-packages-ufs

popd
%endif

Expand Down Expand Up @@ -1008,18 +969,6 @@ rm ocaml/html/.gitignore
%files gfs2
%{_libdir}/guestfs/supermin.d/zz-packages-gfs2

%files hfsplus
%{_libdir}/guestfs/supermin.d/zz-packages-hfsplus

%files jfs
%{_libdir}/guestfs/supermin.d/zz-packages-jfs

%files nilfs
%{_libdir}/guestfs/supermin.d/zz-packages-nilfs

%files reiserfs
%{_libdir}/guestfs/supermin.d/zz-packages-reiserfs

%files rsync
%{_libdir}/guestfs/supermin.d/zz-packages-rsync

Expand All @@ -1039,8 +988,10 @@ rm ocaml/html/.gitignore

%endif

%if %{with inspect-icons}
%files inspect-icons
# no files
%endif

%files tools-c
%doc README
Expand Down Expand Up @@ -1230,6 +1181,17 @@ rm ocaml/html/.gitignore


%changelog
* Thu Jan 20 2022 Thomas Crain <[email protected]> - 1.44.0-4
- Patch ocaml support, RPM config support
- Disable inspect-icons support by default (we don't have ghostscript)
- Remove reiserfs, nilfs, jfs, hfsplus completely

* Tue Jan 18 2022 Thomas Crain <[email protected]> - 1.44.0-3
- Remove Fedora-specific comments/macros
- Remove link to highjacked upstream bug tracker
- Conditionally include PHP deps (off by default)
- License verified

* Thu Sep 30 2021 Thomas Crain <[email protected]> - 1.44.0-2
- Initial CBL-Mariner import from Fedora 33 (license: MIT).
- Remove epoch
Expand Down
1 change: 0 additions & 1 deletion SPECS-EXTENDED/libguestfs/yum.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ modulesdir=@PWD@/modules
[local]
name=local
baseurl=file://@PWD@/repo
failovermethod=priority
enabled=1
gpgcheck=0
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Summary: Convert OCaml parsetrees between different major versions

License: LGPLv2+ with exceptions
URL: https://github.com/ocaml-ppx/ocaml-migrate-parsetree
Source0: https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v%{version/%{name}-%{version}.tbz
Source0: https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v%{version}/%{name}-%{version}.tbz

BuildRequires: ocaml
BuildRequires: ocaml-dune
Expand Down