From db55b0cb8ec387d6eca65eaebbd428fdc12510ba Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 30 Mar 2018 21:32:26 +0200 Subject: building up to gcc in stage4 --- README | 5 +++ build_stage4.sh | 64 +++++++++------------------------- i486-stage4/bluez/DESCR | 1 + i486-stage4/boost/DESCR | 4 +++ i486-stage4/dbus/DESCR | 5 +++ i486-stage4/gcc/DESCR | 23 ++++++++++++ i486-stage4/glib2/DESCR | 18 ++++++++++ i486-stage4/libaio/DESCR | 4 +++ i486-stage4/links/DESCR | 8 +++++ i486-stage4/meson/DESCR | 2 ++ i486-stage4/python-appdirs/DESCR | 6 ++++ i486-stage4/python-packaging/DESCR | 11 ++++++ i486-stage4/python-pip-bootstrap/DESCR | 6 ++++ i486-stage4/python-pip/DESCR | 10 ++++++ i486-stage4/python-pyparsing/DESCR | 22 ++++++++++++ i486-stage4/python-setuptools/DESCR | 11 ++++++ i486-stage4/python-six/DESCR | 13 +++++++ i486-stage4/python/DESCR | 15 ++++++++ i486-stage4/python2/DESCR | 15 ++++++++ i486-stage4/systemd/DESCR | 29 +++++++++++++++ 20 files changed, 225 insertions(+), 47 deletions(-) create mode 100644 i486-stage4/bluez/DESCR create mode 100644 i486-stage4/boost/DESCR create mode 100644 i486-stage4/dbus/DESCR create mode 100644 i486-stage4/gcc/DESCR create mode 100644 i486-stage4/glib2/DESCR create mode 100644 i486-stage4/libaio/DESCR create mode 100644 i486-stage4/links/DESCR create mode 100644 i486-stage4/meson/DESCR create mode 100644 i486-stage4/python-appdirs/DESCR create mode 100644 i486-stage4/python-packaging/DESCR create mode 100644 i486-stage4/python-pip-bootstrap/DESCR create mode 100644 i486-stage4/python-pip/DESCR create mode 100644 i486-stage4/python-pyparsing/DESCR create mode 100644 i486-stage4/python-setuptools/DESCR create mode 100644 i486-stage4/python-six/DESCR create mode 100644 i486-stage4/python/DESCR create mode 100644 i486-stage4/python2/DESCR create mode 100644 i486-stage4/systemd/DESCR diff --git a/README b/README index 49680d8..397b2b6 100644 --- a/README +++ b/README @@ -263,3 +263,8 @@ su cross ./prepare_stage4_repo.sh # in $STAGE4_BUILD. ./build_stage4.sh + +# Some testing is impossible to do in stage4: +# - some python modules are virtually untestable due to excessive dependencies +# e.g, python-packaging + diff --git a/build_stage4.sh b/build_stage4.sh index 6c4836c..19eb02e 100755 --- a/build_stage4.sh +++ b/build_stage4.sh @@ -50,7 +50,7 @@ perl-mime-charset libdatrie libthai perl-unicode-linebreak po4a fakeroot fakechroot pacman elfutils sed texinfo grep findutils file diffutils ed patch -check kbd procps-ng bison shadow +check kbd bison shadow mkinitcpio-busybox mkinitcpio inetutils bc hwids pciutils kmod linux linux-firmware uinit nasm ucl upx syslinux @@ -60,68 +60,38 @@ which libatomic_ops gc guile make guile2.0 gdb libunwind strace groff libseccomp man-db man-pages -popt logrotate psmisc linux-atm iproute2 iputils sudo +popt logrotate psmisc linux-atm iputils sudo libcap-ng libidn2 libnghttp2 libpsl libpipeline libmicrohttpd libssh2 argon2 json-c cryptsetup s-nail quota-tools perl-xml-parser intltool -gperf +gperf mdadm +python re2c ninja python2 +python-pip python-pyparsing python-packaging python-appdirs python-six +python-setuptools +meson +systemd dbus libusb usbutils +libical alsa-lib bluez libpcap libnftnl iptables iproute2 util-linux +procps-ng pcmciautils openresolv netctl dhcpcd +desktop-file-utils glib2 pkg-config +jfsutils reiserfsprogs xfsprogs sysfsutils +libaio boost thin-provisioning-tools lvm2 +mpfr gawk libmpc binutils gcc +links licenses " -#~ mpfr gawk libmpc binutils gcc glibc +#~ glibc #~ -#~ jfsutils -#~ mdadm -#~ reiserfsprogs -#~ xfsprogs -#~ sysfsutils - -#~ python -#~ re2c python2 ninja -#~ python-pip-bootstrap python-pip -#~ python-pyparsing python-packaging python-appdirs python-six python-setuptools -#~ meson - -#~ systemd dbus libusb usbutils libpcap libnftnl iptables iproute2 util-linux -#~ procps-ng pcmciautils openresolv netctl dhcpcd - -#~ glib2 pkg-config #~ zip nspr gyp nss -#~ libaio boost -#~ thin-provisioning-tools lvm2 -#~ " - -#~ stage2: -#~ PACKAGES=" -#~ -#~ mpfr gawk libmpc binutils gcc glibc -#~ " +#~ glibc # Archlinux base, base-devel groups -#~ device-mapper -#~ dhcpcd -#~ gawk #~ gcc-libs #~ glibc #~ -#~ jfsutils #~ licenses -#~ lvm2 -#~ mdadm -#~ netctl -#~ sysfsutils -#~ systemd-sysvcompat -#~ usbutils -#~ pcmciautils -#~ reiserfsprogs -#~ xfsprogs - -#~ binutils -#~ gawk -#~ gcc -#~ systemd for p in $PACKAGES; do "$SCRIPT_DIR/build_stage4_package.sh" "$p" || exit 1 diff --git a/i486-stage4/bluez/DESCR b/i486-stage4/bluez/DESCR new file mode 100644 index 0000000..49bfa58 --- /dev/null +++ b/i486-stage4/bluez/DESCR @@ -0,0 +1 @@ +ADDITIONAL_INSTALL_PACKAGE=bluez-libs diff --git a/i486-stage4/boost/DESCR b/i486-stage4/boost/DESCR new file mode 100644 index 0000000..75d98b7 --- /dev/null +++ b/i486-stage4/boost/DESCR @@ -0,0 +1,4 @@ +# no openmpi, no numpy +sed -i "/makedepends=/s/'openmpi'//" PKGBUILD +sed -i "/makedepends=/s/'python-numpy'//" PKGBUILD +sed -i "/makedepends=/s/'python2-numpy'//" PKGBUILD diff --git a/i486-stage4/dbus/DESCR b/i486-stage4/dbus/DESCR new file mode 100644 index 0000000..d49f085 --- /dev/null +++ b/i486-stage4/dbus/DESCR @@ -0,0 +1,5 @@ +# no documentation +sed -i "/makedepends=/s/docbook-xsl//" PKGBUILD +sed -i "/makedepends=/s/yelp-tools//" PKGBUILD +sed -i "/makedepends=/s/doxygen//" PKGBUILD +sed -i "/makedepends=/s/graphviz//" PKGBUILD diff --git a/i486-stage4/gcc/DESCR b/i486-stage4/gcc/DESCR new file mode 100644 index 0000000..41ec1e1 --- /dev/null +++ b/i486-stage4/gcc/DESCR @@ -0,0 +1,23 @@ +# no doxygen documentation +sed -i "/makedepends=/s/doxygen//" PKGBUILD +sed -i 's/doc-man-doxygen//' PKGBUILD +sed -i 's/doc-install-man//' PKGBUILD +sed -i '/# make documentation/{n;s/make/#make/}' PKGBUILD +sed -i '/# install the libstdc++ man pages/{n;s/make/#make/}' PKGBUILD + +# no ADA +sed -i "/makedepends=/s/gcc-ada//" PKGBUILD +sed -i '/pkgname/ s/gcc-ada//g' PKGBUILD +sed -i '/enable-languages/ s/ada//g' PKGBUILD +# rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info +sed -i 's/,gnat-style,gnat_rm,gnat_ugn//' PKGBUILD + +# building toolchain (gcc): again, lobtool problems +#/usr/lib/gcc/i486-pc-linux-gnu/7.3.0/ld: cannot find -lquadmath +#collect2: error: ld returned 1 exit status +#libtool: install: error: relink `libgfortran.la' with the above command before installing it +#make: Leaving directory '/build/gcc/src/gcc-build/i486-pc-linux-gnu/libgfortran' +#=> wrong link order: libgfortran requires libquadmath +sed -i 's/libgfortran \\/libquadmath libgfortran \\/g' PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE="gcc-libs gcc-fortran gcc-go gcc-objc" diff --git a/i486-stage4/glib2/DESCR b/i486-stage4/glib2/DESCR new file mode 100644 index 0000000..3a9314d --- /dev/null +++ b/i486-stage4/glib2/DESCR @@ -0,0 +1,18 @@ +# no documentation +sed -i "/makedepends=/s/gtk-doc//" PKGBUILD +sed -i 's/--enable-gtk-doc//' PKGBUILD +sed -i 's/\(mv gtk-doc\)/#\1/' PKGBUILD +sed -i 's@\(mv.*usr/share/gtk-doc\)@#\1@' PKGBUILD + +# failing tests: +# TOTAL: 3823 +# PASS: 3809 +# SKIP: 12 +# XFAIL: 0 +# FAIL: 0 +# XPASS: 0 +# ERROR: 2 +# +# ERROR: timer - too few tests run (expected 7, got 0) +# ERROR: timer - exited with status 134 (terminated by signal 6?) +SKIP_CHECK=1 diff --git a/i486-stage4/libaio/DESCR b/i486-stage4/libaio/DESCR new file mode 100644 index 0000000..7eb306d --- /dev/null +++ b/i486-stage4/libaio/DESCR @@ -0,0 +1,4 @@ +# see also FS32#30 +# compat-0_1.c:(.text+0xaf): undefined reference to `__stack_chk_fail_local' +sed -i 's/\(CFLAGS=.*\)/#\1/' PKGBUILD +sed -i 's@make$@CFLAGS="-march=${CARCH/_/-} -mtune=generic -O2 -pipe -fno-stack-protector" make@' PKGBUILD diff --git a/i486-stage4/links/DESCR b/i486-stage4/links/DESCR new file mode 100644 index 0000000..5a3c9bd --- /dev/null +++ b/i486-stage4/links/DESCR @@ -0,0 +1,8 @@ +# no X11 or graphic libraries +sed -i "/makedepends=/s/'libtiff'//" PKGBUILD +sed -i "/makedepends=/s/'libpng'//" PKGBUILD +sed -i "/makedepends=/s/'libxt'//" PKGBUILD +sed -i "/makedepends=/s/'librsvg'//" PKGBUILD + +# disable xlinks (or rather, compile it the same way as links) +sed -i 's/--enable-graphics --with-x --with-fb/--disable-graphics --without-x --without-fb/' PKGBUILD diff --git a/i486-stage4/meson/DESCR b/i486-stage4/meson/DESCR new file mode 100644 index 0000000..7c021fc --- /dev/null +++ b/i486-stage4/meson/DESCR @@ -0,0 +1,2 @@ +# too many dependencies +SKIP_CHECK=1 diff --git a/i486-stage4/python-appdirs/DESCR b/i486-stage4/python-appdirs/DESCR new file mode 100644 index 0000000..f90e0ea --- /dev/null +++ b/i486-stage4/python-appdirs/DESCR @@ -0,0 +1,6 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-setuptools'//" PKGBUILD +sed -i "/makedepends=/s/'python2-setuptools'//" PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-appdirs diff --git a/i486-stage4/python-packaging/DESCR b/i486-stage4/python-packaging/DESCR new file mode 100644 index 0000000..08e7b3a --- /dev/null +++ b/i486-stage4/python-packaging/DESCR @@ -0,0 +1,11 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-setuptools'//" PKGBUILD +sed -i "/makedepends=/s/'python2-setuptools'//" PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-packaging + +# testing virtually impossible because of tons of dependencies! +sed -i 's/checkdepends=/#checkdepends=/' PKGBUILD + +SKIP_CHECK=1 diff --git a/i486-stage4/python-pip-bootstrap/DESCR b/i486-stage4/python-pip-bootstrap/DESCR new file mode 100644 index 0000000..86aaf38 --- /dev/null +++ b/i486-stage4/python-pip-bootstrap/DESCR @@ -0,0 +1,6 @@ +# shim to bootstrap python pip, bootstrap, wheel + +FETCH_METHOD="yaourt" + +ADDITIONAL_INSTALL_PACKAGE=python2-pip-bootstrap + diff --git a/i486-stage4/python-pip/DESCR b/i486-stage4/python-pip/DESCR new file mode 100644 index 0000000..bda9341 --- /dev/null +++ b/i486-stage4/python-pip/DESCR @@ -0,0 +1,10 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-setuptools'//" PKGBUILD +sed -i "/makedepends=/s/'python2-setuptools'//" PKGBUILD +sed -i "/depends=/s/'python-setuptools'//" PKGBUILD +sed -i "/depends=/s/'python2-setuptools'//" PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-pip + +FORCE=1 diff --git a/i486-stage4/python-pyparsing/DESCR b/i486-stage4/python-pyparsing/DESCR new file mode 100644 index 0000000..8c68470 --- /dev/null +++ b/i486-stage4/python-pyparsing/DESCR @@ -0,0 +1,22 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-setuptools'//" PKGBUILD +sed -i "/makedepends=/s/'python2-setuptools'//" PKGBUILD + +# we don't want subversion, take official tarball +sed -i "/makedepends=/s/'subversion'//" PKGBUILD +sed -i 's@source=.*@source=(https://pypi.python.org/packages/3c/ec/a94f8cf7274ea60b5413df054f82a8980523efd712ec55a59e7c3357cf7c/pyparsing-2.2.0.tar.gz#md5=0214e42d63af850256962b6744c948d9)@' PKGBUILD +sed -i 's/pyparsing_$pkgver/pyparsing-$pkgver/g' PKGBUILD +sed -i 's@pyparsing-$pkgver/src@pyparsing-$pkgver@g' PKGBUILD +sed -i 's@pyparsing-$pkgver-py2/src@pyparsing-$pkgver-py2@g' PKGBUILD + +# remove a really weird sed +sed -i 's/sed/#sed/g' PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-pyparsing + +# check() fails, calling a unit test script which doesn't exist +#python: can't open file 'unitTests.py': [Errno 2] No such file or directory +#==> ERROR: A failure occurred in check(). +# Aborting... +SKIP_CHECK=1 diff --git a/i486-stage4/python-setuptools/DESCR b/i486-stage4/python-setuptools/DESCR new file mode 100644 index 0000000..9ae5577 --- /dev/null +++ b/i486-stage4/python-setuptools/DESCR @@ -0,0 +1,11 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-pip'//" PKGBUILD +sed -i "/makedepends=/s/'python2-pip'//" PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-setuptools + +# testing not possible +SKIP_CHECK=1 + +FORCE=1 diff --git a/i486-stage4/python-six/DESCR b/i486-stage4/python-six/DESCR new file mode 100644 index 0000000..97ea14e --- /dev/null +++ b/i486-stage4/python-six/DESCR @@ -0,0 +1,13 @@ +# we bootstrap via python-pip-bootstrap, so we can not depend on the +# cycle introduced by low-level python modules +sed -i "/makedepends=/s/'python-pip'//" PKGBUILD +sed -i "/makedepends=/s/'python2-pip'//" PKGBUILD +sed -i "/makedepends=/s/'python-setuptools'//" PKGBUILD +sed -i "/makedepends=/s/'python2-setuptools'//" PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=python2-six + +# testing virtually impossible because of tons of dependencies! +sed -i 's/checkdepends=/#checkdepends=/' PKGBUILD + +SKIP_CHECK=1 diff --git a/i486-stage4/python/DESCR b/i486-stage4/python/DESCR new file mode 100644 index 0000000..34cd9f1 --- /dev/null +++ b/i486-stage4/python/DESCR @@ -0,0 +1,15 @@ +# remove dependency on most things, we want only a simple interpreter +# a little bit smarter than a shell for building and code generation +sed -i "/makedepends=/s/'tk'//" PKGBUILD +sed -i "/makedepends=/s/'bluez-libs'//" PKGBUILD +sed -i "/makedepends=/s/'llvm'//" PKGBUILD + +# do not start X servers just for building software! +sed -i "/makedepends=/s/'xorg-server-xvfb'//" PKGBUILD +sed -i "s/\(export servernum=99\)/#\1/" PKGBUILD +sed -i "s/\(while\)/#\1/" PKGBUILD +sed -i 's@LC_CTYPE=en_US.UTF-8 xvfb-run -a -n "$servernum" make EXTRA_CFLAGS="$CFLAGS"@LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS"@g' PKGBUILD + +# skip check(), regression testing was done before +SKIP_CHECK=1 + diff --git a/i486-stage4/python2/DESCR b/i486-stage4/python2/DESCR new file mode 100644 index 0000000..34cd9f1 --- /dev/null +++ b/i486-stage4/python2/DESCR @@ -0,0 +1,15 @@ +# remove dependency on most things, we want only a simple interpreter +# a little bit smarter than a shell for building and code generation +sed -i "/makedepends=/s/'tk'//" PKGBUILD +sed -i "/makedepends=/s/'bluez-libs'//" PKGBUILD +sed -i "/makedepends=/s/'llvm'//" PKGBUILD + +# do not start X servers just for building software! +sed -i "/makedepends=/s/'xorg-server-xvfb'//" PKGBUILD +sed -i "s/\(export servernum=99\)/#\1/" PKGBUILD +sed -i "s/\(while\)/#\1/" PKGBUILD +sed -i 's@LC_CTYPE=en_US.UTF-8 xvfb-run -a -n "$servernum" make EXTRA_CFLAGS="$CFLAGS"@LC_CTYPE=en_US.UTF-8 make EXTRA_CFLAGS="$CFLAGS"@g' PKGBUILD + +# skip check(), regression testing was done before +SKIP_CHECK=1 + diff --git a/i486-stage4/systemd/DESCR b/i486-stage4/systemd/DESCR new file mode 100644 index 0000000..d78a0a3 --- /dev/null +++ b/i486-stage4/systemd/DESCR @@ -0,0 +1,29 @@ +# TODO: how can we import source keys: pacman-key --recv-keys 63CDA1E5D3FC22B998D20DD6327F26951A015CC4 +# automatically, sort of counteracts the idea of security.. +sed -i 's/\(_validate_tag || return\)/#\1/' PKGBUILD + +# no documentation +sed -i '/makedepends=/,/)/ s/docbook-xsl//' PKGBUILD +sed -i '/makedepends=/,/)/ s/libxslt//' PKGBUILD +sed -i '/makedepends=/,/)/ s/python-lxml//' PKGBUILD +sed -i 's/\(rm.*man8\)/#\1/' PKGBUILD + +# we don't need systemd-sysvcompat +#sed -i "/pkgname=/,/)/ s/'systemd-sysvcompat'//" PKGBUILD + +# break cyclic dependency with cryptsetup and dbus +#sed -i '/makedepends=/,/)/ s/cryptsetup//' PKGBUILD +#sed -i "/depends=/,/)/ s/'cryptsetup'//" PKGBUILD +#sed -i "/depends=/,/)/ s/'dbus'//" PKGBUILD + +# we build without verifying PGP keys, so disable git tag valication +#sed -i 's/\(_validate_tag || return\)/#\1/' PKGBUILD + +# disable EFI support, we build for old machines with a PC BIOS +sed -i '/makedepends=/,/)/ s/gnu-efi-libs//' PKGBUILD +sed -i 's/-Dgnuefi=true/-Dgnuefi=false/g' PKGBUILD + +# disable LTO support for now +sed -i '/-Dsysvrcnd-path=/ a \ -Db_lto=false' PKGBUILD + +ADDITIONAL_INSTALL_PACKAGE=libsystemd -- cgit v1.2.3-70-g09d2