Initial commit with version 0.12.2
This commit is contained in:
commit
65f387ee85
4 changed files with 99 additions and 0 deletions
28
.SRCINFO
Normal file
28
.SRCINFO
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
pkgbase = firefox-syncstorage
|
||||||
|
pkgdesc = Sync storage server with built-in token server for running a self-hosted firefox sync server
|
||||||
|
pkgver = 0.12.2
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://github.com/mozilla-services/syncstorage-rs
|
||||||
|
install = firefox-syncstorage.install
|
||||||
|
arch = i686
|
||||||
|
arch = x86_64
|
||||||
|
arch = arm
|
||||||
|
arch = armv6h
|
||||||
|
arch = armv7h
|
||||||
|
arch = aarch64
|
||||||
|
license = MPL2
|
||||||
|
makedepends = rust
|
||||||
|
makedepends = cmake
|
||||||
|
makedepends = pkgconf
|
||||||
|
makedepends = mariadb-libs
|
||||||
|
depends = openssl
|
||||||
|
depends = python-fxa
|
||||||
|
depends = python-tokenlib
|
||||||
|
optdepends = mysql: for use with a local database server
|
||||||
|
backup = etc/firefox-syncstorage.toml
|
||||||
|
source = https://github.com/mozilla-services/syncstorage-rs/archive/0.12.2.tar.gz
|
||||||
|
source = firefox-syncstorage.service
|
||||||
|
sha256sums = 625224ef27ca9674428f9e2021d3968e716465dad7961765c65bbcd00f64720e
|
||||||
|
sha256sums = 609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d
|
||||||
|
|
||||||
|
pkgname = firefox-syncstorage
|
36
PKGBUILD
Normal file
36
PKGBUILD
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Maintainer: Manuel Hüsers <aur@huesers.de>
|
||||||
|
# Contributor: jewelux <jewelux.aur@prejo.de>
|
||||||
|
|
||||||
|
# Based off the firefox-syncstorage-git PKGBUILD from jewelux
|
||||||
|
|
||||||
|
pkgname=firefox-syncstorage
|
||||||
|
_pkgname=syncstorage-rs
|
||||||
|
pkgver=0.12.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Sync storage server with built-in token server for running a self-hosted firefox sync server'
|
||||||
|
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
||||||
|
url="https://github.com/mozilla-services/${_pkgname}"
|
||||||
|
license=('MPL2')
|
||||||
|
depends=('openssl' 'python-fxa' 'python-tokenlib')
|
||||||
|
makedepends=('rust' 'cmake' 'pkgconf' 'mariadb-libs')
|
||||||
|
optdepends=('mysql: for use with a local database server')
|
||||||
|
install="${pkgname}.install"
|
||||||
|
source=("https://github.com/mozilla-services/${_pkgname}/archive/${pkgver}.tar.gz"
|
||||||
|
"${pkgname}.service")
|
||||||
|
sha256sums=('625224ef27ca9674428f9e2021d3968e716465dad7961765c65bbcd00f64720e'
|
||||||
|
'609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d')
|
||||||
|
backup=("etc/${pkgname}.toml")
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${_pkgname}-${pkgver}"
|
||||||
|
cargo build --release --features grpcio/openssl
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${_pkgname}-${pkgver}"
|
||||||
|
|
||||||
|
# Installing manually
|
||||||
|
install -Dm 755 target/release/syncstorage "${pkgdir}"/usr/bin/"${pkgname}"
|
||||||
|
install -Dm 644 config/local.example.toml "${pkgdir}"/etc/"${pkgname}".toml
|
||||||
|
install -Dm 644 "${srcdir}/${pkgname}".service "${pkgdir}"/usr/lib/systemd/system/"${pkgname}".service
|
||||||
|
}
|
11
firefox-syncstorage.install
Normal file
11
firefox-syncstorage.install
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
post_install() {
|
||||||
|
getent group syncstorage &>/dev/null || groupadd -r syncstorage >/dev/null
|
||||||
|
getent passwd syncstorage &>/dev/null || useradd -r -s /usr/bin/false \
|
||||||
|
-g syncstorage -G syncstorage syncstorage >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
pre_remove() {
|
||||||
|
getent passwd syncstorage &>/dev/null && userdel syncstorage >/dev/null
|
||||||
|
getent group syncstorage &>/dev/null && groupdel syncstorage >/dev/null
|
||||||
|
true
|
||||||
|
}
|
24
firefox-syncstorage.service
Normal file
24
firefox-syncstorage.service
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Actix web server running Mozilla Firefox Sync Storage
|
||||||
|
Wants=mysql.service
|
||||||
|
After=network.target mysql.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/firefox-syncstorage --config=/etc/firefox-syncstorage.toml
|
||||||
|
Restart=on-abort
|
||||||
|
|
||||||
|
User=syncstorage
|
||||||
|
Group=syncstorage
|
||||||
|
UMask=007
|
||||||
|
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
ProtectSystem=strict
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateTmp=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in a new issue