From e5e268c654b17df435922f02f1e9efc0d78145b2 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 6 Dec 2023 13:18:15 -0700 Subject: [PATCH 01/40] Move release information to environment variables (#773) --- .github/workflows/stable.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index e4d880017..c25e9e623 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -29,9 +29,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - name: Create Github Release continue-on-error: true - run: hub release create -t ${{ github.sha }} -m "${{ github.event.commits[0].message }}" $(date +%G-W%V-%u) + run: hub release create -t $SHA -m $MESSAGE $(date +%G-W%V-%u) env: + SHA: ${{ github.sha }} GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + MESSAGE: ${{ github.event.commits[0].message }} - name: Send notification to Discord continue-on-error: true uses: ./.github/actions/discord-send From 78a5d34d3ffd8b0c3d7c969003e479573a8fde9a Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 6 Dec 2023 13:46:37 -0700 Subject: [PATCH 02/40] Install hub (#775) --- .github/workflows/stable.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index c25e9e623..62a06e427 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -29,7 +29,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - name: Create Github Release continue-on-error: true - run: hub release create -t $SHA -m $MESSAGE $(date +%G-W%V-%u) + run: | + sudo apt-get update && sudo apt-get install -y hub + hub release create -t $SHA -m $MESSAGE $(date +%G-W%V-%u) env: SHA: ${{ github.sha }} GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} From 551e0db73f47f8026cfa3b750a6f5d0a26fe225d Mon Sep 17 00:00:00 2001 From: Sunny <8181990+TheLastZombie@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:52:31 +0100 Subject: [PATCH 03/40] rmfm: Update to 1.5.1 (#766) Co-authored-by: Nathaniel van Diepen --- package/rmfm/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/rmfm/package b/package/rmfm/package index aeeb76484..81c25a3ad 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -5,19 +5,19 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" url="https://forgejo.sny.sh/sun/rmFM" -pkgver=1.5.0-2 -timestamp=2023-08-08T22:19:23+02:00 +pkgver=1.5.1-1 +timestamp=2023-12-06T08:51:41+01:00 section=utils maintainer="Sunny " license=Unlicense installdepends=(node simple) source=( - https://forgejo.sny.sh/sun/rmFM/archive/1.5.0.zip + https://forgejo.sny.sh/sun/rmFM/archive/1.5.1.zip path_fix.patch ) sha256sums=( - 515cc1843bf61f628c3a0b2b2dcb3256a0182352c6b491585fd52cf96a554b26 + 054569a5e1f420b9046ee2c4067749a1e0bccd88acc216e485b9665a42f4dd60 SKIP ) From fcce9a37fa156bda28c865d266e1ab6a322c7a5b Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:52:03 -0600 Subject: [PATCH 04/40] Update neofetch to v1.1.0 (#769) * Update neofetch to v1.1.0 * inform config update * optional config msg --- package/neofetch/package | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package/neofetch/package b/package/neofetch/package index 1466ba5ad..ae1da866a 100644 --- a/package/neofetch/package +++ b/package/neofetch/package @@ -5,20 +5,28 @@ pkgnames=(neofetch) pkgdesc="A command-line system information tool" url="https://github.com/rM-self-serve/neofetch-rM" -pkgver=0.0.0-1 -timestamp=2023-02-09T11:43:00Z +pkgver=1.1.0-1 +timestamp=2023-12-06T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT source=( - https://github.com/rM-self-serve/neofetch-rM/archive/c497597ba4b481042cbb48b7c2c55e45dda25543.zip + https://github.com/rM-self-serve/neofetch-rM/archive/955997e4e3b8be682f40ee54366e44337df68959.zip ) sha256sums=( - 06492898eac6fb4f2cc95ca52c65f8f4f580ada57b4fe433722dabeae884b633 + 451017bd2517cf8c124af772e77b316ad784507709219e5831b28f613830f7e5 ) package() { install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/neofetch } + +configure() { + if [ -f '/home/root/.config/neofetch/config.conf' ]; then + echo "" + echo "You may choose to remove ~/.config/neofetch/config.conf" + echo "in order to get the latest default config." + fi +} From 54d1e65a3f3687b0afe30d5d979d413e74a0a99d Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Thu, 7 Dec 2023 19:28:21 -0600 Subject: [PATCH 05/40] Update webinterface-wifi to v2.0.0 (#768) * Update webinterface-wifi to v2.0.0 * reload daemon if running on upgrade --------- Co-authored-by: Nathaniel van Diepen --- package/webinterface-wifi/package | 55 +++++++++++++++---- .../webinterface-wifi-toltec.service | 5 +- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/package/webinterface-wifi/package b/package/webinterface-wifi/package index e8bdeaff6..196a859eb 100644 --- a/package/webinterface-wifi/package +++ b/package/webinterface-wifi/package @@ -2,40 +2,70 @@ # Copyright (c) 2020 The Toltec Contributors # SPDX-License-Identifier: MIT -pkgnames=(webinterface-wifi) +_pkgname="webinterface-wifi" +pkgnames=("$_pkgname") pkgdesc="View the web interface if running, over wifi" -url="https://github.com/rM-self-serve/webinterface-wifi" -pkgver=1.0.2-1 -timestamp=2023-02-06T12:23:17Z +url="https://github.com/rM-self-serve/$_pkgname" +pkgver=2.0.0-1 +timestamp=2023-11-26T00:02:11Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT +image=rust:v3.1 -image=rust:v2.3 +_pkgalias="webint-wifi" +_configdir="/home/root/.config/$_pkgname" +_etcdir="/opt/etc/$_pkgname" source=( - https://github.com/rM-self-serve/webinterface-wifi/archive/2e29855303a0806ee51e71bc836bc4b16204fa14.zip - webinterface-wifi-toltec.service + "$url/archive/4513d5cbc5e323f2959987f3bc9e300b0aaddb19.zip" + "$_pkgname-toltec.service" ) sha256sums=( - 629bab244a387086ce2a8f8118b8d1017cf993bf97b13da72573f52572ed526e + a23c05faf4ccaafea9222255399c8c3a121079dd07970c8768b4315606eb7834 SKIP ) build() { - RUSTFLAGS="-Zcrate-attr=feature(const_fn_trait_bound)" cargo build --release + WIW_DATADIR="/opt/etc" cargo build --release } package() { - install -D -m 755 -t "$pkgdir"/opt/bin \ - "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/webinterface-wifi - install -D -m 644 "$srcdir"/webinterface-wifi-toltec.service "$pkgdir"/lib/systemd/system/webinterface-wifi.service + install -D -m 755 -t "$pkgdir/opt/bin" \ + "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$_pkgname" + ln -s "/opt/bin/$_pkgname" "$pkgdir/opt/bin/$_pkgalias" + + install -D -m 644 "$srcdir/$_pkgname-toltec.service" \ + "$pkgdir/lib/systemd/system/$_pkgname.service" + + install -D -m 644 -t "$pkgdir""$_etcdir/docs" \ + "$srcdir/README.MD" "$srcdir"/config/*.toml + install -D -m 644 -t "$pkgdir""$_etcdir/docs/config_examples" \ + "$srcdir"/config/examples/*.toml + install -D -m 644 -t "$pkgdir""$_etcdir"/assets \ + "$srcdir/assets/favicon.ico" + install -d "$pkgdir""$_etcdir/ssl" \ + "$pkgdir""$_etcdir/auth" \ + "$pkgdir""$_configdir" } configure() { + [[ -f "$_configdir/config.toml" ]] \ + || cp "$_etcdir/docs/config.default.toml" \ + "$_configdir/config.toml" + systemctl daemon-reload + if is-active "$pkgname"; then + echo "Restarting $pkgname" + systemctl restart "$pkgname" + fi + + echo "" + echo "Run '\$ $pkgname' for usage information and a link to" + echo "the documentation. You can also find the documentation locally" + echo "at /opt/etc/webinterface-wifi/docs/" echo "" echo "Run the following command to use $pkgname" how-to-enable "$pkgname.service" @@ -53,5 +83,6 @@ preremove() { } postremove() { + rmdir "$_etcdir"/*/* "$_etcdir"/* "$_etcdir" 2> /dev/null || true systemctl daemon-reload } diff --git a/package/webinterface-wifi/webinterface-wifi-toltec.service b/package/webinterface-wifi/webinterface-wifi-toltec.service index b6055fc90..b3efab933 100644 --- a/package/webinterface-wifi/webinterface-wifi-toltec.service +++ b/package/webinterface-wifi/webinterface-wifi-toltec.service @@ -5,9 +5,10 @@ StartLimitBurst=4 After=home.mount [Service] -Environment=HOME=/home/root Type=simple -ExecStart=/opt/bin/webinterface-wifi --run 80 +Environment=HOME=/home/root +Environment=WEBINT_WIFI_RUN_ENV=DAEMON +ExecStart=/opt/bin/webinterface-wifi local-exec Restart=on-failure [Install] From 0c4d92d026e8b592a4deae8caf203053e96e83d1 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Thu, 7 Dec 2023 22:27:27 -0600 Subject: [PATCH 06/40] Add package webinterface-onboot v1.2.2 (#770) * Add package webinterface-onboot 1.2.2 * daemon opt/bin * fmt * correct error reporting; conflict ddvk * reinstall on upgrade --------- Co-authored-by: Nathaniel van Diepen --- package/webinterface-onboot/package | 93 +++++++++++++++++++ .../webinterface-onboot-toltec.service | 13 +++ 2 files changed, 106 insertions(+) create mode 100644 package/webinterface-onboot/package create mode 100644 package/webinterface-onboot/webinterface-onboot-toltec.service diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package new file mode 100644 index 000000000..03b5d0daf --- /dev/null +++ b/package/webinterface-onboot/package @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +_pkgname='webinterface-onboot' +pkgnames=("$_pkgname") +pkgdesc="Start the web interface without the cable, on boot." +url="https://github.com/rM-self-serve/$_pkgname" +pkgver=1.2.2-1 +timestamp=2023-12-03T11:43:00Z +section="utils" +maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" +license=MIT +conflicts=(ddvk-hacks) + +source=( + "$url"/archive/cdfe457435974f7ca309b1ac50f1b2ef67000813.zip + "$_pkgname-toltec.service" +) +sha256sums=( + bad965b923fa0979e7c8b97f6a90a400300ef8461292276e6fa2107a89624c8b + SKIP +) + +package() { + install -D -m 755 -t "$pkgdir/opt/bin" "$srcdir/$_pkgname" + install -D -m 644 "$srcdir/$_pkgname-toltec.service" \ + "$pkgdir/lib/systemd/system/$_pkgname.service" + + touch "$srcdir"/emptyfile + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile +} + +configure() { + systemctl daemon-reload + + echo + echo "Applying usb0 ip persistence" + webinterface-onboot apply-prstip -y > /dev/null + echo "Success" + if webinterface-onboot is-hack-version > /dev/null; then + echo + echo "Applying binary modification" + webinterface-onboot apply-hack -y > /dev/null + echo "Success" + fi + + echo + echo "Run the following command to use $pkgname" + how-to-enable "$pkgname.service" + echo + echo "Then restart xochitl or the device" +} + +_restore() { + if webinterface-onboot is-prstip-applied > /dev/null; then + echo + echo "Reverting usb0 ip persistence" + webinterface-onboot revert-prstip -y > /dev/null + echo "Success" + fi + + if webinterface-onboot is-hack-applied > /dev/null; then + echo + echo "Reverting binary modification" + if webinterface-onboot has-backup > /dev/null; then + webinterface-onboot revert-hack --backup -y > /dev/null + else + webinterface-onboot revert-hack --reverse -y > /dev/null + fi + echo "Success" + fi +} + +preremove() { + if is-active "$pkgname"; then + echo "Stopping $pkgname" + systemctl stop "$pkgname" + fi + if is-enabled "$pkgname"; then + echo "Disabling $pkgname" + systemctl disable "$pkgname" + fi + _restore +} + +preupgrade() { + _restore +} + +postremove() { + systemctl daemon-reload +} diff --git a/package/webinterface-onboot/webinterface-onboot-toltec.service b/package/webinterface-onboot/webinterface-onboot-toltec.service new file mode 100644 index 000000000..407d2c0f2 --- /dev/null +++ b/package/webinterface-onboot/webinterface-onboot-toltec.service @@ -0,0 +1,13 @@ +[Unit] +Description=Enable the web interface on boot +StartLimitIntervalSec=600 +StartLimitBurst=4 +After=home.mount + +[Service] +Environment=HOME=/home/root +Type=oneshot +ExecStart=/opt/bin/webinterface-onboot local-exec + +[Install] +WantedBy=multi-user.target From fb3054b75c4f64fb7ca8060a3e8545871149d18b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 8 Dec 2023 10:28:06 -0700 Subject: [PATCH 07/40] Update micro to 2.0.13 (#738) * Update micro to 2.0.12 Release notes: https://github.com/zyedidia/micro/releases/tag/v2.0.12 * Update micro to 2.0.13 --- package/micro/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/micro/package b/package/micro/package index e71f429ce..40e2c3377 100644 --- a/package/micro/package +++ b/package/micro/package @@ -5,14 +5,14 @@ pkgnames=(micro) pkgdesc="Modern and intuitive terminal-based text editor" url=https://micro-editor.github.io/ -pkgver=2.0.10-1 -timestamp=2021-08-07T00:57:40Z +pkgver=2.0.13-1 +timestamp=2023-10-21T22:38:29Z section="utils" maintainer="Eeems " license=MIT -source=(https://github.com/zyedidia/micro/releases/download/v2.0.10/micro-2.0.10-linux-arm.tar.gz) -sha256sums=(b60478ac87f41f00d91cf6ca58b6d7e05af99ee5fa73fa8881b140ac428fa278) +source=("https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux-arm.tar.gz") +sha256sums=(cbbed4e69567871462464049646dc11fdad8b8c75fde5d75856068c2cfbd2d38) package() { install -Dm644 "$srcdir"/LICENSE "$pkgdir/opt/usr/share/licenses/$pkgname/LICENSE" From dd0cff21ebce8373118fd439c359bdf359e827ea Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 8 Dec 2023 10:34:14 -0700 Subject: [PATCH 08/40] Update KOReader to v2023.10 (#749) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 79e03cdc7..fa3ffd56c 100644 --- a/package/koreader/package +++ b/package/koreader/package @@ -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=2023.08-2 -timestamp=2023-08-29T16:21:01Z +pkgver=2023.10-1 +timestamp=2023-10-30T17:19:28Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 8cc9fad1cbcda5519c20afe6e33c4f80a51587daed7b959ef7284ce8b0c41ec0 + fdb72bdb80c74b6c955ffde8852ce67b77ebc7d88ceb4a439b622aff74ad858e SKIP SKIP SKIP From 9c97b6ddbedff35f611e187d3d6011e2fc2e7b91 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 8 Dec 2023 10:37:50 -0700 Subject: [PATCH 09/40] Fix #649 (#720) --- package/ddvk-hacks/package | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index 03fefb82f..ac4a46ce4 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -6,7 +6,7 @@ archs=(rm1 rm2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=39.01-1 +pkgver=39.01-2 timestamp=2022-11-09T18:31:51Z section="readers" maintainer="Mattéo Delabre " @@ -66,6 +66,8 @@ package() { install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21501067_rm2/patch_38.2.03 install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21511189_rm2/patch_39.2.01 fi + touch "$srcdir"/emptyfile + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/ddvk-hacks "$srcdir"/emptyfile } configure() { From e242befaca96d54d3e686eda911a07e79eec1852 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:18:46 -0600 Subject: [PATCH 10/40] confilcit with new hacks (#778) Co-authored-by: Nathaniel van Diepen --- package/ddvk-hacks/package | 1 + 1 file changed, 1 insertion(+) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index ac4a46ce4..70423edd9 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -12,6 +12,7 @@ section="readers" maintainer="Mattéo Delabre " license=MIT flags=(nostrip) +conflicts=(webinterface-onboot signature-rm) source=(https://github.com/ddvk/remarkable-hacks/archive/90e7e3e7ffc269373de191085453be50c9f8da0c.zip) sha256sums=(d3b1413bb9219804581afab598e7f5308233e7467d64e8084e67aae7346beaba) From 2672d2219e53e970604bde61b349a7a56b918fc6 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:33:01 -0600 Subject: [PATCH 11/40] Add package: webinterface-upload-button v1.0.1 (#771) * Add package: webinterface-upload-button v1.0.1 * auto apply/revert; reinstall on reenable * remove alias --- package/webinterface-upload-button/package | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/webinterface-upload-button/package diff --git a/package/webinterface-upload-button/package b/package/webinterface-upload-button/package new file mode 100644 index 000000000..8341150ca --- /dev/null +++ b/package/webinterface-upload-button/package @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +_pkgname='webinterface-upload-button' +pkgnames=("$_pkgname") +pkgdesc="A simple upload button for the web interface" +url="https://github.com/rM-self-serve/$_pkgname" +pkgver=1.0.1-1 +timestamp=2023-12-06T11:43:00Z +section="utils" +maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" +license=MIT + +source=( + "$url"/archive/1c69d4fcaa1cb8e2cf4b022a190429dc39946498.zip +) +sha256sums=( + a388d1db49a3c35782600efbd94ee449c59f46c223f14c254cb74d9509255d96 +) + +package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$_pkgname" + + touch "$srcdir"/emptyfile + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile +} + +configure() { + echo + echo "Applying webinterface-upload-button" + webinterface-upload-button apply -y > /dev/null + echo "Success" + echo +} + +_restore() { + echo + echo "Reverting webinterface-upload-button" + webinterface-upload-button revert -y > /dev/null + echo "Success" + echo +} + +preremove() { + _restore +} + +preupgrade() { + _restore +} From 051ca4cc091a72326085e429dfa94602bbaa4e17 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:57:07 -0600 Subject: [PATCH 12/40] Add package: signature-rm v1.0.2 (#772) * Add package: signature-rM v1.0.2 * auto apply/revert; reinstall on reenable * conflicts=(ddvk-hacks) * remove error suppression * #770 and #772 conflict --------- Co-authored-by: Nathaniel van Diepen --- package/signature-rm/package | 61 +++++++++++++++++++++++++++++ package/webinterface-onboot/package | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 package/signature-rm/package diff --git a/package/signature-rm/package b/package/signature-rm/package new file mode 100644 index 000000000..7c24d8061 --- /dev/null +++ b/package/signature-rm/package @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +_pkgname='signature-rm' +pkgnames=("$_pkgname") +pkgdesc="Remove the signature from the bottom of emails" +url="https://github.com/rM-self-serve/signature-rM" +pkgver=1.0.2-1 +timestamp=2023-12-06T11:43:00Z +section="utils" +maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" +license=MIT +image=rust:v3.1 +conflicts=(ddvk-hacks webinterface-onboot) + +source=( + "$url"/archive/b5561af4eb6a0f5aa6e98e1a1279066f0c4bd9b7.zip +) +sha256sums=( + 1a7cc8bf7a3f5a7cc9a10ca968bbb5a0082a065760f4cb7038fdb6b9aed4bb00 +) + +build() { + cargo build --release +} + +package() { + install -D -m 755 -t "$pkgdir"/opt/bin \ + "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$_pkgname" + + touch "$srcdir"/emptyfile + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile +} + +configure() { + echo + echo "Applying signature-rM" + signature-rm apply -y > /dev/null + echo "Success" + echo +} + +_restore() { + echo "Reverting /usr/bin/xochitl" + if signature-rm has-backup > /dev/null; then + signature-rm revert --backup -y > /dev/null + else + signature-rm revert --reverse -y > /dev/null + fi + echo "Success" + echo +} + +preremove() { + _restore +} + +preupgrade() { + _restore +} diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index 03b5d0daf..899eea096 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -11,7 +11,7 @@ timestamp=2023-12-03T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT -conflicts=(ddvk-hacks) +conflicts=(ddvk-hacks signature-rm) source=( "$url"/archive/cdfe457435974f7ca309b1ac50f1b2ef67000813.zip From 8963569814651fca7701b0b168b9fd96fbad1da7 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 9 Dec 2023 21:49:56 -0700 Subject: [PATCH 13/40] Clean up systemd unit disable logic (#721) * Fix #638 --- package/display/package | 10 ++++------ package/draft/package | 7 ++----- package/koreader/package | 12 ++---------- package/oxide/package | 11 ++--------- package/reboot-guard/package | 11 ++--------- package/rmfakecloud-proxy/package | 4 ++-- package/rmkit/package | 10 ++++------ package/tailscale-systemd/package | 12 ++---------- package/toltec-base/package | 8 +++----- package/webinterface-onboot/package | 11 ++--------- package/webinterface-wifi/package | 11 ++--------- package/xochitl/package | 6 ++---- scripts/install-lib | 28 ++++++++++++++++++++++++++++ 13 files changed, 57 insertions(+), 84 deletions(-) diff --git a/package/display/package b/package/display/package index 4e2937383..affb56eee 100644 --- a/package/display/package +++ b/package/display/package @@ -8,7 +8,7 @@ timestamp=2023-08-27T02:39:10Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.32-1 +pkgver=1:0.0.32-2 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -66,13 +66,13 @@ display() { systemctl daemon-reload if systemctl enable rm2fb --now; then # Restart xochitl if it's running - if systemctl --quiet is-active xochitl; then + if is-active xochitl; then # Reset the crash count so we don't trigger remarkable-fail echo "0" > /tmp/crashnum systemctl restart xochitl fi else - systemctl disable rm2fb --now + disable-unit rm2fb.service echo "Failed to start rm2fb. Keeping it disabled for now." echo "Please check the logs and open an issue:" echo " https://github.com/toltec-dev/toltec/issues/new" @@ -83,9 +83,7 @@ display() { preremove() { if [[ $arch = rm2 ]]; then - if systemctl list-units --full -all | grep -Fq 'rm2fb.service'; then - systemctl disable rm2fb --now - fi + disable-unit rm2fb.service echo -n "make sure " if ! is-enabled xochitl.service; then echo "to re-enable xochitl with 'systemctl enable xochitl --now'" diff --git a/package/draft/package b/package/draft/package index 2234c85f0..aac94f8e6 100644 --- a/package/draft/package +++ b/package/draft/package @@ -5,7 +5,7 @@ pkgnames=(draft) pkgdesc="Launcher which wraps around the standard interface" url=https://github.com/dixonary/draft-reMarkable -pkgver=0.2.0-21 +pkgver=0.2.0-22 timestamp=2020-07-20T10:23Z section="launchers" maintainer="Mattéo Delabre " @@ -60,10 +60,7 @@ configure() { } preremove() { - if systemctl list-units --full -all | grep -Fq "$pkgname.service"; then - echo "Disabling $pkgname" - systemctl disable --now "$pkgname" - fi + disable-unit "$pkgname.service" } postremove() { diff --git a/package/koreader/package b/package/koreader/package index fa3ffd56c..3568eb43a 100644 --- a/package/koreader/package +++ b/package/koreader/package @@ -5,7 +5,7 @@ pkgnames=(koreader) pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats" url=https://github.com/koreader/koreader -pkgver=2023.10-1 +pkgver=2023.10-2 timestamp=2023-10-30T17:19:28Z section="readers" maintainer="raisjn " @@ -62,15 +62,7 @@ MSG } preremove() { - if is-active "$pkgname"; then - echo "Stopping $pkgname" - systemctl stop "$pkgname" - fi - - if is-enabled "$pkgname"; then - echo "Disabling $pkgname" - systemctl disable "$pkgname" - fi + disable-unit "$pkgname.service" } postremove() { diff --git a/package/oxide/package b/package/oxide/package index 993d16996..8c2c32049 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -4,7 +4,7 @@ pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety oxide-utils inject_evdev liboxide libsentry) _oxidever=2.6 -pkgver=$_oxidever-2 +pkgver=$_oxidever-3 _sentryver=0.5.0 timestamp=2023-06-05T23:27:53Z maintainer="Eeems " @@ -98,14 +98,7 @@ tarnish() { fi } preremove() { - if is-active tarnish; then - echo "Stopping tarnish" - systemctl stop tarnish - fi - if is-enabled tarnish; then - echo "Disabling tarnish" - systemctl disable tarnish - fi + disable-unit tarnish.service } postremove() { systemctl daemon-reload diff --git a/package/reboot-guard/package b/package/reboot-guard/package index ef9ceb257..965c8a59b 100644 --- a/package/reboot-guard/package +++ b/package/reboot-guard/package @@ -5,7 +5,7 @@ pkgnames=(reboot-guard) pkgdesc="Block systemd-initiated poweroff/reboot/halt until configurable condition checks pass" url=https://github.com/stephanritscher/reboot-guard -pkgver=1.0.1-7 +pkgver=1.0.1-8 timestamp=2020-05-04T06:16Z section="devel" maintainer="Eeems " @@ -34,14 +34,7 @@ configure() { } preremove() { - if is-active rguard.service; then - echo "Stopping rguard.service" - systemctl stop rguard.service - fi - if is-enabled rguard.service; then - echo "Disabling rguard.service" - systemctl disable rguard.service - fi + disable-unit rguard.service } postremove() { diff --git a/package/rmfakecloud-proxy/package b/package/rmfakecloud-proxy/package index 25b90d9b0..b9f247d55 100644 --- a/package/rmfakecloud-proxy/package +++ b/package/rmfakecloud-proxy/package @@ -7,7 +7,7 @@ pkgdesc="Connect Xochitl to a rmfakecloud server" _url=https://github.com/ddvk/rmfakecloud-proxy url="$_url" _upver=0.0.3 -pkgver="$_upver-3" +pkgver="$_upver-4" timestamp=2022-02-26T22:59Z section="utils" maintainer="Mattéo Delabre " @@ -55,7 +55,7 @@ configure() { install-hosts else uninstall-certificates - systemctl disable --now rmfakecloud-proxy + disable-unit rmfakecloud-proxy.service uninstall-hosts fi diff --git a/package/rmkit/package b/package/rmkit/package index be1585793..f8930555b 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -52,7 +52,7 @@ dumbskull() { genie() { pkgdesc="Gesture engine that connects commands to gestures" url="https://rmkit.dev/apps/genie" - pkgver=0.1.6-2 + pkgver=0.1.6-3 section="utils" package() { @@ -67,8 +67,7 @@ genie() { } preremove() { - echo "Disabling $pkgname" - systemctl disable --now "$pkgname" + disable-unit "$pkgname.service" } postremove() { @@ -146,7 +145,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.2.4-1 + pkgver=0.2.4-2 section="launchers" package() { @@ -166,8 +165,7 @@ remux() { } preremove() { - echo "Disabling $pkgname" - systemctl disable --now "$pkgname" + disable-unit "$pkgname.service" } postremove() { diff --git a/package/tailscale-systemd/package b/package/tailscale-systemd/package index 4e7fe832a..e8a7836f4 100644 --- a/package/tailscale-systemd/package +++ b/package/tailscale-systemd/package @@ -5,7 +5,7 @@ pkgnames=(tailscale-systemd) pkgdesc="SystemD configuration for tailscale" url=https://tailscale.com -pkgver=0.0.0-1 +pkgver=0.0.0-2 section="utils" timestamp=2023-07-12T00:00Z maintainer="Kai " @@ -30,15 +30,7 @@ configure() { } preremove() { - if is-active tailscaled; then - echo "Stopping tailscaled" - systemctl stop tailscaled - fi - - if is-enabled tailscaled; then - echo "Disabling tailscaled" - systemctl disable tailscaled - fi + disable-unit "tailscaled.service" } postremove() { diff --git a/package/toltec-base/package b/package/toltec-base/package index 87dd4aa26..b333afb84 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,7 +6,7 @@ archs=(rm1 rm2) pkgnames=(toltec-base) pkgdesc="Metapackage defining the base set of packages in a Toltec install" url=https://toltec-dev.org/ -pkgver=1.2-2 +pkgver=1.2-3 timestamp=2023-05-08T19:31Z section="utils" maintainer="Eeems " @@ -29,10 +29,8 @@ configure() { sed -i \ -e 's|^export TERM=xterm|if \[ -z "$TERM" \];then export TERM=xterm;fi|' \ /opt/etc/profile - if is-enabled "update-engine.service"; then - echo "Disabling automatic update" - systemctl disable --now update-engine - fi + echo "Disabling automatic update" + disable-unit update-engine.service if [[ "$arch" == "rm1" ]] && ! is-masked sys-subsystem-net-devices-usb1.device; then echo "Disabling usb1 network device to avoid long boots" systemctl mask sys-subsystem-net-devices-usb1.device diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index 899eea096..1d0613caa 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -6,7 +6,7 @@ _pkgname='webinterface-onboot' pkgnames=("$_pkgname") pkgdesc="Start the web interface without the cable, on boot." url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.2.2-1 +pkgver=1.2.2-2 timestamp=2023-12-03T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" @@ -73,14 +73,7 @@ _restore() { } preremove() { - if is-active "$pkgname"; then - echo "Stopping $pkgname" - systemctl stop "$pkgname" - fi - if is-enabled "$pkgname"; then - echo "Disabling $pkgname" - systemctl disable "$pkgname" - fi + disable-unit "$pkgname.service" _restore } diff --git a/package/webinterface-wifi/package b/package/webinterface-wifi/package index 196a859eb..655beab42 100644 --- a/package/webinterface-wifi/package +++ b/package/webinterface-wifi/package @@ -6,7 +6,7 @@ _pkgname="webinterface-wifi" pkgnames=("$_pkgname") pkgdesc="View the web interface if running, over wifi" url="https://github.com/rM-self-serve/$_pkgname" -pkgver=2.0.0-1 +pkgver=2.0.0-2 timestamp=2023-11-26T00:02:11Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" @@ -72,14 +72,7 @@ configure() { } preremove() { - if is-active "$pkgname"; then - echo "Stopping $pkgname" - systemctl stop "$pkgname" - fi - if is-enabled "$pkgname"; then - echo "Disabling $pkgname" - systemctl disable "$pkgname" - fi + disable-unit "$pkgname.service" } postremove() { diff --git a/package/xochitl/package b/package/xochitl/package index 1841988bf..07fa0a042 100644 --- a/package/xochitl/package +++ b/package/xochitl/package @@ -5,7 +5,7 @@ pkgnames=(xochitl) pkgdesc="Read documents and take notes" url=https://remarkable.com -pkgver=0.0.0-16 +pkgver=0.0.0-17 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " @@ -83,9 +83,7 @@ configure() { } preremove() { - if is-active manual-sync.service; then - systemctl disable --now manual-sync.service - fi + disable-unit manual-sync.service } postremove() { diff --git a/scripts/install-lib b/scripts/install-lib index 59c35e2bb..e5e9f22a4 100644 --- a/scripts/install-lib +++ b/scripts/install-lib @@ -182,3 +182,31 @@ remove-bind-mount() { rm "$unit_path" systemctl daemon-reload } + +# Check to see if a systemd unit exists +# +# Arguments: +# +# $1 - Full name of the systemd unit, e.g. "draft.service" +unit-exists() { + [ "$(systemctl --quiet list-unit-files "${1}" | grep -c "${1}")" -eq 1 ] +} + +# Stops and disabled a unit +# +# Arguments: +# +# $1 - Full name of the systemd unit, e.g. "draft.service" +disable-unit() { + if ! unit-exists "${1}"; then + return + fi + if is-active "$1"; then + echo "Stopping ${1}" + systemctl stop "${1}" + fi + if is-enabled "${1}"; then + echo "Disabling ${1}" + systemctl disable "${1}" + fi +} From 7d97e17201174f26511abc1180b3f15f9f172013 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 16 Dec 2023 12:16:25 -0700 Subject: [PATCH 14/40] Remove wireguard-tools from wireguard (#784) * Remove wireguard-tools from wireguard and mark it as depending on wireguard-tools * Dropping wireguard-tools as entware has it and wg-quick already --- package/wireguard-tools/package | 32 -------------------------------- package/wireguard/package | 21 ++------------------- 2 files changed, 2 insertions(+), 51 deletions(-) delete mode 100755 package/wireguard-tools/package diff --git a/package/wireguard-tools/package b/package/wireguard-tools/package deleted file mode 100755 index 87bbb3971..000000000 --- a/package/wireguard-tools/package +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2031 The Toltec Contributors -# SPDX-License-Identifier: MIT - -pkgnames=(wireguard-tools) -pkgdesc="Fast, modern, secure VPN tunnel" -url=https://www.wireguard.com -pkgver=1.0.20210914-1 -timestamp=2021-02-23T00:00Z -section=kernel -maintainer="Salvatore Stella " -license=GPL-2.0-only -image=base:v3.1 -provides=(wireguard-tools) -conflicts=(wireguard) -source=("https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${pkgver%-*}.tar.xz") - -sha256sums=(97ff31489217bb265b7ae850d3d0f335ab07d2652ba1feec88b734bc96bd05ac) - -prepare() { - # The symlink at src/wg-quick/wg needs something to point to - touch "$srcdir/src/wg" -} - -build() { - make -C "$srcdir/src" PLATFORM=linux "CC=${CROSS_COMPILE}cc" -} - -package() { - install -D -t "$pkgdir/opt/bin" "$srcdir/src/wg" - install -D "$srcdir/src/wg-quick/linux.bash" "$pkgdir/opt/bin/wg-quick" -} diff --git a/package/wireguard/package b/package/wireguard/package index 67b900c9d..23665bb19 100755 --- a/package/wireguard/package +++ b/package/wireguard/package @@ -5,15 +5,14 @@ pkgnames=(wireguard) pkgdesc="Fast, modern, secure VPN tunnel" url=https://www.wireguard.com -pkgver=1.0.20210219-3 -_wireguardtoolsver=1.0.20210223 +pkgver=1.0.20210219-4 timestamp=2021-02-19T14:08Z section=kernel maintainer="Jonah Weissman " license=GPL-2.0-only makedepends=(build:bc build:lzop build:git) flags=(nostrip) -provides=(wireguard-tools) +installdepends=(wireguard-tools) _kernelrepo=https://github.com/remarkable/linux _kernelrevs=( @@ -28,28 +27,14 @@ _defconfigs=( image=base:v2.1 source=( "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${pkgver%-*}.tar.xz" - "https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${_wireguardtoolsver}.tar.xz" fix-multiple-yylloc-definitions.patch ) -noextract=("wireguard-tools-${_wireguardtoolsver}.tar.xz") sha256sums=( 99d35296b8d847a0d4db97a4dda96b464311a6354e75fe0bef6e7c4578690f00 - 1f72da217044622d79e0bab57779e136a3df795e3761a3fc1dc0941a9055877c SKIP ) -prepare() { - bsdtar -x \ - --directory "$srcdir" \ - --file "$srcdir/wireguard-tools-${_wireguardtoolsver}.tar.xz" - mv "$srcdir/wireguard-tools-${_wireguardtoolsver}" "$srcdir/wireguard-tools" - # the symlink at src/wg-quick/wg needs something to point to - touch "$srcdir/wireguard-tools/src/wg" -} - build() { - make -C wireguard-tools/src PLATFORM=linux "CC=${CROSS_COMPILE}cc" - mkdir pkg git init linux for i in $(seq 0 1); do @@ -81,8 +66,6 @@ build() { } package() { - make -C "$srcdir/wireguard-tools/src" DESTDIR="$pkgdir" WITH_WGQUICK=yes \ - WITH_SYSTEMDUNITS=yes WITH_BASHCOMPLETION=no install mkdir -p "$pkgdir/lib/modules" cp -r "$srcdir/pkg"/* "$pkgdir/lib/modules" } From 2128b1381ae13c90a0162272b4ac5d3e48e88eb7 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Sun, 17 Dec 2023 19:46:13 -0600 Subject: [PATCH 15/40] webinterface-onboot wait for usb0 (#794) --- package/webinterface-onboot/package | 2 +- package/webinterface-onboot/webinterface-onboot-toltec.service | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index 1d0613caa..ad34fff10 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -6,7 +6,7 @@ _pkgname='webinterface-onboot' pkgnames=("$_pkgname") pkgdesc="Start the web interface without the cable, on boot." url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.2.2-2 +pkgver=1.2.2-3 timestamp=2023-12-03T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" diff --git a/package/webinterface-onboot/webinterface-onboot-toltec.service b/package/webinterface-onboot/webinterface-onboot-toltec.service index 407d2c0f2..563cba5bd 100644 --- a/package/webinterface-onboot/webinterface-onboot-toltec.service +++ b/package/webinterface-onboot/webinterface-onboot-toltec.service @@ -2,7 +2,7 @@ Description=Enable the web interface on boot StartLimitIntervalSec=600 StartLimitBurst=4 -After=home.mount +After=home.mount sys-subsystem-net-devices-usb0.device [Service] Environment=HOME=/home/root From 65bc99041235fb94855ce3a94a7633e2fdeeb901 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:45:31 -0600 Subject: [PATCH 16/40] add package: bottom (#804) Co-authored-by: gbyl --- package/bottom/package | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/bottom/package diff --git a/package/bottom/package b/package/bottom/package new file mode 100644 index 000000000..9637894de --- /dev/null +++ b/package/bottom/package @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(bottom) +pkgdesc="Cross-platform graphical process/system monitor" +url=https://github.com/ClementTsang/bottom +pkgver=0.9.6-1 +timestamp=2023-08-26T14:43Z +section="utils" +maintainer="gbyl " +license=MIT + +image=rust:v3.1 +source=("https://github.com/ClementTsang/bottom/archive/refs/tags/${pkgver%-*}.zip") +sha256sums=(38c1a544ceeac4792f8e4acbf3adbf0a6d7a935afb7ef9121aaba1e7ed25cea3) + +build() { + cargo build --release +} + +package() { + install -D -m 755 "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/btm "$pkgdir"/opt/bin/btm +} From 4c5ec52275207abab5529bd3adae3913f0a799c8 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:54:43 -0600 Subject: [PATCH 17/40] Update lf to r31 (#802) * update lf to r31 --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/lf/package | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/lf/package b/package/lf/package index 1b415a869..b21d67e66 100644 --- a/package/lf/package +++ b/package/lf/package @@ -1,19 +1,19 @@ #!/usr/bin/env bash -# Copyright (c) 2022 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(lf) pkgdesc="Terminal file manager" url=https://github.com/gokcehan/lf -pkgver=r27-1 -timestamp=2022-04-02T09:40Z +pkgver=r31-1 +timestamp=2023-09-17T12:55Z section="utils" maintainer="gbyl " license=MIT -image=golang:v2.3 -source=("https://github.com/gokcehan/lf/archive/refs/tags/r27.zip") -sha256sums=(a4f7b3ada4aa1348b7f102374d8580b6992977f7e84053aa04ef6aadb69dc205) +image=golang:v3.1 +source=("https://github.com/gokcehan/lf/archive/refs/tags/${pkgver%-*}.zip") +sha256sums=(217e152f09ae0cc8ab8f12fd92f705dd12630907de2b6a78ffc2727950921f97) build() { export GOARCH=arm From ddba8515b4a1961076eee68778a1e617acbd4b40 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:59:05 -0600 Subject: [PATCH 18/40] Update ripgrep to 14.0.3 (#801) * Update ripgrep to 14.0.3 --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/ripgrep/package | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/ripgrep/package b/package/ripgrep/package index a6a13a6ea..88aae0388 100644 --- a/package/ripgrep/package +++ b/package/ripgrep/package @@ -1,19 +1,19 @@ #!/usr/bin/env bash -# Copyright (c) 2022 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(ripgrep) pkgdesc="Modern grep for recursive regex pattern searching" url=https://github.com/BurntSushi/ripgrep -pkgver=13.0.0-1 -timestamp=2021-06-12T10:54Z +pkgver=14.0.3-1 +timestamp=2023-11-28T21:22Z section="utils" maintainer="gbyl " license=MIT -image=rust:v2.3 -source=("https://github.com/BurntSushi/ripgrep/archive/refs/tags/13.0.0.zip") -sha256sums=(5f9d35c2db0513d9d1cbc5254aa9d48fcd74243259b7b15955e131f36f627745) +image=rust:v3.1 +source=("https://github.com/BurntSushi/ripgrep/archive/refs/tags/${pkgver%-*}.zip") +sha256sums=(eb91f202fc25d51755390736775a7e7f8e146eb97e584aaa01fb0c45aa5de654) build() { cargo build --release From 6ac4d9df604f1e0c073df591b8e33025a20da16a Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Tue, 26 Dec 2023 17:09:11 -0600 Subject: [PATCH 19/40] update 7zip to 23.01 (#805) Co-authored-by: gbyl --- package/7zip/package | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/7zip/package b/package/7zip/package index c70744764..ebc6d6ad0 100644 --- a/package/7zip/package +++ b/package/7zip/package @@ -1,19 +1,19 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(7zip) pkgdesc="A file archiver with a high compression ratio." url="https://www.7-zip.org/" -section="util" -pkgver=22.01-1 -timestamp=2022-07-15T00:00:00Z +section="utils" +pkgver=23.01-1 +timestamp=2023-06-20T00:00:00Z maintainer="Eeems " license=LGPL-2.1-or-later source=( - https://www.7-zip.org/a/7z2201-linux-arm.tar.xz + https://www.7-zip.org/a/7z2301-linux-arm.tar.xz ) sha256sums=( - 428c11efd91fe1809c4750e8cd5d6eddfbed2826d8a5399ffcacb849f0d21cf8 + 9d67650982f819d7557c27dea748fa66ca6c04a3a1148d66716c463580b0550c ) package() { From 6c1b28c2a14a442a77ccdbc2a3c08c9f1899da3c Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Wed, 27 Dec 2023 02:14:05 -0600 Subject: [PATCH 20/40] Update webinterface-upload-button to 1.1.1 (#790) * Update webinterface-upload-button to 1.1.1 --------- Co-authored-by: Nathaniel van Diepen --- package/webinterface-upload-button/package | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/webinterface-upload-button/package b/package/webinterface-upload-button/package index 8341150ca..201285a15 100644 --- a/package/webinterface-upload-button/package +++ b/package/webinterface-upload-button/package @@ -6,21 +6,22 @@ _pkgname='webinterface-upload-button' pkgnames=("$_pkgname") pkgdesc="A simple upload button for the web interface" url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.0.1-1 -timestamp=2023-12-06T11:43:00Z +pkgver=1.1.1-1 +timestamp=2023-12-16T15:35:49Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT source=( - "$url"/archive/1c69d4fcaa1cb8e2cf4b022a190429dc39946498.zip + "$url"/archive/1d28b2d91c0179059017696ae5a33aa49e1e7c7d.zip ) sha256sums=( - a388d1db49a3c35782600efbd94ee449c59f46c223f14c254cb74d9509255d96 + 99ac382e665b55c43876e8991c9dfa7f11a625d4f3ed4f35d3bc58762e04db39 ) package() { install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$_pkgname" + install -D -m 644 -t "$pkgdir"/usr/share/remarkable/webui/ "$srcdir/$_pkgname.js" touch "$srcdir"/emptyfile install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile From 69e33200e7baaefd0839f8d530d89feea258dd6c Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Sat, 30 Dec 2023 20:45:23 -0600 Subject: [PATCH 21/40] lf: fix missing dependency error (#811) Co-authored-by: gbyl --- package/lf/package | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lf/package b/package/lf/package index b21d67e66..eae20ad5e 100644 --- a/package/lf/package +++ b/package/lf/package @@ -5,11 +5,12 @@ pkgnames=(lf) pkgdesc="Terminal file manager" url=https://github.com/gokcehan/lf -pkgver=r31-1 +pkgver=r31-2 timestamp=2023-09-17T12:55Z section="utils" maintainer="gbyl " license=MIT +installdepends=(libncurses-dev) image=golang:v3.1 source=("https://github.com/gokcehan/lf/archive/refs/tags/${pkgver%-*}.zip") From 448c078d6f32d7244724fea5037b1ba555bc70bf Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Wed, 3 Jan 2024 01:50:20 -0600 Subject: [PATCH 22/40] package: webinterface-onboot depends on libbfd (#816) --- package/webinterface-onboot/package | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index ad34fff10..3e7552815 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -6,12 +6,13 @@ _pkgname='webinterface-onboot' pkgnames=("$_pkgname") pkgdesc="Start the web interface without the cable, on boot." url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.2.2-3 +pkgver=1.2.2-4 timestamp=2023-12-03T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT conflicts=(ddvk-hacks signature-rm) +installdepends=(libbfd) source=( "$url"/archive/cdfe457435974f7ca309b1ac50f1b2ef67000813.zip From 8ec6e80a534dabd0a057c0a8ce5d6a6f26102943 Mon Sep 17 00:00:00 2001 From: HookedBehemoth Date: Sat, 6 Jan 2024 00:18:07 +0100 Subject: [PATCH 23/40] add sudoku (#817) * add sudoku --------- Co-authored-by: Nathaniel van Diepen --- package/sudoku/package | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/sudoku/package diff --git a/package/sudoku/package b/package/sudoku/package new file mode 100644 index 000000000..1807fbda7 --- /dev/null +++ b/package/sudoku/package @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# Copyright (c) 2024 HookedBehemoth +# SPDX-License-Identifier: GPL-3.0-only + +pkgnames=(sudoku) +pkgdesc="Sudoku for Remarkable" +url="https://github.com/HookedBehemoth/remarkable-sudoku" +pkgver=0.1.1-1 +timestamp=2023-01-05T03:15Z +section="games" +maintainer="Luis S. " +license=GPL-3.0-only +installdepends=(display) +flags=(patch_rm2fb) + +image=rust:v3.1 +source=("https://github.com/HookedBehemoth/remarkable-sudoku/archive/refs/tags/v${pkgver%-*}.tar.gz") +sha256sums=(c3d9e941d0d837b90d376104eec7693f6b609010662d7e9b5ae57570648d8856) + +build() { + cargo build --release +} + +package() { + install -D -m 755 -t "$pkgdir"/opt/bin \ + "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/sudoku + install -D -m 644 -t "$pkgdir"/opt/etc/draft \ + "$srcdir"/sudoku.draft + install -D -m 644 -T "$srcdir"/res/702.png "$pkgdir"/opt/etc/draft/icons/sudoku.png + install -D -m 644 -t "$pkgdir"/opt/usr/share/applications \ + "$srcdir"/sudoku.oxide + install -D -m 644 -T "$srcdir"/res/702.png "$pkgdir"/opt/usr/share/icons/oxide/702x702/sudoku.png + install -D -m 644 -T "$srcdir"/res/48.png "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps/sudoku.png +} From 924c875933f95bec82c878d1fa03fcb44cec5f32 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:29:52 -0600 Subject: [PATCH 24/40] Update package: webinterface-onboot (#813) Co-authored-by: Nathaniel van Diepen --- package/webinterface-onboot/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index 3e7552815..fc12319fe 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -6,8 +6,8 @@ _pkgname='webinterface-onboot' pkgnames=("$_pkgname") pkgdesc="Start the web interface without the cable, on boot." url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.2.2-4 -timestamp=2023-12-03T11:43:00Z +pkgver=1.2.3-1 +timestamp=2023-12-31T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT @@ -15,11 +15,11 @@ conflicts=(ddvk-hacks signature-rm) installdepends=(libbfd) source=( - "$url"/archive/cdfe457435974f7ca309b1ac50f1b2ef67000813.zip + "$url"/archive/e184b6a37ccba0ebeacd34faf63c8f4cdfa5c448.zip "$_pkgname-toltec.service" ) sha256sums=( - bad965b923fa0979e7c8b97f6a90a400300ef8461292276e6fa2107a89624c8b + 2e3666b1875f874ef09da2bbd163295b89e9e241f1e59e77349b0e2db716b8ff SKIP ) From f653888511298f6043df36991bd3f5d4a8ed5deb Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Mon, 8 Jan 2024 00:49:59 +0100 Subject: [PATCH 25/40] Update linux-stracciatella to 5.4.70.4 (#808) * Update package and change numbering scheme * Update timestamp --------- Co-authored-by: Nathaniel van Diepen --- package/linux-stracciatella/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/linux-stracciatella/package b/package/linux-stracciatella/package index e0fe100eb..994842c50 100644 --- a/package/linux-stracciatella/package +++ b/package/linux-stracciatella/package @@ -6,8 +6,8 @@ archs=(rm1 rm2) pkgnames=(linux-stracciatella) pkgdesc="RemarkableAS's vanilla kernel with a few extra flakes" url=https://github.com/Etn40ff/linux-remarkable -pkgver=5.4.70-3 -timestamp=2023-09-23T00:12:00Z +pkgver=5.4.70.4-1 +timestamp=2023-12-28T22:42:42Z section="kernel" maintainer="Salvatore Stella " makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev build:kmod) @@ -17,11 +17,11 @@ installdepends=(kernelctl) image=base:v3.1 _wireguard_version=1.0.20220627 source=( - https://github.com/Etn40ff/linux-remarkable/archive/c908b16d6b848964ecc9b116a024f247c290a1bf.tar.gz + "https://github.com/Etn40ff/linux-remarkable/archive/refs/tags/${pkgver%-*}.tar.gz" "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-$_wireguard_version.tar.xz" ) sha256sums=( - 2075b9eb69172751b3e8e0d3a40d63c0c05982e79a2724ed7c3bdfc4f7988eea + 29fd9d7adcb243b841d3577088dd2aec6106eaaa3bc51440411f49ea50658c01 362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0 ) noextract=("wireguard-linux-compat-$_wireguard_version.tar.xz") From 4f06523385fd01f507ea6bb70c01e0438cff0dad Mon Sep 17 00:00:00 2001 From: Ben Kirwin Date: Wed, 10 Jan 2024 21:52:56 -0500 Subject: [PATCH 26/40] Pin specific versions of Folly's clang deps (#823) * Pin specific versions of folly's clang deps * Bump version --- package/folly/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/folly/package b/package/folly/package index 2682d2c7d..80a788d08 100644 --- a/package/folly/package +++ b/package/folly/package @@ -5,13 +5,13 @@ pkgnames=(folly) pkgdesc="Z-machine interpreter for interactive fiction" url="https://github.com/bkirwi/folly" -pkgver=0.0.1-3 +pkgver=0.0.1-4 timestamp=2022-04-18T17:50:16Z section=games maintainer="Ben Kirwin " license=MIT installdepends=(display) -makedepends=(build:librust-clang-sys-dev build:libclang-dev build:libc6 build:libc6-dev build:clang) +makedepends=(build:libclang-14-dev build:clang-14 build:llvm-14-dev) image=rust:v2.3 From 21f43f090448f617fd512342a53f47e549099b03 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:42:02 -0600 Subject: [PATCH 27/40] toltec-base: Disable busybox-ifplugd@usb1.service (#806) * toltec-base: disable busybox-ifplugd@usb1.service --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/toltec-base/package | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/package/toltec-base/package b/package/toltec-base/package index b333afb84..06d812667 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -1,13 +1,13 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT archs=(rm1 rm2) pkgnames=(toltec-base) pkgdesc="Metapackage defining the base set of packages in a Toltec install" url=https://toltec-dev.org/ -pkgver=1.2-3 -timestamp=2023-05-08T19:31Z +pkgver=1.3-1 +timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " license=MIT @@ -31,12 +31,22 @@ configure() { /opt/etc/profile echo "Disabling automatic update" disable-unit update-engine.service - if [[ "$arch" == "rm1" ]] && ! is-masked sys-subsystem-net-devices-usb1.device; then + if [[ "$arch" == "rm1" ]]; then echo "Disabling usb1 network device to avoid long boots" - systemctl mask sys-subsystem-net-devices-usb1.device - elif [[ "$arch" == "rm2" ]] && is-masked sys-subsystem-net-devices-usb1.device; then + if ! is-masked sys-subsystem-net-devices-usb1.device; then + systemctl mask sys-subsystem-net-devices-usb1.device + fi + if ! is-masked busybox-ifplugd@usb1.service; then + systemctl mask busybox-ifplugd@usb1.service + fi + elif [[ "$arch" == "rm2" ]]; then echo "Enabling usb1 network device to ensure usb SSH works" - systemctl unmask sys-subsystem-net-devices-usb1.device + if is-masked sys-subsystem-net-devices-usb1.device; then + systemctl unmask sys-subsystem-net-devices-usb1.device + fi + if is-masked busybox-ifplugd@usb1.service; then + systemctl unmask busybox-ifplugd@usb1.service + fi fi } @@ -44,7 +54,10 @@ postremove() { if is-masked sys-subsystem-net-devices-usb1.device; then systemctl unmask sys-subsystem-net-devices-usb1.device fi - if ! is-enabled "update-engine.service"; then + if is-masked busybox-ifplugd@usb1.service; then + systemctl unmask busybox-ifplugd@usb1.service + fi + if ! is-enabled update-engine.service; then systemctl enable update-engine fi } From edc7d02debc70aa2a2a9959c4638fb78097956f8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 Jan 2024 18:42:34 -0700 Subject: [PATCH 28/40] Update zoneinfo-utils to 2023c (#702) * Update zoneinfo-utils to 2023c --- .github/workflows/pr-labels.yml | 2 +- .github/workflows/pr.yml | 6 +++--- .github/workflows/stable.yml | 2 +- .github/workflows/testing.yml | 2 +- Makefile | 4 ++++ package/zoneinfo-utils/package | 24 ++++++++++++++---------- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 67daf3ba2..166d3e256 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -5,7 +5,7 @@ on: jobs: check-labels: name: Check that PRs against the stable branch are labelled correctly - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check labels run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 34bc2ca28..7968bff0e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,7 +4,7 @@ on: jobs: lint: name: Check that it conforms to the style guide - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository uses: actions/checkout@v3 @@ -16,7 +16,7 @@ jobs: run: make lint pr: name: Check that it builds without error - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: lint steps: - name: Checkout the Git repository @@ -24,7 +24,7 @@ jobs: - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages - run: make repo-new FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' + run: FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' make repo-new - name: Save the build output uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index 62a06e427..caa8c28c8 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -6,7 +6,7 @@ on: jobs: stable: name: Build and publish the stable channel - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository uses: actions/checkout@v3 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 883718745..ed52c0ecf 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -6,7 +6,7 @@ on: jobs: testing: name: Build and publish the testing channel - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 8a6fe60f1..a6bca5d92 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ RECIPES=$(shell ls package/) RECIPES_PUSH=$(foreach app, $(RECIPES), $(app)-push) RECIPES_CLEAN=$(foreach app, $(RECIPES), $(app)-clean) +ifeq ($(RUNNER_DEBUG), 1) +FLAGS+= --verbose +endif + define USAGE Building packages: diff --git a/package/zoneinfo-utils/package b/package/zoneinfo-utils/package index f31bd7eb8..8caab1ce8 100644 --- a/package/zoneinfo-utils/package +++ b/package/zoneinfo-utils/package @@ -7,23 +7,24 @@ pkgnames=(zoneinfo-utils) pkgdesc="Utilities for interacting with zoneinfo files" url=https://www.iana.org/time-zones -_tzver=2021a -pkgver="$_tzver"-2 -timestamp=2020-05-04T06:16Z +_tzver=2023c +pkgver="$_tzver"-1 +timestamp=2023-03-28T00:00Z section=utils maintainer="Eeems " license="custom: public domain" installdepends=(zoneinfo-core) makedepends=(build:gawk) +flags=(nostrip) -image=base:v2.1 +image=base:v3.0 source=( "https://www.iana.org/time-zones/repository/releases/tzcode${_tzver}.tar.gz" "https://www.iana.org/time-zones/repository/releases/tzdata${_tzver}.tar.gz" ) sha256sums=( - eb46bfa124b5b6bd13d61a609bfde8351bd192894708d33aa06e5c1e255802d0 - 39e7d2ba08c68cbaefc8de3227aab0dec2521be8042cf56855f7dc3a9fb14e08 + 46d17f2bb19ad73290f03a203006152e0fa0d7b11e5b71467c4a823811b214e7 + 3f510b5d1b4ae9bb38e485aa302a776b317fb3637bdb6404c4adf7b6cadd965c ) prepare() { @@ -35,17 +36,20 @@ build() { pushd .x86 > /dev/null shopt -s extglob - cp -r ../* . - make VERSION="$_tzver" + ln -s ../* . + make VERSION="$_tzver" zic + mv zic ../zic.x86 popd > /dev/null - + rm -r .x86 make VERSION="$_tzver" CC=arm-linux-gnueabihf-cc + "${CROSS_COMPILE}strip" --strip-all zic zdump } package() { pushd "${srcdir}" > /dev/null - local zic=.x86/zic + + local zic=./zic.x86 # install tzcode stuff make DESTDIR="${pkgdir}" zic="$zic" install # install license From 9a6fafdba3ec74324a77a331d94e9c25fa75e4e0 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 Jan 2024 18:46:10 -0700 Subject: [PATCH 29/40] Update yaft to v0.1.1 (#763) * Update yaft to v0.1.1 --- package/yaft/input.patch | 23 ----------------------- package/yaft/package | 35 +++++++++++++++++++---------------- 2 files changed, 19 insertions(+), 39 deletions(-) delete mode 100644 package/yaft/input.patch diff --git a/package/yaft/input.patch b/package/yaft/input.patch deleted file mode 100644 index 02d0acde7..000000000 --- a/package/yaft/input.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- Device.cpp 2022-08-03 20:07:16.705724406 0000 -+++ Device-rM1-inputfix.cpp 2022-08-03 20:07:36.455219878 0000 -@@ -22,17 +22,17 @@ - - const InputPaths rm1_paths = { - // touch -- "/dev/input/event1", -+ "/dev/input/event2", - Transform{ { { -float(screen_width) / rm1_touch_width, 0 }, - { 0, -float(screen_height) / rm1_touch_height } }, - { screen_width, screen_height } }, - - // pen -- "/dev/input/event0", -+ "/dev/input/event1", - wacom_transform, - - // keys -- "/dev/input/event2" -+ "/dev/input/event0" - }; - - const InputPaths rm2_paths = { diff --git a/package/yaft/package b/package/yaft/package index 8a94a0946..251dc0f77 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -5,37 +5,40 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft -_tag=0.0.10 -pkgver=${_tag}-2 -timestamp=2023-08-12T14:31Z +_tag=0.1.1 +pkgver=${_tag}-1 +timestamp=2023-11-25T20:49:48Z maintainer="Mattéo Delabre " license=GPL-3.0 section="admin" -image=base:v2.3 +image=base:v3.1 installdepends=(display terminfo) -source=( - "https://github.com/timower/rM2-stuff/archive/refs/tags/v${_tag}.zip" - input.patch -) +source=() +sha256sums=() -sha256sums=( - 1cd4741a93cde6bd545215eb303e51219fc9901cba1c28b6206b1b5e0871a7b5 - SKIP -) +prepare() { + cd "$srcdir" + mkdir -p yaft + cd yaft + git init + git lfs install + git remote add origin https://github.com/timower/rM2-stuff.git + git fetch --depth 1 origin tag v${_tag} --no-tags + git checkout v${_tag} + git lfs fetch + git lfs checkout +} build() { - patch -u libs/rMlib/Device.cpp -i input.patch mkdir build mkdir install cd build cmake -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ - -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release .. + -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release ../yaft cd apps/yaft make make install - cd ../../libs/libYaft - make install } package() { From d026a7a1bb10ae735b8dbe2bb38984e295e8a27d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 Jan 2024 18:58:05 -0700 Subject: [PATCH 30/40] Update oxide to v2.7 (#760) * Update oxide to v2.7 * Fix #750 * Update to use new disable-unit method * Add new liboxide-dev package --- package/oxide/package | 134 ++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 82 deletions(-) diff --git a/package/oxide/package b/package/oxide/package index 8c2c32049..66a6575e4 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -2,22 +2,22 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety oxide-utils inject_evdev liboxide libsentry) -_oxidever=2.6 +pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) +_oxidever=2.7 pkgver=$_oxidever-3 _sentryver=0.5.0 -timestamp=2023-06-05T23:27:53Z +timestamp=2023-12-05T04:43:04Z maintainer="Eeems " url=https://oxide.eeems.codes license=MIT flags=(patch_rm2fb) -image=qt:v2.3 +image=qt:v3.1 source=( "https://github.com/Eeems-Org/oxide/archive/refs/tags/v$_oxidever.zip" toltec-rm2-override.conf ) sha256sums=( - bbcf83302f530afe069974121496be6f8118eadba3c00633f834db026e41ae95 + e1f20fc60ae8edccb941e09c0e61cbfb58f1f8a5f64be98870eb2d079f83316f SKIP ) @@ -27,67 +27,36 @@ build() { CMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" make FEATURES=sentry release } -erode() { - pkgdesc="Task manager" - section="admin" - installdepends=(display "tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") +oxide() { + pkgdesc="Launcher application" + section="launchers" + installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" "reboot-guard") + replaces=(erode tarnish decay corrupt) + conflicts=(erode tarnish decay corrupt) package() { + # System service + install -D -m 644 -t "$pkgdir"/etc/dbus-1/system.d "$srcdir"/release/etc/dbus-1/system.d/codes.eeems.oxide.conf + install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/release/etc/systemd/system/tarnish.service + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/tarnish + # Task manager install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/erode install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/erode.png install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/erode.png install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.erode.oxide - } -} - -fret() { - pkgdesc="Take screenshots" - section="utils" - installdepends=("tarnish=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/fret - install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.fret.oxide - } -} - -oxide() { - pkgdesc="Launcher application" - section="launchers" - installdepends=("erode=$pkgver" "fret=$pkgver" "tarnish=$pkgver" "rot=$pkgver" "decay=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { + # Launcher install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/oxide install -D -m 644 -t "$pkgdir"/opt/etc "$srcdir"/release/opt/etc/oxide.conf install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.oxide.oxide install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/oxide.png + # Lockscreen + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/decay + install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.decay.oxide + # Task switcher + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/corrupt + install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide } -} - -rot() { - pkgdesc="Manage Oxide settings through the command line" - section="admin" - installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/rot - } -} -tarnish() { - pkgdesc="Service managing power states, connectivity and buttons" - section="devel" - installdepends=(display xochitl "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 644 -t "$pkgdir"/etc/dbus-1/system.d "$srcdir"/release/etc/dbus-1/system.d/codes.eeems.oxide.conf - install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/release/etc/systemd/system/tarnish.service - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/tarnish - if [[ $arch = rm2 ]]; then - install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d \ - "$srcdir"/toltec-rm2-override.conf - fi - } configure() { systemctl daemon-reload if ! is-enabled "tarnish.service"; then @@ -97,41 +66,28 @@ tarnish() { echo "" fi } + preremove() { disable-unit tarnish.service } + postremove() { systemctl daemon-reload } } -decay() { - pkgdesc="Lockscreen application" +oxide-extra() { + pkgdesc="Extra applications for oxide" section="utils" - installdepends=(display "tarnish=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/decay - install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.decay.oxide - } -} -corrupt() { - pkgdesc="Task Switcher for Oxide" - section="utils" - installdepends=(display "tarnish=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/corrupt - install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide - } -} - -anxiety() { - pkgdesc="Screenshot viewer for Oxide" - section="utils" - installdepends=(display "tarnish=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + installdepends=("oxide=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + replaces=(fret anxiety) + conflicts=(fret anxiety) package() { + # Screenshot daemon + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/fret + install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.fret.oxide + # Screenshot viewer install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/anxiety install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.anxiety.oxide install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/image.png @@ -142,11 +98,12 @@ anxiety() { oxide-utils() { pkgdesc="Command line tools for Oxide" section="admin" - installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - replaces=(notify-send) - conflicts=(notify-send) + installdepends=("oxide=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + replaces=(rot notify-send update-desktop-database desktop-file-validate) + conflicts=(rot notify-send update-desktop-database desktop-file-validate) package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/rot install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/notify-send install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/update-desktop-database install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/desktop-file-validate @@ -177,12 +134,25 @@ liboxide() { } } +liboxide-dev() { + pkgdesc="Shared library for oxide applications" + section="devel" + installdepends=("liboxide=$pkgver") + + package() { + install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/liboxide.pc + install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/epframebuffer.h + install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/liboxide.h + cp -ar "$srcdir"/release/opt/include/liboxide/ "$pkgdir"/opt/include/ + } +} + libsentry() { pkgdesc="Sentry SDK for C, C++ and native applications." section="devel" url=https://github.com/getsentry/sentry-native pkgver="$_sentryver" - timestamp="2022-08-02T14:40:22Z" + timestamp="2021-12-20T14:25:11Z" package() { install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libsentry.so From 7cf8f4c835925416ceeaffeed0234e72162bc8cb Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 Jan 2024 19:42:33 -0700 Subject: [PATCH 31/40] Update puzzles to 0.2.4 (#785) * Update puzzles to 0.2.4 --- package/puzzles/package | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/puzzles/package b/package/puzzles/package index 3af1b64d3..8ac7d3e84 100644 --- a/package/puzzles/package +++ b/package/puzzles/package @@ -5,7 +5,8 @@ pkgnames=(puzzles) timestamp=2021-03-04T14:03-08:00 maintainer="Mattéo Delabre " -pkgver=0.2.2-4 +_ver=0.2.4 +pkgver=${_ver}-4 license=MIT pkgdesc="Simon Tatham's Puzzle Package" url="https://github.com/mrichards42/remarkable_puzzles" @@ -13,13 +14,13 @@ section="games" makedepends=(build:git) flags=(patch_rm2fb) -image=python:v2.1 +image=python:v2.3.2 source=( "https://github.com/mrichards42/remarkable_puzzles/releases/download/v${pkgver%-*}/puzzles-source.tar.gz" puzzles.draft ) sha256sums=( - 3fe3686757e69d1267e830ba527d15ff6d1a68e34f830842dcaf35f58b43d501 + ae00474f6b1f7ced13bd6b1f18ff57b583fcd66c587a5180e87af997768345ff SKIP ) @@ -27,7 +28,7 @@ build() { pip3 install okp # do the build - ARCH=arm BUILD=release make puzzles -r + make puzzles ARCH=rm BUILD=release RMP_VERSION="${_ver}" } package() { From 30e16da71ab7189211023b59f6b9d57fbc839075 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 14 Jan 2024 16:08:00 -0700 Subject: [PATCH 32/40] Update KOReader to v2024.01 (#826) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 3568eb43a..9f91852d2 100644 --- a/package/koreader/package +++ b/package/koreader/package @@ -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=2023.10-2 -timestamp=2023-10-30T17:19:28Z +pkgver=2024.01-1 +timestamp=2024-01-11T17:16:35Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - fdb72bdb80c74b6c955ffde8852ce67b77ebc7d88ceb4a439b622aff74ad858e + 2616c7f0c63d54810f4ec78477ecb5dac2443990c7d2c8188c577ad5d925cca1 SKIP SKIP SKIP From 9e0ab06e98808848411bf3ce09a304db42adad6a Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 14 Jan 2024 17:33:08 -0700 Subject: [PATCH 33/40] Add move-logs-to-opt (#821) * Add move-logs-to-opt --- package/move-logs-to-opt/package | 56 ++++++++++++++++++++++++++ package/move-logs-to-opt/var-log.mount | 15 +++++++ package/rm2-suspend-fix/package | 4 +- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 package/move-logs-to-opt/package create mode 100644 package/move-logs-to-opt/var-log.mount diff --git a/package/move-logs-to-opt/package b/package/move-logs-to-opt/package new file mode 100644 index 000000000..99e131bb6 --- /dev/null +++ b/package/move-logs-to-opt/package @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(move-logs-to-opt) +pkgdesc="Move log files to /opt to save space on the root partition" +url=https://github.com/toltec-dev/toltec +pkgver=0.0.1-1 +timestamp=2024-01-07T23:55Z +section="utils" +maintainer="Eeems " +license=MIT + +source=(var-log.mount) +sha256sums=(SKIP) + +package() { + mkdir -p "$pkgdir"/opt/var/log + install -D -m 644 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/var-log.mount +} + +configure() { + systemctl daemon-reload + if is-active systemd-journald.service; then + journalctl --sync --flush + systemctl stop systemd-journald.service + fi + if ! mountpoint -q /var/log; then + echo "Moving log files to new location" + local target_path=/home/root/.entware/var/log + mkdir -p "$target_path" + cp -af "/var/log/." "$target_path" + rm -rf "/var/log/"* + fi + if ! is-enabled "var-log.mount"; then + systemctl enable "var-log.mount" + fi + systemctl restart "var-log.mount" + systemctl start systemd-journald.service +} + +preremove() { + if is-active systemd-journald.service; then + journalctl --sync --flush + systemctl stop systemd-journald.service + fi + disable-unit "var-log.mount" +} + +postremove() { + systemctl daemon-reload + systemctl start systemd-journald.service + if mountpoint -q /var/log; then + umount -l /var/log + fi +} diff --git a/package/move-logs-to-opt/var-log.mount b/package/move-logs-to-opt/var-log.mount new file mode 100644 index 000000000..a1fd0d3d3 --- /dev/null +++ b/package/move-logs-to-opt/var-log.mount @@ -0,0 +1,15 @@ +[Unit] +Description=Bind mount '/home/root/.entware/var/log' over '/var/log' +DefaultDependencies=no +Conflicts=umount.target +Before=local-fs.target umount.target systemd-journald.service +After=home.mount + +[Mount] +What=/home/root/.entware/var/log +Where=/var/log +Type=none +Options=bind + +[Install] +WantedBy=local-fs.target diff --git a/package/rm2-suspend-fix/package b/package/rm2-suspend-fix/package index dc4a1d0cb..4a6eb0151 100644 --- a/package/rm2-suspend-fix/package +++ b/package/rm2-suspend-fix/package @@ -6,9 +6,9 @@ archs=(rm2) pkgnames=(rm2-suspend-fix) pkgdesc="Fix issue where suspend breaks networking on the reMarkable 2" url=https://toltec-dev.org/ -pkgver=0.0.0-2 +pkgver=0.0.0-3 timestamp=2021-01-04T22:40Z -section="devel" +section="utils" maintainer="Eeems " license=MIT From 7a7881c98419ebc1ec989b840cb5c256c097c7db Mon Sep 17 00:00:00 2001 From: raisjn <70462544+raisjn@users.noreply.github.com> Date: Sat, 20 Jan 2024 12:01:30 -0800 Subject: [PATCH 34/40] [rmkit] update rmkit to latest (2024-01-11) (#825) * simple: fix diacritic issues in font rendering * genie: add config dir * harmony: fix crash due to bad buffer * remux: add APIs for launcher-ctrl Co-authored-by: okay Co-authored-by: Nathaniel van Diepen --- package/rmkit/changelog | 23 +++++++++++++++++++++++ package/rmkit/package | 16 ++++++++-------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/package/rmkit/changelog b/package/rmkit/changelog index a08e54c9c..09d14f032 100644 --- a/package/rmkit/changelog +++ b/package/rmkit/changelog @@ -1,3 +1,26 @@ +2024-01-11 raisjn + + harmony + + * fix for buffer crash / weird buffers when saved buffer is wrong dims + + remux + + * add launcher-ctrl APIs + + iago + + * add table shape (yogatbear) + + rmkit + + * refactor how scene stack works + * fixes for image code + + genie + + * add support for conf directory + 2023-03-12 raisjn harmony diff --git a/package/rmkit/package b/package/rmkit/package index f8930555b..2b3da328a 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT pkgnames=(bufshot dumbskull genie harmony iago lamp mines nao remux rpncalc simple wordlet) -timestamp=2023-03-12T20:03:10Z +timestamp=2024-01-11T20:03:10Z maintainer="raisjn " license=MIT installdepends=(display) @@ -11,12 +11,12 @@ flags=(patch_rm2fb) image=python:v2.1 source=( - https://github.com/rmkit-dev/rmkit/archive/2bf3488010eccf0d9e7f6c64e681517739420c58.zip + https://github.com/rmkit-dev/rmkit/archive/7edc291646c4a72b7b8a512205646a9ad6586fd6.zip remux.service genie.service ) sha256sums=( - a0d1a8b16adeca688d7df6a18e4c7404d9d4a405b33615dfb4e374f24ff3dded + 2861ea61ef272acd0d1d9ec4c80f44ef620be3f8ce58a356fbcbdb27e01dc9e8 SKIP SKIP ) @@ -52,7 +52,7 @@ dumbskull() { genie() { pkgdesc="Gesture engine that connects commands to gestures" url="https://rmkit.dev/apps/genie" - pkgver=0.1.6-3 + pkgver=0.1.7-1 section="utils" package() { @@ -78,7 +78,7 @@ genie() { harmony() { pkgdesc="Procedural sketching app" url="https://rmkit.dev/apps/harmony" - pkgver=0.2.2-2 + pkgver=0.2.3-1 section="drawing" package() { @@ -95,7 +95,7 @@ harmony() { iago() { pkgdesc="overlay for drawing shapes via stroke injection" url="https://rmkit.dev/apps/iago" - pkgver=0.1.1-2 + pkgver=0.1.2-1 section="utils" installdepends+=("lamp") @@ -145,7 +145,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.2.4-2 + pkgver=0.3.0-1 section="launchers" package() { @@ -189,7 +189,7 @@ rpncalc() { simple() { pkgdesc="Simple app script for writing scripted applications" url="https://rmkit.dev/apps/sas" - pkgver=0.2.0-2 + pkgver=0.2.1-1 section="devel" package() { From 6ca072068270773f06654664b22b0303385326ea Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 20 Jan 2024 13:15:51 -0700 Subject: [PATCH 35/40] Update tilem to v0.1.1 (#764) * Update tilem to v0.1.1 * Use latest build image * Switch to git lfs * Fix install path --- package/tilem/package | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/package/tilem/package b/package/tilem/package index 0c5b954f3..17be922d7 100644 --- a/package/tilem/package +++ b/package/tilem/package @@ -5,23 +5,37 @@ pkgnames=(tilem) pkgdesc="TI-84+ calculator emulator" url=https://github.com/timower/rM2-stuff/tree/master/apps/tilem -pkgver=0.0.7-3 -timestamp=2021-04-30T10:42Z +_tag=0.1.1 +pkgver=${_tag}-1 +timestamp=2023-11-25T20:49:48Z maintainer="Mattéo Delabre " license=GPL-3.0 section="utils" -image=base:v2.1 +image=base:v3.1 installdepends=(display) -source=(https://github.com/timower/rM2-stuff/archive/refs/tags/v0.0.7.tar.gz) -sha256sums=(ed2db5f1aa7c9e8b0bead53bd60cb8fd9eec24c028d789fdbdc4b1655d6c78ce) +source=() +sha256sums=() + +prepare() { + cd "$srcdir" + mkdir -p tilem + cd tilem + git init + git lfs install + git remote add origin https://github.com/timower/rM2-stuff.git + git fetch --depth 1 origin tag v${_tag} --no-tags + git checkout v${_tag} + git lfs fetch + git lfs checkout +} build() { mkdir build mkdir install cd build cmake -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ - -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release .. + -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release ../tilem cd apps/tilem make make install From 9d95bebefca520c3f8397862baea405ca845cc91 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 20 Jan 2024 13:19:16 -0700 Subject: [PATCH 36/40] rmfakecloudctl: Don't error if there are no metadata files (#757) * Don't error if there are no metadata files * Update version number --- package/rmfakecloud-proxy/rmfakecloudctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/rmfakecloud-proxy/rmfakecloudctl b/package/rmfakecloud-proxy/rmfakecloudctl index deff1f18d..c530f3589 100644 --- a/package/rmfakecloud-proxy/rmfakecloudctl +++ b/package/rmfakecloud-proxy/rmfakecloudctl @@ -75,7 +75,7 @@ disconnect-cloud() { # Mark all files as not synced grep sync "$xochitl_data_dir"/*.metadata -l \ - | xargs sed -i 's/synced\": true/synced\": false/' + | xargs -r sed -i 's/synced\": true/synced\": false/' # Disconnect from cloud sed -i '/^devicetoken=/d' "$xochitl_conf_path" From d67aebd15f938a75e9c45539c6e0b6f6d8ee364a Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 28 Jan 2024 21:38:47 -0700 Subject: [PATCH 37/40] Update rmfakecloud-proxy version number (#831) This was lost in #757 after a merge --- package/rmfakecloud-proxy/package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/rmfakecloud-proxy/package b/package/rmfakecloud-proxy/package index b9f247d55..6c497fb60 100644 --- a/package/rmfakecloud-proxy/package +++ b/package/rmfakecloud-proxy/package @@ -7,7 +7,7 @@ pkgdesc="Connect Xochitl to a rmfakecloud server" _url=https://github.com/ddvk/rmfakecloud-proxy url="$_url" _upver=0.0.3 -pkgver="$_upver-4" +pkgver="$_upver-5" timestamp=2022-02-26T22:59Z section="utils" maintainer="Mattéo Delabre " From e89615add186a7309364bdaede2807f5a0d62eac Mon Sep 17 00:00:00 2001 From: HookedBehemoth Date: Sun, 4 Feb 2024 22:59:52 +0100 Subject: [PATCH 38/40] sudoku - 0.1.2-1 (#832) --- package/sudoku/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/sudoku/package b/package/sudoku/package index 1807fbda7..24e7c8957 100644 --- a/package/sudoku/package +++ b/package/sudoku/package @@ -5,8 +5,8 @@ pkgnames=(sudoku) pkgdesc="Sudoku for Remarkable" url="https://github.com/HookedBehemoth/remarkable-sudoku" -pkgver=0.1.1-1 -timestamp=2023-01-05T03:15Z +pkgver=0.1.2-1 +timestamp=2023-02-04T22:49Z section="games" maintainer="Luis S. " license=GPL-3.0-only @@ -15,7 +15,7 @@ flags=(patch_rm2fb) image=rust:v3.1 source=("https://github.com/HookedBehemoth/remarkable-sudoku/archive/refs/tags/v${pkgver%-*}.tar.gz") -sha256sums=(c3d9e941d0d837b90d376104eec7693f6b609010662d7e9b5ae57570648d8856) +sha256sums=(08a801a6ffc3f328fc92c8aebadbcc7a123b1abebf5cbe276d5f9f52058ee864) build() { cargo build --release From 2cad2a2a5443c9d3bf9593d36320d214eadf8c61 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 27 Feb 2024 20:10:26 -0700 Subject: [PATCH 39/40] Use tar to extract toltec-bootstrap instead of opkg (#836) --- scripts/bootstrap/bootstrap | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/bootstrap/bootstrap b/scripts/bootstrap/bootstrap index 6a278c10d..f72fff16d 100755 --- a/scripts/bootstrap/bootstrap +++ b/scripts/bootstrap/bootstrap @@ -165,8 +165,7 @@ main() { local pkg_filename="/tmp/$pkg_basename" wget --no-verbose "$toltec_remote/$pkg_basename" -O "$pkg_filename" - opkg install --add-arch rmall:200 --offline-root / --force-depends \ - "$pkg_filename" > /dev/null 2>&1 + tar -zxvOf "$pkg_filename" ./data.tar.gz | tar -zxf - -C / rm "$pkg_filename" # shellcheck source=../../package/toltec-bootstrap/toltecctl From d3df6cb7124fb3f6786b0672e4ff3ea123e4491b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 8 May 2024 13:30:15 -0600 Subject: [PATCH 40/40] Add support for limiting packages to OS versions (#759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Port 3.11 and c-string fixes from toltecmk - Add rmallos2, rmallos3, rm1os2, rm1os3, rm2os2, and rm2os3 archs for limiting packages to only supporting those versions - Update documentation - Update known issues packages to only be for 2.x - Make toltec-base generate a package for each arch to make sure that the folders always get created - Added experimental toltec branch for testing purposes. You need to add the experimental tag to a PR, and it will start applying changes to the experimental branch. - Fix various issues with the install and reenable process - Update toltecctl output to use the same logging as bootstrap --------- Co-authored-by: Mattéo Delabre <1370040+matteodelabre@users.noreply.github.com> Co-authored-by: Mattéo Delabre --- .github/actions/setup/action.yml | 2 +- .github/actions/sync-repository/action.yml | 2 +- .github/workflows/pr.yml | 12 + docs/package.md | 16 +- package/Compatibility | 70 +++ package/ddvk-hacks/package | 112 ++-- package/fuse/package | 12 +- package/kernelctl/package | 6 +- package/signature-rm/package | 15 +- package/templatectl/package | 4 +- package/toltec-base/package | 54 +- package/toltec-bootstrap/package | 20 +- package/toltec-bootstrap/toltecctl | 581 ++++++++++++++++++++- package/toltec-completion/_toltecctl | 2 +- package/toltec-completion/package | 2 +- package/toltec-deletions/package | 28 + package/webinterface-onboot/package | 23 +- package/webinterface-upload-button/package | 15 +- package/wireguard/package | 4 +- requirements.txt | 38 +- scripts/bootstrap/bootstrap | 25 +- scripts/install-lib | 2 +- scripts/repo_build.py | 1 + scripts/toltec/bash.py | 43 +- scripts/toltec/builder.py | 7 +- scripts/toltec/repo.py | 16 +- 26 files changed, 896 insertions(+), 216 deletions(-) create mode 100644 package/Compatibility create mode 100644 package/toltec-deletions/package diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index f10600cf6..d139dbd2f 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -70,7 +70,7 @@ runs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Cache Python environment uses: actions/cache@v3 id: cache-python diff --git a/.github/actions/sync-repository/action.yml b/.github/actions/sync-repository/action.yml index 7a213bfe0..01b7aa50a 100644 --- a/.github/actions/sync-repository/action.yml +++ b/.github/actions/sync-repository/action.yml @@ -28,7 +28,7 @@ runs: echo '${{ inputs.ssh-key }}' > private/id_rsa echo '${{ inputs.ssh-known-hosts }}' > private/known_hosts chmod 600 private/* - rsync --archive --verbose --compress --delete \ + rsync --archive --verbose --compress --delete --hard-links \ -e "ssh -p ${{ inputs.ssh-port }} -i private/id_rsa -o UserKnownHostsFile=private/known_hosts" \ '${{ inputs.local-path }}' \ '${{ inputs.remote-path }}' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 7968bff0e..a0dbca99c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -30,3 +30,15 @@ jobs: with: name: repo path: build/repo + - name: Build packages for experimental + if: ${{ contains(github.event.pull_request.labels.*.name, 'experimental') }} + run: make repo FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' + - name: Sync packages with the remote repository + if: ${{ contains(github.event.pull_request.labels.*.name, 'experimental') }} + uses: ./.github/actions/sync-repository + with: + local-path: build/repo/ + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }} + ssh-port: ${{ secrets.SSH_PORT }} + remote-path: ${{ secrets.REMOTE_SSH }}:/srv/toltec/experimental diff --git a/docs/package.md b/docs/package.md index 72a9bdca8..bdaf7807a 100644 --- a/docs/package.md +++ b/docs/package.md @@ -38,11 +38,17 @@ You can also declare custom variables to reduce repetition but make sure to pref The list of devices that are compatible with this package. The following values are accepted: -Name | Meaning ---------|------------------------------------------------------------------------- -`rmall` | Packages which work on all reMarkable devices without modification. -`rm1` | Packages requiring reMarkable 1-specific resources or compilation flags. -`rm2` | Packages requiring reMarkable 2-specific resources or compilation flags. +Name | Meaning +------------|------------------------------------------------------------------------- +`rmall` | Packages which work on all reMarkable devices without modification. +`rm1` | Packages requiring reMarkable 1-specific resources or compilation flags. +`rm2` | Packages requiring reMarkable 2-specific resources or compilation flags. +`rmallos2` | Packages which work on all reMarkable devices without modification, but only on the 2.x series of operating system. +`rm1os2` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on the 2.x series of operating system. +`rm2os2` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on the 2.x series of operating system. +`rmallos3` | Packages which work on all reMarkable devices without modification, but only on the 3.x series of operating system. +`rm1os3` | Packages requiring reMarkable 1-specific resources or compilation flags, but only on the 3.x series of operating system. +`rm2os3` | Packages requiring reMarkable 2-specific resources or compilation flags, but only on the 3.x series of operating system. For example, use `archs=(rm1)` for a package that only works on reMarkable 1, or `archs=(rm1 rm2)` for a package that works both on reMarkable 1 and reMarkable 2 but needs different dependencies or compilation flags for each of those. diff --git a/package/Compatibility b/package/Compatibility new file mode 100644 index 000000000..cf3ac4c40 --- /dev/null +++ b/package/Compatibility @@ -0,0 +1,70 @@ +rm1=2.6.1.71 +rm1=2.6.2.75 +rm1=2.7.0.9 +rm1=2.7.0.30 +rm1=2.7.0.36 +rm1=2.7.0.44 +rm1=2.7.0.51 +rm1=2.8.0.81 +rm1=2.8.0.86 +rm1=2.8.0.98 +rm1=2.9.0.153 +rm1=2.9.0.204 +rm1=2.9.0.210 +rm1=2.9.1.217 +rm1=2.9.1.236 +rm1=2.10.2.356 +rm1=2.10.3.379 +rm1=2.11.0.442 +rm1=2.12.1.527 +rm1=2.12.2.573 +rm1=2.12.3.606 +rm1=2.13.0.758 +rm1=2.14.0.861 +rm1=2.14.1.866 +rm1=2.14.3.958 +rm1=2.14.3.977 +rm1=2.14.3.1005 +rm1=2.14.3.1047 +rm1=2.15.0.1067 +rm1=2.15.1.1189 +rm1=3.0.4.1305 +rm1=3.2.2.1581 +rm1=3.2.3.1595 +rm1=3.3.2.1666 + +rm2=2.6.1.71 +rm2=2.6.2.75 +rm2=2.7.0.9 +rm2=2.7.0.30 +rm2=2.7.0.36 +rm2=2.7.0.44 +rm2=2.7.0.51 +rm2=2.7.1.53 +rm2=2.8.0.81 +rm2=2.8.0.86 +rm2=2.8.0.98 +rm2=2.9.0.153 +rm2=2.9.0.204 +rm2=2.9.0.210 +rm2=2.9.1.217 +rm2=2.9.1.236 +rm2=2.10.2.356 +rm2=2.10.3.379 +rm2=2.11.0.442 +rm2=2.12.1.527 +rm2=2.12.2.573 +rm2=2.12.3.606 +rm2=2.13.0.758 +rm2=2.14.0.861 +rm2=2.14.1.866 +rm2=2.14.3.958 +rm2=2.14.3.977 +rm2=2.14.3.1005 +rm2=2.14.3.1047 +rm2=2.15.0.1067 +rm2=2.15.1.1189 +rm2=3.0.4.1305 +rm2=3.2.2.1581 +rm2=3.2.3.1595 +rm2=3.3.2.1666 diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index 70423edd9..edf8b1f12 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -2,11 +2,11 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rm1 rm2) +archs=(rm1os2 rm2os2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=39.01-2 +pkgver=39.01-4 timestamp=2022-11-09T18:31:51Z section="readers" maintainer="Mattéo Delabre " @@ -20,55 +20,58 @@ sha256sums=(d3b1413bb9219804581afab598e7f5308233e7467d64e8084e67aae7346beaba) _patches_dir="/opt/share/ddvk-hacks" _xochitl_path="/usr/bin/xochitl" _work_dir="/home/root/.local/share/ddvk-hacks" +_info_path="$_work_dir/xochitl.info" _backup_path="$_work_dir/xochitl.backup" _old_backup_path="$_backup_path.old" _patched_path="$_work_dir/xochitl.patched" package() { - if [[ $arch = rm1 ]]; then - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/26171_rm1/patch_19.1.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/26275_rm1/patch_20.1.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/27051_rm1/patch_21.1.04 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/28098_rm1/patch_23.1.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/291236_rm1/patch_24.1.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2100324_rm1/patch_25.1.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2102356_rm1/patch_27.1.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2103379_rm1/patch_28.1.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2110442_rm1/patch_29.1.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2121527_rm1/patch_30.1.08 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2122573_rm1/patch_31.1.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2123606_rm1/patch_32.1.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2140861_rm1/patch_34.1.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2141866_rm1/patch_35.1.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2143977_rm1/patch_36.1.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21431047_rm1/patch_37.1.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21501067_rm1/patch_38.1.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21511189_rm1/patch_39.1.01 - elif [[ $arch = rm2 ]]; then - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/26171_rm2/patch_19.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/26275_rm2/patch_20.2.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/27051_rm2/patch_21.2.05 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/27153_rm2/patch_22.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/28098_rm2/patch_23.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/291217_rm2/patch_24.2.04 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2100324_rm2/patch_25.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2101332_rm2/patch_26.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2102356_rm2/patch_27.2.05 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2103379_rm2/patch_28.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2110442_rm2/patch_29.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2121527_rm2/patch_30.2.07 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2122573_rm2/patch_31.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2123606_rm2/patch_32.2.02 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2130758_rm2/patch_33.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2140861_rm2/patch_34.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2141866_rm2/patch_35.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/2143977_rm2/patch_36.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21431047_rm2/patch_37.2.01 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21501067_rm2/patch_38.2.03 - install -D -m 644 -t "$pkgdir$_patches_dir" "$srcdir"/patches/21511189_rm2/patch_39.2.01 + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" + if [[ $arch = rm1os2 ]]; then + patches_dir="${pkgdir}${_patches_dir}" + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/26171_rm1/patch_19.1.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/26275_rm1/patch_20.1.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/27051_rm1/patch_21.1.04 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/28098_rm1/patch_23.1.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/291236_rm1/patch_24.1.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2100324_rm1/patch_25.1.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2102356_rm1/patch_27.1.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2103379_rm1/patch_28.1.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2110442_rm1/patch_29.1.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2121527_rm1/patch_30.1.08 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2122573_rm1/patch_31.1.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2123606_rm1/patch_32.1.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2140861_rm1/patch_34.1.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2141866_rm1/patch_35.1.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2143977_rm1/patch_36.1.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21431047_rm1/patch_37.1.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21501067_rm1/patch_38.1.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21511189_rm1/patch_39.1.01 + elif [[ $arch = rm2os2 ]]; then + patches_dir="${pkgdir}${_patches_dir}" + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/26171_rm2/patch_19.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/26275_rm2/patch_20.2.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/27051_rm2/patch_21.2.05 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/27153_rm2/patch_22.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/28098_rm2/patch_23.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/291217_rm2/patch_24.2.04 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2100324_rm2/patch_25.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2101332_rm2/patch_26.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2102356_rm2/patch_27.2.05 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2103379_rm2/patch_28.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2110442_rm2/patch_29.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2121527_rm2/patch_30.2.07 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2122573_rm2/patch_31.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2123606_rm2/patch_32.2.02 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2130758_rm2/patch_33.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2140861_rm2/patch_34.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2141866_rm2/patch_35.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/2143977_rm2/patch_36.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21431047_rm2/patch_37.2.01 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21501067_rm2/patch_38.2.03 + install -D -m 644 -t "$patches_dir" "$srcdir"/patches/21511189_rm2/patch_39.2.01 fi - touch "$srcdir"/emptyfile - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/ddvk-hacks "$srcdir"/emptyfile } configure() { @@ -78,7 +81,7 @@ configure() { local device local original_hash local xochitl_version - if [[ $arch = rm1 ]]; then + if [[ $arch = rm1os2 ]]; then device="reMarkable 1" case "$build_date" in "20221026103859") @@ -179,7 +182,7 @@ configure() { exit 1 ;; esac - elif [[ $arch = rm2 ]]; then + elif [[ $arch = rm2os2 ]]; then device="reMarkable 2" case "$build_date" in "20221026104022") @@ -328,11 +331,25 @@ configure() { cp "$_patched_path" "$_xochitl_path" rm -rf /home/root/.cache/remarkable/xochitl/qmlcache/* + # shellcheck source=../toltec-bootstrap/toltecctl + source /home/root/.local/bin/toltecctl + get-release-version > "$_info_path" + echo "Please restart Xochitl to use the patches" echo } _restore() { + # shellcheck source=../toltec-bootstrap/toltecctl + source /home/root/.local/bin/toltecctl + + if ! [ -f "$_info_path" ] \ + || [[ "$(get-release-version)" != "$(cat "$_info_path")" ]] \ + || compare-versions "$(get-release-version)" "3.0"; then + echo "Skipping restore, as you are on a newer OS version" + return + fi + echo echo "Restoring the original Xochitl binary" @@ -342,6 +359,7 @@ _restore() { else cp "$_backup_path" "$_xochitl_path" rm -rf /home/root/.cache/remarkable/xochitl/qmlcache/* + rm "$_info_path" fi echo diff --git a/package/fuse/package b/package/fuse/package index 4c80b0bce..bb3c88a41 100755 --- a/package/fuse/package +++ b/package/fuse/package @@ -2,11 +2,11 @@ # Copyright (c) 2020 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rm1 rm2) +archs=(rm1os2 rm2os2) pkgnames=(fuse) pkgdesc="FUSE (Filesystem in Userspace) Kernel Module" url=https://github.com/libfuse/libfuse -pkgver=1.0.0-4 +pkgver=1.0.0-5 timestamp=2021-04-06T22:16Z section=kernel maintainer="plan5 <30434574+plan5@users.noreply.github.com>" @@ -51,14 +51,14 @@ build() { } package() { - if [[ $arch = rm1 ]]; then + if [[ $arch = rm1os2 ]]; then mkdir -p "$pkgdir/lib/modules" cp -r "$srcdir/pkg"/* "$pkgdir/lib/modules" fi } configure() { - if [[ $arch = rm1 ]]; then + if [[ $arch = rm1os2 ]]; then # Regenerate /lib/modules/[ver]/modules.devname to request the # creation of /dev/fuse used for on-demand loading of fuse depmod -a @@ -72,7 +72,7 @@ configure() { } postremove() { - if [[ $arch = rm1 ]]; then + if [[ $arch = rm1os2 ]]; then echo 'Fuse (Kernel Module) has been removed.' echo 'The kernel module will remain loaded until you reboot, or you can attempt' echo 'to manually remove it by running "modprobe -r fuse".' @@ -81,7 +81,7 @@ postremove() { } postupgrade() { - if [[ $arch = rm1 ]]; then + if [[ $arch = rm1os2 ]]; then echo 'Fuse (Kernel Module) has been upgraded.' echo 'The old kernel module will remain loaded until you reboot, or you can' echo 'attempt to manually remove it by running "modprobe -r fuse".' diff --git a/package/kernelctl/package b/package/kernelctl/package index f4a4b36be..dcfcd5f7d 100644 --- a/package/kernelctl/package +++ b/package/kernelctl/package @@ -5,7 +5,7 @@ pkgnames=(kernelctl) pkgdesc="Manage aftermarket kernels" url=https://toltec-dev.org/ -pkgver=0.1-6 +pkgver=0.1-7 timestamp=2022-11-12T00:00Z section="utils" maintainer="Salvatore Stella " @@ -19,10 +19,10 @@ sha256sums=( ) package() { - touch "$srcdir"/emptyfile install -D -m 744 -t "$pkgdir"/opt/bin "$srcdir"/kernelctl install -d "$pkgdir"/opt/usr/share/kernelctl - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/kernelctl "$srcdir"/emptyfile + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" } configure() { diff --git a/package/signature-rm/package b/package/signature-rm/package index 7c24d8061..87154993a 100644 --- a/package/signature-rm/package +++ b/package/signature-rm/package @@ -2,17 +2,18 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -_pkgname='signature-rm' -pkgnames=("$_pkgname") +archs=(rmallos2 rmallos3) +pkgnames=("signature-rm") pkgdesc="Remove the signature from the bottom of emails" url="https://github.com/rM-self-serve/signature-rM" -pkgver=1.0.2-1 +pkgver=1.0.2-2 timestamp=2023-12-06T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT image=rust:v3.1 -conflicts=(ddvk-hacks webinterface-onboot) +conflicts=(webinterface-onboot) +conflicts_rmallos2=(ddvk-hacks) source=( "$url"/archive/b5561af4eb6a0f5aa6e98e1a1279066f0c4bd9b7.zip @@ -27,10 +28,10 @@ build() { package() { install -D -m 755 -t "$pkgdir"/opt/bin \ - "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$_pkgname" + "$srcdir/target/armv7-unknown-linux-gnueabihf/release/$pkgname" - touch "$srcdir"/emptyfile - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" } configure() { diff --git a/package/templatectl/package b/package/templatectl/package index 7c7414550..b09b7fc7b 100644 --- a/package/templatectl/package +++ b/package/templatectl/package @@ -5,7 +5,7 @@ pkgnames=(templatectl) pkgdesc="Tool to add/remove templates for xochitl" url=https://github.com/PeterGrace/templatectl -pkgver=0.1.3-4 +pkgver=0.1.3-5 timestamp=2021-01-15T01:23Z section="templates" maintainer="Peter Grace " @@ -22,6 +22,8 @@ build() { package() { install -D -m 755 -t "$pkgdir"/opt/bin \ "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/templatectl + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" } preinstall() { diff --git a/package/toltec-base/package b/package/toltec-base/package index 06d812667..c1fc5e010 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -2,25 +2,26 @@ # Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rm1 rm2) +archs=(rmall rmallos2 rmallos3 rm1 rm1os2 rm1os3 rm2 rm2os2 rm2os3) pkgnames=(toltec-base) pkgdesc="Metapackage defining the base set of packages in a Toltec install" url=https://toltec-dev.org/ -pkgver=1.3-1 +pkgver=1.3-2 timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " license=MIT -installdepends=(toltec-bootstrap toltec-completion) -installdepends_rm1=(open-remarkable-shutdown) -installdepends_rm2=(rm2-suspend-fix) +installdepends=(toltec-bootstrap toltec-deletions toltec-completion wget-ssl ca-certificates) +installdepends_rm1os2=(open-remarkable-shutdown) +installdepends_rm1os3=(open-remarkable-shutdown) +installdepends_rm2os2=(rm2-suspend-fix) +installdepends_rm2os3=(rm2-suspend-fix) source=() sha256sums=() package() { - touch "$srcdir"/emptyfile - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/toltec-base "$srcdir"/emptyfile + true } configure() { @@ -31,23 +32,28 @@ configure() { /opt/etc/profile echo "Disabling automatic update" disable-unit update-engine.service - if [[ "$arch" == "rm1" ]]; then - echo "Disabling usb1 network device to avoid long boots" - if ! is-masked sys-subsystem-net-devices-usb1.device; then - systemctl mask sys-subsystem-net-devices-usb1.device - fi - if ! is-masked busybox-ifplugd@usb1.service; then - systemctl mask busybox-ifplugd@usb1.service - fi - elif [[ "$arch" == "rm2" ]]; then - echo "Enabling usb1 network device to ensure usb SSH works" - if is-masked sys-subsystem-net-devices-usb1.device; then - systemctl unmask sys-subsystem-net-devices-usb1.device - fi - if is-masked busybox-ifplugd@usb1.service; then - systemctl unmask busybox-ifplugd@usb1.service - fi - fi + case "$arch" in + rmall | rmallos2 | rmallos3) + echo "Warning: rmall version of toltec-base should not be installed" + echo "Please run opkg install --force-reinstall toltec-base" + ;; + rm1 | rm1os2 | rm1os3) + if ! is-masked sys-subsystem-net-devices-usb1.device; then + systemctl mask sys-subsystem-net-devices-usb1.device + fi + if ! is-masked busybox-ifplugd@usb1.service; then + systemctl mask busybox-ifplugd@usb1.service + fi + ;; + rm2 | rm2os2 | rm2os3) + if is-masked sys-subsystem-net-devices-usb1.device; then + systemctl unmask sys-subsystem-net-devices-usb1.device + fi + if is-masked busybox-ifplugd@usb1.service; then + systemctl unmask busybox-ifplugd@usb1.service + fi + ;; + esac } postremove() { diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index 1b033cc4a..c1a3393ee 100644 --- a/package/toltec-bootstrap/package +++ b/package/toltec-bootstrap/package @@ -5,8 +5,8 @@ pkgnames=(toltec-bootstrap) pkgdesc="Manage your Toltec install" url=https://toltec-dev.org/ -pkgver=0.2.3-1 -timestamp=2023-09-17T17:35Z +pkgver=0.4.0-1 +timestamp=2023-11-27T00:34Z section="utils" maintainer="Eeems " license=MIT @@ -53,14 +53,14 @@ configure() { fi create-entware-conf - switch-branch "$branch" - echo "Your Opkg configuration has been migrated" + fi - if generate-opkg-conf; then - echo - echo "! The upgrade is not finished! Please run \`opkg update\`" - echo "! and \`opkg upgrade\` once more to complete it." - echo - fi + switch-branch "$(get-branch)" + echo "Your Opkg configuration has been upgraded" + if generate-opkg-conf; then + echo + echo "! The upgrade is not finished! Please run \`opkg update\`" + echo "! and \`opkg upgrade\` once more to complete it." + echo fi } diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index b9ea0bcb3..a3792f0ad 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -10,9 +10,16 @@ toltec_src=/home/root/.entware # Path where Toltec is mounted toltec_dest=/opt +# Path where toltec caches compatibility information +toltec_share=/home/root/.local/share/toltec +# Path to static opkg build +opkg_path=/home/root/.local/bin/opkg +# Path to opkg install status file +opkg_status="/opt/lib/opkg/status" + # Path to Opkg configuration -opkg_conf="$toltec_dest"/etc/opkg.conf -opkg_conf_dir="$toltec_dest"/etc/opkg.conf.d +opkg_conf="$toltec_src"/etc/opkg.conf +opkg_conf_dir="$toltec_src"/etc/opkg.conf.d # Path to the Xochitl configuration xochitl_conf=/home/root/.config/remarkable/xochitl.conf @@ -27,6 +34,50 @@ bashrc_start_marker="# Added by Toltec bootstrap (do not modify!)" bashrc_old_start_marker="# Path added by Toltec bootstrap" bashrc_end_marker="# End of Toltec bootstrap additions" +# Print a log message +# +# Arguments: +# +# [$1] - Log level: INFO, WARN or ERROR (default: INFO) +# $2... - Messages to print, each argument goes to a separate line +log() { + # Output stream where the messages will be sent + local log_type="INFO" + local fd=1 + local colored_prefix + + if [[ $# -ge 2 ]]; then + case "$1" in + INFO | WARN | ERROR) + log_type="$1" + shift + ;; + esac + fi + + case "$log_type" in + INFO) colored_prefix='\e[32mINFO:\e[0m ' ;; + WARN) + colored_prefix='\e[33mWARN:\e[0m ' + fd=2 + ;; + ERROR) + colored_prefix='\e[31mERROR:\e[0m ' + fd=2 + ;; + esac + + echo -e "${colored_prefix}$1" >&$fd + + # Extra lines to print indented + shift + local line + + for line in "$@"; do + echo -e " $line" >&$fd + done +} + # Identify which reMarkable model we’re currently running on # # Output: One of the following strings @@ -51,6 +102,68 @@ identify-model() { esac } +# Find the current OS release version +# +# Output: Current version in the X.Y.Z.P format +get-release-version() { + awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf +} + +# Check to see if the version is supported and error if it isn't supported +# +# Arguments: +# +# $1 - Branch for which to check support +# +# Exit code: +# +# 0 - if the current version is supported +# 1 - if unsupported +# 2 - if version compatibility information could not be retrieved +# 3 - unable to install standalone wget +check-version() { + local wget + if [[ "$(install-state)" != "yes" ]] || [[ "$(command -v wget)" != "/opt/bin/wget" ]]; then + if ! install-standalone-wget; then + return 2 + fi + wget="${toltec_share}/wget" + else + wget="wget" + fi + local check_branch + local current_model + local current_version + local cwd + check_branch="$1" + current_model="$(identify-model)" + current_version="$(get-release-version)" + + cwd="$(pwd)" + mkdir -p "$toltec_share" + cd "$toltec_share" + if ! "$wget" "$toltec_srv_root"/"$check_branch"/Compatibility \ + --timestamping \ + --no-verbose \ + --ignore-length 2> /dev/null; then + log ERROR "Unable to fetch updated version compatibility information, make sure you have a stable Wi-Fi connection" + if ! [ -f Compatibility ]; then + cd "$cwd" + return 2 + fi + log WARN "Using outdated cached version compatibility information" + fi + cd "$cwd" + + if ! grep -q "${current_model}=${current_version}" "${toltec_share}/Compatibility"; then + LOG ERROR "You’re running an unsupported OS version: $current_version" + LOG ERROR "Please monitor Toltec releases for upcoming support" + return 1 + fi + + return 0 +} + # Get the password used to login to the SSH prompt # # Output: SSH password @@ -122,21 +235,214 @@ remove-bind-mount() { if [[ ! -e $unit_path ]]; then echo "No existing bind mount for '$1'" - return 1 + return fi echo "Removing mount over '$1'" systemctl disable "$unit_name" - umount -l "$1" + systemctl stop "$unit_name" + if mountpoint -q "$1"; then + umount -l "$1" + fi rm "$unit_path" systemctl daemon-reload } +# Escape a string for use in a sed search +# +# Arguments +# +# $1 - String to escape +# +# Output: +# +# Escaped string +escape-for-sed() { + # shellcheck disable=SC1003 + sed -e 's/[^^]/[&]/g; s/\^/\\^/g; $!a\'$'\n''\\n' <<< "$1" | tr -d '\n' +} + +# Escape a string for use in a sed replacement +# +# Arguments +# +# $1 - String to escape +# +# Output: +# +# Escaped string +escape-for-sed-replace() { + IFS= read -d '' -r < <(sed -e ':a' -e '$!{N;ba' -e '}' -e 's/[&/\]/\\&/g; s/\n/\\&/g' <<< "$1") + printf %s "${REPLY%$'\n'}" +} + +# Replace multiline string content in stdin +# +# Arguments: +# +# $1 - String to replace +# $2 - string to replace with +# stdin - Text to perform replacement on +# +# Output: +# +# Contents of stdin with the string replaced +replace-string() { + sed \ + -e ':a' \ + -e '$!{N;ba' -e '}' \ + -e "s/$(escape-for-sed "$1")/$(escape-for-sed-replace "$2")/" +} + +# Get the opkg status for a package +# +# Arguments: +# +# $1 - Package name +# +# Output: Opkg status information for the package +# +# Exit Code: +# +# 0 - Status found +# 1 - Status not found +get-package-status() { + local status + status="$(opkg status "$1" | grep -v "has no valid architecture, ignoring" || true)" + if [ -n "$status" ]; then + echo "$status" + return 0 + fi + local index + local index2 + local count + # Don't use --line-number so this works on the built in grep + index="$(grep -n "Package: ${1}" "$opkg_status" | cut -d':' -f1 || echo "-1")" + if [ "$index" -eq -1 ]; then + return 1 + fi + # Don't use --line-number so this works on the built in grep + count="$(tail -n +$((index + 1)) "$opkg_status" | grep -n "Package: " | head -n1 | cut -d':' -f1 || echo "-1")" + if [ "$count" -eq -1 ]; then + return 1 + fi + index2=$((index + count - 1)) + status="$(sed -n "${index},${index2}p;$((index2 + 1))q" "$opkg_status")" + if [ -z "$status" ]; then + return 1 + fi + echo "$status" + return 0 +} + +# Check if a string appears in a set of strings +# +# Arguments: +# +# $1 - String to look for +# $2... - Elements to compare to $1 +# +# Example: +# +# > has-element "needle" "${haystack[@]}" +# Will return 0 if "needle" is found in the "haystack" array. +# +# Exit code: 0 if the element is found, 1 otherwise. +has-element() { + local needle="$1" + shift + + for element; do + if [[ $needle == "$element" ]]; then + return 0 + fi + done + + return 1 +} + +# Update the opkg status for a package with the correct architecture for the device +# +# Arguments: +# +# $1 - Package name +# +# Exit Codes: +# +# 0 - Package status was updated +# 1 - Package status was not modified +# 2 - Package status was not found +# 3 - Package status has no architecture +update-package-arch() { + if ! grep -q "Package: ${1}" "$opkg_status"; then + return 1 + fi + local arch + local model + local new_status + local version + local status + local rc=0 + status="$(get-package-status "$1" || true)" + if [ -z "$status" ]; then + log WARN "Unable to get status for package: ${1}" + return 2 + fi + arch="$(echo "$status" | grep "Architecture:" | awk '{print $2}')" + if [ -z "$arch" ]; then + return 3 + fi + case "$arch" in + rmallos2 | rmallos3) + version="$(identify-support-version)" + new_status="$(echo "$status" | replace-string "Architecture: ${arch}" "Architecture: rmall${version}")" + ;; + rm1os2 | rm1os3 | rm2os2 | rm2os3) + model="$(identify-model)" + version="$(identify-support-version)" + new_status="$(echo "$status" | replace-string "Architecture: ${arch}" "Architecture: ${model}${version}")" + ;; + *) + new_status="$status" + ;; + esac + if [[ "$status" == "$new_status" ]]; then + return 1 + fi + echo "Updating package architecture for package: ${1}" + sed -i \ + -e ':a' \ + -e '$!{N;ba' -e '}' \ + -e "s/$(escape-for-sed "$status")/$(escape-for-sed-replace "$new_status")/" \ + "$opkg_status" + return 0 +} + +# Reinstall toltec-base and toltec-deletions +reinstall-base() { + local packages=() + while read -r pkg; do + if update-package-arch "$pkg"; then + packages+=("$pkg") + fi + done < <(opkg list-installed | grep -v "has no valid architecture, ignoring" | cut -d' ' -f1 || true) + while read -r pkg; do + if update-package-arch "$pkg"; then + packages+=("$pkg") + fi + done < <(opkg list-installed | grep "has no valid architecture, ignoring" | cut -d' ' -f2 || true) + if ! has-element "toltec-base" "${packages[@]}"; then + packages+=(toltec-base) + fi + if ! has-element "toltec-deletions" "${packages[@]}"; then + packages+=(toltec-deletions) + fi + opkg install --force-reinstall "${packages[@]}" || true +} + # Reinstall all Toltec packages that had files installed outside of # $toltec_src, e.g. systemd configuration files reinstall-root() { - opkg update - # Get the list of installed packages with files on root local pkgname declare -A on_root_packages @@ -161,7 +467,7 @@ reinstall-root() { # temporarily set +u if [[ ${#reinstall_packages[@]} -ne 0 ]]; then - opkg install --force-reinstall --force-remove "${!reinstall_packages[@]}" + opkg install --force-reinstall --force-remove "${!reinstall_packages[@]}" || true else echo "No package needs to be reinstalled" fi @@ -195,7 +501,7 @@ SHELL new_path="$(bash -l -c "echo \$PATH")" if [[ $old_path != "$new_path" ]]; then - echo "Please restart your SSH session or run 'exec bash --login' to use Toltec" + log WARN "Please restart your SSH session or run 'exec bash --login' to use Toltec" fi } @@ -267,6 +573,61 @@ src/gz entware https://bin.entware.net/armv7sf-k3.2 CONF } +# Get the current Toltec branch of this installation +# +# Output: Current branch name +get-branch() { + if ! [ -f "$opkg_conf_dir/15-toltec.conf" ]; then + return + fi + local srv_prefix_len=${#toltec_srv_root} + local srv_prefix="${toltec_srv_root//\//\\/}" + local awk_get_branch=" + match(\$0, /$srv_prefix\/(.+)\/rmall/) { + print substr( \ + \$0, \ + RSTART+$srv_prefix_len+1, \ + RLENGTH-$srv_prefix_len-1-6 \ + ) + } + " + awk "$awk_get_branch" "$opkg_conf_dir/15-toltec.conf" | head -n1 || true +} + +# Compare two version numbers +# +# Arguments: +# +# $1 - Version number to compare +# $2 - Version number to compare +# +# Output: True if the first number is larger than the second +compare-versions() { + [ "$(echo -e "${1}\n${2}" | sort | head -n1)" != "$1" ] +} + +# Identify which toltec version this should be limited to +# +# Output: One of the following strings +# +# os2 - 2.x OS version +# os3 - 3.x OS version +# unknown +identify-support-version() { + local current_version + current_version="$(get-release-version)" + + if compare-versions "2.0" "$current_version"; then + echo "unknown" + elif compare-versions "3.0" "$current_version"; then + echo "os2" + elif compare-versions "4.0" "$current_version"; then + echo "os3" + else + echo "unknown" + fi +} + # Set the Toltec branch for this installation # (generate-opkg-conf must be run afterwards to rebuild the main config file) # @@ -276,10 +637,16 @@ CONF switch-branch() { local branch="${1:-stable}" local model + local version model="$(identify-model)" + version="$(identify-support-version)" if [[ $model = "unknown" ]]; then - echo "You’re running an unsupported or unrecognised device" + log ERROR "You’re running an unsupported or unrecognised device" + exit 1 + fi + if [[ $version = "unknown" ]]; then + log ERROR "You're running an unsupported or unrecognised OS version" exit 1 fi @@ -292,16 +659,43 @@ switch-branch() { # switch to a different Toltec branch arch rmall 200 -src/gz toltec-rmall $toltec_srv_root/$branch/rmall -arch $model 250 -src/gz toltec-$model $toltec_srv_root/$branch/$model +src/gz toltec-rmall ${toltec_srv_root}/${branch}/rmall +arch ${model} 250 +src/gz toltec-${model} ${toltec_srv_root}/${branch}/${model} +arch rmall${version} 260 +src/gz toltec-rmall$version ${toltec_srv_root}/${branch}/rmall${version} +arch ${model}os2 270 +arch ${model}os3 270 +src/gz toltec-${model}${version} ${toltec_srv_root}/${branch}/${model}${version} CONF } # Re-enable Toltec install after system update reenable() { + log INFO "Mounting /opt" add-bind-mount "$toltec_src" "$toltec_dest" + switch-branch "$(get-branch)" + log INFO "Generating /opt/etc/opkg.conf" + generate-opkg-conf || true + log INFO "Opkg update" + opkg update + log INFO "Reinsalling base packages" + reinstall-base + log INFO "Reinstalling packages with files on the root partition" reinstall-root + if [ -d /opt/share/toltec/reenable.d ]; then + find /opt/share/toltec/reenable.d -maxdepth 1 -mindepth 1 -print0 \ + | xargs -0rn1 basename \ + | while read -r pkg; do + local script + script="/opt/lib/opkg/info/${pkg}.postinst" + if [ -f "$script" ]; then + log INFO "Reconfiguring ${pkg}" + "$script" configure || true + fi + done + fi + log INFO "Configuring bashrc" set-path } @@ -323,18 +717,68 @@ list-installed-ordered() { # tsort reports errors if there are dependency cycles, we ignore them } -# Remove Toltec completely -uninstall() { - # Fetch standalone opkg used to uninstall packages - local opkg_path=/home/root/.local/bin/opkg +# Install standalone opkg binary +install-standalone-opkg() { + local wget + if [[ "$(install-state)" != "yes" ]] || [[ "$(command -v wget)" != "/opt/bin/wget" ]]; then + if ! install-standalone-wget; then + return 2 + fi + wget="${toltec_share}/wget" + else + wget="wget" + fi local opkg_remote=https://bin.entware.net/armv7sf-k3.2/installer/opkg - if ! wget --no-verbose "$opkg_remote" --output-document "$opkg_path"; then - echo "Unable to fetch standalone opkg, make sure you have a stable Wi-Fi connection" + if ! "$wget" --no-verbose "$opkg_remote" --output-document "$opkg_path"; then + log ERROR "Unable to fetch standalone opkg, make sure you have a stable Wi-Fi connection" return 1 fi chmod u+x "$opkg_path" + if [[ $(command -v opkg) != "$opkg_path" ]]; then + export PATH + PATH="$(dirname "$opkg_path"):$PATH)" + fi +} + +# Install a local wget binary which supports TLS (the original one +# installed on the reMarkable does not) in the PATH +install-standalone-wget() { + local wget_path="${toltec_share}/wget" + local wget_remote=http://toltec-dev.org/thirdparty/bin/wget-v1.21.1 + local wget_checksum=8798fcdabbe560722a02f95b30385926e4452e2c98c15c2c217583eaa0db30fc + + if [ -f "$wget_path" ] && ! [[ -e $wget_path ]] || ! sha256sum -c <(echo "$wget_checksum $wget_path") > /dev/null 2>&1; then + rm "$wget_path" + fi + + if ! [ -f "$wget_path" ]; then + log INFO "Fetching secure wget" + + # Download and compare to hash + mkdir -p "$(dirname "$wget_path")" + + if ! wget -q "$wget_remote" --output-document "$wget_path"; then + log ERROR "Could not fetch wget, make sure you have a stable Wi-Fi connection" + exit 1 + fi + + if ! sha256sum -c <(echo "$wget_checksum $wget_path") > /dev/null 2>&1; then + log ERROR "Invalid checksum for the local wget binary" + exit 1 + fi + + chmod 755 "$wget_path" + fi +} + +# Remove Toltec completely +uninstall() { + # Fetch standalone opkg used to uninstall packages + if ! install-standalone-opkg; then + return 1 + fi # Remove installed packages in reverse dependency order list-installed-ordered | while read -r pkgname; do @@ -358,6 +802,71 @@ uninstall() { systemctl enable xochitl } +# The current toltec install state +# +# Output: +# +# yes - opt.mount is enabled and active +# partial - opt.mount is active but not enabled +# no - opt.mount is not enabled, or does not exist +install-state() { + local unit_name + local enabled + unit_name="$(systemd-escape --path "$toltec_dest").mount" + if ! systemctl --quiet is-enabled "$unit_name" 2> /dev/null; then + echo "no" + elif systemctl --quiet is-active "$unit_name"2 > /dev/null; then + echo "partial" + else + echo "yes" + fi +} + +# Output toltec installation status +status() { + echo -ne "Enabled: \033[1m" + local enabled=false + case "$(install-state)" in + yes) + enabled=true + echo -ne "\e[32mYes" + ;; + no) + echo -ne "\e[31mNo" + ;; + partial) + echo -ne "\e[33mPartial" + ;; + *) + echo -ne "\e[31mUnknown" + ;; + esac + echo -e "\e[0m" + echo -ne "Supported: \033[1m" + local rc + rc=0 + check-version "$(get-branch)" &> /dev/null || rc=$? + if [ $rc -eq 0 ]; then + echo -ne "\e[32mYes" + elif [ $rc -eq 2 ] || [ $rc -eq 3 ]; then + echo -ne "\e[33mUnknown" + else + echo -ne "\e[31mNo" + fi + echo -e "\e[0m" + echo -n "Branch: " + if [ -f "$opkg_conf" ]; then + # shellcheck disable=SC2005 + echo "$(get-branch)" + else + echo -e "\033[1m\e[33mUnknown\e[0m" + fi + echo -n "Model: " + identify-model + echo -n "OS: " + get-release-version +} + help() { echo "Usage: $(basename "$0") COMMAND Manage your Toltec install. Available commands: @@ -387,7 +896,7 @@ if [[ $0 = "${BASH_SOURCE[0]}" ]]; then echo if [[ $REPLY =~ ^[Nn]$ ]]; then - echo "Not reloading. Use 'opkg update' to do it manually." + log WARN "Not reloading. Use 'opkg update' to do it manually." else opkg update fi @@ -416,7 +925,13 @@ MSG echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Canceled" + log WARN "Canceled" + exit 1 + fi + fi + + if ! check-version "$target_branch"; then + if [[ -z $force ]]; then exit 1 fi fi @@ -433,7 +948,7 @@ MSG echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Canceled" + log WARN "Canceled" exit 1 fi fi @@ -446,7 +961,7 @@ MSG echo if [[ $REPLY =~ ^[Nn]$ ]]; then - echo "Not reloading. Use 'opkg update' to do it manually." + log WARN "Not reloading. Use 'opkg update' to do it manually." exit fi fi @@ -456,6 +971,14 @@ MSG ;; reenable) + force=$({ (($# > 0)) && [[ $1 = "--force" || $1 = "-f" ]] && echo 1; } || true) + + if ! check-version "$(get-branch)"; then + if [[ -z $force ]]; then + exit 1 + fi + fi + reenable ;; @@ -467,7 +990,7 @@ MSG echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then - echo "Canceled" + log WARN "Canceled" exit 1 fi fi @@ -479,25 +1002,29 @@ MSG echo if [[ $REPLY =~ ^[Nn]$ ]]; then - echo "Please reboot your device manually to complete the uninstall process" + log WARN "Please reboot your device manually to complete the uninstall process" exit fi fi if [[ ! -f $ssh_key_file ]]; then - echo "In case something goes wrong, your SSH password is: $(get-ssh-password)" + log WARN "In case something goes wrong, your SSH password is: $(get-ssh-password)" fi - echo "Rebooting" + log INFO "Rebooting" reboot ;; + status) + status + ;; + help | -h | --help) help ;; *) - echo -e "Error: Invalid command '$action'\n" + log ERROR "Invalid command '$action'\n" help exit 1 ;; diff --git a/package/toltec-completion/_toltecctl b/package/toltec-completion/_toltecctl index e1d3b765b..5a8d7e01c 100755 --- a/package/toltec-completion/_toltecctl +++ b/package/toltec-completion/_toltecctl @@ -8,7 +8,7 @@ _toltecctl() { _init_completion -s || return if [[ $cword -eq 1 ]]; then - COMPREPLY=($(compgen -W 'help generate-opkg-conf switch-branch reenable uninstall' -- "$cur")) + COMPREPLY=($(compgen -W 'help generate-opkg-conf switch-branch reenable uninstall status' -- "$cur")) return fi diff --git a/package/toltec-completion/package b/package/toltec-completion/package index cc465a569..39a87f0e3 100644 --- a/package/toltec-completion/package +++ b/package/toltec-completion/package @@ -5,7 +5,7 @@ pkgnames=(toltec-completion) pkgdesc="Expands bash-completion with functions for toltec-specific commands" url=https://github.com/toltec-dev/toltec -pkgver=0.3.1-1 +pkgver=0.3.2-1 timestamp=2022-01-23T23:29Z section="utils" maintainer="Linus K. " diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package new file mode 100644 index 000000000..74764e261 --- /dev/null +++ b/package/toltec-deletions/package @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +archs=(rmallos2 rmallos3) +pkgnames=(toltec-deletions) +pkgdesc="Metapackage to handle package deletions between OS versions" +url=https://toltec-dev.org/ +pkgver=0.1-1 +timestamp=2023-12-03T04:51:58Z +section="utils" +maintainer="Eeems " +license=MIT +installdepends=(toltec-bootstrap) +conflicts_rmallos2=() +replaces_rmallos2=() +conflicts_rmallos3=(ddvk-hacks fuse wireguard) +replaces_rmallos3=(ddvk-hacks fuse wireguard) + +source=() +sha256sums=() + +package() { + # This should be fully reinstalled on reenable + # So add a file to root + mkdir -p "$pkgdir"/usr/share/toltec/reenable.d + touch "$pkgdir"/usr/share/toltec/reenable.d/toltec-deletions +} diff --git a/package/webinterface-onboot/package b/package/webinterface-onboot/package index fc12319fe..0040ffc06 100644 --- a/package/webinterface-onboot/package +++ b/package/webinterface-onboot/package @@ -2,21 +2,22 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -_pkgname='webinterface-onboot' -pkgnames=("$_pkgname") +archs=(rmallos2 rmallos3) +pkgnames=("webinterface-onboot") pkgdesc="Start the web interface without the cable, on boot." -url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.2.3-1 +url="https://github.com/rM-self-serve/webinterface-onboot" +pkgver=1.2.3-2 timestamp=2023-12-31T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" license=MIT -conflicts=(ddvk-hacks signature-rm) +conflicts=(signature-rm) +conflicts_rmallos2=(ddvk-hacks) installdepends=(libbfd) source=( "$url"/archive/e184b6a37ccba0ebeacd34faf63c8f4cdfa5c448.zip - "$_pkgname-toltec.service" + "webinterface-onboot-toltec.service" ) sha256sums=( 2e3666b1875f874ef09da2bbd163295b89e9e241f1e59e77349b0e2db716b8ff @@ -24,12 +25,12 @@ sha256sums=( ) package() { - install -D -m 755 -t "$pkgdir/opt/bin" "$srcdir/$_pkgname" - install -D -m 644 "$srcdir/$_pkgname-toltec.service" \ - "$pkgdir/lib/systemd/system/$_pkgname.service" + install -D -m 755 -t "$pkgdir/opt/bin" "$srcdir/$pkgname" + install -D -m 644 "$srcdir/$pkgname-toltec.service" \ + "$pkgdir/lib/systemd/system/$pkgname.service" - touch "$srcdir"/emptyfile - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" } configure() { diff --git a/package/webinterface-upload-button/package b/package/webinterface-upload-button/package index 201285a15..62227cae5 100644 --- a/package/webinterface-upload-button/package +++ b/package/webinterface-upload-button/package @@ -2,11 +2,10 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -_pkgname='webinterface-upload-button' -pkgnames=("$_pkgname") +pkgnames=("webinterface-upload-button") pkgdesc="A simple upload button for the web interface" -url="https://github.com/rM-self-serve/$_pkgname" -pkgver=1.1.1-1 +url="https://github.com/rM-self-serve/webinterface-upload-button" +pkgver=1.1.1-2 timestamp=2023-12-16T15:35:49Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" @@ -20,11 +19,11 @@ sha256sums=( ) package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$_pkgname" - install -D -m 644 -t "$pkgdir"/usr/share/remarkable/webui/ "$srcdir/$_pkgname.js" + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir/$pkgname" + install -D -m 644 -t "$pkgdir"/usr/share/remarkable/webui/ "$srcdir/$pkgname.js" - touch "$srcdir"/emptyfile - install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/"$_pkgname" "$srcdir"/emptyfile + mkdir -p "$pkgdir"/opt/share/toltec/reenable.d + touch "$pkgdir"/opt/share/toltec/reenable.d/"$pkgname" } configure() { diff --git a/package/wireguard/package b/package/wireguard/package index 23665bb19..9a46b62c6 100755 --- a/package/wireguard/package +++ b/package/wireguard/package @@ -1,11 +1,11 @@ #!/usr/bin/env bash # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT - +archs=(rm1os2 rm2os2) pkgnames=(wireguard) pkgdesc="Fast, modern, secure VPN tunnel" url=https://www.wireguard.com -pkgver=1.0.20210219-4 +pkgver=1.0.20210219-5 timestamp=2021-02-19T14:08Z section=kernel maintainer="Jonah Weissman " diff --git a/requirements.txt b/requirements.txt index a36680a62..1302931a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,27 +1,11 @@ -appdirs==1.4.4 -astroid==2.15.4 -black==23.3.0 -certifi==2020.12.5 -chardet==4.0.0 -click==8.1.3 -docker==4.4.1 -idna==2.10 -isort==5.7.0 -Jinja2==2.11.2 -lazy-object-proxy==1.4.3 -MarkupSafe==1.1.1 -mccabe==0.6.1 -mypy==0.790 -mypy-extensions==0.4.3 -pathspec==0.11.1 -pyelftools==0.27 -pylint==2.17.4 -python-dateutil==2.8.1 -regex==2020.11.13 -requests==2.25.1 -six==1.15.0 -toml==0.10.2 -typing-extensions==4.5.0 -urllib3==1.26.2 -websocket-client==0.57.0 -wrapt==1.12.1 +docker==6.1.3 +python-dateutil==2.8.2 +pyelftools==0.29 +black==23.7.0 +pylint==2.17.5 +mypy==1.5.1 +mypy-extensions==1.0.0 +Jinja2==3.1.2 +types-python-dateutil==2.8.19.14 +types-requests==2.31.0.2 +typing-extensions==4.7.1 diff --git a/scripts/bootstrap/bootstrap b/scripts/bootstrap/bootstrap index f72fff16d..997a2e270 100755 --- a/scripts/bootstrap/bootstrap +++ b/scripts/bootstrap/bootstrap @@ -89,7 +89,7 @@ wget-bootstrap() { exit 1 fi - log "Fetching secure wget" + log INFO "Fetching secure wget" # Download and compare to hash mkdir -p "$(dirname "$wget_path")" @@ -174,6 +174,12 @@ main() { # Clean up the partial install if an uncaught error happens trap error-cleanup ERR + if ! check-version "$toltec_branch"; then + if [ $# -eq 0 ] || [[ "$1" != "--force" ]]; then + exit 1 + fi + fi + log "Installing Toltec and Entware" # Create bind mount from user directory to /opt @@ -224,23 +230,12 @@ main() { ln -sf /etc/localtime /opt/etc/localtime fi - # Install base Toltec packages - local additional_packages=(toltec-base) - - [[ ! -d /opt/etc/ssl/certs ]] && additional_packages+=(ca-certificates) - [[ ! -f /opt/bin/wget ]] && additional_packages+=(wget-ssl) - - if [[ ${#additional_packages[@]} -gt 0 ]]; then - opkg install "${additional_packages[@]}" - fi + opkg install toltec-base - if [[ $# -gt 0 ]]; then - opkg install "$@" + if [[ $# -gt 0 ]] && ! /opt/bin/opkg install "$@"; then + log ERROR "The install was still successful, but the requested packages failed to install" fi - # Reinstall toltec-bootstrap to mark its files as managed, - # to install its dependencies, and to set the user’s PATH - opkg install toltec-bootstrap log "After each system upgrade, run 'toltecctl reenable' to re-enable Toltec" } diff --git a/scripts/install-lib b/scripts/install-lib index e5e9f22a4..ae6cb5066 100644 --- a/scripts/install-lib +++ b/scripts/install-lib @@ -189,7 +189,7 @@ remove-bind-mount() { # # $1 - Full name of the systemd unit, e.g. "draft.service" unit-exists() { - [ "$(systemctl --quiet list-unit-files "${1}" | grep -c "${1}")" -eq 1 ] + [ "$(systemctl --quiet list-unit-files "${1}" | /bin/grep -c "${1}" 2> /dev/null || echo "0")" -eq 1 ] } # Stops and disabled a unit diff --git a/scripts/repo_build.py b/scripts/repo_build.py index 4e7d8c69f..9a9b5f1b4 100755 --- a/scripts/repo_build.py +++ b/scripts/repo_build.py @@ -72,3 +72,4 @@ repo.make_index() repo.make_listing() +repo.make_compatibility() diff --git a/scripts/toltec/bash.py b/scripts/toltec/bash.py index b763dd18c..bf74d17bb 100644 --- a/scripts/toltec/bash.py +++ b/scripts/toltec/bash.py @@ -38,6 +38,7 @@ class ScriptError(Exception): "BASH_SUBSHELL", "BASH_VERSINFO", "BASH_VERSION", + "BASH_LOADABLES_PATH", "COLUMNS", "COMP_WORDBREAKS", "DIRSTACK", @@ -132,10 +133,10 @@ def get_declarations(src: str) -> Tuple[Variables, Functions]: while True: token = lexer.get_token() - if token == lexer.eof: + if token == lexer.eof or token is None: break - next_token = lexer.get_token() + next_token = lexer.get_token() or "" if token == "declare" and next_token[0] == "-": lexer.push_token(next_token) @@ -144,8 +145,16 @@ def get_declarations(src: str) -> Tuple[Variables, Functions]: if name not in default_variables: variables[name] = value else: - assert next_token == "(" - assert lexer.get_token() == ")" + if next_token != "(": + raise ScriptError( + f"Unexpected token '{next_token}' on line {lexer.lineno}. Expecting '('." + ) + + _token = lexer.get_token() + if _token != ")": + raise ScriptError( + f"Unexpected token '{_token}' on line {lexer.lineno}. Expecting ')'." + ) start, end = _parse_func(lexer) functions[token] = declarations[start:end] @@ -217,10 +226,13 @@ def _parse_indexed(lexer: shlex.shlex) -> IndexedArray: break assert token == "[" - index = int(lexer.get_token()) + index = int(lexer.get_token() or "") assert lexer.get_token() == "]" assert lexer.get_token() == "=" - value = _parse_string(lexer.get_token()) + string_token = lexer.get_token() or "" + if string_token == "$": + string_token = lexer.get_token() or "" + value = _parse_string(string_token) # Grow the result array so that the index exists if index >= len(result): @@ -247,7 +259,7 @@ def _generate_indexed(array: IndexedArray) -> str: def _parse_assoc(lexer: shlex.shlex) -> AssociativeArray: """Parse an associative Bash array.""" assert lexer.get_token() == "(" - result = {} + result: AssociativeArray = {} while True: token = lexer.get_token() @@ -258,9 +270,13 @@ def _parse_assoc(lexer: shlex.shlex) -> AssociativeArray: assert token == "[" key = lexer.get_token() + assert key is not None assert lexer.get_token() == "]" assert lexer.get_token() == "=" - value = _parse_string(lexer.get_token()) + string_token = lexer.get_token() or "" + if string_token == "$": + string_token = lexer.get_token() or "" + value = _parse_string(string_token) result[key] = value @@ -283,14 +299,14 @@ def _parse_var(lexer: shlex.shlex) -> Tuple[str, Optional[Any]]: """Parse a variable declaration.""" flags_token = lexer.get_token() - if flags_token != "--": + if flags_token != "--" and flags_token is not None: var_flags = set(flags_token[1:]) else: var_flags = set() - var_name = lexer.get_token() + var_name: str = lexer.get_token() or "" var_value: Optional[Any] = None - lookahead = lexer.get_token() + lookahead = lexer.get_token() or "" if lookahead == "=": if "a" in var_flags: @@ -298,7 +314,10 @@ def _parse_var(lexer: shlex.shlex) -> Tuple[str, Optional[Any]]: elif "A" in var_flags: var_value = _parse_assoc(lexer) else: - var_value = _parse_string(lexer.get_token()) + string_token = lexer.get_token() or "" + if string_token == "$": + string_token = lexer.get_token() or "" + var_value = _parse_string(string_token) else: lexer.push_token(lookahead) diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py index ee14b0e29..249162793 100644 --- a/scripts/toltec/builder.py +++ b/scripts/toltec/builder.py @@ -48,10 +48,13 @@ class BuildContextAdapter(logging.LoggerAdapter): def process( self, msg: str, kwargs: MutableMapping[str, Any] ) -> Tuple[str, MutableMapping[str, Any]]: + if self.extra is None: + return msg, kwargs + prefix = "" if "recipe" in self.extra: - prefix += self.extra["recipe"] + prefix += str(self.extra["recipe"]) if "arch" in self.extra: prefix += f" [{self.extra['arch']}]" @@ -657,7 +660,7 @@ def _archive(self, package: Package, pkg_dir: str) -> None: def _print_logs( self, logs: bash.LogGenerator, - function_name: str = None, + function_name: Optional[str] = None, max_lines_on_fail: int = 50, ) -> None: """ diff --git a/scripts/toltec/repo.py b/scripts/toltec/repo.py index af9c1ad28..62f9b3273 100644 --- a/scripts/toltec/repo.py +++ b/scripts/toltec/repo.py @@ -9,6 +9,7 @@ from enum import Enum, auto import logging import os +import shutil import textwrap from typing import Dict, Iterable, List, Optional, Set import requests @@ -55,10 +56,10 @@ def __init__(self, recipe_dir: str, repo_dir: str) -> None: self.repo_dir = repo_dir self.generic_recipes = {} - for name in os.listdir(self.recipe_dir): - if name[0] != ".": - self.generic_recipes[name] = GenericRecipe.from_file( - os.path.join(self.recipe_dir, name) + for entry in os.scandir(self.recipe_dir): + if entry.is_dir(): + self.generic_recipes[entry.name] = GenericRecipe.from_file( + entry.path ) def fetch_packages(self, remote: Optional[str]) -> GroupedPackages: @@ -266,3 +267,10 @@ def make_listing(self) -> None: # pylint: disable-next=unspecified-encoding with open(listing_path, "w") as listing_file: listing_file.write(template.render(sections=sections)) + + def make_compatibility(self) -> None: + """Generate the OS compatibility information file.""" + logger.info("Generating compatibility info") + compat_source = os.path.join(self.recipe_dir, "Compatibility") + compat_dest = self.repo_dir + shutil.copy2(compat_source, compat_dest)