From 8fc45d334d2ae13c48f2f5ca991b874b2445dfab72d18d988c4febc5156b97f4 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 12 Apr 2013 06:36:02 +0000 Subject: [PATCH] use correct repos.d in zypp driver OBS-URL: https://build.opensuse.org/package/show/Virtualization/supermin?expand=0&rev=7 --- 0009-use-correct-repos.d-in-zypp-driver.patch | 25 +++++++++++++ 0010-zypper-Use-instead-of.patch | 25 +++++++++++++ ...t-with-different-options-for-apt-cac.patch | 37 +++++++++++++++++++ supermin.spec | 7 ++++ 4 files changed, 94 insertions(+) create mode 100644 0009-use-correct-repos.d-in-zypp-driver.patch create mode 100644 0010-zypper-Use-instead-of.patch create mode 100644 0011-debian-Experiment-with-different-options-for-apt-cac.patch diff --git a/0009-use-correct-repos.d-in-zypp-driver.patch b/0009-use-correct-repos.d-in-zypp-driver.patch new file mode 100644 index 0000000..b9a1576 --- /dev/null +++ b/0009-use-correct-repos.d-in-zypp-driver.patch @@ -0,0 +1,25 @@ +From c884b2bafa8434f8b15ec2d26bde4005a85cf9df Mon Sep 17 00:00:00 2001 +From: Olaf Hering +Date: Thu, 11 Apr 2013 20:34:23 +0200 +Subject: use correct repos.d in zypp driver + +A temporary dir used during debugging was added in a previous patch. + +Signed-off-by: Olaf Hering +--- + 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 09b1695..ddc4085 100644 +--- a/src/supermin_zypp_rpm.ml ++++ b/src/supermin_zypp_rpm.ml +@@ -129,7 +129,7 @@ unset LANG ${!LC_*} + zypper \ + %s \ + %s \ +- --root %S --reposd-dir /dev/shm/supermin/zypp/repos.d \ ++ --root %S --reposd-dir /etc/zypp/repos.d \ + --cache-dir %S \ + --gpg-auto-import-keys \ + --non-interactive \ diff --git a/0010-zypper-Use-instead-of.patch b/0010-zypper-Use-instead-of.patch new file mode 100644 index 0000000..3bb4df5 --- /dev/null +++ b/0010-zypper-Use-instead-of.patch @@ -0,0 +1,25 @@ +From 5402943711abee13357c4951a96eeb634c2b9910 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 11 Apr 2013 23:09:30 +0100 +Subject: zypper: Use %%@ instead of %@. + +OCaml 3.12.1 can't handle incorrect format string pattern "%@". +--- + src/supermin_zypp_rpm.ml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/supermin_zypp_rpm.ml b/src/supermin_zypp_rpm.ml +index ddc4085..5d97205 100644 +--- a/src/supermin_zypp_rpm.ml ++++ b/src/supermin_zypp_rpm.ml +@@ -139,8 +139,8 @@ zypper \ + --dry-run \ + %s | \ + xml sel -t \ +- -m \"stream/install-summary/to-install/solvable[%@type='package']\" \ +- -c \"string(%@name)\" -n ++ -m \"stream/install-summary/to-install/solvable[%%@type='package']\" \ ++ -c \"string(%%@name)\" -n + " + (if verbose then "set -x" else "") + (if verbose then "--verbose --verbose" else "--quiet") diff --git a/0011-debian-Experiment-with-different-options-for-apt-cac.patch b/0011-debian-Experiment-with-different-options-for-apt-cac.patch new file mode 100644 index 0000000..340576f --- /dev/null +++ b/0011-debian-Experiment-with-different-options-for-apt-cac.patch @@ -0,0 +1,37 @@ +From 67194fc1feac8c99aeafb49ae92ab1996c320312 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 11 Apr 2013 23:20:37 +0100 +Subject: debian: Experiment with different options for 'apt-cache depends'. + +However this commit does not change the current situation. +--- + src/supermin_debian.ml | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/supermin_debian.ml b/src/supermin_debian.ml +index d0bcce8..da75c90 100644 +--- a/src/supermin_debian.ml ++++ b/src/supermin_debian.ml +@@ -43,10 +43,20 @@ let get_installed_pkgs () = + | [] -> assert false + | pkgs -> pkgs + ++(* Select which dependencies will be installed. See apt-cache(8) for ++ * complete details. Using "-i" means only Depends and Pre-depends ++ * are installed, which is stricter (fewer packages) than ordinary ++ * 'apt-get install'. Otherwise, enable everything, then selectively ++ * disable what you don't want, to make it behave more like ++ * 'apt-get install'. ++ *) ++let which_dependencies = "-i" ++(*let which_dependencies = "--no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances"*) ++ + let rec debian_resolve_dependencies_and_download names = + let cmd = +- sprintf "%s depends --recurse -i %s | grep -v '^[<[:space:]]' | grep -Ev ':\\w+\\b'" +- Config.apt_cache ++ sprintf "%s depends --recurse %s %s | grep -v '^[<[:space:]]' | grep -Ev ':\\w+\\b'" ++ Config.apt_cache which_dependencies + (String.concat " " (List.map Filename.quote names)) in + let pkgs = run_command_get_lines cmd in + let pkgs = diff --git a/supermin.spec b/supermin.spec index b6ee241..a569b5a 100644 --- a/supermin.spec +++ b/supermin.spec @@ -38,6 +38,10 @@ Patch5: 0005-always-work-with-empty-root-in-zypp-driver.patch Patch6: 0006-handle-use-installed-in-zypp-driver.patch Patch7: 0007-skip-unreadable-files-in-zypp_rpm_list_files.patch Patch8: 0008-remove-leading-tabs-in-zypp-driver.patch +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 + BuildRequires: autoconf BuildRequires: automake BuildRequires: e2fsprogs @@ -65,6 +69,9 @@ you need to boot one of them. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build export ZYPPER=zypper