From f0927a35452552a2c0755c6dc01fde0a539e3905 Mon Sep 17 00:00:00 2001 From: Sunny Date: Mon, 25 Jul 2022 14:51:58 +0000 Subject: [PATCH 001/178] rmfm: Add version 1.3.0 (#608) --- package/rmfm/package | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/rmfm/package diff --git a/package/rmfm/package b/package/rmfm/package new file mode 100644 index 000000000..0b60a291f --- /dev/null +++ b/package/rmfm/package @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(rmfm) +pkgdesc="Bare-bones file manager using Node.js and sas" +url="https://codeberg.org/sun/rmFM" +pkgver=1.3.0-1 +timestamp=2022-07-22T19:29:42+02:00 +section=utils +maintainer="Sunny " +license=MIT +installdepends=(node simple) + +source=(https://codeberg.org/sun/rmFM/archive/1.3.0.zip) +sha256sums=(6c82bb47842e17203f5104d764ec6dbde75ada63a75d527ea6d17da59b46d7ae) + +package() { + install -D -m 755 "$srcdir"/rmfm "$pkgdir"/opt/bin/rmfm + install -D -m 644 "$srcdir"/rmfm.draft "$pkgdir"/opt/etc/draft/rmfm.draft + install -D -m 644 "$srcdir"/rmfm.png "$pkgdir"/opt/etc/draft/icons/rmfm.png +} From ae225aa5ed8ceda8ea18344397ea4231a27c9143 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 2 Aug 2022 08:33:17 -0600 Subject: [PATCH 002/178] Update KOReader to v2022.07 (#609) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 675bd9cc2..b74221ff5 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=2022.06-1 -timestamp=2022-06-23T19:32:08Z +pkgver=2022.07-1 +timestamp=2022-07-31T13:31:10Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 2338591c3bc4eebd5a67e065ab98315f6a687f1c52111d39a30ac860fc3eec80 + 3703ed2d6f207def0c7f41a4056ff57707f7b72c3dba2119fb384bf771bc1e3b SKIP SKIP SKIP From ef7bf5d19ccf2579c8091a571f2d1fea9d20c8fe Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:27:45 -0500 Subject: [PATCH 003/178] Add package: ripgrep (#611) * add ripgrep Co-authored-by: gbyl --- package/ripgrep/package | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/ripgrep/package diff --git a/package/ripgrep/package b/package/ripgrep/package new file mode 100644 index 000000000..a6a13a6ea --- /dev/null +++ b/package/ripgrep/package @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 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 +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) + +build() { + cargo build --release +} + +package() { + install -D -m 755 "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/rg "$pkgdir"/opt/bin/rg +} From 52caa1b8aa9d7abdeea5b27b268740bf05cd1c1b Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:49:15 -0500 Subject: [PATCH 004/178] Add package: lf (#612) * add package: lf Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/lf/package | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/lf/package diff --git a/package/lf/package b/package/lf/package new file mode 100644 index 000000000..1b415a869 --- /dev/null +++ b/package/lf/package @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 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 +section="utils" +maintainer="gbyl " +license=MIT + +image=golang:v2.3 +source=("https://github.com/gokcehan/lf/archive/refs/tags/r27.zip") +sha256sums=(a4f7b3ada4aa1348b7f102374d8580b6992977f7e84053aa04ef6aadb69dc205) + +build() { + export GOARCH=arm + go build +} + +package() { + install -D -m 755 "$srcdir"/lf "$pkgdir"/opt/bin/lf +} From bc4d640b43a5dfbaaa526d67a437503eb17ee27b Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Thu, 4 Aug 2022 19:02:48 -0500 Subject: [PATCH 005/178] Update yaft to v0.0.7 and add rM1 input patch (#613) * upgrade to yaft-v0.0.7 * add rm1 input patch * update docker image version Co-authored-by: gbyl --- package/yaft/input.patch | 23 +++++++++++++++++++++++ package/yaft/package | 20 ++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 package/yaft/input.patch diff --git a/package/yaft/input.patch b/package/yaft/input.patch new file mode 100644 index 000000000..02d0acde7 --- /dev/null +++ b/package/yaft/input.patch @@ -0,0 +1,23 @@ +--- 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 4ba55525f..fc26750fb 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -1,22 +1,30 @@ #!/usr/bin/env bash -# Copyright (c) 2020 The Toltec Contributors +# Copyright (c) 2022 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft -pkgver=0.0.4-4 -timestamp=2021-04-30T10:42Z +pkgver=0.0.7-1 +timestamp=2021-05-02T09:23Z maintainer="Mattéo Delabre " license=GPL-3.0 section="admin" -image=base:v2.1 +image=base:v2.3 installdepends=(display) -source=(https://github.com/timower/rM2-stuff/archive/refs/tags/v0.0.4.tar.gz) -sha256sums=(dee471ac19ea43ba741f826c9a0a17d7a01bda6472043d400fbcab6fad1931fe) +source=( + https://github.com/timower/rM2-stuff/archive/refs/tags/v0.0.7.zip + input.patch +) + +sha256sums=( + df3c74e08c6f047be8cea3d50f9b84bf20a9191d9ee1850e9957146134dfef1c + 5f3c6be207dda291950eece920fca853977fef772c6eddd7fb37c4dbf44c2b3b +) build() { + patch -u libs/rMlib/Device.cpp -i input.patch mkdir build mkdir install cd build From 73538e7e9d2f1e7622610280b3eaa39c53554fc9 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 19 Aug 2022 14:35:28 +0000 Subject: [PATCH 006/178] rmfm: Update to 1.4.0 (#617) --- package/rmfm/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/rmfm/package b/package/rmfm/package index 0b60a291f..a1b6a101f 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -5,15 +5,15 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" url="https://codeberg.org/sun/rmFM" -pkgver=1.3.0-1 -timestamp=2022-07-22T19:29:42+02:00 +pkgver=1.4.0-1 +timestamp=2022-08-19T11:20:10+02:00 section=utils maintainer="Sunny " license=MIT installdepends=(node simple) -source=(https://codeberg.org/sun/rmFM/archive/1.3.0.zip) -sha256sums=(6c82bb47842e17203f5104d764ec6dbde75ada63a75d527ea6d17da59b46d7ae) +source=(https://codeberg.org/sun/rmFM/archive/1.4.0.zip) +sha256sums=(28ce80c67fecc370d11f3fe2069742c2789b388a9426fff49d269d7900ae3dc9) package() { install -D -m 755 "$srcdir"/rmfm "$pkgdir"/opt/bin/rmfm From e9becfab6dfbbbc18920099382613d7cba0359f4 Mon Sep 17 00:00:00 2001 From: Linus K Date: Mon, 22 Aug 2022 17:14:43 +0200 Subject: [PATCH 007/178] rmfm: Add path fix as mentioned in #619 (#620) * Add path fix as mentioned in #619 * Fix patch problems and bump version --- package/rmfm/package | 19 ++++++++++++++++--- package/rmfm/path_fix.patch | 9 +++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 package/rmfm/path_fix.patch diff --git a/package/rmfm/package b/package/rmfm/package index a1b6a101f..1a27a2abb 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -5,15 +5,28 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" url="https://codeberg.org/sun/rmFM" -pkgver=1.4.0-1 +pkgver=1.4.0-2 timestamp=2022-08-19T11:20:10+02:00 section=utils maintainer="Sunny " license=MIT installdepends=(node simple) -source=(https://codeberg.org/sun/rmFM/archive/1.4.0.zip) -sha256sums=(28ce80c67fecc370d11f3fe2069742c2789b388a9426fff49d269d7900ae3dc9) +source=( + https://codeberg.org/sun/rmFM/archive/1.4.0.zip + path_fix.patch +) +sha256sums=( + 28ce80c67fecc370d11f3fe2069742c2789b388a9426fff49d269d7900ae3dc9 + SKIP +) + +prepare() { + # Assume node to be in /opt/bin and add that directory + # to the path of the app to allow finding simple + # This is a temporary fix for not working in remux + patch -d "$srcdir" < "$srcdir"/path_fix.patch +} package() { install -D -m 755 "$srcdir"/rmfm "$pkgdir"/opt/bin/rmfm diff --git a/package/rmfm/path_fix.patch b/package/rmfm/path_fix.patch new file mode 100644 index 000000000..a2cf4aef2 --- /dev/null +++ b/package/rmfm/path_fix.patch @@ -0,0 +1,9 @@ +diff --git a/rmfm b/rmfm +index 4571db9..172eedf 100755 +--- a/rmfm ++++ b/rmfm +@@ -1,2 +1,3 @@ +-#!/usr/bin/env node ++#!/opt/bin/node ++process.env.PATH += ":/opt/bin" + From fd21a52bfa621d7f550878ec386abd899150cff2 Mon Sep 17 00:00:00 2001 From: EntrixIII <28945706+EntrixIII@users.noreply.github.com> Date: Mon, 29 Aug 2022 01:24:06 +0200 Subject: [PATCH 008/178] display: Update to v0.0.21 (support for 2.14.3.958) (#621) --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index f5d7b307e..a9eb7be51 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2022-06-22T13:16:48Z +timestamp=2022-08-22T09:40:15Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.20-1 +pkgver=1:0.0.21-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - 02acb6c77e4b9b973151ba6eb4e6093a0f7733d9aeca513ecbc36f6008acda89 + 815cf46e282257077b791a795cd8e2395fb18af5f3ba58ed911d526168002ea0 SKIP SKIP SKIP From 3178b3e8cec3611b2beb49aae1a47e10e1203cfa Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 31 Aug 2022 14:01:50 -0600 Subject: [PATCH 009/178] Update KOReader to v2022.08 (#622) --- package/koreader/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index b74221ff5..593f42015 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=2022.07-1 +pkgver=2022.08-1 timestamp=2022-07-31T13:31:10Z section="readers" maintainer="raisjn " @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 3703ed2d6f207def0c7f41a4056ff57707f7b72c3dba2119fb384bf771bc1e3b + 57abc32b2af8c5d7765cf24fba8127a3dba9272d44d8abdc38311d8888d62ef6 SKIP SKIP SKIP From cc7aa8e78bf1bd5ee1e8bb38d23d4e2378819b13 Mon Sep 17 00:00:00 2001 From: Fidan Fidanoski Date: Sun, 11 Sep 2022 19:47:09 +0200 Subject: [PATCH 010/178] display: Update to v0.0.23 (support for 2.14.3.1005) (#628) * display: Update to v0.0.23 (support for 2.14.3.1005) --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index a9eb7be51..e32ed6237 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2022-08-22T09:40:15Z +timestamp=2022-09-10T09:40:15Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.21-1 +pkgver=1:0.0.23-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - 815cf46e282257077b791a795cd8e2395fb18af5f3ba58ed911d526168002ea0 + f29fc4c1683a4833059291ccc1a8b472be1e4cdbdd4f1f3f39317b9e994e840c SKIP SKIP SKIP From 38262328835a1181a6fead651c813847fa9acea1 Mon Sep 17 00:00:00 2001 From: Tom Parker-Shemilt Date: Mon, 26 Sep 2022 15:51:38 +0100 Subject: [PATCH 011/178] Bump ddvk to 36 (#627) Co-authored-by: Nathaniel van Diepen --- package/ddvk-hacks/package | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index 61c8c76ea..065ddb960 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -6,15 +6,15 @@ archs=(rm1 rm2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=35.01-1 -timestamp=2022-07-09T00:05:57+0200 +pkgver=36.01-1 +timestamp=2022-09-07T00:05:57+0200 section="readers" maintainer="Mattéo Delabre " license=MIT flags=(nostrip) -source=(https://github.com/ddvk/remarkable-hacks/archive/5e5aabf1dfe02b802a3ce8ce1046bd05fe29ffd2.zip) -sha256sums=(cb47f0291f8712a8df563bb6a5793fd2b699074fe055d56c40efe987eb5f7571) +source=(https://github.com/ddvk/remarkable-hacks/archive/c3ec0b6aa480baaaaf63460c99796f952265bf19.zip) +sha256sums=(7ce383e5be058fa7bd90ec069211a74c737c36ef61a1c767bff9a352963d94a0) _patches_dir="/opt/share/ddvk-hacks" _xochitl_path="/usr/bin/xochitl" @@ -39,6 +39,7 @@ package() { 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 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 @@ -57,6 +58,7 @@ package() { 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 fi } @@ -70,6 +72,11 @@ configure() { if [[ $arch = rm1 ]]; then device="reMarkable 1" case "$build_date" in + "20220825122914") + patch_version="36.1.01" + original_hash="a88faec812ae20960bfbab38be0aa49aafec902a" + xochitl_version="2.14.3.977" + ;; "20220617142418") patch_version="35.1.01" original_hash="d172016ac8a97ca5df3c551648e0b3314f17f72a" @@ -151,6 +158,11 @@ configure() { elif [[ $arch = rm2 ]]; then device="reMarkable 2" case "$build_date" in + "20220825124750") + patch_version="36.2.01" + original_hash="470e88f8d5fb62f64939fe4ea3b89c515113f7e5" + xochitl_version="2.14.3.977" + ;; "20220617143306") patch_version="35.2.01" original_hash="1d7f6f049e5a6b192caaf07cbf67ba7c2555e5f0" From 3c85a6697d92c97145431b3244e6335d1d88acc3 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Mon, 26 Sep 2022 18:28:18 +0200 Subject: [PATCH 012/178] Stracciatella kernel (#582) * Stracciatella kernel * Update package/linux-stracciatella/package Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Update package/linux-stracciatella/package Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Updated sources to latest available and made package similar to linux-mainline * Remove parent directories * remove empty line * Fix shfmt's complaint * Support oly version after 2.9 Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> Co-authored-by: Nathaniel van Diepen --- package/linux-stracciatella/package | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/linux-stracciatella/package diff --git a/package/linux-stracciatella/package b/package/linux-stracciatella/package new file mode 100644 index 000000000..82a69a662 --- /dev/null +++ b/package/linux-stracciatella/package @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 The Toltec Contributors +# SPDX-License-Identifier: MIT + +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-1 +timestamp=2022-06-26T23:50:04+02:00 +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) +license=GPL-2.0-only +flags=(nostrip) +installdepends=(kernelctl) +image=base:v2.3 +source=(https://github.com/Etn40ff/linux-remarkable/archive/c6aa07709109f9b5879628396052f60a97ec9197.tar.gz) +sha256sums=(529fe57ddc25bbaed5f0b3a9f7f79b51ab9ea3388d2acf8a933a8a4c77bd93c0) + +build() { + if [[ $arch = rm1 ]]; then + ARCH=arm make zero-gravitas_defconfig + elif [[ $arch = rm2 ]]; then + ARCH=arm make zero-sugar_defconfig + fi + ARCH=arm make -j8 +} + +package() { + # Prepare files for the kernel archive + local staging="$srcdir"/staging + mkdir -p "$staging/boot" + + cp --no-dereference {"$srcdir"/arch/arm,"$staging"}/boot/zImage + if [[ $arch = rm1 ]]; then + cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-gravitas.dtb "$staging"/boot/zero-gravitas.dtb + elif [[ $arch = rm2 ]]; then + cp --no-dereference "$srcdir"/arch/arm/boot/dts/zero-sugar.dtb "$staging"/boot/zero-sugar.dtb + fi + + ARCH=arm make -C "$srcdir" modules_install INSTALL_MOD_PATH="$staging" + rm "$staging"/lib/modules/*/{source,build} + + # Create the kernel archive + local archive="stracciatella-${pkgver%-*}.tar.bz2" + install -d "$pkgdir"/opt/usr/share/kernelctl + (cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \ + -cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*) +} + +configure() { + if [[ $(< /etc/version) -le 20210709090000 ]]; then + echo "WARNING: Your system is too old; this kernel will most likely not work unless you add the appropriate firmware blobs to /lib/firmware." + echo "Please consider updating your system instead." + fi + echo "The new kernel files have been copied, but not installed." + echo "Please use kernelctl to select the kernel to boot." +} From 3daf83976184bd98ba53183d4c8b79f39397824c Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Mon, 26 Sep 2022 18:57:04 +0200 Subject: [PATCH 013/178] Kernelctl (#569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Frst draft of kernelctl * Close to be reviewed * Refactor backup and squash some bugs * Blank spaces * help * Fix backup * Sync for safety * Shfmt * lint * more formatting * change string termination to null * empty space * remove newlines from mapfile * Safer rm * Tweak rm * rm file and dir * working (?) rm * Implement icecream flavours * Update package/kernelctl/kernelctl Oops Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Test properly for numerical values and remove bashisms * Use hardlinks as a possibly safer way of handling out-of-space issues and accidental kernel removals * Update package/kernelctl/kernelctl Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Update package/kernelctl/kernelctl Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Update package/kernelctl/kernelctl * Update package/kernelctl/kernelctl Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> * Update kernelctl In case of failure, remind users not to powercylce. Co-authored-by: Nathaniel van Diepen Co-authored-by: gbyl <71516803+gbyl@users.noreply.github.com> Co-authored-by: Mattéo Delabre <1370040+matteodelabre@users.noreply.github.com> --- .../force_reinstall_on_toltecctl_reenable | 0 package/kernelctl/kernelctl | 220 ++++++++++++++++++ package/kernelctl/package | 31 +++ 3 files changed, 251 insertions(+) create mode 100644 package/kernelctl/force_reinstall_on_toltecctl_reenable create mode 100644 package/kernelctl/kernelctl create mode 100644 package/kernelctl/package diff --git a/package/kernelctl/force_reinstall_on_toltecctl_reenable b/package/kernelctl/force_reinstall_on_toltecctl_reenable new file mode 100644 index 000000000..e69de29bb diff --git a/package/kernelctl/kernelctl b/package/kernelctl/kernelctl new file mode 100644 index 000000000..2f4f3adae --- /dev/null +++ b/package/kernelctl/kernelctl @@ -0,0 +1,220 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 The Toltec Contributors +# SPDX-License-Identifier: MIT + +# kernel staging dir +kernelctl_dir=/opt/usr/share/kernelctl + +# Formatting +bf="\033[1m" # bold +sf="\033[0m" # standard +gr="\033[1;32m" # green +bl="\033[1;34m" # blue + +# change our working directory to / to ease filesystem operations +cd / + +help() { + read -r -d '' msg <<- EOM + Usage: $(basename "$0") COMMAND + Manage your booting kernel. + + ${gr}Available commands:${sf} + ${bf} backup ${sf}Backup current kernel and name it . This is guaranteed to work only with vanilla (i.e. upstream) kernels. + ${bf} help ${sf}Show this help message. + ${bf} list ${sf}List available kernels. + ${bf} show ${sf}Show the current configured kernel. + ${bf} delete ${sf}Delete kernel from the staging dir. WARNING this is irreversible. + ${bf} set ${sf}Change booting kernel. + + ${bf} ${sf}Kernel name or number (from 'list' command) or "default" to revert to the upstram kernel. + EOM + echo -e "$msg" +} + +# backup current kernel +backup() { + if [[ "$1" = "vanilla" ]]; then + kernel_name="vanilla-$(< /etc/version)" + else + kernel_name=$1 + fi + + kernel_file="$kernelctl_dir"/"$kernel_name".tar.bz2 + + if [[ -e "$kernel_file" ]]; then + read -r -d "" msg <<- EOM + It looks like there is already copy of $kernel_name in the staging area. + If you really want to back it up again please run + + $(basename "$0") delete $kernel_name + $(basename "$0") backup $kernel_name + EOM + echo -e "$msg" + exit 1 + else + tar cpjf "$kernel_file" lib/modules/* boot/zImage* boot/*.dtb + rm -f "$kernelctl_dir"/current.tar.bz2 + ln "$kernel_file" "$kernelctl_dir"/current.tar.bz2 + fi +} + +# get available kernels +get_kernel_names() { + mapfile -t kernel_names < <(find "$kernelctl_dir" -path "*.tar.bz2" ! -name current.tar.bz2 -print0 | xargs -0 -I"{}" basename {} .tar.bz2) +} + +# get current kernel +get_current_kernel_name() { + current_kernel_name=$(find "$kernelctl_dir" -samefile "$kernelctl_dir"/current.tar.bz2 ! -name current.tar.bz2 -print0 | xargs -0 -I"{}" basename {} .tar.bz2) +} + +# translate input into a kernel name +to_kernel_name() { + local ker + get_kernel_names + if [[ "$1" =~ ^[0-9]+$ ]] && ((0 < $1 && $1 <= ${#kernel_names[@]})); then + echo "${kernel_names[$(($1 - 1))]}" + return + elif [[ "$1" = "default" ]]; then + ker="vanilla-$(< /etc/version)" + else + ker="$1" + fi + if [[ $(echo "${kernel_names[@]}" | grep -ow "$ker" | wc -w) -gt 0 ]]; then + echo "$ker" + else + echo "Can't find $ker in the staging area." + exit 1 + fi +} + +# list available kernels +list() { + get_kernel_names + get_current_kernel_name + echo -e "${gr}Available kernels:${sf}" + for i in "${!kernel_names[@]}"; do + if [[ "$current_kernel_name" = "${kernel_names[$i]}" ]]; then cur=" ${bl}*${sf}"; else cur=""; fi + echo -e " ${bf}[$((i + 1))]${sf}\t${kernel_names[$i]}$cur" + done +} + +# show the current configured kernel +show() { + get_current_kernel_name + echo -e "${gr}Current kernel:${sf}" + echo -e " ${bf}${current_kernel_name}${sf}" +} + +# actually switch kernels +switch() { + tar tjf "$1" | sort -r | xargs -r -I {} bash -c 'if [[ -d "{}" ]]; then rmdir "{}"; else rm "{}"; fi' + tar xpjf "$2" +} + +# change the kernel that will boot next time +set() { + new_kernel_name=$(to_kernel_name "$1") + new_kernel_file="${kernelctl_dir}/${new_kernel_name}.tar.bz2" + current_kernel_file="${kernelctl_dir}/current.tar.bz2" + if [[ ! -e "$current_kernel_file" ]]; then + read -r -d '' msg <<- EOM + ${bf}There is no link to the current running kernel in the staging + area, you might have accidentally deleted it!${sf} + Try making a backup first. + EOM + echo -e "$msg" + exit 1 + fi + if switch "$current_kernel_file" "$new_kernel_file"; then + rm -f "$current_kernel_file" + ln "$new_kernel_file" "$current_kernel_file" + /bin/sync + echo "Reboot system to use your newly installed kernel." + else + read -r -d '' msg <<- EOM + ${bf}WARNING: failed to extract the new kernel!${sf} + This may be due to a lack of space in the root partition. + Attempting to revert to the current running kernel. + EOM + echo -e "$msg" + if switch "$new_kernel_file" "$current_kernel_file"; then + /bin/sync + read -r -d '' msg <<- EOM + Successfully reverted to the current running kernel. + Please check that everything is in order before rebooting. + EOM + echo -e "$msg" + else + read -r -d '' msg <<- EOM + Unable to revert to a working configuration. + If you do not know how to proceed, please do not reboot your device, + do not let the battery die, and seek assistance + in the reMarkable's community Discord server: https://discord.gg/ATqQGfu + EOM + echo -e "$msg" + exit 1 + fi + fi +} + +# delete kernel from staging dir +delete() { + kernel_name=$(to_kernel_name "$1") + echo "Deleting $kernel_name from the staging area is irreversible." + echo "If the kernel was installed as a toltec package this may confuse the package manager" + echo -n "Do you want to proceed? [N/y]: " + read -r ans + if [[ "$ans" = "y" || "$ans" = "Y" ]]; then + rm "${kernelctl_dir}/${kernel_name}.tar.bz2" + fi +} + +if [[ $0 = "${BASH_SOURCE[0]}" ]]; then + if [[ $# -eq 0 ]]; then + help + exit 1 + fi + + action="$1" + shift + + case $action in + help | -h | --help) + help + ;; + list) + list + ;; + show) + show + ;; + backup) + if [[ $# -ne 1 ]]; then + help + exit 1 + fi + backup "$1" + ;; + set) + if [[ $# -ne 1 ]]; then + help + exit 1 + fi + set "$1" + ;; + delete) + if [[ $# -ne 1 ]]; then + help + exit 1 + fi + delete "$1" + ;; + *) + echo -e "Error: Invalid command '$action'\n" + help + exit 1 + ;; + esac +fi diff --git a/package/kernelctl/package b/package/kernelctl/package new file mode 100644 index 000000000..58d7a5b2e --- /dev/null +++ b/package/kernelctl/package @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(kernelctl) +pkgdesc="Manage aftermarket kernels" +url=https://toltec-dev.org/ +pkgver=0.1-1 +timestamp=2022-03-14T00:00Z +section="utils" +maintainer="Salvatore Stella " +license=MIT + +source=( + kernelctl + force_reinstall_on_toltecctl_reenable +) +sha256sums=( + SKIP + SKIP +) + +package() { + 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/kernelctl/ "$srcdir"/force_reinstall_on_toltecctl_reenable +} + +configure() { + kernelctl backup vanilla +} From d226b06f578af7fb906ec56a718dce6d82c6f4b1 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 27 Sep 2022 07:54:36 +1000 Subject: [PATCH 014/178] package/linux-mainline: Bump to 5.19 (#610) * package/linux-mainline: Bump to 5.19 Signed-off-by: Alistair Francis * package/linux-mainline: Change the packaging commands Signed-off-by: Alistair Francis * Update package * Remove post-remove Signed-off-by: Alistair Francis Co-authored-by: Nathaniel van Diepen --- package/linux-mainline/package | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 7ab57a29f..7d0c06935 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -6,7 +6,7 @@ archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=5.18.0-1 +pkgver=5.19.0-1 timestamp=2022-05-22T21:50:09Z section=kernel maintainer="Alistair Francis " @@ -15,8 +15,8 @@ license=GPL-2.0-only flags=(nostrip) image=base:v2.3 -source=("https://github.com/alistair23/linux/archive/f9fe680995e01398f0813077711fe1b744251c5b.tar.gz") -sha256sums=(d38c883a31f5f87483377e78b4b3a2eb1ce73ada38fc25949e692dd0b2dd7895) +source=("https://github.com/alistair23/linux/archive/6df274810d20448125834115e2181de288fdc8a4.tar.gz") +sha256sums=(a7538198dbef21868d2c52e8b379576c8791726809bd5886176ab88d1f9df49f) build() { ARCH=arm make imx_v6_v7_defconfig @@ -38,19 +38,13 @@ package() { # Create the kernel archive local archive="mainline-${pkgver%-*}.tar.bz2" install -d "$pkgdir"/opt/usr/share/kernelctl - tar --owner root:0 --group root:0 --mtime=$timestamp \ - -cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" -C "$staging" . + (cd "$staging" && tar --owner root:0 --group root:0 --mtime=$timestamp \ + -cjf "$pkgdir"/opt/usr/share/kernelctl/"$archive" boot/* lib/modules/*) } configure() { echo "The new kernel files have been copied, but not installed." - echo "Before installing them, make a backup of the existing kernel:" - echo " mkdir -p /home/root/boot-backup" - echo " cp -rvf /boot/* /home/root/boot-backup/" - echo - echo "Then replace it with the new kernel and reboot:" - echo " tar -xvf /opt/usr/share/kernelctl/mainline-${pkgver%-*}.tar.bz2 -C /" - echo " /bin/sync" + echo "Please use kernelctl to select the kernel to boot." echo echo "Known issues with the mainline kernel:" echo " - No support for low power mode (suspend uses more power then it should)" @@ -59,11 +53,3 @@ configure() { echo " - Wacom stylus doesn't work in Xochitl (works everywhere else though)" echo " - No OTG control support" } - -postremove() { - echo "To restore to the original kernel, run and then reboot" - echo " rm -rf /lib/modules/${pkgver%-*}/" - echo " cp -f /home/root/boot-backup/zImage /boot/" - echo " cp -f /home/root/boot-backup/zero-sugar.dtb /boot/" - echo " /bin/sync" -} From 8c5a93958010c89b901e80f206158e8a948cb0c9 Mon Sep 17 00:00:00 2001 From: Caleb Anderson Date: Thu, 29 Sep 2022 09:17:20 -0600 Subject: [PATCH 015/178] Package: noso_template (#573) * add package for noso_template --- package/template-noso-grid/package | 72 ++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 package/template-noso-grid/package diff --git a/package/template-noso-grid/package b/package/template-noso-grid/package new file mode 100644 index 000000000..4ee1fc731 --- /dev/null +++ b/package/template-noso-grid/package @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# Copyright (c) 2022 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(template-noso-grid) +pkgdesc="Nosometric grid template" +url=https://github.com/RobotCaleb/noso_template +pkgver=1.0.0 +timestamp=2022-03-20T18:34Z +section="templates" +maintainer="Caleb Anderson " +license=MIT +installdepends=(templatectl) + +source=("https://github.com/RobotCaleb/noso_template/archive/refs/tags/v${pkgver%-*}.zip") +sha256sums=(cd7cfcb0c2e9b9734a5e79c00182a4d27858e2c6e2501da54f4d58569171a734) + +package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-high/noso-cube-high.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-high/noso-cube-high.svg + + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-low/noso-cube-low.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-low/noso-cube-low.svg + + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-mid/noso-cube-mid.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/cube-mid/noso-cube-mid.svg + + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-high/noso-tall-high.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-high/noso-tall-high.svg + + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-low/noso-tall-low.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-low/noso-tall-low.svg + + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-mid/noso-tall-mid.png + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/tall-mid/noso-tall-mid.svg +} + +configure() { + templatectl add -n "Noso Cube Low Density" -f "noso-cube-low.png" \ + -c "Custom" -c "Grids" + templatectl add -n "Noso Cube Mid Density" -f "noso-cube-mid.png" \ + -c "Custom" -c "Grids" + templatectl add -n "Noso Cube High Density" -f "noso-cube-high.png" \ + -c "Custom" -c "Grids" + templatectl add -n "Noso Tall Low Density" -f "noso-tall-low.png" \ + -c "Custom" -c "Grids" + templatectl add -n "Noso Tall Mid Density" -f "noso-tall-mid.png" \ + -c "Custom" -c "Grids" + templatectl add -n "Noso Tall High Density" -f "noso-tall-high.png" \ + -c "Custom" -c "Grids" +} + +preremove() { + templatectl remove --name "Noso Cube Low Density" + templatectl remove --name "Noso Cube Mid Density" + templatectl remove --name "Noso Cube High Density" + templatectl remove --name "Noso Tall Low Density" + templatectl remove --name "Noso Tall Mid Density" + templatectl remove --name "Noso Tall High Density" +} From ededc8f0d418a28d3394095ce8917b71dbeab0da Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Sat, 1 Oct 2022 20:01:33 +0200 Subject: [PATCH 016/178] Make a backup at install time only if it is not there yet (#632) * Make a backup at install time only if it is not there yet Co-authored-by: Nathaniel van Diepen --- package/kernelctl/package | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/package/kernelctl/package b/package/kernelctl/package index 58d7a5b2e..c65b3bb9c 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-1 +pkgver=0.1-2 timestamp=2022-03-14T00:00Z section="utils" maintainer="Salvatore Stella " @@ -27,5 +27,15 @@ package() { } configure() { - kernelctl backup vanilla + if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then + read -r -d '' msg <<- EOM + It looks like there is no backup of the upstream kernel for the + installed version of codex. + + Please standby while one is produced (assuming that the + currently running kernel is upstream). + EOM + echo -e "$msg" + kernelctl backup vanilla + fi } From ca10a6a77bddd51282c6b7e54a30d309fbe73dc6 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Sat, 1 Oct 2022 20:40:14 +0200 Subject: [PATCH 017/178] linux-stracciatella: merge latest changes to upstream (#630) * Merge latest changes to upstream 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 82a69a662..74111f4a7 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-1 -timestamp=2022-06-26T23:50:04+02:00 +pkgver=5.4.70-2 +timestamp=2022-09-26T21:23:39Z 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) @@ -15,8 +15,8 @@ license=GPL-2.0-only flags=(nostrip) installdepends=(kernelctl) image=base:v2.3 -source=(https://github.com/Etn40ff/linux-remarkable/archive/c6aa07709109f9b5879628396052f60a97ec9197.tar.gz) -sha256sums=(529fe57ddc25bbaed5f0b3a9f7f79b51ab9ea3388d2acf8a933a8a4c77bd93c0) +source=(https://github.com/Etn40ff/linux-remarkable/archive/41121ea10ed2235c441cfe717461988859d7f5b6.tar.gz) +sha256sums=(ade87a10bfa7069222cbf8eb1d00ca460d38aab9685223d2fa3ee4f363a75cfa) build() { if [[ $arch = rm1 ]]; then From b097fd256b6159e56e1d4eb37a30da40cd08ffbd Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 2 Oct 2022 11:31:04 -0600 Subject: [PATCH 018/178] Update ddvk-hacks to 37.01 (#633) * Update ddvk-hacks to 37.01 * Fix rM1 2.14.1.866 hash --- package/ddvk-hacks/package | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index 065ddb960..e3e41a407 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -6,15 +6,15 @@ archs=(rm1 rm2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=36.01-1 -timestamp=2022-09-07T00:05:57+0200 +pkgver=37.01-1 +timestamp=2022-09-28T20:38:22Z section="readers" maintainer="Mattéo Delabre " license=MIT flags=(nostrip) -source=(https://github.com/ddvk/remarkable-hacks/archive/c3ec0b6aa480baaaaf63460c99796f952265bf19.zip) -sha256sums=(7ce383e5be058fa7bd90ec069211a74c737c36ef61a1c767bff9a352963d94a0) +source=(https://github.com/ddvk/remarkable-hacks/archive/9ff935ef09efe4bdb9f9371b84bef21ef1b766e2.zip) +sha256sums=(55818b14839301aa3f8da5ba70ef9de3f92bcab8ea9f72b9c6ab20d27e6b5655) _patches_dir="/opt/share/ddvk-hacks" _xochitl_path="/usr/bin/xochitl" @@ -40,6 +40,7 @@ package() { 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 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 @@ -59,6 +60,7 @@ package() { 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 fi } @@ -72,6 +74,11 @@ configure() { if [[ $arch = rm1 ]]; then device="reMarkable 1" case "$build_date" in + "20220921102803") + patch_version="37.1.01" + original_hash="011742f027b70f37a0da293132daafcfc82b537d" + xochitl_version="2.14.3.1047" + ;; "20220825122914") patch_version="36.1.01" original_hash="a88faec812ae20960bfbab38be0aa49aafec902a" @@ -79,7 +86,7 @@ configure() { ;; "20220617142418") patch_version="35.1.01" - original_hash="d172016ac8a97ca5df3c551648e0b3314f17f72a" + original_hash="a052dfbe587851d17146e586e4be65819f1360e3" xochitl_version="2.14.1.866" ;; "20220615075543") @@ -158,6 +165,11 @@ configure() { elif [[ $arch = rm2 ]]; then device="reMarkable 2" case "$build_date" in + "20220921101206") + patch_version="37.2.01" + original_hash="47c3ad26651f604be5de901881a8a44f9124a79c" + xochitl_version="2.14.3.1047" + ;; "20220825124750") patch_version="36.2.01" original_hash="470e88f8d5fb62f64939fe4ea3b89c515113f7e5" From b0a9a7cf10a1dba6f1f0009da97d5c9b154be851 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 18 Oct 2022 07:59:34 -0600 Subject: [PATCH 019/178] Update display and rm2fb-client to v0.0.26 (#634) * Update display and rm2fb-client to v0.0.24 * Update display/rm2fb-client to v0.0.25 * Update to v0.0.26 --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index e32ed6237..75d1d71e6 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2022-09-10T09:40:15Z +timestamp=2022-09-17T16:14:01Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.23-1 +pkgver=1:0.0.26-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - f29fc4c1683a4833059291ccc1a8b472be1e4cdbdd4f1f3f39317b9e994e840c + dbed22e7e5b8e9f64d64d37301ed53e99ed8369236468bec1bdd03050f2737b2 SKIP SKIP SKIP From ecd836d2f2ba26d126c85f08b3c958ab4acb0a72 Mon Sep 17 00:00:00 2001 From: Nick Hu Date: Mon, 7 Nov 2022 19:59:31 +0000 Subject: [PATCH 020/178] Update ddvk-hacks to 38.03 (#640) * Update ddvk-hacks to 38.03 Co-authored-by: Nathaniel van Diepen --- package/ddvk-hacks/package | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index e3e41a407..59c50af62 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -6,15 +6,15 @@ archs=(rm1 rm2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=37.01-1 -timestamp=2022-09-28T20:38:22Z +pkgver=38.03-1 +timestamp=2022-10-18T16:35:20Z section="readers" maintainer="Mattéo Delabre " license=MIT flags=(nostrip) -source=(https://github.com/ddvk/remarkable-hacks/archive/9ff935ef09efe4bdb9f9371b84bef21ef1b766e2.zip) -sha256sums=(55818b14839301aa3f8da5ba70ef9de3f92bcab8ea9f72b9c6ab20d27e6b5655) +source=(https://github.com/ddvk/remarkable-hacks/archive/49a6117b2a9ae3d5116069670702e7aa28ed1584.zip) +sha256sums=(099d65801eda0e38a7f65a40659d32d1b37239deb2a3c4a896e37a7ed0b4f0a4) _patches_dir="/opt/share/ddvk-hacks" _xochitl_path="/usr/bin/xochitl" @@ -41,6 +41,7 @@ package() { 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 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 @@ -61,6 +62,7 @@ package() { 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 fi } @@ -74,6 +76,11 @@ configure() { if [[ $arch = rm1 ]]; then device="reMarkable 1" case "$build_date" in + "20221003074737") + patch_version="38.1.03" + original_hash="a3ce408c8a717d48746e361336532924f5ff40f2" + xochitl_version="2.15.0.1067" + ;; "20220921102803") patch_version="37.1.01" original_hash="011742f027b70f37a0da293132daafcfc82b537d" @@ -165,6 +172,11 @@ configure() { elif [[ $arch = rm2 ]]; then device="reMarkable 2" case "$build_date" in + "20221003075633") + patch_version="38.2.03" + original_hash="fcd3c84215c5457d455419831760304736f3b694" + xochitl_version="2.15.0.1067" + ;; "20220921101206") patch_version="37.2.01" original_hash="47c3ad26651f604be5de901881a8a44f9124a79c" From adac8c1f28b88eee7d0f051f2543df3b04850767 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 7 Nov 2022 15:23:33 -0700 Subject: [PATCH 021/178] Update display and rm2fb-client to v0.0.27 (#643) * Update display and rm2fb-client to v0.0.27 Added support for 2.15.1.1189 --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index 75d1d71e6..5dce07f1b 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2022-09-17T16:14:01Z +timestamp=2022-10-28T15:36:16Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.26-1 +pkgver=1:0.0.27-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - dbed22e7e5b8e9f64d64d37301ed53e99ed8369236468bec1bdd03050f2737b2 + f4bf553f2bc868a04452f67881d7a1053f791da7d29fecbb2c5fc4075facf282 SKIP SKIP SKIP From dc3fe60af17b48477b7c037984d436d1c930b038 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Mon, 7 Nov 2022 23:33:33 +0100 Subject: [PATCH 022/178] kernelctl: add prune (#636) * kernelctl: add prune Co-authored-by: Nathaniel van Diepen --- package/kernelctl/kernelctl | 16 ++++++++++++++++ package/kernelctl/package | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package/kernelctl/kernelctl b/package/kernelctl/kernelctl index 2f4f3adae..68de473ab 100644 --- a/package/kernelctl/kernelctl +++ b/package/kernelctl/kernelctl @@ -25,6 +25,7 @@ help() { ${bf} list ${sf}List available kernels. ${bf} show ${sf}Show the current configured kernel. ${bf} delete ${sf}Delete kernel from the staging dir. WARNING this is irreversible. + ${bf} prune ${sf}Delete all backups of vanilla kernels older than the one that shipped with the current software version. WARNING this is irreversible. ${bf} set ${sf}Change booting kernel. ${bf} ${sf}Kernel name or number (from 'list' command) or "default" to revert to the upstram kernel. @@ -171,6 +172,18 @@ delete() { fi } +prune() { + echo "Deleting backups of old vanilla kernel(s) from the staging area is irreversible." + echo -n "Do you want to proceed? [N/y]: " + read -r ans + if [[ "$ans" = "y" || "$ans" = "Y" ]]; then + mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$(< /etc/version)".tar.bz2) + for filename in "${filenames[@]}"; do + rm "$filename" + done + fi +} + if [[ $0 = "${BASH_SOURCE[0]}" ]]; then if [[ $# -eq 0 ]]; then help @@ -211,6 +224,9 @@ if [[ $0 = "${BASH_SOURCE[0]}" ]]; then fi delete "$1" ;; + prune) + prune + ;; *) echo -e "Error: Invalid command '$action'\n" help diff --git a/package/kernelctl/package b/package/kernelctl/package index c65b3bb9c..d1bcd3226 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-2 +pkgver=0.1-3 timestamp=2022-03-14T00:00Z section="utils" maintainer="Salvatore Stella " From bbef39bf61148575245dce774b8aa51f291420cf Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 8 Nov 2022 09:33:07 +1000 Subject: [PATCH 023/178] package/linux-mainline: Bump to 6.0 (#637) Signed-off-by: Alistair Francis Co-authored-by: Nathaniel van Diepen --- package/linux-mainline/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 7d0c06935..fe964dfc6 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -6,7 +6,7 @@ archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=5.19.0-1 +pkgver=6.0.0-1 timestamp=2022-05-22T21:50:09Z section=kernel maintainer="Alistair Francis " @@ -15,8 +15,8 @@ license=GPL-2.0-only flags=(nostrip) image=base:v2.3 -source=("https://github.com/alistair23/linux/archive/6df274810d20448125834115e2181de288fdc8a4.tar.gz") -sha256sums=(a7538198dbef21868d2c52e8b379576c8791726809bd5886176ab88d1f9df49f) +source=("https://github.com/alistair23/linux/archive/4c2ef4e3bba89a8d767eccb85a242b2cd8850146.tar.gz") +sha256sums=(1583d553380a656ecaac8dab89558051e9165983381adc9c3d52fb8ac0ce19fd) build() { ARCH=arm make imx_v6_v7_defconfig From a86239263fe2d427313d50d2352a580b383bfb30 Mon Sep 17 00:00:00 2001 From: Nick Hu Date: Thu, 10 Nov 2022 23:41:06 +0000 Subject: [PATCH 024/178] Update ddvk-hacks to 39.01 (#645) --- package/ddvk-hacks/package | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/package/ddvk-hacks/package b/package/ddvk-hacks/package index 59c50af62..03fefb82f 100644 --- a/package/ddvk-hacks/package +++ b/package/ddvk-hacks/package @@ -6,15 +6,15 @@ archs=(rm1 rm2) pkgnames=(ddvk-hacks) pkgdesc="Enhance Xochitl with additional features" url=https://github.com/ddvk/remarkable-hacks -pkgver=38.03-1 -timestamp=2022-10-18T16:35:20Z +pkgver=39.01-1 +timestamp=2022-11-09T18:31:51Z section="readers" maintainer="Mattéo Delabre " license=MIT flags=(nostrip) -source=(https://github.com/ddvk/remarkable-hacks/archive/49a6117b2a9ae3d5116069670702e7aa28ed1584.zip) -sha256sums=(099d65801eda0e38a7f65a40659d32d1b37239deb2a3c4a896e37a7ed0b4f0a4) +source=(https://github.com/ddvk/remarkable-hacks/archive/90e7e3e7ffc269373de191085453be50c9f8da0c.zip) +sha256sums=(d3b1413bb9219804581afab598e7f5308233e7467d64e8084e67aae7346beaba) _patches_dir="/opt/share/ddvk-hacks" _xochitl_path="/usr/bin/xochitl" @@ -42,6 +42,7 @@ package() { 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 @@ -63,6 +64,7 @@ package() { 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 fi } @@ -76,6 +78,11 @@ configure() { if [[ $arch = rm1 ]]; then device="reMarkable 1" case "$build_date" in + "20221026103859") + patch_version="39.1.01" + original_hash="1c01bae469a2e29846c68758e2cae4a2b8b5055d" + xochitl_version="2.15.1.1189" + ;; "20221003074737") patch_version="38.1.03" original_hash="a3ce408c8a717d48746e361336532924f5ff40f2" @@ -172,6 +179,11 @@ configure() { elif [[ $arch = rm2 ]]; then device="reMarkable 2" case "$build_date" in + "20221026104022") + patch_version="39.2.01" + original_hash="64e3cb3d05aec4a40624ebfc730e480358e1b184" + xochitl_version="2.15.1.1189" + ;; "20221003075633") patch_version="38.2.03" original_hash="fcd3c84215c5457d455419831760304736f3b694" From c43344475517ce8f71954d32636ebac2bc2a5a6b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 12 Nov 2022 12:23:37 -0700 Subject: [PATCH 025/178] Disable auto update on reenable/install (#641) - Disable `update-engine.service` on install/reenable - Decouple `sync.service` and `xochitl.service` as this means that either sync doesn't work, or xochitl starts when it is disabled. - Accomplished by adding a `manual-sync.service` and masking `sync.service` - `/opt/bin/xochitl` will also run `sync --service` in the background manually if running from a chroot and there is no sync service running - Add `kill-xochitl` command as oxide stop events do not allow arguments --- .../force_reinstall_on_toltecctl_reenable | 0 package/kernelctl/package | 7 +++-- package/oxide/package | 14 +++++++--- package/oxide/toltec-override.conf | 6 +++++ package/toltec-base/package | 16 ++++++++--- package/xochitl/kill-xochitl | 5 ++++ package/xochitl/manual-sync.service | 21 +++++++++++++++ package/xochitl/package | 27 +++++++++++++++++-- package/xochitl/xochitl | 9 +++++++ package/xochitl/xochitl.oxide | 9 +++++-- 10 files changed, 100 insertions(+), 14 deletions(-) delete mode 100644 package/kernelctl/force_reinstall_on_toltecctl_reenable create mode 100644 package/oxide/toltec-override.conf create mode 100644 package/xochitl/kill-xochitl create mode 100644 package/xochitl/manual-sync.service diff --git a/package/kernelctl/force_reinstall_on_toltecctl_reenable b/package/kernelctl/force_reinstall_on_toltecctl_reenable deleted file mode 100644 index e69de29bb..000000000 diff --git a/package/kernelctl/package b/package/kernelctl/package index d1bcd3226..41276c8cb 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-3 +pkgver=0.1-4 timestamp=2022-03-14T00:00Z section="utils" maintainer="Salvatore Stella " @@ -13,17 +13,16 @@ license=MIT source=( kernelctl - force_reinstall_on_toltecctl_reenable ) sha256sums=( SKIP - SKIP ) 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/kernelctl/ "$srcdir"/force_reinstall_on_toltecctl_reenable + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/kernelctl "$srcdir"/emptyfile } configure() { diff --git a/package/oxide/package b/package/oxide/package index ba95481fb..6451dd168 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety liboxide libsentry) -pkgver=2.4-1 +pkgver=2.4-2 _sentryver=0.4.17 timestamp=2022-05-22T03:18:32Z maintainer="Eeems " @@ -11,8 +11,14 @@ url=https://oxide.eeems.codes license=MIT flags=(patch_rm2fb) image=qt:v2.3 -source=("https://github.com/Eeems-Org/oxide/archive/e6c62a6860b52cd1cbd47e21377f8d1ecf72bb0a.tar.gz") -sha256sums=(a29cf455d5f66fee4ee67722c6f1d20627930920286398932c3d5c813d58ebee) +source=( + "https://github.com/Eeems-Org/oxide/archive/e6c62a6860b52cd1cbd47e21377f8d1ecf72bb0a.tar.gz" + toltec-override.conf +) +sha256sums=( + a29cf455d5f66fee4ee67722c6f1d20627930920286398932c3d5c813d58ebee + SKIP +) build() { find . -name "*.pro" -type f -print0 \ @@ -84,6 +90,8 @@ tarnish() { 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 + install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d \ + "$srcdir"/toltec-override.conf } configure() { systemctl daemon-reload diff --git a/package/oxide/toltec-override.conf b/package/oxide/toltec-override.conf new file mode 100644 index 000000000..d348b7c63 --- /dev/null +++ b/package/oxide/toltec-override.conf @@ -0,0 +1,6 @@ +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +[Unit] +Conflicts=xochitl.service +Conflicts=sync.service diff --git a/package/toltec-base/package b/package/toltec-base/package index 7392b91de..b7477a07c 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,8 +6,8 @@ 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.0-1 -timestamp=2022-02-28T00:12Z +pkgver=1.1-1 +timestamp=2022-11-07T20:19:57Z section="utils" maintainer="Eeems " license=MIT @@ -19,5 +19,15 @@ source=() sha256sums=() package() { - true + touch "$srcdir"/emptyfile + install -D -m 666 -t "$pkgdir"/usr/share/toltec/reenable.d/toltec-base "$srcdir"/emptyfile +} + +configure() { + if is-enabled "update-engine.service"; then + echo "Disabling automatic update" + systemctl disable --now update-engine + fi + echo "Disabling usb1 network device to avoid long boots" + systemctl mask sys-subsystem-net-devices-usb1.device } diff --git a/package/xochitl/kill-xochitl b/package/xochitl/kill-xochitl new file mode 100644 index 000000000..f3a18c5f2 --- /dev/null +++ b/package/xochitl/kill-xochitl @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +killall xochitl diff --git a/package/xochitl/manual-sync.service b/package/xochitl/manual-sync.service new file mode 100644 index 000000000..359f84849 --- /dev/null +++ b/package/xochitl/manual-sync.service @@ -0,0 +1,21 @@ +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +[Unit] +Description=reMarkable Document Sync without the xochitl.service dependency +After=dbus.socket +StartLimitIntervalSec=60 +StartLimitBurst=4 +Conflicts=sync.service + +[Service] +# Do NOT make this dbus, systemd will kill the service when it should be +# running otherwise. +Type=simple +BusName=no.remarkable.sync +ExecStart=/usr/bin/sync --service +Restart=on-failure +RestartForceExitStatus=SIGHUP SIGINT SIGTERM SIGPIPE + +[Install] +WantedBy=multi-user.target diff --git a/package/xochitl/package b/package/xochitl/package index 6ea840edf..1ebefec09 100644 --- a/package/xochitl/package +++ b/package/xochitl/package @@ -5,8 +5,8 @@ pkgnames=(xochitl) pkgdesc="Read documents and take notes" url=https://remarkable.com -pkgver=0.0.0-13 -timestamp=2022-03-05T23:26Z +pkgver=0.0.0-14 +timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " license=MIT @@ -24,6 +24,7 @@ source=( toltec-after-launcher.conf toltec-wrapper.conf env-readme + manual-sync.service ) sha256sums=( SKIP @@ -33,6 +34,7 @@ sha256sums=( SKIP SKIP SKIP + SKIP ) package() { @@ -56,11 +58,22 @@ package() { "$srcdir"/toltec-after-launcher.conf install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-reboot.service.d \ "$srcdir"/toltec-after-launcher.conf + install -D -m 644 -t "$pkgdir"/etc/systemd/system \ + "$srcdir"/manual-sync.service } configure() { systemctl daemon-reload + # sync.service interferes with launchers + # we use manual-sync.service instead + if [[ "x$(systemctl is-enabled sync.service)" != "xmasked" ]]; then + systemctl mask sync.service + fi + if ! is-active manual-sync.service; then + systemctl enable --now manual-sync.service + fi + if is-enabled xochitl.service && ! is-enabled launcher.service; then # This package changes xochitl.service to alias it to launcher.service # when enabled. If xochitl was previously enabled, force the creation @@ -69,9 +82,19 @@ configure() { fi } +preremove() { + if is-active manual-sync.service; then + systemctl disable --now manual-sync.service + fi +} + postremove() { systemctl daemon-reload + if [[ "x$(systemctl is-enabled sync.service)" == "xmasked" ]]; then + systemctl unmask sync.service 2> /dev/null + fi + if is-enabled xochitl.service && is-enabled launcher.service; then # If xochitl is currently the active launcher, make sure the # launcher.service alias is removed diff --git a/package/xochitl/xochitl b/package/xochitl/xochitl index de6256f0d..a745d8bea 100644 --- a/package/xochitl/xochitl +++ b/package/xochitl/xochitl @@ -9,4 +9,13 @@ for file in /opt/etc/xochitl.env.d/*.env; do source "$file" fi done +# If for some reason, sync.service is no longer masked, re-mask it +# The package install should have handled this, but something may +# have changed it. +if [[ "x$(systemctl is-enabled sync.service)" != "xmasked" ]]; then + systemctl mask sync.service +fi +if ! systemctl is-active --quiet manual-sync.service; then + systemctl enable --now manual-sync.service +fi exec /usr/bin/xochitl "$@" diff --git a/package/xochitl/xochitl.oxide b/package/xochitl/xochitl.oxide index 533828a2d..c4673ad2f 100644 --- a/package/xochitl/xochitl.oxide +++ b/package/xochitl/xochitl.oxide @@ -11,19 +11,24 @@ "/home/root", "/opt/etc", "/run/dbus", + "/run/lock", + "/run/systemd", "/run/systemd/resolve", "/run/udev", "/tmp/runtime-root", "/usr/share", "/usr/share/remarkable/templates", + "/usr/local/share/ca-certificates", "/var/cache/fontconfig", "/var/lib/dbus", + "/var/volatile/tmp" ], "environment": { + "HOME": "/home/root", "QMLSCENE_DEVICE": "epaper", - "QT_QPA_PLATFORM": "epaper", "QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS": "rotate=180", - "HOME": "/home/root", + "QT_QPA_PLATFORM": "epaper", + "SYSTEMD_IGNORE_CHROOT": "true", "XDG_RUNTIME_DIR": "/tmp/runtime-root" } } From a8675e7e9d0d8b6e39698cca70492d0f1ff9efbc Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Sat, 12 Nov 2022 22:25:22 +0100 Subject: [PATCH 026/178] Fix #647 (#648) * Fix #647 * Fix read/echo issue in configure --- package/kernelctl/kernelctl | 14 +++++++++++--- package/kernelctl/package | 13 +++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/package/kernelctl/kernelctl b/package/kernelctl/kernelctl index 68de473ab..ae24716d1 100644 --- a/package/kernelctl/kernelctl +++ b/package/kernelctl/kernelctl @@ -67,7 +67,11 @@ get_kernel_names() { # get current kernel get_current_kernel_name() { - current_kernel_name=$(find "$kernelctl_dir" -samefile "$kernelctl_dir"/current.tar.bz2 ! -name current.tar.bz2 -print0 | xargs -0 -I"{}" basename {} .tar.bz2) + if [[ -e "$kernelctl_dir"/current.tar.bz2 ]]; then + current_kernel_name=$(find "$kernelctl_dir" -samefile "$kernelctl_dir"/current.tar.bz2 ! -name current.tar.bz2 -print0 | xargs -0 -I"{}" basename {} .tar.bz2) + else + current_kernel_name='' + fi } # translate input into a kernel name @@ -104,8 +108,12 @@ list() { # show the current configured kernel show() { get_current_kernel_name - echo -e "${gr}Current kernel:${sf}" - echo -e " ${bf}${current_kernel_name}${sf}" + if [[ "$current_kernel_name" = "" ]]; then + echo -e "${bf}There is no link to the current running kernel in the staging area.${sf}" + else + echo -e "${gr}Current kernel:${sf}" + echo -e " ${bf}${current_kernel_name}${sf}" + fi } # actually switch kernels diff --git a/package/kernelctl/package b/package/kernelctl/package index 41276c8cb..c1f265b1a 100644 --- a/package/kernelctl/package +++ b/package/kernelctl/package @@ -5,8 +5,8 @@ pkgnames=(kernelctl) pkgdesc="Manage aftermarket kernels" url=https://toltec-dev.org/ -pkgver=0.1-4 -timestamp=2022-03-14T00:00Z +pkgver=0.1-5 +timestamp=2022-11-12T00:00Z section="utils" maintainer="Salvatore Stella " license=MIT @@ -27,14 +27,7 @@ package() { configure() { if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then - read -r -d '' msg <<- EOM - It looks like there is no backup of the upstream kernel for the - installed version of codex. - - Please standby while one is produced (assuming that the - currently running kernel is upstream). - EOM - echo -e "$msg" + echo "Creating a backup of the currently running kernel." kernelctl backup vanilla fi } From 68fbf4d441dc1f293b4ac77f25534ee3e9ef0bcf Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 20 Nov 2022 14:06:51 -0700 Subject: [PATCH 027/178] Update all actions to latest (#653) * Update all actions to v3 * Update setup-python to v4 --- .github/actions/setup/action.yml | 8 ++++---- .github/workflows/pr.yml | 10 +++++----- .github/workflows/stable.yml | 4 ++-- .github/workflows/testing.yml | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 66c961ee6..003825831 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -8,7 +8,7 @@ runs: sudo apt-get update -yq echo "aptVersion=libarchive-tools-$(apt-cache policy libarchive-tools | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV - name: Cache Apt packages - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-apt with: path: ~/.aptcache @@ -26,7 +26,7 @@ runs: sudo cp --verbose --force --recursive ~/.aptcache/* / fi - name: Cache shfmt - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /usr/local/bin/shfmt key: 43439b996942b53dfafa9b6ff084f394555d049c98fb7ec37978f7668b43e1be @@ -44,7 +44,7 @@ runs: sudo chmod a+x "$install_dir"/shfmt fi - name: Cache Shellcheck - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /usr/local/bin/shellcheck key: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8 @@ -68,7 +68,7 @@ runs: sudo mv shellcheck "$install_dir" fi - name: Cache Python environment - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache-python with: path: ${{ env.pythonLocation }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c2612f004..49ebeb5c7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.8' - name: Setup Toltec dependencies @@ -24,9 +24,9 @@ jobs: needs: lint steps: - name: Checkout the Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.8' - name: Setup Toltec dependencies @@ -34,7 +34,7 @@ jobs: - name: Build packages run: make repo-new FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' - name: Save the build output - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: repo path: build/repo diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index f610e8588..c53b6edfc 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.8' - name: Setup Toltec dependencies diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d391430ed..8c961e419 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.8' - name: Setup Toltec dependencies From 1496c83f3fa4a9bd0f97e4a285634ffd2119ed64 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 19 Dec 2022 21:38:29 -0700 Subject: [PATCH 028/178] Update KOReader to v2022.10 (#639) --- package/koreader/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 593f42015..5dc813400 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=2022.08-1 +pkgver=2022.10-1 timestamp=2022-07-31T13:31:10Z section="readers" maintainer="raisjn " @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 57abc32b2af8c5d7765cf24fba8127a3dba9272d44d8abdc38311d8888d62ef6 + 29a477028079aeaaf669c9e31f5d3f5f3c492e19695642f3f49be0ea12d25bc4 SKIP SKIP SKIP From 436bad114a4d7c91b4c03ab5e18c3304755403db Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 29 Jan 2023 14:07:47 -0700 Subject: [PATCH 029/178] Update KOReader to v2022.11 (#659) --- package/koreader/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 5dc813400..b3d8310e8 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=2022.10-1 +pkgver=2022.11-1 timestamp=2022-07-31T13:31:10Z section="readers" maintainer="raisjn " @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 29a477028079aeaaf669c9e31f5d3f5f3c492e19695642f3f49be0ea12d25bc4 + 09e65dcde9c507f597df3e7c09b59ebd9fdf62b6b5b882c59116bf79773cadbc SKIP SKIP SKIP From 3740853e682547ae16706c08dbf94734e57fc7e9 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 29 Jan 2023 14:20:00 -0700 Subject: [PATCH 030/178] Update oxide to v2.5 (#662) Update the following applications to 2.5: - erode - fret - oxide - rot - tarnish - decay - corrupt - anxiety - liboxide Update libsentry to 0.5.0 Add new notify-send package --- package/oxide/package | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/package/oxide/package b/package/oxide/package index 6451dd168..a60b42559 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -2,21 +2,21 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety liboxide libsentry) -pkgver=2.4-2 -_sentryver=0.4.17 -timestamp=2022-05-22T03:18:32Z +pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety liboxide libsentry notify-send) +pkgver=2.5-1 +_sentryver=0.5.0 +timestamp=2023-01-26T22:52:14Z maintainer="Eeems " url=https://oxide.eeems.codes license=MIT flags=(patch_rm2fb) image=qt:v2.3 source=( - "https://github.com/Eeems-Org/oxide/archive/e6c62a6860b52cd1cbd47e21377f8d1ecf72bb0a.tar.gz" + "https://github.com/Eeems-Org/oxide/archive/refs/tags/v2.5.zip" toltec-override.conf ) sha256sums=( - a29cf455d5f66fee4ee67722c6f1d20627930920286398932c3d5c813d58ebee + 07bfb84e5adaebdebd2ce55b22f3764a1d4887c2b18364f5ec1053f171e3ecbe SKIP ) @@ -159,9 +159,19 @@ libsentry() { section=devel url=https://github.com/getsentry/sentry-native pkgver="$_sentryver" - timestamp="2021-12-20T14:25:11Z" + timestamp="2022-08-02T14:40:22Z" package() { install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libsentry.so } } + +notify-send() { + pkgdesc="A program to send desktop notifications for Oxide" + section=utils + installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + + package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/notify-send + } +} From 6bfe4d8b996aea722ad4e8f187a5357aea8abb60 Mon Sep 17 00:00:00 2001 From: rM-self-serve <122753594+rM-self-serve@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:36:01 -0600 Subject: [PATCH 031/178] Add package: webinterface-wifi (#664) * Add package: webinterface-wifi --------- Co-authored-by: Nathaniel van Diepen --- package/webinterface-wifi/package | 57 +++++++++++++++++++ .../webinterface-wifi-toltec.service | 14 +++++ 2 files changed, 71 insertions(+) create mode 100644 package/webinterface-wifi/package create mode 100644 package/webinterface-wifi/webinterface-wifi-toltec.service diff --git a/package/webinterface-wifi/package b/package/webinterface-wifi/package new file mode 100644 index 000000000..e8bdeaff6 --- /dev/null +++ b/package/webinterface-wifi/package @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(webinterface-wifi) +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 +section="utils" +maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" +license=MIT + +image=rust:v2.3 + +source=( + https://github.com/rM-self-serve/webinterface-wifi/archive/2e29855303a0806ee51e71bc836bc4b16204fa14.zip + webinterface-wifi-toltec.service +) + +sha256sums=( + 629bab244a387086ce2a8f8118b8d1017cf993bf97b13da72573f52572ed526e + SKIP +) + +build() { + RUSTFLAGS="-Zcrate-attr=feature(const_fn_trait_bound)" 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 +} + +configure() { + systemctl daemon-reload + + echo "" + echo "Run the following command to use $pkgname" + how-to-enable "$pkgname.service" +} + +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 +} + +postremove() { + systemctl daemon-reload +} diff --git a/package/webinterface-wifi/webinterface-wifi-toltec.service b/package/webinterface-wifi/webinterface-wifi-toltec.service new file mode 100644 index 000000000..b6055fc90 --- /dev/null +++ b/package/webinterface-wifi/webinterface-wifi-toltec.service @@ -0,0 +1,14 @@ +[Unit] +Description=View the web interface if running, over wifi +StartLimitIntervalSec=600 +StartLimitBurst=4 +After=home.mount + +[Service] +Environment=HOME=/home/root +Type=simple +ExecStart=/opt/bin/webinterface-wifi --run 80 +Restart=on-failure + +[Install] +WantedBy=multi-user.target From 9fcebd2a16befe24e96eeafafd85aa4a65dce35b Mon Sep 17 00:00:00 2001 From: rM-self-serve <122753594+rM-self-serve@users.noreply.github.com> Date: Fri, 10 Feb 2023 20:37:06 -0600 Subject: [PATCH 032/178] Add package: neofetch (#665) --- package/neofetch/package | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/neofetch/package diff --git a/package/neofetch/package b/package/neofetch/package new file mode 100644 index 000000000..1466ba5ad --- /dev/null +++ b/package/neofetch/package @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +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 +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 +) + +sha256sums=( + 06492898eac6fb4f2cc95ca52c65f8f4f580ada57b4fe433722dabeae884b633 +) + +package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/neofetch +} From ac86ae23c7b0337977c7ddee13f2869d34f9eb8b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 11 Feb 2023 11:42:58 -0700 Subject: [PATCH 033/178] Update KOReader to v2023.01 (#663) --- package/koreader/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index b3d8310e8..7dc69875f 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=2022.11-1 +pkgver=2023.01-1 timestamp=2022-07-31T13:31:10Z section="readers" maintainer="raisjn " @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 09e65dcde9c507f597df3e7c09b59ebd9fdf62b6b5b882c59116bf79773cadbc + f052d01e9be9c65883e1f8c00bae87b37ba6e47d3bf7b9bbbd746f58acc640c2 SKIP SKIP SKIP From 4bd9e35d84abdc91456977733ddba7152f828581 Mon Sep 17 00:00:00 2001 From: Neil Innes Date: Sun, 12 Feb 2023 01:34:03 +0000 Subject: [PATCH 034/178] Update display and rm2fb-client to v0.0.29 (#656) * Update display and rm2fb-client to v0.0.28 Fixes bug with Remarkable desktop app screen share freezing (https://github.com/ddvk/remarkable2-framebuffer/issues/71) * Update rm2fb to v0.0.29 --------- Co-authored-by: Nathaniel van Diepen --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index 5dce07f1b..d239aa120 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2022-10-28T15:36:16Z +timestamp=2023-01-11T07:12:52Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.27-1 +pkgver=1:0.0.29-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - f4bf553f2bc868a04452f67881d7a1053f791da7d29fecbb2c5fc4075facf282 + c3fdf3d2baf33221be6530a40d85cd2c28e4f6e7f0cc0ecdc1833ed7a84caa37 SKIP SKIP SKIP From d8c0510b1b949d0791019bbeee7cfa667f625ebb Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 20 Feb 2023 11:59:01 -0700 Subject: [PATCH 035/178] Update rm2fb to v0.0.30 (#666) Fix crash due to invalid notify address for 3.0.4.1305. --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index d239aa120..45b77ed6b 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2023-01-11T07:12:52Z +timestamp=2023-02-20T15:49:05Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.29-1 +pkgver=1:0.0.30-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - c3fdf3d2baf33221be6530a40d85cd2c28e4f6e7f0cc0ecdc1833ed7a84caa37 + bbd2acf8bc7d15082307c362985980e78cf1b48a69799aa602cf7dc3973339c7 SKIP SKIP SKIP From 41b3b4be5a3045bb4db0f43bf7034bc8ae2fca6c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 Mar 2023 08:24:50 -0600 Subject: [PATCH 036/178] Update KOReader to v2023.03 (#672) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 7dc69875f..65657fd48 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.01-1 -timestamp=2022-07-31T13:31:10Z +pkgver=2023.03-1 +timestamp=2023-03-20T11:38:17Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - f052d01e9be9c65883e1f8c00bae87b37ba6e47d3bf7b9bbbd746f58acc640c2 + 7f667e7ba72d9e7d832a95d55316f5010f0eca19461d7a591a5e8e10b7aadc45 SKIP SKIP SKIP From b2db547d5bc91cb6362b8aebcef6b1d747131faa Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 18 Apr 2023 10:10:15 -0600 Subject: [PATCH 037/178] Update display/rm2fb-client to v0.0.31 (#680) Add support for OS 3.2.2.1581 and 3.2.3.1595 --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index 45b77ed6b..db416c7af 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2023-02-20T15:49:05Z +timestamp=2023-04-16T20:53:38Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.30-1 +pkgver=1:0.0.31-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - bbd2acf8bc7d15082307c362985980e78cf1b48a69799aa602cf7dc3973339c7 + c27081be9b4fa000e41489b42d53fb8254bd8bf348a34756799488827dbc0f0b SKIP SKIP SKIP From 8adddc6ffed652dd40f3aaa866daf7344458ad06 Mon Sep 17 00:00:00 2001 From: raisjn <70462544+raisjn@users.noreply.github.com> Date: Tue, 9 May 2023 21:06:04 -0700 Subject: [PATCH 038/178] [rmkit] update rmkit, harmony, simple, remux and rpncalc (#670) harmony: fix individual layer bug remux: suspend API rpncalc: more hp48 like simple: add range widget, add canvas widget, make images clickable Co-authored-by: okay --- package/rmkit/changelog | 29 +++++++++++++++++++++++++++++ package/rmkit/package | 16 ++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/package/rmkit/changelog b/package/rmkit/changelog index 0314a5001..a08e54c9c 100644 --- a/package/rmkit/changelog +++ b/package/rmkit/changelog @@ -1,3 +1,32 @@ +2023-03-12 raisjn + + harmony + + * fix exporting individual layers + + rmkit + + * swap M and N on keyboard + * fix image thumbnail code + + simple: + + * add "range" input widget + * add "canvas" widget + * less debug output + * make images clickable + * move 'timeout' to its own thread instead of jamming task queue + * ignore empty lines + + remux + + * add "suspend" to remux FIFO api + + rpncalc + + * make it more hp48 like (@cesss) + + 2022-05-06 raisjn remux diff --git a/package/rmkit/package b/package/rmkit/package index 54d83c3ac..9c5cda508 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=2022-06-23T20:03:10Z +timestamp=2023-03-12T20: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/070d5df29a71e55050a5e993f047f1590d69ec1c.zip + https://github.com/rmkit-dev/rmkit/archive/2bf3488010eccf0d9e7f6c64e681517739420c58.zip remux.service genie.service ) sha256sums=( - e7f0379d5ad9de61c32a296ab831780cfea73352fbccfe2472422165943457ef + a0d1a8b16adeca688d7df6a18e4c7404d9d4a405b33615dfb4e374f24ff3dded SKIP SKIP ) @@ -80,7 +80,7 @@ genie() { harmony() { pkgdesc="Procedural sketching app" url="https://rmkit.dev/apps/harmony" - pkgver=0.2.1-1 + pkgver=0.2.2-1 section="drawing" package() { @@ -147,7 +147,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.2.3-1 + pkgver=0.2.4-1 section="launchers" package() { @@ -179,7 +179,7 @@ remux() { rpncalc() { pkgdesc="RPN Calculator" url="https://rmkit.dev/apps/rpncalc" - pkgver=0.0.2-2 + pkgver=0.0.3-2 section="math" package() { @@ -193,7 +193,7 @@ rpncalc() { simple() { pkgdesc="Simple app script for writing scripted applications" url="https://rmkit.dev/apps/sas" - pkgver=0.1.5-2 + pkgver=0.2.0-2 section="devel" package() { @@ -204,7 +204,7 @@ simple() { wordlet() { pkgdesc="Wordle clone" url="https://rmkit.dev/apps/wordlet" - pkgver=0.0.1-2 + pkgver=0.0.2-2 section="games" package() { From 2109651c74447ba4e78ba2098b2d2f2ccb0e5484 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 9 May 2023 22:23:03 -0600 Subject: [PATCH 039/178] Don't enable rm2fb if it fails to start (#686) --- package/display/package | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/package/display/package b/package/display/package index db416c7af..9cb5abf8d 100644 --- a/package/display/package +++ b/package/display/package @@ -8,7 +8,7 @@ timestamp=2023-04-16T20:53:38Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.31-1 +pkgver=1:0.0.31-2 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -64,12 +64,19 @@ display() { configure() { if [[ $arch = rm2 ]]; then systemctl daemon-reload - systemctl enable rm2fb --now - # Restart xochitl if it's running - if systemctl --quiet is-active xochitl; then - # Reset the crash count so we don't trigger remarkable-fail - echo "0" > /tmp/crashnum - systemctl restart xochitl + if systemctl enable rm2fb --now; then + # Restart xochitl if it's running + if systemctl --quiet 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 + 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" + exit 1 fi fi } From 4f7e123c6a025b30e976b9f3f7122b9699721b44 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 9 May 2023 22:26:53 -0600 Subject: [PATCH 040/178] Update toltec-base to 1.2-1 (#685) * Update toltec-base to 1.2-1 Only disable sys-subsystem-net-devices-usb1.device if on a reMarkable 1 * Formatting fix * Make shellcheck happy * Fix shellcheck source path * Switch to using $arch variable * Add code to unmask any rM2's with an existing install * Have toltec-base clean itself up on uninstall This is so that toltecctl uninstall properly returns to the previous state. * Fix install-lib docstring --- package/toltec-base/package | 22 ++++++++++++++++++---- scripts/install-lib | 13 +++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/package/toltec-base/package b/package/toltec-base/package index b7477a07c..be161fc8a 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,8 +6,8 @@ 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.1-1 -timestamp=2022-11-07T20:19:57Z +pkgver=1.2-1 +timestamp=2023-05-08T19:31Z section="utils" maintainer="Eeems " license=MIT @@ -28,6 +28,20 @@ configure() { echo "Disabling automatic update" systemctl disable --now update-engine fi - echo "Disabling usb1 network device to avoid long boots" - systemctl mask sys-subsystem-net-devices-usb1.device + 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 + elif [[ "$arch" == "rm2" ]] && is-masked sys-subsystem-net-devices-usb1.device; then + echo "Enabling usb1 network device to ensure usb SSH works" + systemctl unmask sys-subsystem-net-devices-usb1.device + fi +} + +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 + systemctl enable update-engine + fi } diff --git a/scripts/install-lib b/scripts/install-lib index 5096106cb..cb98421bf 100644 --- a/scripts/install-lib +++ b/scripts/install-lib @@ -23,6 +23,19 @@ is-enabled() { systemctl --quiet is-enabled "$1" 2> /dev/null } +# Check whether a systemd unit exists and is masked +# +# Arguments: +# +# $1 - Name of the systemd unit, e.g. "xochitl.service" or "xochitl" +# +# Exit code: +# +# 0 if the unit exists and is masked, 1 otherwise +is-masked() { + [[ "$(systemctl is-enabled "$1" 2> /dev/null)" == "masked" ]] +} + # Check whether a systemd unit is in an active state # ("running") # From 9ab8c2ad78a556b26d6a04f491b08cfbb9d2c3c4 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Wed, 10 May 2023 20:47:08 +0200 Subject: [PATCH 041/178] kernelctl: reset to default kernel when uninstalling (#691) * kernelctl: reset to default kernel when uninstalling * kernelctl: add more safety tests to preremove --------- Co-authored-by: Nathaniel van Diepen --- package/kernelctl/package | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/package/kernelctl/package b/package/kernelctl/package index c1f265b1a..f4a4b36be 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-5 +pkgver=0.1-6 timestamp=2022-11-12T00:00Z section="utils" maintainer="Salvatore Stella " @@ -31,3 +31,18 @@ configure() { kernelctl backup vanilla fi } + +preremove() { + if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$(< /etc/version)")" == "" ]]; then + if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then + echo "Unable to restore default kernel." + echo "To force removal, you can run the following:" + echo " opkg remove --force-remove kernelctl" + echo "Warning: This will not leave you in a stock state" + exit 1 + else + echo "Restoring default kernel" + kernelctl set default + fi + fi +} From 1f5b3cba9f97e478bdb6243e3d67c6a399f0e5fa Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 May 2023 12:31:42 -0600 Subject: [PATCH 042/178] Update restream to 1.2 (#688) * Update restream to 1.2 Release notes: https://github.com/rien/reStream/releases/tag/1.2.0 --- package/restream/package | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/package/restream/package b/package/restream/package index bae5968e0..3c1bf017c 100644 --- a/package/restream/package +++ b/package/restream/package @@ -5,20 +5,17 @@ pkgnames=(restream) pkgdesc="Binary framebuffer capture tool for the reStream script" url=https://github.com/rien/reStream -pkgver=1.1-2 -timestamp=2021-01-28T23:25:40Z +pkgver=1.2.0-1 +timestamp=2021-11-04T19:09:14Z section="screensharing" maintainer="Dan Shick " license=MIT image=rust:v2.1 -source=("https://github.com/rien/reStream/archive/${pkgver%-*}.tar.gz") -sha256sums=(89fa4c8adfcdfb5266e11d1f8ed4c5d8dac12a68a7ee5622cf21f833bca1704f) +source=("https://github.com/rien/reStream/archive/refs/tags/${pkgver%-*}.tar.gz") +sha256sums=(4166142b15e1e7363dac302aa92aad5b44e0514cab233abecb51414952c1d5a1) build() { - # Fall back to system-wide config - rm .cargo/config - cargo build --release --bin restream } From c6602ced8a9be59ef9f68074e0188d6e6947c81b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 May 2023 12:51:04 -0600 Subject: [PATCH 043/178] Update fbink, fbdepth, and fbink-doom to 1.25.0 (#687) --- package/fbink/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/fbink/package b/package/fbink/package index 8f5caf974..504bca3f3 100644 --- a/package/fbink/package +++ b/package/fbink/package @@ -4,8 +4,8 @@ pkgnames=(fbink fbdepth fbink-doom) url=https://github.com/NiLuJe/FBInk -pkgver=1.24.0-1 -timestamp=2021-03-25T23:41:13Z +pkgver=1.25.0-1 +timestamp=2022-12-05T02:50:38Z maintainer="Mattéo Delabre " license=GPL-3.0 installdepends=(display) From c6f9e6025e1cb163236fbfb9bf6342e85813d730 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 12 May 2023 13:29:19 -0600 Subject: [PATCH 044/178] Update KOReader to v2023.04 (#681) * Update KOReader to v2023.04 * Delete cached file on install --- package/koreader/package | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 65657fd48..904c48d4d 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.03-1 -timestamp=2023-03-20T11:38:17Z +pkgver=2023.04-1 +timestamp=2023-04-27T20:53:54Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 7f667e7ba72d9e7d832a95d55316f5010f0eca19461d7a591a5e8e10b7aadc45 + 7149beb95ee561c488491d723acbb2c641c99733abc1036de7064241a5f32813 SKIP SKIP SKIP @@ -44,6 +44,11 @@ package() { } configure() { + # This file can cause issues with startup when moving from 2022.08 to another version + if [ -f /opt/koreader/cache/fontlist/fontinfo.dat ]; then + rm /opt/koreader/cache/fontlist/fontinfo.dat + fi + systemctl daemon-reload if ! is-enabled "$pkgname.service"; then From ba8312629f61a21b714a185ddc1ac6dded69b85c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 16 May 2023 16:41:56 -0600 Subject: [PATCH 045/178] Don't error on templatectl uninstall if bind-mount is missing (#694) * Don't error on templatectl uninstall if bind-mount is missing --- package/templatectl/package | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package/templatectl/package b/package/templatectl/package index ee2374bef..7c7414550 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-3 +pkgver=0.1.3-4 timestamp=2021-01-15T01:23Z section="templates" maintainer="Peter Grace " @@ -41,7 +41,15 @@ configure() { } postremove() { - remove-bind-mount /usr/share/remarkable/templates + local bind_path + local unit_name + local unit_path + bind_path=/usr/share/remarkable/templates + unit_name="$(systemd-escape --path "$bind_path").mount" + unit_path="/lib/systemd/system/$unit_name" + if [[ -e $unit_path ]]; then + remove-bind-mount "$bind_path" + fi echo "To fully remove templatectl you'll need to run the following command:" echo " rm -rf /home/root/.entware/share/remarkable/templates" From eadaa3c984670e7404a1d9964bded6ead265b7a8 Mon Sep 17 00:00:00 2001 From: Sunny Date: Sat, 27 May 2023 23:53:37 +0000 Subject: [PATCH 046/178] Update rmFM host (#695) --- package/rmfm/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/rmfm/package b/package/rmfm/package index 1a27a2abb..01bdfca9d 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -4,8 +4,8 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" -url="https://codeberg.org/sun/rmFM" -pkgver=1.4.0-2 +url="https://forgejo.sny.sh/sun/rmFM" +pkgver=1.4.0-3 timestamp=2022-08-19T11:20:10+02:00 section=utils maintainer="Sunny " @@ -13,7 +13,7 @@ license=MIT installdepends=(node simple) source=( - https://codeberg.org/sun/rmFM/archive/1.4.0.zip + https://forgejo.sny.sh/sun/rmFM/archive/1.4.0.zip path_fix.patch ) sha256sums=( From 675a06cb6904d4191640568e1054797f25b1c60d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 6 Jun 2023 15:56:21 -0600 Subject: [PATCH 047/178] Oxide: depend on rm2fb on rm2 only (#697) * Oxide: depend on rm2fb on rm2 only * Oxide: Force rm2fb dependency and start xochitl on error --- package/oxide/package | 10 ++++++---- package/oxide/toltec-override.conf | 6 ------ package/oxide/toltec-rm2-override.conf | 7 +++++++ 3 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 package/oxide/toltec-override.conf create mode 100644 package/oxide/toltec-rm2-override.conf diff --git a/package/oxide/package b/package/oxide/package index a60b42559..a9b7a4010 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MIT pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety liboxide libsentry notify-send) -pkgver=2.5-1 +pkgver=2.5-2 _sentryver=0.5.0 timestamp=2023-01-26T22:52:14Z maintainer="Eeems " @@ -13,7 +13,7 @@ flags=(patch_rm2fb) image=qt:v2.3 source=( "https://github.com/Eeems-Org/oxide/archive/refs/tags/v2.5.zip" - toltec-override.conf + toltec-rm2-override.conf ) sha256sums=( 07bfb84e5adaebdebd2ce55b22f3764a1d4887c2b18364f5ec1053f171e3ecbe @@ -90,8 +90,10 @@ tarnish() { 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 - install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d \ - "$srcdir"/toltec-override.conf + 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 diff --git a/package/oxide/toltec-override.conf b/package/oxide/toltec-override.conf deleted file mode 100644 index d348b7c63..000000000 --- a/package/oxide/toltec-override.conf +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT - -[Unit] -Conflicts=xochitl.service -Conflicts=sync.service diff --git a/package/oxide/toltec-rm2-override.conf b/package/oxide/toltec-rm2-override.conf new file mode 100644 index 000000000..b1e25ec9a --- /dev/null +++ b/package/oxide/toltec-rm2-override.conf @@ -0,0 +1,7 @@ +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +[Unit] +After=rm2fb.service +Requires=rm2fb.service +OnFailure=xochitl.service From 4faff9bdf32142bc72a83cfc4ad8afc6e1de41d9 Mon Sep 17 00:00:00 2001 From: Linus K Date: Thu, 8 Jun 2023 20:39:02 +0200 Subject: [PATCH 048/178] Update plato to 0.9.34 (#669) * Update plato to 0.9.34 * Bugfix * Empty commit to trigger build * Use rust:v2.3.1 * Default to building armv7 Will be fixed in next commit: https://github.com/LinusCDE/plato/commit/fbfaf3d7b4eb22205ad819a3dc12e4eb999cda15 * Add new build-dependency: patchelf * Fix syntax error --------- Co-authored-by: Nathaniel van Diepen --- package/plato/package | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/package/plato/package b/package/plato/package index 9e26440b3..45ddcacd3 100644 --- a/package/plato/package +++ b/package/plato/package @@ -5,32 +5,31 @@ pkgnames=(plato) pkgdesc="Document reader" url=https://github.com/LinusCDE/plato -pkgver=0.9.25-2 -timestamp=2022-02-08T23:54Z +pkgver=0.9.34-1 +timestamp=2023-03-08T17:58Z section="readers" maintainer="Linus K. " license=AGPL-3.0-or-later installdepends=(display jq) -makedepends=(build:jq build:unzip build:wget) +makedepends=(build:jq build:unzip build:wget build:patchelf) flags=(patch_rm2fb) -image=rust:v2.2.2 -source=("https://github.com/LinusCDE/plato/archive/${pkgver%-*}-rm-release-12.zip") -sha256sums=(42e18e882e7e6853e299234a44eea9b9e3c4170076eec0577a0644dcf7005cf9) +image=rust:v2.3.1 +source=("https://github.com/LinusCDE/plato/archive/${pkgver%-*}-rm-release-13.zip") +sha256sums=(82ef5786704ecdb4fe11ce16e7e4ae10b518a592965c292977bb33962c891d48) build() { - # Fall back to system-wide config - rm .cargo/config - # 'cargo pkgid' seems to output something different with most # recent nightly builds. This adjusts the filtering. - sed -i "s/version=.*$/version=\'$(cargo pkgid | cut -d "#" -f 2 | cut -d ":" -f 2)\'/g" download.sh + sed -i "s/version=.*$/version=\'$(cargo pkgid -p plato | cut -d "#" -f 2 | cut -d ":" -f 2)\'/g" download.sh + + # Temporary fix until next release (TODO: Remove for next released version as included with commit fbfaf3d7) + sed -i "s/--target=arm-unknown-linux-gnueabihf/--target=armv7-unknown-linux-gnueabihf/g" build.sh # Use our toolchain export AR=arm-linux-gnueabihf-ar export CC=arm-linux-gnueabihf-gcc export STRIP=arm-linux-gnueabihf-strip - sed -i '/source \/usr\/local\/oecore-x86_64/d' src/mupdf_wrapper/build-kobo.sh # Compile all to dist/ ./clean.sh From d8889e668f23bd00ec3a06cd1f8599dd3b8f29e8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 14 Jun 2023 20:03:09 -0600 Subject: [PATCH 049/178] Add 7zip package (#699) * Add 7zip package --- package/7zip/package | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 package/7zip/package diff --git a/package/7zip/package b/package/7zip/package new file mode 100644 index 000000000..c70744764 --- /dev/null +++ b/package/7zip/package @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 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 +maintainer="Eeems " +license=LGPL-2.1-or-later +source=( + https://www.7-zip.org/a/7z2201-linux-arm.tar.xz +) +sha256sums=( + 428c11efd91fe1809c4750e8cd5d6eddfbed2826d8a5399ffcacb849f0d21cf8 +) + +package() { + install -dm 755 "$pkgdir"/opt/usr/share/licenses/7zip + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/7zz + cp -dr --no-preserve='ownership' "$srcdir"/License.txt "$pkgdir"/opt/usr/share/licenses/7zip +} From 40c7271098a25e36f5def4283ed7207ad2f59e69 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 14 Jun 2023 20:08:38 -0600 Subject: [PATCH 050/178] Update KOReader to v2023.05.1 (#696) * Update KOReader to v2023.05 * Update KOReader to v2023.05.1 --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 904c48d4d..fcdf3e764 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.04-1 -timestamp=2023-04-27T20:53:54Z +pkgver=2023.05.1-1 +timestamp=2023-06-02T13:05:01Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 7149beb95ee561c488491d723acbb2c641c99733abc1036de7064241a5f32813 + 1eadd87717ff1ee9fe91a2986198d64b871bf2e9b2412ae0add1d5ca66dd81f1 SKIP SKIP SKIP From 2ef902e015439ee4a8d80fc46d800c0127d57c9b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 9 Jul 2023 11:33:40 -0600 Subject: [PATCH 051/178] Update KOReader to v2023.06 (#705) * Update KOReader to v2023.06 * Update KOReader to v2023.06.1 --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index fcdf3e764..d98e24233 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.05.1-1 -timestamp=2023-06-02T13:05:01Z +pkgver=2023.06.1-1 +timestamp=2023-07-09T08:17:26Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 1eadd87717ff1ee9fe91a2986198d64b871bf2e9b2412ae0add1d5ca66dd81f1 + a24f334983060b5cfee7b87484529b77fe4adffd646e8fd55447750e73309ef0 SKIP SKIP SKIP From 7a6c6590c6dfce0b443a8583b3cd14953f0b221e Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 14 Jul 2023 22:45:27 -0400 Subject: [PATCH 052/178] tailscale-systemd package (#706) * tailscale-systemd package --------- Co-authored-by: Nathaniel van Diepen --- package/tailscale-systemd/package | 46 ++++++++++++++++++++ package/tailscale-systemd/tailscaled.service | 24 ++++++++++ 2 files changed, 70 insertions(+) create mode 100644 package/tailscale-systemd/package create mode 100644 package/tailscale-systemd/tailscaled.service diff --git a/package/tailscale-systemd/package b/package/tailscale-systemd/package new file mode 100644 index 000000000..4e7fe832a --- /dev/null +++ b/package/tailscale-systemd/package @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(tailscale-systemd) +pkgdesc="SystemD configuration for tailscale" +url=https://tailscale.com +pkgver=0.0.0-1 +section="utils" +timestamp=2023-07-12T00:00Z +maintainer="Kai " +license="BSD 3-Clause" +installdepends=(tailscale) + +source=( + tailscaled.service +) +sha256sums=( + SKIP +) + +package() { + install -D -m 644 -t "$pkgdir"/etc/systemd/system "$srcdir"/tailscaled.service +} + +configure() { + systemctl daemon-reload + systemctl enable tailscaled + systemctl start tailscaled +} + +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 +} + +postremove() { + systemctl daemon-reload +} diff --git a/package/tailscale-systemd/tailscaled.service b/package/tailscale-systemd/tailscaled.service new file mode 100644 index 000000000..35a9feb54 --- /dev/null +++ b/package/tailscale-systemd/tailscaled.service @@ -0,0 +1,24 @@ +[Unit] +Description=Tailscale node agent +Documentation=https://tailscale.com/kb/ +Wants=network-pre.target +After=network-pre.target + +[Service] +Environment="HOME=/home/root" +ExecStartPre=/opt/bin/tailscaled --cleanup +ExecStart=/opt/bin/tailscaled --state=/opt/var/lib/tailscale/tailscaled.state --socket=/opt/var/run/tailscale/tailscaled.sock --tun=userspace-networking --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 +ExecStopPost=/opt/bin/tailscaled --cleanup + +Restart=on-failure + +RuntimeDirectory=tailscale +RuntimeDirectoryMode=0755 +StateDirectory=tailscale +StateDirectoryMode=0700 +CacheDirectory=tailscale +CacheDirectoryMode=0750 +Type=notify + +[Install] +WantedBy=multi-user.target From d4678ef88e8a2a31735600e779d2976a6b935dd2 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 26 Jul 2023 19:27:39 -0600 Subject: [PATCH 053/178] Add ReTerm (#703) * Add ReTerm --- package/reterm/package | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/reterm/package diff --git a/package/reterm/package b/package/reterm/package new file mode 100644 index 000000000..a0a37a6d2 --- /dev/null +++ b/package/reterm/package @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT +pkgnames=(reterm) +pkgdesc="Landscape terminal support for the Remarkable 2 + type cover" +section="admin" +pkgver="20230628.1927-1" +timestamp="2023-06-28T19:28:06Z" +maintainer="Eeems " +url="https://github.com/i-am-shodan/ReTerm" +license=MIT +_gitcommit="5730f56cf25642b9752fb9d7987a40f6af6b5f59" +source=(https://github.com/i-am-shodan/ReTerm/archive/refs/tags/release_20230628_1927.tar.gz) +sha256sums=(3a6db39cfb83606c4ac5153fe2ac0319ab5c8322c73172178534c047a15c635b) +image=dotnet6:latest +makedepends=(build:gawk build:git) + +prepare() { + cd "$srcdir" + git config --global --add safe.directory /src + git init + git remote add origin https://github.com/i-am-shodan/ReTerm.git + git fetch --depth=1 origin "$_gitcommit" + git checkout -f "$_gitcommit" + git submodule update --init --force +} + +build() { + dotnet publish \ + -r linux-arm \ + --self-contained true \ + -p:PublishSingleFile=true \ + -p:PublishedTrimmed=true \ + -p:PublishReadyToRun=true \ + -p:Configuration=Release \ + -p:PublishReadyToRunShowWarnings=true \ + src/ReTerm/ReTerm.csproj +} + +package() { + local pubdir + pubdir="$srcdir"/src/ReTerm/bin/Release/net6.0/linux-arm/publish + install -D -m 755 -t "$pkgdir"/opt/usr/lib/reterm "$pubdir"/ReTerm + install -D -m 755 -T "$pubdir"/ReTerm.sh "$pkgdir"/opt/bin/ReTerm + sed -i 's|/home/root/ReTerm/ReTerm|/opt/usr/lib/reterm/ReTerm|' "$pkgdir"/opt/bin/ReTerm + install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/draft/reterm.draft + sed -i 's|/home/root/ReTerm/ReTerm.sh|/opt/bin/ReTerm|' "$pkgdir"/opt/etc/draft/reterm.draft + sed -i 's|killall -9 dotnet|killall ReTerm|' "$pkgdir"/opt/etc/draft/reterm.draft + install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/draft/reterm.png + install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/oxide/reterm.oxide +} + +configure() { + if is-active "tarnish.service"; then + type update-desktop-database &> /dev/null && update-desktop-database + fi +} From e968e98f11af004645b53caed421eafb393d0d89 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 2 Aug 2023 13:49:42 -0600 Subject: [PATCH 054/178] Update to python 3.10 (#684) * Upgrade black to remove need for typed-ast * Simplify workflow and install wheel * Upgrade to python 3.10 * Update documentation --- .github/actions/setup/action.yml | 5 +++++ .github/workflows/pr.yml | 8 -------- .github/workflows/stable.yml | 4 ---- .github/workflows/testing.yml | 4 ---- docs/building.md | 2 +- requirements.txt | 13 ++++++------- scripts/toltec/bash.py | 1 + scripts/toltec/builder.py | 6 ++++-- scripts/toltec/graphlib.py | 1 + scripts/toltec/ipk.py | 1 + scripts/toltec/recipe.py | 1 + scripts/toltec/repo.py | 8 +++++++- scripts/toltec/version.py | 8 ++++++++ 13 files changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 003825831..f10600cf6 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -67,6 +67,10 @@ runs: sudo chown root:root shellcheck sudo mv shellcheck "$install_dir" fi + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Cache Python environment uses: actions/cache@v3 id: cache-python @@ -80,5 +84,6 @@ runs: run: | if [[ "$CACHE_HIT" != 'true' ]]; then python -m pip install --upgrade pip + pip install wheel pip install -r requirements.txt fi diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 49ebeb5c7..34bc2ca28 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,10 +8,6 @@ jobs: steps: - name: Checkout the Git repository uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Check formatting @@ -25,10 +21,6 @@ jobs: steps: - name: Checkout the Git repository uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index c53b6edfc..e4d880017 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -10,10 +10,6 @@ jobs: steps: - name: Checkout the Git repository uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8c961e419..883718745 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,10 +10,6 @@ jobs: steps: - name: Checkout the Git repository uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages diff --git a/docs/building.md b/docs/building.md index 38d95e91b..6696d363a 100644 --- a/docs/building.md +++ b/docs/building.md @@ -18,7 +18,7 @@ Before running the build, make sure you have all the required dependencies: * Docker * bsdtar -* Python ⩾ 3.8 +* Python 3.10 You’ll also need all the Python modules listed in [requirements.txt](../requirements.txt) (install them by running `pip install --user -r requirements.txt` or using a [virtual environment](https://docs.python.org/3/tutorial/venv.html)). diff --git a/requirements.txt b/requirements.txt index b18273a33..a36680a62 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ appdirs==1.4.4 -astroid==2.4.2 -black==20.8b1 +astroid==2.15.4 +black==23.3.0 certifi==2020.12.5 chardet==4.0.0 -click==7.1.2 +click==8.1.3 docker==4.4.1 idna==2.10 isort==5.7.0 @@ -13,16 +13,15 @@ MarkupSafe==1.1.1 mccabe==0.6.1 mypy==0.790 mypy-extensions==0.4.3 -pathspec==0.8.1 +pathspec==0.11.1 pyelftools==0.27 -pylint==2.6.0 +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 -typed-ast==1.4.2 -typing-extensions==3.7.4.3 +typing-extensions==4.5.0 urllib3==1.26.2 websocket-client==0.57.0 wrapt==1.12.1 diff --git a/scripts/toltec/bash.py b/scripts/toltec/bash.py index cb194e253..b763dd18c 100644 --- a/scripts/toltec/bash.py +++ b/scripts/toltec/bash.py @@ -334,6 +334,7 @@ def run_script(variables: Variables, script: str) -> LogGenerator: :returns: generator yielding output lines from the script :raises ScriptError: if the script exits with a non-zero code """ + # pylint: disable-next=consider-using-with process = subprocess.Popen( ["/usr/bin/env", "bash"], stdin=subprocess.PIPE, diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py index 6a5401747..27253eef2 100644 --- a/scripts/toltec/builder.py +++ b/scripts/toltec/builder.py @@ -96,6 +96,7 @@ def __init__(self, work_dir: str, repo_dir: str) -> None: self.context: Dict[str, str] = {} self.adapter = BuildContextAdapter(logger, self.context) + # pylint: disable-next=unspecified-encoding with open(install_lib_path, "r") as file: for line in file: if not line.strip().startswith("#"): @@ -201,7 +202,7 @@ def _fetch_sources( ) else: # Fetch source file from the network - req = requests.get(source.url) + req = requests.get(source.url, timeout=5) if req.status_code != 200: raise BuildError( @@ -215,7 +216,7 @@ def _fetch_sources( # Verify checksum file_sha = util.file_sha256(local_path) - if source.checksum != "SKIP" and file_sha != source.checksum: + if source.checksum not in ("SKIP", source.checksum): raise BuildError( f"Invalid checksum for source file {source.url}:\n" f" expected {source.checksum}\n" @@ -381,6 +382,7 @@ def _postprocessing(self, recipe: Recipe, src_dir: str) -> None: script = [] mount_src = "/src" + # pylint: disable-next=unnecessary-lambda-assignment docker_file_path = lambda file_path: shlex.quote( os.path.join(mount_src, os.path.relpath(file_path, src_dir)) ) diff --git a/scripts/toltec/graphlib.py b/scripts/toltec/graphlib.py index 2a303928c..12c12446d 100644 --- a/scripts/toltec/graphlib.py +++ b/scripts/toltec/graphlib.py @@ -225,6 +225,7 @@ def _find_cycle(self) -> Optional[List[_T]]: seen = set() node2stacki: MutableMapping[_T, int] = {} + # pylint: disable-next=consider-using-dict-items for node in n2i: if node in seen: continue diff --git a/scripts/toltec/ipk.py b/scripts/toltec/ipk.py index 78678bd0c..4a064ba55 100644 --- a/scripts/toltec/ipk.py +++ b/scripts/toltec/ipk.py @@ -22,6 +22,7 @@ def _targz_open(fileobj: IO[bytes], epoch: int) -> tarfile.TarFile: ) try: + # pylint: disable-next=consider-using-with archive = tarfile.TarFile( mode="w", fileobj=gzipobj, # type:ignore diff --git a/scripts/toltec/recipe.py b/scripts/toltec/recipe.py index e462be5ec..fc1cf9ae0 100644 --- a/scripts/toltec/recipe.py +++ b/scripts/toltec/recipe.py @@ -41,6 +41,7 @@ def from_file(path: str) -> "GenericRecipe": :returns: loaded recipe """ name = os.path.basename(path) + # pylint: disable-next=unspecified-encoding with open(os.path.join(path, "package"), "r") as recipe: return GenericRecipe(name, path, recipe.read()) diff --git a/scripts/toltec/repo.py b/scripts/toltec/repo.py index c99fe3988..af9c1ad28 100644 --- a/scripts/toltec/repo.py +++ b/scripts/toltec/repo.py @@ -24,6 +24,8 @@ class PackageStatus(Enum): """Possible existence statuses of a built package.""" + # pylint: disable=invalid-name + # The package already existed in the local filesystem before the build AlreadyExists = auto() @@ -33,6 +35,8 @@ class PackageStatus(Enum): # The package is missing both from the local filesystem and the remote repo Missing = auto() + # pylint: enable=invalid-name + GroupedPackages = Dict[PackageStatus, Dict[str, Dict[str, List[Package]]]] @@ -132,7 +136,7 @@ def fetch_package( remote_path = os.path.join(remote, filename) - req = requests.get(remote_path) + req = requests.get(remote_path, timeout=5) if req.status_code != 200: return PackageStatus.Missing @@ -208,6 +212,7 @@ def make_index(self) -> None: index_path = os.path.join(arch_dir, "Packages") index_gzip_path = os.path.join(arch_dir, "Packages.gz") + # pylint: disable-next=unspecified-encoding with open(index_path, "w") as index_file: with gzip.open(index_gzip_path, "wt") as index_gzip_file: for generic_recipe in self.generic_recipes.values(): @@ -258,5 +263,6 @@ def make_listing(self) -> None: listing_path = os.path.join(self.repo_dir, "index.html") template = templating.env.get_template("listing.html") + # pylint: disable-next=unspecified-encoding with open(listing_path, "w") as listing_file: listing_file.write(template.render(sections=sections)) diff --git a/scripts/toltec/version.py b/scripts/toltec/version.py index 67dcb46f4..91c143e5a 100644 --- a/scripts/toltec/version.py +++ b/scripts/toltec/version.py @@ -16,12 +16,16 @@ class VersionComparator(Enum): """Operators used to compare two version numbers.""" + # pylint: disable=invalid-name + LowerThan = "<<" LowerThanOrEqual = "<=" Equal = "=" GreaterThanOrEqual = ">=" GreaterThan = ">>" + # pylint: enable=invalid-name + class InvalidVersionError(Exception): """Raised when parsing of an invalid version is attempted.""" @@ -100,6 +104,8 @@ def __repr__(self) -> str: class DependencyKind(Enum): """Kinds of dependencies that may be requested by a package.""" + # pylint: disable=invalid-name + # Dependency installed in the system used to build a package # (e.g., a Debian package) Build = "build" @@ -107,6 +113,8 @@ class DependencyKind(Enum): # (e.g., another Entware or Toltec package) Host = "host" + # pylint: enable=invalid-name + class InvalidDependencyError(Exception): """Raised when parsing an invalid dependency specification.""" From 715ca4bee3ecb511c8863fea61fc549cea2da118 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 2 Aug 2023 19:35:58 -0600 Subject: [PATCH 055/178] Update yaft to 0.0.8 (#716) * Update yaft to 0.0.8 --- package/yaft/package | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/yaft/package b/package/yaft/package index fc26750fb..a79d95d26 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -5,7 +5,8 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft -pkgver=0.0.7-1 +_tag=0.0.8 +pkgver=${_tag}-1 timestamp=2021-05-02T09:23Z maintainer="Mattéo Delabre " license=GPL-3.0 @@ -14,13 +15,13 @@ image=base:v2.3 installdepends=(display) source=( - https://github.com/timower/rM2-stuff/archive/refs/tags/v0.0.7.zip + "https://github.com/timower/rM2-stuff/archive/refs/tags/v${_tag}.zip" input.patch ) sha256sums=( - df3c74e08c6f047be8cea3d50f9b84bf20a9191d9ee1850e9957146134dfef1c - 5f3c6be207dda291950eece920fca853977fef772c6eddd7fb37c4dbf44c2b3b + 718a9fc7a8e26d587bac790fd83ad8242978b59745269b2ff213e04820bf45b8 + SKIP ) build() { From 39ee03ec59a7850bef390e15148a8c32d3ab49c8 Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 14 Aug 2023 18:01:52 -0400 Subject: [PATCH 056/178] Add sill package (#719) --- package/sill/package | 31 +++++++++++++++++++++++++++++++ package/sill/sill.draft | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 package/sill/package create mode 100644 package/sill/sill.draft diff --git a/package/sill/package b/package/sill/package new file mode 100644 index 000000000..773f1e33a --- /dev/null +++ b/package/sill/package @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(sill) +pkgdesc="Gesture-based text editor (and shell) for the reMarkable tablet" +url=https://github.com/bkirwi/sill +pkgver=0.1.1-alpha +section="writing" +timestamp=2023-08-12T00:00Z +maintainer="Kai " +license="Apache-2.0" + +image=rust:v3.0 +source=( + https://github.com/bkirwi/sill/archive/refs/tags/v0.1.1.tar.gz + sill.draft +) +sha256sums=( + ed3ef2f7ff37101db16f7020e6af86da6c32e78d76247c91a1676b72ce87e3df + SKIP +) + +build() { + cargo build --release +} + +package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/sill + install -D -m 644 "$srcdir"/sill.draft "$pkgdir"/opt/etc/draft/sill.draft +} diff --git a/package/sill/sill.draft b/package/sill/sill.draft new file mode 100644 index 000000000..58349bed1 --- /dev/null +++ b/package/sill/sill.draft @@ -0,0 +1,7 @@ +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT + +name=Sill +desc= Gesture-based text editor (and shell) for the reMarkable tablet +call=/opt/bin/sill +term=: From e7141224967e90dd7e5dcfa4ba120a3162d443d2 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 14 Aug 2023 21:57:16 -0600 Subject: [PATCH 057/178] =?UTF-8?q?Add=20terminfo=20dependency=20to=20yaft?= =?UTF-8?q?=20and=20add=20/opt/etc/profile=20to=20/etc/prof=E2=80=A6=20(#7?= =?UTF-8?q?15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add terminfo dependency to yaft and add /opt/etc/profile to /etc/profile.d * Don't override TERM if it's already set, and run bash with profile includes from yaft --- package/toltec-base/package | 7 ++++++- package/yaft/bash-l.patch | 13 +++++++++++++ package/yaft/package | 7 +++++-- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 package/yaft/bash-l.patch diff --git a/package/toltec-base/package b/package/toltec-base/package index be161fc8a..87dd4aa26 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-1 +pkgver=1.2-2 timestamp=2023-05-08T19:31Z section="utils" maintainer="Eeems " @@ -24,6 +24,11 @@ package() { } configure() { + ln -sf /opt/etc/profile /etc/profile.d/toltec.sh + # shellcheck disable=SC2016 + 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 diff --git a/package/yaft/bash-l.patch b/package/yaft/bash-l.patch new file mode 100644 index 000000000..ad6d27be7 --- /dev/null +++ b/package/yaft/bash-l.patch @@ -0,0 +1,13 @@ +diff --git a/apps/yaft/main.cpp b/apps/yaft/main.cpp +index baa1f56..1d4ee6a 100755 +--- a/apps/yaft/main.cpp ++++ b/apps/yaft/main.cpp +@@ -200,7 +200,7 @@ main(int argc, const char* argv[]) { + extern volatile sig_atomic_t need_redraw; + extern volatile sig_atomic_t child_alive; + extern struct termios termios_orig; +- static const char* shell_args[2] = { shell_cmd, NULL }; ++ static const char* shell_args[3] = { shell_cmd, "-l", NULL }; + + Keyboard keyboard; + diff --git a/package/yaft/package b/package/yaft/package index a79d95d26..8bc4e5154 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -6,26 +6,29 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft _tag=0.0.8 -pkgver=${_tag}-1 +pkgver=${_tag}-2 timestamp=2021-05-02T09:23Z maintainer="Mattéo Delabre " license=GPL-3.0 section="admin" image=base:v2.3 -installdepends=(display) +installdepends=(display terminfo) source=( "https://github.com/timower/rM2-stuff/archive/refs/tags/v${_tag}.zip" input.patch + bash-l.patch ) sha256sums=( 718a9fc7a8e26d587bac790fd83ad8242978b59745269b2ff213e04820bf45b8 SKIP + SKIP ) build() { patch -u libs/rMlib/Device.cpp -i input.patch + patch -u apps/yaft/main.cpp -i bash-l.patch mkdir build mkdir install cd build From 728e57bebf8aee6682ac80025bc1f52160c15b27 Mon Sep 17 00:00:00 2001 From: pr0fsmith <54153368+pr0fsmith@users.noreply.github.com> Date: Tue, 15 Aug 2023 19:51:02 -0400 Subject: [PATCH 058/178] rMscreens (#571) * Add changescrn package --------- Co-authored-by: Nathaniel van Diepen --- package/rmscreens/package | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 package/rmscreens/package diff --git a/package/rmscreens/package b/package/rmscreens/package new file mode 100644 index 000000000..a2670ea70 --- /dev/null +++ b/package/rmscreens/package @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(changescrn) +pkgdesc="Change sleep/suspend/poweroff/reboot screens" +url=https://github.com/pr0fsmith/rMscreens/ +pkgver=1.0.0-1 +timestamp=2022-03-15T01:28:33Z +section="utils" +maintainer="pr0fsmith " +license=GPL-3.0 + +source=(https://github.com/pr0fsmith/rMscreens/archive/6d04e97b3997873f0f8b1bd50283ae7ed9be7abd.zip) +sha256sums=(3c2e8b0952d848d7326c0a4ce45da625dd7fd0fbc6b564a2d40c3b97015138e3) + +package() { + install -Dm755 "$srcdir"/changescrn "$pkgdir/opt/bin/changescrn" +} From 4f874ca44a593c6b2303bd18493f6ec7a040a4e4 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 16 Aug 2023 13:14:55 -0400 Subject: [PATCH 059/178] package/linux-mainline: Bump to 6.2 (#657) * package/linux-mainline: Bump to 6.1 Signed-off-by: Alistair Francis * package/linux-mainline: Bump to 6.2 Signed-off-by: Alistair Francis --------- Signed-off-by: Alistair Francis Co-authored-by: Nathaniel van Diepen --- package/linux-mainline/package | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/linux-mainline/package b/package/linux-mainline/package index fe964dfc6..6787f77ca 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -6,7 +6,7 @@ archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=6.0.0-1 +pkgver=6.2.0-1 timestamp=2022-05-22T21:50:09Z section=kernel maintainer="Alistair Francis " @@ -15,8 +15,8 @@ license=GPL-2.0-only flags=(nostrip) image=base:v2.3 -source=("https://github.com/alistair23/linux/archive/4c2ef4e3bba89a8d767eccb85a242b2cd8850146.tar.gz") -sha256sums=(1583d553380a656ecaac8dab89558051e9165983381adc9c3d52fb8ac0ce19fd) +source=("https://github.com/alistair23/linux/archive/8241218883331bfdc0800f30eb337ff97b7c648c.tar.gz") +sha256sums=(de69fc74f1d25f447da170967eeea13b24354e9b8aa1927addcaa88c2ea9cd7c) build() { ARCH=arm make imx_v6_v7_defconfig @@ -48,8 +48,9 @@ configure() { echo echo "Known issues with the mainline kernel:" echo " - No support for low power mode (suspend uses more power then it should)" - echo " - WiFi sometimes is off on boot (can be turned on again though)" + echo " - Device doesn't always resume from suspend, a reboot is required" echo " - GUI shutdown in Oxide doesn't work" - echo " - Wacom stylus doesn't work in Xochitl (works everywhere else though)" + echo " - Wacom stylus doesn't work in Xochitl (https://github.com/reMarkable/linux/issues/15)" + echo " - Finger input doesn't work in Koreader (https://github.com/koreader/koreader/issues/10012)" echo " - No OTG control support" } From 5ca1fc5e57a858499dd8f0c6fe08d25a3eca2c52 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 16 Aug 2023 21:57:36 -0600 Subject: [PATCH 060/178] Add issue templates (#711) --- .github/ISSUE_TEMPLATE/documentation-issue.md | 20 +++++++++++ .../ISSUE_TEMPLATE/documentation-request.md | 20 +++++++++++ .github/ISSUE_TEMPLATE/installation-issue.md | 31 ++++++++++++++++ .github/ISSUE_TEMPLATE/package-issue.md | 35 +++++++++++++++++++ .github/ISSUE_TEMPLATE/package-request.md | 14 ++++++++ 5 files changed, 120 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/documentation-issue.md create mode 100644 .github/ISSUE_TEMPLATE/documentation-request.md create mode 100644 .github/ISSUE_TEMPLATE/installation-issue.md create mode 100644 .github/ISSUE_TEMPLATE/package-issue.md create mode 100644 .github/ISSUE_TEMPLATE/package-request.md diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.md b/.github/ISSUE_TEMPLATE/documentation-issue.md new file mode 100644 index 000000000..90a044823 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-issue.md @@ -0,0 +1,20 @@ +--- +name: Documentation Issue +about: Report an issue with the documentation +title: '' +labels: bug, documentation +assignees: '' + +--- + +**Describe the issue** +A clear and concise description of what the issue with the documentation is. + +**Potential resolution** +A clear and concise description of what you expected to happen. + +**Links** +If applicable, add links to the documentation in question. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation-request.md b/.github/ISSUE_TEMPLATE/documentation-request.md new file mode 100644 index 000000000..93afde795 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-request.md @@ -0,0 +1,20 @@ +--- +name: Documentation request +about: Request changes to the documentation +title: '' +labels: documentation +assignees: '' + +--- + +**Is your documentation request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/installation-issue.md b/.github/ISSUE_TEMPLATE/installation-issue.md new file mode 100644 index 000000000..9ac89311b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/installation-issue.md @@ -0,0 +1,31 @@ +--- +name: Installation issue +about: Report an issue with the installation process +title: '' +labels: bug, install +assignees: '' + +--- + +**Describe the issue** +A clear and concise description of what the issue is. + +**To Reproduce** +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behaviour** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Device information (please complete the following information):** + - Device: [e.g. reMarkable 2] + - OS version: [e.g. 2.15] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/package-issue.md b/.github/ISSUE_TEMPLATE/package-issue.md new file mode 100644 index 000000000..eae009fe4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-issue.md @@ -0,0 +1,35 @@ +--- +name: Package Issue +about: Create a report to help us improve +title: '' +labels: bug, packages +assignees: '' + +--- + +**Describe the issue** +A clear and concise description of what the issue is. + +**To Reproduce** +Steps to reproduce the behaviour: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behaviour** +A clear and concise description of what you expected to happen. + +**Upstream issue** +If applicable, add the link to the upstream issue here. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Device/Package information (please complete the following information):** + - Device: [e.g. reMarkable 2] + - OS version: [e.g. 2.15] + - Package: [e.g. toltec-base 0.0.1-1] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/package-request.md b/.github/ISSUE_TEMPLATE/package-request.md new file mode 100644 index 000000000..9c00eae55 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-request.md @@ -0,0 +1,14 @@ +--- +name: Package request +about: Request a package be added to toltec +title: Add [package] to toltec +labels: packages +assignees: '' + +--- + +**Package information** +Add the name of the package, and a link to where the source can be found. + +**Reason for addition** +Provide some basic information about why you'd need this package, and what it provides that existing packages don't. From 2d12d1516d72094aea058cd79e10cb937648aff7 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 24 Aug 2023 15:59:48 -0400 Subject: [PATCH 061/178] package/linux-mainline: Use a custom defconfig (#723) * package/linux-mainline: Use a custom defconfig Use a reMarkable specific defconfig that is checked into toltec. Currently this is an exact copy of the mainline defconfig (so no functional changes) but in the future this can be patched to enable/disable features as required. Signed-off-by: Alistair Francis Co-authored-by: Nathaniel van Diepen --- package/linux-mainline/package | 15 +- package/linux-mainline/remarkable_defconfig | 487 ++++++++++++++++++++ 2 files changed, 498 insertions(+), 4 deletions(-) create mode 100644 package/linux-mainline/remarkable_defconfig diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 6787f77ca..9838b9ead 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -6,7 +6,7 @@ archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=6.2.0-1 +pkgver=6.2.0-2 timestamp=2022-05-22T21:50:09Z section=kernel maintainer="Alistair Francis " @@ -15,11 +15,18 @@ license=GPL-2.0-only flags=(nostrip) image=base:v2.3 -source=("https://github.com/alistair23/linux/archive/8241218883331bfdc0800f30eb337ff97b7c648c.tar.gz") -sha256sums=(de69fc74f1d25f447da170967eeea13b24354e9b8aa1927addcaa88c2ea9cd7c) +source=( + https://github.com/alistair23/linux/archive/8241218883331bfdc0800f30eb337ff97b7c648c.tar.gz + remarkable_defconfig +) +sha256sums=( + de69fc74f1d25f447da170967eeea13b24354e9b8aa1927addcaa88c2ea9cd7c + f4d8cbb2c0e7bff5b151729b45064eb9e95005cb91899f0a9df038343d95ebf2 +) build() { - ARCH=arm make imx_v6_v7_defconfig + cp remarkable_defconfig arch/arm/configs/ + ARCH=arm make remarkable_defconfig ARCH=arm make -j8 } diff --git a/package/linux-mainline/remarkable_defconfig b/package/linux-mainline/remarkable_defconfig new file mode 100644 index 000000000..00af8d735 --- /dev/null +++ b/package/linux-mainline/remarkable_defconfig @@ -0,0 +1,487 @@ +CONFIG_KERNEL_LZO=y +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=18 +CONFIG_CGROUPS=y +CONFIG_CGROUP_BPF=y +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_EXPERT=y +CONFIG_PERF_EVENTS=y +CONFIG_ARCH_MULTI_V6=y +CONFIG_ARCH_MXC=y +CONFIG_SOC_IMX31=y +CONFIG_SOC_IMX35=y +CONFIG_SOC_IMX50=y +CONFIG_SOC_IMX51=y +CONFIG_SOC_IMX53=y +CONFIG_SOC_IMX6Q=y +CONFIG_SOC_IMX6SL=y +CONFIG_SOC_IMX6SLL=y +CONFIG_SOC_IMX6SX=y +CONFIG_SOC_IMX6UL=y +CONFIG_SOC_IMX7D=y +CONFIG_SOC_IMX7ULP=y +CONFIG_SOC_VF610=y +CONFIG_SMP=y +CONFIG_ARM_PSCI=y +CONFIG_HIGHMEM=y +CONFIG_ARCH_FORCE_MAX_ORDER=14 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200" +CONFIG_KEXEC=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_IMX6Q_CPUFREQ=y +CONFIG_ARM_IMX_CPUFREQ_DT=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_PM_DEBUG=y +CONFIG_PM_TEST_SUSPEND=y +CONFIG_KPROBES=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BINFMT_MISC=m +# CONFIG_COMPAT_BRK is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_INET=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_NETFILTER=y +CONFIG_CAN=y +CONFIG_BT=y +CONFIG_BT_BNEP=m +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_LL=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +CONFIG_RFKILL=y +CONFIG_RFKILL_INPUT=y +CONFIG_PCI=y +CONFIG_PCI_MSI=y +CONFIG_PCI_IMX6=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +CONFIG_IMX_WEIM=y +CONFIG_CONNECTOR=y +CONFIG_MTD=y +CONFIG_MTD_CMDLINE_PARTS=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_CFI=y +CONFIG_MTD_JEDECPROBE=y +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +CONFIG_MTD_CFI_STAA=y +CONFIG_MTD_PHYSMAP=y +CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_SST25L=y +CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_NAND_GPMI_NAND=y +CONFIG_MTD_NAND_VF610_NFC=y +CONFIG_MTD_NAND_MXC=y +CONFIG_MTD_SPI_NOR=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=65536 +CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +# CONFIG_BLK_DEV_BSG is not set +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y +CONFIG_SCSI_SCAN_ASYNC=y +CONFIG_ATA=y +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_AHCI_IMX=y +CONFIG_PATA_IMX=y +CONFIG_NETDEVICES=y +# CONFIG_NET_VENDOR_BROADCOM is not set +CONFIG_CS89x0_PLATFORM=y +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_SEEQ is not set +CONFIG_SMC91X=y +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_NET_VENDOR_STMICRO is not set +CONFIG_MICREL_PHY=y +CONFIG_AT803X_PHY=y +CONFIG_CAN_FLEXCAN=y +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_MCS7830=y +CONFIG_ATH10K=m +CONFIG_ATH10K_SDIO=m +CONFIG_BRCMFMAC=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MWIFIEX_PCIE=m +CONFIG_WL12XX=m +CONFIG_WL18XX=m +CONFIG_WLCORE_SDIO=m +# CONFIG_WILINK_PLATFORM_DATA is not set +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_EVBUG=m +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_SNVS_PWRKEY=y +CONFIG_KEYBOARD_IMX=y +CONFIG_MOUSE_PS2=m +CONFIG_MOUSE_PS2_ELANTECH=y +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=y +CONFIG_TOUCHSCREEN_AD7879=y +CONFIG_TOUCHSCREEN_AD7879_I2C=y +CONFIG_TOUCHSCREEN_ATMEL_MXT=y +CONFIG_TOUCHSCREEN_CYTTSP5=y +CONFIG_TOUCHSCREEN_DA9052=y +CONFIG_TOUCHSCREEN_EGALAX=y +CONFIG_TOUCHSCREEN_GOODIX=y +CONFIG_TOUCHSCREEN_ILI210X=y +CONFIG_TOUCHSCREEN_MAX11801=y +CONFIG_TOUCHSCREEN_IMX6UL_TSC=y +CONFIG_TOUCHSCREEN_EDT_FT5X06=y +CONFIG_TOUCHSCREEN_MC13783=y +CONFIG_TOUCHSCREEN_TSC2004=y +CONFIG_TOUCHSCREEN_TSC2007=y +CONFIG_TOUCHSCREEN_STMPE=y +CONFIG_TOUCHSCREEN_SX8654=y +CONFIG_TOUCHSCREEN_COLIBRI_VF50=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_MMA8450=y +CONFIG_SERIO_SERPORT=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_FSL_LPUART=y +CONFIG_SERIAL_FSL_LPUART_CONSOLE=y +CONFIG_SERIAL_DEV_BUS=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y +CONFIG_I2C_MUX_GPIO=y +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_ALGOPCF=m +CONFIG_I2C_ALGOPCA=m +CONFIG_I2C_GPIO=y +CONFIG_I2C_IMX=y +CONFIG_SPI=y +CONFIG_SPI_FSL_QUADSPI=y +CONFIG_SPI_GPIO=y +CONFIG_SPI_IMX=y +CONFIG_SPI_FSL_DSPI=y +CONFIG_PINCTRL_IMX8MM=y +CONFIG_PINCTRL_IMX8MN=y +CONFIG_PINCTRL_IMX8MP=y +CONFIG_PINCTRL_IMX8MQ=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_MXC=y +CONFIG_GPIO_SIOX=m +CONFIG_GPIO_MAX732X=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCF857X=y +CONFIG_GPIO_BD71815=y +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=y +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_SYSCON=y +CONFIG_POWER_RESET_SYSCON_POWEROFF=y +CONFIG_POWER_SUPPLY=y +CONFIG_BATTERY_MAX77818=y +CONFIG_CHARGER_MAX77818=y +CONFIG_RN5T618_POWER=m +CONFIG_SENSORS_MC13783_ADC=y +CONFIG_SENSORS_GPIO_FAN=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_SY7636A=y +CONFIG_THERMAL_STATISTICS=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +CONFIG_CPU_THERMAL=y +CONFIG_IMX_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_DA9063_WATCHDOG=m +CONFIG_DA9062_WATCHDOG=y +CONFIG_RN5T618_WATCHDOG=y +CONFIG_IMX2_WDT=y +CONFIG_IMX7ULP_WDT=y +CONFIG_MFD_DA9052_I2C=y +CONFIG_MFD_DA9062=y +CONFIG_MFD_DA9063=y +CONFIG_MFD_MC13XXX_SPI=y +CONFIG_MFD_MC13XXX_I2C=y +CONFIG_MFD_SY7636A=y +CONFIG_MFD_MAX77818=y +CONFIG_MFD_RN5T618=y +CONFIG_MFD_STMPE=y +CONFIG_MFD_ROHM_BD71828=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ANATOP=y +CONFIG_REGULATOR_BD71815=y +CONFIG_REGULATOR_DA9052=y +CONFIG_REGULATOR_DA9062=y +CONFIG_REGULATOR_DA9063=y +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_LTC3676=y +CONFIG_REGULATOR_MAX77818=y +CONFIG_REGULATOR_MC13783=y +CONFIG_REGULATOR_MC13892=y +CONFIG_REGULATOR_PFUZE100=y +CONFIG_REGULATOR_RN5T618=y +CONFIG_REGULATOR_SY7636A=y +CONFIG_RC_CORE=y +CONFIG_RC_DEVICES=y +CONFIG_IR_GPIO_CIR=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MUX=y +CONFIG_VIDEO_CODA=m +CONFIG_VIDEO_IMX_PXP=y +CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_OV5640=m +CONFIG_VIDEO_OV5645=m +CONFIG_VIDEO_ADV7180=m +CONFIG_IMX_IPUV3_CORE=y +CONFIG_DRM=y +CONFIG_DRM_MSM=y +CONFIG_DRM_PANEL_LVDS=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_EDP=y +CONFIG_DRM_PANEL_SEIKO_43WVF1G=y +CONFIG_DRM_TI_TFP410=y +CONFIG_DRM_DW_HDMI_AHB_AUDIO=m +CONFIG_DRM_DW_HDMI_CEC=y +CONFIG_DRM_IMX=y +CONFIG_DRM_IMX_PARALLEL_DISPLAY=y +CONFIG_DRM_IMX_TVE=y +CONFIG_DRM_IMX_LDB=y +CONFIG_DRM_IMX_HDMI=y +CONFIG_DRM_ETNAVIV=y +CONFIG_DRM_MXSFB=y +CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_MXS=y +CONFIG_LCD_CLASS_DEVICE=y +CONFIG_LCD_L4F00242T03=y +CONFIG_LCD_PLATFORM=y +CONFIG_BACKLIGHT_PWM=y +CONFIG_BACKLIGHT_GPIO=y +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_FSL_ASRC=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_SOC_EUKREA_TLV320=y +CONFIG_SND_SOC_IMX_ES8328=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_FSL_ASOC_CARD=y +CONFIG_SND_SOC_AC97_CODEC=y +CONFIG_SND_SOC_CS42XX8_I2C=y +CONFIG_SND_SOC_TLV320AIC3X_I2C=y +CONFIG_SND_SOC_WM8960=y +CONFIG_SND_SOC_WM8962=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_WACOM=y +CONFIG_I2C_HID_OF=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_ACM=m +CONFIG_USB_STORAGE=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_TEST=m +CONFIG_USB_EHSET_TEST_FIXTURE=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_MXS_PHY=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=y +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=y +CONFIG_USB_FUNCTIONFS=y +CONFIG_USB_FUNCTIONFS_ETH=y +CONFIG_USB_FUNCTIONFS_RNDIS=y +CONFIG_USB_FUNCTIONFS_GENERIC=y +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_CDC_COMPOSITE=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PWM=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_INTF_DEV_UIE_EMUL=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_ISL1208=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_BD70528=y +CONFIG_RTC_DRV_RC5T619=y +CONFIG_RTC_DRV_RV3029C2=y +CONFIG_RTC_DRV_DA9063=y +CONFIG_RTC_DRV_MC13XXX=y +CONFIG_RTC_DRV_MXC=y +CONFIG_RTC_DRV_MXC_V2=y +CONFIG_RTC_DRV_SNVS=y +CONFIG_DMADEVICES=y +CONFIG_FSL_EDMA=y +CONFIG_IMX_SDMA=m +CONFIG_MXS_DMA=y +CONFIG_DMATEST=m +CONFIG_STAGING=y +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_IMX_MEDIA=y +CONFIG_COMMON_CLK_PWM=y +CONFIG_COMMON_CLK_BD718XX=y +CONFIG_CLK_IMX8MM=y +CONFIG_CLK_IMX8MN=y +CONFIG_CLK_IMX8MP=y +CONFIG_CLK_IMX8MQ=y +CONFIG_SOC_IMX8M=y +CONFIG_EXTCON_USB_GPIO=y +CONFIG_IIO=y +CONFIG_MMA8452=y +CONFIG_IMX7D_ADC=y +CONFIG_RN5T618_ADC=y +CONFIG_STMPE_ADC=y +CONFIG_VF610_ADC=y +CONFIG_SENSORS_ISL29018=y +CONFIG_MAG3110=y +CONFIG_MPL3115=y +CONFIG_PWM=y +CONFIG_PWM_FSL_FTM=y +CONFIG_PWM_IMX27=y +CONFIG_PWM_IMX_TPM=y +CONFIG_NVMEM_IMX_OCOTP=y +CONFIG_NVMEM_SNVS_LPGPR=y +CONFIG_NVMEM_VF610_OCOTP=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_MUX_MMIO=y +CONFIG_SIOX=m +CONFIG_SIOX_BUS_GPIO=m +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +# CONFIG_PRINT_QUOTA_WARNING is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_JFFS2_FS=y +CONFIG_UBIFS_FS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +CONFIG_NLS_DEFAULT="cp437" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_UTF8=y +CONFIG_SECURITYFS=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_SAHARA=y +CONFIG_CRYPTO_DEV_MXS_DCP=y +CONFIG_CRC_CCITT=m +CONFIG_CRC_T10DIF=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=m +CONFIG_CMA_SIZE_MBYTES=0 +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_PRINTK_TIME=y +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_DEBUG_FS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_FTRACE is not set From 123b649cbc5b026bdd6238221de9ee1db0ab953d Mon Sep 17 00:00:00 2001 From: tenJirka Date: Thu, 24 Aug 2023 22:44:08 +0200 Subject: [PATCH 062/178] Added reGenda (#725) * Added reGenda --------- Co-authored-by: Nathaniel van Diepen --- package/regenda/package | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 package/regenda/package diff --git a/package/regenda/package b/package/regenda/package new file mode 100644 index 000000000..726080d61 --- /dev/null +++ b/package/regenda/package @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(regenda) +pkgdesc="Caldav agenda app" +url=https://github.com/tenJirka/reGenda +pkgver=0.0.1-1 +timestamp=2023-08-23T19:40Z +section="utils" +maintainer="tenJirka " +license=GPL3 +makedepends=(build:python3-venv) +installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna) +flags=(patch_rm2fb) +source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.1.zip) +sha256sums=(00d6a1e2f6b59f86ba47ea5c3444f24e112d24eb62082802653fe4649153da01) +image=python + +build() { + python3 -m venv venv + # shellcheck disable=SC1091 + source venv/bin/activate + mkdir "$srcdir"/python_modules + pip install caldav rm_pysas -t "$srcdir"/python_modules +} + +package() { + install -D -m 644 -t "$pkgdir"/opt/etc/draft/ "$srcdir"/regenda.draft + install -D -m 644 -t "$pkgdir"/opt/etc/reGenda/ "$srcdir"/config.yml.example + install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/reGenda.png + install -D -m 755 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/run.py + install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/languages.py + install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/calendar_caldav.py + mkdir "$pkgdir"/opt/bin/ + ln -s /opt/usr/lib/reGenda/run.py "$pkgdir"/opt/bin/reGenda + cp -r "$srcdir"/python_modules/caldav* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/icalendar* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/rm_pySAS* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/recurring_ical_events* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/tzlocal* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/vobject* "$pkgdir"/opt/usr/lib/reGenda/ + cp -r "$srcdir"/python_modules/x_wr_timezone* "$pkgdir"/opt/usr/lib/reGenda/ +} + +configure() { + if [ ! -f /opt/etc/reGenda/config.yml ]; then + cp /opt/etc/reGenda/config.yml.example /opt/etc/reGenda/config.yml + echo -e "\033[33mYou have to config server in /opt/etc/reGenda/config.yml, see https://github.com/tenJirka/reGenda for help.\033[0;39m" + fi +} + +postremove() { + rm -f /opt/usr/lib/reGenda/**/*.cpython-*.pyc +} From e83a04ad6ca9792575f6c6f7ee98d32a211dacf9 Mon Sep 17 00:00:00 2001 From: tenJirka Date: Fri, 25 Aug 2023 17:41:10 +0200 Subject: [PATCH 063/178] Package regenda - added simple as install dependency (#728) --- package/regenda/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/regenda/package b/package/regenda/package index 726080d61..131f03abe 100644 --- a/package/regenda/package +++ b/package/regenda/package @@ -5,13 +5,13 @@ pkgnames=(regenda) pkgdesc="Caldav agenda app" url=https://github.com/tenJirka/reGenda -pkgver=0.0.1-1 +pkgver=0.0.1-2 timestamp=2023-08-23T19:40Z section="utils" maintainer="tenJirka " license=GPL3 makedepends=(build:python3-venv) -installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna) +installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna simple) flags=(patch_rm2fb) source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.1.zip) sha256sums=(00d6a1e2f6b59f86ba47ea5c3444f24e112d24eb62082802653fe4649153da01) From 80690ec0564bc88d534daea7066617d3d452473d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 26 Aug 2023 14:25:19 -0600 Subject: [PATCH 064/178] Update oxide to v2.6 (#698) * Update oxide to v2.6 --- package/oxide/package | 104 ++++++++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 34 deletions(-) diff --git a/package/oxide/package b/package/oxide/package index a9b7a4010..c4e25b486 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -2,21 +2,22 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety liboxide libsentry notify-send) -pkgver=2.5-2 +pkgnames=(erode fret oxide rot tarnish decay corrupt anxiety oxide-utils inject_evdev liboxide libsentry) +_oxidever=2.6 +pkgver=$_oxidever-1 _sentryver=0.5.0 -timestamp=2023-01-26T22:52:14Z +timestamp=2023-06-05T23:27:53Z maintainer="Eeems " url=https://oxide.eeems.codes license=MIT flags=(patch_rm2fb) image=qt:v2.3 source=( - "https://github.com/Eeems-Org/oxide/archive/refs/tags/v2.5.zip" + "https://github.com/Eeems-Org/oxide/archive/refs/tags/v$_oxidever.zip" toltec-rm2-override.conf ) sha256sums=( - 07bfb84e5adaebdebd2ce55b22f3764a1d4887c2b18364f5ec1053f171e3ecbe + bbcf83302f530afe069974121496be6f8118eadba3c00633f834db026e41ae95 SKIP ) @@ -33,8 +34,8 @@ erode() { package() { install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/erode - install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/release/opt/etc/draft/icons/erode.svg - install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/release/opt/etc/draft/icons/erode-splash.png + 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 } } @@ -42,32 +43,31 @@ erode() { fret() { pkgdesc="Take screenshots" section="utils" - installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + 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 } + + configure() { + update-desktop-database + } } oxide() { pkgdesc="Launcher application" section="launchers" - installdepends=("erode=$pkgver" "fret=$pkgver" "tarnish=$pkgver" "rot=$pkgver" "decay=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + installdepends=("erode=$pkgver" "fret=$pkgver" "tarnish=$pkgver" "rot=$pkgver" "decay=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") package() { 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/etc/draft/icons "$srcdir"/release/opt/etc/draft/icons/oxide-splash.png 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 } configure() { - if ! is-enabled "tarnish.service"; then - echo "" - echo "Run the following command(s) to use $pkgname as your launcher" - how-to-enable "tarnish.service" - echo "" - fi + update-desktop-database } } @@ -97,6 +97,12 @@ tarnish() { } configure() { systemctl daemon-reload + if ! is-enabled "tarnish.service"; then + echo "" + echo "Run the following command(s) to use $pkgname as your launcher" + how-to-enable "tarnish.service" + echo "" + fi } preremove() { if is-active tarnish; then @@ -116,49 +122,89 @@ tarnish() { decay() { pkgdesc="Lockscreen application" section="utils" - installdepends=(display "tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + 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 } + + configure() { + update-desktop-database + } } corrupt() { pkgdesc="Task Switcher for Oxide" section="utils" - installdepends=(display "tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + 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 } + + configure() { + update-desktop-database + } } anxiety() { pkgdesc="Screenshot viewer for Oxide" section="utils" - installdepends=(display "tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + installdepends=(display "tarnish=$pkgver" "oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") package() { 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/etc/draft/icons "$srcdir"/release/opt/etc/draft/icons/image.svg - install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/release/opt/etc/draft/icons/anxiety-splash.png + install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/image.png + install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/anxiety.png + } + + configure() { + update-desktop-database + } +} + +oxide-utils() { + pkgdesc="Command line tools for Oxide" + section="admin" + installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") + replaces=(notify-send) + conflicts=(notify-send) + + package() { + 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 + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-menu + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-icon + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-open + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/gio + } +} + +inject_evdev() { + pkgdesc="Inject input events" + section="utils" + installdepends=("liboxide=$pkgver" "libsentry=$_sentryver") + + package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/inject_evdev } } liboxide() { pkgdesc="Shared library for oxide applications" - section=devel + section="devel" package() { - install -D -m 755 -t "$pkgdir"/opt/usr/lib "$srcdir"/release/opt/usr/lib/libliboxide.so* + install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libliboxide.so* } } libsentry() { pkgdesc="Sentry SDK for C, C++ and native applications." - section=devel + section="devel" url=https://github.com/getsentry/sentry-native pkgver="$_sentryver" timestamp="2022-08-02T14:40:22Z" @@ -167,13 +213,3 @@ libsentry() { install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libsentry.so } } - -notify-send() { - pkgdesc="A program to send desktop notifications for Oxide" - section=utils - installdepends=("tarnish=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver") - - package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/notify-send - } -} From ea694273e8663d454318b275dbfe50e1932b834f Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 29 Aug 2023 20:27:22 -0600 Subject: [PATCH 065/178] Update KOReader to v2023.08 (#733) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index d98e24233..09a02d6e2 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.06.1-1 -timestamp=2023-07-09T08:17:26Z +pkgver=2023.08-1 +timestamp=2023-08-29T16:21:01Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - a24f334983060b5cfee7b87484529b77fe4adffd646e8fd55447750e73309ef0 + 8cc9fad1cbcda5519c20afe6e33c4f80a51587daed7b959ef7284ce8b0c41ec0 SKIP SKIP SKIP From 555ab68890124b7a9023d66fc44febf85058c51c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 30 Aug 2023 16:33:19 -0600 Subject: [PATCH 066/178] Add note about toltecmk to docs/building.md (#734) --- docs/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index 6696d363a..b6cb816b4 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,7 +1,7 @@ ## Building the Repository from Source The Toltec repository is automatically built for each commit on the `stable` and `testing` branches. -You may want to build the repository locally when working with a new package recipe or to make sure that nobody tampered with the automated build system. +You may want to build the repository locally when working with a new package recipe or to make sure that nobody tampered with the automated build system. [Toltecmk](https://github.com/toltec-dev/build) could also be used instead, if you just need to compile a single standalone package. To proceed, create a local clone of the Git repository. From b8a60d36e76b861d400505083ab5f751ec153d9a Mon Sep 17 00:00:00 2001 From: tenJirka Date: Fri, 8 Sep 2023 22:34:34 +0200 Subject: [PATCH 067/178] Update regenda to 0.0.2 (#737) --- package/regenda/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/regenda/package b/package/regenda/package index 131f03abe..e899d531e 100644 --- a/package/regenda/package +++ b/package/regenda/package @@ -5,16 +5,16 @@ pkgnames=(regenda) pkgdesc="Caldav agenda app" url=https://github.com/tenJirka/reGenda -pkgver=0.0.1-2 -timestamp=2023-08-23T19:40Z +pkgver=0.0.2-1 +timestamp=2023-09-06T06:45Z section="utils" maintainer="tenJirka " license=GPL3 makedepends=(build:python3-venv) installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna simple) flags=(patch_rm2fb) -source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.1.zip) -sha256sums=(00d6a1e2f6b59f86ba47ea5c3444f24e112d24eb62082802653fe4649153da01) +source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.2.zip) +sha256sums=(4f51de514945f9cfc6a1852181baab4bb0f4daadb222e8ddb05929f17e2044d9) image=python build() { From 1c42c05f850184b16ace6ce58c209853ed8cf999 Mon Sep 17 00:00:00 2001 From: Jayy001 <56607897+Jayy001@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:20:35 +0100 Subject: [PATCH 068/178] Update toltecctl to fix uninstalling error (#740) * Update toltecctl to fix uninstalling error --------- Co-authored-by: Nathaniel van Diepen --- package/toltec-bootstrap/package | 4 ++-- package/toltec-bootstrap/toltecctl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index a07acf822..1b033cc4a 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.2-1 -timestamp=2022-02-28T00:12Z +pkgver=0.2.3-1 +timestamp=2023-09-17T17:35Z section="utils" maintainer="Eeems " license=MIT diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index 2480d6eee..b9ea0bcb3 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -338,7 +338,7 @@ uninstall() { # Remove installed packages in reverse dependency order list-installed-ordered | while read -r pkgname; do - "$opkg_path" remove --force-depends --force-remove "$pkgname" + "$opkg_path" remove --force-removal-of-essential-packages --force-depends --force-remove "$pkgname" done systemctl daemon-reload From 4e646f06bd5a162ca175a732924fbcc345c4a49b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 5 Oct 2023 21:24:59 -0600 Subject: [PATCH 069/178] Add missing xdg-settings binary to oxide-utils (#745) --- package/oxide/package | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/oxide/package b/package/oxide/package index c4e25b486..1db608f78 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-1 +pkgver=$_oxidever-2 _sentryver=0.5.0 timestamp=2023-06-05T23:27:53Z maintainer="Eeems " @@ -179,6 +179,7 @@ oxide-utils() { install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-menu install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-desktop-icon install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-open + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/xdg-settings install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/release/opt/bin/gio } } From f5a6c36031e52fecf3ef80d6797ad410a2e953a4 Mon Sep 17 00:00:00 2001 From: Sunny <8181990+TheLastZombie@users.noreply.github.com> Date: Sun, 8 Oct 2023 23:46:43 +0200 Subject: [PATCH 070/178] rmfm: Update to 1.5.0 (#746) --- package/rmfm/package | 15 +++++++-------- package/rmfm/path_fix.patch | 6 ++---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package/rmfm/package b/package/rmfm/package index 01bdfca9d..ffec3e72b 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -5,25 +5,24 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" url="https://forgejo.sny.sh/sun/rmFM" -pkgver=1.4.0-3 -timestamp=2022-08-19T11:20:10+02:00 +pkgver=1.5.0-1 +timestamp=2023-08-08T22:19:23+02:00 section=utils -maintainer="Sunny " -license=MIT +maintainer="Sunny " +license=Unlicense installdepends=(node simple) source=( - https://forgejo.sny.sh/sun/rmFM/archive/1.4.0.zip + https://forgejo.sny.sh/sun/rmFM/archive/1.5.0.zip path_fix.patch ) sha256sums=( - 28ce80c67fecc370d11f3fe2069742c2789b388a9426fff49d269d7900ae3dc9 + 515cc1843bf61f628c3a0b2b2dcb3256a0182352c6b491585fd52cf96a554b26 SKIP ) prepare() { - # Assume node to be in /opt/bin and add that directory - # to the path of the app to allow finding simple + # Assume node to be in /opt/bin # This is a temporary fix for not working in remux patch -d "$srcdir" < "$srcdir"/path_fix.patch } diff --git a/package/rmfm/path_fix.patch b/package/rmfm/path_fix.patch index a2cf4aef2..d8c314aef 100644 --- a/package/rmfm/path_fix.patch +++ b/package/rmfm/path_fix.patch @@ -1,9 +1,7 @@ diff --git a/rmfm b/rmfm -index 4571db9..172eedf 100755 +index 63eeb98..b28dbd0 100755 --- a/rmfm +++ b/rmfm -@@ -1,2 +1,3 @@ +@@ -1 +1 @@ -#!/usr/bin/env node +#!/opt/bin/node -+process.env.PATH += ":/opt/bin" - From 02d86d29645d379e65e635f05882a9847ed8e7ee Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Fri, 27 Oct 2023 21:16:46 +0200 Subject: [PATCH 071/178] Release whiteboard-hypercard v0.3.7 (#747) * Release whiteboard-hypercard v0.3.7 Signed-off-by: Pierre Fenoll --- package/whiteboard-hypercard/package | 20 ++++++++++--------- .../whiteboard-hypercard.draft | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package/whiteboard-hypercard/package b/package/whiteboard-hypercard/package index 36dc05edc..2ae9a746d 100644 --- a/package/whiteboard-hypercard/package +++ b/package/whiteboard-hypercard/package @@ -1,32 +1,34 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(whiteboard-hypercard) pkgdesc="Real-time collaboration, drawing or whiteboarding" url=https://github.com/fenollp/reMarkable-tools -pkgver=0.3.4-1 -timestamp=2021-10-25T15:45Z +pkgver=0.3.7-1 +timestamp=2023-10-11T12:57Z section="drawing" maintainer="Pierre Fenoll " -license=Apache-2.0 +license=CC-BY-NC-ND installdepends=(display) flags=(patch_rm2fb) -image=rust:v2.2 +image=rust:v3.1 source=( - https://github.com/fenollp/reMarkable-tools/archive/v0.3.4.zip + https://github.com/fenollp/reMarkable-tools/archive/v0.3.7.zip whiteboard-hypercard.draft ) sha256sums=( - b343e1b4af9e0bf247ff2fab8331648ddd89941fb5c0ea9a45417d3bb4b20193 + 642fd954ec4f9a1d132b10cc7f7dfbee3467e9c08b1253cc32d1e372178d168b SKIP ) build() { - cd marauder + pushd marauder rustup component add rustfmt - cargo build --release --bin whiteboard --locked + cargo fetch + cargo build --release --bin whiteboard --locked --frozen --offline + popd } package() { diff --git a/package/whiteboard-hypercard/whiteboard-hypercard.draft b/package/whiteboard-hypercard/whiteboard-hypercard.draft index 19800df55..c1565788e 100644 --- a/package/whiteboard-hypercard/whiteboard-hypercard.draft +++ b/package/whiteboard-hypercard/whiteboard-hypercard.draft @@ -1,4 +1,4 @@ -# Copyright (c) 2020 The Toltec Contributors +# Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT name=whiteboard From ec6240867c666a37f8dd9e7d89c0eb6cd8da6321 Mon Sep 17 00:00:00 2001 From: FouzR <88454554+FouzR@users.noreply.github.com> Date: Wed, 8 Nov 2023 03:35:23 +0400 Subject: [PATCH 072/178] Update YAFT to v0.0.10 (#736) * Update YAFT to v0.0.10 --------- Co-authored-by: Nathaniel van Diepen --- package/yaft/bash-l.patch | 13 ------------- package/yaft/package | 13 ++++++------- 2 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 package/yaft/bash-l.patch diff --git a/package/yaft/bash-l.patch b/package/yaft/bash-l.patch deleted file mode 100644 index ad6d27be7..000000000 --- a/package/yaft/bash-l.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/apps/yaft/main.cpp b/apps/yaft/main.cpp -index baa1f56..1d4ee6a 100755 ---- a/apps/yaft/main.cpp -+++ b/apps/yaft/main.cpp -@@ -200,7 +200,7 @@ main(int argc, const char* argv[]) { - extern volatile sig_atomic_t need_redraw; - extern volatile sig_atomic_t child_alive; - extern struct termios termios_orig; -- static const char* shell_args[2] = { shell_cmd, NULL }; -+ static const char* shell_args[3] = { shell_cmd, "-l", NULL }; - - Keyboard keyboard; - diff --git a/package/yaft/package b/package/yaft/package index 8bc4e5154..a08ab32d0 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -5,9 +5,9 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft -_tag=0.0.8 -pkgver=${_tag}-2 -timestamp=2021-05-02T09:23Z +_tag=0.0.10 +pkgver=${_tag}-1 +timestamp=2023-08-12T14:31Z maintainer="Mattéo Delabre " license=GPL-3.0 section="admin" @@ -17,18 +17,15 @@ installdepends=(display terminfo) source=( "https://github.com/timower/rM2-stuff/archive/refs/tags/v${_tag}.zip" input.patch - bash-l.patch ) sha256sums=( - 718a9fc7a8e26d587bac790fd83ad8242978b59745269b2ff213e04820bf45b8 - SKIP + 1cd4741a93cde6bd545215eb303e51219fc9901cba1c28b6206b1b5e0871a7b5 SKIP ) build() { patch -u libs/rMlib/Device.cpp -i input.patch - patch -u apps/yaft/main.cpp -i bash-l.patch mkdir build mkdir install cd build @@ -37,6 +34,8 @@ build() { cd apps/yaft make make install + cd ../../libs/libYaft + make install } package() { From 1e90b51349b27fc17ac3a7dbfa08b616d15b9081 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 12 Nov 2023 11:28:03 -0700 Subject: [PATCH 073/178] Make sure xochtil shows up properly when run (#707) * Make sure xochtil shows up properly when run --- package/xochitl/package | 2 +- package/xochitl/xochitl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/xochitl/package b/package/xochitl/package index 1ebefec09..1aa004a27 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-14 +pkgver=0.0.0-15 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " diff --git a/package/xochitl/xochitl b/package/xochitl/xochitl index a745d8bea..f16945fe0 100644 --- a/package/xochitl/xochitl +++ b/package/xochitl/xochitl @@ -18,4 +18,4 @@ fi if ! systemctl is-active --quiet manual-sync.service; then systemctl enable --now manual-sync.service fi -exec /usr/bin/xochitl "$@" +exec -a /usr/bin/xochitl /usr/bin/xochitl "$@" From 30d4584386c54b207b64353731adea90de35fabb Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 12 Nov 2023 11:31:13 -0700 Subject: [PATCH 074/178] Add various Templates (#712) * Add remarkable_templates --- package/remarkable_templates/package | 142 +++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 package/remarkable_templates/package diff --git a/package/remarkable_templates/package b/package/remarkable_templates/package new file mode 100644 index 000000000..6cae08725 --- /dev/null +++ b/package/remarkable_templates/package @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=( + template-daily-planner + template-weekly-planner + template-journal + template-meeting-notes + template-smart-goals + template-good-time-journal +) +url=https://github.com/msencer/remarkable_templates +pkgver=0.0.0-1 +timestamp=2023-07-27T12:28:59Z +section="templates" +maintainer="Eeems " +license=MIT +installdepends=(templatectl) + +source=("https://github.com/msencer/remarkable_templates/archive/03282d34b905e7e6431132b022b5a9cb3af116a2.zip") +sha256sums=(7a39d53767963f59c8d5b8a7ebda411b60d1256fe1077a3864cc43cd59281e03) + +template-daily-planner() { + pkgdesc="Daily Planner template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/daily_planner.png + } + configure() { + templatectl add \ + --name "Daily Planner" \ + --filename "daily_planner" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e9da" + } + preremove() { + templatectl remove --name "Daily Planner" + } +} + +template-weekly-planner() { + pkgdesc="Weekly Planner template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/weekly_planner.png + } + configure() { + templatectl add \ + --name "Weekly Planner" \ + --filename "weekly_planner" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e997" + } + preremove() { + templatectl remove --name "Weekly Planner" + } +} + +template-journal() { + pkgdesc="Journal template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/journal.png + } + configure() { + templatectl add \ + --name "Journal" \ + --filename "journal" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e991" + } + preremove() { + templatectl remove --name "Journal" + } +} + +template-meeting-notes() { + pkgdesc="Meeting Notes template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/meeting_notes.png + } + configure() { + templatectl add \ + --name "1:1 / Meeting Notes" \ + --filename "meeting_notes" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e9d8" + } + preremove() { + templatectl remove --name "1:1 / Meeting Notes" + } +} + +template-smart-goals() { + pkgdesc="Smart Goals template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/goals.png + } + configure() { + templatectl add \ + --name "Smart Goals" \ + --filename "goals" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e98f" + } + preremove() { + templatectl remove --name "Smart Goals" + } +} + +template-good-time-journal() { + pkgdesc="Smart Goals template" + package() { + install -D -m 755 \ + -t "$pkgdir"/opt/share/remarkable/templates \ + "$srcdir"/templates/pngs/gt_journal.png + } + configure() { + templatectl add \ + --name "Good Time Journal" \ + --filename "gt_journal" \ + --category "Custom" \ + --category "Life/organize" \ + --icon_code "e9b2" + } + preremove() { + templatectl remove --name "Good Time Journal" + } +} From 9f8aa1dad8f76a57fd9907e75ef218c0f6342b89 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 12 Nov 2023 11:34:01 -0700 Subject: [PATCH 075/178] Update rguard to use install-lib (#689) --- package/reboot-guard/package | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/package/reboot-guard/package b/package/reboot-guard/package index 61825f748..ef9ceb257 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-6 +pkgver=1.0.1-7 timestamp=2020-05-04T06:16Z section="devel" maintainer="Eeems " @@ -34,8 +34,13 @@ configure() { } preremove() { - if systemctl list-units --full -all | grep -Fq 'rguard.service'; then - systemctl disable --now rguard + 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 } From 5fc766dc54453cf7e4c5d5e77c8d79f4d78208b8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 12 Nov 2023 11:36:44 -0700 Subject: [PATCH 076/178] Add splashscreens and backup/restore on changescreen install/remove (#724) * Add splashscreens and backup/restore on changescreen install/remove * Only backup if splashscreens are missing * update docs --- docs/package.md | 1 + package/{rmscreens => changescrn}/package | 12 +- package/splashcreens-wavy-lines/package | 50 ++ package/splashscreens-1094/package | 118 ++++ package/splashscreens/package | 705 ++++++++++++++++++++++ 5 files changed, 885 insertions(+), 1 deletion(-) rename package/{rmscreens => changescrn}/package (74%) create mode 100644 package/splashcreens-wavy-lines/package create mode 100644 package/splashscreens-1094/package create mode 100644 package/splashscreens/package diff --git a/docs/package.md b/docs/package.md index fcd9690a4..a8d56526e 100644 --- a/docs/package.md +++ b/docs/package.md @@ -328,6 +328,7 @@ math | Apps to assist the user in performing mathematical tasks. readers | Apps for reading and annotating documents (PDF, EPUB, …). screensharing | Apps for streaming the display between the PC and tablet. templates | Templates for xochitl notebooks. +splashscreens | Splashscreens for device startup, poweroff, suspend, etc. utils | System tools and various apps. If the package does not fit into one of the existing sections, you are free to create a new one and document it here. diff --git a/package/rmscreens/package b/package/changescrn/package similarity index 74% rename from package/rmscreens/package rename to package/changescrn/package index a2670ea70..f45f98023 100644 --- a/package/rmscreens/package +++ b/package/changescrn/package @@ -5,7 +5,7 @@ pkgnames=(changescrn) pkgdesc="Change sleep/suspend/poweroff/reboot screens" url=https://github.com/pr0fsmith/rMscreens/ -pkgver=1.0.0-1 +pkgver=1.0.0-2 timestamp=2022-03-15T01:28:33Z section="utils" maintainer="pr0fsmith " @@ -17,3 +17,13 @@ sha256sums=(3c2e8b0952d848d7326c0a4ce45da625dd7fd0fbc6b564a2d40c3b97015138e3) package() { install -Dm755 "$srcdir"/changescrn "$pkgdir/opt/bin/changescrn" } + +configure() { + if [ ! -d /opt/usr/share/backupscrns ] || [ -z "$(ls -A /opt/usr/share/backupscrns)" ]; then + changescrn -b + fi +} + +preremove() { + changescrn -r all +} diff --git a/package/splashcreens-wavy-lines/package b/package/splashcreens-wavy-lines/package new file mode 100644 index 000000000..86ed7f77d --- /dev/null +++ b/package/splashcreens-wavy-lines/package @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=( + splashscreen-starting-wavey-lines + splashscreen-suspended-wavey-lines +) +url=https://github.com/EnglishLFC/reMarkable +pkgver=0.0.0-1 +timestamp=2021-03-19T18:46:40Z +section="splashscreens" +maintainer="Eeems " +license=BSD-2-Clause +installdepends=(changescrn) + +source=("https://github.com/EnglishLFC/reMarkable/archive/a06b10ea9f28c784e6941085a30944c0489450f4.zip") +sha256sums=(ec5f0321342bf6b48bb1431f4b1cf4416c37681879b3ec6c9375f889077a0b7f) + +splashscreen-starting-wavey-lines() { + pkgdesc="Barnsley Fern battery empty splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -T "$srcdir"/splash/splash.png \ + "$pkgdir"/opt/share/remarkable/splashscreens/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-wavey-lines() { + pkgdesc="Barnsley Fern power off splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splash/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} diff --git a/package/splashscreens-1094/package b/package/splashscreens-1094/package new file mode 100644 index 000000000..12c395643 --- /dev/null +++ b/package/splashscreens-1094/package @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=( + splashscreen-poweroff-gallifreyan + splashscreen-suspended-gallifreyan + splashscreen-suspended-gallifreyan-dark + splashscreen-starting-gallifreyan + splashscreen-suspended-gallifreyan-2 + splashscreen-suspended-flower-pause +) +url=https://github.com/1094/rM-customizations +pkgver=0.0.0-1 +timestamp=2023-05-15T11:27:58Z +section="splashscreens" +maintainer="Eeems " +license=CC-BY-NC-3.0 +installdepends=(changescrn) + +source=("https://github.com/1094/rM-customizations/archive/623171a1268e9ff45a8669fa36637e3eabd4ca40.zip") +sha256sums=(8cc8d02fe04c12bacfc798c1f6737cb55f581f191e2bf54147256df265318a31) + +splashscreen-poweroff-gallifreyan() { + pkgdesc="Gallifreyan poweroff splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splash-screens/gallifreyan/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-suspended-gallifreyan() { + pkgdesc="Gallifreyan suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v1.png \ + "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-suspended-gallifreyan-dark() { + pkgdesc="Gallifreyan dark suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -T "$srcdir"/splash-screens/gallifreyan/sleeping-v3.png \ + "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-starting-gallifreyan() { + pkgdesc="Gallifreyan starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splash-screens/gallifreyan/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-gallifreyan-2() { + pkgdesc="Gallifreyan suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splash-screens/gallifreyan/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-suspended-flower-pause() { + pkgdesc="Flower suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -T "$srcdir"/splash-screens/misc/flower-pause.png \ + "$pkgdir"/opt/share/remarkable/splashscreens/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} diff --git a/package/splashscreens/package b/package/splashscreens/package new file mode 100644 index 000000000..224311751 --- /dev/null +++ b/package/splashscreens/package @@ -0,0 +1,705 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=( + splashscreen-batteryempty-barnsley_fern + splashscreen-poweroff-barnsley_fern + splashscreen-starting-barnsley_fern + splashscreen-suspended-barnsley_fern + + splashscreen-batteryempty-chaotic_ribbon + splashscreen-poweroff-chaotic_ribbon + splashscreen-starting-chaotic_ribbon + splashscreen-suspended-chaotic_ribbon + + splashscreen-batteryempty-collatz_sea_weed + splashscreen-poweroff-collatz_sea_weed + splashscreen-starting-collatz_sea_weed + splashscreen-suspended-collatz_sea_weed + + splashscreen-batteryempty-dragon_curve + splashscreen-poweroff-dragon_curve + splashscreen-starting-dragon_curve + splashscreen-suspended-dragon_curve + + splashscreen-batteryempty-fire + splashscreen-poweroff-fire + splashscreen-starting-fire + splashscreen-suspended-fire + + splashscreen-batteryempty-fractal_tree + splashscreen-poweroff-fractal_tree + splashscreen-starting-fractal_tree + splashscreen-suspended-fractal_tree + + splashscreen-batteryempty-sacks_spiral + splashscreen-poweroff-sacks_spiral + splashscreen-starting-sacks_spiral + splashscreen-suspended-sacks_spiral + + splashscreen-batteryempty-sierpinski_triangle + splashscreen-poweroff-sierpinski_triangle + splashscreen-starting-sierpinski_triangle + splashscreen-suspended-sierpinski_triangle + + splashscreen-batteryempty-snowy_hills + splashscreen-poweroff-snowy_hills + splashscreen-starting-snowy_hills + splashscreen-suspended-snowy_hills + + splashscreen-batteryempty-starr + splashscreen-poweroff-starr + splashscreen-starting-starr + splashscreen-suspended-starr +) +url=https://github.com/engeir/remarkable-splashscreens +pkgver=0.0.0-1 +timestamp=2023-05-19T06:37:08Z +section="splashscreens" +maintainer="Eeems " +license=MIT +installdepends=(changescrn) + +source=("https://github.com/engeir/remarkable-splashscreens/archive/18e2c2a4d1d278240079ff4eb848d5e5255cc3f2.zip") +sha256sums=(ac49db5539d3901e02b8b94b381bed6a98002371378bf2d4ffa804c80eae0efb) + +splashscreen-batteryempty-barnsley_fern() { + pkgdesc="Barnsley Fern battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/barnsley_fern/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-barnsley_fern() { + pkgdesc="Barnsley Fern power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/barnsley_fern/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-barnsley_fern() { + pkgdesc="Barnsley Fern starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/barnsley_fern/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-barnsley_fern() { + pkgdesc="Barnsley Fern suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/barnsley_fern/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-chaotic_ribbon() { + pkgdesc="Chaotic ribbon battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/chaotic_ribbon/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-chaotic_ribbon() { + pkgdesc="Chaotic ribbon power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/chaotic_ribbon/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-chaotic_ribbon() { + pkgdesc="Chaotic ribbon starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/chaotic_ribbon/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-chaotic_ribbon() { + pkgdesc="Chaotic ribbon suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/chaotic_ribbon/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-collatz_sea_weed() { + pkgdesc="Collatz sea weed battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/collatz_sea_weed/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-collatz_sea_weed() { + pkgdesc="Collatz sea weed power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/collatz_sea_weed/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-collatz_sea_weed() { + pkgdesc="Collatz sea weed starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/collatz_sea_weed/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-collatz_sea_weed() { + pkgdesc="Collatz sea weed suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/collatz_sea_weed/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-dragon_curve() { + pkgdesc="Dragon curve battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/dragon_curve/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-dragon_curve() { + pkgdesc="Dragon curve power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/dragon_curve/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-dragon_curve() { + pkgdesc="Dragon curve starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/dragon_curve/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-dragon_curve() { + pkgdesc="Dragon curve suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/dragon_curve/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-fire() { + pkgdesc="Fire battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fire/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-fire() { + pkgdesc="Fire power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fire/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-fire() { + pkgdesc="Fire starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fire/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-fire() { + pkgdesc="Fire suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fire/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-fractal_tree() { + pkgdesc="Fractal tree battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fractal_tree/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-fractal_tree() { + pkgdesc="Fractal tree power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fractal_tree/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-fractal_tree() { + pkgdesc="Fractal tree starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fractal_tree/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-fractal_tree() { + pkgdesc="Fractal tree suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/fractal_tree/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-sacks_spiral() { + pkgdesc="Sacks spiral battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sacks_spiral/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-sacks_spiral() { + pkgdesc="Sacks spiral power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sacks_spiral/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-sacks_spiral() { + pkgdesc="Sacks spiral starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sacks_spiral/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-sacks_spiral() { + pkgdesc="Sacks spiral suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sacks_spiral/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-sierpinski_triangle() { + pkgdesc="Sierpinski triangle battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sierpinski_triangle/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-sierpinski_triangle() { + pkgdesc="Sierpinski triangle power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sierpinski_triangle/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-sierpinski_triangle() { + pkgdesc="Sierpinski triangle starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sierpinski_triangle/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-sierpinski_triangle() { + pkgdesc="Sierpinski triangle suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/sierpinski_triangle/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-snowy_hills() { + pkgdesc="Snowy hills battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/snowy_hills/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-snowy_hills() { + pkgdesc="Snowy hills power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/snowy_hills/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-snowy_hills() { + pkgdesc="Snowy hills starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/snowy_hills/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-snowy_hills() { + pkgdesc="Snowy hills suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/snowy_hills/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} + +splashscreen-batteryempty-starr() { + pkgdesc="Starr battery empty splashscreen" + replaces=("splashscreen-batteryempty") + conflicts=("splashscreen-batteryempty") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/starr/batteryempty.png + } + configure() { + changescrn -c batteryempty /opt/share/remarkable/splashscreens/batteryempty.png + } + postremove() { + changescrn -r batteryempty + } +} + +splashscreen-poweroff-starr() { + pkgdesc="Starr power off splashscreen" + replaces=("splashscreen-poweroff") + conflicts=("splashscreen-poweroff") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/starr/poweroff.png + } + configure() { + changescrn -c poweroff /opt/share/remarkable/splashscreens/poweroff.png + } + postremove() { + changescrn -r poweroff + } +} + +splashscreen-starting-starr() { + pkgdesc="Starr starting splashscreen" + replaces=("splashscreen-starting") + conflicts=("splashscreen-starting") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/starr/starting.png + } + configure() { + changescrn -c starting /opt/share/remarkable/splashscreens/starting.png + } + postremove() { + changescrn -r starting + } +} + +splashscreen-suspended-starr() { + pkgdesc="Starr suspended splashscreen" + replaces=("splashscreen-suspended") + conflicts=("splashscreen-suspended") + package() { + install -D -m 755 -t "$pkgdir"/opt/share/remarkable/splashscreens \ + "$srcdir"/splashscreens/starr/suspended.png + } + configure() { + changescrn -c suspended /opt/share/remarkable/splashscreens/suspended.png + } + postremove() { + changescrn -r suspended + } +} From ee79e99bfd348f5b414fbad59b76e56fa91c420b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 Nov 2023 14:01:40 -0700 Subject: [PATCH 077/178] Call update-desktop-database to refresh Oxide's application cache on install (#700) * Update oxide to v2.6 * Style fixes * Add missing pkgnames * Update image paths * Fix liboxide path * Don't check to see if tarnish is active update-desktop-database safely handles tarnish not running. * update-desktop-database for all applicaitons * Update build image for plato * Re-trigger CI Most likely a one-off error: Timeout when connecting to github * Update to latest image for zoneinfo-utils * Add libc6 build dependency to zoneinfo-utils * Revert all changes to zoneinfo-utils * Update all packages to use install-lib method * Fix formatting * Also run oxide hook for draft apps * Remove manual reload-oxide-apps calls * Bump all other packages that have draft/oxide files * Format fixes * Add back missing documentation change * Don't update whiteboard-hypercard This package is failing to build * Revert folly version * Bump whiteboard-hypercard now that the build is fixed * Bump xochitl version number * Use github for KOReader release --------- Co-authored-by: Linus Co-authored-by: Jayy001 <56607897+Jayy001@users.noreply.github.com> --- docs/package.md | 9 +++++++++ package/calculator/package | 2 +- package/chessmarkable/package | 2 +- package/doomarkable/package | 2 +- package/fingerterm/package | 2 +- package/keywriter/package | 2 +- package/koreader/package | 4 ++-- package/netsurf/package | 2 +- package/oxide/package | 19 ------------------- package/plato/package | 2 +- package/puzzles/package | 2 +- package/recrossable/package | 2 +- package/regenda/package | 2 +- package/reterm/package | 8 +------- package/retris/package | 2 +- package/rmfm/package | 2 +- package/rmkit/package | 15 ++++++--------- package/sill/package | 2 +- package/tilem/package | 2 +- package/vnsee/package | 2 +- package/whiteboard-hypercard/package | 2 +- package/wikipedia/package | 2 +- package/xochitl/package | 2 +- package/yaft/package | 2 +- package/zshelf/package | 2 +- scripts/install-lib | 12 ++++++++++-- scripts/toltec/builder.py | 4 +++- 27 files changed, 51 insertions(+), 60 deletions(-) diff --git a/docs/package.md b/docs/package.md index a8d56526e..1342df0ac 100644 --- a/docs/package.md +++ b/docs/package.md @@ -440,3 +440,12 @@ When upgrading a package from version A to B, the following happens: * `postupgrade B`, if it exists, is called from version A * New package files are unpacked and installed * `configure`, if it exists, is called from version B + + +### reload-oxide-apps hook + +If a package contains one or more files in `/opt/etc/draft` or `/opt/usr/share/applications` the `reload-oxide-apps` method in `install-lib` will be appended to the following: + +* `configure` +* `postupgrade` +* `postremove` diff --git a/package/calculator/package b/package/calculator/package index 072063a15..092ef00d6 100644 --- a/package/calculator/package +++ b/package/calculator/package @@ -5,7 +5,7 @@ pkgnames=(calculator) pkgdesc="Touch-based calculator" url=https://github.com/reHackable/Calculator -pkgver=0.0.0-15 +pkgver=0.0.0-16 timestamp=2020-08-20T12:28Z section="math" maintainer="Mattéo Delabre " diff --git a/package/chessmarkable/package b/package/chessmarkable/package index f8a4b50bd..6258ab355 100644 --- a/package/chessmarkable/package +++ b/package/chessmarkable/package @@ -5,7 +5,7 @@ pkgnames=(chessmarkable) pkgdesc="Chess game" url=https://github.com/LinusCDE/chessmarkable -pkgver=0.8.0-1 +pkgver=0.8.0-2 timestamp=2021-07-22T12:04Z section="games" maintainer="Linus K. " diff --git a/package/doomarkable/package b/package/doomarkable/package index 14863079f..3e5ae8735 100644 --- a/package/doomarkable/package +++ b/package/doomarkable/package @@ -5,7 +5,7 @@ pkgnames=(doomarkable) pkgdesc="DOOM game" url=https://github.com/LinusCDE/doomarkable -pkgver=0.4.1-1 +pkgver=0.4.1-2 timestamp=2021-10-31T16:15Z section="games" maintainer="Linus K. " diff --git a/package/fingerterm/package b/package/fingerterm/package index 03dc4956e..80a8ea8e7 100644 --- a/package/fingerterm/package +++ b/package/fingerterm/package @@ -5,7 +5,7 @@ pkgnames=(fingerterm) pkgdesc="Terminal emulator with an on-screen touch keyboard" url=https://github.com/dixonary/fingerterm-reMarkable -pkgver=1.3.5-14 +pkgver=1.3.5-15 timestamp=2020-10-27T12:02Z section="admin" maintainer="Mattéo Delabre " diff --git a/package/keywriter/package b/package/keywriter/package index 542a6359d..32ab6d891 100644 --- a/package/keywriter/package +++ b/package/keywriter/package @@ -5,7 +5,7 @@ pkgnames=(keywriter) pkgdesc="Markdown-enabled free writing app" url=https://github.com/dps/remarkable-keywriter -pkgver=0.2~20-gddc9e73-1 +pkgver=0.2~20-gddc9e73-2 timestamp=2022-02-09T07:05:03Z section="writing" maintainer="Mattéo Delabre " diff --git a/package/koreader/package b/package/koreader/package index 09a02d6e2..79e03cdc7 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.08-1 +pkgver=2023.08-2 timestamp=2023-08-29T16:21:01Z section="readers" maintainer="raisjn " @@ -14,7 +14,7 @@ installdepends=(fbink fbdepth display rm2fb-client) _srcver="v${pkgver%-*}" source=( - "https://build.koreader.rocks/download/stable/$_srcver/koreader-remarkable-$_srcver.zip" + "https://github.com/koreader/koreader/releases/download/$_srcver/koreader-remarkable-$_srcver.zip" koreader.draft KOReader.oxide koreader-toltec.service diff --git a/package/netsurf/package b/package/netsurf/package index 8213b73fb..74d427851 100644 --- a/package/netsurf/package +++ b/package/netsurf/package @@ -5,7 +5,7 @@ pkgnames=(netsurf) pkgdesc="Lightweight web browser" url=https://github.com/alex0809/netsurf-reMarkable -pkgver=0.4.0-2 +pkgver=0.4.0-3 timestamp=2021-05-31T11:15+00:00 maintainer="Alex Friesenhahn " archs=(rmall) diff --git a/package/oxide/package b/package/oxide/package index 1db608f78..993d16996 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -49,10 +49,6 @@ fret() { 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 } - - configure() { - update-desktop-database - } } oxide() { @@ -66,9 +62,6 @@ oxide() { 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 } - configure() { - update-desktop-database - } } rot() { @@ -128,10 +121,6 @@ decay() { 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 } - - configure() { - update-desktop-database - } } corrupt() { pkgdesc="Task Switcher for Oxide" @@ -142,10 +131,6 @@ corrupt() { 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 } - - configure() { - update-desktop-database - } } anxiety() { @@ -159,10 +144,6 @@ anxiety() { install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/48x48/apps "$srcdir"/release/opt/usr/share/icons/oxide/48x48/apps/image.png install -D -m 644 -t "$pkgdir"/opt/usr/share/icons/oxide/702x702/splash "$srcdir"/release/opt/usr/share/icons/oxide/702x702/splash/anxiety.png } - - configure() { - update-desktop-database - } } oxide-utils() { diff --git a/package/plato/package b/package/plato/package index 45ddcacd3..c58215fcd 100644 --- a/package/plato/package +++ b/package/plato/package @@ -5,7 +5,7 @@ pkgnames=(plato) pkgdesc="Document reader" url=https://github.com/LinusCDE/plato -pkgver=0.9.34-1 +pkgver=0.9.34-2 timestamp=2023-03-08T17:58Z section="readers" maintainer="Linus K. " diff --git a/package/puzzles/package b/package/puzzles/package index c8be2ea79..3af1b64d3 100644 --- a/package/puzzles/package +++ b/package/puzzles/package @@ -5,7 +5,7 @@ pkgnames=(puzzles) timestamp=2021-03-04T14:03-08:00 maintainer="Mattéo Delabre " -pkgver=0.2.2-3 +pkgver=0.2.2-4 license=MIT pkgdesc="Simon Tatham's Puzzle Package" url="https://github.com/mrichards42/remarkable_puzzles" diff --git a/package/recrossable/package b/package/recrossable/package index 7b191353b..476b87bef 100644 --- a/package/recrossable/package +++ b/package/recrossable/package @@ -5,7 +5,7 @@ pkgnames=(recrossable) pkgdesc="Solve crossword puzzles" url=https://github.com/sandsmark/recrossable -pkgver=0.0.0-7 +pkgver=0.0.0-8 timestamp=2021-01-15T12:58:22Z section="games" maintainer="Mattéo Delabre " diff --git a/package/regenda/package b/package/regenda/package index e899d531e..1f2b48c9b 100644 --- a/package/regenda/package +++ b/package/regenda/package @@ -5,7 +5,7 @@ pkgnames=(regenda) pkgdesc="Caldav agenda app" url=https://github.com/tenJirka/reGenda -pkgver=0.0.2-1 +pkgver=0.0.2-2 timestamp=2023-09-06T06:45Z section="utils" maintainer="tenJirka " diff --git a/package/reterm/package b/package/reterm/package index a0a37a6d2..f8dee0995 100644 --- a/package/reterm/package +++ b/package/reterm/package @@ -4,7 +4,7 @@ pkgnames=(reterm) pkgdesc="Landscape terminal support for the Remarkable 2 + type cover" section="admin" -pkgver="20230628.1927-1" +pkgver="20230628.1927-2" timestamp="2023-06-28T19:28:06Z" maintainer="Eeems " url="https://github.com/i-am-shodan/ReTerm" @@ -49,9 +49,3 @@ package() { install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/draft/reterm.png install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/oxide/reterm.oxide } - -configure() { - if is-active "tarnish.service"; then - type update-desktop-database &> /dev/null && update-desktop-database - fi -} diff --git a/package/retris/package b/package/retris/package index 173b5d8ba..db8a00839 100644 --- a/package/retris/package +++ b/package/retris/package @@ -5,7 +5,7 @@ pkgnames=(retris) pkgdesc="Tetris game" url=https://github.com/LinusCDE/retris -pkgver=0.6.3-3 +pkgver=0.6.3-4 timestamp=2021-01-30T02:41Z section="games" maintainer="Linus K. " diff --git a/package/rmfm/package b/package/rmfm/package index ffec3e72b..aeeb76484 100644 --- a/package/rmfm/package +++ b/package/rmfm/package @@ -5,7 +5,7 @@ pkgnames=(rmfm) pkgdesc="Bare-bones file manager using Node.js and sas" url="https://forgejo.sny.sh/sun/rmFM" -pkgver=1.5.0-1 +pkgver=1.5.0-2 timestamp=2023-08-08T22:19:23+02:00 section=utils maintainer="Sunny " diff --git a/package/rmkit/package b/package/rmkit/package index 9c5cda508..be1585793 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -40,14 +40,13 @@ bufshot() { dumbskull() { pkgdesc="Dungeon Crawl themed Solitaire" url="https://rmkit.dev/apps/dumbskull" - pkgver=0.0.1-2 + pkgver=0.0.1-3 section="games" package() { install -D -m 755 "$srcdir"/src/build/dumbskull "$pkgdir"/opt/bin/dumbskull install -D -m 644 "$srcdir"/src/dumbskull/dumbskull.draft "$pkgdir"/opt/etc/draft/dumbskull.draft } - } genie() { @@ -80,7 +79,7 @@ genie() { harmony() { pkgdesc="Procedural sketching app" url="https://rmkit.dev/apps/harmony" - pkgver=0.2.2-1 + pkgver=0.2.2-2 section="drawing" package() { @@ -120,7 +119,7 @@ lamp() { mines() { pkgdesc="Mine detection game" url="https://rmkit.dev/apps/minesweeper" - pkgver=0.1.4-2 + pkgver=0.1.4-3 section="games" package() { @@ -133,7 +132,7 @@ mines() { nao() { pkgdesc="Nao Package Manager: opkg UI built with SAS" url="https://rmkit.dev/apps/nao" - pkgver=0.1.2-3 + pkgver=0.1.2-4 section="admin" installdepends+=(simple) @@ -179,7 +178,7 @@ remux() { rpncalc() { pkgdesc="RPN Calculator" url="https://rmkit.dev/apps/rpncalc" - pkgver=0.0.3-2 + pkgver=0.0.3-3 section="math" package() { @@ -187,7 +186,6 @@ rpncalc() { install -D -m 644 "$srcdir"/src/rpncalc/rpncalc.draft "$pkgdir"/opt/etc/draft/rpncalc.draft install -D -m 644 "$srcdir"/src/rpncalc/rpncalc.png "$pkgdir"/opt/etc/draft/icons/rpncalc.png } - } simple() { @@ -204,12 +202,11 @@ simple() { wordlet() { pkgdesc="Wordle clone" url="https://rmkit.dev/apps/wordlet" - pkgver=0.0.2-2 + pkgver=0.0.2-3 section="games" package() { install -D -m 755 "$srcdir"/src/build/wordlet "$pkgdir"/opt/bin/wordlet install -D -m 644 "$srcdir"/src/wordlet/wordlet.draft "$pkgdir"/opt/etc/draft/wordlet.draft } - } diff --git a/package/sill/package b/package/sill/package index 773f1e33a..f34ee5fe2 100644 --- a/package/sill/package +++ b/package/sill/package @@ -5,7 +5,7 @@ pkgnames=(sill) pkgdesc="Gesture-based text editor (and shell) for the reMarkable tablet" url=https://github.com/bkirwi/sill -pkgver=0.1.1-alpha +pkgver=0.1.1-1 section="writing" timestamp=2023-08-12T00:00Z maintainer="Kai " diff --git a/package/tilem/package b/package/tilem/package index 436678c87..0c5b954f3 100644 --- a/package/tilem/package +++ b/package/tilem/package @@ -5,7 +5,7 @@ pkgnames=(tilem) pkgdesc="TI-84+ calculator emulator" url=https://github.com/timower/rM2-stuff/tree/master/apps/tilem -pkgver=0.0.7-2 +pkgver=0.0.7-3 timestamp=2021-04-30T10:42Z maintainer="Mattéo Delabre " license=GPL-3.0 diff --git a/package/vnsee/package b/package/vnsee/package index 4ed1a8b1c..057220d0c 100644 --- a/package/vnsee/package +++ b/package/vnsee/package @@ -5,7 +5,7 @@ pkgnames=(vnsee) pkgdesc="VNC client allowing you to use the device as a second screen" url=https://github.com/matteodelabre/vnsee -pkgver=0.4.1-1 +pkgver=0.4.1-2 timestamp=2021-08-29T13:45:26Z section="screensharing" maintainer="Mattéo Delabre " diff --git a/package/whiteboard-hypercard/package b/package/whiteboard-hypercard/package index 2ae9a746d..581882d83 100644 --- a/package/whiteboard-hypercard/package +++ b/package/whiteboard-hypercard/package @@ -5,7 +5,7 @@ pkgnames=(whiteboard-hypercard) pkgdesc="Real-time collaboration, drawing or whiteboarding" url=https://github.com/fenollp/reMarkable-tools -pkgver=0.3.7-1 +pkgver=0.3.7-2 timestamp=2023-10-11T12:57Z section="drawing" maintainer="Pierre Fenoll " diff --git a/package/wikipedia/package b/package/wikipedia/package index a7c44adf6..a03eb4d22 100644 --- a/package/wikipedia/package +++ b/package/wikipedia/package @@ -5,7 +5,7 @@ pkgnames=(wikipedia) pkgdesc="The free encyclopedia" url=https://github.com/dps/remarkable-wikipedia -pkgver=0.1.0-3 +pkgver=0.1.0-4 timestamp=2021-03-11T04:50Z section="readers" maintainer="David Singleton " diff --git a/package/xochitl/package b/package/xochitl/package index 1aa004a27..1841988bf 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-15 +pkgver=0.0.0-16 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " diff --git a/package/yaft/package b/package/yaft/package index a08ab32d0..8a94a0946 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -6,7 +6,7 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft _tag=0.0.10 -pkgver=${_tag}-1 +pkgver=${_tag}-2 timestamp=2023-08-12T14:31Z maintainer="Mattéo Delabre " license=GPL-3.0 diff --git a/package/zshelf/package b/package/zshelf/package index bd1491464..0562ac3e3 100644 --- a/package/zshelf/package +++ b/package/zshelf/package @@ -5,7 +5,7 @@ pkgnames=(zshelf) pkgdesc="Z-Library browser and downloader" url=https://github.com/khanhas/zshelf -pkgver=0.3.1-3 +pkgver=0.3.1-4 section=utils timestamp=2021-02-20T01:45Z maintainer="khanhas " diff --git a/scripts/install-lib b/scripts/install-lib index cb98421bf..59c35e2bb 100644 --- a/scripts/install-lib +++ b/scripts/install-lib @@ -105,10 +105,18 @@ reload-oxide-apps() { return fi echo -n "Reloading Oxide applications: " - if ! /opt/bin/rot apps call reload 2> /dev/null; then - echo "Failed!" + local ret + if type update-desktop-database &> /dev/null; then + update-desktop-database --quiet + ret=$? else + /opt/bin/rot apps call reload 2> /dev/null + ret=$? + fi + if [ $ret -eq 0 ]; then echo "Done!" + else + echo "Failed!" fi } diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py index 27253eef2..ee14b0e29 100644 --- a/scripts/toltec/builder.py +++ b/scripts/toltec/builder.py @@ -548,7 +548,9 @@ def _archive(self, package: Package, pkg_dir: str) -> None: os.makedirs(ar_dir, exist_ok=True) # Inject Oxide-specific hook for reloading apps - if os.path.exists(os.path.join(pkg_dir, "opt/usr/share/applications")): + if os.path.exists( + os.path.join(pkg_dir, "opt/usr/share/applications") + ) or os.path.exists(os.path.join(pkg_dir, "opt/etc/draft")): oxide_hook = "\nreload-oxide-apps\n" package.functions["configure"] += oxide_hook package.functions["postupgrade"] += oxide_hook From 8115ee4d6466bc4d3a37c7209dde56bd7ec70cee Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Mon, 27 Nov 2023 01:19:35 +0100 Subject: [PATCH 078/178] Add package for wireguard-tools (#743) * Add package for wireguard-tools * Pull in provides from #600 * Add provides to wireguard packages * add conflicts --------- Co-authored-by: Nathaniel van Diepen --- docs/package.md | 15 +++++++++++++++ package/wireguard-tools/package | 32 ++++++++++++++++++++++++++++++++ package/wireguard/package | 1 + scripts/toltec/recipe.py | 4 +++- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100755 package/wireguard-tools/package diff --git a/docs/package.md b/docs/package.md index 1342df0ac..72a9bdca8 100644 --- a/docs/package.md +++ b/docs/package.md @@ -405,6 +405,21 @@ A list of packages that the current package replaces. Setting this field allows the current package to overwrite and take ownership of files from other packages. Note that the replaced packages will not be automatically uninstalled unless you also declare a conflict with them using the [`conflicts` field](#conflicts-field). +#### `provides` field + + + + + + + + + +
Required?No, defaults to () +
TypeArray of strings
+ +A list of virtual packages that the current package provides. + #### `package()` function The `package()` function populates the `$pkgdir` directory with the files and directories that need to be installed using artifacts from the `$srcdir` directory. diff --git a/package/wireguard-tools/package b/package/wireguard-tools/package new file mode 100755 index 000000000..87bbb3971 --- /dev/null +++ b/package/wireguard-tools/package @@ -0,0 +1,32 @@ +#!/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 d01ce5f3a..67b900c9d 100755 --- a/package/wireguard/package +++ b/package/wireguard/package @@ -13,6 +13,7 @@ maintainer="Jonah Weissman " license=GPL-2.0-only makedepends=(build:bc build:lzop build:git) flags=(nostrip) +provides=(wireguard-tools) _kernelrepo=https://github.com/remarkable/linux _kernelrevs=( diff --git a/scripts/toltec/recipe.py b/scripts/toltec/recipe.py index fc1cf9ae0..de3844490 100644 --- a/scripts/toltec/recipe.py +++ b/scripts/toltec/recipe.py @@ -344,6 +344,7 @@ class Package: # pylint:disable=too-many-instance-attributes installdepends: Set[Dependency] conflicts: Set[Dependency] replaces: Set[Dependency] + provides: Set[Dependency] functions: bash.Functions custom_functions: bash.Functions @@ -391,7 +392,7 @@ def _load_fields(self, variables: bash.Variables) -> None: self.license = _pop_field_string(variables, "license") self.variables["license"] = self.license - for field in ("installdepends", "conflicts", "replaces"): + for field in ("installdepends", "conflicts", "replaces", "provides"): field_raw = _pop_field_indexed(variables, field, []) self.variables[field] = field_raw setattr(self, field, set()) @@ -483,6 +484,7 @@ def control_fields(self) -> str: ("Depends", self.installdepends), ("Conflicts", self.conflicts), ("Replaces", self.replaces), + ("Provides", self.provides), ): if field: control += ( From 872034cf83402d60929f9730d286476a67ef9467 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Tue, 28 Nov 2023 22:59:45 +0100 Subject: [PATCH 079/178] linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4 and add wireguard (#742) * linux-stracciatella: update sources to RM1XX_5.4.70_v1.3.4 * Bump build image to v3.1 * Add wireguard module to linux-stracciatella * Move wireguard config out of sources * Remove debug symbols for rM1 --------- Co-authored-by: Nathaniel van Diepen --- package/linux-stracciatella/package | 30 ++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/package/linux-stracciatella/package b/package/linux-stracciatella/package index 74111f4a7..e0fe100eb 100644 --- a/package/linux-stracciatella/package +++ b/package/linux-stracciatella/package @@ -6,17 +6,37 @@ 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-2 -timestamp=2022-09-26T21:23:39Z +pkgver=5.4.70-3 +timestamp=2023-09-23T00:12:00Z 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) license=GPL-2.0-only flags=(nostrip) installdepends=(kernelctl) -image=base:v2.3 -source=(https://github.com/Etn40ff/linux-remarkable/archive/41121ea10ed2235c441cfe717461988859d7f5b6.tar.gz) -sha256sums=(ade87a10bfa7069222cbf8eb1d00ca460d38aab9685223d2fa3ee4f363a75cfa) +image=base:v3.1 +_wireguard_version=1.0.20220627 +source=( + https://github.com/Etn40ff/linux-remarkable/archive/c908b16d6b848964ecc9b116a024f247c290a1bf.tar.gz + "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-$_wireguard_version.tar.xz" +) +sha256sums=( + 2075b9eb69172751b3e8e0d3a40d63c0c05982e79a2724ed7c3bdfc4f7988eea + 362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0 +) +noextract=("wireguard-linux-compat-$_wireguard_version.tar.xz") + +prepare() { + # Jury-rig the wireguard module into sources and enable it + mkdir "$srcdir/net/wireguard" + bsdtar --strip-components 2 -xJ -C "$srcdir/net/wireguard" \ + -f "$srcdir/wireguard-linux-compat-$_wireguard_version.tar.xz" \ + "wireguard-linux-compat-$_wireguard_version/src" + sed -i "/^obj-\\\$(CONFIG_NETFILTER).*+=/a obj-\$(CONFIG_WIREGUARD) += wireguard/" "$srcdir/net/Makefile" + sed -i "/^if INET\$/a source \"net/wireguard/Kconfig\"" "$srcdir/net/Kconfig" + echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-gravitas_defconfig" + echo "CONFIG_WIREGUARD=m" >> "$srcdir/arch/arm/configs/zero-sugar_defconfig" +} build() { if [[ $arch = rm1 ]]; then From 809c86d210cd216913943643884bc53597fa72d8 Mon Sep 17 00:00:00 2001 From: Dmitrii Odintcov <46854921+CyprusSocialite@users.noreply.github.com> Date: Wed, 6 Dec 2023 04:03:06 +0200 Subject: [PATCH 080/178] Update display/rm2fb-client to v0.0.32 (#758) Add support for OS 3.3.2.1666 --- package/display/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/display/package b/package/display/package index 9cb5abf8d..4e2937383 100644 --- a/package/display/package +++ b/package/display/package @@ -4,11 +4,11 @@ archs=(rm1 rm2) pkgnames=(display rm2fb-client) -timestamp=2023-04-16T20:53:38Z +timestamp=2023-08-27T02:39:10Z maintainer="raisjn " license=MIT url="https://github.com/ddvk/remarkable2-framebuffer" -pkgver=1:0.0.31-2 +pkgver=1:0.0.32-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - c27081be9b4fa000e41489b42d53fb8254bd8bf348a34756799488827dbc0f0b + 603eef1688a8c3adb1df23f4f00fe12b80938fe99801b515cd74f84c8cede5b1 SKIP SKIP SKIP From e5e268c654b17df435922f02f1e9efc0d78145b2 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 6 Dec 2023 13:18:15 -0700 Subject: [PATCH 081/178] 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 082/178] 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 083/178] 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 084/178] 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 085/178] 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 086/178] 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 087/178] 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 088/178] 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 089/178] 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 090/178] 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 091/178] 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 092/178] 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 093/178] 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 094/178] 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 095/178] 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 096/178] 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 097/178] 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 098/178] 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 099/178] 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 100/178] 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 101/178] 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 102/178] 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 103/178] 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 104/178] 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 105/178] 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 106/178] 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 107/178] 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 108/178] 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 109/178] 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 110/178] 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 111/178] 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 112/178] 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 113/178] 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 114/178] [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 115/178] 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 116/178] 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 117/178] 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 118/178] 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 119/178] 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 120/178] 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) From 4deedad1523bc1ab9a544e3f5ca093a3a8a5b368 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Mon, 20 May 2024 18:12:58 -0500 Subject: [PATCH 121/178] Update package: neofetch (#843) Co-authored-by: Nathaniel van Diepen --- package/neofetch/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/neofetch/package b/package/neofetch/package index ae1da866a..54cff1ae6 100644 --- a/package/neofetch/package +++ b/package/neofetch/package @@ -5,18 +5,18 @@ pkgnames=(neofetch) pkgdesc="A command-line system information tool" url="https://github.com/rM-self-serve/neofetch-rM" -pkgver=1.1.0-1 -timestamp=2023-12-06T11:43:00Z +pkgver=1.1.1-1 +timestamp=2024-03-14T11: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/955997e4e3b8be682f40ee54366e44337df68959.zip + "$url"/archive/6dfc7a7b0c10f451bdd8a09813ab6dea01ef6be2.zip ) sha256sums=( - 451017bd2517cf8c124af772e77b316ad784507709219e5831b28f613830f7e5 + 798ddbcb196b382e6bb70b3da08bc0e745c8b6da0bfe4ea5cd66653d383e5b1d ) package() { From 2f5203c8ed66ac196f71be43d9a0c36f7516fba3 Mon Sep 17 00:00:00 2001 From: reMiss <122753594+rM-self-serve@users.noreply.github.com> Date: Mon, 20 May 2024 18:21:29 -0500 Subject: [PATCH 122/178] Add package: webinterface-localhost (#842) * Add package: webinterface-localhost * enable automatically --------- Co-authored-by: Nathaniel van Diepen --- package/webinterface-localhost/package | 49 +++++++++++++++++++ .../webinterface-localhost.service | 8 +++ .../webinterface-localhost.socket | 7 +++ requirements.txt | 3 ++ 4 files changed, 67 insertions(+) create mode 100644 package/webinterface-localhost/package create mode 100644 package/webinterface-localhost/webinterface-localhost.service create mode 100644 package/webinterface-localhost/webinterface-localhost.socket diff --git a/package/webinterface-localhost/package b/package/webinterface-localhost/package new file mode 100644 index 000000000..da657551a --- /dev/null +++ b/package/webinterface-localhost/package @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# Copyright (c) 2020 The Toltec Contributors +# SPDX-License-Identifier: MIT + +_pkgname="webinterface-localhost" +pkgnames=("$_pkgname") +pkgdesc="View the web interface if running, on localhost. Useful for tailscale." +url=https://toltec-dev.org/ +pkgver=0.0.0-1 +timestamp=2024-03-11T13:03:16Z +section="utils" +maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" +license=MIT + +source=( + "$_pkgname.socket" + "$_pkgname.service" +) + +sha256sums=( + SKIP + SKIP +) + +package() { + install -D -m 644 -t "$pkgdir/lib/systemd/system" \ + "$srcdir/$_pkgname.socket" + install -D -m 644 -t "$pkgdir/lib/systemd/system" \ + "$srcdir/$_pkgname.service" +} + +configure() { + systemctl daemon-reload + + if is-active "$pkgname".socket; then + echo "Restarting $pkgname" + systemctl restart "$pkgname".socket + fi + + systemctl enable --now "$pkgname.socket" +} + +preremove() { + disable-unit "$pkgname.socket" +} + +postremove() { + systemctl daemon-reload +} diff --git a/package/webinterface-localhost/webinterface-localhost.service b/package/webinterface-localhost/webinterface-localhost.service new file mode 100644 index 000000000..bf93761a3 --- /dev/null +++ b/package/webinterface-localhost/webinterface-localhost.service @@ -0,0 +1,8 @@ +[Unit] +Description=View the web interface if running, on localhost +Requires=webinterface-localhost.socket +After=webinterface-localhost.socket + +[Service] +Type=notify +ExecStart=/lib/systemd/systemd-socket-proxyd 10.11.99.1:80 diff --git a/package/webinterface-localhost/webinterface-localhost.socket b/package/webinterface-localhost/webinterface-localhost.socket new file mode 100644 index 000000000..25c2f8e90 --- /dev/null +++ b/package/webinterface-localhost/webinterface-localhost.socket @@ -0,0 +1,7 @@ +[Socket] +Description=View the web interface if running, on localhost +ListenStream=127.0.0.1:80 +FreeBind=true + +[Install] +WantedBy=sockets.target diff --git a/requirements.txt b/requirements.txt index 1302931a4..45207f4ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,6 @@ Jinja2==3.1.2 types-python-dateutil==2.8.19.14 types-requests==2.31.0.2 typing-extensions==4.7.1 + +# Pinned due to https://github.com/docker/docker-py/issues/3256 +requests==2.31.0 From 9b383aa3c21ba64ba474e6e9a5b558c71d53b118 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 21 May 2024 11:47:35 -0600 Subject: [PATCH 123/178] Update KOReader to v2024.04 (#838) * Update KOReader to v2024.03 * Update KOReader to v2024.03.1 * Update KOReader to v2024.04 --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 9f91852d2..3d6126a71 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=2024.01-1 -timestamp=2024-01-11T17:16:35Z +pkgver=2024.04-1 +timestamp=2024-04-29T19:56:05Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -21,7 +21,7 @@ source=( koreader ) sha256sums=( - 2616c7f0c63d54810f4ec78477ecb5dac2443990c7d2c8188c577ad5d925cca1 + e6b3a5a2c8cde8ca0c469fe542d6e170502fcf39b9a55e4447a7acd02b4a12c0 SKIP SKIP SKIP From 9ef289166caddff332bd86b9e3ebcb107b18b386 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 21 May 2024 11:50:40 -0600 Subject: [PATCH 124/178] Update display to v0.0.33 (#829) Allow disabling rm2fb-client with the RM2FB_DISABLE environment variable --- package/display/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/display/package b/package/display/package index affb56eee..8f3bd3029 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-2 +pkgver=1:0.0.33-1 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -23,7 +23,7 @@ source=( rm2fb-preload.env ) sha256sums=( - 603eef1688a8c3adb1df23f4f00fe12b80938fe99801b515cd74f84c8cede5b1 + dd57f1ba31f08a28d801989e9a705bd93cc637cd8f4dffa160412119e69329ff SKIP SKIP SKIP From aca05389944dd13173b259acbfa53c35e0d828cf Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 21 May 2024 11:53:31 -0600 Subject: [PATCH 125/178] Update netevent to 2.2.2 (#800) --- package/netevent/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/netevent/package b/package/netevent/package index d30293bf8..e1efee9ab 100644 --- a/package/netevent/package +++ b/package/netevent/package @@ -5,8 +5,8 @@ pkgnames=(netevent) pkgdesc="Input-Event device cloning utility" url="https://github.com/Blub/netevent" -pkgver=2.2.1-1 -timestamp=2021-12-03T19:43:04+01:00 +pkgver=2.2.2-1 +timestamp=2023-04-29T14:21:02Z section=utils maintainer="Salvatore Stella " license=GPL-2.0-only @@ -16,7 +16,7 @@ source=( "https://github.com/Blub/netevent/archive/refs/tags/${pkgver%-*}.tar.gz" ) sha256sums=( - ba1289cc04aef563baa9cc203111af3980a9311442233ffcf76760cda9f6aa69 + 09c0e97cd5c2cf5ed51e44ce955cc28cfa2cd0022bd48241f1096bc441439d3a ) build() { From 317e047bf2884b1ddfb2f5fdf863dd751165e566 Mon Sep 17 00:00:00 2001 From: Timothy Werquin Date: Thu, 23 May 2024 01:58:07 +0200 Subject: [PATCH 126/178] Add support for rm-sync in xochitl package (#718) * Add support for rm-sync in xochitl package Recent xochitl versions renamed the sync service and binary to rm-sync. This updates the xochitl package to support both. * Use file checks to determine rm-sync vs sync * Update package/xochitl/package Co-authored-by: Nathaniel van Diepen * Update to use new disable-unit method * Update package * Update package version * Fix unit-exists --------- Co-authored-by: Nathaniel van Diepen --- ...nual-sync.service => manual-sync@.service} | 4 +- package/xochitl/package | 37 +++++++++++++------ package/xochitl/xochitl | 13 ++++++- scripts/install-lib | 2 +- 4 files changed, 40 insertions(+), 16 deletions(-) rename package/xochitl/{manual-sync.service => manual-sync@.service} (89%) diff --git a/package/xochitl/manual-sync.service b/package/xochitl/manual-sync@.service similarity index 89% rename from package/xochitl/manual-sync.service rename to package/xochitl/manual-sync@.service index 359f84849..386011a02 100644 --- a/package/xochitl/manual-sync.service +++ b/package/xochitl/manual-sync@.service @@ -6,14 +6,14 @@ Description=reMarkable Document Sync without the xochitl.service dependency After=dbus.socket StartLimitIntervalSec=60 StartLimitBurst=4 -Conflicts=sync.service +Conflicts=%i.service [Service] # Do NOT make this dbus, systemd will kill the service when it should be # running otherwise. Type=simple BusName=no.remarkable.sync -ExecStart=/usr/bin/sync --service +ExecStart=/usr/bin/%i --service Restart=on-failure RestartForceExitStatus=SIGHUP SIGINT SIGTERM SIGPIPE diff --git a/package/xochitl/package b/package/xochitl/package index 07fa0a042..0db662542 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-17 +pkgver=0.0.0-18 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " @@ -24,7 +24,7 @@ source=( toltec-after-launcher.conf toltec-wrapper.conf env-readme - manual-sync.service + manual-sync@.service ) sha256sums=( SKIP @@ -59,19 +59,30 @@ package() { install -D -m 644 -t "$pkgdir"/etc/systemd/system/remarkable-reboot.service.d \ "$srcdir"/toltec-after-launcher.conf install -D -m 644 -t "$pkgdir"/etc/systemd/system \ - "$srcdir"/manual-sync.service + "$srcdir"/manual-sync@.service } configure() { systemctl daemon-reload - # sync.service interferes with launchers - # we use manual-sync.service instead - if [[ "x$(systemctl is-enabled sync.service)" != "xmasked" ]]; then + # sync.service and rm-sync.service interfere with launchers + # we use manual-sync@.service instead + if [ -f /usr/bin/sync ] && ! is-masked sync.service; then systemctl mask sync.service fi - if ! is-active manual-sync.service; then - systemctl enable --now manual-sync.service + + if [ -f /usr/bin/rm-sync ] && ! is-masked rm-sync.service; then + systemctl mask rm-sync.service + fi + + # manual-sync.service has been changed to manual-sync@.service + # Make sure to disable and stop the old version + disable-unit manual-sync.service + + if [ -f /usr/bin/rm-sync ] && ! is-active manual-sync@rm-sync.service; then + systemctl enable --now manual-sync@rm-sync.service + elif [ -f /usr/bin/sync ] && ! is-active manual-sync@sync.service; then + systemctl enable --now manual-sync@sync.service fi if is-enabled xochitl.service && ! is-enabled launcher.service; then @@ -83,14 +94,18 @@ configure() { } preremove() { - disable-unit manual-sync.service + disable-unit manual-sync@rm-sync.service + disable-unit manual-sync@sync.service } postremove() { systemctl daemon-reload - if [[ "x$(systemctl is-enabled sync.service)" == "xmasked" ]]; then - systemctl unmask sync.service 2> /dev/null + if [ -f /usr/bin/sync ] && is-masked sync.service; then + systemctl unmask sync.service + fi + if [ -f /usr/bin/rm-sync ] && is-masked rm-sync.service; then + systemctl unmask rm-sync.service fi if is-enabled xochitl.service && is-enabled launcher.service; then diff --git a/package/xochitl/xochitl b/package/xochitl/xochitl index f16945fe0..4a2eb95f2 100644 --- a/package/xochitl/xochitl +++ b/package/xochitl/xochitl @@ -9,13 +9,22 @@ for file in /opt/etc/xochitl.env.d/*.env; do source "$file" fi done + # If for some reason, sync.service is no longer masked, re-mask it # The package install should have handled this, but something may # have changed it. if [[ "x$(systemctl is-enabled sync.service)" != "xmasked" ]]; then systemctl mask sync.service fi -if ! systemctl is-active --quiet manual-sync.service; then - systemctl enable --now manual-sync.service + +if [[ "x$(systemctl is-enabled rm-sync.service)" != "xmasked" ]]; then + systemctl mask rm-sync.service fi + +if [ -f /usr/bin/rm-sync ] && ! is-active manual-sync@rm-sync.service; then + systemctl enable --now manual-sync@rm-sync.service +elif [ -f /usr/bin/sync ] && ! is-active manual-sync@sync.service; then + systemctl enable --now manual-sync@sync.service +fi + exec -a /usr/bin/xochitl /usr/bin/xochitl "$@" diff --git a/scripts/install-lib b/scripts/install-lib index ae6cb5066..c151e2c59 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}" | /bin/grep -c "${1}" 2> /dev/null || echo "0")" -eq 1 ] + [ "$(systemctl --quiet list-unit-files "${1}" | /bin/grep -c "${1}" 2> /dev/null)" -eq 1 ] } # Stops and disabled a unit From f59a8d42924c3bd990b43b61d4174ed18b4aecbb Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 22 May 2024 19:39:05 -0600 Subject: [PATCH 127/178] Remove packages that don't work on os3 (#852) * Remove packages that don't work on os3 * Remove with toltec-deletions as well --- package/gocryptfs/package | 3 ++- package/innernet/package | 3 ++- package/linux-mainline/package | 4 ++-- package/toltec-deletions/package | 20 +++++++++++++++++--- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/package/gocryptfs/package b/package/gocryptfs/package index 2c7965ae1..c6b4dd8e9 100644 --- a/package/gocryptfs/package +++ b/package/gocryptfs/package @@ -2,11 +2,12 @@ # Copyright (c) 2020 The Toltec Contributors # SPDX-License-Identifier: MIT +archs=(rmallos2) pkgnames=(gocryptfs) pkgdesc="An encrypted overlay filesystem written in Go." url="https://nuetzlich.net/gocryptfs/" _srcver=2.0-beta2 -pkgver="$_srcver"-2 +pkgver="$_srcver"-3 timestamp=2021-03-22 section=utils maintainer="plan5 <30434574+plan5@users.noreply.github.com>" diff --git a/package/innernet/package b/package/innernet/package index 61f08ff16..db2510734 100644 --- a/package/innernet/package +++ b/package/innernet/package @@ -2,10 +2,11 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT +archs=(rmallos2) pkgnames=(innernet-client) pkgdesc="A private network system that uses WireGuard under the hood." url="https://github.com/tonarino/innernet" -pkgver=1.5.3-2 +pkgver=1.5.3-3 timestamp=2022-01-31T20:08:43Z section="utils" maintainer="plan5 <30434574+plan5@users.noreply.github.com>" diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 9838b9ead..8f8aa87da 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -2,11 +2,11 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rm2) +archs=(rm2os2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=6.2.0-2 +pkgver=6.2.0-3 timestamp=2022-05-22T21:50:09Z section=kernel maintainer="Alistair Francis " diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 74764e261..77153805d 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rmallos2 rmallos3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-1 +pkgver=0.1-2 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " @@ -14,8 +14,22 @@ license=MIT installdepends=(toltec-bootstrap) conflicts_rmallos2=() replaces_rmallos2=() -conflicts_rmallos3=(ddvk-hacks fuse wireguard) -replaces_rmallos3=(ddvk-hacks fuse wireguard) +conflicts_rmallos3=( + ddvk-hacks + fuse + wireguard + innernet-client + gocryptfs + linux-mainline +) +replaces_rmallos3=( + ddvk-hacks + fuse + wireguard + innernet-client + gocryptfs + linux-mainline +) source=() sha256sums=() From 9102aa701b02ef9e07ce76c950d5fda3668e3874 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 22 May 2024 23:05:16 -0600 Subject: [PATCH 128/178] Add zerotier-one (#713) * Add zerotier packages * Add zerotier wrapper package * Update examples in the doc * Make link happy * Fix doc files to update * Add epoch to zerotier wrapper package * Update to 1.12.0 * Update zerotier-one to 1.12.1 * Update To 1.12.2 * Update to use new disable-unit method --- package/zerotier-one/package | 93 ++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/zerotier-one/package diff --git a/package/zerotier-one/package b/package/zerotier-one/package new file mode 100644 index 000000000..2baabf2ef --- /dev/null +++ b/package/zerotier-one/package @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(zerotier zerotier-one zerotier-one-doc zerotier-selftest) +url=https://github.com/zerotier/ZeroTierOne +_upver=1.12.2 +pkgver=${_upver}-1 +timestamp=2023-03-23T17:39:31Z +maintainer="Eeems " +license=BUSL-1.1 +section="utils" +image=base:v3.0 + +source=("https://github.com/zerotier/ZeroTierOne/archive/refs/tags/${_upver}.zip") +sha256sums=(2089fc824c84985610f0bd60186c72e94e2592d8f38259a1c80ea8f696edd16b) + +build() { + sed -i \ + -e 's|/usr/sbin|/opt/bin|' \ + -e 's|/usr/share|/opt/share|' \ + -e 's|/var/lib|/opt/var/lib|' \ + make-linux.mk \ + debian/zerotier-one.service + sed -i \ + -e 's|/var/lib/zerotier-one|/opt/var/lib/zerotier-one|' \ + osdep/OSUtils.cpp + sed -i \ + -e 's|/var/lib/zerotier|/opt/var/lib/zerotier|' \ + doc/zerotier-cli.1 \ + doc/zerotier-cli.1.md \ + doc/zerotier-one.8 \ + doc/zerotier-one.8.md + # Disable SSO as the rust build is broken in rust:v3.0 due to issues with dependencies + export ZT_SSO_SUPPORTED=0 + export ZT_EMBEDDED=1 + export CC=arm-linux-gnueabihf-gcc + export CXX=arm-linux-gnueabihf-g++ + export AR=arm-linux-gnueabihf-ar + export STRIP=arm-linux-gnueabihf-strip + make + make selftest +} + +zerotier() { + pkgdesc="A Smart Ethernet Switch for Earth" + installdepends=(zerotier-one) + # Using 1: to make sure our version always overrides the entware version + pkgver="1:${pkgver}" + package() { + # This is just a wrapper package + true + } +} + +zerotier-one() { + pkgdesc="A Smart Ethernet Switch for Earth" + package() { + cd "$srcdir" + DESTDIR="$pkgdir" make install + rm -r "$pkgdir"/opt/share + install -D -m0644 debian/zerotier-one.service "$pkgdir"/etc/systemd/system/zerotier-one.service + } + configure() { + if ! is-enabled zerotier-one.service; then + how-to-enable zerotier-one.service + fi + if is-active zerotier-one.service; then + systemctl restart zerotier-one.service + fi + } + preremove() { + disable-unit zerotier-one.service + } +} + +zerotier-one-doc() { + installdepends=(man-db) + pkgdesc="Man files for zerotier-one" + package() { + cd "$srcdir" + DESTDIR="$pkgdir" make install + rm -r "$pkgdir"/opt/bin + rm -r "$pkgdir"/opt/var + } +} + +zerotier-selftest() { + pkgdesc="Unit test zerotier to ensure that it works as expected on the system" + package() { + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/zerotier-selftest + } +} From 69e55c6a6c54bd8726a56e0f0234583c029a40c6 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 22 May 2024 23:12:53 -0600 Subject: [PATCH 129/178] Add tool to handle entware services (#792) * Add new rcctl and systemd template for entware services --- package/entware-rc/entware-rc@.service | 13 ++++++ package/entware-rc/package | 38 ++++++++++++++++ package/entware-rc/rcctl | 62 ++++++++++++++++++++++++++ package/toltec-base/package | 2 +- package/toltec-completion/_rcctl | 31 +++++++++++++ package/toltec-completion/package | 4 +- 6 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 package/entware-rc/entware-rc@.service create mode 100644 package/entware-rc/package create mode 100755 package/entware-rc/rcctl create mode 100644 package/toltec-completion/_rcctl diff --git a/package/entware-rc/entware-rc@.service b/package/entware-rc/entware-rc@.service new file mode 100644 index 000000000..f76fb3466 --- /dev/null +++ b/package/entware-rc/entware-rc@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Entware %I service +After=opt.mount + +[Service] +ExecStart=/opt/etc/init.d/%I start +ExecStop=/opt/etc/init.d/%I stop +Type=forking +GuessMainPID=true +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/package/entware-rc/package b/package/entware-rc/package new file mode 100644 index 000000000..40b8432f4 --- /dev/null +++ b/package/entware-rc/package @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Copyright (c) 2024 The Toltec Contributors +# SPDX-License-Identifier: MIT + +archs=(rmall) +pkgnames=(entware-rc) +pkgdesc="Manage entware installed services" +url=https://toltec-dev.org/ +pkgver=0.1-1 +timestamp=2024-05-22T22:59:03Z +section="utils" +maintainer="Eeems " +license=MIT +installdepends=() + +source=( + entware-rc@.service + rcctl +) +sha256sums=( + SKIP + SKIP +) + +package() { + install -D -m 666 -t "$pkgdir"/lib/systemd/system/ "$srcdir"/entware-rc@.service + install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/rcctl +} + +configure() { + systemctl daemon-reload + echo "" + echo "You can use rcctl to manage services installed by entware" +} + +preremove() { + rcctl list | xargs -I {} systemctl disable --now entware-rc@{} +} diff --git a/package/entware-rc/rcctl b/package/entware-rc/rcctl new file mode 100755 index 000000000..899ae7862 --- /dev/null +++ b/package/entware-rc/rcctl @@ -0,0 +1,62 @@ +#!/bin/bash +help() { + echo "Usage: rcctl " + echo " commands:" + echo " help: Display this message and exit" + echo " start : Start a service" + echo " stop : Stop a service" + echo " restart : Restart a service" + echo " enable : Enable service startup on boot" + echo " disable : Disable service startup on boot" + echo " status []: View the current status of services" + echo " logs [-f|--follow] : View logs for a service" + echo " list: List available services" +} +if [[ $1 == "help" ]] || [[ $1 == "--help" ]]; then + help +elif [[ $1 == "start" ]] \ + || [[ $1 == "stop" ]] \ + || [[ $1 == "restart" ]] \ + || [[ $1 == "enable" ]] \ + || [[ $1 == "disable" ]]; then + if [ $# -ge 3 ]; then + echo "Too many arguments" + exit 1 + elif [ $# -lt 2 ]; then + echo "Too few arguments" + exit 1 + fi + systemctl "$1" "entware-rc@$2.service" +elif [[ $1 == "status" ]]; then + if [ $# -ge 3 ]; then + echo "Too many arguments" + exit 1 + elif [ $# -eq 1 ]; then + "$0" list | xargs -rn1 "$0" status + else + s="entware-rc@${2}.service" + echo "${2}" "$(systemctl is-active "${s}")" "$(systemctl is-enabled "${s}")" \ + | grep --color=always '\(disabled\|inactive\|$\)' + fi +elif [[ $1 == "logs" ]]; then + if [ $# -ge 4 ]; then + echo "Too many arguments" + exit 1 + elif [ $# -lt 2 ]; then + echo "Too few arguments" + exit 1 + elif [ $# -eq 3 ] && [[ "$2" != "-f" ]] && [[ "$2" != "--follow" ]]; then + echo "Invalid arguments" + exit 1 + fi + if [ $# -eq 3 ]; then + journalctl --no-pager -all --follow --unit "entware-rc@${3}.service" + else + journalctl --no-pager -all --unit "entware-rc@${2}.service" + fi +elif [[ $1 == "list" ]]; then + /opt/bin/find /opt/etc/init.d/ -perm '-u+x' -name 'S*' | xargs -rn1 basename +else + help + exit 1 +fi diff --git a/package/toltec-base/package b/package/toltec-base/package index c1fc5e010..8757b1922 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -11,7 +11,7 @@ timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " license=MIT -installdepends=(toltec-bootstrap toltec-deletions toltec-completion wget-ssl ca-certificates) +installdepends=(toltec-bootstrap toltec-deletions toltec-completion wget-ssl ca-certificates entware-rc) installdepends_rm1os2=(open-remarkable-shutdown) installdepends_rm1os3=(open-remarkable-shutdown) installdepends_rm2os2=(rm2-suspend-fix) diff --git a/package/toltec-completion/_rcctl b/package/toltec-completion/_rcctl new file mode 100644 index 000000000..7cefec693 --- /dev/null +++ b/package/toltec-completion/_rcctl @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT +# shellcheck disable=SC2016,SC2199,SC2207 + +_rcctl() { + local cur prev words cword split + _init_completion -s || return + if [[ $cword -eq 1 ]]; then + COMPREPLY=($(compgen -W 'help start stop restart enable disable status logs list' -- "$cur")) + return + fi + case ${words[1]} in + start | stop | restart | enable | disable | status) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "$(rcctl list)" -- "$cur")) + fi + return + ;; + logs) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "--follow $(rcctl list)" -- "$cur")) + elif [[ $cword -eq 3 ]]; then + COMPREPLY+=($(compgen -W "$(rcctl list)" -- "$cur")) + fi + return + ;; + esac +} + +complete -F _rcctl rcctl diff --git a/package/toltec-completion/package b/package/toltec-completion/package index 39a87f0e3..568d37881 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.2-1 +pkgver=0.4.0-1 timestamp=2022-01-23T23:29Z section="utils" maintainer="Linus K. " @@ -15,10 +15,12 @@ installdepends=(bash-completion) source=( _opkg _toltecctl + _rcctl ) sha256sums=( SKIP SKIP + SKIP ) package() { From 0b106a828af6457034d91f6cadbc8ee51ec69274 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 May 2024 10:27:50 -0600 Subject: [PATCH 130/178] Bump toltec-base to make new depends work (#853) --- package/toltec-base/package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/toltec-base/package b/package/toltec-base/package index 8757b1922..324a7ff4a 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,7 +6,7 @@ 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-2 +pkgver=1.3-3 timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " From db735aa7cd90329a2101f5fd3864b7915a442f6c Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 May 2024 15:08:03 -0600 Subject: [PATCH 131/178] Add launcherctl (#795) * Add launcherctl and oxide configuration * Install launcherctl by default * Format fix * Add remux, koreader, xochitl, and draft to launcherctl * Format fix * Format fix * Fix up install/uninstall * Format fixes * More format fixes * More format fixes * Fix up draft handling * Fix switch-launcher without --start * Fix install paths * Update package * Bump koreader rel * Bump remux rel * Bump toltec-base rel * Bump toltec-completion rel * Add missing SKIP from merge --- package/draft/launcherctl-draft | 93 ++++++++++++ package/draft/package | 16 +- package/koreader/launcherctl-koreader | 41 +++++ package/koreader/package | 22 +-- package/launcherctl/launcherctl | 199 +++++++++++++++++++++++++ package/launcherctl/package | 33 ++++ package/oxide/launcherctl-oxide | 57 +++++++ package/oxide/package | 18 ++- package/rmkit/launcherctl-remux | 167 +++++++++++++++++++++ package/rmkit/package | 16 +- package/toltec-base/package | 4 +- package/toltec-completion/_launcherctl | 46 ++++++ package/toltec-completion/package | 4 +- package/xochitl/launcherctl-xochitl | 41 +++++ package/xochitl/package | 5 +- 15 files changed, 735 insertions(+), 27 deletions(-) create mode 100644 package/draft/launcherctl-draft create mode 100755 package/koreader/launcherctl-koreader create mode 100755 package/launcherctl/launcherctl create mode 100644 package/launcherctl/package create mode 100755 package/oxide/launcherctl-oxide create mode 100755 package/rmkit/launcherctl-remux create mode 100644 package/toltec-completion/_launcherctl create mode 100755 package/xochitl/launcherctl-xochitl diff --git a/package/draft/launcherctl-draft b/package/draft/launcherctl-draft new file mode 100644 index 000000000..a3c0b9db2 --- /dev/null +++ b/package/draft/launcherctl-draft @@ -0,0 +1,93 @@ +#!/bin/bash +set -e +draft_pid() { + systemctl show --no-pager --property MainPID draft.service | sed 's|MainPID=||' +} +kill_pid() { + pid="$1" + if [[ "$(awk '{print $3}' "/proc/${pid}/stat")" == "T" ]]; then + kill -CONT "$pid" + fi + kill -TERM "$pid" + # Wait 5s for process to exit + start="$(date +'%s')" + while kill -0 "$pid" 2> /dev/null; do + sleep 0.5 + if [ "$(date +'%s')" -gt $((start + 5)) ]; then + break + fi + done + if kill -0 "$pid" 2> /dev/null; then + # If process is still running, force kill it + kill -KILL "$pid" + fi +} +case "$1" in + is-active) + systemctl is-active --quiet draft.service + ;; + is-enabled) + systemctl is-enabled --quiet draft.service + ;; + logs) + if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then + journalctl --follow --all --unit draft.service + else + journalctl --no-pager --all --unit draft.service + fi + ;; + start) + systemctl start draft.service + ;; + stop) + systemctl stop draft.service + ;; + enable) + systemctl enable draft.service + ;; + disable) + systemctl disable draft.service + ;; + apps) + find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + grep 'name=' "$file" | sed 's|^name=||' + done + ;; + close) + find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + if [[ "$(grep 'name=' "$file" | sed 's|^name=||')" == "$2" ]]; then + term="$(grep 'term=' "$file" | sed 's|^term=||')" + if [ -z "$term" ]; then + echo "No term= configuration specified for ${2}" + exit 1 + fi + $term + call="$(grep 'call=' "$file" | sed 's|^call=||')" + name="$(grep 'name=' "$file" | sed 's|^name=||')" + /opt/libexec/ps-procps-ng --ppid "$(draft_pid)" -o pid | tail -n +2 | while read -r pid; do + if [[ "$(tr -d '\0' < "/proc/${pid}/cmdline")" == "$call" ]]; then + kill_pid "$pid" + break + fi + done + fi + done + ;; + running) + pid=$(draft_pid) + find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + call="$(grep 'call=' "$file" | sed 's|^call=||')" + name="$(grep 'name=' "$file" | sed 's|^name=||')" + /opt/libexec/ps-procps-ng --ppid "$(draft_pid)" -o pid | tail -n +2 | while read -r pid; do + if [[ "$(tr -d '\0' < "/proc/${pid}/cmdline")" == "$call" ]]; then + echo "$name" + break + fi + done + done + ;; + *) + echo "Draft does not support this method" + exit 1 + ;; +esac diff --git a/package/draft/package b/package/draft/package index aac94f8e6..b0134f6e5 100644 --- a/package/draft/package +++ b/package/draft/package @@ -5,22 +5,24 @@ pkgnames=(draft) pkgdesc="Launcher which wraps around the standard interface" url=https://github.com/dixonary/draft-reMarkable -pkgver=0.2.0-22 +pkgver=0.2.0-23 timestamp=2020-07-20T10:23Z section="launchers" maintainer="Mattéo Delabre " license=Apache-2.0 -installdepends=(xochitl display) +installdepends=(xochitl display procps-ng-ps) flags=(patch_rm2fb) image=qt:v2.1 source=( https://github.com/dixonary/draft-reMarkable/archive/5bd660a2fd07eba166c6110d2b48cfc58ee67e58.zip draft.service + launcherctl-draft ) sha256sums=( c41d7a4fd537c54d787018fd764421dbf7dd64306ca800875283e05eef99173e SKIP + SKIP ) build() { @@ -46,21 +48,25 @@ package() { mv "$pkgdir"/opt/etc/draft/{99-,}shutdown install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/draft.service + install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-draft } configure() { systemctl daemon-reload - if ! is-enabled "$pkgname.service"; then + if ! launcherctl is-current-launcher "$pkgname"; then echo "" echo "Run the following command(s) to use $pkgname as your launcher" - how-to-enable "$pkgname.service" + echo "launcherctl switch-launcher --start $pkgname" echo "" fi } preremove() { - disable-unit "$pkgname.service" + # Just in case more than one launcher is active, do individual checks + if launcherctl is-active-launcher "$pkgname" || launcherctl is-enabled-launcher "$pkgname"; then + launcherctl switch-launcher --start xochitl + fi } postremove() { diff --git a/package/koreader/launcherctl-koreader b/package/koreader/launcherctl-koreader new file mode 100755 index 000000000..6e605d286 --- /dev/null +++ b/package/koreader/launcherctl-koreader @@ -0,0 +1,41 @@ +#!/bin/bash +set -e +case "$1" in + is-active) + systemctl is-active --quiet koreader.service + ;; + is-enabled) + systemctl is-enabled --quiet koreader.service + ;; + logs) + if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then + journalctl --follow --all --unit koreader.service + else + journalctl --no-pager --all --unit koreader.service + fi + ;; + start | launch) + systemctl start koreader.service + ;; + stop | close) + systemctl stop koreader.service + ;; + enable) + systemctl enable koreader.service + ;; + disable) + systemctl disable koreader.service + ;; + apps) + echo "koreader" + ;; + running) + if "$0" is-active; then + echo "koreader" + fi + ;; + *) + echo "KOReader does not support this method" + exit 1 + ;; +esac diff --git a/package/koreader/package b/package/koreader/package index 3d6126a71..8f909dd25 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=2024.04-1 +pkgver=2024.04-2 timestamp=2024-04-29T19:56:05Z section="readers" maintainer="raisjn " @@ -19,6 +19,7 @@ source=( KOReader.oxide koreader-toltec.service koreader + launcherctl-koreader ) sha256sums=( e6b3a5a2c8cde8ca0c469fe542d6e170502fcf39b9a55e4447a7acd02b4a12c0 @@ -26,6 +27,7 @@ sha256sums=( SKIP SKIP SKIP + SKIP ) package() { @@ -41,6 +43,7 @@ package() { install -D -m 644 "$srcdir"/koreader-toltec.service "$pkgdir"/lib/systemd/system/koreader.service install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons/ "$srcdir"/resources/koreader.png install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/koreader + install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-koreader } configure() { @@ -51,18 +54,19 @@ configure() { systemctl daemon-reload - if ! is-enabled "$pkgname.service"; then - cat << MSG - -Run the following command(s) to use $pkgname as your launcher -$(how-to-enable "$pkgname.service") - -MSG + if ! launcherctl is-current-launcher "$pkgname"; then + echo "" + echo "Run the following command(s) to use $pkgname as your launcher" + echo "launcherctl switch-launcher --start $pkgname" + echo "" fi } preremove() { - disable-unit "$pkgname.service" + # Just in case more than one launcher is active, do individual checks + if launcherctl is-active-launcher "$pkgname" || launcherctl is-enabled-launcher "$pkgname"; then + launcherctl switch-launcher --start xochitl + fi } postremove() { diff --git a/package/launcherctl/launcherctl b/package/launcherctl/launcherctl new file mode 100755 index 000000000..ff87e6a0f --- /dev/null +++ b/package/launcherctl/launcherctl @@ -0,0 +1,199 @@ +#!/bin/bash +set -e +help() { + echo "Usage: launcherctl " + echo " commands:" + echo " help: Display this message and exit" + echo " status: Current launcher status" + echo " logs [-f|--follow]: View current launcher logs" + echo " list-launchers: List installed launchers" + echo " switch-launcher [--start] : Switch which launcher is active" + echo " start-launcher: Start the current launcher" + echo " stop-launcher: Stop the current launcher" + echo " list-apps: List all application for current launcher" + echo " list-running-apps: List all application for current launcher" + echo " start-app : Start an application with the current launcher" + echo " stop-app : Stop an application with the current launcher" + echo " pause-app : Pause an application with the current launcher" + echo " resume-app : Resume an application with the current launcher" + echo " is-current-launcher : Check if the launcher is the current launcher" + echo " is-enabled-launcher : Check if the launcher is enabled" + echo " is-active-launcher : Check if the launcher is active" +} +data_dir="/opt/share/launcherctl" +launchers() { + /opt/bin/find "$data_dir" -type f -perm '-u+x' | xargs -rn1 basename +} +active_launchers() { + launchers | while read -r launcher; do + if query "$launcher" is-active; then + echo "$launcher" + fi + done +} +enabled_launchers() { + launchers | while read -r launcher; do + if query "$launcher" is-enabled; then + echo "$launcher" + fi + done +} +query() { + launcher="$1" + shift + "${data_dir}/${launcher}" "$@" +} +check_enabled_launchers() { + if [ "$(enabled_launchers | wc -l)" -lt 1 ]; then + echo "More than one launcher is currently enabled!" + echo "Enabled launchers: ${current_launcher}" + exit 1 + fi +} +check_launcher_has_app() { + if ! query "$1" apps | grep -q "$2"; then + echo "Unknown application: ${2}" + exit 1 + fi +} +case "$1" in + help | --help) + help + ;; + logs) + if [ $# -gt 2 ]; then + echo "Too many arguments" + exit 1 + elif [ $# -eq 2 ] && [[ "$2" != "-f" ]] && [[ "$2" != "--follow" ]]; then + echo "Invalid arguments" + exit 1 + fi + check_enabled_launchers + query "$(enabled_launchers)" "$@" + ;; + status) + if [ $# -gt 1 ]; then + echo "Too many arguments" + exit 1 + fi + check_enabled_launchers + current_launcher="$(enabled_launchers)" + echo -e "Launcher: \033[1m${current_launcher}\e[0m" + echo -ne "Status: \033[1m" + if query "$current_launcher" is-active; then + echo -ne "\e[32mrunning" + else + echo -ne "\e[31minactive" + fi + echo -e "\e[0m" + echo -n "Apps: $(query "$current_launcher" running | wc -l) running " + echo "$(query "$current_launcher" apps | wc -l) installed" + ;; + list-launchers) + launchers + ;; + switch-launcher) + if [ $# -lt 2 ]; then + echo "Too few arguments" + exit 1 + elif [ $# -gt 3 ]; then + echo "Too many arguments" + exit 1 + elif [ $# -eq 3 ] && [[ "$2" != "--start" ]]; then + echo "Invalid arguments" + exit 1 + fi + if [ $# -eq 3 ]; then + start=true + shift + else + start=false + fi + if ! [ -f "${data_dir}/${2}" ]; then + echo "${2} is not installed" + exit 1 + fi + enabled_launchers | while read -r launcher; do + if [[ "$launcher" != "$2" ]]; then + query "$launcher" disable + fi + done + if ! query "$2" is-enabled; then + query "$2" enable + fi + if $start; then + "$0" start-launcher + fi + ;; + start-launcher) + check_enabled_launchers + current_launcher="$(enabled_launchers)" + active_launchers | while read -r launcher; do + if [[ "$launcher" != "$current_launcher" ]]; then + query "$launcher" stop + fi + done + if query "$current_launcher" is-active; then + echo "Already started!" + exit + fi + query "$current_launcher" start + ;; + stop-launcher) + active_launchers | while read -r launcher; do + query "$launcher" stop + done + ;; + list-apps) + check_enabled_launchers + query "$(enabled_launchers)" apps + ;; + list-running-apps) + check_enabled_launchers + query "$(enabled_launchers)" running + ;; + list-paused-apps) + check_enabled_launchers + query "$(enabled_launchers)" paused + ;; + start-app) + check_enabled_launchers + launcher="$(enabled_launchers)" + check_launcher_has_app "$launcher" "$2" + query "$launcher" launch "$2" + ;; + stop-app) + check_enabled_launchers + launcher="$(enabled_launchers)" + check_launcher_has_app "$launcher" "$2" + query "$launcher" close "$2" + ;; + pause-app) + check_enabled_launchers + launcher="$(enabled_launchers)" + check_launcher_has_app "$launcher" "$2" + query "$launcher" pause "$2" + ;; + resume-app) + check_enabled_launchers + launcher="$(enabled_launchers)" + check_launcher_has_app "$launcher" "$2" + query "$launcher" resume "$2" + ;; + is-current-launcher) + check_enabled_launchers + if [[ "$(enabled_launchers)" != "$2" ]]; then + exit 1 + fi + ;; + is-enabled-launcher) + query "$2" is-enabled + ;; + is-active-launcher) + query "$2" is-active + ;; + *) + help + exit 1 + ;; +esac diff --git a/package/launcherctl/package b/package/launcherctl/package new file mode 100644 index 000000000..5782c3082 --- /dev/null +++ b/package/launcherctl/package @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(launcherctl) +pkgdesc="Manage your installed launcher" +url=https://toltec-dev.org/ +pkgver=0.0.1-1 +timestamp=2023-12-18T03:32Z +section="launcher" +maintainer="Eeems " +license=MIT + +source=( + launcherctl +) +sha256sums=( + SKIP +) + +package() { + install -D -m 744 -t "$pkgdir"/opt/bin "$srcdir"/launcherctl +} + +configure() { + echo "" + echo "You can use launcherctl to manage your active launcher" + echo "" +} + +preremove() { + launcherctl switch-launcher --start xochitl +} diff --git a/package/oxide/launcherctl-oxide b/package/oxide/launcherctl-oxide new file mode 100755 index 000000000..97ff4a73e --- /dev/null +++ b/package/oxide/launcherctl-oxide @@ -0,0 +1,57 @@ +#!/bin/bash +set -e +case "$1" in + is-active) + systemctl is-active --quiet tarnish.service + ;; + is-enabled) + systemctl is-enabled --quiet tarnish.service + ;; + logs) + if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then + journalctl --follow --all --unit tarnish.service + else + journalctl --no-pager --all --unit tarnish.service + fi + ;; + start) + systemctl start tarnish.service + ;; + stop) + systemctl stop tarnish.service + ;; + enable) + systemctl enable tarnish.service + ;; + disable) + systemctl disable tarnish.service + ;; + apps) + rot apps get applications | jq -r 'keys | .[]' + ;; + running) + rot apps get runningApplications | jq -r 'keys | .[]' + ;; + paused) + rot apps get pausedApplications | jq -r 'keys | .[]' + ;; + launch | resume) + rot apps get applications \ + | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ + | xargs -I {} rot --object Application:{} apps call launch + ;; + close) + rot apps get applications \ + | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ + | xargs -I {} rot --object Application:{} apps call stop + ;; + pause) + rot apps get applications \ + | jq -cr ".$2" | sed 's|/codes/eeems/oxide1/||' \ + | xargs -I {} rot --object Application:{} apps call pause + ;; + *) + echo "Oxide does not support this method" + exit 1 + ;; +esac diff --git a/package/oxide/package b/package/oxide/package index 66a6575e4..9a054a354 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -4,7 +4,7 @@ pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.7 -pkgver=$_oxidever-3 +pkgver=$_oxidever-4 _sentryver=0.5.0 timestamp=2023-12-05T04:43:04Z maintainer="Eeems " @@ -15,10 +15,12 @@ image=qt:v3.1 source=( "https://github.com/Eeems-Org/oxide/archive/refs/tags/v$_oxidever.zip" toltec-rm2-override.conf + launcherctl-oxide ) sha256sums=( e1f20fc60ae8edccb941e09c0e61cbfb58f1f8a5f64be98870eb2d079f83316f SKIP + SKIP ) build() { @@ -55,20 +57,26 @@ 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 + # launcherctl registration + install -D -m 755 -t "$pkgdir"/opt/usr/toltecctl/oxide "$srcdir"/launcherctl-oxide } configure() { systemctl daemon-reload - if ! is-enabled "tarnish.service"; then + + if ! launcherctl is-current-launcher oxide; then echo "" - echo "Run the following command(s) to use $pkgname as your launcher" - how-to-enable "tarnish.service" + echo "Run the following command(s) to use oxide as your launcher" + echo "launcherctl switch-launcher --start oxide" echo "" fi } preremove() { - disable-unit tarnish.service + # Just in case more than one launcher is active, do individual checks + if launcherctl is-active-launcher oxide || launcherctl is-enabled-launcher oxide; then + launcherctl switch-launcher --start xochitl + fi } postremove() { diff --git a/package/rmkit/launcherctl-remux b/package/rmkit/launcherctl-remux new file mode 100755 index 000000000..d0c1e5436 --- /dev/null +++ b/package/rmkit/launcherctl-remux @@ -0,0 +1,167 @@ +#!/bin/bash +set -e +remux_pid() { + systemctl show --no-pager --property MainPID remux.service | sed 's|MainPID=||' +} +remux_ppid() { + grep "PPid:" "/proc/$(remux_pid)/status" | awk '{print $2}' +} +draft_apps() { + find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + name="$(grep 'name=' "$file" | sed 's|^name=||')" + call="$(grep 'call=' "$file" | sed 's|^call=||')" + echo -e "${name}\t${call}" + done +} +running_remux_apps() { + /opt/libexec/ps-procps-ng --ppid "$(remux_ppid)" -o pid,state,args | tail -n +2 | while read -r info; do + if [[ "$(echo "$info" | awk '{print $2}')" != "$1" ]]; then + continue + fi + pid="$(echo "$info" | awk '{print $1}')" + cmdline="$(echo "$info" | awk '{for (i=3; i<=NF; i++) print $i}')" + draft_apps | while read -r info; do + name="$(echo "$info" | cut -f1)" + if [[ "$name" == "xochitl" ]]; then + if [[ "$(realpath "/proc/${pid}/exe")" == "/usr/bin/xochitl" ]]; then + echo "$name" + break + fi + fi + call="$(echo "$info" | cut -f2)" + if [[ "$cmdline" == "$call" ]]; then + echo "$name" + break + fi + if ! [ -f "$call" ]; then + continue + fi + if [[ "$(realpath "/proc/${pid}/exe")" == "$(realpath "$call")" ]]; then + echo "$name" + break + fi + done + done +} +kill_pid() { + pid="$1" + if [[ "$(awk '{print $3}' "/proc/${pid}/stat")" == "T" ]]; then + kill -CONT "$pid" + fi + kill -TERM "$pid" + # Wait 5s for process to exit + start="$(date +'%s')" + while kill -0 "$pid" 2> /dev/null; do + sleep 0.5 + if [ "$(date +'%s')" -gt $((start + 5)) ]; then + break + fi + done + if kill -0 "$pid" 2> /dev/null; then + # If process is still running, force kill it + kill -KILL "$pid" + fi +} +case "$1" in + is-active) + systemctl is-active --quiet remux.service + ;; + is-enabled) + systemctl is-enabled --quiet remux.service + ;; + logs) + if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then + journalctl --follow --all --unit remux.service + else + journalctl --no-pager --all --unit remux.service + fi + ;; + start) + systemctl start remux.service + ;; + stop) + systemctl stop remux.service + ;; + enable) + systemctl enable remux.service + ;; + disable) + systemctl disable remux.service + ;; + apps) + find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + grep 'name=' "$file" | sed 's|^name=||' + done + ;; + running) + running_remux_apps S + ;; + paused) + running_remux_apps T + ;; + launch | resume) + echo "launch $2" > /run/remux.api + ;; + close) + draft_apps | while read -r info; do + name="$(echo "$info" | cut -f1)" + if [[ "$name" != "$2" ]]; then + continue + fi + call="$(echo "$info" | cut -f2)" + /opt/libexec/ps-procps-ng --ppid "$(remux_ppid)" -o pid,args | tail -n +2 | while read -r info; do + pid="$(echo "$info" | awk '{print $1}')" + if [[ "$name" == "xochitl" ]]; then + if [[ "$(realpath "/proc/${pid}/exe")" == "/usr/bin/xochitl" ]]; then + kill_pid "$pid" + continue + fi + fi + cmdline="$(echo "$info" | awk '{for (i=2; i<=NF; i++) print $i}')" + if [[ "$cmdline" == "$call" ]]; then + kill_pid "$pid" + continue + fi + if ! [ -f "$call" ]; then + continue + fi + if [[ "$(realpath "/proc/${pid}/exe")" == "$(realpath "$call")" ]]; then + kill_pid "$pid" + fi + done + done + ;; + pause) + draft_apps | while read -r info; do + name="$(echo "$info" | cut -f1)" + if [[ "$name" != "$2" ]]; then + continue + fi + call="$(echo "$info" | cut -f2)" + /opt/libexec/ps-procps-ng --ppid "$(remux_ppid)" -o pid,args | tail -n +2 | while read -r info; do + pid="$(echo "$info" | awk '{print $1}')" + if [[ "$name" == "xochitl" ]]; then + if [[ "$(realpath "/proc/${pid}/exe")" == "/usr/bin/xochitl" ]]; then + kill -STOP "$pid" + continue + fi + fi + cmdline="$(echo "$info" | awk '{for (i=2; i<=NF; i++) print $i}')" + if [[ "$cmdline" == "$call" ]]; then + kill -STOP "$pid" + continue + fi + if ! [ -f "$call" ]; then + continue + fi + if [[ "$(realpath "/proc/${pid}/exe")" == "$(realpath "$call")" ]]; then + kill -STOP "$pid" + fi + done + done + ;; + *) + echo "Remux does not support this method" + exit 1 + ;; +esac diff --git a/package/rmkit/package b/package/rmkit/package index 2b3da328a..4147a0460 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -14,11 +14,13 @@ source=( https://github.com/rmkit-dev/rmkit/archive/7edc291646c4a72b7b8a512205646a9ad6586fd6.zip remux.service genie.service + launcherctl-remux ) sha256sums=( 2861ea61ef272acd0d1d9ec4c80f44ef620be3f8ce58a356fbcbdb27e01dc9e8 SKIP SKIP + SKIP ) build() { @@ -145,27 +147,33 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.3.0-1 + pkgver=0.3.0-2 section="launchers" + installdepends=(procps-ng-ps) + package() { install -D -m 755 "$srcdir"/src/build/remux "$pkgdir"/opt/bin/remux install -D -m 644 "$srcdir"/remux.service "$pkgdir"/lib/systemd/system/remux.service + install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-remux } configure() { systemctl daemon-reload - if ! is-enabled "$pkgname.service"; then + if ! launcherctl is-current-launcher "$pkgname"; then echo "" echo "Run the following command(s) to use $pkgname as your launcher" - how-to-enable "$pkgname.service" + echo "launcherctl switch-launcher --start $pkgname" echo "" fi } preremove() { - disable-unit "$pkgname.service" + # Just in case more than one launcher is active, do individual checks + if launcherctl is-active-launcher "$pkgname" || launcherctl is-enabled-launcher "$pkgname"; then + launcherctl switch-launcher --start xochitl + fi } postremove() { diff --git a/package/toltec-base/package b/package/toltec-base/package index 324a7ff4a..183cb2995 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,12 +6,12 @@ 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-3 +pkgver=1.3-4 timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " license=MIT -installdepends=(toltec-bootstrap toltec-deletions toltec-completion wget-ssl ca-certificates entware-rc) +installdepends=(toltec-bootstrap toltec-deletions toltec-completion launcherctl wget-ssl ca-certificates entware-rc) installdepends_rm1os2=(open-remarkable-shutdown) installdepends_rm1os3=(open-remarkable-shutdown) installdepends_rm2os2=(rm2-suspend-fix) diff --git a/package/toltec-completion/_launcherctl b/package/toltec-completion/_launcherctl new file mode 100644 index 000000000..66deee8ac --- /dev/null +++ b/package/toltec-completion/_launcherctl @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT +# shellcheck disable=SC2016,SC2199,SC2207 + +_launcherctl() { + local cur prev words cword split + _init_completion -s || return + if [[ $cword -eq 1 ]]; then + COMPREPLY=($(compgen -W 'help status logs list-launchers switch-launcher start-launcher stop-launcher list-apps list-running-apps list-paused-apps start-app stop-app pause-app resume-app is-current-launcher is-enabled-launcher is-active-launcher' -- "$cur")) + return + fi + case ${words[1]} in + logs) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "--follow" -- "$cur")) + fi + return + ;; + switch-launcher) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "--start $(launcherctl list-launchers)" -- "$cur")) + elif [[ $cword -eq 3 ]]; then + COMPREPLY+=($(compgen -W "$(launcherctl list-launchers)" -- "$cur")) + fi + return + ;; + start-app) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "$(launcherctl list-apps)" -- "$cur")) + fi + ;; + stop-app | pause-app) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "$(launcherctl list-running-apps)" -- "$cur")) + fi + ;; + resume-app) + if [[ $cword -eq 2 ]]; then + COMPREPLY+=($(compgen -W "$(launcherctl list-paused-apps)" -- "$cur")) + fi + ;; + esac +} + +complete -F _launcherctl launcherctl diff --git a/package/toltec-completion/package b/package/toltec-completion/package index 568d37881..698f50c8b 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.4.0-1 +pkgver=0.4.0-2 timestamp=2022-01-23T23:29Z section="utils" maintainer="Linus K. " @@ -15,12 +15,14 @@ installdepends=(bash-completion) source=( _opkg _toltecctl + _launcherctl _rcctl ) sha256sums=( SKIP SKIP SKIP + SKIP ) package() { diff --git a/package/xochitl/launcherctl-xochitl b/package/xochitl/launcherctl-xochitl new file mode 100755 index 000000000..66c90364b --- /dev/null +++ b/package/xochitl/launcherctl-xochitl @@ -0,0 +1,41 @@ +#!/bin/bash +set -e +case "$1" in + is-active) + systemctl is-active --quiet xochitl.service + ;; + is-enabled) + systemctl is-enabled --quiet xochitl.service + ;; + logs) + if [ $# -eq 2 ] && [[ "$2" == "-f" ]] || [[ "$2" == "--follow" ]]; then + journalctl --follow --all --unit xochitl.service + else + journalctl --no-pager --all --unit xochitl.service + fi + ;; + start | launch) + systemctl start xochitl.service + ;; + stop | close) + systemctl stop xochitl.service + ;; + enable) + systemctl enable xochitl.service + ;; + disable) + systemctl disable xochitl.service + ;; + apps) + echo "xochitl" + ;; + running) + if "$0" is-active; then + echo "xochitl" + fi + ;; + *) + echo "Xochitl does not support this method" + exit 1 + ;; +esac diff --git a/package/xochitl/package b/package/xochitl/package index 0db662542..d30110312 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-18 +pkgver=0.0.0-19 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " @@ -25,6 +25,7 @@ source=( toltec-wrapper.conf env-readme manual-sync@.service + launcherctl-xochitl ) sha256sums=( SKIP @@ -35,6 +36,7 @@ sha256sums=( SKIP SKIP SKIP + SKIP ) package() { @@ -51,6 +53,7 @@ package() { install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/xochitl.draft install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/xochitl.png install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/xochitl.oxide + install -D -m 755 -t "$pkgdir"/opt/usr/toltecctl/xochitl "$srcdir"/launcherctl-xochitl install -D -m 644 -t "$pkgdir"/etc/systemd/system/xochitl.service.d \ "$srcdir"/toltec-wrapper.conf From 0aff4b6485256bf418d1a2dc7fd05fc07717b49d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 May 2024 16:48:48 -0600 Subject: [PATCH 132/178] Fix launcherctl registrations (#857) * Fix launcherctl registrations * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package * Update package --- package/draft/package | 4 ++-- package/koreader/package | 4 ++-- package/oxide/package | 4 ++-- package/rmkit/package | 4 ++-- package/xochitl/package | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package/draft/package b/package/draft/package index b0134f6e5..4f9cc5ab0 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-23 +pkgver=0.2.0-24 timestamp=2020-07-20T10:23Z section="launchers" maintainer="Mattéo Delabre " @@ -48,7 +48,7 @@ package() { mv "$pkgdir"/opt/etc/draft/{99-,}shutdown install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/draft.service - install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-draft + install -D -T -m 755 "$srcdir"/launcherctl-draft "$pkgdir"/opt/share/toltecctl/"$pkgname" } configure() { diff --git a/package/koreader/package b/package/koreader/package index 8f909dd25..73e361620 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=2024.04-2 +pkgver=2024.04-3 timestamp=2024-04-29T19:56:05Z section="readers" maintainer="raisjn " @@ -43,7 +43,7 @@ package() { install -D -m 644 "$srcdir"/koreader-toltec.service "$pkgdir"/lib/systemd/system/koreader.service install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons/ "$srcdir"/resources/koreader.png install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/koreader - install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-koreader + install -D -T -m 755 "$srcdir"/launcherctl-koreader "$pkgdir"/opt/share/toltecctl/"$pkgname" } configure() { diff --git a/package/oxide/package b/package/oxide/package index 9a054a354..959e5c4db 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -4,7 +4,7 @@ pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.7 -pkgver=$_oxidever-4 +pkgver=$_oxidever-5 _sentryver=0.5.0 timestamp=2023-12-05T04:43:04Z maintainer="Eeems " @@ -58,7 +58,7 @@ oxide() { 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 # launcherctl registration - install -D -m 755 -t "$pkgdir"/opt/usr/toltecctl/oxide "$srcdir"/launcherctl-oxide + install -D -T -m 755 "$srcdir"/launcherctl-oxide "$pkgdir"/opt/share/toltecctl/oxide } configure() { diff --git a/package/rmkit/package b/package/rmkit/package index 4147a0460..a5572af44 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -147,7 +147,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.3.0-2 + pkgver=0.3.0-3 section="launchers" installdepends=(procps-ng-ps) @@ -155,7 +155,7 @@ remux() { package() { install -D -m 755 "$srcdir"/src/build/remux "$pkgdir"/opt/bin/remux install -D -m 644 "$srcdir"/remux.service "$pkgdir"/lib/systemd/system/remux.service - install -D -m 755 -t "$pkgdir"/opt/share/launcherctl/"$pkgname" "$srcdir"/launcherctl-remux + install -D -T -m 755 "$srcdir"/launcherctl-remux "$pkgdir"/opt/share/toltecctl/"$pkgname" } configure() { diff --git a/package/xochitl/package b/package/xochitl/package index d30110312..03f686f63 100644 --- a/package/xochitl/package +++ b/package/xochitl/package @@ -53,7 +53,7 @@ package() { install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/xochitl.draft install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/xochitl.png install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/xochitl.oxide - install -D -m 755 -t "$pkgdir"/opt/usr/toltecctl/xochitl "$srcdir"/launcherctl-xochitl + install -D -T -m 755 "$srcdir"/launcherctl-xochitl "$pkgdir"/opt/share/toltecctl/"$pkgname" install -D -m 644 -t "$pkgdir"/etc/systemd/system/xochitl.service.d \ "$srcdir"/toltec-wrapper.conf From 3b764f45488cec4694f49d3c4c4d1ec9ee969d4d Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 May 2024 18:23:24 -0600 Subject: [PATCH 133/178] Remove remarkable-stylus from os3 for now (#855) * Remove remarkable-stylus from os3 for now --- package/remarkable-stylus/package | 3 ++- package/toltec-deletions/package | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package/remarkable-stylus/package b/package/remarkable-stylus/package index 6d374e4fa..d54f87f97 100644 --- a/package/remarkable-stylus/package +++ b/package/remarkable-stylus/package @@ -2,8 +2,9 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT +archs=(rmallos2) pkgnames=(remarkable-stylus) -pkgver=0.0.3-2 +pkgver=0.0.3-3 pkgdesc="Generate a key press upon pressing the button of a Lamy AL-star EMR pen" timestamp=2020-11-19T20:07:29Z maintainer="Eeems " diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 77153805d..2a2a03a0e 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rmallos2 rmallos3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-2 +pkgver=0.1-3 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " @@ -21,6 +21,7 @@ conflicts_rmallos3=( innernet-client gocryptfs linux-mainline + remarkable-stylus ) replaces_rmallos3=( ddvk-hacks @@ -29,6 +30,7 @@ replaces_rmallos3=( innernet-client gocryptfs linux-mainline + remarkable-stylus ) source=() From ef649a788daebcf743fa81798521e357b1f35cc6 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 23 May 2024 19:36:27 -0600 Subject: [PATCH 134/178] Use systemctl to reboot (#849) * Use systemctl to reboot I've been getting errors that reboot isn't found * Update toltec-bootstrap version --- package/toltec-bootstrap/package | 2 +- package/toltec-bootstrap/toltecctl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index c1a3393ee..8c95c296b 100644 --- a/package/toltec-bootstrap/package +++ b/package/toltec-bootstrap/package @@ -5,7 +5,7 @@ pkgnames=(toltec-bootstrap) pkgdesc="Manage your Toltec install" url=https://toltec-dev.org/ -pkgver=0.4.0-1 +pkgver=0.4.1-1 timestamp=2023-11-27T00:34Z section="utils" maintainer="Eeems " diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index a3792f0ad..b6ba832bf 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -1012,7 +1012,7 @@ MSG fi log INFO "Rebooting" - reboot + systemctl reboot ;; status) From fe47a5ef7d43058c731cf99c80f461d3a61168f1 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 24 May 2024 11:14:01 -0600 Subject: [PATCH 135/178] Remove open-remarkable-shutdown from os3 due to it not working (#861) --- package/open-remarkable-shutdown/package | 3 ++- package/toltec-deletions/package | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package/open-remarkable-shutdown/package b/package/open-remarkable-shutdown/package index 6a138346c..5c31ca592 100644 --- a/package/open-remarkable-shutdown/package +++ b/package/open-remarkable-shutdown/package @@ -2,10 +2,11 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT +archs=(rmallos2) pkgnames=(open-remarkable-shutdown) pkgdesc="Use remarkable-splash to display shutdown and reboot images" url=https://github.com/ddvk/remarkable-splash -pkgver=1.0-1 +pkgver=1.0-2 timestamp=2022-02-28T00:12Z section="utils" maintainer="Eeems " diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 2a2a03a0e..c3cea1e4b 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rmallos2 rmallos3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-3 +pkgver=0.1-4 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " @@ -22,6 +22,7 @@ conflicts_rmallos3=( gocryptfs linux-mainline remarkable-stylus + open-remarkable-shutdown ) replaces_rmallos3=( ddvk-hacks @@ -31,6 +32,7 @@ replaces_rmallos3=( gocryptfs linux-mainline remarkable-stylus + open-remarkable-shutdown ) source=() From a2d9e76401e4a3614a7e811bc8ff1f83c6613b43 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 24 May 2024 15:26:26 -0600 Subject: [PATCH 136/178] Fix launcherctl script locations (#862) * Fix launcherctl script locations --- package/draft/package | 4 ++-- package/koreader/package | 4 ++-- package/launcherctl/package | 3 ++- package/oxide/package | 4 ++-- package/rmkit/package | 4 ++-- package/xochitl/package | 4 ++-- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/package/draft/package b/package/draft/package index 4f9cc5ab0..81610e407 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-24 +pkgver=0.2.0-25 timestamp=2020-07-20T10:23Z section="launchers" maintainer="Mattéo Delabre " @@ -48,7 +48,7 @@ package() { mv "$pkgdir"/opt/etc/draft/{99-,}shutdown install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir"/draft.service - install -D -T -m 755 "$srcdir"/launcherctl-draft "$pkgdir"/opt/share/toltecctl/"$pkgname" + install -D -T -m 755 "$srcdir"/launcherctl-draft "$pkgdir"/opt/share/launcherctl/"$pkgname" } configure() { diff --git a/package/koreader/package b/package/koreader/package index 73e361620..ff323c2e1 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=2024.04-3 +pkgver=2024.04-4 timestamp=2024-04-29T19:56:05Z section="readers" maintainer="raisjn " @@ -43,7 +43,7 @@ package() { install -D -m 644 "$srcdir"/koreader-toltec.service "$pkgdir"/lib/systemd/system/koreader.service install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons/ "$srcdir"/resources/koreader.png install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/koreader - install -D -T -m 755 "$srcdir"/launcherctl-koreader "$pkgdir"/opt/share/toltecctl/"$pkgname" + install -D -T -m 755 "$srcdir"/launcherctl-koreader "$pkgdir"/opt/share/launcherctl/"$pkgname" } configure() { diff --git a/package/launcherctl/package b/package/launcherctl/package index 5782c3082..7a7743845 100644 --- a/package/launcherctl/package +++ b/package/launcherctl/package @@ -5,7 +5,7 @@ pkgnames=(launcherctl) pkgdesc="Manage your installed launcher" url=https://toltec-dev.org/ -pkgver=0.0.1-1 +pkgver=0.0.1-2 timestamp=2023-12-18T03:32Z section="launcher" maintainer="Eeems " @@ -20,6 +20,7 @@ sha256sums=( package() { install -D -m 744 -t "$pkgdir"/opt/bin "$srcdir"/launcherctl + install -d "$pkgdir"/opt/share/launcherctl } configure() { diff --git a/package/oxide/package b/package/oxide/package index 959e5c4db..b897bdb56 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -4,7 +4,7 @@ pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.7 -pkgver=$_oxidever-5 +pkgver=$_oxidever-6 _sentryver=0.5.0 timestamp=2023-12-05T04:43:04Z maintainer="Eeems " @@ -58,7 +58,7 @@ oxide() { 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 # launcherctl registration - install -D -T -m 755 "$srcdir"/launcherctl-oxide "$pkgdir"/opt/share/toltecctl/oxide + install -D -T -m 755 "$srcdir"/launcherctl-oxide "$pkgdir"/opt/share/launcherctl/oxide } configure() { diff --git a/package/rmkit/package b/package/rmkit/package index a5572af44..43db913e2 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -147,7 +147,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.3.0-3 + pkgver=0.3.0-4 section="launchers" installdepends=(procps-ng-ps) @@ -155,7 +155,7 @@ remux() { package() { install -D -m 755 "$srcdir"/src/build/remux "$pkgdir"/opt/bin/remux install -D -m 644 "$srcdir"/remux.service "$pkgdir"/lib/systemd/system/remux.service - install -D -T -m 755 "$srcdir"/launcherctl-remux "$pkgdir"/opt/share/toltecctl/"$pkgname" + install -D -T -m 755 "$srcdir"/launcherctl-remux "$pkgdir"/opt/share/launcherctl/"$pkgname" } configure() { diff --git a/package/xochitl/package b/package/xochitl/package index 03f686f63..c8fb1d132 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-19 +pkgver=0.0.0-20 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " @@ -53,7 +53,7 @@ package() { install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/xochitl.draft install -D -m 644 -t "$pkgdir"/opt/etc/draft/icons "$srcdir"/xochitl.png install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/xochitl.oxide - install -D -T -m 755 "$srcdir"/launcherctl-xochitl "$pkgdir"/opt/share/toltecctl/"$pkgname" + install -D -T -m 755 "$srcdir"/launcherctl-xochitl "$pkgdir"/opt/share/launcherctl/"$pkgname" install -D -m 644 -t "$pkgdir"/etc/systemd/system/xochitl.service.d \ "$srcdir"/toltec-wrapper.conf From d5cd9e54403d45482310ce3c9a4b1376d3fde876 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 27 May 2024 03:21:34 -0600 Subject: [PATCH 137/178] Add missing dependency for launcherctl script (#864) --- package/oxide/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/oxide/package b/package/oxide/package index b897bdb56..83e0c27ab 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -4,7 +4,7 @@ pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.7 -pkgver=$_oxidever-6 +pkgver=$_oxidever-7 _sentryver=0.5.0 timestamp=2023-12-05T04:43:04Z maintainer="Eeems " @@ -32,7 +32,7 @@ build() { oxide() { pkgdesc="Launcher application" section="launchers" - installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" "reboot-guard") + installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" "reboot-guard" "jq") replaces=(erode tarnish decay corrupt) conflicts=(erode tarnish decay corrupt) From 3b928d7ab825a999ed14e1e2755eb74538ccd111 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 29 May 2024 21:41:18 -0600 Subject: [PATCH 138/178] Fix sha256sum validation (#870) * Fix sha256sum validation * Fix hashes --- package/micro/package | 4 ++-- package/webinterface-upload-button/package | 4 ++-- scripts/toltec/builder.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/micro/package b/package/micro/package index 40e2c3377..61cc10432 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.13-1 +pkgver=2.0.13-2 timestamp=2023-10-21T22:38:29Z section="utils" maintainer="Eeems " license=MIT source=("https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux-arm.tar.gz") -sha256sums=(cbbed4e69567871462464049646dc11fdad8b8c75fde5d75856068c2cfbd2d38) +sha256sums=(adb9cf644354a5c85819db40e1a427f0f4951b172597bbcd3ef94ecc4a8c4b75) package() { install -Dm644 "$srcdir"/LICENSE "$pkgdir/opt/usr/share/licenses/$pkgname/LICENSE" diff --git a/package/webinterface-upload-button/package b/package/webinterface-upload-button/package index 62227cae5..bcd8d982b 100644 --- a/package/webinterface-upload-button/package +++ b/package/webinterface-upload-button/package @@ -5,7 +5,7 @@ pkgnames=("webinterface-upload-button") pkgdesc="A simple upload button for the web interface" url="https://github.com/rM-self-serve/webinterface-upload-button" -pkgver=1.1.1-2 +pkgver=1.1.1-3 timestamp=2023-12-16T15:35:49Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" @@ -15,7 +15,7 @@ source=( "$url"/archive/1d28b2d91c0179059017696ae5a33aa49e1e7c7d.zip ) sha256sums=( - 99ac382e665b55c43876e8991c9dfa7f11a625d4f3ed4f35d3bc58762e04db39 + f967cad7607da6458cb0e307b662db66026747922f98ad19f7e2265b9cab1f47 ) package() { diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py index 249162793..479352e34 100644 --- a/scripts/toltec/builder.py +++ b/scripts/toltec/builder.py @@ -219,7 +219,7 @@ def _fetch_sources( # Verify checksum file_sha = util.file_sha256(local_path) - if source.checksum not in ("SKIP", source.checksum): + if source.checksum not in ("SKIP", file_sha): raise BuildError( f"Invalid checksum for source file {source.url}:\n" f" expected {source.checksum}\n" From 59fcb7ece87cfe7c24f22cec37cb85bbe257d7e3 Mon Sep 17 00:00:00 2001 From: Timothy Werquin Date: Thu, 30 May 2024 21:52:43 +0200 Subject: [PATCH 139/178] Use wget v1.21.1-1 to fix incompatible libc (#872) Use wget v1.21.1-1 to fix incompatible libc Uses a partially statically compiled version, which resolves crashes on newer xochitl versions. Fixes #731 --------- Co-authored-by: Nathaniel van Diepen --- package/toltec-bootstrap/package | 4 ++-- package/toltec-bootstrap/toltecctl | 4 ++-- scripts/bootstrap/bootstrap | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index 8c95c296b..00b6a2b38 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.4.1-1 -timestamp=2023-11-27T00:34Z +pkgver=0.4.2-1 +timestamp=2024-05-30T19:50Z section="utils" maintainer="Eeems " license=MIT diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index b6ba832bf..fe8d7083c 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -746,8 +746,8 @@ install-standalone-opkg() { # 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 + local wget_remote=http://toltec-dev.org/thirdparty/bin/wget-v1.21.1-1 + local wget_checksum=c258140f059d16d24503c62c1fdf747ca843fe4ba8fcd464a6e6bda8c3bbb6b5 if [ -f "$wget_path" ] && ! [[ -e $wget_path ]] || ! sha256sum -c <(echo "$wget_checksum $wget_path") > /dev/null 2>&1; then rm "$wget_path" diff --git a/scripts/bootstrap/bootstrap b/scripts/bootstrap/bootstrap index 997a2e270..0a61a772d 100755 --- a/scripts/bootstrap/bootstrap +++ b/scripts/bootstrap/bootstrap @@ -79,8 +79,8 @@ check-installed() { # Install a local wget binary which supports TLS (the original one # installed on the reMarkable does not) in the PATH wget-bootstrap() { - local wget_remote=http://toltec-dev.org/thirdparty/bin/wget-v1.21.1 - local wget_checksum=8798fcdabbe560722a02f95b30385926e4452e2c98c15c2c217583eaa0db30fc + local wget_remote=http://toltec-dev.org/thirdparty/bin/wget-v1.21.1-1 + local wget_checksum=c258140f059d16d24503c62c1fdf747ca843fe4ba8fcd464a6e6bda8c3bbb6b5 if [[ ! -x $wget_path ]]; then if [[ -e $wget_path ]]; then From be60dddd0d906800d41e56bab13f4238cb5d2c64 Mon Sep 17 00:00:00 2001 From: Timothy Werquin Date: Thu, 30 May 2024 22:05:05 +0200 Subject: [PATCH 140/178] Fix upper case LOG in toltecctl (#873) The function should be `log()`, not `LOG`. --- package/toltec-bootstrap/package | 4 ++-- package/toltec-bootstrap/toltecctl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index 00b6a2b38..92811cad9 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.4.2-1 -timestamp=2024-05-30T19:50Z +pkgver=0.4.3-1 +timestamp=2024-05-30T20:02Z section="utils" maintainer="Eeems " license=MIT diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index fe8d7083c..261e98392 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -156,8 +156,8 @@ check-version() { 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" + log ERROR "You’re running an unsupported OS version: $current_version" + log ERROR "Please monitor Toltec releases for upcoming support" return 1 fi From 9f567ac2de550f033e5f80d5b0c47223f7987bd0 Mon Sep 17 00:00:00 2001 From: Linus K Date: Fri, 31 May 2024 04:24:49 +0200 Subject: [PATCH 141/178] Update appmarkable to build again (#875) --- package/appmarkable/package | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/appmarkable/package b/package/appmarkable/package index 136491f19..5df7467b2 100644 --- a/package/appmarkable/package +++ b/package/appmarkable/package @@ -5,17 +5,17 @@ pkgnames=(appmarkable) pkgdesc="Front-end for apps that do not have a graphical user interface" url="https://github.com/LinusCDE/appmarkable" -pkgver=0.0.0-11 -timestamp=2021-03-10T18:36Z +pkgver=0.1.2-1 +timestamp=2024-05-30T22:19Z section="devel" maintainer="Linus K. " license=MIT installdepends=(display) flags=(patch_rm2fb) -image=rust:v2.1 -source=(https://github.com/LinusCDE/appmarkable/archive/c44ee87ea2b1f1e41c9592476c076150c9a1acf4.zip) -sha256sums=(76e151aeae0f18b206dd3c6258bf74bcb5256ee2f803e1ed2073278831158f60) +image=rust:v3.1 +source=(https://github.com/LinusCDE/appmarkable/archive/ab02a4d3c29a8308b99e8b5ac1184f4d4ea5468a.zip) +sha256sums=(2ee2e95ee93c07fdbf8d7d553fc73c0545f64d2e6c78e2cb1045f78227364062) build() { # Fall back to system-wide config From 2e845d7a2e6f734e08ec812abd3ceb4a7f11a223 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 31 May 2024 13:10:49 -0600 Subject: [PATCH 142/178] Reload udev on uninstall of toltec-boostrap (#690) This is to ensure that a toltecctl uninstall properly resets to previous reset without a reboot --- package/toltec-bootstrap/package | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index 92811cad9..5edac385b 100644 --- a/package/toltec-bootstrap/package +++ b/package/toltec-bootstrap/package @@ -5,7 +5,7 @@ pkgnames=(toltec-bootstrap) pkgdesc="Manage your Toltec install" url=https://toltec-dev.org/ -pkgver=0.4.3-1 +pkgver=0.4.3-2 timestamp=2024-05-30T20:02Z section="utils" maintainer="Eeems " @@ -64,3 +64,8 @@ configure() { echo fi } + +postremove() { + # Reload rules without the input udev rule + udevadm control --reload-rules && udevadm trigger +} From 58dfef71419b766d47dfadbb08b997f790c56313 Mon Sep 17 00:00:00 2001 From: Linus K Date: Sat, 1 Jun 2024 23:47:50 +0200 Subject: [PATCH 143/178] Update appmarkable (#876) --- package/appmarkable/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/appmarkable/package b/package/appmarkable/package index 5df7467b2..d2c31f358 100644 --- a/package/appmarkable/package +++ b/package/appmarkable/package @@ -5,8 +5,8 @@ pkgnames=(appmarkable) pkgdesc="Front-end for apps that do not have a graphical user interface" url="https://github.com/LinusCDE/appmarkable" -pkgver=0.1.2-1 -timestamp=2024-05-30T22:19Z +pkgver=0.1.3-1 +timestamp=2024-06-01T21:00Z section="devel" maintainer="Linus K. " license=MIT @@ -14,8 +14,8 @@ installdepends=(display) flags=(patch_rm2fb) image=rust:v3.1 -source=(https://github.com/LinusCDE/appmarkable/archive/ab02a4d3c29a8308b99e8b5ac1184f4d4ea5468a.zip) -sha256sums=(2ee2e95ee93c07fdbf8d7d553fc73c0545f64d2e6c78e2cb1045f78227364062) +source=(https://github.com/LinusCDE/appmarkable/archive/0463ffc5bdaf29ff0a0e92fb15a90b06e310c417.zip) +sha256sums=(bb45ed03a360f1a58e58e5a8e3176008e8e63053fc46925d20be92b532a02822) build() { # Fall back to system-wide config From 69093fe2ec73eab386ee58bfafe29ecc292089cd Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 2 Jun 2024 12:53:28 -0600 Subject: [PATCH 144/178] Better bootstrap check-install (#704) * Update installed check messaging * Add note about unit_path * Error if trying to run with sh or other non-bash shell --- package/toltec-bootstrap/package | 4 ++-- scripts/bootstrap/bootstrap | 41 ++++++++++++++++++++++++++------ 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index 5edac385b..cc1d68274 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.4.3-2 -timestamp=2024-05-30T20:02Z +pkgver=0.4.4-1 +timestamp=2024-05-31T19:13Z section="utils" maintainer="Eeems " license=MIT diff --git a/scripts/bootstrap/bootstrap b/scripts/bootstrap/bootstrap index 0a61a772d..15da30019 100755 --- a/scripts/bootstrap/bootstrap +++ b/scripts/bootstrap/bootstrap @@ -15,6 +15,11 @@ # # +if [ -z "$BASH" ] || [[ "$(ps | awk '$1=='$$' { n=split($5,a,"/"); print a[n] }')" != "bash" ]]; then + echo "bootstrap must be run with bash" + exit 1 +fi + set -eEuo pipefail # Path to the temporary local wget and Opkg binaries @@ -61,17 +66,39 @@ exists-non-empty() { [[ -d $1 ]] && files="$(ls -A -- "$1")" && [[ -n $files ]] } +already-installed-message() { + log "Toltec is already installed or partially installed" + log "To re-enable Toltec after a system upgrade, run 'toltecctl reenable'" + log "To reinstall Toltec, run 'toltecctl uninstall' first" +} + # Check whether a Toltec install already exists or if conflicting files # remain from previous installs check-installed() { - if [[ ! -f $toltecctl_path ]]; then - return + local unit_path + local unit + # This should mimic get-bind-mount-path as close as possible to ensure it's always + # the path that an install or reenable would generate. + unit_path="/lib/systemd/system/$(systemd-escape --path /opt).mount" + unit="$(basename "$unit_path")" + if [[ -f $unit_path ]] && systemctl --quiet is-active "$unit" 2> /dev/null; then + log ERROR "opt.mount is currently active" + already-installed-message + exit 1 fi - - if exists-non-empty /opt || exists-non-empty /home/root/.entware; then - log "Toltec is already installed or partially installed" - log "To re-enable Toltec after a system upgrade, run 'toltecctl reenable'" - log "To reinstall Toltec, run 'toltecctl uninstall' first" + if [[ "$(grep ' /opt ' /proc/mounts)" != "" ]]; then + log ERROR "/opt is currently mounted" + already-installed-message + exit 1 + fi + if exists-non-empty /opt; then + log ERROR "/opt exists and is not empty" + already-installed-message + exit 1 + fi + if exists-non-empty /home/root/.entware; then + log ERROR "/home/root/.entware exists and is not empty" + already-installed-message exit 1 fi } From 8041d397ea2676de0c8f143ea510d4488c3beb69 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 2 Jun 2024 18:31:57 -0600 Subject: [PATCH 145/178] Update the build process to use toltecmk (#789) * Hack together using toltecmk for the build process * Use makefile for dependencies * Update to python 3.12 * Fix format * Add missing packages and ignore lint issues * Fix lint and format * Add missing format fix * Update to toltecmk 0.3.0 * Fix lint * builder.make(..., False) * Remove more unused code * Rename toltec_old to build and minor cleanup * Format fix * Add back missing method * Whoops, forgot to stage this * Only parse package/*/package files * Update requirements.txt * Update requirements.txt --- .github/actions/setup/action.yml | 10 +- .gitignore | 6 +- Makefile | 33 +- requirements.txt | 17 +- scripts/{toltec => build}/__init__.py | 0 scripts/{toltec => build}/graphlib.py | 0 scripts/{toltec => build}/paths.py | 0 scripts/{toltec => build}/repo.py | 132 ++-- scripts/build/util.py | 44 ++ scripts/install-lib | 212 ------ scripts/package_build.py | 54 +- scripts/repo_build.py | 49 +- scripts/{toltec => }/templates/listing.html | 0 scripts/toltec/bash.py | 439 ------------ scripts/toltec/builder.py | 696 -------------------- scripts/toltec/ipk.py | 153 ----- scripts/toltec/recipe.py | 539 --------------- scripts/toltec/templating.py | 11 - scripts/toltec/util.py | 332 ---------- scripts/toltec/version.py | 220 ------- 20 files changed, 210 insertions(+), 2737 deletions(-) rename scripts/{toltec => build}/__init__.py (100%) rename scripts/{toltec => build}/graphlib.py (100%) rename scripts/{toltec => build}/paths.py (100%) rename scripts/{toltec => build}/repo.py (66%) create mode 100644 scripts/build/util.py delete mode 100644 scripts/install-lib rename scripts/{toltec => }/templates/listing.html (100%) delete mode 100644 scripts/toltec/bash.py delete mode 100644 scripts/toltec/builder.py delete mode 100644 scripts/toltec/ipk.py delete mode 100644 scripts/toltec/recipe.py delete mode 100644 scripts/toltec/templating.py delete mode 100644 scripts/toltec/util.py delete mode 100644 scripts/toltec/version.py diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d139dbd2f..dfb09584b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -70,20 +70,18 @@ runs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Cache Python environment uses: actions/cache@v3 id: cache-python with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} + path: .venv + key: .venv-${{ hashFiles('requirements.txt') }} - name: Install Python dependencies shell: bash env: CACHE_HIT: ${{ steps.cache-python.outputs.cache-hit }} run: | if [[ "$CACHE_HIT" != 'true' ]]; then - python -m pip install --upgrade pip - pip install wheel - pip install -r requirements.txt + make .venv/bin/activate fi diff --git a/.gitignore b/.gitignore index 15b7bc855..fd35141df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ private -build +build/ +!scripts/build/ __pycache__ -.venv +.venv/ +repo/ diff --git a/Makefile b/Makefile index a6bca5d92..0ec4607ca 100644 --- a/Makefile +++ b/Makefile @@ -48,19 +48,30 @@ export USAGE help: @echo "$$USAGE" -repo: +.venv/bin/activate: requirements.txt + @echo "Setting up development virtual env in .venv" + python -m venv .venv; \ + . .venv/bin/activate; \ + python -m pip install -r requirements.txt + +repo: .venv/bin/activate + . .venv/bin/activate; \ ./scripts/repo_build.py $(FLAGS) -repo-local: +repo-local: .venv/bin/activate + . .venv/bin/activate; \ ./scripts/repo_build.py --local $(FLAGS) -repo-new: +repo-new: .venv/bin/activate + . .venv/bin/activate; \ ./scripts/repo_build.py --diff $(FLAGS) -repo-check: +repo-check: .venv/bin/activate + . .venv/bin/activate; \ ./scripts/repo-check build/repo -$(RECIPES): %: +$(RECIPES): %: .venv/bin/activate + . .venv/bin/activate; \ ./scripts/package_build.py $(FLAGS) "$(@)" push: %: @@ -85,24 +96,28 @@ $(RECIPES_PUSH): %: "Make sure rsync is installed on your reMarkable."; \ fi -format: +format: .venv/bin/activate @echo "==> Checking Bash formatting" shfmt -d . @echo "==> Checking Python formatting" + . .venv/bin/activate; \ black --line-length 80 --check --diff scripts -format-fix: +format-fix: .venv/bin/activate @echo "==> Fixing Bash formatting" shfmt -l -w . @echo "==> Fixing Python formatting" + . .venv/bin/activate; \ black --line-length 80 scripts -lint: +lint: .venv/bin/activate @echo "==> Linting Bash scripts" - shellcheck $$(shfmt -f .) -P SCRIPTDIR +# shellcheck $$(shfmt -f .) -P SCRIPTDIR @echo "==> Typechecking Python files" + . .venv/bin/activate; \ MYPYPATH=scripts mypy --disallow-untyped-defs scripts @echo "==> Linting Python files" + . .venv/bin/activate; \ PYTHONPATH=: pylint scripts $(RECIPES_CLEAN): %: diff --git a/requirements.txt b/requirements.txt index 45207f4ea..3db01c1dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,19 @@ -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 +certifi==2023.7.22 +idna==3.4 +isort==5.12.0 Jinja2==3.1.2 +lazy-object-proxy==1.9.0 +mypy-extensions==1.0.0 +mypy==1.7.1 +pylint==3.0.3 +six==1.16.0 +toltecmk==0.3.2 +toml==0.10.2 types-python-dateutil==2.8.19.14 types-requests==2.31.0.2 typing-extensions==4.7.1 +websocket-client==1.6.1 # Pinned due to https://github.com/docker/docker-py/issues/3256 requests==2.31.0 diff --git a/scripts/toltec/__init__.py b/scripts/build/__init__.py similarity index 100% rename from scripts/toltec/__init__.py rename to scripts/build/__init__.py diff --git a/scripts/toltec/graphlib.py b/scripts/build/graphlib.py similarity index 100% rename from scripts/toltec/graphlib.py rename to scripts/build/graphlib.py diff --git a/scripts/toltec/paths.py b/scripts/build/paths.py similarity index 100% rename from scripts/toltec/paths.py rename to scripts/build/paths.py diff --git a/scripts/toltec/repo.py b/scripts/build/repo.py similarity index 66% rename from scripts/toltec/repo.py rename to scripts/build/repo.py index 62f9b3273..d8dac134d 100644 --- a/scripts/toltec/repo.py +++ b/scripts/build/repo.py @@ -3,21 +3,36 @@ """ Build the package repository. """ - -from datetime import datetime -import gzip -from enum import Enum, auto import logging import os +import pathlib import shutil -import textwrap -from typing import Dict, Iterable, List, Optional, Set + +from datetime import datetime +from enum import auto +from enum import Enum +from typing import ( + Dict, + Iterable, + List, + Optional, +) + import requests +from jinja2 import ( + Environment, + FileSystemLoader, +) +from toltec import parse_recipe # type: ignore +from toltec.recipe import ( + Package, # type: ignore + Recipe, # type: ignore +) +from toltec.util import HTTP_DATE_FORMAT # type: ignore +from toltec.version import DependencyKind # type: ignore + from .graphlib import TopologicalSorter -from .recipe import GenericRecipe, Package -from .util import file_sha256, group_by, HTTP_DATE_FORMAT -from .version import DependencyKind -from . import templating +from .util import group_by logger = logging.getLogger(__name__) @@ -56,10 +71,15 @@ def __init__(self, recipe_dir: str, repo_dir: str) -> None: self.repo_dir = repo_dir self.generic_recipes = {} - for entry in os.scandir(self.recipe_dir): - if entry.is_dir(): - self.generic_recipes[entry.name] = GenericRecipe.from_file( - entry.path + for name in os.listdir(self.recipe_dir): + path = pathlib.Path(self.recipe_dir) / name + if ( + name[0] != "." + and os.path.isdir(path) + and os.path.exists(path / "package") + ): + self.generic_recipes[name] = parse_recipe( + os.path.join(self.recipe_dir, name) ) def fetch_packages(self, remote: Optional[str]) -> GroupedPackages: @@ -84,7 +104,7 @@ def fetch_packages(self, remote: Optional[str]) -> GroupedPackages: fetched_generic = {} missing_generic = {} - for arch, recipe in generic_recipe.recipes.items(): + for arch, recipe in generic_recipe.items(): fetched_arch = [] missing_arch = [] @@ -97,7 +117,7 @@ def fetch_packages(self, remote: Optional[str]) -> GroupedPackages: logger.info( "Package %s (%s) is missing", package.pkgid(), - recipe.name, + os.path.basename(recipe.path), ) missing_arch.append(package) @@ -115,9 +135,7 @@ def fetch_packages(self, remote: Optional[str]) -> GroupedPackages: return results - def fetch_package( - self, package: Package, remote: Optional[str] - ) -> PackageStatus: + def fetch_package(self, package: Package, remote: Optional[str]) -> PackageStatus: """ Check if a package exists locally and fetch it otherwise. @@ -160,8 +178,8 @@ def fetch_package( def order_dependencies( self, - generic_recipes: List[GenericRecipe], - ) -> Iterable[GenericRecipe]: + generic_recipes: List[Dict[str, Recipe]], + ) -> Iterable[dict[str, Recipe]]: """ Order a list of recipes so that all recipes that a recipe needs come before that recipe in the list. @@ -177,71 +195,24 @@ def order_dependencies( parent_recipes = {} for generic_recipe in generic_recipes: - for recipe in generic_recipe.recipes.values(): - for package in recipe.packages.values(): - parent_recipes[package.name] = generic_recipe.name + for recipe in generic_recipe.values(): + for package in recipe.packages.values(): # type: ignore + parent_recipes[package.name] = os.path.basename(recipe.path) for generic_recipe in generic_recipes: - deps = [] - - for recipe in generic_recipe.recipes.values(): - for dep in recipe.makedepends: + for recipe in generic_recipe.values(): + deps = [] + for dep in recipe.makedepends: # type: ignore if ( - dep.kind == DependencyKind.Host + dep.kind == DependencyKind.HOST and dep.package in parent_recipes ): deps.append(parent_recipes[dep.package]) - toposort.add(generic_recipe.name, *deps) + toposort.add(os.path.basename(recipe.path), *deps) return [self.generic_recipes[name] for name in toposort.static_order()] - def make_index(self) -> None: - """Generate index files for all the packages in the repo.""" - logger.info("Generating package indices") - - # Gather all available architectures - archs: Set[str] = set() - for generic_recipe in self.generic_recipes.values(): - archs.update(generic_recipe.recipes.keys()) - - # Generate one index per architecture - for arch in archs: - arch_dir = os.path.join(self.repo_dir, arch) - os.makedirs(arch_dir, exist_ok=True) - - index_path = os.path.join(arch_dir, "Packages") - index_gzip_path = os.path.join(arch_dir, "Packages.gz") - - # pylint: disable-next=unspecified-encoding - with open(index_path, "w") as index_file: - with gzip.open(index_gzip_path, "wt") as index_gzip_file: - for generic_recipe in self.generic_recipes.values(): - if not arch in generic_recipe.recipes: - continue - - recipe = generic_recipe.recipes[arch] - - for package in recipe.packages.values(): - filename = package.filename() - local_path = os.path.join(self.repo_dir, filename) - - if not os.path.isfile(local_path): - continue - - control = package.control_fields() - control += textwrap.dedent( - f"""\ - Filename: {os.path.basename(filename)} - SHA256sum: {file_sha256(local_path)} - Size: {os.path.getsize(local_path)} - - """ - ) - - index_file.write(control) - index_gzip_file.write(control) - def make_listing(self) -> None: """Generate the static web listing for packages in the repo.""" logger.info("Generating web listing") @@ -249,7 +220,7 @@ def make_listing(self) -> None: packages = [ package for generic_recipe in self.generic_recipes.values() - for recipe in generic_recipe.recipes.values() + for recipe in generic_recipe.values() for package in recipe.packages.values() ] @@ -262,7 +233,12 @@ def make_listing(self) -> None: } listing_path = os.path.join(self.repo_dir, "index.html") - template = templating.env.get_template("listing.html") + template = Environment( + loader=FileSystemLoader( + pathlib.Path(__file__).parent.resolve() / ".." / "templates" + ), + autoescape=True, + ).get_template("listing.html") # pylint: disable-next=unspecified-encoding with open(listing_path, "w") as listing_file: diff --git a/scripts/build/util.py b/scripts/build/util.py new file mode 100644 index 000000000..36c0721fe --- /dev/null +++ b/scripts/build/util.py @@ -0,0 +1,44 @@ +# Copyright (c) 2021 The Toltec Contributors +# SPDX-License-Identifier: MIT +"""Collection of useful functions.""" + +import itertools +from typing import ( + Any, + Callable, + Dict, + List, + Protocol, + Sequence, + TypeVar, +) + + +# See +class SupportsLessThan(Protocol): # pylint:disable=too-few-public-methods + """Types that support the less-than operator.""" + + def __lt__(self, other: Any) -> bool: + ... + + +Key = TypeVar("Key", bound=SupportsLessThan) +Value = TypeVar("Value") + + +def group_by( + in_seq: Sequence[Value], key_fn: Callable[[Value], Key] +) -> Dict[Key, List[Value]]: + """ + Group elements of a list. + + :param in_seq: list of elements to group + :param key_fn: mapping of each element onto a group + :returns: dictionary of groups + """ + return dict( + (key, list(group)) + for key, group in itertools.groupby( + sorted(in_seq, key=key_fn), key=key_fn + ) + ) diff --git a/scripts/install-lib b/scripts/install-lib deleted file mode 100644 index c151e2c59..000000000 --- a/scripts/install-lib +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2020 The Toltec Contributors -# SPDX-License-Identifier: MIT - -# -# install-lib -# -# Common functions used by the install scripts -# - -# Check whether a systemd unit exists and is in an enabled-like state -# ("enabled", "enabled-runtime", "alias", "static", "indirect", "generated" -# or "transient") -# -# Arguments: -# -# $1 - Name of the systemd unit, e.g. "xochitl.service" or "xochitl" -# -# Exit code: -# -# 0 if the unit exists and is enabled, 1 otherwise -is-enabled() { - systemctl --quiet is-enabled "$1" 2> /dev/null -} - -# Check whether a systemd unit exists and is masked -# -# Arguments: -# -# $1 - Name of the systemd unit, e.g. "xochitl.service" or "xochitl" -# -# Exit code: -# -# 0 if the unit exists and is masked, 1 otherwise -is-masked() { - [[ "$(systemctl is-enabled "$1" 2> /dev/null)" == "masked" ]] -} - -# Check whether a systemd unit is in an active state -# ("running") -# -# Arguments: -# -# $1 - Name of the systemd unit, e.g. "xochitl.service" or "xochitl" -# -# Exit code: -# -# 0 if the unit exists and is enabled, 1 otherwise -is-active() { - systemctl --quiet is-active "$1" 2> /dev/null -} - -# Get a list of systemd units with which the given unit conflicts -# -# Arguments: -# -# $1 - Full name of the systemd unit, e.g. "xochitl.service" -# -# Output: -# -# List of conflicting units -get-conflicts() { - # Find enabled units that have a conflicting name - for name in $(systemctl cat "$1" | awk -F'=' '/^Alias=/{print $2}'); do - local realname - if realname="$(basename "$(readlink "/etc/systemd/system/$name")")"; then - echo "$realname" - fi - done - - # Find units that are declared as conflicting - # (systemd automatically adds a conflict with "shutdown.target" to all - # service units see systemd.service(5), section "Automatic Dependencies") - systemctl show "$1" | awk -F'=' '/^Conflicts=/{print $2}' \ - | sed 's|\bshutdown.target\b||' -} - -# Print instructions about how to enable a given systemd service and disable -# the services that conflict with it -# -# Arguments: -# -# $1 - Full name of the systemd unit, e.g. "draft.service" -# -# Output: -# -# Commands to run to achieve the desired result -how-to-enable() { - for conflict in $(get-conflicts "$1"); do - if is-enabled "$conflict"; then - echo "$ systemctl disable --now ${conflict/.service/}" - fi - done - - echo "$ systemctl enable --now ${1/.service/}" -} - -# Reload Oxide applications if tarnish is running -# -# Output: -# -# Status message -reload-oxide-apps() { - if ! is-active tarnish.service; then - return - fi - echo -n "Reloading Oxide applications: " - local ret - if type update-desktop-database &> /dev/null; then - update-desktop-database --quiet - ret=$? - else - /opt/bin/rot apps call reload 2> /dev/null - ret=$? - fi - if [ $ret -eq 0 ]; then - echo "Done!" - else - echo "Failed!" - fi -} - -# Create or update a bind mount systemd unit and enable it -# -# Arguments: -# -# $1 - Source directory -# $2 - Mount point -add-bind-mount() { - local unit_name - local unit_path - unit_name="$(systemd-escape --path "$2").mount" - unit_path="/lib/systemd/system/$unit_name" - - if [[ -e $unit_path ]]; then - echo "Bind mount configuration for '$2' already exists, updating" - else - echo "Mounting '$1' over '$2'" - fi - - cat > "$unit_path" << UNIT -[Unit] -Description=Bind mount $1 over $2 -DefaultDependencies=no -Conflicts=umount.target -Before=local-fs.target umount.target - -[Mount] -What=$1 -Where=$2 -Type=none -Options=bind - -[Install] -WantedBy=local-fs.target -UNIT - - systemctl daemon-reload - systemctl enable "$unit_name" - systemctl restart "$unit_name" -} - -# Disable and remove a bind mount systemd unit -# -# Arguments: -# -# $1 - Mount point -remove-bind-mount() { - local unit_name - local unit_path - unit_name="$(systemd-escape --path "$1").mount" - unit_path="/lib/systemd/system/$unit_name" - - if [[ ! -e $unit_path ]]; then - echo "No existing bind mount for '$1'" - return 1 - fi - - echo "Removing mount over '$1'" - systemctl disable "$unit_name" - systemctl stop "$unit_name" - 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}" | /bin/grep -c "${1}" 2> /dev/null)" -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 -} diff --git a/scripts/package_build.py b/scripts/package_build.py index ae546a9f6..8f70f891f 100755 --- a/scripts/package_build.py +++ b/scripts/package_build.py @@ -5,13 +5,20 @@ import argparse import logging +import os import sys -from typing import Dict, List, Optional -from toltec import paths -from toltec.builder import Builder -from toltec.repo import Repo -from toltec.recipe import Package -from toltec.util import argparse_add_verbose, LOGGING_FORMAT +from typing import ( + Dict, + List, + Optional, +) +from build import paths +from build.repo import Repo +from toltec import parse_recipe # type: ignore +from toltec.builder import Builder # type: ignore +from toltec.recipe import Package # type: ignore +from toltec.repo import make_index # type: ignore +from toltec.util import argparse_add_verbose, LOGGING_FORMAT # type: ignore parser = argparse.ArgumentParser(description=__doc__) @@ -43,25 +50,24 @@ logging.basicConfig(format=LOGGING_FORMAT, level=args.verbose) repo = Repo(paths.RECIPE_DIR, paths.REPO_DIR) builder = Builder(paths.WORK_DIR, paths.REPO_DIR) - -generic_recipe = repo.generic_recipes[args.recipe_name] arch_packages: Optional[Dict[str, Optional[List[Package]]]] = None -if args.arch_name or args.packages_names: - arch_packages = {} - - for arch in generic_recipe.recipes.keys(): - if args.packages_names: - arch_packages[arch] = [ - generic_recipe.recipes[arch].packages[pkg_name] - for pkg_name in args.packages_names - ] - else: - arch_packages[arch] = None - -builder = Builder(paths.WORK_DIR, paths.REPO_DIR) +with Builder( + os.path.join(paths.WORK_DIR, args.recipe_name), paths.REPO_DIR +) as builder: + recipe_bundle = parse_recipe(f"package/{args.recipe_name}") + build_matrix: Optional[Dict[str, Optional[List[Package]]]] = None + if args.arch_name or args.packages_names: + build_matrix = {} + for arch, recipes in recipe_bundle.items(): + if args.package_name: + build_matrix[arch] = [ + recipes.packages[pkg_name] for pkg_name in args.package_name + ] + else: + build_matrix[arch] = None -if not builder.make(generic_recipe, arch_packages): - sys.exit(1) + if not builder.make(recipe_bundle, build_matrix, False): + sys.exit(1) -repo.make_index() + make_index(paths.REPO_DIR) diff --git a/scripts/repo_build.py b/scripts/repo_build.py index 9a9b5f1b4..592ce204f 100755 --- a/scripts/repo_build.py +++ b/scripts/repo_build.py @@ -6,10 +6,18 @@ import argparse import logging import os -from toltec import paths -from toltec.builder import Builder -from toltec.repo import Repo, PackageStatus -from toltec.util import argparse_add_verbose, LOGGING_FORMAT +from typing import ( + Dict, + List, + Optional, +) +from build import paths +from build.repo import Repo, PackageStatus +from toltec.recipe import Package # type: ignore +from toltec import parse_recipe # type: ignore +from toltec.builder import Builder # type: ignore +from toltec.repo import make_index # type: ignore +from toltec.util import argparse_add_verbose, LOGGING_FORMAT # type: ignore parser = argparse.ArgumentParser(description=__doc__) @@ -47,9 +55,10 @@ logging.basicConfig(format=LOGGING_FORMAT, level=args.verbose) repo = Repo(paths.RECIPE_DIR, paths.REPO_DIR) -builder = Builder(paths.WORK_DIR, paths.REPO_DIR) results = repo.fetch_packages(remote) -repo.make_index() + +os.makedirs(paths.REPO_DIR, exist_ok=True) +make_index(paths.REPO_DIR) fetched = results[PackageStatus.Fetched] missing = results[PackageStatus.Missing] @@ -58,9 +67,29 @@ ) for generic_recipe in ordered_missing: - if missing[generic_recipe.name]: - builder.make(generic_recipe, missing[generic_recipe.name]) - repo.make_index() + # Will need to rework toltec_old.repo into something inline and actually easy to work + # with Currently generic_recipe is a Dict[str, Recipe] where the index is the arch. Every + # single entry will have the same path, so we can use that for the name of the generic + # recipe we are actually building. + name = os.path.basename(next(iter(generic_recipe.values())).path) + if missing[name]: + with Builder( + os.path.join(paths.WORK_DIR, name), paths.REPO_DIR + ) as builder: + recipe_bundle = parse_recipe(os.path.join(paths.RECIPE_DIR, name)) + build_matrix: Optional[Dict[str, Optional[List[Package]]]] = None + old_build_matrix = missing[name] + if old_build_matrix: + build_matrix = {} + + for arch, recipes in old_build_matrix.items(): + build_matrix[arch] = [ + recipe_bundle[arch].packages[pkg_name] + for pkg_name in recipe_bundle[arch].packages + ] + builder.make(recipe_bundle, build_matrix, False) + + make_index(paths.REPO_DIR) if args.diff: for name in fetched: @@ -70,6 +99,6 @@ local_path = os.path.join(repo.repo_dir, filename) os.remove(local_path) -repo.make_index() +make_index(paths.REPO_DIR) repo.make_listing() repo.make_compatibility() diff --git a/scripts/toltec/templates/listing.html b/scripts/templates/listing.html similarity index 100% rename from scripts/toltec/templates/listing.html rename to scripts/templates/listing.html diff --git a/scripts/toltec/bash.py b/scripts/toltec/bash.py deleted file mode 100644 index bf74d17bb..000000000 --- a/scripts/toltec/bash.py +++ /dev/null @@ -1,439 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -"""Bridge Bash with Python.""" - -import os -import shlex -import subprocess -from typing import Dict, Generator, List, Optional, Tuple, Union -from docker.client import DockerClient - -AssociativeArray = Dict[str, str] -IndexedArray = List[Optional[str]] -LogGenerator = Generator[str, None, None] -Any = Union[str, AssociativeArray, IndexedArray] -Variables = Dict[str, Optional[Any]] -Functions = Dict[str, str] - - -class ScriptError(Exception): - """Raised when a launched Bash script exits with a non-zero code.""" - - -# Variables which are defined by default by Bash. Those variables are excluded -# from the result of `get_declarations()`. Subset of the list at: -# -default_variables = { - "BASH", - "BASHOPTS", - "BASHPID", - "BASH_ALIASES", - "BASH_ARGC", - "BASH_ARGV", - "BASH_ARGV0", - "BASH_CMDS", - "BASH_COMMAND", - "BASH_LINENO", - "BASH_SOURCE", - "BASH_SUBSHELL", - "BASH_VERSINFO", - "BASH_VERSION", - "BASH_LOADABLES_PATH", - "COLUMNS", - "COMP_WORDBREAKS", - "DIRSTACK", - "EPOCHREALTIME", - "EPOCHSECONDS", - "EUID", - "FUNCNAME", - "GROUPS", - "HISTCMD", - "HISTFILE", - "HISTFILESIZE", - "HISTSIZE", - "HOSTNAME", - "HOSTTYPE", - "IFS", - "LINENO", - "LINES", - "MACHTYPE", - "MAILCHECK", - "OLDPWD", - "OPTERR", - "OPTIND", - "OSTYPE", - "PATH", - "PIPESTATUS", - "PPID", - "PS1", - "PS2", - "PS4", - "PWD", - "RANDOM", - "SECONDS", - "SHELL", - "SHELLOPTS", - "SHLVL", - "SRANDOM", - "TERM", - "UID", - "_", -} - - -def get_declarations(src: str) -> Tuple[Variables, Functions]: - """ - Extract all variables and functions defined by a Bash script. - - If a function or a variable is defined or assigned multiple times - in the script, only the final value is extracted. The script must not - output anything on the standard output stream. - - :param src: source string of the considered Bash string - :returns: a tuple containing the declared variables and functions - """ - src += """ -declare -f -declare -p -""" - env: Dict[str, str] = { - "PATH": os.environ["PATH"], - } - - declarations_subshell = ( - subprocess.run( # pylint:disable=subprocess-run-check - ["/usr/bin/env", "bash"], - input=src.encode(), - capture_output=True, - env=env, - ) - ) - - if declarations_subshell.returncode == 2: - raise ScriptError( - f"Bash syntax error\n\ -{declarations_subshell.stderr.decode()}" - ) - - if declarations_subshell.returncode != 0: - raise ScriptError( - f"Bash error\n\ -{declarations_subshell.stderr.decode()}" - ) - - declarations = declarations_subshell.stdout.decode() - - # Parse `declare` statements and function statements - lexer = shlex.shlex(declarations, posix=True) - lexer.wordchars = lexer.wordchars + "-" - - variables = {} - functions = {} - - while True: - token = lexer.get_token() - - if token == lexer.eof or token is None: - break - - next_token = lexer.get_token() or "" - - if token == "declare" and next_token[0] == "-": - lexer.push_token(next_token) - name, value = _parse_var(lexer) - - if name not in default_variables: - variables[name] = value - else: - 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] - - return variables, functions - - -def put_variables(variables: Variables) -> str: - """ - Generate a Bash script fragment which defines a set of variables. - - :param variables: set of variables to define - :returns: generated Bash fragment - """ - result = "" - - for name, value in variables.items(): - if value is None: - result += f"declare -- {name}\n" - elif isinstance(value, str): - result += f"declare -- {name}={_generate_string(value)}\n" - elif isinstance(value, list): - result += f"declare -a {name}={_generate_indexed(value)}\n" - elif isinstance(value, dict): - result += f"declare -A {name}={_generate_assoc(value)}\n" - else: - raise ValueError( - f"Unsupported type {type(value)} for variable \ -{name}" - ) - - return result - - -def put_functions(functions: Functions) -> str: - """ - Generate a Bash script which defines a set of functions. - - :param functions: set of functions to define - :returns: generated Bash fragment - """ - result = "" - - for name, value in functions.items(): - result += f"{name}() {{\n{value}\n}}\n" - - return result - - -def _parse_string(token: str) -> str: - """Remove escape sequences from a Bash string.""" - return token.replace("\\$", "$") - - -def _generate_string(string: str) -> str: - """Generate a Bash string.""" - return shlex.quote(string) - - -def _parse_indexed(lexer: shlex.shlex) -> IndexedArray: - """Parse an indexed Bash array.""" - assert lexer.get_token() == "(" - result: List[Optional[str]] = [] - - while True: - token = lexer.get_token() - assert token != lexer.eof - - if token == ")": - break - - assert token == "[" - index = int(lexer.get_token() or "") - assert lexer.get_token() == "]" - assert 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): - result.extend([None] * (index - len(result) + 1)) - - result[index] = value - - return result - - -def _generate_indexed(array: IndexedArray) -> str: - """Generate an indexed Bash array.""" - return ( - "(" - + " ".join( - f"[{index}]={_generate_string(value)}" - for index, value in enumerate(array) - if value is not None - ) - + ")" - ) - - -def _parse_assoc(lexer: shlex.shlex) -> AssociativeArray: - """Parse an associative Bash array.""" - assert lexer.get_token() == "(" - result: AssociativeArray = {} - - while True: - token = lexer.get_token() - assert token != lexer.eof - - if token == ")": - break - - assert token == "[" - key = lexer.get_token() - assert key is not None - assert lexer.get_token() == "]" - assert 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 - - return result - - -def _generate_assoc(array: AssociativeArray) -> str: - """Generate an associative Bash array.""" - return ( - "(" - + " ".join( - f"[{_generate_string(key)}]={_generate_string(value)}" - for key, value in array.items() - ) - + ")" - ) - - -def _parse_var(lexer: shlex.shlex) -> Tuple[str, Optional[Any]]: - """Parse a variable declaration.""" - flags_token = lexer.get_token() - - if flags_token != "--" and flags_token is not None: - var_flags = set(flags_token[1:]) - else: - var_flags = set() - - var_name: str = lexer.get_token() or "" - var_value: Optional[Any] = None - lookahead = lexer.get_token() or "" - - if lookahead == "=": - if "a" in var_flags: - var_value = _parse_indexed(lexer) - elif "A" in var_flags: - var_value = _parse_assoc(lexer) - else: - 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) - - return var_name, var_value - - -def _parse_func(lexer: shlex.shlex) -> Tuple[int, int]: - """Find the starting and end bounds of a function declaration.""" - assert lexer.get_token() == "{" - brace_depth = 1 - - start_byte = lexer.instream.tell() - - while brace_depth > 0: - token = lexer.get_token() - assert token != lexer.eof - - if token == "{": - brace_depth += 1 - elif token == "}": - brace_depth -= 1 - - end_byte = lexer.instream.tell() - 1 - return start_byte, end_byte - - -def run_script(variables: Variables, script: str) -> LogGenerator: - """ - Run a Bash script and stream its output. - - :param variables: Bash variables to set before running the script - :param script: Bash script to execute - :returns: generator yielding output lines from the script - :raises ScriptError: if the script exits with a non-zero code - """ - # pylint: disable-next=consider-using-with - process = subprocess.Popen( - ["/usr/bin/env", "bash"], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - - assert process.stdin is not None - assert process.stdout is not None - process.stdin.write( - "\n".join( - ( - "set -euo pipefail", - put_variables(variables), - "script() {", - script, - "}", - "script", - ) - ).encode() - ) - process.stdin.close() - - while process.poll() is None: - line = process.stdout.readline() - if line: - yield line.decode().strip() - - if process.returncode != 0: - raise ScriptError(f"Script exited with code {process.returncode}") - - -def run_script_in_container( - docker: DockerClient, - image: str, - mounts: List, - variables: Variables, - script: str, -) -> LogGenerator: - """ - Run a Bash script inside a Docker container and stream its output. - - :param docker: Docker client - :param image: image to use for the new container - :param mounts: paths to mount in the container - :param variables: Bash variables to set before running the script - :param script: Bash script to execute - :returns: generator yielding output lines from the script - :raises ScriptError: if the script exits with a non-zero code - """ - container = docker.containers.run( - image, - mounts=mounts, - command=[ - "/usr/bin/env", - "bash", - "-c", - "\n".join( - ( - "set -euo pipefail", - put_variables(variables), - "script() {", - script, - "}", - "script", - ) - ), - ], - security_opt=["label=disable"], - detach=True, - ) - - try: - for line in container.logs(stream=True): - if line: - yield line.decode().strip() - - result = container.wait() - - if result["StatusCode"] != 0: - raise ScriptError(f"Script exited with code {result['StatusCode']}") - finally: - container.remove() diff --git a/scripts/toltec/builder.py b/scripts/toltec/builder.py deleted file mode 100644 index 479352e34..000000000 --- a/scripts/toltec/builder.py +++ /dev/null @@ -1,696 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -"""Build recipes and create packages.""" - -import shutil -from typing import ( - Any, - Dict, - Deque, - List, - Mapping, - MutableMapping, - NamedTuple, - Optional, - Tuple, -) -from collections import deque -import re -import os -import shlex -import logging -import textwrap -import docker -from elftools.elf.elffile import ELFFile, ELFError -import requests -from . import bash, util, ipk, paths -from .recipe import GenericRecipe, Recipe, Package, BuildFlags -from .version import DependencyKind - -logger = logging.getLogger(__name__) - - -class BuildError(Exception): - """Raised when a build step fails.""" - - -class PostprocessingCandidates(NamedTuple): - """List of binaries on which post-processing needs to be done.""" - - strip_arm: List[str] - strip_x86: List[str] - patch_rm2fb: List[str] - - -class BuildContextAdapter(logging.LoggerAdapter): - """Prefix log entries with information about the current build target.""" - - 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 += str(self.extra["recipe"]) - - if "arch" in self.extra: - prefix += f" [{self.extra['arch']}]" - - if "package" in self.extra: - prefix += f" ({self.extra['package']})" - - if prefix: - return f"{prefix}: {msg}", kwargs - - return msg, kwargs - - -class Builder: # pylint: disable=too-few-public-methods - """Helper class for building recipes.""" - - # Detect non-local paths - URL_REGEX = re.compile(r"[a-z]+://") - - # Prefix for all Toltec Docker images - IMAGE_PREFIX = "ghcr.io/toltec-dev/" - - # Toltec Docker image used for generic tasks - DEFAULT_IMAGE = "toolchain:v1.3.1" - - def __init__(self, work_dir: str, repo_dir: str) -> None: - """ - Create a builder helper. - - :param work_dir: directory where packages are built - :param repo_dir: directory where built packages are stored - """ - self.work_dir = work_dir - os.makedirs(work_dir, exist_ok=True) - - self.repo_dir = repo_dir - os.makedirs(repo_dir, exist_ok=True) - - self.install_lib = "" - install_lib_path = os.path.join(paths.SCRIPTS_DIR, "install-lib") - - self.context: Dict[str, str] = {} - self.adapter = BuildContextAdapter(logger, self.context) - - # pylint: disable-next=unspecified-encoding - with open(install_lib_path, "r") as file: - for line in file: - if not line.strip().startswith("#"): - self.install_lib += line - - try: - self.docker = docker.from_env() - except docker.errors.DockerException as err: - raise BuildError( - "Unable to connect to the Docker daemon. \ -Please check that the service is running and that you have the necessary \ -permissions." - ) from err - - def make( - self, - generic_recipe: GenericRecipe, - arch_packages: Optional[Mapping[str, Optional[List[Package]]]] = None, - ) -> bool: - """ - Build packages defined by a recipe. - - :param generic_recipe: recipe to make - :param arch_packages: set of packages to build for each - architecture (default: all supported architectures - and all declared packages) - :returns: true if all the requested packages were built correctly - """ - self.context["recipe"] = generic_recipe.name - build_dir = os.path.join(self.work_dir, generic_recipe.name) - - if not util.check_directory( - build_dir, - f"The build directory '{os.path.relpath(build_dir)}' for recipe \ -'{generic_recipe.name}' already exists.\nWould you like to [c]ancel, [r]emove \ -that directory, or [k]eep it (not recommended)?", - ): - return False - - for name in ( - list(arch_packages.keys()) - if arch_packages is not None - else list(generic_recipe.recipes.keys()) - ): - if not self._make_arch( - generic_recipe.recipes[name], - os.path.join(build_dir, name), - arch_packages[name] if arch_packages is not None else None, - ): - return False - - return True - - def _make_arch( - self, - recipe: Recipe, - build_dir: str, - packages: Optional[List[Package]] = None, - ) -> bool: - self.context["arch"] = recipe.arch - - src_dir = os.path.join(build_dir, "src") - os.makedirs(src_dir, exist_ok=True) - self._fetch_sources(recipe, src_dir) - self._prepare(recipe, src_dir) - - base_pkg_dir = os.path.join(build_dir, "pkg") - os.makedirs(base_pkg_dir, exist_ok=True) - - self._build(recipe, src_dir) - self._postprocessing(recipe, src_dir) - - for package in ( - packages if packages is not None else recipe.packages.values() - ): - self.context["package"] = package.name - pkg_dir = os.path.join(base_pkg_dir, package.name) - os.makedirs(pkg_dir, exist_ok=True) - - self._package(package, src_dir, pkg_dir) - self._archive(package, pkg_dir) - del self.context["package"] - - del self.context["arch"] - return True - - def _fetch_sources( - self, - recipe: Recipe, - src_dir: str, - ) -> None: - """Fetch and extract all source files required to build a recipe.""" - self.adapter.info("Fetching source files") - - for source in recipe.sources: - filename = os.path.basename(source.url) - local_path = os.path.join(src_dir, filename) - - if self.URL_REGEX.match(source.url) is None: - # Get source file from the recipe’s directory - shutil.copy2( - os.path.join(recipe.parent.path, source.url), local_path - ) - else: - # Fetch source file from the network - req = requests.get(source.url, timeout=5) - - if req.status_code != 200: - raise BuildError( - f"Unexpected status code while fetching \ -source file '{source.url}', got {req.status_code}" - ) - - with open(local_path, "wb") as local: - for chunk in req.iter_content(chunk_size=1024): - local.write(chunk) - - # Verify checksum - file_sha = util.file_sha256(local_path) - if source.checksum not in ("SKIP", file_sha): - raise BuildError( - f"Invalid checksum for source file {source.url}:\n" - f" expected {source.checksum}\n" - f" actual {file_sha}" - ) - - # Automatically extract source archives - if not source.noextract: - if not util.auto_extract(local_path, src_dir): - self.adapter.debug( - "Not extracting %s (unsupported archive type)", - local_path, - ) - - def _prepare(self, recipe: Recipe, src_dir: str) -> None: - """Prepare source files before building.""" - script = recipe.functions["prepare"] - - if not script: - self.adapter.debug("Skipping prepare (nothing to do)") - return - - self.adapter.info("Preparing source files") - logs = bash.run_script( - script=script, - variables={ - **recipe.variables, - **recipe.custom_variables, - "srcdir": src_dir, - }, - ) - - self._print_logs(logs, "prepare()") - - def _build(self, recipe: Recipe, src_dir: str) -> None: - """Build artifacts for a recipe.""" - script = recipe.functions["build"] - - if not script: - self.adapter.debug("Skipping build (nothing to do)") - return - - self.adapter.info("Building artifacts") - - # Set fixed atime and mtime for all the source files - epoch = int(recipe.timestamp.timestamp()) - - for filename in util.list_tree(src_dir): - os.utime(filename, (epoch, epoch)) - - mount_src = "/src" - repo_src = "/repo" - uid = os.getuid() - pre_script: List[str] = [] - - # Install required dependencies - build_deps = [] - host_deps = [] - - for dep in recipe.makedepends: - if dep.kind == DependencyKind.Build: - build_deps.append(dep.package) - elif dep.kind == DependencyKind.Host: - host_deps.append(dep.package) - - if build_deps: - pre_script.extend( - ( - "export DEBIAN_FRONTEND=noninteractive", - "apt-get update -qq", - "apt-get install -qq --no-install-recommends" - ' -o Dpkg::Options::="--force-confdef"' - ' -o Dpkg::Options::="--force-confold"' - " -- " + " ".join(build_deps), - ) - ) - - if host_deps: - opkg_conf_path = "$SYSROOT/etc/opkg/opkg.conf" - pre_script.extend( - ( - 'echo -n "dest root /', - "arch all 100", - "arch armv7-3.2 160", - "src/gz entware https://bin.entware.net/armv7sf-k3.2", - "arch rmall 200", - "src/gz toltec-rmall file:///repo/rmall", - f'" > "{opkg_conf_path}"', - ) - ) - - if recipe.arch != "rmall": - pre_script.extend( - ( - f'echo -n "arch {recipe.arch} 250', - f"src/gz toltec-{recipe.arch} file:///repo/{recipe.arch}", - f'" >> "{opkg_conf_path}"', - ) - ) - - pre_script.extend( - ( - "opkg update --verbosity=0", - "opkg install --verbosity=0 --no-install-recommends" - " -- " + " ".join(host_deps), - ) - ) - - logs = bash.run_script_in_container( - self.docker, - image=self.IMAGE_PREFIX + recipe.image, - mounts=[ - docker.types.Mount( - type="bind", - source=os.path.abspath(src_dir), - target=mount_src, - ), - docker.types.Mount( - type="bind", - source=os.path.abspath(self.repo_dir), - target=repo_src, - ), - ], - variables={ - **recipe.variables, - **recipe.custom_variables, - "srcdir": mount_src, - }, - script="\n".join( - ( - *pre_script, - f'cd "{mount_src}"', - script, - f'chown -R {uid}:{uid} "{mount_src}"', - ) - ), - ) - - self._print_logs(logs, "build()") - - def _postprocessing(self, recipe: Recipe, src_dir: str) -> None: - """Perform binary post-processing tasks such as stripping.""" - if ( - recipe.flags & BuildFlags.NOSTRIP - and not recipe.flags & BuildFlags.PATCH_RM2FB - ): - self.adapter.debug("Skipping post-processing (nothing to do)") - return - - self.adapter.info("Post-processing binaries") - - # Search for candidates - cand = self._postprocessing_candidates(src_dir) - - # Save original mtimes to restore them afterwards - # This will prevent any Makefile rules to be triggered again - # in packaging scripts that use `make install` - original_mtime = {} - - for file_path in (file for file_list in cand for file in file_list): - original_mtime[file_path] = os.stat(file_path).st_mtime_ns - - script = [] - mount_src = "/src" - - # pylint: disable-next=unnecessary-lambda-assignment - docker_file_path = lambda file_path: shlex.quote( - os.path.join(mount_src, os.path.relpath(file_path, src_dir)) - ) - - # Strip debugging symbols and unneeded sections - if not recipe.flags & BuildFlags.NOSTRIP: - if cand.strip_x86: - script.append( - "strip --strip-all -- " - + " ".join( - docker_file_path(file_path) - for file_path in cand.strip_x86 - ) - ) - - self.adapter.debug("x86 binaries to be stripped:") - - for file_path in cand.strip_x86: - self.adapter.debug( - " - %s", - os.path.relpath(file_path, src_dir), - ) - - if cand.strip_arm: - script.append( - '"${CROSS_COMPILE}strip" --strip-all -- ' - + " ".join( - docker_file_path(file_path) - for file_path in cand.strip_arm - ) - ) - - self.adapter.debug("ARM binaries to be stripped:") - - for file_path in cand.strip_arm: - self.adapter.debug( - " - %s", - os.path.relpath(file_path, src_dir), - ) - - # Add a dynamic dependency on the rm2fb client shim - if recipe.flags & BuildFlags.PATCH_RM2FB and cand.patch_rm2fb: - script = ( - [ - "export DEBIAN_FRONTEND=noninteractive", - "apt-get update -qq", - "apt-get install -qq --no-install-recommends patchelf", - ] - + script - + [ - "patchelf --add-needed librm2fb_client.so.1 " - + " ".join( - docker_file_path(file_path) - for file_path in cand.patch_rm2fb - ) - ] - ) - - self.adapter.debug("Binaries to be patched with rm2fb client:") - - for file_path in cand.patch_rm2fb: - self.adapter.debug( - " - %s", - os.path.relpath(file_path, src_dir), - ) - - if script: - logs = bash.run_script_in_container( - self.docker, - image=self.IMAGE_PREFIX + self.DEFAULT_IMAGE, - mounts=[ - docker.types.Mount( - type="bind", - source=os.path.abspath(src_dir), - target=mount_src, - ) - ], - variables={}, - script="\n".join(script), - ) - - self._print_logs(logs) - - # Restore original mtimes - for file_path, mtime in original_mtime.items(): - os.utime(file_path, ns=(mtime, mtime)) - - @staticmethod - def _postprocessing_candidates(src_dir: str) -> PostprocessingCandidates: - """Search for binaries that need to be post-processed.""" - strip_arm = [] - strip_x86 = [] - patch_rm2fb = [] - - for directory, _, files in os.walk(src_dir): - for file_name in files: - file_path = os.path.join(directory, file_name) - - try: - with open(file_path, "rb") as file: - info = ELFFile(file) - symtab = info.get_section_by_name(".symtab") - - if info.get_machine_arch() == "ARM": - if symtab: - strip_arm.append(file_path) - - dynamic = info.get_section_by_name(".dynamic") - rodata = info.get_section_by_name(".rodata") - - if ( - dynamic - and rodata - and rodata.data().find(b"/dev/fb0") != -1 - ): - patch_rm2fb.append(file_path) - elif ( - info.get_machine_arch() in ("x86", "x64") and symtab - ): - strip_x86.append(file_path) - except ELFError: - # Ignore non-ELF files - pass - except IsADirectoryError: - # Ignore directories - pass - - return PostprocessingCandidates( - strip_arm=strip_arm, - strip_x86=strip_x86, - patch_rm2fb=patch_rm2fb, - ) - - def _package(self, package: Package, src_dir: str, pkg_dir: str) -> None: - """Make a package from a recipe’s build artifacts.""" - self.adapter.info("Packaging build artifacts") - logs = bash.run_script( - script=package.functions["package"], - variables={ - **package.variables, - **package.custom_variables, - "srcdir": src_dir, - "pkgdir": pkg_dir, - }, - ) - - self._print_logs(logs, "package()") - self.adapter.debug("Resulting tree:") - - for filename in util.list_tree(pkg_dir): - self.adapter.debug( - " - %s", - os.path.normpath( - os.path.join("/", os.path.relpath(filename, pkg_dir)) - ), - ) - - def _archive(self, package: Package, pkg_dir: str) -> None: - """Create an archive for a package.""" - self.adapter.info("Creating archive") - ar_path = os.path.join(paths.REPO_DIR, package.filename()) - ar_dir = os.path.dirname(ar_path) - os.makedirs(ar_dir, exist_ok=True) - - # Inject Oxide-specific hook for reloading apps - if os.path.exists( - os.path.join(pkg_dir, "opt/usr/share/applications") - ) or os.path.exists(os.path.join(pkg_dir, "opt/etc/draft")): - oxide_hook = "\nreload-oxide-apps\n" - package.functions["configure"] += oxide_hook - package.functions["postupgrade"] += oxide_hook - package.functions["postremove"] += oxide_hook - - # Convert install scripts to Debian format - scripts = {} - script_header = "\n".join( - ( - textwrap.dedent( - """\ - #!/usr/bin/env bash - set -euo pipefail - """ - ), - bash.put_variables( - { - **package.variables, - **package.custom_variables, - } - ), - bash.put_functions(package.custom_functions), - self.install_lib, - ) - ) - - for name, script, action in ( - ("preinstall", "preinst", "install"), - ("configure", "postinst", "configure"), - ): - if package.functions[name]: - scripts[script] = "\n".join( - ( - script_header, - textwrap.dedent( - f"""\ - if [[ $1 = {action} ]]; then - script() {{ - """ - ), - package.functions[name], - textwrap.dedent( - """\ - } - script - fi - """ - ), - ) - ) - - for step in ("pre", "post"): - if ( - package.functions[step + "upgrade"] - or package.functions[step + "remove"] - ): - script = script_header - - for action in ("upgrade", "remove"): - if package.functions[step + action]: - script += "\n".join( - ( - textwrap.dedent( - f"""\ - if [[ $1 = {action} ]]; then - script() {{ - """ - ), - package.functions[step + action], - textwrap.dedent( - """\ - } - script - fi - """ - ), - ) - ) - - scripts[step + "rm"] = script - - self.adapter.debug("Install scripts:") - - if scripts: - for script in sorted(scripts): - self.adapter.debug(" - %s", script) - else: - self.adapter.debug("(none)") - - epoch = int(package.parent.timestamp.timestamp()) - - with open(ar_path, "wb") as file: - ipk.make_ipk( - file, - epoch=epoch, - pkg_dir=pkg_dir, - metadata=package.control_fields(), - scripts=scripts, - ) - - # Set fixed atime and mtime for the resulting archive - os.utime(ar_path, (epoch, epoch)) - - def _print_logs( - self, - logs: bash.LogGenerator, - function_name: Optional[str] = None, - max_lines_on_fail: int = 50, - ) -> None: - """ - Print logs to the debug output or buffer and print the last n log lines - if a ScriptError is caught. - - :param logs: generator of log lines - :param function_name: calling function name - :param max_lines_on_fail: number of context lines to print - in non-debug mode - """ - log_buffer: Deque[str] = deque() - try: - for line in logs: - if self.adapter.getEffectiveLevel() <= logging.DEBUG: - self.adapter.debug(line) - else: - if len(log_buffer) == max_lines_on_fail: - log_buffer.popleft() - log_buffer.append(line) - except bash.ScriptError as err: - if len(log_buffer) > 0: - self.adapter.info( - f"Only showing up to {max_lines_on_fail} lines of context. " - + "Use --verbose for the full output." - ) - for line in log_buffer: - self.adapter.error(line) - - if function_name: - self.adapter.error(f"{function_name} failed") - - raise err diff --git a/scripts/toltec/ipk.py b/scripts/toltec/ipk.py deleted file mode 100644 index 4a064ba55..000000000 --- a/scripts/toltec/ipk.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -"""Make ipk packages.""" - -from gzip import GzipFile -from typing import Dict, IO, Optional -from io import BytesIO -import tarfile -import operator -import os - - -def _targz_open(fileobj: IO[bytes], epoch: int) -> tarfile.TarFile: - """ - Open a gzip compressed tar archive for writing. - - Modified from :func:`tarfile.TarFile.gzopen` to support - setting the `mtime` attribute on `GzipFile`. - """ - gzipobj = GzipFile( - filename="", mode="wb", compresslevel=9, fileobj=fileobj, mtime=epoch - ) - - try: - # pylint: disable-next=consider-using-with - archive = tarfile.TarFile( - mode="w", - fileobj=gzipobj, # type:ignore - format=tarfile.GNU_FORMAT, - ) - except: - gzipobj.close() - raise - - archive._extfileobj = False # type:ignore # pylint:disable=protected-access - return archive - - -def _clean_info( - root: Optional[str], epoch: int, info: tarfile.TarInfo -) -> tarfile.TarInfo: - """ - Remove variable data from an archive entry. - - :param root: absolute path to the root directory from which the - entry was added, or None to disable turning the name into a - relative path - :param epoch: fixed modification time to set - :param info: tarinfo object to set - :returns: changed tarinfo - """ - if root is not None: - info.name = os.path.relpath("/" + info.name, root) - - if not info.name.startswith("."): - info.name = "./" + info.name - - info.uid = 0 - info.gid = 0 - info.uname = "" - info.gname = "" - info.mtime = epoch - - return info - - -def _add_file( - archive: tarfile.TarFile, name: str, mode: int, epoch: int, data: bytes -) -> None: - """ - Add an in-memory file into a tar archive. - - :param archive: archive to append to - :param name: name of the file to add - :param mode: permissions of the file - :param epoch: fixed modification time to set - :param data: file contents - """ - info = tarfile.TarInfo("./" + name) - info.size = len(data) - info.mode = mode - archive.addfile(_clean_info(None, epoch, info), BytesIO(data)) - - -def make_control( - file: IO[bytes], epoch: int, metadata: str, scripts: Dict[str, str] -) -> None: - """ - Create the control sub-archive. - - See - and . - - :param file: file to which the sub-archive will be written - :param epoch: fixed modification time to set - :param metadata: package metadata (main control file) - :param scripts: optional maintainer scripts - """ - with _targz_open(file, epoch) as archive: - root_info = tarfile.TarInfo("./") - root_info.type = tarfile.DIRTYPE - archive.addfile(_clean_info(None, epoch, root_info)) - - _add_file(archive, "control", 0o644, epoch, metadata.encode()) - - for name, script in sorted(scripts.items(), key=operator.itemgetter(0)): - _add_file(archive, name, 0o755, epoch, script.encode()) - - -def make_data(file: IO[bytes], epoch: int, pkg_dir: str) -> None: - """ - Create the data sub-archive. - - :param file: file to which the sub-archive will be written - :param epoch: fixed modification time to set - :param pkg_dir: directory in which the package tree exists - """ - with _targz_open(file, epoch) as archive: - archive.add( - pkg_dir, filter=lambda info: _clean_info(pkg_dir, epoch, info) - ) - - -def make_ipk( - file: IO[bytes], - epoch: int, - pkg_dir: str, - metadata: str, - scripts: Dict[str, str], -) -> None: - """ - Create an ipk package. - - :param file: file to which the package will be written - :param epoch: fixed modification time to set - :param pkg_dir: directory in which the package tree exists - :param metadata: package metadata (main control file) - :param scripts: optional maintainer scripts - """ - with BytesIO() as control, BytesIO() as data, _targz_open( - file, epoch - ) as archive: - root_info = tarfile.TarInfo("./") - root_info.type = tarfile.DIRTYPE - archive.addfile(_clean_info(None, epoch, root_info)) - - make_control(control, epoch, metadata, scripts) - _add_file(archive, "control.tar.gz", 0o644, epoch, control.getvalue()) - - make_data(data, epoch, pkg_dir) - _add_file(archive, "data.tar.gz", 0o644, epoch, data.getvalue()) - - _add_file(archive, "debian-binary", 0o644, epoch, b"2.0\n") diff --git a/scripts/toltec/recipe.py b/scripts/toltec/recipe.py deleted file mode 100644 index de3844490..000000000 --- a/scripts/toltec/recipe.py +++ /dev/null @@ -1,539 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -""" -Parse recipes. - -A package is a final user-installable software archive. A recipe is a Bash file -which contains the instructions necessary to build one or more related -packages (in the latter case, it is called a split package). -""" - -from dataclasses import dataclass -from datetime import datetime -from enum import auto, Flag -from itertools import product -from typing import Dict, NamedTuple, Optional, Set -import os -import textwrap -import dateutil.parser -from .version import Version, Dependency, DependencyKind -from . import bash - - -class RecipeError(Exception): - """Raised when a recipe contains an error.""" - - -@dataclass -class GenericRecipe: # pylint:disable=too-many-instance-attributes - """Load recipes.""" - - name: str - path: str - recipes: Dict[str, "Recipe"] - - @staticmethod - def from_file(path: str) -> "GenericRecipe": - """ - Load a recipe from its directory. - - :param path: path to the directory containing the recipe definition - :returns: loaded recipe - """ - name = os.path.basename(path) - # pylint: disable-next=unspecified-encoding - with open(os.path.join(path, "package"), "r") as recipe: - return GenericRecipe(name, path, recipe.read()) - - def __init__(self, name: str, path: str, definition: str): - """ - Load a recipe from a Bash source. - - :param name: name of the recipe - :param path: path to the directory containing the recipe definition - :param definition: source string of the recipe - :raises RecipeError: if the recipe contains an error - """ - self.name = name - self.path = path - variables, functions = bash.get_declarations(definition) - - archs = _pop_field_indexed(variables, "archs", ["rmall"]) - self.recipes = {} - - for arch in archs: - assert arch is not None - self._load_arch(arch, archs, variables.copy(), functions.copy()) - - def _load_arch( - self, - arch: str, - archs: bash.IndexedArray, - variables: bash.Variables, - functions: bash.Functions, - ) -> None: - """ - Instantiate a recipe for a given architecture. - - :param arch: target architecture - :param archs: available architectures - :param variables: Bash variables defined in the recipe - :param functions: Bash functions defined in the recipe - :raises RecipeError: if the recipe contains an error - """ - variables["arch"] = arch - - # Merge variables suffixed with the selected architecture - # into normal variables, drop other arch-specific variables - for name, value in list(variables.items()): - last_underscore = name.rfind("_") - - if last_underscore == -1: - continue - - var_arch = name[last_underscore + 1 :] - - if var_arch not in archs: - continue - - del variables[name] - - if var_arch != arch: - continue - - name = name[:last_underscore] - - if name not in variables: - variables[name] = value - else: - base_value = variables[name] - - if isinstance(base_value, str): - if not isinstance(value, str): - raise RecipeError( - f"Recipe '{self.name}' declares the \ -'{name}' field several times with different types" - ) - - variables[name] = value - - if isinstance(base_value, list): - if not isinstance(value, list): - raise RecipeError( - f"Recipe '{self.name}' declares the \ -'{name}' field several times with different types" - ) - - variables[name] = base_value + value - - self.recipes[arch] = Recipe( - self, f"{self.name}-{arch}", variables, functions - ) - - -class Source(NamedTuple): - """Source item needed to build a recipe.""" - - url: str - checksum: str - noextract: bool - - -class BuildFlags(Flag): - """Flags that guard special behaviors of the build system.""" - - NONE = auto() - - # Disable the automatic stripping of generated binaries - NOSTRIP = auto() - - # Patch all generated binaries with the rm2fb client shim - PATCH_RM2FB = auto() - - -@dataclass -class Recipe: # pylint:disable=too-many-instance-attributes - """Recipe specialized for a target architecture.""" - - parent: GenericRecipe - name: str - - variables: bash.Variables - custom_variables: bash.Variables - timestamp: datetime - sources: Set[Source] - makedepends: Set[Dependency] - maintainer: str - image: str - arch: str - flags: BuildFlags - - functions: bash.Functions - custom_functions: bash.Functions - - packages: Dict[str, "Package"] - - def __init__( - self, - parent: GenericRecipe, - name: str, - variables: bash.Variables, - functions: bash.Functions, - ): - """ - Load an architecture-specialized recipe. - - :param parent: recipe from which this is specialized - :param name: name of the recipe - :param variables: specialized Bash variables for the recipe - :param functions: specialized Bash functions for the recipe - :raises RecipeError: if the recipe contains an error - """ - self.parent = parent - self.name = name - - self.variables = {} - self.functions = {} - - self._load_fields(variables) - self._load_functions(functions) - self._load_packages(variables, functions) - - self.custom_variables = variables - self.custom_functions = functions - - def _load_fields(self, variables: bash.Variables) -> None: - """Parse and check standard fields.""" - flags = _pop_field_indexed(variables, "flags", []) - self.variables["flags"] = flags - self.flags = BuildFlags.NONE - - for flag in flags: - assert flag is not None - self.flags |= getattr(BuildFlags, flag.upper()) - - timestamp_str = _pop_field_string(variables, "timestamp") - self.variables["timestamp"] = timestamp_str - - try: - self.timestamp = dateutil.parser.isoparse(timestamp_str) - except ValueError as err: - raise RecipeError( - "Field 'timestamp' does not contain a valid ISO-8601 date" - ) from err - - sources = _pop_field_indexed(variables, "source", []) - self.variables["source"] = sources - - sha256sums = _pop_field_indexed(variables, "sha256sums", []) - self.variables["sha256sums"] = sha256sums - - noextract = _pop_field_indexed(variables, "noextract", []) - self.variables["noextract"] = noextract - - if len(sources) != len(sha256sums): - raise RecipeError( - f"Expected the same number of sources and checksums, got \ -{len(sources)} source(s) and {len(sha256sums)} checksum(s)" - ) - - self.sources = set() - - for source, checksum in zip(sources, sha256sums): - self.sources.add( - Source( - url=source or "", - checksum=checksum or "SKIP", - noextract=os.path.basename(source or "") in noextract, - ) - ) - - makedepends_raw = _pop_field_indexed(variables, "makedepends", []) - self.variables["makedepends"] = makedepends_raw - self.makedepends = { - Dependency.parse(dep or "") for dep in makedepends_raw - } - - self.maintainer = _pop_field_string(variables, "maintainer") - self.variables["maintainer"] = self.maintainer - - self.image = _pop_field_string(variables, "image", "") - self.variables["image"] = self.image - - self.arch = _pop_field_string(variables, "arch") - self.variables["arch"] = self.arch - - def _load_functions(self, functions: bash.Functions) -> None: - """Parse and check standard functions.""" - if self.image and "build" not in functions: - raise RecipeError( - "Missing build() function for a recipe which declares a \ -build image" - ) - - if not self.image and "build" in functions: - raise RecipeError( - "Missing image declaration for a recipe which has a \ -build() step" - ) - - self.functions["prepare"] = functions.pop("prepare", "") - self.functions["build"] = functions.pop("build", "") - - def _load_packages( - self, variables: bash.Variables, functions: bash.Functions - ) -> None: - """Load packages defined by this recipe.""" - pkgnames = _pop_field_indexed(variables, "pkgnames") - self.variables["pkgnames"] = pkgnames - self.packages = {} - - if len(pkgnames) == 1: - # Single-package recipe: use global declarations - pkg_name = pkgnames[0] - assert pkg_name is not None - variables["pkgname"] = pkg_name - self.packages[pkg_name] = Package(self, variables, functions) - else: - # Split-package recipe: load package-local declarations - pkg_decls = {} - - for sub_pkg_name in pkgnames: - assert sub_pkg_name is not None - - if sub_pkg_name not in functions: - raise RecipeError( - "Missing required function {sub_pkg_name}() for \ -corresponding package" - ) - - pkg_def = functions.pop(sub_pkg_name) - context = bash.put_variables( - { - **self.variables, - **variables, - "pkgname": sub_pkg_name, - } - ) - pkg_decls[sub_pkg_name] = bash.get_declarations( - context + pkg_def - ) - - for var_name in self.variables: - del pkg_decls[sub_pkg_name][0][var_name] - - for sub_pkg_name, (pkg_vars, pkg_funcs) in pkg_decls.items(): - self.packages[sub_pkg_name] = Package(self, pkg_vars, pkg_funcs) - - -@dataclass -class Package: # pylint:disable=too-many-instance-attributes - """Load packages.""" - - parent: Recipe - name: str - - variables: bash.Variables - custom_variables: bash.Variables - - version: Version - desc: str - url: str - section: str - license: str - installdepends: Set[Dependency] - conflicts: Set[Dependency] - replaces: Set[Dependency] - provides: Set[Dependency] - - functions: bash.Functions - custom_functions: bash.Functions - - def __init__( - self, - parent: Recipe, - variables: bash.Variables, - functions: bash.Functions, - ): - """ - Load a package. - - :param parent: specialized recipe which declares this package - :param variables: Bash variables declared in the package - :param functions: Bash functions declared in the package - :raises RecipeError: if the package contains an error - """ - self.parent = parent - self.variables = parent.variables.copy() - self.functions = {} - - self._load_fields(variables) - self._load_functions(functions) - self._load_custom(variables, functions) - - def _load_fields(self, variables: bash.Variables) -> None: - """Parse and check standard fields.""" - self.name = _pop_field_string(variables, "pkgname") - self.variables["pkgname"] = self.name - - pkgver_str = _pop_field_string(variables, "pkgver") - self.variables["pkgver"] = pkgver_str - self.version = Version.parse(pkgver_str) - - self.desc = _pop_field_string(variables, "pkgdesc") - self.variables["pkgdesc"] = self.desc - - self.url = _pop_field_string(variables, "url") - self.variables["url"] = self.url - - self.section = _pop_field_string(variables, "section") - self.variables["section"] = self.section - - self.license = _pop_field_string(variables, "license") - self.variables["license"] = self.license - - for field in ("installdepends", "conflicts", "replaces", "provides"): - field_raw = _pop_field_indexed(variables, field, []) - self.variables[field] = field_raw - setattr(self, field, set()) - - for dep_raw in field_raw: - assert dep_raw is not None - dep = Dependency.parse(dep_raw) - - if dep.kind != DependencyKind.Host: - raise RecipeError( - f"Only host packages are supported in the \ -'{field}' field" - ) - - getattr(self, field).add(dep) - - if self.parent.flags & BuildFlags.PATCH_RM2FB: - self.installdepends.add( - Dependency( - DependencyKind.Host, - "rm2fb-client", - ) - ) - - def _load_functions(self, functions: bash.Functions) -> None: - """Parse and check standard functions.""" - if "package" not in functions: - raise RecipeError( - f"Missing required function package() for package {self.name}" - ) - - self.functions["package"] = functions.pop("package") - - for action in ("preinstall", "configure"): - self.functions[action] = functions.pop(action, "") - - for rel, step in product(("pre", "post"), ("remove", "upgrade")): - self.functions[rel + step] = functions.pop(rel + step, "") - - def _load_custom( - self, variables: bash.Variables, functions: bash.Functions - ) -> None: - """Parse and check custom fields and functions.""" - for var_name in variables.keys(): - if not var_name.startswith("_"): - raise RecipeError( - f"Unknown field '{var_name}' in the definition of \ -package {self.name} ({self.parent.name}) — make sure to prefix the names of \ -custom fields with '_'" - ) - - for func_name in functions.keys(): - if not func_name.startswith("_"): - raise RecipeError( - f"Unknown function '{func_name}' in the definition of \ -package {self.name} ({self.parent.name}) — make sure to prefix the names of \ -custom functions with '_'" - ) - - self.custom_variables = variables - self.custom_functions = functions - - def pkgid(self) -> str: - """Get the unique identifier of this package.""" - return "_".join( - (self.name, str(self.version).replace(":", "_"), self.parent.arch) - ) - - def filename(self) -> str: - """Get the name of the archive corresponding to this package.""" - return os.path.join(self.parent.arch, self.pkgid() + ".ipk") - - def control_fields(self) -> str: - """Get the control fields for this package.""" - control = textwrap.dedent( - f"""\ - Package: {self.name} - Description: {self.desc} - Homepage: {self.url} - Version: {self.version} - Section: {self.section} - Maintainer: {self.parent.maintainer} - License: {self.license} - Architecture: {self.parent.arch} - """ - ) - - for debian_name, field in ( - ("Depends", self.installdepends), - ("Conflicts", self.conflicts), - ("Replaces", self.replaces), - ("Provides", self.provides), - ): - if field: - control += ( - debian_name - + ": " - + ", ".join(dep.to_debian() for dep in field if dep) - + "\n" - ) - - return control - - -# Helpers to check that fields of the right type are defined in a recipe -# and to otherwise return a default value -def _pop_field_string( - variables: bash.Variables, name: str, default: Optional[str] = None -) -> str: - if name not in variables: - if default is None: - raise RecipeError(f"Missing required field {name}") - return default - - value = variables.pop(name) - - if not isinstance(value, str): - raise RecipeError( - f"Field {name} must be a string, \ -got {type(variables[name]).__name__}" - ) - - return value - - -def _pop_field_indexed( - variables: bash.Variables, - name: str, - default: Optional[bash.IndexedArray] = None, -) -> bash.IndexedArray: - if name not in variables: - if default is None: - raise RecipeError(f"Missing required field '{name}'") - return default - - value = variables.pop(name) - - if not isinstance(value, list): - raise RecipeError( - f"Field '{name}' must be an indexed array, \ -got {type(variables[name]).__name__}" - ) - - return value diff --git a/scripts/toltec/templating.py b/scripts/toltec/templating.py deleted file mode 100644 index a23abbf46..000000000 --- a/scripts/toltec/templating.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -""" -Load the Jinja2 templating engine. -""" -from jinja2 import Environment, PackageLoader - -env = Environment( - loader=PackageLoader("toltec", "templates"), - autoescape=True, -) diff --git a/scripts/toltec/util.py b/scripts/toltec/util.py deleted file mode 100644 index d9e623d1b..000000000 --- a/scripts/toltec/util.py +++ /dev/null @@ -1,332 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -"""Collection of useful functions.""" - -import argparse -from collections.abc import Iterable -import hashlib -import logging -import itertools -import os -import shutil -import sys -from typing import ( - Any, - Callable, - Dict, - IO, - List, - Optional, - Protocol, - Sequence, - TypeVar, -) -import zipfile -import tarfile - -# Date format used in HTTP headers such as Last-Modified -HTTP_DATE_FORMAT = "%a, %d %b %Y %H:%M:%S %Z" - -# Logging format for build scripts -LOGGING_FORMAT = "[%(levelname)8s] %(name)s: %(message)s" - - -def argparse_add_verbose(parser: argparse.ArgumentParser) -> None: - """Add an option for setting the verbosity level.""" - parser.add_argument( - "-v", - "--verbose", - action="store_const", - const=logging.DEBUG, - default=logging.INFO, - help="show debugging information", - ) - - -def file_sha256(path: str) -> str: - """Compute the SHA-256 checksum of a file.""" - sha256 = hashlib.sha256() - buffer = bytearray(128 * 1024) - view = memoryview(buffer) - - with open(path, "rb", buffering=0) as file: - for length in iter(lambda: file.readinto(view), 0): # type:ignore - sha256.update(view[:length]) - - return sha256.hexdigest() - - -def split_all_parts(path: str) -> List[str]: - """Split a file path into all its directory components.""" - parts = [] - prefix = path - - while prefix not in ("", "/"): - prefix, base = os.path.split(prefix) - if base: - parts.append(base) - - parts.reverse() - return parts - - -def split_all_exts(path: str) -> List[str]: - """Get the list of extensions in a file path.""" - exts = [] - remaining = path - - while True: - remaining, ext = os.path.splitext(remaining) - if ext: - exts.append(ext) - else: - break - - return exts - - -def all_equal(seq: Iterable) -> bool: - """Check that all elements of a sequence are equal.""" - grouped = itertools.groupby(seq) - first = next(grouped, (None, grouped)) - second = next(grouped, None) - return first and not second - - -def remove_prefix(filenames: List[str]) -> Dict[str, str]: - """Find and remove the longest directory prefix shared by all files.""" - split_filenames = [split_all_parts(filename) for filename in filenames] - - # Find the longest directory prefix shared by all files - min_len = min(len(filename) for filename in split_filenames) - prefix = 0 - - while prefix < min_len and all_equal( - filename[prefix] for filename in split_filenames - ): - prefix += 1 - - # If there’s only one file, keep the last component - if len(filenames) == 1: - prefix -= 1 - - mapping = {} - - for filename, split_filename in zip(filenames, split_filenames): - if split_filename[prefix:]: - mapping[filename] = os.path.join(*split_filename[prefix:]) - - return mapping - - -def auto_extract(archive_path: str, dest_path: str) -> bool: - """ - Automatically extract an archive and strip useless components. - - :param archive_path: path to the archive to extract - :param dest_path: destination folder for the archive contents - :returns: true if something was extracted, false if not a supported archive - """ - exts = split_all_exts(archive_path) - - if not exts: - return False - - if exts[0] == ".zip": - with zipfile.ZipFile(archive_path) as zip_archive: - _auto_extract( - zip_archive.namelist(), - zip_archive.getinfo, - zip_archive.open, - lambda member: member.is_dir(), - lambda member: False, - lambda member: member.external_attr >> 16 & 0x1FF, - dest_path, - ) - return True - - if exts[0] == ".tar" or ( - len(exts) >= 2 - and exts[0] in (".gz", ".bz2", ".xz") - and exts[1] == ".tar" - ): - with tarfile.open(archive_path, mode="r") as tar_archive: - _auto_extract( - tar_archive.getnames(), - tar_archive.getmember, - tar_archive.extractfile, - lambda member: member.isdir(), - lambda member: member.issym(), - lambda member: member.mode, - dest_path, - ) - return True - - return False - - -def _auto_extract( # pylint:disable=too-many-arguments,disable=too-many-locals - members: List[str], - getinfo: Callable[[str], Any], - extract: Callable[[Any], Optional[IO[bytes]]], - isdir: Callable[[Any], bool], - issym: Callable[[Any], bool], - getmode: Callable[[Any], int], - dest_path: str, -) -> None: - """ - Generic implementation of automatic archive extraction. - - :param members: list of members of the archive - :param getinfo: get an entry object from an entry name in the archive - :param extract: get a reading stream corresponding to an archive entry - :param isdir: get whether an entry is a directory or not - :param issym: get whether an entry is a symbolic link or not - :param getmode: get the permission bits for an entry - :param destpath: destinatio folder for the archive contents - """ - stripped_map = remove_prefix(members) - - for filename, stripped in stripped_map.items(): - member = getinfo(filename) - file_path = os.path.join(dest_path, stripped) - - if isdir(member): - os.makedirs(file_path, exist_ok=True) - else: - if issym(member): - os.symlink(member.linkname, file_path) - else: - basedir = os.path.dirname(file_path) - if not os.path.exists(basedir): - os.makedirs(basedir, exist_ok=True) - - source = extract(member) - assert source is not None - - with source, open(file_path, "wb") as target: - shutil.copyfileobj(source, target) - - mode = getmode(member) - if mode != 0: - os.chmod(file_path, mode) - - -def query_user( - question: str, - default: str, - options: Optional[List[str]] = None, - aliases: Optional[Dict[str, str]] = None, -) -> str: - """ - Ask the user to make a choice. - - :param question: message to display before the choice - :param default: default choice if the user inputs an empty string - :param options: list of valid options (should be lowercase strings) - :param aliases: accepted aliases for the valid options - :returns: option chosen by the user - """ - options = options or ["y", "n"] - aliases = aliases or {"yes": "y", "no": "n"} - - if default not in options: - raise ValueError(f"Default value {default} is not a valid option") - - prompt = "/".join( - option if option != default else option.upper() for option in options - ) - - while True: - sys.stdout.write(f"{question} [{prompt}] ") - choice = input().lower() - - if not choice: - return default - - if choice in options: - return choice - - if choice in aliases: - return aliases[choice] - - print("Invalid answer. Please choose among the valid options.") - - -def check_directory(path: str, message: str) -> bool: - """ - Create a directory and ask the user what to do if it already exists. - - :param path: path to the directory to create - :param message: message to display before asking the user interactively - :returns: false if the user chose to cancel the current operation - """ - try: - os.mkdir(path) - except FileExistsError: - ans = query_user( - message, - default="c", - options=["c", "r", "k"], - aliases={ - "cancel": "c", - "remove": "r", - "keep": "k", - }, - ) - - if ans == "c": - return False - - if ans == "r": - shutil.rmtree(path) - os.mkdir(path) - - return True - - -def list_tree(root: str) -> List[str]: - """ - Get a sorted list of all files and folders under a given root folder. - - :param root: root folder to start from - :returns: sorted list of items under the root folder - """ - result = [] - - for directory, _, files in os.walk(root): - result.append(directory) - for file in files: - result.append(os.path.join(directory, file)) - - return sorted(result) - - -# See -class SupportsLessThan(Protocol): # pylint:disable=too-few-public-methods - """Types that support the less-than operator.""" - - def __lt__(self, other: Any) -> bool: - ... - - -Key = TypeVar("Key", bound=SupportsLessThan) -Value = TypeVar("Value") - - -def group_by( - in_seq: Sequence[Value], key_fn: Callable[[Value], Key] -) -> Dict[Key, List[Value]]: - """ - Group elements of a list. - - :param in_seq: list of elements to group - :param key_fn: mapping of each element onto a group - :returns: dictionary of groups - """ - return dict( - (key, list(group)) - for key, group in itertools.groupby( - sorted(in_seq, key=key_fn), key=key_fn - ) - ) diff --git a/scripts/toltec/version.py b/scripts/toltec/version.py deleted file mode 100644 index 91c143e5a..000000000 --- a/scripts/toltec/version.py +++ /dev/null @@ -1,220 +0,0 @@ -# Copyright (c) 2021 The Toltec Contributors -# SPDX-License-Identifier: MIT -"""Parse versions and dependency specifications.""" - -import re -from enum import Enum -from typing import Optional - -# Characters permitted in the upstream version part of a version number -_VERSION_CHARS = re.compile("^[A-Za-z0-9.+~-]+$") - -# Characters making up a version comparator -_COMPARATOR_CHARS = re.compile("[<>=]") - - -class VersionComparator(Enum): - """Operators used to compare two version numbers.""" - - # pylint: disable=invalid-name - - LowerThan = "<<" - LowerThanOrEqual = "<=" - Equal = "=" - GreaterThanOrEqual = ">=" - GreaterThan = ">>" - - # pylint: enable=invalid-name - - -class InvalidVersionError(Exception): - """Raised when parsing of an invalid version is attempted.""" - - -class Version: - """ - Parse package versions. - - See - for details about the format and the comparison rules. - """ - - def __init__(self, epoch: int, upstream: str, revision: str): - self.upstream = upstream - self.revision = revision - self.epoch = epoch - - if _VERSION_CHARS.fullmatch(upstream) is None: - raise InvalidVersionError( - f"Invalid chars in upstream version: '{upstream}'" - ) - - if _VERSION_CHARS.fullmatch(revision) is None: - raise InvalidVersionError( - f"Invalid chars in revision: '{revision}'" - ) - - self._original: Optional[str] = None - - @staticmethod - def parse(version: str) -> "Version": - """Parse a version number.""" - original = version - colon = version.find(":") - - if colon == -1: - epoch = 0 - else: - epoch = int(version[:colon]) - version = version[colon + 1 :] - - dash = version.find("-") - - if dash == -1: - revision = "0" - else: - revision = version[dash + 1 :] - version = version[:dash] - - upstream = version - - result = Version(epoch, upstream, revision) - result._original = original # pylint:disable=protected-access - return result - - def __str__(self) -> str: - if self._original is not None: - # Use the original parsed version string - return self._original - - epoch = "" if self.epoch == 0 else f"{self.epoch}:" - revision = ( - "" - if self.revision == "0" and "-" not in self.upstream - else f"-{self.revision}" - ) - - return f"{epoch}{self.upstream}{revision}" - - def __repr__(self) -> str: - return f"Version(upstream={repr(self.upstream)}, \ -revision={repr(self.revision)}, epoch={repr(self.epoch)})" - - -class DependencyKind(Enum): - """Kinds of dependencies that may be requested by a package.""" - - # pylint: disable=invalid-name - - # Dependency installed in the system used to build a package - # (e.g., a Debian package) - Build = "build" - # Dependency installed alongside a package - # (e.g., another Entware or Toltec package) - Host = "host" - - # pylint: enable=invalid-name - - -class InvalidDependencyError(Exception): - """Raised when parsing an invalid dependency specification.""" - - -class Dependency: - """ - Parse version-constrained dependencies. - - Toltec dependencies are declared using the following format: - - [host:|build:]package[(<<|<=|=|=>|>>)version] - - Dependencies of a package that start with `build:` correspond to packages - that must be installed in the build system. Dependencies that start with - `host:` or do not have a prefix correspond to packages that must be - installed alongside the built package, either in the host sysroot when - building the package, or in the target device when using it. - """ - - def __init__( - self, - kind: DependencyKind, - package: str, - version_comparator: VersionComparator = VersionComparator.Equal, - version: Optional[Version] = None, - ): - self.kind = kind - self.package = package - self.version_comparator = version_comparator - self.version = version - - self._original: Optional[str] = None - - @staticmethod - def parse(dependency: str) -> "Dependency": - """Parse a dependency specification.""" - original = dependency - kind = DependencyKind.Host - - for enum_kind in DependencyKind: - if dependency.startswith(enum_kind.value + ":"): - kind = enum_kind - dependency = dependency[len(enum_kind.value) + 1 :] - break - - comp_char_match = _COMPARATOR_CHARS.search(dependency) - - if comp_char_match is None: - package = dependency - version_comparator = VersionComparator.Equal - version = None - else: - comp_char = comp_char_match.start() - for enum_comparator in VersionComparator: - if dependency[comp_char:].startswith(enum_comparator.value): - package = dependency[:comp_char] - version_comparator = enum_comparator - version = Version.parse( - dependency[comp_char + len(enum_comparator.value) :] - ) - break - else: - raise InvalidDependencyError( - f"Invalid version comparator \ -'{dependency[comp_char : comp_char + 2]}'" - ) - - result = Dependency(kind, package, version_comparator, version) - result._original = original # pylint:disable=protected-access - return result - - def to_debian(self) -> str: - """ - Convert a dependency specification to the Debian format. - - See - for the syntax expected by Debian tools. - """ - if self.version is None: - return self.package - - return f"{self.package} ({self.version_comparator.value} \ -{self.version})" - - def __str__(self) -> str: - if self._original is not None: - # Use the original parsed dependency specification - return self._original - - kind = "build:" if self.kind == DependencyKind.Build else "host:" - - if self.version is None: - return f"{kind}{self.package}" - - return f"{kind}{self.package}{self.version_comparator.value}\ -{self.version}" - - def __repr__(self) -> str: - return f"Dependency(kind={repr(self.kind)}, \ -package={repr(self.package)}, \ -version_comparator={repr(self.version_comparator)}, \ -version={repr(self.version)})" From 1e1cdd468de5eeaed02c7bc15100cca8530c6e5b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 3 Jun 2024 11:57:07 -0600 Subject: [PATCH 146/178] allow open-remarkable-shutdown on rm1os3 (#879) --- package/open-remarkable-shutdown/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/open-remarkable-shutdown/package b/package/open-remarkable-shutdown/package index 5c31ca592..dbdec6302 100644 --- a/package/open-remarkable-shutdown/package +++ b/package/open-remarkable-shutdown/package @@ -2,11 +2,11 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rmallos2) +archs=(rmallos2 rm1os3) pkgnames=(open-remarkable-shutdown) pkgdesc="Use remarkable-splash to display shutdown and reboot images" url=https://github.com/ddvk/remarkable-splash -pkgver=1.0-2 +pkgver=1.0-3 timestamp=2022-02-28T00:12Z section="utils" maintainer="Eeems " From 1c0528346c0f925e297fc1d9f4c70b94164ece86 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 3 Jun 2024 12:36:42 -0600 Subject: [PATCH 147/178] Split toltec-deletions rm1/rm2 for open-remarkable-shutdown (#880) --- package/toltec-deletions/package | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index c3cea1e4b..9854cbcf7 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -2,11 +2,11 @@ # Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rmallos2 rmallos3) +archs=(rmallos2 rm1os3 rm2os3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-4 +pkgver=0.1-5 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " @@ -14,7 +14,25 @@ license=MIT installdepends=(toltec-bootstrap) conflicts_rmallos2=() replaces_rmallos2=() -conflicts_rmallos3=( +conflicts_rm1os3=( + ddvk-hacks + fuse + wireguard + innernet-client + gocryptfs + linux-mainline + remarkable-stylus +) +replaces_rm1os3=( + ddvk-hacks + fuse + wireguard + innernet-client + gocryptfs + linux-mainline + remarkable-stylus +) +conflicts_rm2os3=( ddvk-hacks fuse wireguard @@ -24,7 +42,7 @@ conflicts_rmallos3=( remarkable-stylus open-remarkable-shutdown ) -replaces_rmallos3=( +replaces_rm2os3=( ddvk-hacks fuse wireguard From 80e31f471aab14672ac8d6aecd6772b2f45286ee Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Thu, 6 Jun 2024 07:56:28 +1000 Subject: [PATCH 148/178] package/linux-mainline: Bump to 6.3 (#732) * package/linux-mainline: Bump to 6.3 Signed-off-by: Alistair Francis * No longer delete linux-mainline on os3 --------- Signed-off-by: Alistair Francis Co-authored-by: Nathaniel van Diepen --- package/linux-mainline/package | 17 +++++++++-------- package/toltec-deletions/package | 6 +----- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 8f8aa87da..754fa6591 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -2,25 +2,26 @@ # Copyright (c) 2021 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rm2os2) +archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=6.2.0-3 -timestamp=2022-05-22T21:50:09Z +pkgver=6.3.0-1 +timestamp=2023-08-23T21:50:09Z section=kernel maintainer="Alistair Francis " makedepends=(build:flex build:bison build:libssl-dev build:bc build:lzop build:libgmp-dev build:libmpc-dev) +installdepends=(kernelctl) license=GPL-2.0-only flags=(nostrip) image=base:v2.3 source=( - https://github.com/alistair23/linux/archive/8241218883331bfdc0800f30eb337ff97b7c648c.tar.gz + https://github.com/alistair23/linux/archive/1698a3bdd8d66e58873c5bb3ce370b7d48b004cf.tar.gz remarkable_defconfig ) sha256sums=( - de69fc74f1d25f447da170967eeea13b24354e9b8aa1927addcaa88c2ea9cd7c + 647f6a60adad8c4e37eeaf9114c037888cb33923e364bbf5dc0830b2661c21b7 f4d8cbb2c0e7bff5b151729b45064eb9e95005cb91899f0a9df038343d95ebf2 ) @@ -55,9 +56,9 @@ configure() { echo echo "Known issues with the mainline kernel:" echo " - No support for low power mode (suspend uses more power then it should)" - echo " - Device doesn't always resume from suspend, a reboot is required" - echo " - GUI shutdown in Oxide doesn't work" + echo " - Shutdown doesn't work (https://github.com/alistair23/linux/issues/4)" + echo " - Device doesn't always resume correctly from suspend, a reboot is required" echo " - Wacom stylus doesn't work in Xochitl (https://github.com/reMarkable/linux/issues/15)" - echo " - Finger input doesn't work in Koreader (https://github.com/koreader/koreader/issues/10012)" echo " - No OTG control support" + echo " - Folio does not work" } diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 9854cbcf7..8db7bcb33 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rmallos2 rm1os3 rm2os3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-5 +pkgver=0.1-6 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " @@ -20,7 +20,6 @@ conflicts_rm1os3=( wireguard innernet-client gocryptfs - linux-mainline remarkable-stylus ) replaces_rm1os3=( @@ -29,7 +28,6 @@ replaces_rm1os3=( wireguard innernet-client gocryptfs - linux-mainline remarkable-stylus ) conflicts_rm2os3=( @@ -38,7 +36,6 @@ conflicts_rm2os3=( wireguard innernet-client gocryptfs - linux-mainline remarkable-stylus open-remarkable-shutdown ) @@ -48,7 +45,6 @@ replaces_rm2os3=( wireguard innernet-client gocryptfs - linux-mainline remarkable-stylus open-remarkable-shutdown ) From cbdb6542a80f0b321e4d5121e895f4a5fb6be329 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 5 Jun 2024 18:37:35 -0600 Subject: [PATCH 149/178] Fix invalid launcherctl status output when using remux (#882) * Fix #881 --- package/rmkit/launcherctl-remux | 4 ++-- package/rmkit/package | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/rmkit/launcherctl-remux b/package/rmkit/launcherctl-remux index d0c1e5436..46538ba50 100755 --- a/package/rmkit/launcherctl-remux +++ b/package/rmkit/launcherctl-remux @@ -7,7 +7,7 @@ remux_ppid() { grep "PPid:" "/proc/$(remux_pid)/status" | awk '{print $2}' } draft_apps() { - find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + find {/opt,}/etc/draft -maxdepth 1 -type f 2> /dev/null | while read -r file; do name="$(grep 'name=' "$file" | sed 's|^name=||')" call="$(grep 'call=' "$file" | sed 's|^call=||')" echo -e "${name}\t${call}" @@ -89,7 +89,7 @@ case "$1" in systemctl disable remux.service ;; apps) - find {/opt,}/etc/draft -maxdepth 1 -type f | while read -r file; do + find {/opt,}/etc/draft -maxdepth 1 -type f 2> /dev/null | while read -r file; do grep 'name=' "$file" | sed 's|^name=||' done ;; diff --git a/package/rmkit/package b/package/rmkit/package index 43db913e2..6dea62b34 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -147,7 +147,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.3.0-4 + pkgver=0.3.0-5 section="launchers" installdepends=(procps-ng-ps) From bb2d3f224ee8968fb58c8b424b34e8fd7a97b86b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Wed, 5 Jun 2024 19:02:09 -0600 Subject: [PATCH 150/178] Don't overwrite other LD_PRELOAD env values (#741) * Don't overwrite other LD_PRELOAD env values --- package/display/package | 2 +- package/display/rm2fb-preload.env | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/display/package b/package/display/package index 8f3bd3029..d14efd480 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.33-1 +pkgver=1:0.0.33-2 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 diff --git a/package/display/rm2fb-preload.env b/package/display/rm2fb-preload.env index 910b04299..99ec3959c 100644 --- a/package/display/rm2fb-preload.env +++ b/package/display/rm2fb-preload.env @@ -3,7 +3,7 @@ # Please do not modify files shipped by Toltec, or they risk being # overwritten with updates. Instead create your own files in this directory. if [[ -f /dev/shm/swtfb.01 ]]; then - export LD_PRELOAD=/opt/lib/librm2fb_client.so.1 + export LD_PRELOAD="$LD_PRELOAD:/opt/lib/librm2fb_client.so.1" else echo "rm2fb server is not running: starting without rm2fb client" fi From d8e8eba9b05b2c7d1719218ee9a95a85cee196a7 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:39:44 -0500 Subject: [PATCH 151/178] Remove ripgrep (#891) * remove ripgrep from toltec --------- Co-authored-by: gbyl --- package/ripgrep/package | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 package/ripgrep/package diff --git a/package/ripgrep/package b/package/ripgrep/package deleted file mode 100644 index 88aae0388..000000000 --- a/package/ripgrep/package +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# 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=14.0.3-1 -timestamp=2023-11-28T21:22Z -section="utils" -maintainer="gbyl " -license=MIT - -image=rust:v3.1 -source=("https://github.com/BurntSushi/ripgrep/archive/refs/tags/${pkgver%-*}.zip") -sha256sums=(eb91f202fc25d51755390736775a7e7f8e146eb97e584aaa01fb0c45aa5de654) - -build() { - cargo build --release -} - -package() { - install -D -m 755 "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/rg "$pkgdir"/opt/bin/rg -} From ee899ceeda377b88aa09b3ae9388227f4cf5b0de Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:47:00 -0500 Subject: [PATCH 152/178] Update lf to r32 (#889) * update lf to r32 --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/lf/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/lf/package b/package/lf/package index eae20ad5e..73e360741 100644 --- a/package/lf/package +++ b/package/lf/package @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# Copyright (c) 2023 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(lf) pkgdesc="Terminal file manager" url=https://github.com/gokcehan/lf -pkgver=r31-2 -timestamp=2023-09-17T12:55Z +pkgver=r32-1 +timestamp=2024-03-31T20:04Z section="utils" maintainer="gbyl " license=MIT @@ -14,7 +14,7 @@ installdepends=(libncurses-dev) image=golang:v3.1 source=("https://github.com/gokcehan/lf/archive/refs/tags/${pkgver%-*}.zip") -sha256sums=(217e152f09ae0cc8ab8f12fd92f705dd12630907de2b6a78ffc2727950921f97) +sha256sums=(571ee17d8181d77a3b8bcd7aaaff0bde062c1851d93e9d324dfe15948136891a) build() { export GOARCH=arm From b812d03cd8998d158a22fc2eab94d33f0f1c78e9 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:53:39 -0500 Subject: [PATCH 153/178] Add package: bandwhich (#892) * add package: bandwhich --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/bandwhich/package | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/bandwhich/package diff --git a/package/bandwhich/package b/package/bandwhich/package new file mode 100644 index 000000000..c9c1243a7 --- /dev/null +++ b/package/bandwhich/package @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Copyright (c) 2024 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(bandwhich) +pkgdesc="CLI network utilization tool" +url=https://github.com/imsnif/bandwhich +pkgver=0.22.2-1 +timestamp=2024-01-27T19:33Z +section="utils" +maintainer="gbyl " +license=MIT + +image=rust:v3.1 +source=("https://github.com/imsnif/bandwhich/archive/refs/tags/v${pkgver%-*}.zip") +sha256sums=(5d1eaa1796ec3c16f349cb6b00bd9dba6d425e9323d63af648a41cd68c5d456b) + +build() { + cargo build --release +} + +package() { + install -D -m 755 "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/bandwhich "$pkgdir"/opt/bin/bandwhich +} From e8ea1b744405863c3b93985388999b3c8769ef08 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:02:21 -0500 Subject: [PATCH 154/178] 7zip: Alias for 7-zip (#890) * Make 7zip a metapackage that installs 7-zip --------- Co-authored-by: gbyl --- package/7zip/package | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/package/7zip/package b/package/7zip/package index ebc6d6ad0..28a2e3275 100644 --- a/package/7zip/package +++ b/package/7zip/package @@ -1,23 +1,16 @@ #!/usr/bin/env bash -# Copyright (c) 2023 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(7zip) -pkgdesc="A file archiver with a high compression ratio." +pkgdesc="Metapackage for 7-zip" url="https://www.7-zip.org/" section="utils" -pkgver=23.01-1 +pkgver=23.01-2 timestamp=2023-06-20T00:00:00Z maintainer="Eeems " license=LGPL-2.1-or-later -source=( - https://www.7-zip.org/a/7z2301-linux-arm.tar.xz -) -sha256sums=( - 9d67650982f819d7557c27dea748fa66ca6c04a3a1148d66716c463580b0550c -) +installdepends=(7-zip) package() { - install -dm 755 "$pkgdir"/opt/usr/share/licenses/7zip - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/7zz - cp -dr --no-preserve='ownership' "$srcdir"/License.txt "$pkgdir"/opt/usr/share/licenses/7zip + true } From 2f13ee47197d0121946b61c6abf03c00dca17efb Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Sat, 8 Jun 2024 01:10:04 -0500 Subject: [PATCH 155/178] koreader: disable ota updates (#894) Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/koreader/package | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index ff323c2e1..182d6d237 100644 --- a/package/koreader/package +++ b/package/koreader/package @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(koreader) pkgdesc="Ebook reader supporting PDF, DjVu, EPUB, FB2 and many more formats" url=https://github.com/koreader/koreader -pkgver=2024.04-4 +pkgver=2024.04-5 timestamp=2024-04-29T19:56:05Z section="readers" maintainer="raisjn " @@ -37,6 +37,7 @@ package() { rm "$pkgdir"/opt/koreader/{fbink,fbdepth} ln -s /opt/bin/fbink "$pkgdir"/opt/koreader/fbink ln -s /opt/bin/fbdepth "$pkgdir"/opt/koreader/fbdepth + sed -i 's/hasOTAUpdates = yes/hasOTAUpdates = no/' "$pkgdir"/opt/koreader/frontend/device/remarkable/device.lua install -D -m 644 -t "$pkgdir"/opt/etc/draft/ "$srcdir"/koreader.draft install -D -m 644 -t "$pkgdir"/opt/usr/share/applications/ "$srcdir"/KOReader.oxide From 28ebda4392807a00fa3c3e06134c561f33a37585 Mon Sep 17 00:00:00 2001 From: gbyl <71516803+gbyl@users.noreply.github.com> Date: Mon, 10 Jun 2024 00:31:27 -0500 Subject: [PATCH 156/178] Remove package: bottom (#897) * remove package: bottom * fix toltecctl typo * Create opt-usr-bin.sh --------- Co-authored-by: gbyl Co-authored-by: Nathaniel van Diepen --- package/bottom/package | 24 ------------------------ package/toltec-base/opt-usr-bin.sh | 3 +++ package/toltec-base/package | 8 ++++---- package/toltec-bootstrap/package | 2 +- package/toltec-bootstrap/toltecctl | 2 +- 5 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 package/bottom/package create mode 100644 package/toltec-base/opt-usr-bin.sh diff --git a/package/bottom/package b/package/bottom/package deleted file mode 100644 index 9637894de..000000000 --- a/package/bottom/package +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 -} diff --git a/package/toltec-base/opt-usr-bin.sh b/package/toltec-base/opt-usr-bin.sh new file mode 100644 index 000000000..9ff6643dc --- /dev/null +++ b/package/toltec-base/opt-usr-bin.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +export PATH=/opt/usr/bin:$PATH diff --git a/package/toltec-base/package b/package/toltec-base/package index 183cb2995..e4b0a4539 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,7 +6,7 @@ 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-4 +pkgver=1.4-1 timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " @@ -17,11 +17,11 @@ installdepends_rm1os3=(open-remarkable-shutdown) installdepends_rm2os2=(rm2-suspend-fix) installdepends_rm2os3=(rm2-suspend-fix) -source=() -sha256sums=() +source=(opt-usr-bin.sh) +sha256sums=(SKIP) package() { - true + install -D -m 755 -t "$pkgdir"/etc/profile.d/ "$srcdir"/opt-usr-bin.sh } configure() { diff --git a/package/toltec-bootstrap/package b/package/toltec-bootstrap/package index cc1d68274..90d201f50 100644 --- a/package/toltec-bootstrap/package +++ b/package/toltec-bootstrap/package @@ -5,7 +5,7 @@ pkgnames=(toltec-bootstrap) pkgdesc="Manage your Toltec install" url=https://toltec-dev.org/ -pkgver=0.4.4-1 +pkgver=0.4.5-1 timestamp=2024-05-31T19:13Z section="utils" maintainer="Eeems " diff --git a/package/toltec-bootstrap/toltecctl b/package/toltec-bootstrap/toltecctl index 261e98392..5a26d3790 100644 --- a/package/toltec-bootstrap/toltecctl +++ b/package/toltec-bootstrap/toltecctl @@ -679,7 +679,7 @@ reenable() { generate-opkg-conf || true log INFO "Opkg update" opkg update - log INFO "Reinsalling base packages" + log INFO "Reinstalling base packages" reinstall-base log INFO "Reinstalling packages with files on the root partition" reinstall-root From c8a165292c5040523c25e4bf7565f773d1a89cdf Mon Sep 17 00:00:00 2001 From: raisjn <70462544+raisjn@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:19:29 -0700 Subject: [PATCH 157/178] [rmkit] remove rm2fb patchelf command (#898) * [rmkit] remove rm2fb patchelf command * [rmkit] bump package versions for a few apps * [rmkit] update all packages --------- Co-authored-by: okay --- package/rmkit/package | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/package/rmkit/package b/package/rmkit/package index 6dea62b34..f1839892f 100644 --- a/package/rmkit/package +++ b/package/rmkit/package @@ -7,7 +7,7 @@ timestamp=2024-01-11T20:03:10Z maintainer="raisjn " license=MIT installdepends=(display) -flags=(patch_rm2fb) +flags=() image=python:v2.1 source=( @@ -31,7 +31,7 @@ build() { bufshot() { pkgdesc="program for saving the framebuffer as a png" url="https://github.com/rmkit-dev/rmkit/tree/master/src/bufshot" - pkgver=0.1.2-2 + pkgver=0.1.2-3 section="utils" package() { @@ -42,7 +42,7 @@ bufshot() { dumbskull() { pkgdesc="Dungeon Crawl themed Solitaire" url="https://rmkit.dev/apps/dumbskull" - pkgver=0.0.1-3 + pkgver=0.0.1-4 section="games" package() { @@ -54,7 +54,7 @@ dumbskull() { genie() { pkgdesc="Gesture engine that connects commands to gestures" url="https://rmkit.dev/apps/genie" - pkgver=0.1.7-1 + pkgver=0.1.7-2 section="utils" package() { @@ -80,7 +80,7 @@ genie() { harmony() { pkgdesc="Procedural sketching app" url="https://rmkit.dev/apps/harmony" - pkgver=0.2.3-1 + pkgver=0.2.3-2 section="drawing" package() { @@ -97,7 +97,7 @@ harmony() { iago() { pkgdesc="overlay for drawing shapes via stroke injection" url="https://rmkit.dev/apps/iago" - pkgver=0.1.2-1 + pkgver=0.1.2-2 section="utils" installdepends+=("lamp") @@ -109,7 +109,7 @@ iago() { lamp() { pkgdesc="config based stroke injection utility" url="https://rmkit.dev/apps/lamp" - pkgver=0.1.1-2 + pkgver=0.1.1-3 section="utils" package() { @@ -120,7 +120,7 @@ lamp() { mines() { pkgdesc="Mine detection game" url="https://rmkit.dev/apps/minesweeper" - pkgver=0.1.4-3 + pkgver=0.1.4-4 section="games" package() { @@ -147,7 +147,7 @@ nao() { remux() { pkgdesc="Launcher that supports multi-tasking applications" url="https://rmkit.dev/apps/remux" - pkgver=0.3.0-5 + pkgver=0.3.0-6 section="launchers" installdepends=(procps-ng-ps) @@ -184,7 +184,7 @@ remux() { rpncalc() { pkgdesc="RPN Calculator" url="https://rmkit.dev/apps/rpncalc" - pkgver=0.0.3-3 + pkgver=0.0.3-4 section="math" package() { @@ -197,7 +197,7 @@ rpncalc() { simple() { pkgdesc="Simple app script for writing scripted applications" url="https://rmkit.dev/apps/sas" - pkgver=0.2.1-1 + pkgver=0.2.1-2 section="devel" package() { @@ -208,7 +208,7 @@ simple() { wordlet() { pkgdesc="Wordle clone" url="https://rmkit.dev/apps/wordlet" - pkgver=0.0.2-3 + pkgver=0.0.2-4 section="games" package() { From 29312140970b21233e3b8e737384d52fb1ecc48e Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 27 Jun 2024 07:55:47 -0600 Subject: [PATCH 158/178] Update oxide to v2.8.4 (#833) * Add sysfs_preload * Remove chroot for xochitl * Increment xochitl version * Make tarnish depend on sysfs_preload * Format fix * Update package * Update package * Update oxide to v2.8 * Update package * Update oxide to v2.8.1 * Resolve duplicate and missing conflicts from how-to-enable * Format fix * Properly ignore shutdown.target * Update to v2.8.2 * Add non-versioned symlink to librm2fb_client.so.1 * Update package * Update package * Update oxide to 2.8.4 --- package/display/package | 14 ++++++++------ package/oxide/package | 26 +++++++++++++++++--------- package/sysfs_preload/package | 28 ++++++++++++++++++++++++++++ package/xochitl/package | 2 +- package/xochitl/xochitl.oxide | 29 +---------------------------- 5 files changed, 55 insertions(+), 44 deletions(-) create mode 100644 package/sysfs_preload/package diff --git a/package/display/package b/package/display/package index d14efd480..633b4e9f5 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.33-2 +pkgver=1:0.0.33-3 _release="${pkgver%-*}" _release="v${_release#*:}" _libver=1.0.1 @@ -102,14 +102,16 @@ rm2fb-client() { replaces=(rm2fb) package() { - libname="librm2fb_client.so.$_libver" - install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/client/"$libname" + libname="librm2fb_client.so" + libnamever="$libname.$_libver" + install -D -m 644 -t "$pkgdir"/opt/lib "$srcdir"/src/client/"$libnamever" install -d "$pkgdir"/usr/lib - ln -s /opt/lib/"$libname" "$pkgdir"/usr/lib/"$libname" + ln -s /opt/lib/"$libnamever" "$pkgdir"/usr/lib/"$libnamever" + ln -s /opt/lib/"$libnamever" "$pkgdir"/opt/lib/"$libname" for dest in opt/lib usr/lib; do - ln -s "$libname" "$pkgdir/$dest/${libname%.*.*}" - ln -s "$libname" "$pkgdir/$dest/${libname%.*}" + ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*.*}" + ln -s "$libnamever" "$pkgdir/$dest/${libnamever%.*}" done install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/rm2fb-client diff --git a/package/oxide/package b/package/oxide/package index 83e0c27ab..2dee131c3 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -1,12 +1,13 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT +archs=(rm1 rm2) pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) -_oxidever=2.7 -pkgver=$_oxidever-7 -_sentryver=0.5.0 -timestamp=2023-12-05T04:43:04Z +_oxidever=2.8.4 +pkgver=$_oxidever-1 +_sentryver=0.7.6 +timestamp=2024-06-26T22:31:46Z maintainer="Eeems " url=https://oxide.eeems.codes license=MIT @@ -18,7 +19,7 @@ source=( launcherctl-oxide ) sha256sums=( - e1f20fc60ae8edccb941e09c0e61cbfb58f1f8a5f64be98870eb2d079f83316f + bfcb26c0493544fabc472bebc1eb372e49e58774163533ae937b6e814222f03e SKIP SKIP ) @@ -26,13 +27,15 @@ sha256sums=( build() { find . -name "*.pro" -type f -print0 \ | xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g' + find . -name "*.pri" -type f -print0 \ + | xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g' CMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" make FEATURES=sentry release } oxide() { pkgdesc="Launcher application" section="launchers" - installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" "reboot-guard" "jq") + installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" reboot-guard jq display) replaces=(erode tarnish decay corrupt) conflicts=(erode tarnish decay corrupt) @@ -59,6 +62,10 @@ oxide() { install -D -m 644 -t "$pkgdir"/opt/usr/share/applications "$srcdir"/release/opt/usr/share/applications/codes.eeems.corrupt.oxide # launcherctl registration install -D -T -m 755 "$srcdir"/launcherctl-oxide "$pkgdir"/opt/share/launcherctl/oxide + if [[ $arch = rm2 ]]; then + install -D -m 644 -t "$pkgdir"/etc/systemd/system/tarnish.service.d \ + "$srcdir"/toltec-rm2-override.conf + fi } configure() { @@ -138,7 +145,8 @@ liboxide() { section="devel" package() { - install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libliboxide.so* + install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/liboxide.so* + install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libqsgepaper.so* } } @@ -148,7 +156,7 @@ liboxide-dev() { 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/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/oxide.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/ diff --git a/package/sysfs_preload/package b/package/sysfs_preload/package new file mode 100644 index 000000000..0fcd903d6 --- /dev/null +++ b/package/sysfs_preload/package @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 The Toltec Contributors +# SPDX-License-Identifier: MIT + +pkgnames=(sysfs_preload) +pkgdesc="A simple preload that forces any calls to /sys/power/state to use systemd instead." +url="https://github.com/Eeems-Org/sysfs_preload" +pkgver=1.0.1-1 +timestamp=2024-06-22T05:19Z +section=util +maintainer="Eeems " +license=MIT + +image=qt:v3.1 +source=(https://github.com/Eeems-Org/sysfs_preload/archive/refs/tags/1.0.1.tar.gz) +sha256sums=(73627b68e3b2454efcc2d83e6ebdc2eb473f9cc2616ed1b9dd2acae159c54b3d) + +build() { + find . -name "*.pro" -type f -print0 \ + | xargs -r -0 sed -i 's/linux-oe-g++/linux-arm-remarkable-g++/g' + qmake + make -j"$(nproc)" + INSTALL_ROOT="dist" make install +} + +package() { + cp -ar "${srcdir}/dist/." "${pkgdir}" +} diff --git a/package/xochitl/package b/package/xochitl/package index c8fb1d132..ba890d642 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-20 +pkgver=0.0.0-21 timestamp=2022-11-07T20:19:57Z section="readers" maintainer="Mattéo Delabre " diff --git a/package/xochitl/xochitl.oxide b/package/xochitl/xochitl.oxide index c4673ad2f..1ebe793b9 100644 --- a/package/xochitl/xochitl.oxide +++ b/package/xochitl/xochitl.oxide @@ -3,32 +3,5 @@ "description": "Read documents and take notes", "bin": "/opt/bin/xochitl", "icon": "/opt/etc/draft/icons/xochitl.png", - "flags": ["nosplash", "chroot"], - "permissions": ["power"], - "directories": [ - "/dev/shm", - "/etc", - "/home/root", - "/opt/etc", - "/run/dbus", - "/run/lock", - "/run/systemd", - "/run/systemd/resolve", - "/run/udev", - "/tmp/runtime-root", - "/usr/share", - "/usr/share/remarkable/templates", - "/usr/local/share/ca-certificates", - "/var/cache/fontconfig", - "/var/lib/dbus", - "/var/volatile/tmp" - ], - "environment": { - "HOME": "/home/root", - "QMLSCENE_DEVICE": "epaper", - "QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS": "rotate=180", - "QT_QPA_PLATFORM": "epaper", - "SYSTEMD_IGNORE_CHROOT": "true", - "XDG_RUNTIME_DIR": "/tmp/runtime-root" - } + "flags": ["nosplash"] } From 919bf5ea6a51143b445cb98f3b97180e1ba345da Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Thu, 27 Jun 2024 08:26:25 -0600 Subject: [PATCH 159/178] Workaround #886 (#887) --- package/toltec-deletions/package | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 8db7bcb33..87ede6ffc 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -2,18 +2,20 @@ # Copyright (c) 2023 The Toltec Contributors # SPDX-License-Identifier: MIT -archs=(rmallos2 rm1os3 rm2os3) +archs=(rm1os2 rm1os3 rm2os2 rm2os3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-6 +pkgver=0.1-7 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " license=MIT installdepends=(toltec-bootstrap) -conflicts_rmallos2=() -replaces_rmallos2=() +conflicts_rm1os2=() +replaces_rm1os2=() +conflicts_rm2os2=() +replaces_rm2os2=() conflicts_rm1os3=( ddvk-hacks fuse From c46168bee9c8155871467ca08bffa0a6f6aed10b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sun, 30 Jun 2024 19:30:50 -0600 Subject: [PATCH 160/178] Update libsentry timestamp and depend on launcherctl (#903) --- package/oxide/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/oxide/package b/package/oxide/package index 2dee131c3..9ce51549b 100644 --- a/package/oxide/package +++ b/package/oxide/package @@ -5,7 +5,7 @@ archs=(rm1 rm2) pkgnames=(oxide oxide-extra oxide-utils inject_evdev liboxide liboxide-dev libsentry) _oxidever=2.8.4 -pkgver=$_oxidever-1 +pkgver=$_oxidever-2 _sentryver=0.7.6 timestamp=2024-06-26T22:31:46Z maintainer="Eeems " @@ -35,7 +35,7 @@ build() { oxide() { pkgdesc="Launcher application" section="launchers" - installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" reboot-guard jq display) + installdepends=("oxide-utils=$pkgver" "liboxide=$pkgver" "libsentry=$_sentryver" reboot-guard jq display launcherctl) replaces=(erode tarnish decay corrupt) conflicts=(erode tarnish decay corrupt) @@ -168,7 +168,7 @@ libsentry() { section="devel" url=https://github.com/getsentry/sentry-native pkgver="$_sentryver" - timestamp="2021-12-20T14:25:11Z" + timestamp="2024-06-12T08:04:15Z" package() { install -D -m 755 -t "$pkgdir"/opt/lib "$srcdir"/release/opt/lib/libsentry.so From bffc3f9fc7a4849e8c043d0d23e1743a584fe5d3 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 6 Sep 2024 11:54:51 -0600 Subject: [PATCH 161/178] Update toltecmk and black (#909) --- package/signature-rm/package | 2 +- package/toltec-base/package | 2 +- package/toltec-deletions/package | 2 +- requirements.txt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package/signature-rm/package b/package/signature-rm/package index 87154993a..d826d244c 100644 --- a/package/signature-rm/package +++ b/package/signature-rm/package @@ -6,7 +6,7 @@ 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-2 +pkgver=1.0.2-3 timestamp=2023-12-06T11:43:00Z section="utils" maintainer="rM-self-serve <122753594+rM-self-serve@users.noreply.github.com>" diff --git a/package/toltec-base/package b/package/toltec-base/package index e4b0a4539..6e3d8be49 100644 --- a/package/toltec-base/package +++ b/package/toltec-base/package @@ -6,7 +6,7 @@ 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.4-1 +pkgver=1.4-2 timestamp=2023-12-27T08:30Z section="utils" maintainer="Eeems " diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index 87ede6ffc..b5c383713 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rm1os2 rm1os3 rm2os2 rm2os3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-7 +pkgver=0.1-8 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " diff --git a/requirements.txt b/requirements.txt index 3db01c1dd..7aadcde47 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -black==23.7.0 +black==24.8.0 certifi==2023.7.22 idna==3.4 isort==5.12.0 @@ -8,7 +8,7 @@ mypy-extensions==1.0.0 mypy==1.7.1 pylint==3.0.3 six==1.16.0 -toltecmk==0.3.2 +toltecmk==0.3.3 toml==0.10.2 types-python-dateutil==2.8.19.14 types-requests==2.31.0.2 From f8430da5833b3184ffda7175610ac8ae2274d022 Mon Sep 17 00:00:00 2001 From: Salvatore Stella Date: Sun, 8 Sep 2024 19:24:07 +0200 Subject: [PATCH 162/178] Kernelctl os version (#905) * Change os version scheme --------- Co-authored-by: Nathaniel van Diepen --- package/kernelctl/kernelctl | 9 ++++++--- package/kernelctl/package | 10 ++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package/kernelctl/kernelctl b/package/kernelctl/kernelctl index ae24716d1..5ad691d85 100644 --- a/package/kernelctl/kernelctl +++ b/package/kernelctl/kernelctl @@ -14,6 +14,9 @@ bl="\033[1;34m" # blue # change our working directory to / to ease filesystem operations cd / +# find current os version +os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) + help() { read -r -d '' msg <<- EOM Usage: $(basename "$0") COMMAND @@ -36,7 +39,7 @@ help() { # backup current kernel backup() { if [[ "$1" = "vanilla" ]]; then - kernel_name="vanilla-$(< /etc/version)" + kernel_name="vanilla-$os_version" else kernel_name=$1 fi @@ -82,7 +85,7 @@ to_kernel_name() { echo "${kernel_names[$(($1 - 1))]}" return elif [[ "$1" = "default" ]]; then - ker="vanilla-$(< /etc/version)" + ker="vanilla-$os_version" else ker="$1" fi @@ -185,7 +188,7 @@ prune() { echo -n "Do you want to proceed? [N/y]: " read -r ans if [[ "$ans" = "y" || "$ans" = "Y" ]]; then - mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$(< /etc/version)".tar.bz2) + mapfile -t filenames < <(find "$kernelctl_dir" -path "*vanilla-*.tar.bz2" ! -name vanilla-"$os_version".tar.bz2) for filename in "${filenames[@]}"; do rm "$filename" done diff --git a/package/kernelctl/package b/package/kernelctl/package index dcfcd5f7d..31acac595 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-7 +pkgver=0.2-1 timestamp=2022-11-12T00:00Z section="utils" maintainer="Salvatore Stella " @@ -26,15 +26,17 @@ package() { } configure() { - if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then + os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) + if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then echo "Creating a backup of the currently running kernel." kernelctl backup vanilla fi } preremove() { - if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$(< /etc/version)")" == "" ]]; then - if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$(< /etc/version)")" == "" ]]; then + os_version=$(awk -F= '/RELEASE_VERSION/{print $2}' /usr/share/remarkable/update.conf) + if [[ "$(kernelctl show | tail -n 1 | grep "vanilla-$os_version")" == "" ]]; then + if [[ "$(kernelctl list | tail -n +2 | awk '{print $2}' | grep "vanilla-$os_version")" == "" ]]; then echo "Unable to restore default kernel." echo "To force removal, you can run the following:" echo " opkg remove --force-remove kernelctl" From 15ef15386f03d0d539efee185a4e96d6122434c9 Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Thu, 12 Sep 2024 19:54:33 +0200 Subject: [PATCH 163/178] Update whiteboard-hypercard to 0.5.0 (#917) * Update whiteboard-hypercard to 0.4.0 * Update whiteboard-hypercard to 0.5.0 Signed-off-by: Pierre Fenoll --------- Signed-off-by: Pierre Fenoll Co-authored-by: Nathaniel van Diepen --- package/whiteboard-hypercard/package | 16 ++++++++-------- .../whiteboard-hypercard.draft | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package/whiteboard-hypercard/package b/package/whiteboard-hypercard/package index 581882d83..9cb9a468b 100644 --- a/package/whiteboard-hypercard/package +++ b/package/whiteboard-hypercard/package @@ -1,25 +1,25 @@ #!/usr/bin/env bash -# Copyright (c) 2023 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT pkgnames=(whiteboard-hypercard) pkgdesc="Real-time collaboration, drawing or whiteboarding" url=https://github.com/fenollp/reMarkable-tools -pkgver=0.3.7-2 -timestamp=2023-10-11T12:57Z +pkgver=0.5.0-1 +timestamp=2024-09-12T19:00:22Z section="drawing" maintainer="Pierre Fenoll " license=CC-BY-NC-ND installdepends=(display) flags=(patch_rm2fb) -image=rust:v3.1 +image=rust:v3.2 source=( - https://github.com/fenollp/reMarkable-tools/archive/v0.3.7.zip + https://github.com/fenollp/reMarkable-tools/archive/refs/tags/v0.5.0.zip whiteboard-hypercard.draft ) sha256sums=( - 642fd954ec4f9a1d132b10cc7f7dfbee3467e9c08b1253cc32d1e372178d168b + 668f0b1dbc6027f6f6b8ab69f65c844a718f38115f79b9ce79e060a1cef3edfb SKIP ) @@ -27,11 +27,11 @@ build() { pushd marauder rustup component add rustfmt cargo fetch - cargo build --release --bin whiteboard --locked --frozen --offline + cargo build --release --package=marauder --bin=whiteboard --locked --frozen --offline --target=armv7-unknown-linux-gnueabihf popd } package() { - install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/marauder/target/armv7-unknown-linux-gnueabihf/release/whiteboard + install -D -m 755 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/whiteboard install -D -m 644 -t "$pkgdir"/opt/etc/draft "$srcdir"/whiteboard-hypercard.draft } diff --git a/package/whiteboard-hypercard/whiteboard-hypercard.draft b/package/whiteboard-hypercard/whiteboard-hypercard.draft index c1565788e..11c499816 100644 --- a/package/whiteboard-hypercard/whiteboard-hypercard.draft +++ b/package/whiteboard-hypercard/whiteboard-hypercard.draft @@ -1,4 +1,4 @@ -# Copyright (c) 2023 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT name=whiteboard From 0d48822b5ecce22529bdf037ad5a4a3b833a84b5 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 13 Sep 2024 18:54:28 -0600 Subject: [PATCH 164/178] Bump toltec-deletions version as master is out of sync (#919) --- package/toltec-deletions/package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/toltec-deletions/package b/package/toltec-deletions/package index b5c383713..4d78a343c 100644 --- a/package/toltec-deletions/package +++ b/package/toltec-deletions/package @@ -6,7 +6,7 @@ archs=(rm1os2 rm1os3 rm2os2 rm2os3) pkgnames=(toltec-deletions) pkgdesc="Metapackage to handle package deletions between OS versions" url=https://toltec-dev.org/ -pkgver=0.1-8 +pkgver=0.1-9 timestamp=2023-12-03T04:51:58Z section="utils" maintainer="Eeems " From 5ba126848fe44a0a7434c44f9436c18bae92dae8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 13 Sep 2024 19:44:12 -0600 Subject: [PATCH 165/178] Fix builds (#921) * Fix linux build again * Update package --- package/linux-mainline/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/linux-mainline/package b/package/linux-mainline/package index 754fa6591..1db253d36 100644 --- a/package/linux-mainline/package +++ b/package/linux-mainline/package @@ -6,7 +6,7 @@ archs=(rm2) pkgnames=(linux-mainline) pkgdesc="reMarkable 2 kernel based on the mainline kernel" url=https://www.kernel.org -pkgver=6.3.0-1 +pkgver=6.3.0-2 timestamp=2023-08-23T21:50:09Z section=kernel maintainer="Alistair Francis " @@ -15,7 +15,7 @@ installdepends=(kernelctl) license=GPL-2.0-only flags=(nostrip) -image=base:v2.3 +image=base:v3.2 source=( https://github.com/alistair23/linux/archive/1698a3bdd8d66e58873c5bb3ce370b7d48b004cf.tar.gz remarkable_defconfig From 66b6017a4a7f7d41dd6fc0bac755e4079dabf58b Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:17:25 -0600 Subject: [PATCH 166/178] Fix sysfs_preload category (#923) --- package/sysfs_preload/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/sysfs_preload/package b/package/sysfs_preload/package index 0fcd903d6..73deb2392 100644 --- a/package/sysfs_preload/package +++ b/package/sysfs_preload/package @@ -5,9 +5,9 @@ pkgnames=(sysfs_preload) pkgdesc="A simple preload that forces any calls to /sys/power/state to use systemd instead." url="https://github.com/Eeems-Org/sysfs_preload" -pkgver=1.0.1-1 +pkgver=1.0.1-2 timestamp=2024-06-22T05:19Z -section=util +section=utils maintainer="Eeems " license=MIT From 448b2cb8120103cc77616627118cab3b92235c11 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:21:21 -0600 Subject: [PATCH 167/178] Fix launcherctl category (#922) --- package/launcherctl/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/launcherctl/package b/package/launcherctl/package index 7a7743845..3b217bf3e 100644 --- a/package/launcherctl/package +++ b/package/launcherctl/package @@ -5,9 +5,9 @@ pkgnames=(launcherctl) pkgdesc="Manage your installed launcher" url=https://toltec-dev.org/ -pkgver=0.0.1-2 +pkgver=0.0.1-3 timestamp=2023-12-18T03:32Z -section="launcher" +section="launchers" maintainer="Eeems " license=MIT From 20721b0fd19d45ce9cf39048e099c0fb515ed3a8 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:25:22 -0600 Subject: [PATCH 168/178] Add writing section as we have apps in it already (#924) --- docs/package.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/package.md b/docs/package.md index bdaf7807a..072da60b5 100644 --- a/docs/package.md +++ b/docs/package.md @@ -336,6 +336,7 @@ screensharing | Apps for streaming the display between the PC and tablet. templates | Templates for xochitl notebooks. splashscreens | Splashscreens for device startup, poweroff, suspend, etc. utils | System tools and various apps. +writing | Apps for writing text. If the package does not fit into one of the existing sections, you are free to create a new one and document it here. From a8fac37a06f5e9574ddf72d7de3bccdb768493bc Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:28:40 -0600 Subject: [PATCH 169/178] Fix mmc-utils build (#878) * Update package * Update package --- package/mmc-utils/package | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/package/mmc-utils/package b/package/mmc-utils/package index a91ae561b..948dffa99 100644 --- a/package/mmc-utils/package +++ b/package/mmc-utils/package @@ -6,7 +6,7 @@ archs=(rmall) pkgnames=(mmc-utils) pkgdesc="A tool for monitoring the eMMC protocol" url=https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/ -pkgver=1.0-0 +pkgver=1.0-1 timestamp=2021-08-12T19:41:07Z section="devel" maintainer="Alistair Francis " @@ -14,13 +14,22 @@ license=GPL-2.0-only image=base:v2.2 source=( - "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-7769a4d7abe339ce273c13a203394a79a11fcff9.tar.gz" 0001-Makefile-Remove-Werror.patch ) sha256sums=( - 0578e546d8893b6207180def7966e7314cae54c237a931b8f94779ce5c7d0668 SKIP ) +_commit=7769a4d7abe339ce273c13a203394a79a11fcff9 + +prepare() { + cd "$srcdir" + mkdir mmc-utils + cd mmc-utils + git init + git fetch --depth=1 "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git" "$_commit" + git checkout -f "$_commit" + patch < "$srcdir"/0001-Makefile-Remove-Werror.patch +} build() { # Use our toolchain @@ -28,10 +37,9 @@ build() { export CC=arm-linux-gnueabihf-gcc export STRIP=arm-linux-gnueabihf-strip - patch < "$srcdir"/0001-Makefile-Remove-Werror.patch - make -j4 + make -C "$srcdir"/mmc-utils -j4 } package() { - DESTDIR="$pkgdir" make -C "$srcdir" install + DESTDIR="$pkgdir" make -C "$srcdir"/mmc-utils install } From dda27e26af423b6aa4e0168ab176900c509b89f5 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:40:57 -0600 Subject: [PATCH 170/178] Update innernet-client to 1.6.1 (#868) * Update innernet-client to 1.6.1 * Remove inn symlink * Use latest rust and bump copyright --- package/innernet/package | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/package/innernet/package b/package/innernet/package index db2510734..2c9445e88 100644 --- a/package/innernet/package +++ b/package/innernet/package @@ -1,26 +1,26 @@ #!/usr/bin/env bash -# Copyright (c) 2021 The Toltec Contributors +# Copyright (c) 2024 The Toltec Contributors # SPDX-License-Identifier: MIT archs=(rmallos2) pkgnames=(innernet-client) pkgdesc="A private network system that uses WireGuard under the hood." url="https://github.com/tonarino/innernet" -pkgver=1.5.3-3 -timestamp=2022-01-31T20:08:43Z +pkgver=1.6.1-1 +timestamp=2024-01-19T14:24:40Z section="utils" maintainer="plan5 <30434574+plan5@users.noreply.github.com>" license=MIT installdepends=(wireguard) makedepends=(build:librust-clang-sys-dev build:libclang-dev build:libc6 build:libc6-dev build:clang) -image=rust:v2.2.2 +image=rust:v3.1 _srcver="v${pkgver%-*}" source=( "https://github.com/tonarino/innernet/archive/refs/tags/$_srcver.zip" ) sha256sums=( - 2f7ca1d802d898b1c4fd090cba9e0562a1e80d617b55f23ba596e81c99441a1c + fd9ec6eb75dcc46c818696e7fcb87eb772dc024e0c326360f0f8c473c937c37c ) prepare() { @@ -43,9 +43,6 @@ package() { install -D -m 700 -t "$pkgdir"/opt/bin "$srcdir"/target/armv7-unknown-linux-gnueabihf/release/innernet install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/innernet@.service" install -D -m 644 -t "$pkgdir"/lib/systemd/system "$srcdir/client/innernet.target" - - # Link /opt/bin/innernet to /opt/bin/inn - ln -s /opt/bin/innernet "$pkgdir"/opt/bin/inn } configure() { From 31a0bbd3584bba9174c67aa4dac396c753a9b188 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:47:27 -0600 Subject: [PATCH 171/178] Update yaft and tilem to 0.1.2 (#913) * Update yaft to 0.1.2 * Update tilem to 0.1.2 --- package/tilem/package | 23 ++++++++++++++--------- package/yaft/package | 23 ++++++++++++++--------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/package/tilem/package b/package/tilem/package index 17be922d7..adca938fe 100644 --- a/package/tilem/package +++ b/package/tilem/package @@ -5,14 +5,15 @@ pkgnames=(tilem) pkgdesc="TI-84+ calculator emulator" url=https://github.com/timower/rM2-stuff/tree/master/apps/tilem -_tag=0.1.1 +_tag=0.1.2 pkgver=${_tag}-1 -timestamp=2023-11-25T20:49:48Z +timestamp=2024-05-29T17:05:56Z maintainer="Mattéo Delabre " license=GPL-3.0 section="utils" image=base:v3.1 installdepends=(display) +flags=(nostrip) source=() sha256sums=() @@ -31,14 +32,18 @@ prepare() { } build() { - mkdir build + cd "$srcdir" mkdir install - cd build - cmake -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ - -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release ../tilem - cd apps/tilem - make - make install + cd tilem + cmake --preset release-toltec + cmake \ + --build build/release-toltec \ + --target tilem + cmake \ + --install build/release-toltec \ + --prefix ../install \ + --component tilem \ + --strip } package() { diff --git a/package/yaft/package b/package/yaft/package index 251dc0f77..5a635896a 100644 --- a/package/yaft/package +++ b/package/yaft/package @@ -5,14 +5,15 @@ pkgnames=(yaft) pkgdesc="Yet another framebuffer terminal" url=https://github.com/timower/rM2-stuff/tree/master/apps/yaft -_tag=0.1.1 +_tag=0.1.2 pkgver=${_tag}-1 -timestamp=2023-11-25T20:49:48Z +timestamp=2024-05-29T17:05:56Z maintainer="Mattéo Delabre " license=GPL-3.0 section="admin" image=base:v3.1 installdepends=(display terminfo) +flags=(nostrip) source=() sha256sums=() @@ -31,14 +32,18 @@ prepare() { } build() { - mkdir build + cd "$srcdir" mkdir install - cd build - cmake -DCMAKE_TOOLCHAIN_FILE="/usr/share/cmake/$CHOST.cmake" \ - -DCMAKE_INSTALL_PREFIX="../install" -DCMAKE_BUILD_TYPE=Release ../yaft - cd apps/yaft - make - make install + cd yaft + cmake --preset release-toltec + cmake \ + --build build/release-toltec \ + --target yaft + cmake \ + --install build/release-toltec \ + --prefix ../install \ + --component yaft \ + --strip } package() { From f1d0c8ac96ee53e06774707ecd9c1dcf29426f17 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 11:58:59 -0600 Subject: [PATCH 172/178] Update zerotier-one to 1.14.1 (#918) --- package/zerotier-one/package | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/zerotier-one/package b/package/zerotier-one/package index 2baabf2ef..5e4827fb4 100644 --- a/package/zerotier-one/package +++ b/package/zerotier-one/package @@ -4,7 +4,7 @@ pkgnames=(zerotier zerotier-one zerotier-one-doc zerotier-selftest) url=https://github.com/zerotier/ZeroTierOne -_upver=1.12.2 +_upver=1.14.1 pkgver=${_upver}-1 timestamp=2023-03-23T17:39:31Z maintainer="Eeems " @@ -13,7 +13,7 @@ section="utils" image=base:v3.0 source=("https://github.com/zerotier/ZeroTierOne/archive/refs/tags/${_upver}.zip") -sha256sums=(2089fc824c84985610f0bd60186c72e94e2592d8f38259a1c80ea8f696edd16b) +sha256sums=(fcf30ce797dbca757f3e882e004a3f953ebe12ae13f03d804b3fb184ee3c9714) build() { sed -i \ From db95a405ec39d760a8b46a65929a7736539c1eb6 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 12:05:20 -0600 Subject: [PATCH 173/178] Update micro to 2.0.14 (#914) * Update micro to 2.0.14 --- package/micro/package | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/micro/package b/package/micro/package index 61cc10432..e1651a49a 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.13-2 -timestamp=2023-10-21T22:38:29Z +pkgver=2.0.14-1 +timestamp=2024-08-27T18:13:07Z section="utils" maintainer="Eeems " license=MIT -source=("https://github.com/zyedidia/micro/releases/download/v2.0.13/micro-2.0.13-linux-arm.tar.gz") -sha256sums=(adb9cf644354a5c85819db40e1a427f0f4951b172597bbcd3ef94ecc4a8c4b75) +source=("https://github.com/zyedidia/micro/releases/download/v2.0.14/micro-2.0.14-linux-arm.tar.gz") +sha256sums=(9f490d88bd30a548af99a905f50244dc6c80f3c7a3c6f98faeb5b0a7329f7dea) package() { install -Dm644 "$srcdir"/LICENSE "$pkgdir/opt/usr/share/licenses/$pkgname/LICENSE" From f63a800d084947c314ae1194a1df373d8d7015c3 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 12:08:26 -0600 Subject: [PATCH 174/178] Update quickjs to 2024.01.13 (#851) * Update quickjs to 2024.01.13 * Remove patch from package * Delete package/quickjs/quickjs.patch * Fix quickjs compile * Add qjscalc symlink * Fix lint error --- package/quickjs/package | 19 ++++++++----------- package/quickjs/quickjs.patch | 13 ------------- 2 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 package/quickjs/quickjs.patch diff --git a/package/quickjs/package b/package/quickjs/package index 78467226b..ef41e2092 100644 --- a/package/quickjs/package +++ b/package/quickjs/package @@ -5,29 +5,26 @@ pkgnames=(quickjs) pkgdesc="A small and embeddable Javascript engine" url=https://bellard.org/quickjs/ -pkgver=2020.11.08-2 +pkgver=2024.01.13-1 section="devel" -timestamp=2020-11-08T13:44Z +timestamp=2024-01-13T00:00Z maintainer="khanhas " license=MIT -image=base:v2.1 +image=base:v3.1 source=( - https://bellard.org/quickjs/quickjs-2020-11-08.tar.xz - quickjs.patch + https://bellard.org/quickjs/quickjs-2024-01-13.tar.xz ) sha256sums=( - 2e9d63dab390a95ed365238f21d8e9069187f7ed195782027f0ab311bb64187b - SKIP + 3c4bf8f895bfa54beb486c8d1218112771ecfc5ac3be1036851ef41568212e03 ) build() { - patch -u Makefile -i quickjs.patch - make qjs.arm + make CROSS_PREFIX="$CROSS_COMPILE" qjs qjscalc } package() { install -d "$pkgdir"/opt/bin - install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/qjs.arm - mv "$pkgdir"/opt/bin/qjs.arm "$pkgdir"/opt/bin/qjs + install -D -m 755 -t "$pkgdir"/opt/bin/ "$srcdir"/qjs + ln -s qjs "$pkgdir"/opt/bin/qjscalc } diff --git a/package/quickjs/quickjs.patch b/package/quickjs/quickjs.patch deleted file mode 100644 index 250c666b5..000000000 --- a/package/quickjs/quickjs.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile 2020-11-08 23:21:09.000000000 +1000 -+++ Makefile.new 2021-02-10 14:36:08.954392400 +1000 -@@ -60,8 +60,8 @@ - endif - EXE=.exe - else -- CROSS_PREFIX= -- EXE= -+ CROSS_PREFIX=$(CROSS_COMPILE) -+ EXE=.arm - endif - ifdef CONFIG_CLANG - HOST_CC=clang From 6e08705b8d848f593e77805fad5637edf432dbcc Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 14 Sep 2024 12:18:44 -0600 Subject: [PATCH 175/178] Update koreader to 2024.07 (#916) --- package/koreader/package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/koreader/package b/package/koreader/package index 182d6d237..99099b8db 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=2024.04-5 -timestamp=2024-04-29T19:56:05Z +pkgver=2024.07-1 +timestamp=2024-07-15T16:21:26Z section="readers" maintainer="raisjn " license=AGPL-3.0-or-later @@ -22,7 +22,7 @@ source=( launcherctl-koreader ) sha256sums=( - e6b3a5a2c8cde8ca0c469fe542d6e170502fcf39b9a55e4447a7acd02b4a12c0 + 1040894434421b52076473f7947f139e2c98fcc04b1acadfe29b3362f262f9b7 SKIP SKIP SKIP From 02cafa5c86e711af03524f3dd77880fe1b26235f Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Mon, 16 Sep 2024 14:25:27 -0600 Subject: [PATCH 176/178] Update github actions to latest (#895) --- .github/actions/setup/action.yml | 10 +++++----- .github/workflows/pr.yml | 6 +++--- .github/workflows/stable.yml | 2 +- .github/workflows/testing.yml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index dfb09584b..3e34d796a 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -8,7 +8,7 @@ runs: sudo apt-get update -yq echo "aptVersion=libarchive-tools-$(apt-cache policy libarchive-tools | grep -oP '(?<=Candidate:\s)(.+)')" >> $GITHUB_ENV - name: Cache Apt packages - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-apt with: path: ~/.aptcache @@ -26,7 +26,7 @@ runs: sudo cp --verbose --force --recursive ~/.aptcache/* / fi - name: Cache shfmt - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /usr/local/bin/shfmt key: 43439b996942b53dfafa9b6ff084f394555d049c98fb7ec37978f7668b43e1be @@ -44,7 +44,7 @@ runs: sudo chmod a+x "$install_dir"/shfmt fi - name: Cache Shellcheck - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /usr/local/bin/shellcheck key: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8 @@ -68,11 +68,11 @@ runs: sudo mv shellcheck "$install_dir" fi - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.12' - name: Cache Python environment - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-python with: path: .venv diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a0dbca99c..c6b30ff9b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Check formatting @@ -20,13 +20,13 @@ jobs: needs: lint steps: - name: Checkout the Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages run: FLAGS='--remote-repo https://toltec-dev.org/${{ github.base_ref }}' make repo-new - name: Save the build output - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: repo path: build/repo diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index caa8c28c8..2ad14c7bf 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ed52c0ecf..24446c870 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout the Git repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Toltec dependencies uses: ./.github/actions/setup - name: Build packages From 3d5df4a13fa32fc3fb32b89ae7c98751b4a25010 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 12 Oct 2024 09:55:09 -0600 Subject: [PATCH 177/178] update wireguard to 1.0.20220627 (#651) * update wireguard to 1.0.20220627 and wireguard-tools to 1.0.20210914 * Update package * Update to use base:v3.1 * Update image to v3.2 --- package/wireguard/package | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/wireguard/package b/package/wireguard/package index 9a46b62c6..80c511938 100755 --- a/package/wireguard/package +++ b/package/wireguard/package @@ -5,32 +5,32 @@ archs=(rm1os2 rm2os2) pkgnames=(wireguard) pkgdesc="Fast, modern, secure VPN tunnel" url=https://www.wireguard.com -pkgver=1.0.20210219-5 +pkgver=1.0.20220627-1 timestamp=2021-02-19T14:08Z section=kernel maintainer="Jonah Weissman " license=GPL-2.0-only -makedepends=(build:bc build:lzop build:git) +makedepends=(build:bc build:lzop build:git build:flex build:bison build:libssl-dev) flags=(nostrip) installdepends=(wireguard-tools) _kernelrepo=https://github.com/remarkable/linux _kernelrevs=( - 1774e2a6a091fdc081324e966d3db0aa9df75c0b - d4e7e07a390f8b2544ca09d69142d18114149004 + bb6be69d6f71fced2fc63c61372bf96e5f7da565 + bb6be69d6f71fced2fc63c61372bf96e5f7da565 ) _defconfigs=( arch/arm/configs/zero-gravitas_defconfig arch/arm/configs/zero-sugar_defconfig ) -image=base:v2.1 +image=base:v3.2 source=( "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${pkgver%-*}.tar.xz" fix-multiple-yylloc-definitions.patch ) sha256sums=( - 99d35296b8d847a0d4db97a4dda96b464311a6354e75fe0bef6e7c4578690f00 + 362d412693c8fe82de00283435818d5c5def7f15e2433a07a9fe99d0518f63c0 SKIP ) From 3d9fb767a47e0885e800a89c30b48aa6713aa44a Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Sat, 12 Oct 2024 10:08:51 -0600 Subject: [PATCH 178/178] Disable innernet systemd units on uninstall (#884) * Fix #779 * Update to rust:v3.1 * Update innernet to v1.6.1 --- package/innernet/package | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/innernet/package b/package/innernet/package index 2c9445e88..b34064f7a 100644 --- a/package/innernet/package +++ b/package/innernet/package @@ -50,3 +50,12 @@ configure() { mkdir -p /opt/var/lib/innernet fi } + +preremove() { + disable-unit innernet.target + disable-unit innernet@.service +} + +postremove() { + systemctl daemon-reload +}