diff --git a/Makefile b/Makefile index 6ba8f8d..091e48f 100644 --- a/Makefile +++ b/Makefile @@ -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)* diff --git a/clean_images/packages.list b/clean_images/packages.list index 57429fe..9ec27da 100644 --- a/clean_images/packages.list +++ b/clean_images/packages.list @@ -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 diff --git a/comps-qubes-template.xml b/comps-qubes-template.xml new file mode 100644 index 0000000..50d0056 --- /dev/null +++ b/comps-qubes-template.xml @@ -0,0 +1,19 @@ + + + + + qubes-vm + Qubes Environment + true + + qubes-core-vm-systemd + qubes-core-vm + qubes-gui-vm + qubes-gpg-split + xen-libs + xen-qubes-vm-essentials + thunderbird-qubes + qubes-doc-vm + + + diff --git a/create_symlinks_in_rpms_to_install_dir.sh b/create_symlinks_in_rpms_to_install_dir.sh deleted file mode 100755 index 76867e2..0000000 --- a/create_symlinks_in_rpms_to_install_dir.sh +++ /dev/null @@ -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 diff --git a/fedorize_image b/fedorize_image index 5e91e14..4cc371c 100755 --- a/fedorize_image +++ b/fedorize_image @@ -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 diff --git a/qubeize_image b/qubeize_image index 504f4b3..543ad50 100755 --- a/qubeize_image +++ b/qubeize_image @@ -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 diff --git a/rpms_to_install/.gitignore b/rpms_to_install/.gitignore deleted file mode 100644 index 72e8ffc..0000000 --- a/rpms_to_install/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/yum.conf b/yum.conf index 24a7ad1..649311b 100644 --- a/yum.conf +++ b/yum.conf @@ -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 diff --git a/yum_repo_qubes/.gitignore b/yum_repo_qubes/.gitignore new file mode 100644 index 0000000..595ccdb --- /dev/null +++ b/yum_repo_qubes/.gitignore @@ -0,0 +1 @@ +fc*