libguestfs/0002-Add-with-febootstrap-y...

73 lines
3.0 KiB
Diff

From 968a17e0b92ed1d80ea7a694bde0fc196e7403f4 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
Date: Mon, 6 Dec 2010 17:44:06 +0000
Subject: [PATCH 2/3] Add --with-febootstrap-yum-config.
This allows the febootstrap --yum-config option to be passed through,
allowing a separate yum configuration to be used.
The hope is that this will enable building in Koji.
---
appliance/make.sh.in | 9 +++++----
configure.ac | 22 +++++++++-------------
2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/appliance/make.sh.in b/appliance/make.sh.in
index bab0529..9e54b4a 100755
--- a/appliance/make.sh.in
+++ b/appliance/make.sh.in
@@ -24,12 +24,13 @@ set -e
excludes="--exclude '^perl' --exclude '^python' --exclude '^fedora-logos' --exclude '^redhat-logos' --exclude '^dracut' --exclude '^upstart' --exclude '^plymouth' --exclude '^systemd' --exclude '^linux-firmware' --exclude '^kbd-misc'"
# Run febootstrap on the package list.
-if [ -z "@PACKAGE_DIRECTORY@" ]; then
- @FEBOOTSTRAP@ -v -o supermin.d $excludes --names $(< packagelist )
-else
- @FEBOOTSTRAP@ -v -o supermin.d $excludes @PACKAGE_DIRECTORY@/*
+if [ "x@FEBOOTSTRAP_YUM_CONFIG@" != "xno" ]; then
+ extra="--yum-config @FEBOOTSTRAP_YUM_CONFIG@"
fi
+echo @FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
+@FEBOOTSTRAP@ -v -o supermin.d --names $(< packagelist ) $excludes $extra
+
# Remove some things that we don't want in the appliance. This is
# copied from the old febootstrap-minimize. However minimization is
# not so important now that we are caching the appliance.
diff --git a/configure.ac b/configure.ac
index 682fa11..f48afa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,19 +200,15 @@ if test "x$enable_appliance" = "xyes"; then
$FEBOOTSTRAP --version >/dev/null 2>&1 ||
AC_MSG_ERROR([febootstrap >= 3.0 must be installed, your version is too old])
- dnl Build from local package files, used when building with no network
- dnl access, ie. under Koji.
- AC_MSG_CHECKING([if we should build the appliance from local packages])
- AC_ARG_WITH([local-package-directory],
- [AS_HELP_STRING([--with-local-package-directory],
- [build from local packages in dir @<:@default=no@:>@])],
- [local_package_directory=$withval],
- [local_package_directory=no])
- AC_MSG_RESULT([$local_package_directory])
- PACKAGE_DIRECTORY=
- test "x$local_package_directory" != "xno" &&
- PACKAGE_DIRECTORY="$local_package_directory"
- AC_SUBST([PACKAGE_DIRECTORY])
+ dnl Pass a febootstrap --yum-config option.
+ AC_MSG_CHECKING([if user requested febootstrap --yum-config option])
+ AC_ARG_WITH([febootstrap-yum-config],
+ [AS_HELP_STRING([--with-febootstrap-yum-config=FILE],
+ [pass febootstrap --yum-config option @<:@default=no@:>@])],
+ [FEBOOTSTRAP_YUM_CONFIG="$withval"],
+ [FEBOOTSTRAP_YUM_CONFIG=no])
+ AC_MSG_RESULT([$FEBOOTSTRAP_YUM_CONFIG])
+ AC_SUBST([FEBOOTSTRAP_YUM_CONFIG])
dnl Which distro?
dnl
--
1.7.3.2