Commit b89c5b3a authored by Samir's avatar Samir
Browse files

add systemd units to krb5

parent 34eeaf9b
......@@ -6,7 +6,7 @@
pkgname=krb5
pkgver=1.9.3
pkgrel=1
pkgrel=2
pkgdesc="The Kerberos network authentication system"
arch=('i686' 'x86_64')
url="http://web.mit.edu/kerberos/"
......@@ -19,28 +19,28 @@ conflicts=('heimdal')
backup=('etc/krb5.conf' 'var/lib/krb5kdc/kdc.conf')
source=(http://web.mit.edu/kerberos/dist/${pkgname}/1.9/${pkgname}-${pkgver}-signed.tar
krb5-kadmind
krb5-kdc)
#krb5-1.9.1-config-script.patch)
krb5-kadmind.service
krb5-kdc
krb5-kdc.service
krb5-kpropd
krb5-kpropd.service
krb5-kpropd@.service
krb5-kpropd.socket)
sha1sums=('01a14c0cb59ae558451772d6700ea420ae8b0ab0'
'2aa229369079ed1bbb201a1ef72c47bf143f4dbe'
'77d2312ecd8bf12a6e72cc8fd871a8ac93b23393')
#'8d1ec8bdb39fec230caace112d1a41ad792f7d97')
'a2a01e7077d9e89cda3457ea0e216debb3dc353c'
'77d2312ecd8bf12a6e72cc8fd871a8ac93b23393'
'f5e4fa073e11b0fcb4e3098a5d58a4f791ec841e'
'7f402078fa65bb9ff1beb6cbbbb017450df78560'
'614401dd4ac18e310153240bb26eb32ff1e8cf5b'
'023a8164f8ee7066ac814486a68bc605e79f6101'
'f3677d30dbbd7106c581379c2c6ebb1bf7738912')
options=('!emptydirs')
build() {
tar zxvf ${pkgname}-${pkgver}.tar.gz
cd "${srcdir}/${pkgname}-${pkgver}/src"
# - Make krb5-config suppress CFLAGS output when called with --libs
# cf https://bugzilla.redhat.com/show_bug.cgi?id=544391
# http://pkgs.fedoraproject.org/gitweb/?p=krb5.git;a=blob;f=krb5-1.7-buildconf.patch
#
# - Omit extra libraries because their interfaces are not exposed to applications
# by libkrb5, unless do_deps is set to 1, which indicates that the caller
# wants the whole list.
# cf http://pkgs.fedoraproject.org/gitweb/?p=krb5.git;a=blob;f=krb5-1.7-nodeplibs.patch
#patch -Np2 -i ${srcdir}/krb5-1.9.1-config-script.patch
export CFLAGS+=" -fPIC -fno-strict-aliasing -fstack-protector-all"
export CPPFLAGS+=" -I/usr/include/et"
./configure --prefix=/usr \
......@@ -69,8 +69,12 @@ package() {
install -pm 644 config-files/krb5.conf "${pkgdir}"/etc/krb5.conf
install -dm 755 "${pkgdir}"/etc/rc.d
install -m 755 ../../krb5-kdc "${pkgdir}"/etc/rc.d
install -m 755 ../../krb5-kadmind "${pkgdir}"/etc/rc.d
install -m 755 ../../krb5-{kdc,kpropd,kadmind} "${pkgdir}"/etc/rc.d
install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/NOTICE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
\ No newline at end of file
# install systemd units
install -dm 755 "${pkgdir}"/usr/lib/systemd/system
install -m 644 ../../krb5-{kadmind.service,kdc.service,kpropd.service,kpropd@.service,kpropd.socket} \
"${pkgdir}"/usr/lib/systemd/system
}
[Unit]
Description=Kerberos 5 administration server
[Service]
ExecStart=/usr/sbin/kadmind -nofork
[Install]
WantedBy=multi-user.target
[Unit]
Description=Kerberos 5 KDC
[Service]
ExecStart=/usr/sbin/krb5kdc -n
Restart=always
[Install]
WantedBy=multi-user.target
#!/bin/bash
# general config
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/sbin/kpropd`
case "$1" in
start)
stat_busy "Starting Kerberos Database Propagation Daemon"
if [ -z "$PID" ]; then
/usr/sbin/kpropd -S
fi
if [ ! -z "$PID" -o $? -gt 0 ]; then
stat_fail
else
add_daemon kpropd
stat_done
fi
;;
stop)
stat_busy "Stopping Kerberos Database Propagation Daemon"
[ ! -z "$PID" ] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon kpropd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
;;
esac
exit 0
[Unit]
Description=Kerberos 5 propagation server
[Service]
ExecStart=/usr/sbin/kpropd -S
[Install]
WantedBy=multi-user.target
[Unit]
Description=Kerberos 5 propagation server
[Socket]
ListenStream=754
Accept=yes
[Install]
WantedBy=sockets.target
[Unit]
Description=Kerberos 5 propagation server
Conflicts=krb5-kpropd.service
[Service]
ExecStart=/usr/sbin/kpropd
StandardInput=socket
StandardError=syslog
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment