Commit 6b926f3a authored by Dan Johansen's avatar Dan Johansen

[buildarmpkg] use the new mirror structure

Buildarmpkg has a set mirror it uses for creating the rootfs.
This mirror uses the old repo structure and as such will 404 when trying to download the databases.

So make buildarmpkg use the new mirror structure.
And also remove the creation of ARM mirrorlist on the host, since it's not doing anything.
The mirrorlist from the pacman.conf.aaarch64 gets used instead.

Also prepare for some branch support. Default branch is set to stable.
Signed-off-by: Dan Johansen's avatarDan Johansen <strit@manjaro.org>
parent 070129da
......@@ -2,6 +2,7 @@
#variables
SERVER='159.65.88.73'
BRANCH='stable'
LIBDIR=/usr/share/manjaro-arm-tools/lib
BUILDDIR=/var/lib/manjaro-arm-tools/pkg
PACKAGER=$(cat /etc/makepkg.conf | grep PACKAGER)
......@@ -239,25 +240,13 @@ create_rootfs_pkg() {
rm -rf $BUILDDIR/$ARCH
fi
msg "Creating rootfs..."
# backup host mirrorlist
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-orig
# Create arm mirrorlist
echo "Server = http://manjaro-arm.moson.eu/\$branch/\$arch/\$repo/" > mirrorlist
mv mirrorlist /etc/pacman.d/mirrorlist
# cd to root_fs
mkdir -p $BUILDDIR/$ARCH
# basescrap the rootfs filesystem
#sed -i s/"Server = https://manjaro-arm.moson.eu/stable/$repo/$arch"/"Server = https://manjaro-arm.moson.eu/$BRANCH/$repo/$arch"/ $LIBDIR/pacman.conf.$ARCH
basestrap -G -C $LIBDIR/pacman.conf.$ARCH $BUILDDIR/$ARCH base-devel
# Enable cross architecture Chrooting
cp /usr/bin/qemu-aarch64-static $BUILDDIR/$ARCH/usr/bin/
# restore original mirrorlist to host system
mv /etc/pacman.d/mirrorlist-orig /etc/pacman.d/mirrorlist
pacman -Syy
msg "Configuring rootfs for building..."
$NSPAWN $BUILDDIR/$ARCH pacman-key --init 1> /dev/null 2>&1
......
......@@ -68,15 +68,15 @@ LocalFileSigLevel = Optional
[core]
#Include = /etc/pacman.d/mirrorlist
Server = https://manjaro-arm.moson.eu/stable/$arch/$repo
Server = https://manjaro-arm.moson.eu/stable/$repo/$arch
[extra]
#Include = /etc/pacman.d/mirrorlist
Server = https://manjaro-arm.moson.eu/stable/$arch/$repo
Server = https://manjaro-arm.moson.eu/stable/$repo/$arch
[community]
#Include = /etc/pacman.d/mirrorlist
Server = https://manjaro-arm.moson.eu/stable/$arch/$repo
Server = https://manjaro-arm.moson.eu/stable/$repo/$arch
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment