Skip to content

Commit

Permalink
Merge branch 'testing' into alistair/build-fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems authored Dec 17, 2024
2 parents fcd0c5f + 66c02ec commit 60a3dd7
Show file tree
Hide file tree
Showing 27 changed files with 261 additions and 103 deletions.
10 changes: 5 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
sudo apt-get update -yq
echo "aptVersion=libarchive-tools-$(apt-cache policy libarchive-tools | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV
- name: Cache Apt packages
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-apt
with:
path: ~/.aptcache
Expand All @@ -26,7 +26,7 @@ runs:
sudo cp --verbose --force --recursive ~/.aptcache/* /
fi
- name: Cache shfmt
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /usr/local/bin/shfmt
key: 43439b996942b53dfafa9b6ff084f394555d049c98fb7ec37978f7668b43e1be
Expand All @@ -44,7 +44,7 @@ runs:
sudo chmod a+x "$install_dir"/shfmt
fi
- name: Cache Shellcheck
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /usr/local/bin/shellcheck
key: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8
Expand All @@ -68,11 +68,11 @@ runs:
sudo mv shellcheck "$install_dir"
fi
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache Python environment
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-python
with:
path: .venv
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Toltec dependencies
uses: ./.github/actions/setup
- name: Check formatting
Expand All @@ -20,13 +20,13 @@ jobs:
needs: lint
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Toltec dependencies
uses: ./.github/actions/setup
- name: Build packages
run: FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' make repo-new
- name: Save the build output
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: repo
path: build/repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Toltec dependencies
uses: ./.github/actions/setup
- name: Build packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Toltec dependencies
uses: ./.github/actions/setup
- name: Build packages
Expand Down
1 change: 1 addition & 0 deletions docs/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ screensharing | Apps for streaming the display between the PC and tablet.
templates | Templates for xochitl notebooks.
splashscreens | Splashscreens for device startup, poweroff, suspend, etc.
utils | System tools and various apps.
writing | Apps for writing text.

If the package does not fit into one of the existing sections, you are free to create a new one and document it here.

Expand Down
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="/home/root/.local/share/debian"
80 changes: 80 additions & 0 deletions package/debian-chroot/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/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 <[email protected]>"
installdepends=(display)
flags=(nostrip)

source=(
https://github.com/Eeems-org/remarkable-debian-chroot/archive/ea12a1bf851f412e8df4b59fe072bce26bb72571.zip
https://salsa.debian.org/installer-team/debootstrap/-/archive/1.0.133/debootstrap-1.0.133.tar.gz
debian-chroot.conf
)
sha256sums=(
3fcd571ba1aa1a5c55a32767c34e6939e0c0e8ad9213425c6d66d25300fe24b8
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 lsof)
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/etc/
ln -s /home/root/.config/debian-chroot.conf \
"$pkgdir"/opt/etc/debian-chroot.conf
source "$srcdir"/debian-chroot.conf
mkdir -p "$pkgdir"/opt/lib/
ln -s "$chroot_path" "$pkgdir"/opt/lib/debian-chroot
}
configure() {
# Force debian chroot to install iteself
debian-chroot true
}
preremove() {
source /home/root/.config/debian-chroot.conf
if lsof "$chroot_path" 2> /dev/null | grep "$chroot_path"; then
echo "Error: debian-chroot has running processes"
exit 1
fi
if grep -q "$chroot_path " /proc/mounts; then
/bin/umount -R "$chroot_path"
fi
cp /home/root/.config/debian-chroot.conf /tmp/_debian-chroot.conf
}
postremove() {
source /tmp/_debian-chroot.conf
rm -rf "$chroot_path"
rm /tmp/_debian-chroot.conf
}
}

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
}
}
22 changes: 14 additions & 8 deletions package/innernet/package
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
#!/usr/bin/env bash
# Copyright (c) 2021 The Toltec Contributors
# Copyright (c) 2024 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(rmallos2)
pkgnames=(innernet-client)
pkgdesc="A private network system that uses WireGuard under the hood."
url="https://github.com/tonarino/innernet"
pkgver=1.5.3-3
timestamp=2022-01-31T20:08:43Z
pkgver=1.6.1-1
timestamp=2024-01-19T14:24:40Z
section="utils"
maintainer="plan5 <[email protected]>"
license=MIT
installdepends=(wireguard)
makedepends=(build:librust-clang-sys-dev build:libclang-dev build:libc6 build:libc6-dev build:clang)

image=rust:v2.2.2
image=rust:v3.1
_srcver="v${pkgver%-*}"
source=(
"https://github.com/tonarino/innernet/archive/refs/tags/$_srcver.zip"
)
sha256sums=(
2f7ca1d802d898b1c4fd090cba9e0562a1e80d617b55f23ba596e81c99441a1c
fd9ec6eb75dcc46c818696e7fcb87eb772dc024e0c326360f0f8c473c937c37c
)

prepare() {
Expand All @@ -43,13 +43,19 @@ package() {
install -D -m 700 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/innernet
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/[email protected]"
install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/innernet.target"

# Link /opt/bin/innernet to /opt/bin/inn
ln -s /opt/bin/innernet "$pkgdir"/opt/bin/inn
}

configure() {
if ! [ -d /opt/var/lib/innernet ]; then
mkdir -p /opt/var/lib/innernet
fi
}

preremove() {
disable-unit innernet.target
disable-unit [email protected]
}

postremove() {
systemctl daemon-reload
}
9 changes: 6 additions & 3 deletions package/kernelctl/kernelctl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ bl="\033[1;34m" # blue
# change our working directory to / to ease filesystem operations
cd /

# find current os version
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf)

help() {
read -r -d '' msg <<- EOM
Usage: $(basename "$0") COMMAND
Expand All @@ -36,7 +39,7 @@ help() {
# backup current kernel
backup() {
if [[ "$1" = "vanilla" ]]; then
kernel_name="vanilla-$(< /etc/version)"
kernel_name="vanilla-$os_version"
else
kernel_name=$1
fi
Expand Down Expand Up @@ -82,7 +85,7 @@ to_kernel_name() {
echo "${kernel_names[$(($1 - 1))]}"
return
elif [[ "$1" = "default" ]]; then
ker="vanilla-$(< /etc/version)"
ker="vanilla-$os_version"
else
ker="$1"
fi
Expand Down Expand Up @@ -185,7 +188,7 @@ prune() {
echo -n "Do you want to proceed? [N/y]: "
read -r ans
if [[ "$ans" = "y" || "$ans" = "Y" ]]; then
mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$(< /etc/version)".tar.bz2)
mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$os_version".tar.bz2)
for filename in "${filenames[@]}"; do
rm "$filename"
done
Expand Down
10 changes: 6 additions & 4 deletions package/kernelctl/package
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
pkgnames=(kernelctl)
pkgdesc="Manage aftermarket kernels"
url=https://toltec-dev.org/
pkgver=0.1-7
pkgver=0.2-1
timestamp=2022-11-12T00:00Z
section="utils"
maintainer="Salvatore Stella <[email protected]>"
Expand All @@ -26,15 +26,17 @@ package() {
}

configure() {
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf)
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then
echo "Creating a backup of the currently running kernel."
kernelctl backup vanilla
fi
}

preremove() {
if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$(< /etc/version)")" == "" ]]; then
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then
os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf)
if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$os_version")" == "" ]]; then
if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then
echo "Unable to restore default kernel."
echo "To force removal, you can run the following:"
echo " opkg remove --force-remove kernelctl"
Expand Down
4 changes: 4 additions & 0 deletions package/keyd/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[ids]
# 2edd:0001 # type folio

[main]
59 changes: 59 additions & 0 deletions package/keyd/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash
# Copyright (c) 2020 The Toltec Contributors
# SPDX-License-Identifier: MIT

archs=(rmallos3)
pkgnames=(keyd)
pkgdesc="A key remapping daemon for linux"
url="https://github.com/rvaiya/keyd"
pkgver=2.4.3-1
timestamp=2023-05-16T10:11Z
section=utils
maintainer="Kai <[email protected]>"
license=MIT

image=base:v3.1
source=(
https://github.com/rvaiya/keyd/archive/refs/tags/v2.4.3.zip
default.conf
)
sha256sums=(
cdfcc2cf0518b9a2d292ebac17b18f78548b92803e2a9deeb9f18c9641bf80e5
SKIP
)

build() {
make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd "CC=${CROSS_COMPILE}cc"
sed -i 's|ExecStart=/usr/bin/keyd|ExecStart=/opt/bin/keyd|' keyd.service
}

package() {
cd "$srcdir"
make PREFIX=/opt CONFIG_DIR=/opt/etc/keyd DESTDIR="$pkgdir" install
rmdir "$pkgdir"/etc/keyd
install -D -m 644 -t "$pkgdir"/etc/systemd/system "$srcdir"/keyd.service
install -D -m 644 -t "$pkgdir"/opt/etc/keyd "$srcdir"/default.conf
}

configure() {
addgroup keyd
systemctl daemon-reload
if is-active keyd; then
systemctl restart keyd
elif ! is-enabled "$pkgname.service"; then
echo ""
echo "Run the following command(s) to enable the keyd service"
how-to-enable "$pkgname.service"
echo ""
echo "You will need to modify /opt/etc/keyd/default.conf before starting the service"
fi
}

preremove() {
disable-unit keyd
delgroup keyd
}

postremove() {
systemctl daemon-reload
}
6 changes: 3 additions & 3 deletions package/koreader/package
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
pkgnames=(koreader)
pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats"
url=https://github.com/koreader/koreader
pkgver=2024.04-5
timestamp=2024-04-29T19:56:05Z
pkgver=2024.07-1
timestamp=2024-07-15T16:21:26Z
section="readers"
maintainer="raisjn <[email protected]>"
license=AGPL-3.0-or-later
Expand All @@ -22,7 +22,7 @@ source=(
launcherctl-koreader
)
sha256sums=(
e6b3a5a2c8cde8ca0c469fe542d6e170502fcf39b9a55e4447a7acd02b4a12c0
1040894434421b52076473f7947f139e2c98fcc04b1acadfe29b3362f262f9b7
SKIP
SKIP
SKIP
Expand Down
4 changes: 2 additions & 2 deletions package/launcherctl/package
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
pkgnames=(launcherctl)
pkgdesc="Manage your installed launcher"
url=https://toltec-dev.org/
pkgver=0.0.1-2
pkgver=0.0.1-3
timestamp=2023-12-18T03:32Z
section="launcher"
section="launchers"
maintainer="Eeems <[email protected]>"
license=MIT

Expand Down
Loading

0 comments on commit 60a3dd7

Please sign in to comment.