diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml index e4d880017..62a06e427 100644 --- a/.github/workflows/stable.yml +++ b/.github/workflows/stable.yml @@ -29,9 +29,13 @@ 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: | + 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 }} + MESSAGE: ${{ github.event.commits[0].message }} - name: Send notification to Discord continue-on-error: true uses: ./.github/actions/discord-send 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" 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 +} 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 ) 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 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]