summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorasukaminato2023-06-09 21:40:18 +0900
committerasukaminato2023-06-09 21:40:18 +0900
commitfa03079889d1aea4dcc10f43dd25061a4a087f92 (patch)
treee535de946c2037f0bb4e1805b75f356d4a4f901a
downloadaur-fa03079889d1aea4dcc10f43dd25061a4a087f92.tar.gz
init
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD36
-rw-r--r--microbin.conf39
-rw-r--r--microbin.service48
5 files changed, 170 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..64a15d718227
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = microbin-bin
+ pkgdesc = A tiny, self-contained, configurable paste bin and URL shortener written in Rust.
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = https://github.com/szabodanika/microbin
+ arch = i686
+ arch = pentium4
+ arch = x86_64
+ arch = arm
+ arch = armv7h
+ arch = armv6h
+ arch = aarch64
+ license = BSD
+ provides = microbin
+ backup = etc/microbin.conf
+ source = microbin.service
+ source = microbin.conf
+ source = https://raw.githubusercontent.com/szabodanika/microbin/7da95d2d1183d44491ab1c5a489799606d03f963/LICENSE
+ sha256sums = 3704d0a839585b6e6a38dda635f7c8119a3c8286420f62a028ae1b7d27a89ad0
+ sha256sums = 8e943fc702637b1b7441491db945c078d190c4208cd202e5e360cad90ca793ab
+ sha256sums = f692f4e1ae51ae73723c06d826f2c11d03dcf2a0e84d41fabc74110dbcd0d591
+ source_i686 = https://github.com/szabodanika/microbin/releases/download/v1.2.1/microbin-v1.2.1-i686-unknown-linux-musl.tar.gz
+ sha256sums_i686 = 27485749be80f7ed33840a02a31264af3faad000f6279ca4c752b64286cdd842
+ source_x86_64 = https://github.com/szabodanika/microbin/releases/download/v1.2.1/microbin-v1.2.1-x86_64-unknown-linux-musl.tar.gz
+ sha256sums_x86_64 = 762a12295f032532c168328dfa040a24892ab8ee78aeff8992e2ac31c88d5269
+ source_arm = https://github.com/szabodanika/microbin/releases/download/v1.2.1/microbin-v1.2.1-arm-unknown-linux-musleabihf.tar.gz
+ sha256sums_arm = 117bb442729513322b8ecf265495e7d8c88c98abc7606226b042da1eba77a2b4
+ source_armv7h = https://github.com/szabodanika/microbin/releases/download/v1.2.1/microbin-v1.2.1-armv7-unknown-linux-musleabihf.tar.gz
+ sha256sums_armv7h = 1987ef8a6fc7052bde80217e8ef73ff23d2ed7a21d2f1e9b315c906c2f78ad69
+ source_aarch64 = https://github.com/szabodanika/microbin/releases/download/v1.2.1/microbin-v1.2.1-aarch64-unknown-linux-musl.tar.gz
+ sha256sums_aarch64 = e96c54cb3e5aab668f692b990f9fd897e6e30b28bbab04cee8a9e9cc6cd3e97c
+
+pkgname = microbin-bin
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b388f09c89fb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+pkg/
+src/
+LICENSE
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f893e234d9a4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: FixFromDarkness <aur@forestfox.tk>
+pkgname=microbin-bin
+_pkgname=microbin
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="A tiny, self-contained, configurable paste bin and URL shortener written in Rust."
+arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
+url="https://github.com/szabodanika/microbin"
+license=('BSD')
+provides=($_pkgname)
+backup=('etc/microbin.conf')
+
+source=("$_pkgname.service" "$_pkgname.conf"
+ https://raw.githubusercontent.com/szabodanika/microbin/7da95d2d1183d44491ab1c5a489799606d03f963/LICENSE)
+source_x86_64=("https://github.com/szabodanika/microbin/releases/download/v${pkgver}/microbin-v${pkgver}-x86_64-unknown-linux-musl.tar.gz")
+source_aarch64=("https://github.com/szabodanika/microbin/releases/download/v${pkgver}/microbin-v${pkgver}-aarch64-unknown-linux-musl.tar.gz")
+source_i686=("https://github.com/szabodanika/microbin/releases/download/v${pkgver}/microbin-v${pkgver}-i686-unknown-linux-musl.tar.gz")
+source_armv7h=("https://github.com/szabodanika/microbin/releases/download/v${pkgver}/microbin-v${pkgver}-armv7-unknown-linux-musleabihf.tar.gz")
+source_arm=("https://github.com/szabodanika/microbin/releases/download/v${pkgver}/microbin-v${pkgver}-arm-unknown-linux-musleabihf.tar.gz")
+sha256sums=('3704d0a839585b6e6a38dda635f7c8119a3c8286420f62a028ae1b7d27a89ad0'
+ '8e943fc702637b1b7441491db945c078d190c4208cd202e5e360cad90ca793ab'
+ 'f692f4e1ae51ae73723c06d826f2c11d03dcf2a0e84d41fabc74110dbcd0d591')
+sha256sums_i686=('27485749be80f7ed33840a02a31264af3faad000f6279ca4c752b64286cdd842')
+sha256sums_x86_64=('762a12295f032532c168328dfa040a24892ab8ee78aeff8992e2ac31c88d5269')
+sha256sums_arm=('117bb442729513322b8ecf265495e7d8c88c98abc7606226b042da1eba77a2b4')
+sha256sums_armv7h=('1987ef8a6fc7052bde80217e8ef73ff23d2ed7a21d2f1e9b315c906c2f78ad69')
+sha256sums_aarch64=('e96c54cb3e5aab668f692b990f9fd897e6e30b28bbab04cee8a9e9cc6cd3e97c')
+
+package() {
+ install -Dm0755 -t "$pkgdir/usr/bin/" "$_pkgname"
+ install -Dm644 $_pkgname.service "$pkgdir"/usr/lib/systemd/system/$_pkgname.service
+ install -Dm644 $_pkgname.conf "$pkgdir"/etc/$_pkgname.conf
+ install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname/
+ local _http_uid_gid=33
+ install -do ${_http_uid_gid} -g ${_http_uid_gid} "$pkgdir"/var/lib/microbin/
+}
diff --git a/microbin.conf b/microbin.conf
new file mode 100644
index 000000000000..2001e460cbb1
--- /dev/null
+++ b/microbin.conf
@@ -0,0 +1,39 @@
+## Commented values are default values
+
+## HTTP Basic Authentication
+# MICROBIN_AUTH_USERNAME =
+# MICROBIN_AUTH_PASSWORD =
+
+## Enables editable pastas
+MICROBIN_EDITABLE = true
+
+## Customization
+# MICROBIN_FOOTER_TEXT =
+# MICROBIN_HIDE_FOOTER =
+# MICROBIN_HIDE_HEADER =
+# MICROBIN_HIDE_LOGO =
+# MICROBIN_TITLE =
+
+## Disables the /pastalist endpoint, essentially making all pastas private.
+# MICROBIN_NO_LISTING = false
+
+## Enables syntax highlighting support.
+MICROBIN_HIGHLIGHTSYNTAX = true
+
+## Bind options
+# MICROBIN_PORT = 8080
+MICROBIN_BIND = 127.0.0.1
+
+## Enables private pastas.
+MICROBIN_PRIVATE = true
+
+## Disables main CSS styling
+# MICROBIN_PURE_HTML = false
+
+## Disables adding/editing/removing pastas entirely.
+# MICROBIN_READONLY = false
+
+# MICROBIN_THREADS = 1
+
+## Changes the maximum width of the UI from 720 pixels to 1080 pixels.
+MICROBIN_WIDE = true
diff --git a/microbin.service b/microbin.service
new file mode 100644
index 000000000000..b0a961ea4156
--- /dev/null
+++ b/microbin.service
@@ -0,0 +1,48 @@
+[Unit]
+Description=A tiny, self-contained, configurable paste bin and URL shortener
+Documentation=https://github.com/szabodanika/microbin
+After=network.target
+
+[Service]
+# hardening
+ReadWritePaths="/var/lib/microbin/"
+NoNewPrivileges=true
+ProtectSystem=strict
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+PrivateDevices=true
+DevicePolicy=closed
+ProtectControlGroups=true
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
+ProtectHostname=true
+PrivateTmp=true
+ProtectClock=true
+LockPersonality=true
+RestrictNamespaces=true
+RestrictRealtime=true
+MemoryDenyWriteExecute=true
+SystemCallArchitectures=native
+SystemCallFilter=@system-service
+SystemCallFilter=~@privileged
+ProtectHome=true
+RemoveIPC=true
+RestrictSUIDSGID=true
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+
+# enable for 1-1024 port listening
+#AmbientCapabilities=CAP_NET_BIND_SERVICE
+# enable to specify a higher limit for open files/connections
+#LimitNOFILE=1000000
+
+User=http
+Group=http
+StateDirectory=microbin
+WorkingDirectory=/var/lib/microbin
+EnvironmentFile=/etc/microbin.conf
+ExecStart=microbin
+Restart=on-failure
+KillSignal=SIGINT
+
+[Install]
+WantedBy=default.target