diff options
-rw-r--r-- | fastbangs-rs-git/PKGBUILD | 57 | ||||
-rw-r--r-- | fastbangs-rs-git/fastbangs-rs.service | 37 | ||||
-rw-r--r-- | fastbangs-rs-git/fastbangs-rs.yaml | 18 | ||||
-rw-r--r-- | fastbangs-rs-git/sysusers.conf | 1 | ||||
-rw-r--r-- | fastbangs-rs-git/tmpfiles.conf | 1 | ||||
-rw-r--r-- | hurrycurry-website-git/PKGBUILD | 4 |
6 files changed, 116 insertions, 2 deletions
diff --git a/fastbangs-rs-git/PKGBUILD b/fastbangs-rs-git/PKGBUILD new file mode 100644 index 0000000..dfa6072 --- /dev/null +++ b/fastbangs-rs-git/PKGBUILD @@ -0,0 +1,57 @@ +pkgname=fastbangs-rs-git +pkgver=r20.bce539d +pkgrel=1 +pkgdesc='Shortcut-based meta search engine' +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +url='https://codeberg.com/lialenck/fastbangs-rs' +license=('AGPL3') +conflicts=('fastbangs-rs') +provides=('fastbangs-rs') +makedepends=('esbuild' 'sassc' 'rustup') +backup=('etc/fastbangs-rs.yaml') +source=('git+https://codeberg.org/lialenck/fastbangs-rs.git' + 'fastbangs-rs.service' + 'fastbangs-rs.yaml' + 'tmpfiles.conf' + 'sysusers.conf') +b2sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP') + +pkgver() { + cd fastbangs-rs + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +rust_chost() { + sed \ + -e "s/-pc-linux/-unknown-linux/" \ + -e "s/armv7l-/armv7-/" \ + <<< "$CHOST" +} + +prepare() { + cd "fastbangs-rs" + rustup install stable + rustup target add "$(rust_chost)" + cargo +stable fetch --target "$(rust_chost)" +} + +build() { + cd "fastbangs-rs" + mkdir -p build + cargo +stable build \ + --frozen \ + --target "$(rust_chost)" \ + --release +} + +package() { + install -Dm755 fastbangs-rs/target/"$(rust_chost)"/release/fastbangs "$pkgdir/usr/bin/fastbangs-rs" + install -Dm644 fastbangs-rs.service "$pkgdir/usr/lib/systemd/system/fastbangs-rs.service" + install -Dm644 fastbangs-rs.yaml "$pkgdir/etc/fastbangs-rs.yaml" + install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/fastbangs-rs.conf" + install -Dm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/fastbangs-rs.conf" +} diff --git a/fastbangs-rs-git/fastbangs-rs.service b/fastbangs-rs-git/fastbangs-rs.service new file mode 100644 index 0000000..aa953af --- /dev/null +++ b/fastbangs-rs-git/fastbangs-rs.service @@ -0,0 +1,37 @@ +[Unit] +Description=Redundant shortcut-based meta search engine +After=network.target +Wants=network-online.target + +[Service] +Environment=XDG_DATA_HOME=/var/lib RUST_LOG=info +ExecStart=/usr/bin/fastbangs-rs /etc/fastbangs-rs.yaml +Restart=on-failure +RestartSec=10s +Type=simple +User=fastbangs + +AmbientCapabilities=CAP_NET_BIND_SERVICE +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +LockPersonality=yes +MemoryDenyWriteExecute=yes +NoNewPrivileges=yes +PrivateDevices=true +PrivateTmp=true +ProtectClock=yes +ProtectControlGroups=yes +ProtectHome=true +ProtectHostname=yes +ProtectKernelLogs=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +ProtectSystem=full +RestrictAddressFamilies=~AF_PACKET AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +RestrictSUIDSGID=yes +SystemCallArchitectures=native +SystemCallFilter=@system-service + +[Install] +WantedBy=multi-user.target diff --git a/fastbangs-rs-git/fastbangs-rs.yaml b/fastbangs-rs-git/fastbangs-rs.yaml new file mode 100644 index 0000000..8d8246c --- /dev/null +++ b/fastbangs-rs-git/fastbangs-rs.yaml @@ -0,0 +1,18 @@ +# Search queries will be redirected here +base_url: http://localhost:28000 +# Path for the website icon for the url bar +icon_url: "" +# Pairs of [Udp address used for internal communication, bind address for the frontend/api]. +# On startup, binds against all internal addresses are attempted, and the first succeeding determines +# Which node we are. +# Note that changing this set of nodes after the first start is, as of now, unsupported. +# Also note that internal communication is assumed to be secure; no additional encryption is done. This +# can be accomplished by letting the nodes communicate over a VPN and listing those addresses here. +nodes: [] + # - [a internal address, a public bind address] + # - [another internal address, another bind address] + +user: "" +# Base64 of the sha512 of the admin password. Can be generated using: +# echo -n YOUR_PASSWORD | sha512sum | cut -f1 | xxd -r -p | base64 -w0 +pw_hash: "" diff --git a/fastbangs-rs-git/sysusers.conf b/fastbangs-rs-git/sysusers.conf new file mode 100644 index 0000000..b2db1b0 --- /dev/null +++ b/fastbangs-rs-git/sysusers.conf @@ -0,0 +1 @@ +u fastbangs - "fastbangs-rs search service" - - diff --git a/fastbangs-rs-git/tmpfiles.conf b/fastbangs-rs-git/tmpfiles.conf new file mode 100644 index 0000000..68f2597 --- /dev/null +++ b/fastbangs-rs-git/tmpfiles.conf @@ -0,0 +1 @@ +d /var/lib/fastbangs-rs 0700 fastbangs fastbangs - - diff --git a/hurrycurry-website-git/PKGBUILD b/hurrycurry-website-git/PKGBUILD index 3efae24..bbb54d6 100644 --- a/hurrycurry-website-git/PKGBUILD +++ b/hurrycurry-website-git/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: metamuffin <metamuffin@disroot.org> pkgname=hurrycurry-website-git -pkgver=r21.2d1d0e7 -pkgrel=3 +pkgver=r22.f224cd4 +pkgrel=1 pkgdesc="Hurrycurry website files" arch=('any') url="https://codeberg.org/hurrycurry/website" |