[packages/supermin] - updated to 5.1.11 - added patch with initial rpm5 support
qboosh
qboosh at pld-linux.org
Tue Nov 4 17:08:47 CET 2014
commit 6d10272e8628d22d81951051b5a2d8a3e596c146
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Nov 4 17:09:00 2014 +0100
- updated to 5.1.11
- added patch with initial rpm5 support
supermin-rpm5.patch | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++
supermin.spec | 13 +++++-
2 files changed, 138 insertions(+), 2 deletions(-)
---
diff --git a/supermin.spec b/supermin.spec
index 15e1855..d1ec30e 100644
--- a/supermin.spec
+++ b/supermin.spec
@@ -1,12 +1,13 @@
Summary: Tool for creating supermin appliances
Summary(pl.UTF-8): Narzędzie do tworzenia minimalistycznych instalacji
Name: supermin
-Version: 5.1.8
+Version: 5.1.11
Release: 1
License: GPL v2
Group: Applications/System
Source0: http://libguestfs.org/download/supermin/%{name}-%{version}.tar.gz
-# Source0-md5: f10ff5a4c40cce1778c2aea50f682323
+# Source0-md5: 5843cd7016022d4944227c3019c8b225
+Patch0: %{name}-rpm5.patch
URL: http://people.redhat.com/~rjones/supermin/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
@@ -20,8 +21,13 @@ BuildRequires: pkgconfig
# not needed in releases (BTW: perldoc is checked, but pod2man is actually used)
#BuildRequires: perl-perldoc
#BuildRequires: perl-tools-pod
+BuildRequires: rpm-devel >= 5
BuildRequires: xz-devel
BuildRequires: zlib-devel
+Requires: cpio
+Requires: e2fsprogs
+Requires: rpm
+Requires: rpm-utils
Suggests: filelight
Suggests: qemu
Suggests: yum >= 3.2
@@ -46,6 +52,7 @@ uruchomienia takowej.
%prep
%setup -q
+%patch0 -p1
%build
%{__aclocal} -I m4
@@ -55,10 +62,12 @@ uruchomienia takowej.
%configure \
APT_CACHE="apt-cache" \
APTITUDE="aptitude" \
+ CPIO="cpio" \
DPKG="dpkg" \
MKE2FS=/sbin/mke2fs \
PACMAN="pacman" \
RPM="rpm" \
+ RPM2CPIO="rpm2cpio" \
YUM="yum" \
YUMDOWNLOADER="yumdownloader" \
--disable-network-tests
diff --git a/supermin-rpm5.patch b/supermin-rpm5.patch
new file mode 100644
index 0000000..56d775f
--- /dev/null
+++ b/supermin-rpm5.patch
@@ -0,0 +1,127 @@
+--- supermin-5.1.11/src/librpm-c.c.orig 2014-10-07 12:31:17.000000000 +0200
++++ supermin-5.1.11/src/librpm-c.c 2014-11-04 16:51:56.092792090 +0100
+@@ -34,11 +34,12 @@
+
+ #ifdef HAVE_LIBRPM
+
+-#include <rpm/header.h>
++#define _RPMLOG_INTERNAL
++#include <rpm/rpm46compat.h>
+ #include <rpm/rpmdb.h>
+-#include <rpm/rpmlib.h>
+ #include <rpm/rpmlog.h>
+ #include <rpm/rpmts.h>
++#include <rpm/rpmversion.h>
+
+ static rpmlogCallback old_log_callback;
+
+@@ -46,8 +47,8 @@
+ supermin_rpm_log_callback (rpmlogRec rec, rpmlogCallbackData data)
+ {
+ fprintf (stderr, "supermin: rpm: lib: %s%s",
+- rpmlogLevelPrefix (rpmlogRecPriority (rec)),
+- rpmlogRecMessage (rec));
++ rpmlogLevelPrefix (rec->pri),
++ rec->message);
+ return 0;
+ }
+
+@@ -201,7 +202,7 @@
+
+ rv = caml_alloc (count, 0);
+ i = 0;
+- td = rpmtdNew ();
++ td = malloc (sizeof (*td));
+
+ while ((h = rpmdbNextIterator (iter)) != NULL) {
+ HeaderIterator hi;
+@@ -211,7 +212,7 @@
+ v = caml_alloc (5, 0);
+ hi = headerInitIterator (h);
+ while (headerNext (hi, td) == 1) {
+- switch (rpmtdTag (td)) {
++ switch (td->tag) {
+ case RPMTAG_NAME:
+ Store_field (v, 0, caml_copy_string (rpmtdGetString (td)));
+ stored_vals[0] = true;
+@@ -255,7 +256,7 @@
+ ++i;
+ }
+
+- rpmtdFree (td);
++ free (td);
+ rpmdbFreeIterator (iter);
+
+ CAMLreturn (rv);
+@@ -289,7 +290,7 @@
+ h = rpmdbNextIterator (iter);
+ assert (h != NULL);
+
+- td = rpmtdNew ();
++ td = malloc (sizeof (*td));
+ i = headerGet (h, RPMTAG_REQUIRENAME, td, HEADERGET_MINMEM);
+ if (i != 1)
+ caml_failwith ("rpm_pkg_requires: headerGet failed");
+@@ -299,7 +300,7 @@
+ Store_field (rv, i, caml_copy_string (rpmtdNextString (td)));
+
+ rpmtdFreeData (td);
+- rpmtdFree (td);
++ free (td);
+
+ rpmdbFreeIterator (iter);
+
+@@ -312,15 +313,15 @@
+ rpmdbMatchIterator mi = NULL;
+
+ if (what[0] != '/') {
+- mi = rpmtsInitIterator(ts, RPMDBI_PROVIDENAME, what, 0);
++ mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, what, 0);
+ if (mi != NULL)
+ return mi;
+ }
+- mi = rpmtsInitIterator(ts, RPMDBI_INSTFILENAMES, what, 0);
++ mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, what, 0);
+ if (mi != NULL)
+ return mi;
+
+- mi = rpmtsInitIterator(ts, RPMDBI_PROVIDENAME, what, 0);
++ mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, what, 0);
+
+ return mi;
+ }
+@@ -350,7 +351,7 @@
+
+ rv = caml_alloc (count, 0);
+ i = 0;
+- td = rpmtdNew ();
++ td = malloc (sizeof (*td));
+
+ while ((h = rpmdbNextIterator (iter)) != NULL) {
+ int ret;
+@@ -365,7 +366,7 @@
+ ++i;
+ }
+
+- rpmtdFree (td);
++ free (td);
+ rpmdbFreeIterator (iter);
+
+ CAMLreturn (rv);
+@@ -381,7 +382,6 @@
+ int count, i;
+ Header h;
+ rpmfi fi;
+- const rpmfiFlags fiflags = RPMFI_NOHEADER | RPMFI_FLAGS_QUERY | RPMFI_NOFILEDIGESTS;
+
+ data = Librpm_val (rpmv);
+ if (data.ts == NULL)
+@@ -400,7 +400,7 @@
+ h = rpmdbNextIterator (iter);
+ assert (h != NULL);
+
+- fi = rpmfiNew (data.ts, h, RPMTAG_BASENAMES, fiflags);
++ fi = rpmfiNew (data.ts, h, RPMTAG_BASENAMES, 0);
+
+ count = rpmfiFC (fi);
+ if (count < 0)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/supermin.git/commitdiff/6d10272e8628d22d81951051b5a2d8a3e596c146
More information about the pld-cvs-commit
mailing list