diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 64 | ||||
-rw-r--r-- | navidrome.service | 22 | ||||
-rw-r--r-- | navidrome.sysusers | 1 | ||||
-rw-r--r-- | navidrome.toml | 142 |
5 files changed, 197 insertions, 48 deletions
@@ -1,6 +1,6 @@ pkgbase = navidrome-git pkgdesc = Music Server and Streamer compatible with Subsonic/Airsonic - pkgver = v0.14.2.8.g803a577 + pkgver = v0.47.5.r7.gce0db834 pkgrel = 1 url = https://www.navidrome.org/ arch = x86_64 @@ -12,17 +12,19 @@ pkgbase = navidrome-git makedepends = git makedepends = npm makedepends = taglib - makedepends = nodejs-lts-fermium + makedepends = nodejs-lts-gallium depends = ffmpeg + depends = taglib provides = navidrome conflicts = navidrome - conflicts = navidrome-systemd - source = navidrome-git::git+https://github.com/deluan/navidrome.git + backup = etc/navidrome/navidrome.toml + source = navidrome::git+https://github.com/deluan/navidrome.git source = navidrome.service + source = navidrome.sysusers source = navidrome.toml sha256sums = SKIP - sha256sums = f35e82317c2e5c87577337d64347c4e5baf12e24e0a7544bbc171c9b37cdfdd4 - sha256sums = 6e2ef6b6b734abbbae0422bdb4e79f79169962fd9c595d19492612eecf75f579 + sha256sums = 790cdabdffba7163a92e22572f4a0810081c9617338b8c28d3eb8d0a7edb8ae1 + sha256sums = ee74a732f807e314f97e22b907882d16d125512d6ee23a36251fde2b3b7e608c + sha256sums = 6eb784c54ab2f0c5eb617dd952b2e7a553a5c28b514a3c311300b8c9bf845c43 pkgname = navidrome-git - @@ -1,43 +1,57 @@ # Maintainer: thelostpolaris <me [at] lostpolaris [dot] com> +# Co-maintainer: robertfoster -pkgbase='navidrome-git' -pkgname=(navidrome-git) -pkgver=v0.42.0.r15.gbcda53f1 +pkgname=navidrome-git +pkgver=v0.47.5.r7.gce0db834 pkgrel=1 pkgdesc='Music Server and Streamer compatible with Subsonic/Airsonic' url='https://www.navidrome.org/' license=('GPL3') arch=(x86_64 armv6h armv7h aarch64) -provides=('navidrome') -conflicts=('navidrome' 'navidrome-systemd') -makedepends=('go' 'git' 'npm' 'taglib' 'nodejs-lts-fermium') -depends=('ffmpeg') -source=('navidrome-git::git+https://github.com/deluan/navidrome.git' - 'navidrome.service' - 'navidrome.toml' - ) -sha256sums=('SKIP' - 'f35e82317c2e5c87577337d64347c4e5baf12e24e0a7544bbc171c9b37cdfdd4' - '6e2ef6b6b734abbbae0422bdb4e79f79169962fd9c595d19492612eecf75f579') +provides=("${pkgname%%-git}") +conflicts=("${pkgname%%-git}") +makedepends=('go' 'git' 'npm' 'taglib' 'nodejs-lts-gallium') +depends=('ffmpeg' 'taglib') +source=("${pkgname%%-git}::git+https://github.com/deluan/navidrome.git" + "${pkgname%%-git}.service" + "${pkgname%%-git}.sysusers" + "${pkgname%%-git}.toml" +) +backup=("etc/navidrome/navidrome.toml") pkgver() { - cd "${srcdir}/${pkgname}" - - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + cd "${srcdir}/${pkgname%%-git}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } build() { - cd "${srcdir}/${pkgname}" + cd "${srcdir}/${pkgname%%-git}" + + make setup + make buildjs - make setup - make buildall + export CGO_LDFLAGS="${LDFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -ldflags="-X github.com/navidrome/navidrome/consts.gitTag=v$pkgver" -tags=netgo } package() { - install -d -o navidrome -g navidrome "${pkgdir}/usr/bin/navidrome" - install -d -o navidrome -g navidrome "${pkgdir}/var/lib/navidrome" - install -Dm 755 "${srcdir}/${pkgname}/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" + cd "${srcdir}/${pkgname%%-git}" + install -Dm755 "${pkgname%%-git}" \ + "${pkgdir}/usr/bin/${pkgname%%-git}" + + install -Dm0644 ../"${pkgname%%-git}.service" \ + "${pkgdir}/usr/lib/systemd/system/${pkgname%%-git}.service" + install -Dm0644 ../"${pkgname%%-git}.toml" \ + "${pkgdir}/etc/navidrome/${pkgname%%-git}.toml" + install -Dm0644 ../"${pkgname%%-git}.sysusers" \ + "${pkgdir}/usr/lib/sysusers.d/${pkgname%%-git}.conf" } +sha256sums=('SKIP' + '790cdabdffba7163a92e22572f4a0810081c9617338b8c28d3eb8d0a7edb8ae1' + 'ee74a732f807e314f97e22b907882d16d125512d6ee23a36251fde2b3b7e608c' + '6eb784c54ab2f0c5eb617dd952b2e7a553a5c28b514a3c311300b8c9bf845c43') diff --git a/navidrome.service b/navidrome.service index d9f35ec5c352..39932b9bc812 100644 --- a/navidrome.service +++ b/navidrome.service @@ -1,7 +1,6 @@ [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 @@ -10,25 +9,33 @@ WantedBy=multi-user.target User=navidrome Group=navidrome Type=simple -ExecStart=/var/lib/navidrome --configfile "/var/lib/navidrome/navidrome.toml" +ExecStart=/usr/bin/navidrome --configfile "/etc/navidrome/navidrome.toml" +StateDirectory=navidrome WorkingDirectory=/var/lib/navidrome TimeoutStopSec=20 KillMode=process Restart=on-failure # See https://www.freedesktop.org/software/systemd/man/systemd.exec.html +CapabilityBoundingSet= DevicePolicy=closed NoNewPrivileges=yes +LockPersonality=yes PrivateTmp=yes PrivateUsers=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes +ProtectClock=yes +ProtectHostname=yes +ProtectKernelLogs=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 +SystemCallFilter=@system-service +SystemCallFilter=~@privileged @resources +SystemCallArchitectures=native +UMask=0066 # You can uncomment the following line if you're not using the jukebox This # will prevent navidrome from accessing any real (physical) devices @@ -39,9 +46,6 @@ ReadWritePaths=/var/lib/navidrome # /var/lib/navidrome. ProtectSystem=full -# You can uncomment the following line if you don't have any media in /home/*. +# You can comment 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" +ProtectHome=true diff --git a/navidrome.sysusers b/navidrome.sysusers new file mode 100644 index 000000000000..7e5be13f5fa7 --- /dev/null +++ b/navidrome.sysusers @@ -0,0 +1 @@ +u navidrome - "navidrome user" /var/lib/navidrome /usr/bin/bash diff --git a/navidrome.toml b/navidrome.toml index bb365b5ee98a..0973dc92eeae 100644 --- a/navidrome.toml +++ b/navidrome.toml @@ -1,8 +1,136 @@ -# additional configuration options can be seen +# For more details and relative environment variables +# take a look at: # https://www.navidrome.org/docs/usage/configuration-options/#available-options -MusicFolder = "/var/lib/Music" -#BaseURL = "" -#LastFM.ApiKey = "" -#LastFM.Secret = "" -#Spotify.ID = "" -#Spotify.Secret = "" + +# Folder where your music library is stored. Can be read-only +MusicFolder = "/var/lib/navidrome/music" + +# Folder to store application data (DB, cache…) +DataFolder = "/var/lib/navidrome/data" + +# Configure periodic scans using “cron” syntax. To disable it altogether, set it to "0" +# ScanSchedule = "@every 1m" + +# Log level. Useful for troubleshooting. Possible values: error, warn, info, debug, trace +# LogLevel="info" + +# Whether or not sensitive information (like tokens and passwords) should be redacted (hidden) in the logs +# EnableLogRedacting = true + +# Port Navidrome will use +# Port = 4533 + +# IP address the server will bind to +# Address = 0.0.0.0 + +# Enables transcoding configuration in the UI +# EnableTranscodingConfig = false + +# Size of transcoding cache. Set to "0" to disable cache +# TranscodingCacheSize = "100MB" + +# Size of image (art work) cache. Set to "0" to disable cache +# ImageCacheSize = "100MB" + +# Enable/disable .m3u playlist auto-import +# AutoImportPlaylists = true + +# Where to search for and import playlists from. Can be a list of folders/globs (separated by : (or ; on Windows). Paths are relative to MusicFolder +# PlaylistsPath = ".:**/**" # (meaning MusicFolder and all its subfolders)" + +# Base URL (only the path part) to configure Navidrome behind a proxy (ex: /music) +# BaseUrl = "" + +# Change background image used in the Login page +# UILoginBackgroundUrl = "random music image from Unsplash.com" + +# Add a welcome message to the login screen +# UIWelcomeMessage = "" + +# Send basic info to your own Google Analytics account. Must be in the format UA-XXXXXXXX +# GATrackingID = "" + +# Sets the default theme used by the UI when logging in from a new browser. This value must match one of the options in the UI +# DefaultTheme = Dark + +# Controls whether the player in the UI will animate the album cover (rotation) +# EnableCoverAnimation = true + +# List of ignored articles when sorting/indexing artists +# IgnoredArticles = "The El La Los Las Le Les Os As O A" + +# Match query strings anywhere in searchable fields, not only in word boundaries. Useful for languages where words are not space separated +# SearchFullString = false + +# Uses music files’ modification time when sorting by “Recently Added”. Otherwise use import time +# RecentlyAddedByModTime = false + +# Configure the order to look for cover art images. Use special embedded value to get embedded images from the audio files +# CoverArtPriority = "embedded, cover.*, folder.*, front.*" + +# Set JPEG quality percentage for resized cover art images +# CoverJpegQuality = 75 + +# Enable the option in the UI to download music/albums/artists/playlists from the server +# EnableDownloads = true + +# How long Navidrome will wait before closing web ui idle sessions +# SessionTimeout = "24h" + +# How many login requests can be processed from a single IP during the AuthWindowLength. Set to 0 to disable the limit rater +# AuthRequestLimit = 5 + +# Window Length for the authentication rate limit +# AuthWindowLength = "20s" + +# Select metadata extractor implementation. Options: taglib or ffmpeg +# Scanner.Extractor = "taglib" + +# List of separators to split genre tags +# Scanner.GenreSeparators = ";/," + +# Set this to false to completely disable Last.fm integration +# LastFM.Enabled = true + +# Last.fm ApiKey +# LastFM.ApiKey = "Navidrome project’s shared ApiKey" + +# Last.fm Shared Secret +# LastFM.Secret = "Navidrome project’s shared Secret" + +# Two letter-code for language to be used to retrieve biographies from Last.fm +# LastFM.Language = "en" + +# Spotify Client ID. Required if you want Artist images +# Spotify.ID = "" + +# Spotify Client Secret. Required if you want Artist images +# Spotify.Secret = "" + +# Set this to false to completely disable ListenBrainz integration +# ListenBrainz.Enabled = true + +# Use Gravatar images as the user profile image. Needs the user’s email to be filled +# EnableGravatar = false + +# Set this to false to completely disable ALL external integrations +# EnableExternalServices = true + +# Enable toggling “Heart”/“Loved” for songs/albums/artists in the UI (maps to “Star”/“Starred” in Subsonic Clients) +# EnableFavourites = true + +# Enable 5-star ratings in the UI +# EnableStarRating = true + +# Enable regular users to edit their details and change their password +# EnableUserEditing = true + +# Passphrase used to encrypt passwords in the DB. Click here for details +# PasswordEncryptionKey = "-" + +# HTTP header containing user name from authenticated proxy +# ReverseProxyUserHeader = "Remote-User" + +# Comma separated list of IP CIDRs which are allowed to use reverse proxy authentication, empty means “deny all” +# ReverseProxyWhitelist = "" + |