Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debootstrap and debian-chroot packages #799

Open
wants to merge 13 commits into
base: testing
Choose a base branch
from
1 change: 1 addition & 0 deletions package/debian-chroot/debian-chroot.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chroot_path="/opt/lib/debian-chroot"
75 changes: 75 additions & 0 deletions package/debian-chroot/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash
# Copyright (c) 2023 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(debian-chroot debootstrap)
section="utils"
# Each package has it's own timestamp override below
timestamp=2023-12-22T19:37Z
maintainer="Eeems <eeems@eeems.email>"
installdepends=(display)
flags=(nostrip)

source=(
https://github.com/Eeems-org/remarkable-debian-chroot/archive/f37d03b52309e8f6434d311784a157bd7cdf0877.zip
https://salsa.debian.org/installer-team/debootstrap/-/archive/1.0.133/debootstrap-1.0.133.tar.gz
debian-chroot.conf
)
sha256sums=(
4fe6861bd15e4cecd036c547d749fc9b1b7a8c97f589b535f35fa0d49961e94f
734af3492eea99de940853e2c00e1a9ebd65c463362155f613aa24b9cc3336a0
SKIP
)

debian-chroot() {
pkgdesc="A minimal Debian chroot for the reMarkable tablet"
url=https://github.com/Eeems-Org/remarkable-debian-chroot
pkgver=0.0.0-1
timestamp=2023-12-22T19:37Z
license=MIT
installdepends=(debootstrap)
package() {
install -D -m 755 \
"$srcdir"/bin/debian-chroot \
"$pkgdir"/opt/bin/debian-chroot
install -D -m 655 \
"$srcdir"/debian-chroot.conf \
"$pkgdir"/home/root/.config/debian-chroot.conf
mkdir -p "${pkgdir}/opt/lib/debian-chroot"
}
configure() {
# Force debian chroot to install iteself
debian-chroot true
}
preremove() {
if find /proc -mindepth 2 -maxdepth 2 -name root \
| grep -q /opt/lib/debian-chroot; then
echo "Error: debian-chroot has running processes"
exit 1
fi
while grep -q /opt/lib/debian-chroot /proc/mounts; do
grep /opt/lib/debian-chroot /proc/mounts \
| sort -r \
| cut -d' ' -f2 \
| xargs -rn1 /bin/umount -lqR
done
}
postremove() {
rm -rf /opt/lib/debian-chroot
}
}

debootstrap() {
pkgdesc="debootstrap is a tool which will install a Debian base system into a subdirectory of another, already installed system."
installdepends=(perl ar)
url=https://wiki.debian.org/Debootstrap
pkgver=1.0.133-1
timestamp=2023-10-21T11:38Z
license=MIT
package() {
cd "$srcdir"
sed -i 's|/usr/sbin|/sbin|' Makefile
make DESTDIR="$pkgdir"/opt install
sed -i 's|DEBOOTSTRAP_DIR=/usr/share/debootstrap|DEBOOTSTRAP_DIR=/opt/usr/share/debootstrap|' "$pkgdir"/opt/sbin/debootstrap
}
}
Loading