summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkrtansh Rajput2021-04-29 14:37:35 -0500
committerSkrtansh Rajput2021-04-29 14:37:35 -0500
commit820add603b1d7295552d34432a5c69879906431e (patch)
treed6d4d5c85bf4e456ff12b6a22ca58c85c0911961
parent99cfc76d0969ccf0a50c56655c2e455088d9de83 (diff)
downloadaur-820add603b1d7295552d34432a5c69879906431e.tar.gz
added default service and toml files
deleted some unused files
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD47
-rw-r--r--navidrome.environmentfile0
-rw-r--r--navidrome.service47
-rw-r--r--navidrome.sysusers1
-rw-r--r--navidrome.tmpfiles1
-rw-r--r--navidrome.toml6
-rwxr-xr-xupdate.sh31
9 files changed, 131 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 465293b78485..ec6cc098ff10 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,14 +12,32 @@ pkgbase = navidrome-bin
depends = ffmpeg
provides = navidrome
conflicts = navidrome
+ conflicts = navidrome-systemd
+ backup = var/lib/navidrome/navidrome.toml
source_x86_64 = https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_x86_64.tar.gz
+ source_x86_64 = navidrome.service
+ source_x86_64 = navidrome.toml
md5sums_x86_64 = e0f4e08cf4a85d0a57c63b7b2869c99c
+ md5sums_x86_64 = afcf505fb19e9738d72a7f0097394eb5
+ md5sums_x86_64 = 2e600d1c9924c8fbb13e23daf246dacb
source_armv6h = https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv6.tar.gz
+ source_armv6h = navidrome.service
+ source_armv6h = navidrome.toml
md5sums_armv6h = 7ab3413a9ed2efc9337ff0f01159dbe7
+ md5sums_armv6h = afcf505fb19e9738d72a7f0097394eb5
+ md5sums_armv6h = 2e600d1c9924c8fbb13e23daf246dacb
source_armv7h = https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv7.tar.gz
+ source_armv7h = navidrome.service
+ source_armv7h = navidrome.toml
md5sums_armv7h = 2598a08f8605237fafa112783c227024
+ md5sums_armv7h = afcf505fb19e9738d72a7f0097394eb5
+ md5sums_armv7h = 2e600d1c9924c8fbb13e23daf246dacb
source_aarch64 = https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_arm64.tar.gz
+ source_aarch64 = navidrome.service
+ source_aarch64 = navidrome.toml
md5sums_aarch64 = 1c382ea25125c66a97034dee0e7afc8d
+ md5sums_aarch64 = afcf505fb19e9738d72a7f0097394eb5
+ md5sums_aarch64 = 2e600d1c9924c8fbb13e23daf246dacb
pkgname = navidrome-bin
diff --git a/.gitignore b/.gitignore
index ec14bdd55945..6f7908bac53e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
# Created by https://www.gitignore.io/api/archlinuxpackages
-navidrome.service
### ArchLinuxPackages ###
*.tar
diff --git a/PKGBUILD b/PKGBUILD
index 2d1de937b23d..3170c331fce1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Sitansh Rajput <thelostpolaris [at] gmail [dot] com>
+# Maintainer: Sitansh Rajput <me [at] lostpolaris [dot] com>
pkgbase='navidrome-bin'
pkgname=(navidrome-bin)
@@ -9,18 +9,43 @@ url='https://www.navidrome.org/'
license=('GPL3')
arch=(x86_64 armv6h armv7h aarch64)
provides=('navidrome')
-conflicts=('navidrome')
+conflicts=('navidrome' 'navidrome-systemd')
+backup=('var/lib/navidrome/navidrome.toml')
depends=('glibc' 'ffmpeg')
-source_x86_64=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_x86_64.tar.gz')
-source_armv6h=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv6.tar.gz')
-source_armv7h=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv7.tar.gz')
-source_aarch64=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_arm64.tar.gz')
-md5sums_x86_64=('e0f4e08cf4a85d0a57c63b7b2869c99c')
-md5sums_armv6h=('7ab3413a9ed2efc9337ff0f01159dbe7')
-md5sums_armv7h=('2598a08f8605237fafa112783c227024')
-md5sums_aarch64=('1c382ea25125c66a97034dee0e7afc8d')
+source_x86_64=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_x86_64.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_armv6h=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv6.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_armv7h=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_armv7.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_aarch64=('https://github.com/navidrome/navidrome/releases/download/v0.42.0/navidrome_0.42.0_Linux_arm64.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+md5sums_x86_64=('e0f4e08cf4a85d0a57c63b7b2869c99c'
+ 'afcf505fb19e9738d72a7f0097394eb5'
+ '2e600d1c9924c8fbb13e23daf246dacb')
+md5sums_armv6h=('7ab3413a9ed2efc9337ff0f01159dbe7'
+ 'afcf505fb19e9738d72a7f0097394eb5'
+ '2e600d1c9924c8fbb13e23daf246dacb')
+md5sums_armv7h=('2598a08f8605237fafa112783c227024'
+ 'afcf505fb19e9738d72a7f0097394eb5'
+ '2e600d1c9924c8fbb13e23daf246dacb')
+md5sums_aarch64=('1c382ea25125c66a97034dee0e7afc8d'
+ 'afcf505fb19e9738d72a7f0097394eb5'
+ '2e600d1c9924c8fbb13e23daf246dacb')
package() {
- install -Dm755 "$srcdir/navidrome" "$pkgdir/usr/bin/navidrome"
+ install -d -o navidrome -g navidrome "${pkgdir}/usr/bin/navidrome"
+ install -d -o navidrome -g navidrome "${pkgdir}/var/lib/navidrome"
+ install -Dm 755 "${srcdir}/navidrome" "${pkgdir}/usr/bin/navidrome"
+ install -Dm 644 "${srcdir}/navidrome.service" -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm 644 "${srcdir}/navidrome.toml" -t "${pkgdir}/var/lib/navidrome"
}
diff --git a/navidrome.environmentfile b/navidrome.environmentfile
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/navidrome.environmentfile
+++ /dev/null
diff --git a/navidrome.service b/navidrome.service
new file mode 100644
index 000000000000..d9f35ec5c352
--- /dev/null
+++ b/navidrome.service
@@ -0,0 +1,47 @@
+[Unit]
+Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
+After=remote-fs.target network.target
+AssertPathExists=/var/lib/navidrome
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+User=navidrome
+Group=navidrome
+Type=simple
+ExecStart=/var/lib/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
+WorkingDirectory=/var/lib/navidrome
+TimeoutStopSec=20
+KillMode=process
+Restart=on-failure
+
+# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
+DevicePolicy=closed
+NoNewPrivileges=yes
+PrivateTmp=yes
+PrivateUsers=yes
+ProtectControlGroups=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
+RestrictNamespaces=yes
+RestrictRealtime=yes
+SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
+ReadWritePaths=/var/lib/navidrome
+
+# You can uncomment the following line if you're not using the jukebox This
+# will prevent navidrome from accessing any real (physical) devices
+#PrivateDevices=yes
+
+# You can change the following line to `strict` instead of `full` if you don't
+# want navidrome to be able to write anything on your filesystem outside of
+# /var/lib/navidrome.
+ProtectSystem=full
+
+# You can uncomment the following line if you don't have any media in /home/*.
+# This will prevent navidrome from ever reading/writing anything there.
+#ProtectHome=true
+
+# You can customize some Navidrome config options by setting environment variables here. Ex:
+#Environment=ND_BASEURL="/navidrome"
diff --git a/navidrome.sysusers b/navidrome.sysusers
deleted file mode 100644
index 42212ea8c582..000000000000
--- a/navidrome.sysusers
+++ /dev/null
@@ -1 +0,0 @@
-u navidrome - "Navidrome user" /var/lib/navidrome
diff --git a/navidrome.tmpfiles b/navidrome.tmpfiles
deleted file mode 100644
index 1c61c86e7a88..000000000000
--- a/navidrome.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-d /var/lib/navidrome 0755 navidrome navidrome
diff --git a/navidrome.toml b/navidrome.toml
new file mode 100644
index 000000000000..94ff1ef94077
--- /dev/null
+++ b/navidrome.toml
@@ -0,0 +1,6 @@
+MusicFolder = "/var/lib/Music"
+#LastFM.ApiKey = ""
+#LastFM.Secret = ""
+#Spotify.ID = ""
+#Spotify.Secret = ""
+#DevActivityPanel = false \ No newline at end of file
diff --git a/update.sh b/update.sh
index 5a18a0fcf482..713b347e3428 100755
--- a/update.sh
+++ b/update.sh
@@ -19,7 +19,7 @@ if [[ $# == 2 ]]; then
fi
printf '' > PKGBUILD
-echo "# Maintainer: Sitansh Rajput <thelostpolaris [at] gmail [dot] com>
+echo "# Maintainer: Sitansh Rajput <me [at] lostpolaris [dot] com>
pkgbase='${AUR_NAME}'
pkgname=(${AUR_NAME})
@@ -30,12 +30,25 @@ url='${URL}'
license=('${LICENSE}')
arch=(x86_64 armv6h armv7h aarch64)
provides=('${EXECUTABLE_NAME}')
-conflicts=('${EXECUTABLE_NAME}')
+conflicts=('${EXECUTABLE_NAME}' '${EXECUTABLE_NAME}-systemd')
+backup=('var/lib/${EXECUTABLE_NAME}/${EXECUTABLE_NAME}.toml')
depends=('glibc' 'ffmpeg')
-source_x86_64=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_x86_64.tar.gz')
-source_armv6h=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_armv6.tar.gz')
-source_armv7h=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_armv7.tar.gz')
-source_aarch64=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_arm64.tar.gz')
+source_x86_64=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_x86_64.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_armv6h=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_armv6.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_armv7h=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_armv7.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
+source_aarch64=('https://github.com/navidrome/navidrome/releases/download/v$1/navidrome_$1_Linux_arm64.tar.gz'
+ 'navidrome.service'
+ 'navidrome.toml'
+ )
md5sums=()
md5sums_x86_64=()
md5sums_armv6h=()
@@ -43,7 +56,11 @@ md5sums_armv7h=()
md5sums_aarch64=()
package() {
- install -Dm755 \"\$srcdir/navidrome\" \"\$pkgdir/usr/bin/${EXECUTABLE_NAME}\"
+ install -d -o navidrome -g navidrome \"\${pkgdir}/usr/bin/${EXECUTABLE_NAME}\"
+ install -d -o navidrome -g navidrome \"\${pkgdir}/var/lib/${EXECUTABLE_NAME}\"
+ install -Dm 755 \"\${srcdir}/navidrome\" \"\${pkgdir}/usr/bin/${EXECUTABLE_NAME}\"
+ install -Dm 644 \"\${srcdir}/navidrome.service\" -t \"\${pkgdir}/usr/lib/systemd/system\"
+ install -Dm 644 \"\${srcdir}/navidrome.toml\" -t \"\${pkgdir}/var/lib/${EXECUTABLE_NAME}\"
}
" >> PKGBUILD