forked from pool/supermin
- zypp: Only compile zypper support if OCaml inifiles module is found.
- zypp: Trailing whitespace. - Handle --packager-config in zypp_rpm - helper: Add a note that cpio might not be able to read -f cpio files. - helper: Add megaraid drivers to the initrd. OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=15
This commit is contained in:
parent
0020f3599b
commit
a9c7ea2c60
26
0013-helper-Add-megaraid-drivers-to-the-initrd.patch
Normal file
26
0013-helper-Add-megaraid-drivers-to-the-initrd.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 9da479658818738b2a2a68456e867cdb609472c8 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 14 May 2013 19:21:04 +0100
|
||||
Subject: helper: Add megaraid drivers to the initrd.
|
||||
|
||||
This allows you to use the megaraid SAS emulation
|
||||
in qemu if you want.
|
||||
|
||||
Primarily I added this so I could test:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=962079#c4
|
||||
---
|
||||
helper/ext2initrd.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/helper/ext2initrd.c b/helper/ext2initrd.c
|
||||
index aa3259f..8dab5e9 100644
|
||||
--- a/helper/ext2initrd.c
|
||||
+++ b/helper/ext2initrd.c
|
||||
@@ -68,6 +68,7 @@ static const char *kmods[] = {
|
||||
"crc*.ko*",
|
||||
"libcrc*.ko*",
|
||||
"ibmvscsic.ko*",
|
||||
+ "megaraid*.ko*",
|
||||
NULL
|
||||
};
|
||||
|
@ -0,0 +1,23 @@
|
||||
From 7b98faa1ca69115c8dc54ff1a19c8200d1415a1e Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Mon, 3 Jun 2013 14:30:26 +0100
|
||||
Subject: helper: Add a note that cpio might not be able to read -f cpio files.
|
||||
|
||||
---
|
||||
helper/supermin-helper.pod | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/helper/supermin-helper.pod b/helper/supermin-helper.pod
|
||||
index 86d7a97..8d5f8e3 100644
|
||||
--- a/helper/supermin-helper.pod
|
||||
+++ b/helper/supermin-helper.pod
|
||||
@@ -57,6 +57,9 @@ A Linux initramfs. This is the default.
|
||||
In this case you have to supply names for the C<kernel>
|
||||
and C<initrd>, where the C<initrd> is the appliance.
|
||||
|
||||
+Note that L<cpio(1)> might not be able to extract this file fully.
|
||||
+The format used by the Linux kernel is not quite a true cpio file.
|
||||
+
|
||||
=item ext2
|
||||
|
||||
An ext2 filesystem.
|
@ -1,8 +1,36 @@
|
||||
From e3ad17403b0e1ad4fc9a00d04304a155872d07e6 Mon Sep 17 00:00:00 2001
|
||||
From 33d50fbe36a4a1eca5e7b3e3a1dcb2ce68b1a7e6 Mon Sep 17 00:00:00 2001
|
||||
From: Olaf Hering <olaf@aepfle.de>
|
||||
Date: Mon, 3 Jun 2013 17:09:10 +0200
|
||||
Date: Tue, 4 Jun 2013 11:37:45 +0200
|
||||
Subject: Handle --packager-config in zypp_rpm
|
||||
|
||||
This is an attempt to handle a different --reposd-dir in the zypp_rpm
|
||||
driver. Up to now the system repositories in /etc/zypp/repos.d were
|
||||
used.
|
||||
|
||||
To specify a different set of repositories for zypp a parser for a
|
||||
simple zypper.conf is added in this patch. It just looks for reposdir=
|
||||
in section main, like this:
|
||||
|
||||
[main]
|
||||
reposdir=/path/to/other/repofiles
|
||||
|
||||
If the config file provided via "--packager-config my_zypp.conf" is
|
||||
valid the other directory is passed to zypper, otherwise the system
|
||||
repos.d is used like its done in current code.
|
||||
|
||||
Depending on the kind of provided repos, the current code may fail to
|
||||
import a repo in non-interactive mode. This happens if the repo data are
|
||||
not properly signed. For this reason the option --no-gpg-checks is added
|
||||
by this patch.
|
||||
|
||||
Finally, the parser uses ocaml-inifiles to read the config file. This is
|
||||
a new build dependency. inifiles should be available in various
|
||||
distributions, copies of the original sources can be found via google.
|
||||
|
||||
This patch has received some light testing, I sent it out to the list
|
||||
for further comments. Particular about the new inifiles dependency..
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
---
|
||||
src/Makefile.am | 2 +-
|
||||
src/supermin_zypp_rpm.ml | 23 ++++++++++++++++++++---
|
22
0016-zypp-Trailing-whitespace.patch
Normal file
22
0016-zypp-Trailing-whitespace.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From bf784ff3fedf37a230915ad3d278d1df22a25715 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 4 Jun 2013 15:30:19 +0100
|
||||
Subject: zypp: Trailing whitespace.
|
||||
|
||||
---
|
||||
src/supermin_zypp_rpm.ml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/supermin_zypp_rpm.ml b/src/supermin_zypp_rpm.ml
|
||||
index c9786ce..655ba99 100644
|
||||
--- a/src/supermin_zypp_rpm.ml
|
||||
+++ b/src/supermin_zypp_rpm.ml
|
||||
@@ -57,7 +57,7 @@ let tmpdir = tmpdir ()
|
||||
|
||||
let get_repos_dir () =
|
||||
let zypper_default = "/etc/zypp/repos.d" in
|
||||
- let parse_repos_dir path =
|
||||
+ let parse_repos_dir path =
|
||||
let cfg = new inifile path in
|
||||
let dir = (try cfg#getval "main" "reposdir" with _ -> zypper_default) in
|
||||
dir
|
118
0017-zypp-Only-compile-zypper-support-if-OCaml-inifiles-m.patch
Normal file
118
0017-zypp-Only-compile-zypper-support-if-OCaml-inifiles-m.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From e1dda9fde6193cc4cf42f359ee235369314857fa Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 4 Jun 2013 15:32:35 +0100
|
||||
Subject: zypp: Only compile zypper support if OCaml inifiles module is found.
|
||||
|
||||
---
|
||||
README | 2 ++
|
||||
configure.ac | 4 ++++
|
||||
src/.depend | 2 --
|
||||
src/Makefile.am | 36 ++++++++++++++++++++++++++++--------
|
||||
4 files changed, 34 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/README b/README
|
||||
index c3e7699..cf16fbe 100644
|
||||
--- a/README
|
||||
+++ b/README
|
||||
@@ -60,6 +60,8 @@ For Debian/Ubuntu:
|
||||
Optional
|
||||
--------
|
||||
|
||||
+ ocaml inifiles library (needed for zypper only)
|
||||
+
|
||||
These are only needed if you plan to boot the supermin appliances you
|
||||
are building:
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f975f3f..83f95e2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -56,6 +56,10 @@ if test "$OCAMLFIND" = "no"; then
|
||||
AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
|
||||
fi
|
||||
|
||||
+dnl Optional OCaml packages.
|
||||
+AC_CHECK_OCAML_PKG([inifiles])
|
||||
+AM_CONDITIONAL([HAVE_OCAML_INIFILES], [test "x$OCAML_PKG_inifiles" != "xno"])
|
||||
+
|
||||
dnl Optional programs.
|
||||
AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no])
|
||||
if test "x$PERLDOC" = "xno" ; then
|
||||
diff --git a/src/.depend b/src/.depend
|
||||
index 36a642f..624191e 100644
|
||||
--- a/src/.depend
|
||||
+++ b/src/.depend
|
||||
@@ -17,5 +17,3 @@ supermin_utils.cmo: supermin_cmdline.cmi supermin_utils.cmi
|
||||
supermin_utils.cmx: supermin_cmdline.cmx supermin_utils.cmi
|
||||
supermin_yum_rpm.cmo: supermin_utils.cmi supermin_package_handlers.cmi supermin_cmdline.cmi config.cmo
|
||||
supermin_yum_rpm.cmx: supermin_utils.cmx supermin_package_handlers.cmx supermin_cmdline.cmx config.cmx
|
||||
-supermin_zypp_rpm.cmo: supermin_utils.cmi supermin_package_handlers.cmi supermin_cmdline.cmi config.cmo
|
||||
-supermin_zypp_rpm.cmx: supermin_utils.cmx supermin_package_handlers.cmx supermin_cmdline.cmx config.cmx
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 6ed0faf..b0a6723 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -17,6 +17,22 @@
|
||||
#
|
||||
# Written by Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
+EXTRA_DIST = \
|
||||
+ config.ml \
|
||||
+ supermin.8 \
|
||||
+ supermin.pod \
|
||||
+ supermin.ml \
|
||||
+ supermin_cmdline.mli \
|
||||
+ supermin_cmdline.ml \
|
||||
+ supermin_debian.ml \
|
||||
+ supermin_package_handlers.mli \
|
||||
+ supermin_package_handlers.ml \
|
||||
+ supermin_pacman.ml \
|
||||
+ supermin_utils.mli \
|
||||
+ supermin_utils.ml \
|
||||
+ supermin_yum_rpm.ml \
|
||||
+ supermin_zypp_rpm.ml
|
||||
+
|
||||
# Note these must be in build dependency order.
|
||||
SOURCES = \
|
||||
config.ml \
|
||||
@@ -25,8 +41,14 @@ SOURCES = \
|
||||
supermin_utils.mli \
|
||||
supermin_utils.ml \
|
||||
supermin_package_handlers.mli \
|
||||
- supermin_package_handlers.ml \
|
||||
- supermin_zypp_rpm.ml \
|
||||
+ supermin_package_handlers.ml
|
||||
+
|
||||
+if HAVE_OCAML_INIFILES
|
||||
+SOURCES += \
|
||||
+ supermin_zypp_rpm.ml
|
||||
+endif
|
||||
+
|
||||
+SOURCES += \
|
||||
supermin_yum_rpm.ml \
|
||||
supermin_debian.ml \
|
||||
supermin_pacman.ml \
|
||||
@@ -34,11 +56,6 @@ SOURCES = \
|
||||
|
||||
CLEANFILES = *~ *.cmi *.cmo *.cmx *.o supermin
|
||||
|
||||
-EXTRA_DIST = \
|
||||
- supermin.8 \
|
||||
- supermin.pod \
|
||||
- $(SOURCES)
|
||||
-
|
||||
man_MANS = \
|
||||
supermin.8
|
||||
|
||||
@@ -56,7 +73,10 @@ OBJECTS = $(XOBJECTS)
|
||||
BEST = opt
|
||||
endif
|
||||
|
||||
-OCAMLPACKAGES = -package unix,str,inifiles
|
||||
+OCAMLPACKAGES = -package unix,str
|
||||
+if HAVE_OCAML_INIFILES
|
||||
+OCAMLPACKAGES += -package inifiles
|
||||
+endif
|
||||
OCAMLFLAGS = -warn-error CDEFLMPSUVXYZ
|
||||
|
||||
supermin: $(OBJECTS)
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 16:59:21 CEST 2013 - ohering@suse.de
|
||||
|
||||
- zypp: Only compile zypper support if OCaml inifiles module is found.
|
||||
- zypp: Trailing whitespace.
|
||||
- Handle --packager-config in zypp_rpm
|
||||
- helper: Add a note that cpio might not be able to read -f cpio files.
|
||||
- helper: Add megaraid drivers to the initrd.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 9 19:21:47 CEST 2013 - ohering@suse.de
|
||||
|
||||
|
@ -41,7 +41,12 @@ Patch9: 0009-use-correct-repos.d-in-zypp-driver.patch
|
||||
Patch10: 0010-zypper-Use-instead-of.patch
|
||||
Patch11: 0011-debian-Experiment-with-different-options-for-apt-cac.patch
|
||||
Patch12: 0012-zypp-Fix-XPath-expressions.patch
|
||||
Patch13: 0001-Handle-packager-config-in-zypp_rpm.patch
|
||||
Patch13: 0013-helper-Add-megaraid-drivers-to-the-initrd.patch
|
||||
Patch14: 0014-helper-Add-a-note-that-cpio-might-not-be-able-to-rea.patch
|
||||
Patch15: 0015-Handle-packager-config-in-zypp_rpm.patch
|
||||
Patch16: 0016-zypp-Trailing-whitespace.patch
|
||||
Patch17: 0017-zypp-Only-compile-zypper-support-if-OCaml-inifiles-m.patch
|
||||
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -76,6 +81,10 @@ you need to boot one of them.
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
|
||||
%build
|
||||
export ZYPPER=zypper
|
||||
|
Loading…
Reference in New Issue
Block a user