summaryrefslogtreecommitdiff
path: root/mandos
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-10-13 22:23:54 +0200
committerErich Eckner <git@eckner.net>2024-11-09 17:34:40 +0100
commit62e14c36a804f90e50db28d150e5cea1de2f52c4 (patch)
treeb057503669ba96cccf6179f3205c9892c0275b99 /mandos
parent0cd3899055a710b639bbea99489c6964c7a7f668 (diff)
downloadarchlinuxewe-62e14c36a804f90e50db28d150e5cea1de2f52c4.tar.xz
mandos: aur originalmandos
Diffstat (limited to 'mandos')
-rw-r--r--mandos/PKGBUILD126
-rw-r--r--mandos/fix_makefile.patch20
-rw-r--r--mandos/mandos.install35
-rw-r--r--mandos/series1
4 files changed, 123 insertions, 59 deletions
diff --git a/mandos/PKGBUILD b/mandos/PKGBUILD
index 927c770b2..21c8b61c6 100644
--- a/mandos/PKGBUILD
+++ b/mandos/PKGBUILD
@@ -1,70 +1,78 @@
-# Maintainer: Erich Eckner <arch at eckner dot net>
-arch=('x86_64')
-pkgbase='mandos'
-pkgname=('mandos-server' 'mandos-client-nokey')
-pkgdesc='system for allowing servers with encrypted root file systems to reboot unattended and/or remotely'
-pkgver='1.8.17'
-pkgrel=2
-url='https://www.recompile.se/mandos'
-license=('GPL')
-
-source=("https://ftp.recompile.se/pub/${pkgbase}/${pkgbase}_${pkgver}.orig.tar.gz"
- "https://ftp.recompile.se/pub/${pkgbase}/${pkgbase}_${pkgver}.orig.tar.gz.asc"
- Makefile.patch)
-
-sha512sums=('0059593ab6b92b5178bbbf0be5d6852ec93393ed39032b05bc54c20c698a9e000c1db6c5069fad40f4d173f5b9d397503ca0077446ef460571138fac0f33f5ea'
- 'SKIP'
- '6561dfcd1c7ecc593b5d387796b01507fea7c1eb737196b880ac90c3ee561d4c7a803e2b21dc16d4c617ae116a7817465d99fa466398f53e4d7508ef8354110f')
-
-validpgpkeys=('153A37F10BBA0435987F2C4A72232973CA34C2C4')
-
-depends=(avahi)
-makedepends=(docbook-xsl libnl man-db)
+# Maintainer: C. Dominik Bódi <dominik.bodi@dominikbodi.de>
+pkgname=mandos-server
+_srcname=mandos
+pkgver=1.8.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
+ quilt)
+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://httpredir.debian.org/debian/pool/main/m/mandos/mandos_$pkgver.orig.tar.gz"
+ 'series'
+ 'fix_makefile.patch')
+sha256sums=('9bec9f41b429fe9f554092719127b710a379003641d17aeb01189eb51dcf3deb'
+ 'd5d2d190799efdc4ecba1221a405983a3e770b085f055c1c156199436836dc47'
+ '26ede8999354df4a1697e697d317c2f9e90c532ca849888d544c1905847ef1e5')
prepare() {
- cd "$srcdir/$pkgbase-$pkgver"
- patch -p1 -i "$srcdir/Makefile.patch"
- sed -i '
- /docbook\.xsl/ s@/stylesheet/nwalsh/@/'"$(
- ls /usr/share/xml/docbook/ \
- | grep -wF xsl-stylesheets \
- | grep -vwF nons \
- | sort -V \
- | tail -n1
- )"'/@
- ' Makefile
+ mkdir -p "$_srcname-$pkgver/patches"
+ cp series "$_srcname-$pkgver/patches/"
+ cp fix_makefile.patch "$_srcname-$pkgver/patches/"
+ cd "$_srcname-$pkgver"
+ quilt push -a
}
build() {
- cd "$srcdir/$pkgbase-$pkgver"
- make all doc
- find . -type f \( -name '*.8' -o -name '*.8mandos' -o -name '*.5' \) -exec sed -i 's@^\s\+@@' {} +
+ cd "$_srcname-$pkgver"
+ make doc
+ make
}
-_package() {
- cd "$srcdir/$pkgbase-$pkgver"
- make install-$1 DESTDIR="$pkgdir" BINDIR="$pkgdir/usr/bin"
+check() {
+ cd "$_srcname-$pkgver"
+ make -k check
}
-package_mandos-server() {
- arch=(any)
- _pinned_dependencies=(
- )
- _package server
-}
+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
-package_mandos-client-nokey() {
- _pinned_dependencies=(
- 'gcc-libs=14.2.1+r134+gab884fffe3fc'
- 'glibc>=2.38'
- 'gnutls=3.8.7'
- 'libavahi-common.so=3'
- 'libavahi-core.so=7'
- 'libglib-2.0.so=0'
- 'libgpgme.so=11'
- 'libnl-3.so=200'
- 'libnl-route-3.so=200'
- )
- depends+=("${_pinned_dependencies[@]}")
- _package client-nokey
}
diff --git a/mandos/fix_makefile.patch b/mandos/fix_makefile.patch
new file mode 100644
index 000000000..e1d147455
--- /dev/null
+++ b/mandos/fix_makefile.patch
@@ -0,0 +1,20 @@
+--- a/Makefile
++++ b/Makefile
+@@ -85,7 +85,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.79.2/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 \
+@@ -99,7 +99,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.79.2/manpages/docbook.xsl \
+ $<; $(HTMLPOST) $@)
+ # Fix citerefentry links
+ HTMLPOST=$(SED) --in-place \
diff --git a/mandos/mandos.install b/mandos/mandos.install
new file mode 100644
index 000000000..fa0726aae
--- /dev/null
+++ b/mandos/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
+}
diff --git a/mandos/series b/mandos/series
new file mode 100644
index 000000000..1d3db58a5
--- /dev/null
+++ b/mandos/series
@@ -0,0 +1 @@
+fix_makefile.patch