summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.Attic/README.old_stage240
-rw-r--r--TODOS10
-rwxr-xr-xbuild_stage2.sh24
-rwxr-xr-xbuild_stage2_package.sh14
-rw-r--r--i486-stage1/attr/DESCR1
-rw-r--r--i486-stage2/acl/DESCR2
-rw-r--r--i486-stage2/attr/DESCR3
-rw-r--r--i486-stage2/bash/DESCR0
-rw-r--r--i486-stage2/gettext/DESCR4
-rw-r--r--i486-stage2/libtool/DESCR3
-rw-r--r--i486-stage2/openssl/DESCR5
-rw-r--r--i486-stage2/which/DESCR0
12 files changed, 64 insertions, 42 deletions
diff --git a/.Attic/README.old_stage2 b/.Attic/README.old_stage2
index dd997af..6a04756 100644
--- a/.Attic/README.old_stage2
+++ b/.Attic/README.old_stage2
@@ -15,12 +15,7 @@
PACKAGES= \
\
\
-libffi glib2 libunistring gettext"
-
-# some binaries in the cross tools (also known as perl) have really
-# weird library pathes (and no rpath it seems)
-export LD_LIBRARY_PATH=/home/cross/x-tools/i486-unknown-linux-gnu/i486-unknown-linux-gnu/sysroot/usr/lib/:/home/cross/x-tools/i486-unknown-linux-gnu/i486-unknown-linux-gnu/sysroot/usr/lib/perl5/5.26/core_perl/CORE
-export PATH=/home/cross/x-tools/i486-unknown-linux-gnu/i486-unknown-linux-gnu/sysroot/bin:/home/cross/x-tools/i486-unknown-linux-gnu/i486-unknown-linux-gnu/sysroot/usr/bin:${PATH}
+libffi"
###
TODO FROM HERE
@@ -30,11 +25,9 @@ TODO FROM HERE
# libunistring for gettext
# libffi for glib2
pushd $HOME/x-tools/i486-unknown-linux-gnu/i486-unknown-linux-gnu/sysroot
- bsdtar xf $STAGE1_CHROOT/packages/i486/m4-1.4.18-1-i486.pkg.tar.gz
bsdtar xf $STAGE1_CHROOT/packages/i486/autoconf-2.69-4-any.pkg.tar.gz
bsdtar xf $STAGE1_CHROOT/packages/i486/automake-1.15.1-1-any.pkg.tar.gz
bsdtar xf $STAGE1_CHROOT/packages/i486/libffi-3.2.1-2-i486.pkg.tar.gz
- bsdtar xf $STAGE1_CHROOT/packages/i486/libunistring-0.9.7-1-i486.pkg.tar.gz
popd
cd ..
@@ -85,10 +78,6 @@ Native dependency 'libffi' not found
Aborting...
=> this is all very wrong!
-# gettext
-#########
-# remove glib2 from depends, not needed (why the hell is there anyway then?!?! just for fun?)
-
# libarchive calls autoreconf, this is quite annoying as perl in crosstool-nt or
###
# stil in phase two, no proper autotools, let's apply the out-of-chroot trick once more..
@@ -117,12 +106,7 @@ for p in $PACKAGES
# autoreconf needs autotools/m4 and dependencies (crosstool-ng autotools are broken for me)
# libunistring for gettext
# libffi for glib2
- bsdtar xf $STAGE1_CHROOT/packages/i486/m4-1.4.18-1-i486.pkg.tar.gz
- bsdtar xf $STAGE1_CHROOT/packages/i486/mpfr-3.1.6.p1-1-i486.pkg.tar.gz
- bsdtar xf $STAGE1_CHROOT/packages/i486/libmpc-1.0.3-2-i486.pkg.tar.gz
- bsdtar xf $STAGE1_CHROOT/packages/i486/gawk-4.1.4-2-i486.pkg.tar.gz
bsdtar xf $STAGE1_CHROOT/packages/i486/libffi-3.2.1-2-i486.pkg.tar.gz
- bsdtar xf $STAGE1_CHROOT/packages/i486/libunistring-0.9.7-1-i486.pkg.tar.gz
popd
cd ..
@@ -154,10 +138,6 @@ qemu-system-i386 --enable-kvm -cpu 486 -m 32 \
-netdev user,id=net0,net=10.0.0.0/24,host=10.0.0.2,dhcpstart=10.0.0.16,hostfwd=tcp::2222-:22 \
-device rtl8139,netdev=net0
-# very funny: uvesafb: failed to execute /sbin/v86d
-# Intel and ARM DRM modules:
-# BUG: unable to handle kernel NULL pointer dereference at (null)
-
PHASE 2
#######
@@ -183,24 +163,6 @@ arch-chroot /home/cross/i486-root/
# package specific things
-# iana-etc:
-download error https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml
-=> we miss /etc/ssl/certs/ca-certificates.crt from ca-certificates-utils, we
- can copy it from an existing archlinux
-
-# hack /usr/bin/makepkg, run_pacman again, this time set
-# --config /etc/pacman-i486.conf -r /
-
-# tzdata
-/build/tzdata/PKGBUILD: line 25: zic: command not found
-==> ERROR: A failure occurred in package().
- Aborting...
-=> forgot zig in the shim
-
-# ncurses
-# dlsym errors and we don't have a C++ compiler (yet)
-sed -i 's@./configure@./configure --without-dlsym@g' ncurses/PKGBUILD
-sed -i 's@--with-cxx-binding --with-cxx-shared@--without-cxx --without-cxx-binding --without-cxx-shared@g' ncurses/PKGBUILD
# perl
######
diff --git a/TODOS b/TODOS
index be32c1b..8c69d20 100644
--- a/TODOS
+++ b/TODOS
@@ -35,7 +35,9 @@ general bugs:
upstream PKGBUILD(s) change.
- stage 1 and stage 2 scripts have things in common which should probably
be dealt with not by copy pasting code
-
+- maybe we should not simply overwrite packages with the same version numbers,
+ have something like build/stage numbers as in Archlinux32.
+
stage1 issues:
- stage1: cdrom installs keyrings without having a gpg binary
- 32 MB is not enough when installing packages => add a swap as first action!
@@ -62,4 +64,10 @@ stage2 issues:
error: could not register 'temp' database (wrong or NULL argument passed)
error: no usable package repositories configured.
=> we cannot install via the [temp] repo
+- copying every single file is not a really smart idea:
+ do not copy expanded sources in 'src' from host to target
+ (our expectiation is makepkg -o -e would do the trick, but it doesn't)
+- git sources are a problem. we must package 'src' on the host and scp
+ it to a named package-git.tar.gz, then patch PKGBUILD to make it use
+ this local file instead of trying to checkout from git
diff --git a/build_stage2.sh b/build_stage2.sh
index 349f8cd..d9b48c2 100755
--- a/build_stage2.sh
+++ b/build_stage2.sh
@@ -9,7 +9,29 @@
# to the $STAGE2_PACKAGES to speed up rebuild of the state of the stage 1
# system in case of destroying it.
-PACKAGES="bash"
+PACKAGES="bash
+iana-etc filesystem linux-api-headers tzdata
+ncurses readline joe
+attr acl m4 gmp gdbm db perl openssl
+libunistring gettext perl-locale-gettext help2man
+autoconf automake libtool
+"
+
+#~ zlib pambase cracklib libtirpc pam libcap coreutils
+#~ util-linux e2fsprogs
+#~ expat bzip2 lz4 xz pcre less gzip tar libarchive curl
+#~ pacman-mirrorlist archlinux-keyring archlinux32-keyring pacman
+#~ elfutils
+#~ sed texinfo grep findutils file diffutils ed patch
+#~ fakeroot
+#~ kbd procps-ng shadow
+#~ inetutils bc kmod linux uinit nasm syslinux
+#~ net-tools libmnl libnfnetlink iptables iproute2
+#~ libedit openssh
+#~ make mpfr gawk libmpc binutils gcc glibc
+#~ libunwind strace gdb"
+
+# git
# build bash first as 'cd subpackage' in autoconf generated makefiles break
# with cross-compiled bash
diff --git a/build_stage2_package.sh b/build_stage2_package.sh
index feeb7f0..95ab857 100755
--- a/build_stage2_package.sh
+++ b/build_stage2_package.sh
@@ -81,18 +81,25 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l
# copy all files into the build area on the target machine
# (but the package DESCR file)
+
if test -d "$PACKAGE_DIR"; then
find "$PACKAGE_DIR"/* ! -name DESCR \
-exec cp {} . \;
fi
# execute makepkg on the host, we don't have git on the stage 1 machine (yet)
+ # we would actually like to have a mode like 'download, and noextract' but
+ # makepkg is not doing that (see -e and -o options)
+
makepkg --nobuild
+ rm -rf "$STAGE2_BUILD/$PACKAGE/src"
# copy everything to the stage 1 machine
+
scp -i $CROSS_HOME/.ssh/id_rsa -rC "$STAGE2_BUILD/$PACKAGE" build@$STAGE1_MACHINE_IP:/build/.
# building the actual package
+
ssh -i $CROSS_HOME/.ssh/id_rsa build@$STAGE1_MACHINE_IP bash -c "'cd $PACKAGE && makepkg --skipchecksums --skippgpcheck --nocheck'" > $PACKAGE.log 2>&1
RES=$?
@@ -135,10 +142,15 @@ if test "$(find "$STAGE2_PACKAGES" -regex ".*/$PACKAGE-.*pkg\\.tar\\.xz" | wc -l
tmp_dir=$(mktemp -d 'tmp.compute-dependencies.0.XXXXXXXXXX' --tmpdir)
trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
+ cd $STAGE2_BUILD || exit 1
mv "$STAGE2_BUILD/$PACKAGE/$PACKAGE.log" "$tmp_dir"
cd "$STAGE2_BUILD" || exit 1
rm -rf "$PACKAGE"
- scp -i $CROSS_HOME/.ssh/id_rsa -rC build@$STAGE1_MACHINE_IP:/build/"$PACKAGE" "$STAGE2_BUILD/."
+ ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "'cd /build && tar zcf $PACKAGE.tar.gz $PACKAGE/'"
+ scp -i $CROSS_HOME/.ssh/id_rsa -rC build@$STAGE1_MACHINE_IP:/build/"$PACKAGE.tar.gz" "$STAGE2_BUILD/."
+ ssh -i $CROSS_HOME/.ssh/id_rsa root@$STAGE1_MACHINE_IP bash -c "'cd /build && rm -f $PACKAGE.tar.gz'"
+ tar zxf "$PACKAGE.tar.gz"
+ rm -f "$PACKAGE.tar.gz"
mv "$tmp_dir/$PACKAGE.log" "$STAGE2_BUILD/$PACKAGE/."
mv -vf "$STAGE2_BUILD/$PACKAGE/"*.pkg.tar.xz "$STAGE2_PACKAGES/."
diff --git a/i486-stage1/attr/DESCR b/i486-stage1/attr/DESCR
index 98ab985..931c3c6 100644
--- a/i486-stage1/attr/DESCR
+++ b/i486-stage1/attr/DESCR
@@ -6,3 +6,4 @@ sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@g" PKG
# circular reference in getext (needed by attr, which needs also gettext)
sed -i 's@^makedepends\(.*\)@#makedepends\1@g' PKGBUILD
+sed -i "s@./configure@./configure --enable-gettext=no@g" PKGBUILD
diff --git a/i486-stage2/acl/DESCR b/i486-stage2/acl/DESCR
new file mode 100644
index 0000000..9c03adc
--- /dev/null
+++ b/i486-stage2/acl/DESCR
@@ -0,0 +1,2 @@
+# stage 1 has no gettext yet
+sed -i "s@./configure@./configure --enable-gettext=no@g" PKGBUILD
diff --git a/i486-stage2/attr/DESCR b/i486-stage2/attr/DESCR
new file mode 100644
index 0000000..c6f8f3e
--- /dev/null
+++ b/i486-stage2/attr/DESCR
@@ -0,0 +1,3 @@
+# circular reference in getext (needed by attr, which needs also gettext)
+sed -i 's@^makedepends\(.*\)@#makedepends\1@g' PKGBUILD
+sed -i "s@./configure@./configure --enable-gettext=no@g" PKGBUILD
diff --git a/i486-stage2/bash/DESCR b/i486-stage2/bash/DESCR
deleted file mode 100644
index e69de29..0000000
--- a/i486-stage2/bash/DESCR
+++ /dev/null
diff --git a/i486-stage2/gettext/DESCR b/i486-stage2/gettext/DESCR
new file mode 100644
index 0000000..a6a9ab3
--- /dev/null
+++ b/i486-stage2/gettext/DESCR
@@ -0,0 +1,4 @@
+# remove dependency on glib2 (which needs meson to build) and use
+# supplied one
+sed -i "/depends=/s/'glib2'//" PKGBUILD
+sed -i "s@./configure@./configure --with-included-glib@" PKGBUILD
diff --git a/i486-stage2/libtool/DESCR b/i486-stage2/libtool/DESCR
new file mode 100644
index 0000000..569e8a9
--- /dev/null
+++ b/i486-stage2/libtool/DESCR
@@ -0,0 +1,3 @@
+# we checkout on the host and scp to the target and don't use git on the target
+# (because we don't have it yet)
+sed -i "/makedepends=/s/git//" PKGBUILD
diff --git a/i486-stage2/openssl/DESCR b/i486-stage2/openssl/DESCR
new file mode 100644
index 0000000..69d65f7
--- /dev/null
+++ b/i486-stage2/openssl/DESCR
@@ -0,0 +1,5 @@
+sed -i "s@'i686'@'$TARGET_CPU'@g" PKGBUILD
+sed -i "s@'linux-elf'@'linux-generic32'@g" PKGBUILD
+sed -i 's@shared no-ssl3-method ${optflags}@shared ${optflags}@' PKGBUILD
+
+# pod2man fails during building of documentation, not dramatic, ignoring that.
diff --git a/i486-stage2/which/DESCR b/i486-stage2/which/DESCR
deleted file mode 100644
index e69de29..0000000
--- a/i486-stage2/which/DESCR
+++ /dev/null