Add BR yum-utils (for yumdownloader).

- Add upstream patch which stops duplicate packages appearing.
This commit is contained in:
Richard W.M. Jones 2014-02-26 22:37:43 +00:00
parent d6d40231f2
commit be53af1d3d
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,42 @@
From 8ae7752efb0c771288d308772b24e16e370d9d40 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 26 Feb 2014 21:29:01 +0000
Subject: [PATCH] prepare: Remove duplicates from packages file.
---
src/prepare.ml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/prepare.ml b/src/prepare.ml
index 7dc26ec..4f7d6a1 100644
--- a/src/prepare.ml
+++ b/src/prepare.ml
@@ -50,10 +50,15 @@ let prepare debug (copy_kernel, dtb_wildcard, format, host_cpu,
flush stdout
);
- (* Write packages file - after removing missing packages, but before
- * resolving dependencies.
+ (* Convert input packages to a set. This removes duplicates. *)
+ let packages = package_set_of_list packages in
+
+ (* Write input packages to the 'packages' file. We don't need to
+ * write the dependencies because we do dependency resolution at
+ * build time too.
*)
let () =
+ let packages = PackageSet.elements packages in
let pkg_names = List.map ph.ph_package_name packages in
let pkg_names = List.sort compare pkg_names in
@@ -67,7 +72,6 @@ let prepare debug (copy_kernel, dtb_wildcard, format, host_cpu,
(* Resolve the dependencies. *)
let packages =
- let packages = package_set_of_list packages in
ph.ph_get_all_requires packages in
if debug >= 1 then (
--
1.8.5.3

View File

@ -1,7 +1,7 @@
Summary: Tool for creating supermin appliances
Name: supermin
Version: 5.1.0
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
%if 0%{?rhel} >= 7
@ -11,8 +11,11 @@ ExclusiveArch: x86_64
URL: http://people.redhat.com/~rjones/supermin/
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
Patch1: 0001-prepare-Remove-duplicates-from-packages-file.patch
BuildRequires: /usr/bin/pod2man
BuildRequires: rpm
BuildRequires: yum-utils
BuildRequires: /usr/sbin/mke2fs
BuildRequires: e2fsprogs-devel
BuildRequires: glibc-static, zlib-static
@ -44,6 +47,8 @@ second when you need to boot one of them.
%prep
%setup -q
%patch1 -p1
%build
# Use --disable-largefile to work around glibc bug:
@ -79,6 +84,10 @@ make check
%changelog
* Wed Feb 26 2014 Richard W.M. Jones <rjones@redhat.com> - 5.1.0-3
- Add BR yum-utils (for yumdownloader).
- Add upstream patch which stops duplicate packages appearing.
* Wed Feb 26 2014 Richard W.M. Jones <rjones@redhat.com> - 5.1.0-2
- New upstream version 5.1.0.
- Note this is effectively a rewrite, and is not completely compatible.