Merge pull request #4 from nathanael-h/yunohost-bullseye

Yunohost bullseye
This commit is contained in:
ljf (zamentur) 2022-07-18 16:29:47 +02:00 committed by GitHub
commit 5304de9929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 28 additions and 37 deletions

View file

@ -9,6 +9,7 @@ RUN apt-get -y update && \
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\
binfmt-support ca-certificates qemu-utils kpartx fdisk gpg pigz\
procps lsof\
&& rm -rf /var/lib/apt/lists/*
COPY . /pi-gen/

View file

@ -75,16 +75,7 @@ fi
# Modify original build-options to allow config file to be mounted in the docker container
BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')"
# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead
case "$(uname -m)" in
x86_64|aarch64)
BASE_IMAGE=i386/debian:bullseye
;;
*)
BASE_IMAGE=debian:bullseye
;;
esac
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"
${DOCKER} build --build-arg BASE_IMAGE=debian:bullseye -t pi-gen "${DIR}"
if [ "${CONTAINER_EXISTS}" != "" ]; then
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM

4
config
View file

@ -1,6 +1,6 @@
IMG_NAME="yunohost"
RELEASE="buster"
USE_QEMU="1"
RELEASE="bullseye"
USE_QEMU="0"
LOCALE_DEFAULT="en_US.UTF-8"
TARGET_HOSTNAME="yunohost"
KEYBOARD_KEYMAP="us"

View file

@ -1,18 +1,15 @@
{
"description": "NOOBS_DESCRIPTION",
"feature_level": 35120124,
"kernel": "KERNEL",
"name": "NOOBS_NAME",
"password": "raspberry",
"release_date": "UNRELEASED",
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082",
"supported_models": [
"Pi Model",
"Pi 2",
"Pi Zero",
"Pi Zero 2",
"Pi 3",
"Pi 4",
"Pi Compute Module 3",
"Pi 4"
"Pi Compute Module 4"
],
"url": "http://www.raspbian.org/",
"username": "pi",

View file

@ -9,15 +9,16 @@ bootstrap(){
export http_proxy=${APT_PROXY}
BOOTSTRAP_ARGS+=(--arch armhf)
BOOTSTRAP_ARGS+=(--arch arm64)
BOOTSTRAP_ARGS+=(--include gnupg)
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
#BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=(--exclude=info)
BOOTSTRAP_ARGS+=(--include=ca-certificates)
BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"
setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true
if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
@ -90,7 +91,7 @@ on_chroot() {
mount --bind /sys "${ROOTFS_DIR}/sys"
fi
setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
}
export -f on_chroot

View file

@ -14,6 +14,7 @@ fi
cat files/raspberrypi.gpg.key | gpg --dearmor > "${ROOTFS_DIR}/etc/apt/trusted.gpg.d/raspberrypi-archive-stable.gpg"
on_chroot << EOF
dpkg --add-architecture armhf
apt-get update
apt-get dist-upgrade -y
EOF

View file

@ -1,3 +1,7 @@
deb http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ RELEASE main contrib non-free rpi
deb http://deb.debian.org/debian RELEASE main contrib non-free
deb http://security.debian.org/debian-security RELEASE-security main contrib non-free
deb http://deb.debian.org/debian RELEASE-updates main contrib non-free
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian RELEASE main contrib non-free
#deb-src http://security.debian.org/debian-security RELEASE-security main contrib non-free
#deb-src http://deb.debian.org/debian RELEASE-updates main contrib non-free

View file

@ -1,5 +1,5 @@
#!/bin/bash -e
if [ ! -d "${ROOTFS_DIR}" ] || [ "${USE_QCOW2}" = "1" ]; then
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://raspbian.raspberrypi.org/raspbian/
bootstrap ${RELEASE} "${ROOTFS_DIR}" http://deb.debian.org/debian/
fi

View file

@ -62,6 +62,9 @@ display_auto_detect=1
dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1

View file

@ -1 +0,0 @@
raspi-copies-and-fills

View file

@ -1,6 +0,0 @@
#!/bin/bash -e
if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then
mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled"
fi

View file

@ -60,7 +60,7 @@ EOF
# the rootfs/image after that ?
while lsof 2>/dev/null | grep -q /root/rpi-image/work/*/export-image/rootfs/dev;
do
for PID in `ps -ef --forest | grep "qemu-arm-static" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
for PID in `ps -ef --forest | grep "qemu-binfmt" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
do
echo "Killing $PID"
kill -9 $PID || true
@ -68,9 +68,9 @@ do
done
sleep 5
done
while ps -ef --forest | grep "qemu-arm-static" | grep -v "grep"
while ps -ef --forest | grep "qemu-binfmt" | grep -v "grep"
do
for PID in `ps -ef --forest | grep "qemu-arm-static" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
for PID in `ps -ef --forest | grep "qemu-binfmt" | grep -v "grep" | grep "nginx\|nscd\|slapd\|nslcd" | awk '{print $2}'`
do
echo "Killing $PID"
kill -9 $PID || true