/a-fedora-appliance-*.src.rpm
/a-fedora-appliance.spec
/aclocal.m4
+/appliance.d/
/autom4te.cache/
/boot-a-fedora-appliance
/build-a-fedora-appliance
# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
EXTRA_DIST = \
.gitignore \
a-fedora-appliance.spec \
- extra-find-requires.sh \
firstboot \
init \
make.sh.in \
CLEANFILES = *~ make.sh stamp-supermin
clean-local:
- rm -rf supermin.d
+ rm -rf supermin.d appliance.d
bin_SCRIPTS = boot-a-fedora-appliance
fsdir = $(libdir)/a-fedora-appliance/supermin.d
fs_DATA = \
- supermin.d/base.img \
- supermin.d/init.img \
- supermin.d/hostfiles
+ supermin.d/base.tar.gz \
+ supermin.d/init.tar.gz \
+ supermin.d/packages
-supermin.d/base.img supermin.d/hostfiles: stamp-supermin
+supermin.d/base.tar.gz supermin.d/packages: stamp-supermin
stamp-supermin: make.sh
mkdir -p supermin.d
- rm -f $@ supermin.d/base.img supermin.d/hostfiles
+ rm -f $@ supermin.d/base.tar.gz supermin.d/packages
./make.sh
touch $@
-supermin.d/init.img: init firstboot
+supermin.d/init.tar.gz: init firstboot
mkdir -p supermin.d
- rm -f $@ $@-t
- echo -e "init\nfirstboot" | cpio --quiet -o -H newc > $@-t
- mv $@-t $@
+ tar zcf $@ $^
# This used to be a configure-generated file. However config.status
# always touches the destination file, which means the appliance got
# For local build/testing.
local-build:
- ./build-a-fedora-appliance supermin.d kernel initrd root
+ ./build-a-fedora-appliance supermin.d appliance.d
local-boot:
./boot-a-fedora-appliance --local
(2) If you are building from the source tarball
----------------------------------------------------------------------
-'supermin' version 4 or above is required:
+'supermin' version 5 or above is required:
http://people.redhat.com/~rjones/supermin/
Do:
make local-build
-This creates 3 files (kernel, initrd, root) in the local directory.
+This creates 3 files (kernel, initrd, root) under appliance.d/
You can test-boot this appliance by doing:
BuildRequires: createrepo
-BuildRequires: supermin >= 4.1.1
-Requires(post): supermin-helper >= 4.1.1
+BuildRequires: supermin >= 5.1.6
Requires: qemu-kvm >= 0.12
-# Provide our own custom requires for the supermin appliance.
-Source1: extra-find-requires.sh
-%global _use_internal_dependency_generator 0
-%global __find_provides %{_rpmconfigdir}/find-provides
-%global __find_requires %{SOURCE1} %{_rpmconfigdir}/find-requires
-
%description
This is a package that contains a Fedora appliance, otherwise known as
enabled=1
gpgcheck=0
EOF
-%define extra --with-yum-config=$(pwd)/yum.conf
+%define extra --with-packager-config=$(pwd)/yum.conf
%endif
%configure %{extra}
# XXX We should add an RPM trigger so that this gets rebuilt after any
# dependent package install (recursively).
-%{_libexecdir}/build-a-fedora-appliance "%{supermindir}" \
- "%{appliancedir}/kernel" "%{appliancedir}/initrd" "%{appliancedir}/root" && \
+%{_libexecdir}/build-a-fedora-appliance "%{supermindir}" "%{appliancedir}" && \
echo "Fedora %{fedora} appliance built in %{appliancedir}"
#!/bin/bash -
# @configure_input@
# boot-a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
prefix="@prefix@"
d="@localstatedir@/lib/a-fedora-appliance"
else
- d=.
+ d=appliance.d
fi
exec qemu-kvm \
#!/bin/bash -
# @configure_input@
# build-a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-if [ $# -ne 4 ]; then
- echo "$0 supermin.d kernel initrd root"
+if [ $# -ne 2 ]; then
+ echo "$0 supermin.d appliance.d"
echo "Note: you normally should not run this command directly."
exit 1
fi
supermindir="$1"
-shift
+appliancedir="$2"
-arch="$(uname -m)"
-exec supermin-helper -f ext2 "$supermindir" "$arch" "$@"
+if [ "$(id -u)" -ne 0 ]; then
+ echo
+ echo "Ignore any 'permission denied' errors below, or even better"
+ echo "get Fedora to stop doing security-by-obscurity."
+ echo
+fi
+
+exec @SUPERMIN@ --build -f ext2 "$supermindir" -o "$appliancedir"
# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
AM_INIT_AUTOMAKE([foreign])
dnl RPM release.
-RELEASE=6
+RELEASE=7
AC_SUBST([RELEASE])
dnl The list of packages included in the appliance.
-dnl NOTE: After changing this: touch make.sh.in; make
+dnl NOTES:
+dnl (1) These packages have to be installed on the host.
+dnl (2) After changing this do:
+dnl touch make.sh.in; make
PACKAGELIST="\
bash \
binutils \
"
AC_SUBST([PACKAGELIST])
-dnl Check for supermin >= 4.
+dnl Check for supermin >= 5.
AC_CHECK_PROG([SUPERMIN],
[supermin],[supermin],[no])
test "x$SUPERMIN" = "xno" &&
- AC_MSG_ERROR([supermin >= 4 must be installed])
+ AC_MSG_ERROR([supermin >= 5 must be installed])
-dnl Pass a supermin --yum-config option.
-AC_MSG_CHECKING([if user requested supermin --yum-config option])
-AC_ARG_WITH([yum-config],
- [AS_HELP_STRING([--with-yum-config=FILE],
- [pass supermin --yum-config option @<:@default=no@:>@])],
- [YUM_CONFIG="$withval"],
- [YUM_CONFIG=no])
-AC_MSG_RESULT([$YUM_CONFIG])
-AC_SUBST([YUM_CONFIG])
+dnl Pass a supermin --packager-config option.
+AC_MSG_CHECKING([if user requested supermin --packager-config option])
+AC_ARG_WITH([packager-config],
+ [AS_HELP_STRING([--with-packager-config=FILE],
+ [pass supermin --packager-config option @<:@default=no@:>@])],
+ [PACKAGER_CONFIG="$withval"],
+ [PACKAGER_CONFIG=no])
+AC_MSG_RESULT([$PACKAGER_CONFIG])
+AC_SUBST([PACKAGER_CONFIG])
dnl Produce output files.
AC_CONFIG_FILES([Makefile
+++ /dev/null
-#!/bin/sh -
-# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# Additional custom requires for the package.
-
-original_find_requires="$1"
-shift
-
-# Get the list of files.
-files=`sed "s/['\"]/\\\&/g"`
-
-# Use ordinary find-requires first.
-echo $files | tr [:blank:] '\n' | $original_find_requires
-
-# Is supermin.d/hostfiles included in the list of files?
-hostfiles=`echo $files | tr [:blank:] '\n' | grep 'supermin\.d/hostfiles$'`
-
-if [ -z "$hostfiles" ]; then
- exit 0
-fi
-
-# Generate extra requires for libraries listed in hostfiles.
-sofiles=`grep 'lib.*\.so\.' $hostfiles | fgrep -v '*' | sed 's|^\.||'`
-for f in $sofiles; do
- if [ -f "$f" ]; then
- echo "$f"
- fi
-done
#!/bin/bash -
# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#!/bin/bash
# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#!/bin/bash -
# a-fedora-appliance
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-if [ "x@YUM_CONFIG@" != "xno" ]; then
- extra="--yum-config @YUM_CONFIG@"
+if [ "x@PACKAGER_CONFIG@" != "xno" ]; then
+ extra="--packager-config @PACKAGER_CONFIG@"
fi
-echo @SUPERMIN@ -v -o supermin.d --names @PACKAGELIST@ $extra
-@SUPERMIN@ -v -o supermin.d --names @PACKAGELIST@ $extra
+echo @SUPERMIN@ -v --prepare -o supermin.d @PACKAGELIST@ $extra
+@SUPERMIN@ -v --prepare -o supermin.d @PACKAGELIST@ $extra