diff --git a/virt-top-1.1.1-ocaml-bytecode.patch b/virt-top-1.1.1-ocaml-bytecode.patch new file mode 100644 index 0000000..d156272 --- /dev/null +++ b/virt-top-1.1.1-ocaml-bytecode.patch @@ -0,0 +1,28 @@ +--- virt-top-1.1.1/configure.orig 2021-11-03 14:18:26.000000000 -0600 ++++ virt-top-1.1.1/configure 2023-07-10 12:31:15.525435684 -0600 +@@ -5357,7 +5357,7 @@ else + OCAMLOPT="$ac_cv_prog_OCAMLOPT" + fi + +- OCAMLBEST=byte ++ OCAMLBEST=ocamlc + if test "$OCAMLOPT" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5 + $as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;} +--- virt-top-1.1.1/ocaml-link.sh.in.orig 2021-11-03 06:00:07.000000000 -0600 ++++ virt-top-1.1.1/ocaml-link.sh.in 2023-07-10 12:31:41.012064849 -0600 +@@ -49,10 +49,12 @@ if [ x"${V:-@AM_DEFAULT_VERBOSITY@}" = x + echo "$@" \ + @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ + -linkpkg \ +- -cclib "'@LDFLAGS@ $cclib'" ++ -cclib "'@LDFLAGS@ $cclib'" \ ++ -output-complete-exe + fi + # NB -cclib must come last. + exec "$@" \ + @OCAML_RUNTIME_VARIANT_PIC_OPTION@ \ + -linkpkg \ +- -cclib "@LDFLAGS@ $cclib" ++ -cclib "@LDFLAGS@ $cclib" \ ++ -output-complete-exe diff --git a/virt-top.spec b/virt-top.spec index e4cfba6..4d8f617 100644 --- a/virt-top.spec +++ b/virt-top.spec @@ -1,7 +1,6 @@ -%undefine _package_note_flags Name: virt-top Version: 1.1.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Utility like top(1) for displaying virtualization stats License: GPL-2.0-or-later @@ -28,6 +27,9 @@ Patch1: virt-top-1.0.9-processcsv-documentation.patch # Fix "Input/output error" in journal (RHBZ#2148798) Patch2: 0001-virt-top-fix-to-explicitly-disconnect-from-libvirtd.patch +# Fix linking problems on bytecode-only architectures +Patch3: virt-top-1.1.1-ocaml-bytecode.patch + BuildRequires: gcc BuildRequires: make BuildRequires: ocaml >= 3.10.2 @@ -65,9 +67,15 @@ different virtualization systems. %setup -q %if 0%{?rhel} >= 6 -%patch1 -p1 +%patch -P1 -p1 %endif -%patch2 -p1 +%patch -P2 -p1 +%ifnarch %{ocaml_native_compiler} +%patch -P3 -p1 +%endif + +# "ocamlfind byte" has been removed as an alias +sed -i 's/\(OCAMLBEST=\)byte/\1ocamlc/' configure %build @@ -106,7 +114,8 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %files -f %{name}.lang -%doc COPYING README TODO +%doc README TODO +%license COPYING %{_bindir}/virt-top %{_mandir}/man1/virt-top.1* %if 0%{?rhel} >= 6 @@ -116,6 +125,12 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/ %changelog +* Mon Jul 10 2023 Jerry James - 1.1.1-11 +- OCaml 5.0.0 rebuild +- Add patch to fix linking on bytecode-only architectures +- Update deprecated %%patchN usage +- Use %%license macro + * Mon Jun 05 2023 Richard W.M. Jones - 1.1.1-10 - Migrated to SPDX license