diff options
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | fix_makefile.patch | 20 | ||||
-rw-r--r-- | mandos.install | 35 |
4 files changed, 157 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..757335689d76 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = mandos-server + pkgdesc = unlock LUKS encrypted drives remotely - server component + pkgver = 1.6.9 + pkgrel = 1 + url = https://wiki.recompile.se/wiki/Mandos + install = mandos.install + arch = any + license = GPL3 + makedepends = docbook-xml + makedepends = docbook-xsl + makedepends = pkg-config + depends = avahi + depends = gnupg + depends = python2-gnutls + depends = python-gobject2 + depends = python2-gobject2 + depends = python-dbus + depends = python2-dbus + depends = python-urwid + depends = python2-urwid + depends = openssh + optdepends = fping: host uptime checking - legacy method + backup = etc/mandos/mandos.conf + backup = etc/mandos/clients.conf + backup = etc/dbus-1/system.d/mandos.conf + source = http://ftp.recompile.se/pub/mandos/mandos_1.6.9.orig.tar.gz + source = fix_makefile.patch + sha256sums = bf04b7786c5c29409ca48454de25aa3e70f2bbd3428a393d3424069f89e3a40e + sha256sums = 73af9f42039d4b843f13ca3985ec5ab4809ecd092c2f229db57e36deb671b54d + +pkgname = mandos-server + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..41182b66d587 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: C. Dominik Bódi <dominik.bodi@dominikbodi.de> +pkgname=mandos-server +_srcname=mandos +pkgver=1.6.9 +pkgrel=1 +pkgdesc="unlock LUKS encrypted drives remotely - server component" +arch=(any) +url="https://wiki.recompile.se/wiki/Mandos" +license=('GPL3') +depends=(avahi + gnupg + python2-gnutls + python-gobject2 + python2-gobject2 + python-dbus + python2-dbus + python-urwid + python2-urwid + openssh) +makedepends=(docbook-xml + docbook-xsl + pkg-config) +optdepends=('fping: host uptime checking - legacy method') +backup=('etc/mandos/mandos.conf' + 'etc/mandos/clients.conf' + 'etc/dbus-1/system.d/mandos.conf') +install=mandos.install +source=("http://ftp.recompile.se/pub/mandos/mandos_1.6.9.orig.tar.gz" + 'fix_makefile.patch') +sha256sums=('bf04b7786c5c29409ca48454de25aa3e70f2bbd3428a393d3424069f89e3a40e' + '73af9f42039d4b843f13ca3985ec5ab4809ecd092c2f229db57e36deb671b54d') +prepare() { + patch -p2 -i fix_makefile.patch +} + +build() { + cd "$_srcname-$pkgver" + make doc + make +} + +check() { + cd "$_srcname-$pkgver" + make -k check +} + +package() { + cd "$_srcname-$pkgver" + install --directory $pkgdir/var/lib/mandos + install -D --mode=u=rwx,go=rx mandos $pkgdir/usr/bin/mandos + install -D --mode=u=rwx,go=rx mandos-ctl $pkgdir/usr/bin/mandos-ctl + install -D --mode=u=rwx,go=rx mandos-monitor $pkgdir/usr/bin/mandos-monitor + install -D --mode=u=rw,go=r mandos.conf $pkgdir/etc/mandos/mandos.conf + install -D --mode=u=rw clients.conf $pkgdir/etc/mandos/clients.conf + install -D --mode=u=rw,go=r dbus-mandos.conf $pkgdir/etc/dbus-1/system.d/mandos.conf + install -D --mode=u=rw,go=r mandos.service $pkgdir/usr/lib/systemd/system/mandos.service + install -D mandos.8 $pkgdir/usr/share/man/man8/mandos.8 + install -D mandos-monitor.8 $pkgdir/usr/share/man/man8/mandos-monitor.8 + install -D mandos-ctl.8 $pkgdir/usr/share/man/man8/mandos-ctl.8 + install -D mandos.conf.5 $pkgdir/usr/share/man/man5/mandos.conf.5 + install -D mandos-clients.conf.5 $pkgdir/usr/share/man/man5/mandos-clients.conf.5 + install -D intro.8mandos $pkgdir/usr/share/man/man8/intro.8mandos + gzip --best $pkgdir/usr/share/man/man8/mandos.8 + gzip --best $pkgdir/usr/share/man/man8/mandos-monitor.8 + gzip --best $pkgdir/usr/share/man/man8/mandos-ctl.8 + gzip --best $pkgdir/usr/share/man/man5/mandos.conf.5 + gzip --best $pkgdir/usr/share/man/man5/mandos-clients.conf.5 + gzip --best $pkgdir/usr/share/man/man8/intro.8mandos + +} diff --git a/fix_makefile.patch b/fix_makefile.patch new file mode 100644 index 000000000000..85477cd8b77c --- /dev/null +++ b/fix_makefile.patch @@ -0,0 +1,20 @@ +--- a/src/mandos-1.6.9/Makefile ++++ b/src/mandos-1.6.9/Makefile +@@ -83,7 +83,7 @@ DOCBOOKTOMAN=$(strip cd $(dir $<); xsltp + --param make.single.year.ranges 1 \ + --param man.output.quietly 1 \ + --param man.authors.section.enabled 0 \ +- /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \ ++ /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl \ + $(notdir $<); \ + if locale --all 2>/dev/null | grep --regexp='^en_US\.utf8$$' \ + && type man 2>/dev/null; then LANG=en_US.UTF-8 MANWIDTH=80 \ +@@ -97,7 +97,7 @@ DOCBOOKTOHTML=$(strip xsltproc --nonet - + --param man.authors.section.enabled 0 \ + --param citerefentry.link 1 \ + --output $@ \ +- /usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl \ ++ /usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl \ + $<; $(HTMLPOST) $@) + # Fix citerefentry links + HTMLPOST=$(SED) --in-place \ diff --git a/mandos.install b/mandos.install new file mode 100644 index 000000000000..fa0726aaee4c --- /dev/null +++ b/mandos.install @@ -0,0 +1,35 @@ +post_install() { + if ! getent group _mandos > /dev/null; then + groupadd --system _mandos + fi + if ! getent passwd _mandos > /dev/null; then + useradd -c "Mandos Server" --system -d /var/lib/mandos -s /usr/bin/nologin -g _mandos _mandos + passwd -l _mandos > /dev/null + fi + mkdir -p /var/lib/mandos + chown -R _mandos:_mandos /var/lib/mandos > /dev/null + + # reload dbus, otherwise the mandos server will not start up properly + systemctl reload-or-restart dbus + + echo 'In /etc/avahi/avahi-daemon.conf , enable IPv6 by changing the option' + echo 'use-ipv6=yes' + echo 'Then restart the avahi-daemon service: systemctl restart avahi-daemon' + echo 'Clients will not be able to connect to the mandos server otherwise.' + echo 'After adding client configs to /etc/mandos/clients.conf' + echo 'start and enable the Mandos Server with' + echo 'systemctl start mandos ; systemctl enable mandos' +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd _mandos >/dev/null; then + userdel _mandos + fi + if getent group _mandos >/dev/null; then + groupdel _mandos + fi +} |