From 0089cdebaff2f150915e8f0af3d801cd05835ef9 Mon Sep 17 00:00:00 2001 From: Troels Jessen Date: Tue, 8 Sep 2026 09:02:48 +0200 Subject: [PATCH] Remove option for building containerized CSH The SI-internal repository csh_release is used for this purpose --- cross/raspberrypi/Dockerfile_aarch64 | 19 ---- cross/raspberrypi/Dockerfile_gnueabihf | 19 ---- .../raspberrypi/cross_raspberrypi_aarch64.txt | 29 ------ .../cross_raspberrypi_gnueabihf.txt | 29 ------ cross/raspberrypi/make_sysroot.sh | 26 ------ debian/Dockerfile_ubuntu-20.04 | 7 -- debian/Dockerfile_ubuntu-22.04 | 10 -- debian/Dockerfile_ubuntu-24.04 | 9 -- pack | 18 ---- pack_dpkg | 91 ------------------- 10 files changed, 257 deletions(-) delete mode 100644 cross/raspberrypi/Dockerfile_aarch64 delete mode 100644 cross/raspberrypi/Dockerfile_gnueabihf delete mode 100644 cross/raspberrypi/cross_raspberrypi_aarch64.txt delete mode 100644 cross/raspberrypi/cross_raspberrypi_gnueabihf.txt delete mode 100644 cross/raspberrypi/make_sysroot.sh delete mode 100644 debian/Dockerfile_ubuntu-20.04 delete mode 100644 debian/Dockerfile_ubuntu-22.04 delete mode 100644 debian/Dockerfile_ubuntu-24.04 delete mode 100755 pack delete mode 100755 pack_dpkg diff --git a/cross/raspberrypi/Dockerfile_aarch64 b/cross/raspberrypi/Dockerfile_aarch64 deleted file mode 100644 index 816f991d..00000000 --- a/cross/raspberrypi/Dockerfile_aarch64 +++ /dev/null @@ -1,19 +0,0 @@ -# To build this image on a Intel based computer, you need to install the "qemu-user-static" package (sudo apt install qemu-user-static) -# then: -# docker build --platform linux/aarch64 -t sysroot-build -f Dockerfile_aarch64 . -# Run it: -# docker run -v /full/path/to/sysroot:/sysroot -e LIST_OF_PACKAGES="libcurl4-openssl-dev libzmq3-dev" --platform linux/aarch64 -it sysroot-build - -FROM openresty/openresty:bookworm-aarch64 - -ENV LIST_OF_PACKAGES=libxm2-dev - -WORKDIR /root -RUN mkdir /download -RUN mkdir -p /sysroot - -COPY make_sysroot.sh . -RUN chmod +x make_sysroot.sh -RUN apt update - -CMD ["./make_sysroot.sh"] diff --git a/cross/raspberrypi/Dockerfile_gnueabihf b/cross/raspberrypi/Dockerfile_gnueabihf deleted file mode 100644 index 54af97fc..00000000 --- a/cross/raspberrypi/Dockerfile_gnueabihf +++ /dev/null @@ -1,19 +0,0 @@ -# To build/run this image on a Intel based computer, you need to install the "qemu-user-static" package (sudo apt install qemu-user-static) -# then: -# docker build --platform linux/arm/v7 -t sysroot-build -f Dockerfile_gnueabihf . -# Run it: -# docker run -v /full/path/to/sysroot:/sysroot -e LIST_OF_PACKAGES="libcurl4-openssl-dev libzmq3-dev" --platform linux/arm/v7 -it sysroot-build - -FROM dtcooper/raspberrypi-os:lite-bookworm - -ENV LIST_OF_PACKAGES=libxm2-dev - -WORKDIR /root -RUN mkdir /download -RUN mkdir -p /sysroot - -COPY make_sysroot.sh . -RUN chmod +x make_sysroot.sh -RUN apt update - -CMD ["./make_sysroot.sh"] diff --git a/cross/raspberrypi/cross_raspberrypi_aarch64.txt b/cross/raspberrypi/cross_raspberrypi_aarch64.txt deleted file mode 100644 index ee56bc05..00000000 --- a/cross/raspberrypi/cross_raspberrypi_aarch64.txt +++ /dev/null @@ -1,29 +0,0 @@ -[binaries] -c = 'aarch64-linux-gnu-gcc' -cpp = 'aarch64-linux-gnu-g++' -ar = 'aarch64-linux-gnu-ar' -strip = 'aarch64-linux-gnu-strip' - -pkg-config = 'pkg-config' - -[host_machine] -system = 'linux' -cpu_family = 'arm' -cpu = '' -endian = 'little' - -[constants] -sys_root = '@GLOBAL_SOURCE_ROOT@' / 'sysroot-aarch64' - -[properties] -pkg_config_libdir = sys_root + '/usr/lib/aarch64-linux-gnu/pkgconfig' -sys_root = sys_root - -[built-in options] -c_args = ['--sysroot=' + sys_root] -c_link_args = [ - '--sysroot=' + sys_root, - '-L' + sys_root + '/lib/aarch64-linux-gnu', - '-Wl,-rpath-link=' + sys_root + '/lib/aarch64-linux-gnu', - '-L' + sys_root + '/usr/lib/aarch64-linux-gnu', - '-Wl,-rpath-link=' + sys_root + '/usr/lib/aarch64-linux-gnu'] \ No newline at end of file diff --git a/cross/raspberrypi/cross_raspberrypi_gnueabihf.txt b/cross/raspberrypi/cross_raspberrypi_gnueabihf.txt deleted file mode 100644 index 6c5ccda0..00000000 --- a/cross/raspberrypi/cross_raspberrypi_gnueabihf.txt +++ /dev/null @@ -1,29 +0,0 @@ -[binaries] -c = 'arm-linux-gnueabihf-gcc' -cpp = 'arm-linux-gnueabihf-g++' -ar = 'arm-linux-gnueabihf-ar' -strip = 'arm-linux-gnueabihf-strip' - -pkg-config = 'pkg-config' - -[host_machine] -system = 'linux' -cpu_family = 'arm' -cpu = '' -endian = 'little' - -[constants] -sys_root = '@GLOBAL_SOURCE_ROOT@' / 'sysroot-gnueabihf' - -[properties] -sys_root = sys_root -pkg_config_libdir = sys_root + '/usr/lib/arm-linux-gnueabihf/pkgconfig' - -[built-in options] -c_args = ['--sysroot=' + sys_root] -c_link_args = [ - '--sysroot=' + sys_root, - '-L' + sys_root + '/lib/arm-linux-gnueabihf', - '-Wl,-rpath-link=' + sys_root + '/lib/arm-linux-gnueabihf', - '-L' + sys_root + '/usr/lib/arm-linux-gnueabihf', - '-Wl,-rpath-link=' + sys_root + '/usr/lib/arm-linux-gnueabihf'] \ No newline at end of file diff --git a/cross/raspberrypi/make_sysroot.sh b/cross/raspberrypi/make_sysroot.sh deleted file mode 100644 index 823e5cb3..00000000 --- a/cross/raspberrypi/make_sysroot.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/bash - -SYSROOT=/sysroot -DOWNLOAD=/download - -cd $DOWNLOAD - -# apt install --download-only $LIST_OF_PACKAGES -# Download packages only -apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \ - --no-conflicts --no-breaks --no-replaces --no-enhances \ - --no-pre-depends ${LIST_OF_PACKAGES} | grep "^\w") - -cd $SYSROOT - -# unpack all the packages downloaded above in that sysroot root -for deb in $DOWNLOAD/*.deb; do dpkg-deb -xv $deb .; done - -# Create a tarball -#cd .. -#tar -cazf sysroot.tar.gz $SYSROOT - -# bash -i -# # Get it and unpack it where you want that sysroot -# scp pi@raspberrypi.local:~/sysroot.tar.gz . -# tar -xf sysroot.tar.gz diff --git a/debian/Dockerfile_ubuntu-20.04 b/debian/Dockerfile_ubuntu-20.04 deleted file mode 100644 index 5e01ffce..00000000 --- a/debian/Dockerfile_ubuntu-20.04 +++ /dev/null @@ -1,7 +0,0 @@ -FROM ubuntu:20.04 - -WORKDIR /root -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y fakeroot lsb-release git can-utils fonts-powerline build-essential pkg-config libcurl4-openssl-dev libzmq3-dev libsocketcan-dev python3-pip libcap2-bin libbsd-dev python3-dev -RUN python3 -m pip install meson==1.8.1 ninja -RUN useradd -ms /bin/bash ubuntu diff --git a/debian/Dockerfile_ubuntu-22.04 b/debian/Dockerfile_ubuntu-22.04 deleted file mode 100644 index 7cad18d3..00000000 --- a/debian/Dockerfile_ubuntu-22.04 +++ /dev/null @@ -1,10 +0,0 @@ -FROM ubuntu:22.04 - -WORKDIR /root -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y fakeroot lsb-release git can-utils fonts-powerline build-essential pkg-config libcurl4-openssl-dev libzmq3-dev libsocketcan-dev libcap2-bin python3-dev python3-pip patchelf -RUN useradd -ms /bin/bash ubuntu -USER ubuntu -RUN pip3 install --user meson==1.8.1 ninja -USER root - diff --git a/debian/Dockerfile_ubuntu-24.04 b/debian/Dockerfile_ubuntu-24.04 deleted file mode 100644 index 75de4a5b..00000000 --- a/debian/Dockerfile_ubuntu-24.04 +++ /dev/null @@ -1,9 +0,0 @@ -FROM ubuntu:24.04 - -WORKDIR /root -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y fakeroot lsb-release git can-utils fonts-powerline build-essential pkg-config libcurl4-openssl-dev libzmq3-dev libsocketcan-dev libcap2-bin python3-dev pipx -USER ubuntu -RUN pipx install meson==1.8.1 ninja -USER root - diff --git a/pack b/pack deleted file mode 100755 index 724c0ac8..00000000 --- a/pack +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -./gendoc.py -csh_si=$(realpath ../csh_si) -csh_obc=$(realpath ../csh_obc) -# Ubuntu 24.04, x86_64, aarch64 -docker build -f debian/Dockerfile_ubuntu-24.04 --platform linux/amd64,linux/aarch64 . -t si-ubuntu-24.04-builder -docker run --platform linux/amd64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-24.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu -docker run --platform linux/aarch64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-24.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu - -# Ubuntu 22.04, x86_64, aarch64 -docker build -f debian/Dockerfile_ubuntu-22.04 --platform linux/amd64,linux/aarch64 . -t si-ubuntu-22.04-builder -docker run --platform linux/amd64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-22.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu -docker run --platform linux/aarch64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-22.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu - -# Ubuntu 20.04, x86_64, aarch64 -docker build -f debian/Dockerfile_ubuntu-20.04 --platform linux/amd64,linux/aarch64 . -t si-ubuntu-20.04-builder -docker run --platform linux/amd64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-20.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu -docker run --platform linux/aarch64 -v ${PWD}/:/home/ubuntu/csh -v $csh_si:/home/ubuntu/csh_si -v $csh_obc:/home/ubuntu/csh_obc -it -t si-ubuntu-20.04-builder su -l -c "(cd csh ; fakeroot ./pack_dpkg)" ubuntu diff --git a/pack_dpkg b/pack_dpkg deleted file mode 100755 index 259514a3..00000000 --- a/pack_dpkg +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -IFS='-' read -ra a <<< `git describe --long --always --dirty` -REVID="${a[0]}-${a[1]}" -ubuntu_version=${ubuntu_version:-$(lsb_release -r -s)} -architecture=$(uname -m) -if [ "$architecture" == "x86_64" ] -then - architecture=amd64 -else - architecture=arm64 -fi -debbuild_dir=$(realpath si-csh_${ubuntu_version}_${architecture}_$REVID) - -rm -R $debbuild_dir -mkdir -p $debbuild_dir/usr/bin -mkdir -p $debbuild_dir/usr/lib/csh -mkdir -p $debbuild_dir/usr/share/si-csh - -# build csh_si -cd ../csh_si -prefix=/usr ./configure -DESTDIR=$debbuild_dir ./install - -# build csh_obc -cd - -cd ../csh_obc -prefix=/usr ./configure -DESTDIR=$debbuild_dir ./install - -# build csh -cd - -./configure -./build - -if [ "$ubuntu_version" == "20.04" ] -then - Depends="libcap2-bin (>=2.44), libcurl4 (>=7.68), libzmq5 (>=4.3.2), libc6 (>=2.31), libsocketcan2 (>=0.0.11), can-utils (>= 2018.02), fonts-powerline (>=2.7), python3 (>=3.8)" -elif [ "$ubuntu_version" == "22.04" ] -then - Depends="libcap2-bin (>=2.44), libcurl4 (>=7.81.0), libzmq5 (>=4.3.4), libc6 (>=2.35), libsocketcan2 (>=0.0.12), can-utils (>= 2020.11.0), fonts-powerline (>= 2.8.2), python3 (>=3.10)" -elif [ "$ubuntu_version" == "24.04" ] -then - Depends="libcap2-bin (>=2.44), libzmq5 (>=4.3.5), libc6 (>=2.39), libsocketcan2 (>=0.0.12), can-utils (>= 2023.03), fonts-powerline (>= 2.8.3), python3 (>=3.12)" -fi - -cp builddir/csh $debbuild_dir/usr/bin -cp build-doc/CSH_MAN.pdf $debbuild_dir/usr/share/si-csh -mkdir -p $debbuild_dir/DEBIAN - -cat << EOF > $debbuild_dir/DEBIAN/control -Package: si-csh -Version: $REVID -Section: base -Priority: optional -Architecture: ${architecture} -Depends: $Depends -Maintainer: Space Inventor A/S -Description: CSP shell client application - For easy operation of Space Inventor - satellites and modules based on CSP and libparam -EOF - -cat << EOF > $debbuild_dir/DEBIAN/postinst -#!/bin/sh -setcap cap_net_raw,cap_net_admin+ep /usr/bin/csh -USER_FOLDER=\`echo /home/\$SUDO_USER\` -if [ -f "\$USER_FOLDER/.local/bin/csh" ] -then - echo "Removing CSH from local installation" - rm \$USER_FOLDER/.local/bin/csh -fi -if [ -f "\$USER_FOLDER/.local/lib/csh/libcsh_obc.so" ] -then - echo "Removing libcsh_obc from local installation" - rm "\$USER_FOLDER/.local/lib/csh/libcsh_obc.so" -fi -if [ -f "\$USER_FOLDER/.local/lib/csh/liblua_sub.a" ] -then - rm "\$USER_FOLDER/.local/lib/csh/liblua_sub.a" -fi -if [ -f "\$USER_FOLDER/.local/lib/csh/libcsh_si.so" ] -then - echo "Removing libcsh_si from local installation" - rm "\$USER_FOLDER/.local/lib/csh/libcsh_si.so" -fi -EOF - -chmod +x $debbuild_dir/DEBIAN/postinst -dpkg -b $debbuild_dir -rm -R $debbuild_dir