From ab29c5020bc55511fc3456319d428ff154a290f4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 18 May 2014 20:02:40 +0200 Subject: .. --- README | 16 ++++++++++++++-- archauto.sh | 32 +++++++++++++++++--------------- copy_local_packages.sh | 10 +++++----- 3 files changed, 36 insertions(+), 22 deletions(-) diff --git a/README b/README index 0c729c2..e81df79 100644 --- a/README +++ b/README @@ -46,11 +46,23 @@ Custom software from AUR 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 +rm -rf INSTALL +mkdir INSTALL +cd install +yaourt -G qdbm +cd qdbm +makepkg --asroot -if +cd .. +yaourt -G cfengine +cd cfengine +makepkg --asroot -if +cd .. Put them into a local repository 'aba': +mkdir -p aba/os/x86_64/ +cp INSTALL/*/*pkg.tar.xz aba/os/x86_64/. + mkdir -p aba/os/x86_64/ repo-add aba/os/x86_64/aba.db.tar.gz aba/os/x86_64/* diff --git a/archauto.sh b/archauto.sh index cdf2e16..6a247af 100755 --- a/archauto.sh +++ b/archauto.sh @@ -55,7 +55,7 @@ sed -i '/\[extra\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/ 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 +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 @@ -92,33 +92,35 @@ arch-chroot ${MOUNT_PATH} sh -c "echo 'root:123qwe' | chpasswd" # synchronized time is a requirement, install and configure ntp # we use a standard NTP server, later we can change that via cfengine +# we don't have a network here (yet, still chrooted) arch-chroot ${MOUNT_PATH} pacman --noconfirm -S ntp -arch-chroot ${MOUNT_PATH} ntpdate 0.pool.ntp.org +#while ! ping -c1 0.pool.ntp.org &>/dev/null; do :; done +#arch-chroot ${MOUNT_PATH} ntpdate 0.pool.ntp.org arch-chroot ${MOUNT_PATH} systemctl enable ntpd.service # monitord needs netstat -#arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools +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 -S git -#arch-chroot ${MOUNT_PATH} pacman --noconfirm -S cfengine +arch-chroot ${MOUNT_PATH} pacman --noconfirm -S cfengine # install rules for the machine from git +# no net, must be done as cfengine rule, anyway, rule distribution should +# happen only on generated cfengine masters #arch-chroot ${MOUNT_PATH} git clone ${GIT_REPO} /srv/cfengine/masterfiles -# create machine keys -#arch-chroot ${MOUNT_PATH} cf-key - # enable cfengine -#arch-chroot ${MOUNT_PATH} systemctl enable cf-execd.service -#arch-chroot ${MOUNT_PATH} systemctl enable cf-monitord.service -#arch-chroot ${MOUNT_PATH} systemctl enable cf-serverd.service +arch-chroot ${MOUNT_PATH} systemctl enable cf-execd.service +arch-chroot ${MOUNT_PATH} systemctl enable cf-monitord.service +arch-chroot ${MOUNT_PATH} systemctl enable cf-serverd.service # for debugging -echo "Installation.. press any key to reboot." -read +#echo "Installation.. press any key to reboot." +#read -echo "Done." +echo "Done.. Rebooting system.." +sleep 3 -systemctl poweroff +systemctl reboot diff --git a/copy_local_packages.sh b/copy_local_packages.sh index 6764c1c..99609db 100755 --- a/copy_local_packages.sh +++ b/copy_local_packages.sh @@ -17,7 +17,7 @@ for p in `cat archiso/arch/pkglist.x86_64.txt`; do esac done -ADDITIONAL_PKGS="libunistring-0.9.3-6" +ADDITIONAL_PKGS="libunistring-0.9.3-6 ntp-4.2.7.p441-1 joe-3.7-4 git-1.9.2-1 perl-error-0.17022-1 libxml2-2.9.1-5" for pkgname in $ADDITIONAL_PKGS; do if test -f /var/cache/pacman/pkg/$pkgname*x86_64.pkg.tar.xz; then cp /var/cache/pacman/pkg/$pkgname*x86_64.pkg.tar.xz core/os/x86_64/. @@ -27,9 +27,9 @@ for pkgname in $ADDITIONAL_PKGS; do fi done -repo-add core/os/x86_64/core.db.tar.gz core/os/x86_64/* -ln -s core.db.tar.gz core/os/x86_64/core.db +repo-add -n core/os/x86_64/core.db.tar.gz core/os/x86_64/* +ln -fs core.db.tar.gz core/os/x86_64/core.db tar zcvfT extra/os/x86_64/extra.db.tar.gz /dev/null -ln -s extra.db.tar.gz extra/os/x86_64/extra.db +ln -fs 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 +ln -fs community.db.tar.gz community/os/x86_64/community.db -- cgit v1.2.3-54-g00ecf