From 65f387ee857719deb8eac44e6d7740a63035d5f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Fri, 23 Sep 2022 22:36:18 +0200 Subject: [PATCH 1/3] Initial commit with version 0.12.2 --- .SRCINFO | 28 ++++++++++++++++++++++++++++ PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++ firefox-syncstorage.install | 11 +++++++++++ firefox-syncstorage.service | 24 ++++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 firefox-syncstorage.install create mode 100644 firefox-syncstorage.service diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..00daeb8 --- /dev/null +++ b/.SRCINFO @@ -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 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..65682bc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Manuel Hüsers +# Contributor: jewelux + +# 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 +} diff --git a/firefox-syncstorage.install b/firefox-syncstorage.install new file mode 100644 index 0000000..4475324 --- /dev/null +++ b/firefox-syncstorage.install @@ -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 +} \ No newline at end of file diff --git a/firefox-syncstorage.service b/firefox-syncstorage.service new file mode 100644 index 0000000..444624a --- /dev/null +++ b/firefox-syncstorage.service @@ -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 \ No newline at end of file From 1964c5cea8c76a0a4a0c50eea7a991e12d47ea13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Sat, 24 Sep 2022 21:38:02 +0200 Subject: [PATCH 2/3] Version 0.12.3 --- .SRCINFO | 6 +++--- PKGBUILD | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 00daeb8..711a5eb 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = firefox-syncstorage pkgdesc = Sync storage server with built-in token server for running a self-hosted firefox sync server - pkgver = 0.12.2 + pkgver = 0.12.3 pkgrel = 1 url = https://github.com/mozilla-services/syncstorage-rs install = firefox-syncstorage.install @@ -20,9 +20,9 @@ pkgbase = firefox-syncstorage 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 = https://github.com/mozilla-services/syncstorage-rs/archive/0.12.3.tar.gz source = firefox-syncstorage.service - sha256sums = 625224ef27ca9674428f9e2021d3968e716465dad7961765c65bbcd00f64720e + sha256sums = aa69a5d1419e13ba7fe5f9841010ac4799bd431c2fa2c2327471360a2c6912b4 sha256sums = 609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d pkgname = firefox-syncstorage diff --git a/PKGBUILD b/PKGBUILD index 65682bc..0d49751 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ pkgname=firefox-syncstorage _pkgname=syncstorage-rs -pkgver=0.12.2 +pkgver=0.12.3 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') @@ -17,7 +17,7 @@ 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' +sha256sums=('aa69a5d1419e13ba7fe5f9841010ac4799bd431c2fa2c2327471360a2c6912b4' '609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d') backup=("etc/${pkgname}.toml") From 738c7f7c726b198097ec03bb940bd87f45894afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20H=C3=BCsers?= Date: Wed, 12 Oct 2022 20:44:16 +0200 Subject: [PATCH 3/3] Version 0.12.4 --- .SRCINFO | 6 +++--- PKGBUILD | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 711a5eb..fbd1daf 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,6 +1,6 @@ pkgbase = firefox-syncstorage pkgdesc = Sync storage server with built-in token server for running a self-hosted firefox sync server - pkgver = 0.12.3 + pkgver = 0.12.4 pkgrel = 1 url = https://github.com/mozilla-services/syncstorage-rs install = firefox-syncstorage.install @@ -20,9 +20,9 @@ pkgbase = firefox-syncstorage 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.3.tar.gz + source = https://github.com/mozilla-services/syncstorage-rs/archive/0.12.4.tar.gz source = firefox-syncstorage.service - sha256sums = aa69a5d1419e13ba7fe5f9841010ac4799bd431c2fa2c2327471360a2c6912b4 + sha256sums = 05817b02e74fb4f45a10b1b2583bf353616624a1c776cf72c185f9e89189590b sha256sums = 609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d pkgname = firefox-syncstorage diff --git a/PKGBUILD b/PKGBUILD index 0d49751..e497a4e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,7 +5,7 @@ pkgname=firefox-syncstorage _pkgname=syncstorage-rs -pkgver=0.12.3 +pkgver=0.12.4 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') @@ -17,7 +17,7 @@ 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=('aa69a5d1419e13ba7fe5f9841010ac4799bd431c2fa2c2327471360a2c6912b4' +sha256sums=('05817b02e74fb4f45a10b1b2583bf353616624a1c776cf72c185f9e89189590b' '609e057cd835ea54b06b32b98e210cd946255f652e7754c9160fd7c94379a83d') backup=("etc/${pkgname}.toml")