New upstream development version 5.3.1.

This commit is contained in:
Richard W.M. Jones 2021-08-26 16:46:08 +01:00
parent eb5a05494e
commit 58de4c8249
3 changed files with 8 additions and 188 deletions

View File

@ -1,180 +0,0 @@
From fd9f17c7eb63979af882533a0d234bfc8ca42de3 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 1 Feb 2021 10:07:02 +0000
Subject: [PATCH] Open Unix.LargeFile to avoid "lstat: Value too large for
defined data type".
On 32 bit platforms, because OCaml native ints are limited to 31 bits,
there is a trap in the normal Unix.stat, Unix.lstat functions where
any field in the stat struct may overflow. The result is random
errors like:
supermin: error: lstat: Value too large for defined data type: /tmp/tmp.Ss9aYEBASm/d2/root
You would probably only see this on armv7.
The OCaml Unix module has a "LargeFile" submodule which fixes this by
using int64 for some (unfortunately not all) fields.
For more information see the OCaml sources, file
otherlibs/unix/stat.c, all instances of "EOVERFLOW".
---
src/format_chroot.ml | 1 +
src/format_ext2.ml | 1 +
src/format_ext2_initrd.ml | 1 +
src/format_ext2_kernel.ml | 5 +++--
src/mode_build.ml | 1 +
src/package_handler.ml | 1 +
src/ph_dpkg.ml | 1 +
src/ph_pacman.ml | 1 +
src/ph_rpm.ml | 1 +
src/supermin.ml | 1 +
src/utils.ml | 1 +
11 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/format_chroot.ml b/src/format_chroot.ml
index 346c24b..34606f7 100644
--- a/src/format_chroot.ml
+++ b/src/format_chroot.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/format_ext2.ml b/src/format_ext2.ml
index 6348c29..e311ea6 100644
--- a/src/format_ext2.ml
+++ b/src/format_ext2.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/format_ext2_initrd.ml b/src/format_ext2_initrd.ml
index 38977e6..6268442 100644
--- a/src/format_ext2_initrd.ml
+++ b/src/format_ext2_initrd.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/format_ext2_kernel.ml b/src/format_ext2_kernel.ml
index 98bff3a..3be4413 100644
--- a/src/format_ext2_kernel.ml
+++ b/src/format_ext2_kernel.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
@@ -95,8 +96,8 @@ and find_kernel_from_lib_modules debug =
let kernels =
filter_map (
fun kernel_file ->
- let size = try (stat kernel_file).st_size with Unix_error _ -> 0 in
- if size < 10000 then None
+ let size = try (stat kernel_file).st_size with Unix_error _ -> 0L in
+ if size < 10000_L then None
else (
let kernel_name = Filename.basename kernel_file in
let modpath = Filename.dirname kernel_file in
diff --git a/src/mode_build.ml b/src/mode_build.ml
index ed47366..ff7733e 100644
--- a/src/mode_build.ml
+++ b/src/mode_build.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/package_handler.ml b/src/package_handler.ml
index 0409438..f0d6db3 100644
--- a/src/package_handler.ml
+++ b/src/package_handler.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/ph_dpkg.ml b/src/ph_dpkg.ml
index 1e785de..6d4fce1 100644
--- a/src/ph_dpkg.ml
+++ b/src/ph_dpkg.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/ph_pacman.ml b/src/ph_pacman.ml
index 67f7512..50500a5 100644
--- a/src/ph_pacman.ml
+++ b/src/ph_pacman.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/ph_rpm.ml b/src/ph_rpm.ml
index 9745efd..183b5f3 100644
--- a/src/ph_rpm.ml
+++ b/src/ph_rpm.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Utils
diff --git a/src/supermin.ml b/src/supermin.ml
index e923111..9f838d9 100644
--- a/src/supermin.ml
+++ b/src/supermin.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
open Types
diff --git a/src/utils.ml b/src/utils.ml
index b25df88..f5990ef 100644
--- a/src/utils.ml
+++ b/src/utils.ml
@@ -17,6 +17,7 @@
*)
open Unix
+open Unix.LargeFile
open Printf
let (+^) = Int64.add
--
2.29.0.rc2

View File

@ -1,2 +1,2 @@
SHA512 (supermin-5.2.1.tar.gz) = f10ea404e0b27238ea3c25cb68f44e716aa180a45a420e63c1958768032f0710e8e3e7f1346cda780ea1f916f499499da2c02df4019d91ea3b3a69b75cfda545
SHA512 (supermin-5.2.1.tar.gz.sig) = bde7907ea61e8bb3e59fac235c7bd8e22ef2e16831b80344c4574fdff873a5fc8b8972716143ee9d9bd745ac99b72f11aa4530a8d184a3f287b3212ef85c7a13
SHA512 (supermin-5.3.1.tar.gz) = c904f62c46941cd7e1d19abd5e82491c46f40333faac4a131439cb2d95ec78ad38c227dadbbedd83317283b11d29d603fc65d2d5fe095d37bbd89e7e212f3e8a
SHA512 (supermin-5.3.1.tar.gz.sig) = e35f300a206316ab8379261318967330a01cd1b8edd63a4185eb9965c74370a4ddda1a93f8668ff5c6984a01e573d1a761d5f91e3382322e36d8853320993a11

View File

@ -24,12 +24,12 @@
%global verify_tarball_signature 1
# The source directory.
%global source_directory 5.2-stable
%global source_directory 5.3-development
Summary: Tool for creating supermin appliances
Name: supermin
Version: 5.2.1
Release: 4%{?dist}
Version: 5.3.1
Release: 1%{?dist}
License: GPLv2+
ExclusiveArch: %{kernel_arches}
@ -44,9 +44,6 @@ Source1: http://download.libguestfs.org/supermin/%{source_directory}/%{nam
# Keyring used to verify tarball signature.
Source2: libguestfs.keyring
# Upstream fix for stat field overflow on armv7.
Patch1: 0001-Open-Unix.LargeFile-to-avoid-lstat-Value-too-large-f.patch
BuildRequires: make
BuildRequires: /usr/bin/pod2man
BuildRequires: /usr/bin/pod2html
@ -168,6 +165,9 @@ make check || {
%changelog
* Thu Aug 26 2021 Richard W.M. Jones <rjones@redhat.com> - 5.3.1-1
- New upstream development version 5.3.1.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild