New upstream version 5.1.15.
- Remove all patches, since they are now included in this version. - Enable dietlibc, remove glibc-static, xz-static, zlib-static.
This commit is contained in:
parent
62fb9f7a85
commit
dedcae0bcd
@ -1,75 +0,0 @@
|
|||||||
From 7cff794d82076df70dde7a851937fc7bf93fdf44 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Tue, 12 Jan 2016 11:07:57 +0000
|
|
||||||
Subject: [PATCH 1/4] bin2s: Remove _size, since it can be computed from _start
|
|
||||||
and _end.
|
|
||||||
|
|
||||||
Also declare the _start and _end as uint8_t instead of char, since
|
|
||||||
they refer to an array of bytes.
|
|
||||||
|
|
||||||
See discussion here:
|
|
||||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809185
|
|
||||||
---
|
|
||||||
src/bin2s.pl | 8 --------
|
|
||||||
src/ext2init-c.c | 5 +++--
|
|
||||||
2 files changed, 3 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/bin2s.pl b/src/bin2s.pl
|
|
||||||
index db6db26..8558126 100755
|
|
||||||
--- a/src/bin2s.pl
|
|
||||||
+++ b/src/bin2s.pl
|
|
||||||
@@ -39,7 +39,6 @@ print $ofh <<"EOF";
|
|
||||||
|
|
||||||
\t.globl\t_binary_${infile}_start
|
|
||||||
\t.globl\t_binary_${infile}_end
|
|
||||||
-\t.globl\t_binary_${infile}_size
|
|
||||||
|
|
||||||
\t.section\t.rodata
|
|
||||||
_binary_${infile}_start:
|
|
||||||
@@ -55,14 +54,7 @@ die "read $infile (at offset $sz): $!\n" if not defined $i;
|
|
||||||
close $ifh;
|
|
||||||
|
|
||||||
print $ofh <<"EOF";
|
|
||||||
-
|
|
||||||
_binary_${infile}_end:
|
|
||||||
-
|
|
||||||
-#if defined(__hppa__)
|
|
||||||
-\t_binary_${infile}_size: .equ $sz
|
|
||||||
-#else
|
|
||||||
-\t.equ _binary_${infile}_size, $sz
|
|
||||||
-#endif
|
|
||||||
EOF
|
|
||||||
|
|
||||||
close $ofh;
|
|
||||||
diff --git a/src/ext2init-c.c b/src/ext2init-c.c
|
|
||||||
index c310ed2..66ad254 100644
|
|
||||||
--- a/src/ext2init-c.c
|
|
||||||
+++ b/src/ext2init-c.c
|
|
||||||
@@ -20,6 +20,7 @@
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
+#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <caml/alloc.h>
|
|
||||||
@@ -28,14 +29,14 @@
|
|
||||||
/* The init binary.
|
|
||||||
* See: bin2s.pl, init.c.
|
|
||||||
*/
|
|
||||||
-extern char _binary_init_start, _binary_init_end, _binary_init_size;
|
|
||||||
+extern uint8_t _binary_init_start, _binary_init_end;
|
|
||||||
|
|
||||||
value
|
|
||||||
supermin_binary_init (value unitv)
|
|
||||||
{
|
|
||||||
CAMLparam1 (unitv);
|
|
||||||
CAMLlocal1 (sv);
|
|
||||||
- size_t n = (size_t) &_binary_init_size;
|
|
||||||
+ size_t n = &_binary_init_end - &_binary_init_start;
|
|
||||||
|
|
||||||
sv = caml_alloc_string (n);
|
|
||||||
memcpy (String_val (sv), &_binary_init_start, n);
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 53a113ee3ada2e2aea586a62c258e5bb46ca32d5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Tue, 12 Jan 2016 19:02:44 +0000
|
|
||||||
Subject: [PATCH 2/4] dnf: Ignore global exclude setting when downloading
|
|
||||||
packages.
|
|
||||||
|
|
||||||
When you use `dnf download', it obeys the exclude settings in
|
|
||||||
`/etc/dnf/dnf.conf'. This is a problem if the user has excluded some
|
|
||||||
broken packages from being installed on the host, but still wants to
|
|
||||||
build libguestfs.
|
|
||||||
|
|
||||||
Use the --disableexcludes=all option to override this behaviour.
|
|
||||||
---
|
|
||||||
src/rpm.ml | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/rpm.ml b/src/rpm.ml
|
|
||||||
index 1db47b6..cf6341c 100644
|
|
||||||
--- a/src/rpm.ml
|
|
||||||
+++ b/src/rpm.ml
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
(* supermin 5
|
|
||||||
- * Copyright (C) 2009-2014 Red Hat Inc.
|
|
||||||
+ * Copyright (C) 2009-2016 Red Hat Inc.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
@@ -334,7 +334,7 @@ and fedora_download_all_packages_with_dnf pkgs dir tdir =
|
|
||||||
let rpms = pkgs_as_NA_rpms pkgs in
|
|
||||||
|
|
||||||
let cmd =
|
|
||||||
- sprintf "%s download%s%s --destdir %s %s"
|
|
||||||
+ sprintf "%s download%s%s --destdir=%s --disableexcludes=all %s"
|
|
||||||
Config.dnf
|
|
||||||
(if !settings.debug >= 1 then " -v" else " -q")
|
|
||||||
(match !settings.packager_config with
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From d763aa475d15b1ec5edb368039244ca21ff08928 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
||||||
Date: Thu, 14 Jan 2016 13:58:10 +0000
|
|
||||||
Subject: [PATCH 3/4] docs: Mention using dnf builddep command on Fedora,
|
|
||||||
yum-builddep on RHEL.
|
|
||||||
|
|
||||||
See: https://bugzilla.redhat.com/show_bug.cgi?id=1297606
|
|
||||||
---
|
|
||||||
README | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/README b/README
|
|
||||||
index b8ad550..34949a2 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -58,8 +58,8 @@ For Fedora/RHEL:
|
|
||||||
librpm
|
|
||||||
yumdownloader (from yum-utils) or 'dnf download' plugin
|
|
||||||
|
|
||||||
- NB: On Fedora, use `yum-builddep supermin' to install all the
|
|
||||||
- dependencies.
|
|
||||||
+ NB: On RHEL, use `yum-builddep supermin' to install all the
|
|
||||||
+ dependencies. On Fedora use `dnf builddep supermin'.
|
|
||||||
|
|
||||||
For Debian/Ubuntu:
|
|
||||||
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
From 7798f601b766adc55b98d3da726c50fe32060e4a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pino Toscano <ptoscano@redhat.com>
|
|
||||||
Date: Fri, 22 Jan 2016 17:35:27 +0100
|
|
||||||
Subject: [PATCH 4/4] ext2: check for needed block size
|
|
||||||
|
|
||||||
Check early that there are enough free blocks to store each file,
|
|
||||||
erroring out with ENOSPC if not; this avoids slightly more obscure
|
|
||||||
errors later on.
|
|
||||||
---
|
|
||||||
src/ext2fs-c.c | 18 ++++++++++++++++++
|
|
||||||
1 file changed, 18 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c
|
|
||||||
index f01ca9d..e45980a 100644
|
|
||||||
--- a/src/ext2fs-c.c
|
|
||||||
+++ b/src/ext2fs-c.c
|
|
||||||
@@ -52,6 +52,9 @@
|
|
||||||
/* fts.h in glibc is broken, forcing us to use the GNUlib alternative. */
|
|
||||||
#include "fts_.h"
|
|
||||||
|
|
||||||
+/* How many blocks of size S are needed for storing N bytes. */
|
|
||||||
+#define ROUND_UP(N, S) (((N) + (S) - 1) / (S))
|
|
||||||
+
|
|
||||||
struct ext2_data
|
|
||||||
{
|
|
||||||
ext2_filsys fs;
|
|
||||||
@@ -629,6 +632,7 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest)
|
|
||||||
errcode_t err;
|
|
||||||
struct stat statbuf;
|
|
||||||
struct statvfs statvfsbuf;
|
|
||||||
+ size_t blocks;
|
|
||||||
|
|
||||||
if (data->debug >= 3)
|
|
||||||
printf ("supermin: ext2: copy_file %s -> %s\n", src, dest);
|
|
||||||
@@ -649,6 +653,20 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest)
|
|
||||||
caml_copy_string (data->fs->device_name));
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Check that we have enough free blocks to store the resulting blocks
|
|
||||||
+ * for this file. The file might need more than that in the filesystem,
|
|
||||||
+ * but at least this provides a quick check to avoid failing later on.
|
|
||||||
+ */
|
|
||||||
+ blocks = ROUND_UP (statbuf.st_size, data->fs->blocksize);
|
|
||||||
+ if (blocks > ext2fs_free_blocks_count (data->fs->super)) {
|
|
||||||
+ fprintf (stderr, "supermin: %s: needed %lu blocks (%d each) for "
|
|
||||||
+ "%lu bytes, available only %llu\n",
|
|
||||||
+ src, blocks, data->fs->blocksize, statbuf.st_size,
|
|
||||||
+ ext2fs_free_blocks_count (data->fs->super));
|
|
||||||
+ unix_error (ENOSPC, (char *) "block size",
|
|
||||||
+ data->fs->device_name ? caml_copy_string (data->fs->device_name) : Val_none);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* Sanity check the path. These rules are always true for the paths
|
|
||||||
* passed to us here from the appliance layer. The assertions just
|
|
||||||
* verify that the rules haven't changed.
|
|
||||||
--
|
|
||||||
2.5.0
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
b8e24fcba079bc7b5ac2b63465c28a07 supermin-5.1.14.tar.gz
|
bf5f4f9861a72ba0bed5f86fce5acf87 supermin-5.1.15.tar.gz
|
||||||
|
@ -3,10 +3,27 @@
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1204162
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1204162
|
||||||
%undefine _hardened_build
|
%undefine _hardened_build
|
||||||
|
|
||||||
|
# On armv7 and x86, the default is ``--with dietlibc''.
|
||||||
|
#
|
||||||
|
# To use glibc-static instead, do ``--without dietlibc''. This
|
||||||
|
# results in a much larger (about 40 times larger) init binary.
|
||||||
|
#
|
||||||
|
# On other platforms, there is no dietlibc, so the default for those
|
||||||
|
# is ``--without dietlibc''.
|
||||||
|
#
|
||||||
|
# See also:
|
||||||
|
# https://github.com/libguestfs/supermin/commit/9bb57e1a8d0f3b57eb09f65dd574f702b67e1c2f
|
||||||
|
|
||||||
|
%ifarch %{arm} %{ix86} x86_64
|
||||||
|
%bcond_without dietlibc
|
||||||
|
%else
|
||||||
|
%bcond_with dietlibc
|
||||||
|
%endif
|
||||||
|
|
||||||
Summary: Tool for creating supermin appliances
|
Summary: Tool for creating supermin appliances
|
||||||
Name: supermin
|
Name: supermin
|
||||||
Version: 5.1.14
|
Version: 5.1.15
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
|
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
@ -16,12 +33,6 @@ ExclusiveArch: x86_64
|
|||||||
URL: http://people.redhat.com/~rjones/supermin/
|
URL: http://people.redhat.com/~rjones/supermin/
|
||||||
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
|
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# All upstream since 5.1.14.
|
|
||||||
Patch1: 0001-bin2s-Remove-_size-since-it-can-be-computed-from-_st.patch
|
|
||||||
Patch2: 0002-dnf-Ignore-global-exclude-setting-when-downloading-p.patch
|
|
||||||
Patch3: 0003-docs-Mention-using-dnf-builddep-command-on-Fedora-yu.patch
|
|
||||||
Patch4: 0004-ext2-check-for-needed-block-size.patch
|
|
||||||
|
|
||||||
BuildRequires: /usr/bin/pod2man
|
BuildRequires: /usr/bin/pod2man
|
||||||
BuildRequires: /usr/bin/pod2html
|
BuildRequires: /usr/bin/pod2html
|
||||||
BuildRequires: rpm
|
BuildRequires: rpm
|
||||||
@ -32,8 +43,11 @@ BuildRequires: hawkey >= 0.5.4-1.fc23
|
|||||||
BuildRequires: /usr/sbin/mke2fs
|
BuildRequires: /usr/sbin/mke2fs
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
BuildRequires: findutils
|
BuildRequires: findutils
|
||||||
BuildRequires: glibc-static, zlib-static
|
%if %{with dietlibc}
|
||||||
BuildRequires: xz-static, xz-devel
|
BuildRequires: dietlibc-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: glibc-static
|
||||||
|
%endif
|
||||||
BuildRequires: ocaml, ocaml-findlib-devel
|
BuildRequires: ocaml, ocaml-findlib-devel
|
||||||
|
|
||||||
# These are required only to run the tests. We could patch out the
|
# These are required only to run the tests. We could patch out the
|
||||||
@ -98,6 +112,9 @@ from supermin appliances.
|
|||||||
%build
|
%build
|
||||||
%configure --disable-network-tests
|
%configure --disable-network-tests
|
||||||
|
|
||||||
|
%if %{with dietlibc}
|
||||||
|
make -C init CC="diet gcc"
|
||||||
|
%endif
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
@ -136,6 +153,11 @@ make check || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 17 2016 Richard W.M. Jones <rjones@redhat.com> - 5.1.15-1
|
||||||
|
- New upstream version 5.1.15.
|
||||||
|
- Remove all patches, since they are now included in this version.
|
||||||
|
- Enable dietlibc, remove glibc-static, xz-static, zlib-static.
|
||||||
|
|
||||||
* Wed Feb 17 2016 Richard W.M. Jones <rjones@redhat.com> - 5.1.14-4
|
* Wed Feb 17 2016 Richard W.M. Jones <rjones@redhat.com> - 5.1.14-4
|
||||||
- Add more patches since 5.1.14.
|
- Add more patches since 5.1.14.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user