diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | README | 10 | ||||
-rwxr-xr-x | arch.build | 15 | ||||
-rwxr-xr-x | arch.install | 7 |
5 files changed, 26 insertions, 22 deletions
@@ -1,6 +1,6 @@ pkgbase = buildstuff pkgdesc = Stuff to build packages in virtual machines - pkgver = 1.6 + pkgver = 2.1 pkgrel = 1 url = http://arch.vesath.org/ arch = any @@ -14,10 +14,10 @@ pkgbase = buildstuff source = LICENSE source = arch.build source = arch.install - sha256sums = 6225e9cd7dbd46692d3b3ebde37a182c05863459879e99dbca5b3a4125e5eb1d + sha256sums = f7ed61b7826b657ab32d715567642f86e824374e16d9637d40ffc7d21c7ecfae sha256sums = acf683446e1162104759b1a75d18859b1a36ac6f3eeabb241025d0e6c37c7960 - sha256sums = 42f56cebdfde7a6b4f2beb3917856d3eb37206f05f443468b6c0ddafa3dbf3a3 - sha256sums = ec9d9974fc65a670754f66aa16b6f64394fbf089685acae32e31d3727263f3ee + sha256sums = 82aafa6d8f46294d39686f2afe17b323db65f7fab0b239b740805046b13703cc + sha256sums = 90ecf020399db72ce0ac8e1eb05759652363c029c06616b770cd273b7923ae97 pkgname = buildstuff @@ -1,7 +1,7 @@ # Maintainer: Gaetan Bisson <bisson@archlinux.org> pkgname=buildstuff -pkgver=1.6 +pkgver=2.2 pkgrel=1 pkgdesc='Stuff to build packages in virtual machines' url='http://arch.vesath.org/' @@ -23,7 +23,7 @@ package() { install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } -sha256sums=('6225e9cd7dbd46692d3b3ebde37a182c05863459879e99dbca5b3a4125e5eb1d' +sha256sums=('f7ed61b7826b657ab32d715567642f86e824374e16d9637d40ffc7d21c7ecfae' 'acf683446e1162104759b1a75d18859b1a36ac6f3eeabb241025d0e6c37c7960' - '42f56cebdfde7a6b4f2beb3917856d3eb37206f05f443468b6c0ddafa3dbf3a3' - 'ec9d9974fc65a670754f66aa16b6f64394fbf089685acae32e31d3727263f3ee') + '82aafa6d8f46294d39686f2afe17b323db65f7fab0b239b740805046b13703cc' + '8201612c8e8f2dbae162e92d60cdca097aa17903a82ead09d3f7d0728bbfd064') @@ -5,9 +5,9 @@ From a directory that contains a PKGBUILD, run: arch.build i686 -This will build the package for the given architecture. You may also append a -list of repositories to use on top of [core], [extra], and [community], for -instance: +This will build the package for the given architecture. You may also +append a list of repositories to use on top of [core], [extra], and +[community], for instance: arch.build x86_64 testing multilib-testing multilib @@ -19,7 +19,9 @@ Enable hardware virtualization. Make /tmp a tmpfs. (This is where the copy-on-write drive is stored.) -Install a caching pacman mirror proxy on your local network and use it. +Use a fast package mirror, ideally a caching proxy on your local network. +Entries from /etc/pacman.d/mirrorlist are used as-is except that 127.0.0.1 gets +translated to 10.0.2.2 which is the host address from the qemu guest viewpoint. REQUIREMENTS FOR ARCH.INSTALL diff --git a/arch.build b/arch.build index ada45e0f4336..183bfefa3b04 100755 --- a/arch.build +++ b/arch.build @@ -23,8 +23,8 @@ vhost=" start_vm() { qemu-system-x86_64 \ - -cpu $cpu -smp 4 -m 4G \ - -accel kvm:tcg,thread=multi \ + -cpu $cpu -smp 4 -m 2G \ + -machine accel=kvm:tcg \ -device virtio-net,netdev=vlan \ -netdev user,id=vlan,hostfwd=::$vport-:22 \ -drive file=$1 & @@ -32,7 +32,7 @@ start_vm() { ssh $vhost 'curl -o /dev/null -s vesath.org' && break done - cat /etc/pacman.d/mirrorlist | + sed 's/127.0.0.1/10.0.2.2/g' /etc/pacman.d/mirrorlist | ssh $vhost 'sudo dd of=/etc/pacman.d/mirrorlist' } @@ -67,7 +67,7 @@ set -E start_vm $img ssh $vhost 'sudo pacman --noconfirm -Syu' ssh $vhost 'sudo pacman --noconfirm -Su' - ssh $vhost 'sudo paccache --remove --keep 0' + ssh $vhost 'sudo rm --force /var/cache/pacman/pkg/*' stop_vm } @@ -79,13 +79,14 @@ for r in $repo; do done | ssh $vhost ssh $vhost 'sudo pacman --noconfirm -Syu' ssh $vhost 'sudo pacman --noconfirm -Su' +ssh $vhost 'sudo rm --force /var/cache/pacman/pkg/*' +ssh $vhost 'sudo install -o user -g user -d /build' sftp $vhost <<<"mkdir .gnupg" sftp $vhost <<<"put $HOME/.makepkg.conf" sftp $vhost <<<"put $HOME/.gnupg/pubring.kbx .gnupg/pubring.kbx" -sftp $vhost <<<'put -r . build' -ssh $vhost 'sudo mv build /build' # fake chroot build for db-update +sftp $vhost <<<'put -r . /build' # fake chroot build for db-update ssh $vhost 'rm -fr /build/{src,pkg}' # fix source repo relocation ssh $vhost 'cd /build; makepkg --log --noconfirm --syncdeps' -sftp $vhost <<<'get /build/*.pkg.tar.xz' +sftp $vhost <<<'get /build/*.pkg.tar.*' sftp $vhost <<<'get /build/*.log' stop_vm diff --git a/arch.install b/arch.install index 862f4dfd7f1d..f34d8662ffa9 100755 --- a/arch.install +++ b/arch.install @@ -32,9 +32,9 @@ pushd ${mnt} install -d boot mount ${loop}p1 boot -setarch ${arch} pacstrap -C /usr/share/devtools/pacman-extra.conf -c . base base-devel pacman-contrib haveged openssh sudo syslinux -systemctl --root=. enable systemd-{networkd,resolved} haveged sshd +setarch ${arch} pacstrap -C /usr/share/devtools/pacman-extra.conf -c . base base-devel syslinux mkinitcpio haveged openssh sudo +systemctl --root=. enable systemd-{networkd,resolved} haveged sshd ln -sf ../run/systemd/resolve/resolv.conf etc/resolv.conf install -d home/user/.ssh @@ -70,14 +70,15 @@ EOF cat > etc/systemd/network/any.network <<EOF [Match] +Name=en* eth* usb* wl* [Network] DHCP=yes EOF setarch ${arch} arch-chroot . <<EOF +sudo pacman --noconfirm -S linux syslinux-install_update -i -m -mkinitcpio -p linux locale-gen useradd -p 00as1wm0AZG56 user chown -R user:users /home/user |