summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2021-04-11 22:42:55 +0200
committerAlphaJack2021-04-11 22:42:55 +0200
commit1fe99ef2e048628dac8e1dee3659591cfe9bcf29 (patch)
treeb5c5207e62b0c948d721cbea3bfb3ee20fe66601
parent5854b72c4a799d5da88c1d8cf5bef48d312a1e4e (diff)
downloadaur-1fe99ef2e048628dac8e1dee3659591cfe9bcf29.tar.gz
Added isso user and home directory, restricted permission on configuration file
-rw-r--r--.SRCINFO37
-rw-r--r--PKGBUILD89
-rw-r--r--isso.install6
-rw-r--r--isso.service7
-rw-r--r--isso.sysusers1
-rw-r--r--isso.tmpfiles3
6 files changed, 72 insertions, 71 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4cb7125528ea..3574ab9903a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,37 +1,36 @@
pkgbase = isso-git
- pkgdesc = A commenting python server similar to Disqus
- pkgver = 0.12.2
- pkgrel = 5
+ pkgdesc = Lightweight commenting server written in Python and JavaScript
+ pkgver = 0.12.5.r9.ga7c1069
+ pkgrel = 1
url = http://posativ.org/isso/
- install = isso.install
arch = any
license = MIT
- makedepends = git
- makedepends = python
- makedepends = bower
+ makedepends = python-libsass
+ makedepends = python-setuptools
makedepends = python-sphinx
- makedepends = nodejs-requirejs
+ makedepends = python-wheel
depends = python-bleach
- depends = python-jinja
- depends = python-werkzeug
+ depends = python-cffi
+ depends = python-flask-caching
+ depends = python-gevent
depends = python-html5lib
- depends = python-misaka
depends = python-itsdangerous
+ depends = python-jinja
+ depends = python-misaka
depends = python-six
- depends = python-cffi
+ depends = python-werkzeug
depends = sqlite
- depends = python-setuptools
- depends = python-flask-caching
provides = isso
conflicts = isso
backup = etc/isso.conf
- source = git+https://github.com/posativ/isso.git
- source = https://raw.githubusercontent.com/posativ/isso/master/LICENSE
source = isso.service
- validpgpkeys = 7757B21C0C6E5AE4BC6F6462FD1BA15E0E87FE5C
+ source = isso.sysusers
+ source = isso.tmpfiles
+ source = git+https://github.com/posativ/isso
+ sha256sums = 680a475e5df18877b702e6b0309bea12aa5a1fc3d2bf1d3d269e5d2cfac5989e
+ sha256sums = 39345b5ef89efef588cd55ef0e78151043eb09a9c151b8e91a320318abccbdf6
+ sha256sums = f7ea4de770ea5c2c3cf7ccea51c2078cbcd5329ac30b72a88f7d0d2cd5ea7c8e
sha256sums = SKIP
- sha256sums = d909d060d71c4d9ce92102fa68aa53c963db9b4b6ca315fa0817eafb07651fe2
- sha256sums = 5e625e14f757101dcfa9cdacb18c191d5f6f0324a2c68dc8847cb77e343b7eef
pkgname = isso-git
diff --git a/PKGBUILD b/PKGBUILD
index 03e19126f3da..265d7eca604d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,57 @@
-# Maintainer: RunasSudo <aur at yingtongli dot me>
+# Maintainer: AlphaJack <alphajack at tuta dot io>
+# Contributor: RunasSudo <aur at yingtongli dot me>
# Contributor: Peter Cai <peter at typeblog dot net>
# Contributor: yhaupenthal <y dot h plus aur at posteo dot de>
# Contributor: Brice Waegeneire <brice dot wge at gmail dot com>
# Contributor: Reventlov <contact+aur@volcanis.me>
-pkgname=isso-git
-pkgver=0.12.2
-pkgrel=5
-pkgdesc="A commenting python server similar to Disqus"
-arch=('any')
-url="http://posativ.org/isso/"
-license=('MIT')
-depends=('python-bleach' 'python-jinja' 'python-werkzeug' 'python-html5lib' 'python-misaka' 'python-itsdangerous' 'python-six' 'python-cffi' 'sqlite' 'python-setuptools' 'python-flask-caching')
-conflicts=('isso')
-provides=('isso')
-makedepends=('git' 'python' 'bower' 'python-sphinx' 'nodejs-requirejs')
-backup=('etc/isso.conf')
-source=("git+https://github.com/posativ/isso.git"
- "https://raw.githubusercontent.com/posativ/isso/master/LICENSE"
- "isso.service")
-install=isso.install
-sha256sums=('SKIP'
- 'd909d060d71c4d9ce92102fa68aa53c963db9b4b6ca315fa0817eafb07651fe2'
- '5e625e14f757101dcfa9cdacb18c191d5f6f0324a2c68dc8847cb77e343b7eef')
-validpgpkeys=("7757B21C0C6E5AE4BC6F6462FD1BA15E0E87FE5C")
-build() {
- cd "${srcdir}/isso"
- npm install node-sass
- export PATH="${srcdir}/isso/node_modules/node-sass/bin":$PATH
+pkgname="isso-git"
+pkgver=0.12.5.r9.ga7c1069
+pkgrel=1
+pkgdesc="Lightweight commenting server written in Python and JavaScript"
+url="http://posativ.org/isso/"
+license=("MIT")
+arch=("any")
+provides=("isso")
+conflicts=("isso")
+depends=("python-bleach" "python-cffi" "python-flask-caching" "python-gevent" "python-html5lib" "python-itsdangerous" "python-jinja" "python-misaka" "python-six" "python-werkzeug" "sqlite")
+makedepends=("python-libsass" "python-setuptools" "python-sphinx" "python-wheel")
+source=("isso.service"
+ "isso.sysusers"
+ "isso.tmpfiles"
+ "git+https://github.com/posativ/isso")
+sha256sums=("680a475e5df18877b702e6b0309bea12aa5a1fc3d2bf1d3d269e5d2cfac5989e"
+ "39345b5ef89efef588cd55ef0e78151043eb09a9c151b8e91a320318abccbdf6"
+ "f7ea4de770ea5c2c3cf7ccea51c2078cbcd5329ac30b72a88f7d0d2cd5ea7c8e"
+ "SKIP")
+backup=("etc/isso.conf")
- make init all
- python setup.py sdist
+pkgver(){
+ cd "isso"
+ git describe --long --tags | sed "s/\([^-]*-g\)/r\1/;s/-/./g"
}
-package() {
- cd "${srcdir}"
- # License
- install -D -m 644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/isso/LICENSE"
-
- msg "Starting build..."
- cd "${srcdir}/isso"
- python setup.py install --root="${pkgdir}/" --optimize=1
+prepare(){
+ sed -i "isso/share/isso.conf" \
+ -e "s|dbpath = /tmp/comments.db|dbpath = /var/lib/isso/comments.db|" \
+ -e "s|http:///localhost:1234/|http://localhost:1234/|"
+}
- # ... systemd
- install -D -m 644 "${srcdir}/isso.service" "${pkgdir}/usr/lib/systemd/system/isso.service"
- # ... common config
- install -D -m 644 "${srcdir}/isso/share/isso.conf" "${pkgdir}/etc/isso.conf"
- # ... man pages
- install -D -m 644 "${srcdir}/isso/man/man1/isso.1" "${pkgdir}/usr/share/man/man1/isso.1"
- install -D -m 644 "${srcdir}/isso/man/man5/isso.conf.5" "${pkgdir}/usr/share/man/man5/isso.conf.5"
+build(){
+ cd "isso"
+ npm install node-sass
+ python setup.py build
+ # build static files
+ make init all
}
-# vim:set ts=2 sw=2 et:
+package(){
+ install -D -m 644 "isso.service" "$pkgdir/usr/lib/systemd/system/isso.service"
+ install -D -m 644 "isso.sysusers" "$pkgdir/usr/lib/sysusers.d/isso.conf"
+ install -D -m 644 "isso.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/isso.conf"
+ cd "isso"
+ install -D -m 640 "share/isso.conf" "$pkgdir/etc/isso.conf"
+ install -D -m 644 "man/man1/isso.1" "$pkgdir/usr/share/man/man1/isso.1"
+ install -D -m 644 "man/man5/isso.conf.5" "$pkgdir/usr/share/man/man5/isso.conf.5"
+ python setup.py install --root="$pkgdir" --optimize=1
+}
diff --git a/isso.install b/isso.install
deleted file mode 100644
index 386b5b1ee07f..000000000000
--- a/isso.install
+++ /dev/null
@@ -1,6 +0,0 @@
-post_install() {
- echo "By default the database is located in the temporary location
-/tmp/comments.db and the default interface is http://localhost:8080
-
-To change this, edit /etc/isso.conf"
-}
diff --git a/isso.service b/isso.service
index 9ba3a06f2714..16dbc449177c 100644
--- a/isso.service
+++ b/isso.service
@@ -1,10 +1,11 @@
[Unit]
-Description=Isso Comment Server
+Description=Isso Commenting Server
After=network.target network-online.target nss-lookup.target
[Service]
-Environment="ISSO_SETTINGS=/etc/isso.conf"
-ExecStart=/usr/bin/isso run
+User=isso
+Group=isso
+ExecStart=/usr/bin/isso -c /etc/isso.conf run
[Install]
WantedBy=multi-user.target
diff --git a/isso.sysusers b/isso.sysusers
new file mode 100644
index 000000000000..0270b715d779
--- /dev/null
+++ b/isso.sysusers
@@ -0,0 +1 @@
+u isso - "Isso commenting server user" /var/lib/isso
diff --git a/isso.tmpfiles b/isso.tmpfiles
new file mode 100644
index 000000000000..6eb2b41781a6
--- /dev/null
+++ b/isso.tmpfiles
@@ -0,0 +1,3 @@
+f /etc/isso.conf 0640 root isso
+d /var/lib/isso 0700 isso isso
+Z /var/lib/isso - isso isso