From abb35bcb7795cd14bd00387bfd8dc82eeff5b047 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 17 May 2013 12:12:39 +0200 Subject: small local repo fixes --- README | 7 +++++++ TODOS | 4 ++++ archauto.sh | 13 +++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README b/README index cfdc8b5..0f4d01a 100644 --- a/README +++ b/README @@ -34,7 +34,9 @@ We can also make available the packages on this webserver: mkdir -p {core,extra,community}/os/x86_64/ repo-add core/os/x86_64/core.db.tar.gz core/os/x86_64/* tar zcvfT extra/os/x86_64/extra.db.tar.gz /dev/null +ln -s extra.db.tar.gz extra/os/x86_64/extra.db tar zcvfT community/os/x86_64/community.db.tar.gz /dev/null +ln -s community.db.tar.gz community/os/x86_64/community.db TFTP root -------- @@ -55,6 +57,11 @@ Build the following packages from AUR: qdbm-1.8.78-1-x86_64.pkg.tar.xz cfengine-3.4.4-2-x86_64.pkg.tar.xz +Put them into a local repository 'aba': + +mkdir -p aba/os/x86_64/ +repo-add aba/os/x86_64/aba.db.tar.gz aba/os/x86_64/* + Install Archlinux ----------------- diff --git a/TODOS b/TODOS index a692f6d..c372ef7 100644 --- a/TODOS +++ b/TODOS @@ -4,3 +4,7 @@ - minimal set of cfengine rules, in a readonly/protected git server, the main point of administration - local mirrors, not for speed, but for controlled update + => script to keep only the necessary files in sync, not more +- libvirt or qemu +- how to change names of machines? +- how to make clones? diff --git a/archauto.sh b/archauto.sh index 3974678..0463eac 100755 --- a/archauto.sh +++ b/archauto.sh @@ -41,6 +41,8 @@ export no_proxy=localhost,10.0.2.2 # use our local cache sed -i '/\[core\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' /etc/pacman.conf +sed -i '/\[extra\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' /etc/pacman.conf +sed -i '/\[community\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' /etc/pacman.conf # switch off signature for now sed -i 's/^SigLevel.*/SigLevel = Never/g' /etc/pacman.conf @@ -49,6 +51,14 @@ pacstrap ${MOUNT_PATH} filesystem grep findutils coreutils glibc bash pacman mki # use our local cache in installed pacman sed -i '/\[core\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/etc/pacman.conf +sed -i '/\[extra\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/etc/pacman.conf +sed -i '/\[community\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/etc/pacman.conf + +# add our local packages into a separate repository +printf "\n[aba]\nServer = http://10.0.2.2:8080/\044repo/os/\044arch\n" >> ${MOUNT_PATH}/etc/pacman.conf + +# synchronize package databases for installed pacman +arch-chroot ${MOUNT_PATH} pacman -Sy # switch off signature for now in installed pacman sed -i 's/^SigLevel.*/SigLevel = Never/g' ${MOUNT_PATH}/etc/pacman.conf @@ -92,8 +102,7 @@ arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools # we use 'git' to manage our promises arch-chroot ${MOUNT_PATH} pacman --noconfirm -S git-core -arch-chroot ${MOUNT_PATH} pacman --noconfirm -v -U http://10.0.2.2:8080/qdbm-1.8.78-1-x86_64.pkg.tar.xz -arch-chroot ${MOUNT_PATH} pacman --noconfirm -v -U http://10.0.2.2:8080/cfengine-3.4.4-2-x86_64.pkg.tar.xz +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S cfengine # install rules for the machine from git arch-chroot ${MOUNT_PATH} git clone ${GIT_REPO} /srv/cfengine/masterfiles -- cgit v1.2.3-54-g00ecf