Update some dependencies, remove some legacy compat code, improve variouse things...
authorDaniel Abrecht <public@danielabrecht.ch>
Sun, 23 Aug 2020 17:43:03 +0000 (17:43 +0000)
committerDaniel Abrecht <public@danielabrecht.ch>
Sun, 23 Aug 2020 17:43:03 +0000 (17:43 +0000)
16 files changed:
chroot-build-helper/makefile
chroot-build-helper/real-makefile
config/debian/r-buster/build_dependencies [new symlink]
config/debian/r-buster/config [new file with mode: 0644]
config/debian/rootfs/etc/apt/sources.list.in
config/default/b-librem5-devkit/config
config/default/b-librem5-phone/config
config/default/config
config/devuan/r-beowulf/build_dependencies/mesa [new file with mode: 0644]
config/devuan/r-beowulf/config [new file with mode: 0644]
config/devuan/r-beowulf/rootfs/etc/apt/sources.list.in
script/chroot_qemu_static-sub1.sh
script/debootstrap.sh
script/rootfs_setup.sh
src/make-helper-functions.mk
src/package_list.mk

index bad38b0063194ed2a82f76083672c3259fbec067..0a7ec1688045e2f12fd887a1aecd30eeae2b7c09 100644 (file)
@@ -19,13 +19,10 @@ repo reset-repo clean-repo clean-build clean-build-all: force
        $(MAKE) -f real-makefile "$@"
 
 %: force
-       if makefile=real-makefile list-dependent-targets.sh "$@" | grep -q '^bin/.*/.build$$'; \
-       then \
-         tmpdep=$$(mktemp); \
-         cleanup(){ rm -f "$$tmpdep"; }; \
-         trap cleanup EXIT INT; \
-         make -f "../src/make-helper-functions.mk" TMP_TARGET_FILE="$$tmpdep" DEP_PREFIX="bin/$(DISTRO)/$(RELEASE)/" DEP_SUFFIX="/.build" generate_make_build_dependencies_for_debs; \
-       fi; \
+       tmpdep=$$(mktemp); \
+       cleanup(){ rm -f "$$tmpdep"; }; \
+       trap cleanup EXIT INT; \
+       make -f "../src/make-helper-functions.mk" TMP_TARGET_FILE="$$tmpdep" DEP_PREFIX="bin/$(DISTRO)/$(RELEASE)/" DEP_SUFFIX="/.build" generate_make_build_dependencies_for_debs; \
        $(MAKE) -f real-makefile GENERATED_DEPENDENCIES_FILE="$$tmpdep" "$@"
 
 force: ;
index 7d9e82d1b0a4764cddc1f8cf424bef714193992b..58777e02f822f71935b8a31cda19de2f1da8f6bb 100644 (file)
@@ -50,7 +50,6 @@ build-env/$(DISTRO)/$(RELEASE)/rootfs: build-env/.dir build-env/$(DISTRO)/$(RELE
        chmod +x "$@.tmp/root/helper/mknod"
        echo '#!/bin/sh' >"$@.tmp/root/helper/mount"
        chmod +x "$@.tmp/root/helper/mount"
-       printf 'APT::Get::AllowUnauthenticated "true";\nAcquire::AllowInsecureRepositories "true";' >"$@.tmp/etc/apt/apt.conf.d/80localnocheck"
        touch "$@.tmp/dev/null"
        chmod 666 "$@.tmp/dev/null"
        uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" /debootstrap/debootstrap --second-stage
@@ -58,10 +57,10 @@ build-env/$(DISTRO)/$(RELEASE)/rootfs: build-env/.dir build-env/$(DISTRO)/$(RELE
        uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" apt-get update
        uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" sh -c "dpkg -i /root/dummy-debs/*.deb" || true
        if [ -n "$(BUILD_DEP_RELEASE)" ]; \
-         then uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" apt-get -y -t "$(BUILD_DEP_RELEASE)" install --no-install-recommends build-essential dh-make debhelper devscripts fakeroot; \
-         else uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" apt-get -y install --no-install-recommends build-essential dh-make debhelper devscripts fakeroot; \
+         then uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" apt-get -y -t "$(BUILD_DEP_RELEASE)" install --no-install-recommends build-essential dh-make debhelper devscripts meson; \
+         else uexec --allow-setgroups chroot_qemu_static.sh "$(CURDIR)/$@.tmp" apt-get -y install --no-install-recommends build-essential dh-make debhelper devscripts meson; \
        fi
-       printf "\ndeb file:///root/devrepo/ ./\n" >>"$@.tmp/etc/apt/sources.list"
+       printf "\ndeb [trusted=yes] file:///root/devrepo/ ./\n" >>"$@.tmp/etc/apt/sources.list"
        uexec rm -rf "$(CURDIR)/$@"
        mv "$@.tmp" "$@"
 
diff --git a/config/debian/r-buster/build_dependencies b/config/debian/r-buster/build_dependencies
new file mode 120000 (symlink)
index 0000000..812eced
--- /dev/null
@@ -0,0 +1 @@
+../config/devuan/r-beowulf/build_dependencies/
\ No newline at end of file
diff --git a/config/debian/r-buster/config b/config/debian/r-buster/config
new file mode 100644 (file)
index 0000000..08b9531
--- /dev/null
@@ -0,0 +1 @@
+BUILD_DEP_RELEASE=$(RELEASE)-backports
index 5038d1cd6a5a19d7b8af86da26c97788a3e4ca48..e432055691ca90f4c9e8bd9adc1d05334250ba46 100644 (file)
@@ -2,6 +2,8 @@ deb     $CHROOT_REPO $RELEASE           main
 deb-src $CHROOT_REPO $RELEASE           main
 deb     $CHROOT_REPO $RELEASE-updates   main
 deb-src $CHROOT_REPO $RELEASE-updates   main
+deb     $CHROOT_REPO $RELEASE-security  main
+deb-src $CHROOT_REPO $RELEASE-security  main
 deb     $CHROOT_REPO $RELEASE-backports main
 deb-src $CHROOT_REPO $RELEASE-backports main
 
index ba26b170bda3c80d0e45652ce309c16939305fa4..87d75b4d09eed0e6d26bb8942946437261ae1be2 100644 (file)
@@ -22,5 +22,5 @@ ATF_PLATFORM = imx8mq
 repo-branch@arm-trusted-firmware = librem5
 repo-source@arm-trusted-firmware = https://source.puri.sm/Librem5/arm-trusted-firmware.git
 
-repo-branch@mesa = pureos/purple
+repo-branch@mesa = pureos/amber-phone
 repo-source@mesa = https://source.puri.sm/Librem5/mesa.git
index 92cebf9596b6013dcc25fb34cfea0ef74a1703a8..d3cb234ef23fccd936d4ede5abf4f549f641b2d4 100644 (file)
@@ -22,5 +22,5 @@ ATF_PLATFORM = imx8mq
 repo-branch@arm-trusted-firmware = librem5
 repo-source@arm-trusted-firmware = https://source.puri.sm/Librem5/arm-trusted-firmware.git
 
-repo-branch@mesa = pureos/purple
+repo-branch@mesa = pureos/amber-phone
 repo-source@mesa = https://source.puri.sm/Librem5/mesa.git
index 61572bf8cf7f545ed633fd23225ec4a785ed722d..b4b3c6c75f578db6853507ae714b989f50597c8a 100644 (file)
@@ -78,7 +78,7 @@ repo-source@calls = https://source.puri.sm/Librem5/calls.git
 repo-branch@upower = pureos/purple
 repo-source@upower = https://source.puri.sm/Librem5/upower.git
 
-repo-branch@modemmanager = pureos/sloppy
+repo-branch@modemmanager = pureos/amber-phone
 repo-source@modemmanager = https://source.puri.sm/Librem5/ModemManager.git
 
 repo-branch@libqmi = pureos/amber-phone
@@ -98,3 +98,7 @@ repo-source@chatty = https://source.puri.sm/Librem5/chatty.git
 
 repo-branch@purple-mm-sms = master
 repo-source@purple-mm-sms = https://source.puri.sm/Librem5/purple-mm-sms.git
+
+# For newer mesa...
+repo-branch@libglvnd = pureos/amber-phone
+repo-source@libglvnd = https://source.puri.sm/Librem5/debs/libglvnd.git
diff --git a/config/devuan/r-beowulf/build_dependencies/mesa b/config/devuan/r-beowulf/build_dependencies/mesa
new file mode 100644 (file)
index 0000000..2dbd7c7
--- /dev/null
@@ -0,0 +1 @@
+mesa: libglvnd
diff --git a/config/devuan/r-beowulf/config b/config/devuan/r-beowulf/config
new file mode 100644 (file)
index 0000000..08b9531
--- /dev/null
@@ -0,0 +1 @@
+BUILD_DEP_RELEASE=$(RELEASE)-backports
index 45d176a3c290303206691f1b04917667ddead361..0dfaefe34af5d5eac535949054e591861751a99a 100644 (file)
@@ -4,4 +4,5 @@ deb     $CHROOT_REPO $RELEASE-updates   main
 deb-src $CHROOT_REPO $RELEASE-updates   main
 deb     $CHROOT_REPO $RELEASE-security  main
 deb-src $CHROOT_REPO $RELEASE-security  main
-
+deb     $CHROOT_REPO $RELEASE-backports  main
+deb-src $CHROOT_REPO $RELEASE-backports  main
index 233fbbd2d20356b729d3b306db706d3a88d7de13..5c701e096f055708f149e3c13f718a7fb1b275bc 100755 (executable)
@@ -20,20 +20,11 @@ cleanup(){
 }
 trap cleanup EXIT TERM INT
 
-# Some checks & stuff
-if [ -z "$AARCH64_EXECUTABLE" ]
-  then echo "Warning: AARCH64_EXECUTABLE is not set! (Note: This script is expected to be called by the make file)" >&2
-fi
-
 set -ex
 
 export PATH='/root/helper/:/sbin:/usr/sbin:/bin:/usr/bin'
 export LANG=C LC_ALL=C
 
-qemu_aarch64_static_binary="$(which qemu-aarch64-static qemu-aarch64 | head -n 1)"
-
-cp "$qemu$qemu_aarch64_static_binary" "$rootfs$qemu_aarch64_static_binary" || true
-
 mount --rbind /proc/ "$rootfs"/proc/
 mount --rbind /dev/ "$rootfs"/dev/
 mount --rbind /sys/ "$rootfs"/sys/
@@ -44,16 +35,6 @@ exit 101
 EOF
 chmod +x "$rootfs"/usr/sbin/policy-rc.d
 
-# Enter the chroot
-if [ "$AARCH64_EXECUTABLE" = yes ]
-then
-  chroot "$rootfs" "$@"
-else
-  dpkg -x "$rootfs"/var/cache/apt/archives/libfakechroot*.deb "$rootfs"
-  chroot "$rootfs" "$qemu_aarch64_static_binary" -E LD_PRELOAD=/usr/lib/aarch64-linux-gnu/fakechroot/libfakechroot.so -E FAKECHROOT_ELFLOADER="$qemu_aarch64_static_binary" /bin/sh -c "exec $*"
-fi
-
-rm -f "$rootfs$qemu_aarch64_static_binary"
-rm -f "$rootfs"/usr/sbin/policy-rc.d
+chroot "$rootfs" "$@"
 
 ) 9>&-; ) 9>"$rootfs/chroot_access_lock"
index 3cc8f8fe3f6b76bea250a77ebea41e95a1cb5bf1..86f55858b23fd88b7d8840af436606138a34f01f 100755 (executable)
@@ -115,7 +115,7 @@ done
     do getrfsfile.sh "rootfs/etc/apt/sources.list.d$file"
   done
   echo
-  echo 'deb file:///usr/share/first-boot-setup/temp-repo/ ./'
+  echo 'deb [trusted=yes] file:///usr/share/first-boot-setup/temp-repo/ ./'
 ) >"$tmp/rootfs/usr/share/first-boot-setup/temporary-local-repo.list"
 
 # Do some stuff inside the chroot
index 1dcded0fb3c5b50d7ef9fce32a6b4de059a6b761..ecd9f07a303b2c4efc32b3cf013059f02c148a0a 100755 (executable)
@@ -19,8 +19,6 @@ cat > apt-tmp.conf <<EOF
 Dir::Etc::sourcelist "/usr/share/first-boot-setup/temporary-local-repo.list";
 Dir::Etc::sourceparts "-";
 APT::Get::List-Cleanup "0";
-APT::Get::AllowUnauthenticated "true";
-Acquire::AllowInsecureRepositories "true";
 Dpkg::Options:: "--force-confdef";
 Dpkg::Options:: "--force-confold";
 EOF
@@ -85,15 +83,13 @@ mv /var/cache/apt/archives/*.deb temp-repo/ || true
 )
 
 # Add new temporary local repo list
-echo "deb file:///usr/share/first-boot-setup/temp-repo/ ./" > temporary-local-repo.list
+echo "deb [trusted=yes] file:///usr/share/first-boot-setup/temp-repo/ ./" > temporary-local-repo.list
 
 # Create temporary apt config for temporary local repo
 cat > apt-tmp.conf <<EOF
 Dir::Etc::sourcelist "/usr/share/first-boot-setup/temporary-local-repo.list";
 Dir::Etc::sourceparts "-";
 APT::Get::List-Cleanup "0";
-APT::Get::AllowUnauthenticated "true";
-Acquire::AllowInsecureRepositories "true";
 EOF
 
 # Update package list of local repo
index 9aa42d33eaa8c237d6f963295038509fbb614402..5a5ef335c40b378281c2d47af23372bcebc80e0f 100644 (file)
@@ -55,13 +55,6 @@ include $(project_root)/src/repositories.mk
 
 export PATH := /helper/bin:$(project_root)/script/:/sbin:/usr/sbin:$(PATH):$(project_root)/build/bin:$(project_root)/bin
 
-ifeq (x$(shell echo 'int main(){}' | $(CROSS_COMPILER)gcc -static -x c - -o .aarch64test &>/dev/null; sync .; sleep 0.5; sync .; ./.aarch64test &>/dev/null; echo $$?), x0)
-# This usually means binfmt-misc (qemu-user-binfmt in devuan) is set up, (or we are really on aarch64)
-export AARCH64_EXECUTABLE := yes
-else
-export AARCH64_EXECUTABLE := no
-endif
-
 include $(project_root)/src/package_list.mk
 
 export DEBIAN_FRONTEND=noninteractive
index 257d7112f931e052ecf92063689b5782bb3072ad..b1ce5330fcc39b253c3ae9f58578d5eaedcd8a3f 100644 (file)
@@ -20,10 +20,6 @@ PACKAGES_TO_DOWNLOAD          = $(call parse_package_list,download)
 PACKAGES_TO_BUILD             = $(call parse_package_list,build)
 PACKAGES_BOOTSTRAP_WORKAROUND = $(call parse_package_list,defer_installation_of_problemetic_package)
 
-ifneq ($(AARCH64_EXECUTABLE),yes)
-  PACKAGES_INSTALL_DEBOOTSTRAP+=fakechroot"
-endif
-
 repo-schema = $(shell printf '%s' "$(REPO)" | grep -o '^[^:]*')
 ch-repo-schema = $(shell printf '%s' "$(CHROOT_REPO)" | grep -o '^[^:]*')