git » base-pkgbuilds.git » commit 9a2b0aa

aarch64 build

author Urja (ARMLFS builder)
2024-07-12 16:07:28 UTC
committer Urja (ARMLFS builder)
2024-07-12 16:07:28 UTC
parent 9d44ab68260455944921e28bb5aa3c35d2254a8c

aarch64 build

aarch64-makepkg.conf +163 -0
base-makepkg.conf => armv7h-makepkg.conf +0 -0
build-in-order.py +1 -1
cross-makepkg.conf +1 -1
makepkg.sh +1 -1
mpkg.sh +6 -1
order +1 -0
order64 +497 -0
pkg-repo.sh +8 -3
pkg-spawner.sh +7 -1

diff --git a/aarch64-makepkg.conf b/aarch64-makepkg.conf
new file mode 100644
index 0000000..e3f0827
--- /dev/null
+++ b/aarch64-makepkg.conf
@@ -0,0 +1,163 @@
+#!/hint/bash
+#
+# /etc/makepkg.conf
+#
+
+#########################################################################
+# SOURCE ACQUISITION
+#########################################################################
+#
+#-- The download utilities that makepkg should use to acquire sources
+#  Format: 'protocol::agent'
+DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
+          'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
+          'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+          'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
+          'rsync::/usr/bin/rsync --no-motd -z %u %o'
+          'scp::/usr/bin/scp -C %u %o')
+
+# Other common tools:
+# /usr/bin/snarf
+# /usr/bin/lftpget -c
+# /usr/bin/wget
+
+#-- The package required by makepkg to download VCS sources
+#  Format: 'protocol::package'
+VCSCLIENTS=('bzr::breezy'
+            'fossil::fossil'
+            'git::git'
+            'hg::mercurial'
+            'svn::subversion')
+
+#########################################################################
+# ARCHITECTURE, COMPILE FLAGS
+#########################################################################
+#
+CARCH="aarch64"
+CHOST="aarch64-unknown-linux-gnu"
+
+#-- Compiler and Linker Flags
+#CPPFLAGS=""
+CFLAGS="-march=armv8-a -O2 -pipe"
+CXXFLAGS="-march=armv8-a -O2 -pipe -Wno-psabi"
+LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
+#RUSTFLAGS="-C opt-level=2"
+
+#-- Make Flags: change this for DistCC/SMP systems
+MAKEFLAGS="-j$(( $(nproc) + 1 ))"
+#-- Debugging flags
+DEBUG_CFLAGS="-g"
+DEBUG_CXXFLAGS="-g"
+DEBUG_RUSTFLAGS="-C debuginfo=2"
+
+#########################################################################
+# BUILD ENVIRONMENT
+#########################################################################
+#
+# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
+#  A negated environment option will do the opposite of the comments below.
+#
+#-- distcc:   Use the Distributed C/C++/ObjC compiler
+#-- color:    Colorize output messages
+#-- ccache:   Use ccache to cache compilation
+#-- check:    Run the check() function if present in the PKGBUILD
+#-- sign:     Generate PGP signature file
+#
+BUILDENV=(!distcc color !ccache check !sign)
+#
+#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
+#-- specify a space-delimited list of hosts running in the DistCC cluster.
+#DISTCC_HOSTS=""
+#
+#-- Specify a directory for package building.
+#BUILDDIR=/tmp/makepkg
+
+#########################################################################
+# GLOBAL PACKAGE OPTIONS
+#   These are default values for the options=() settings
+#########################################################################
+#
+# Makepkg defaults:
+# OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
+#  A negated option will do the opposite of the comments below.
+#
+#-- strip:      Strip symbols from binaries/libraries
+#-- docs:       Save doc directories specified by DOC_DIRS
+#-- libtool:    Leave libtool (.la) files in packages
+#-- staticlibs: Leave static library (.a) files in packages
+#-- emptydirs:  Leave empty directories in packages
+#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
+#-- purge:      Remove files specified by PURGE_TARGETS
+#-- debug:      Add debugging flags as specified in DEBUG_* variables
+#-- lto:        Add compile flags for building with link time optimization
+#-- autodeps:   Automatically add depends/provides
+#
+OPTIONS=(strip docs !libtool staticlibs emptydirs !zipman purge debug !lto !autodeps)
+
+#-- File integrity checks to use. Valid: ck, md5, sha1, sha224, sha256, sha384, sha512, b2
+INTEGRITY_CHECK=(sha256)
+#-- Options to be used when stripping binaries. See `man strip' for details.
+STRIP_BINARIES="--strip-all"
+#-- Options to be used when stripping shared libraries. See `man strip' for details.
+STRIP_SHARED="--strip-unneeded"
+#-- Options to be used when stripping static libraries. See `man strip' for details.
+STRIP_STATIC="--strip-debug"
+#-- Manual (man and info) directories to compress (if zipman is specified)
+MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
+#-- Doc directories to remove (if !docs is specified)
+DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
+#-- Files to be removed from all packages (if purge is specified)
+PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
+#-- Directory to store source code in for debug packages
+
+#########################################################################
+# PACKAGE OUTPUT
+#########################################################################
+#
+# Default: put built package and cached source in build directory
+#
+#-- Destination: specify a fixed directory where all packages will be placed
+#PKGDEST=/home/packages
+#-- Source cache: specify a fixed directory where source files will be cached
+#-- Source packages: specify a fixed directory where all src packages will be placed
+#SRCPKGDEST=/sources
+#-- Log files: specify a fixed directory where all log files will be placed
+#LOGDEST=/home/makepkglogs
+#-- Packager: name/email of the person or organization building packages
+#PACKAGER="John Doe <john@doe.com>"
+#-- Specify a key to use for package signing
+#GPGKEY=""
+
+#########################################################################
+# COMPRESSION DEFAULTS
+#########################################################################
+#
+COMPRESSGZ=(gzip -c -f -n)
+COMPRESSBZ2=(bzip2 -c -f)
+COMPRESSXZ=(xz -c -z -)
+COMPRESSZST=(zstd -c -z -q -)
+COMPRESSLRZ=(lrzip -q)
+COMPRESSLZO=(lzop -q)
+COMPRESSZ=(compress -c -f)
+COMPRESSLZ4=(lz4 -q)
+COMPRESSLZ=(lzip -c -f)
+
+#########################################################################
+# EXTENSION DEFAULTS
+#########################################################################
+#
+PKGEXT='.pkg.tar.xz'
+SRCEXT='.src.tar.xz'
+
+#########################################################################
+# OTHER
+#########################################################################
+#
+#-- Command used to run pacman as root, instead of trying sudo and su
+PACMAN_AUTH=()
+
+PACKAGER="Urja <urja+armlfs@urja.dev>"
+SRCDEST=/sources/archives/core
+#PKGDEST=/sources/pkg
+DBGSRCDIR="/usr/src/debug"
+SKIPPGPCHECK=1
diff --git a/base-makepkg.conf b/armv7h-makepkg.conf
similarity index 100%
rename from base-makepkg.conf
rename to armv7h-makepkg.conf
diff --git a/build-in-order.py b/build-in-order.py
index 5f652b8..0d209a4 100755
--- a/build-in-order.py
+++ b/build-in-order.py
@@ -68,7 +68,7 @@ except IsADirectoryError:
     pkgs = [ sys.argv[1] ]
 
 basedir = os.getcwd()
-logdir = strftime("logs-%y%m%d-") + str(os.getpid())
+logdir = strftime("logs-%y%m%d-%H%M%S")
 os.mkdir(logdir)
 
 
diff --git a/cross-makepkg.conf b/cross-makepkg.conf
index ff13082..100aa4a 100644
--- a/cross-makepkg.conf
+++ b/cross-makepkg.conf
@@ -42,7 +42,7 @@ CHOST="armv7l-unknown-linux-gnueabihf"
 CFLAGS="-O2 -pipe"
 CXXFLAGS="-O2 -pipe -Wno-psabi"
 LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
-#RUSTFLAGS="-C opt-level=2"
+RUSTFLAGS="-C opt-level=2"
 #-- Make Flags: change this for DistCC/SMP systems
 MAKEFLAGS="-j3"
 #-- Debugging flags
diff --git a/makepkg.sh b/makepkg.sh
index f9b2a8b..8d1bb7e 100755
--- a/makepkg.sh
+++ b/makepkg.sh
@@ -1,4 +1,4 @@
 #!/bin/bash
 export SRCDEST=/sources/archives/base/$(basename `pwd`)
 mkdir -p $SRCDEST
-exec makepkg --config $(realpath ../base-makepkg.conf) --noconfirm "$@"
+exec makepkg --config $(realpath ../$CARCH-makepkg.conf) --noconfirm "$@"
diff --git a/mpkg.sh b/mpkg.sh
index d514ac5..87c0bc1 100755
--- a/mpkg.sh
+++ b/mpkg.sh
@@ -1,5 +1,10 @@
 #!/bin/sh
 set -e
+if [ -z "$CARCH" ]; then
+	CARCH=armv7h
+fi
+export CARCH
+echo "mpkg.sh: $1 $2 for $CARCH"
 [ -e .git ] && mv .git .githidden
 chown -R builder:builder $1
 cd $1
@@ -9,7 +14,7 @@ if [ -x custom-build.sh ]; then
 	./custom-build.sh $1 $2
 	R=$?
 else
-	../pkg-spawner.sh $1 $2 && ../pkg-repo.sh && echo $1 >> ../built-order
+	../pkg-spawner.sh $1 $2 && ../pkg-repo.sh && echo $1 >> ../$CARCH-built-order
 	R=$?
 fi
 [ -e .githidden ] && mv .githidden .git
diff --git a/order b/order
index 753e172..7f55949 100644
--- a/order
+++ b/order
@@ -1086,3 +1086,4 @@ iverilog
 yosys
 libftdi-compat
 icestorm
+usbutils
diff --git a/order64 b/order64
new file mode 100644
index 0000000..1737001
--- /dev/null
+++ b/order64
@@ -0,0 +1,497 @@
+openssh
+sudo
+git
+fuse3
+pcre2
+grep
+python-packaging
+python-docutils
+gobject-introspection
+glib2
+sshfs
+libuv
+icu
+libxml2
+libnghttp2
+cmake
+libndp
+gc
+libunistring
+guile
+python-cython
+python-pyproject-metadata
+meson-python
+python-numpy
+boost
+jansson
+libyaml
+libseccomp
+ctags
+source-highlight
+gdb
+nettle
+libidn2
+gnutls
+libmicrohttpd
+elfutils
+docbook-xsl
+docbook-xml
+libgpg-error
+libgcrypt
+libxslt
+python-lxml
+itstool
+python-pyproject-hooks
+yelp-xsl
+python-build
+python-installer
+mallard-ducktype
+yelp-tools
+python-pathspec
+python-typing_extensions
+python-setuptools-scm
+python-pluggy
+python-editables
+python-calver
+python-trove-classifiers
+python-wcag-contrast-ratio
+python-hatchling
+python-pygments
+gtk-doc
+python-future
+python-commonmark
+xxhash
+popt
+rsync
+ntp
+dhcpcd
+publicsuffix-list
+libpsl
+wget
+libnl
+iw
+wpa_supplicant
+mercurial
+zip
+nspr
+python-six
+gyp
+nss
+pcre
+slang
+libnewt
+libmnl
+libnftnl
+procps-ng
+libnghttp3
+libngtcp2
+brotli
+c-ares
+nodejs
+npm
+fmt
+libpng
+libjpeg-turbo
+libtiff
+poppler-data
+libpaper
+freetype2 FREETYPE_NO_HARFBUZZ
+libidn
+fontconfig
+ghostscript
+graphviz
+doxygen
+perl-locale-gettext
+help2man
+noto-fonts
+vala
+libical
+alsa-topology-conf
+alsa-ucm-conf
+alsa-lib
+json-c
+ell
+libusb
+cups
+hicolor-icon-theme
+bluez
+libpcap
+dhcp
+gdbm
+chrpath
+libtool
+unixodbc
+libsodium
+asciidoc
+nftables
+libnfnetlink
+libnetfilter_conntrack
+dnsmasq
+iwd
+perl-yaml
+duktape
+polkit
+ppp
+pixman
+xorg-util-macros
+xorgproto
+libxau
+libxdmcp
+xcb-proto
+libxcb
+xtrans
+libx11
+libxext
+libice
+libsm
+libxss
+libxt
+libxmu
+libxpm
+libxaw
+libxfixes
+libxcomposite
+libxrender
+default-cursors
+libxcursor
+libxdamage
+libfontenc
+xorg-mkfontscale
+xorg-font-util
+xorg-fonts-encodings
+libxfont2
+libxft
+libxi
+libxinerama
+libxrandr
+libxres
+libxtst
+libxv
+libxvmc
+libxxf86vm
+libpciaccess
+libxkbfile
+libxshmfence
+libxpresent
+libxcvt
+xcb-util
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xcb-util-cursor
+python-mako
+libdrm
+xmlto
+wayland
+wayland-protocols
+libglvnd
+mesa
+xbitmaps
+xorg-iceauth
+xorg-sessreg
+xorg-setxkbmap
+xorg-smproxy
+xorg-x11perf
+xorg-xauth
+xorg-xbacklight
+xorg-xcmsdb
+xorg-xcursorgen
+xorg-xdpyinfo
+xorg-xdriinfo
+xorg-xev
+xorg-xgamma
+xorg-xhost
+xorg-xrandr
+xorg-xinput
+xorg-xkbcomp
+xorg-xkbevd
+xorg-xkbutils
+xorg-xkill
+xorg-xlsatoms
+xorg-xlsclients
+xorg-xmessage
+xorg-xmodmap
+xorg-xpr
+xorg-xprop
+xorg-xrdb
+xorg-xrefresh
+xorg-xset
+xorg-xsetroot
+xorg-xvinfo
+xorg-xwd
+xorg-xwininfo
+xorg-xwud
+xcursor-themes
+bash-completion
+libxkbcommon
+xkeyboard-config
+libepoxy
+libtirpc
+eglexternalplatform
+egl-wayland
+libunwind
+xorg-server
+xorg-xwayland
+libevdev
+mtdev
+libinput
+xf86-input-libinput
+xf86-input-evdev
+xorg-twm
+libutempter
+luit
+xterm
+xorg-xclock
+xorg-xinit
+graphite
+harfbuzz HARFBUZZ_NO_CAIRO
+freetype2
+libssh2
+libedit
+python-psutil
+armlfs-update-builder
+llvm
+lld
+rust
+lzo
+cairo
+harfbuzz
+fribidi
+libdatrie
+libthai
+pango
+shared-mime-info
+gdk-pixbuf2
+librsvg
+lcms2
+libgudev
+umockdev
+python-magic
+cython0
+python-yaml
+python-markdown
+python-smartypants
+python-typogrify
+gi-docgen
+json-glib
+libgusb
+ftjam
+unzip
+argyllcms
+perl-file-which
+ffcall
+libsigsegv
+clisp
+giflib
+libwebp
+aom
+dav1d
+cargo-c
+rav1e
+svt-av1
+libyuv
+libavif
+libde265
+x265
+libheif
+gd
+gsm
+lame
+libunibreak
+libass
+libogg
+libvorbis
+flac
+mpg123 MPG123_NO_PULSE
+opus
+libsndfile
+libbs2b
+potrace
+t1lib
+apr
+nss
+apr-util
+libutf8proc
+lz4
+scons
+serf
+python-py3c
+swig
+subversion
+zziplib
+texlive-bin
+texlive-core
+texlive-latexextra
+libieee1284
+rrdtool
+lm_sensors
+libnsl
+net-snmp
+v4l-utils
+autoconf-archive
+libexif
+libgphoto2
+sane
+dconf
+colord
+scdoc
+seatd
+weston
+setconf
+spirv-headers
+spirv-tools
+glslang
+hwdata
+libdisplay-info
+xcb-util-errors
+wlroots
+sway
+wmenu
+dmenu
+tllist
+fcft
+foot
+python-hatch-vcs
+python-hatch-fancy-pypi-readme
+python-attrs
+libei
+gsettings-desktop-schemas
+at-spi2-core
+libsass
+sassc
+iso-codes
+desktop-file-utils
+gtk3
+adwaita-icon-theme
+snowball
+json-glib
+appstream-glib
+cantarell-fonts
+valabind
+gtk-layer-shell
+vte3
+libxfce4util
+xfconf
+startup-notification
+libgtop
+libxfce4ui
+xfce4-terminal
+iptables
+python-cairo
+pygobject
+perl-yaml-tiny
+perl-mime-charset
+perl-test-pod
+perl-unicode-linebreak
+perl-text-charwidth
+perl-text-wrapi18n
+perl-term-readkey
+perl-sgmls
+perl-inc-latest
+perl-module-build
+perl-pod-parser
+po4a
+run-parts
+networkmanager
+compiler-rt
+clang
+fftw
+lynx
+libasyncns
+libsoxr
+orc
+vim
+rtkit
+sbc
+speexdsp
+tdb
+gtest
+abseil-cpp
+webrtc-audio-processing-1
+perl-encode-locale
+perl-timedate
+perl-http-date
+perl-file-listing
+perl-html-tagset
+perl-clone
+perl-io-html
+perl-lwp-mediatypes
+perl-uri
+perl-http-message
+perl-html-parser
+perl-http-cookies
+perl-extutils-config
+perl-extutils-helpers
+perl-extutils-installpaths
+perl-module-build-tiny
+perl-http-daemon
+perl-http-cookiejar
+perl-http-negotiate
+perl-net-http
+perl-try-tiny
+perl-www-robotrules
+perl-libwww
+xmltoman
+pulseaudio
+cbindgen
+imake
+mime-types
+hidapi
+libnotify
+dbus-python
+python-configobj
+python-urllib3
+python-dulwich
+python-fastbencode
+python-merge3
+python-patiencediff
+python-tomli
+python-setuptools-gettext
+python-semantic-version
+python-setuptools-rust
+python-bcrypt
+python-pycparser
+python-cffi
+python-cryptography
+python-pynacl
+python-paramiko
+python-fastimport
+python-tzlocal
+uthash
+extra-cmake-modules
+xcb-imdkit
+fcitx5
+libdecor
+sdl2
+libbs2b
+ladspa
+libmodplug
+glad
+nuklear
+zimg
+xvidcore
+vmaf
+vid.stab
+vapoursynth
+opencore-amr
+libssh
+libvpx
+libtheora
+l-smash
+x264
+srt
+libsamplerate
+python-fastjsonschema
+python-lark-parser
+python-poetry-core
+isodate
+python-pyparsing
+python-rdflib
+lv2
+rubberband
+speex
+benchmark
+snappy
+openjpeg2
+ffmpeg
diff --git a/pkg-repo.sh b/pkg-repo.sh
index 1e96629..0ae499e 100755
--- a/pkg-repo.sh
+++ b/pkg-repo.sh
@@ -1,10 +1,15 @@
 #!/bin/bash
 set -e
 PKG="$(echo *.pkg.tar.xz)"
-mv -v *.pkg.tar.xz /sources/pkg-base
-cd /sources/pkg-base
+REPO=/sources/pkg/$CARCH/base
+mv -v *.pkg.tar.xz $REPO
+cd $REPO
 if [ -e /etc/pacman.d/keys/armlfs-untested-key ]; then
 	asignify sign -nN -S .sig /etc/pacman.d/keys/armlfs-untested-key $PKG
 fi
 repo-add -R base.db.tar.gz $PKG
-pacman -Sy
+if [ "$CARCH" = "aarch64" ]; then
+	setarch aarch64 systemd-nspawn -a -M pkg-builder64 --bind=/sources -D /buildcore64 pacman -Sy
+else
+	pacman -Sy
+fi
diff --git a/pkg-spawner.sh b/pkg-spawner.sh
index b19409d..c737846 100755
--- a/pkg-spawner.sh
+++ b/pkg-spawner.sh
@@ -2,4 +2,10 @@
 set -e
 su builder -c "../pkg-prep.sh $1"
 mount -o remount,size=8G /tmp
-systemd-nspawn -M pkg-builder-$$  --volatile=overlay --bind=/sources --bind-ro=/var/lib/pacman/sync -D /build-core $(pwd)/../pkg-spawned.sh $(pwd) $2
+SPAWN="systemd-nspawn -a -M pkg-builder-$CARCH-$$ --volatile=overlay --bind=/sources"
+CMD="/usr/bin/env CARCH=$CARCH $(pwd)/../pkg-spawned.sh $(pwd) $2"
+if [ "$CARCH" = "aarch64" ]; then
+	setarch aarch64 $SPAWN -D /buildcore64 $CMD
+else
+	$SPAWN --bind-ro=/var/lib/pacman/sync -D /build-core $CMD
+fi