qubeize_image: use yum repo for Qubes-specific rpms instead of symlinks

This would simplify changes in package list and (more important) make
template-builder independent of layout of other repos (eg location of version
file).
This commit is contained in:
Marek Marczykowski 2012-11-14 16:12:18 +01:00
parent 408d00e8a4
commit fdea5277cd
9 changed files with 36 additions and 46 deletions

View File

@ -15,7 +15,7 @@ help:
rpms:
@echo $(TIMESTAMP) > build_timestamp
@echo "Building template: $(TEMPLATE_NAME)"
@./create_symlinks_in_rpms_to_install_dir.sh && \
@createrepo -g $$PWD/comps-qubes-template.xml yum_repo_qubes/$(DIST) -o yum_repo_qubes/$(DIST) && \
sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img clean_images/packages.list && \
sudo -E ./qubeize_image fedorized_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME) && \
./build_template_rpm $(TEMPLATE_NAME) || exit 1; \
@ -23,6 +23,10 @@ rpms:
update-repo-installer:
ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp)*.noarch.rpm ../installer/yum/qubes-dom0/rpm
prepare-repo-template:
rm -rf yum_repo_qubes/*
mkdir -p yum_repo_qubes/$(DIST)/rpm yum_repo_qubes/$(DIST)/repodata
clean:
sudo rm -fr qubeized_images/root.img.*
sudo rm -fr qubeized_images/$(TEMPLATE_NAME)*

View File

@ -32,6 +32,6 @@ liblzma.so.0()(64bit)
git
createrepo
rpm-build
./rpms_to_install/qubes-core-vm-kernel-placeholder.rpm
qubes-core-vm-kernel-placeholder
ltrace
strace

19
comps-qubes-template.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//Red Hat, Inc.//DTD Comps info//EN" "comps.dtd">
<comps>
<group>
<id>qubes-vm</id>
<name>Qubes Environment</name>
<default>true</default>
<packagelist>
<packagereq type="mandatory">qubes-core-vm-systemd</packagereq>
<packagereq type="mandatory">qubes-core-vm</packagereq>
<packagereq type="mandatory">qubes-gui-vm</packagereq>
<packagereq type="mandatory">qubes-gpg-split</packagereq>
<packagereq type="mandatory">xen-libs</packagereq>
<packagereq type="mandatory">xen-qubes-vm-essentials</packagereq>
<packagereq type="default">thunderbird-qubes</packagereq>
<packagereq type="default">qubes-doc-vm</packagereq>
</packagelist>
</group>
</comps>

View File

@ -1,42 +0,0 @@
#!/bin/bash
SRC_ROOT=../..
[ -n "$1" ] && SRC_ROOT=$1
: DIST=fc14
rm -fr rpms_to_install/*
pushd rpms_to_install
# FIXME: rel hardcoded
VERSION_CORE=$(cat $SRC_ROOT/core/version_vm)-1.$DIST.x86_64
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-vm-$VERSION_CORE.rpm qubes-core-vm.rpm
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-vm-libs-$VERSION_CORE.rpm qubes-core-vm-libs.rpm
if [ "${DIST/fc/}" -ge 15 ]; then
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-vm-systemd-$VERSION_CORE.rpm qubes-core-vm-init.rpm
else
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-vm-sysvinit-$VERSION_CORE.rpm qubes-core-vm-init.rpm
fi
ln -s $SRC_ROOT/core/rpm/x86_64/qubes-core-vm-kernel-placeholder-1.0-1.$DIST.x86_64.rpm qubes-core-vm-kernel-placeholder.rpm
# FIXME: rel hardcoded
VERSION_GUI=$(cat $SRC_ROOT/gui/version)-1.$DIST.x86_64
ln -s $SRC_ROOT/gui/rpm/x86_64/qubes-gui-vm-$VERSION_GUI.rpm qubes-gui-vm.rpm
VERSION_XEN=$(cat $SRC_ROOT/xen/version)-$(cat $SRC_ROOT/xen/rel).$DIST.x86_64
ln -s $SRC_ROOT/xen/rpm/x86_64/xen-libs-$VERSION_XEN.rpm xen-libs.rpm
ln -s $SRC_ROOT/xen/rpm/x86_64/xen-licenses-$VERSION_XEN.rpm xen-licenses.rpm
ln -s $SRC_ROOT/xen/rpm/x86_64/xen-qubes-vm-essentials-$VERSION_XEN.rpm xen-qubes-vm-essentials.rpm
# Install also addons
# FIXME: rel hardcoded
VERSION_TB=$(cat $SRC_ROOT/addons/thunderbird-qubes/version)-1.$DIST.x86_64
ln -s $SRC_ROOT/addons/rpm/x86_64/thunderbird-qubes-$VERSION_TB.rpm thunderbird-qubes.rpm
# FIXME: rel hardcoded
VERSION_GPG=$(cat $SRC_ROOT/addons/gpg-split/version)-1.$DIST.x86_64
ln -s $SRC_ROOT/addons/rpm/x86_64/qubes-gpg-split-$VERSION_GPG.rpm qubes-gpg-split.rpm
# FIXME: rel hardcoded
VERSION_DOCS=$(cat $SRC_ROOT/docs/version)-1.noarch
ln -s $SRC_ROOT/docs/rpm/noarch/qubes-doc-vm-$VERSION_DOCS.rpm qubes-doc-vm.rpm
popd

View File

@ -50,6 +50,7 @@ fi
mount -t proc proc mnt/proc
PKGGROUPS=$(cat $PKGLISTFILE)
export YUM0=$PWD/yum_repo_qubes
echo "-> Installing package groups..."
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR $PKGGROUPS || RETCODE=1
yum update -c $PWD/yum.conf $YUM_OPTS -y --installroot=$INSTALLDIR || RETCODE=1

View File

@ -39,7 +39,8 @@ mount -o loop $IMG mnt || exit 1
mount -t proc proc mnt/proc
echo "--> Installing RPMs..."
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt rpms_to_install/*rpm
export YUM0=$PWD/yum_repo_qubes
yum install -c $PWD/yum.conf $YUM_OPTS -y --installroot=$(pwd)/mnt @qubes-vm
echo "--> Installing 3rd party apps"
./add_3rd_party_software.sh

View File

@ -1 +0,0 @@
*

View File

@ -10,6 +10,7 @@ plugins=1
installonly_limit=3
color=never
exclude=kernel
overwrite_groups=0
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
@ -20,3 +21,9 @@ exclude=kernel
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
[template-builder-repo]
name = Qubes Template Builder Repository
baseurl = file://$YUM0/fc$releasever
gpgcheck = 0
cost=10

1
yum_repo_qubes/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
fc*