From af62b7ae27ca26c9756ab2fb31cf9664e4ce1eaa Mon Sep 17 00:00:00 2001 From: Alexandr Savca Date: Tue, 19 Nov 2024 08:51:28 +0200 Subject: [PATCH] krb5: improve RC scripts, relbump --- krb5/.footprint | 3 +++ krb5/.md5sum | 5 ++++- krb5/Pkgfile | 16 ++++++++++------ krb5/rc.kadmind | 33 +++++++++++++++++++++++++++++++++ krb5/rc.kpropd | 33 +++++++++++++++++++++++++++++++++ krb5/rc.krb5 | 35 ++++++++++------------------------- krb5/rc.krb5kdc | 33 +++++++++++++++++++++++++++++++++ 7 files changed, 126 insertions(+), 32 deletions(-) create mode 100644 krb5/rc.kadmind create mode 100644 krb5/rc.kpropd create mode 100644 krb5/rc.krb5kdc diff --git a/krb5/.footprint b/krb5/.footprint index ab1fbd7..e1448b8 100644 --- a/krb5/.footprint +++ b/krb5/.footprint @@ -2,7 +2,10 @@ drwxr-xr-x root/root bin/ -rwsr-xr-x root/root bin/ksu drwxr-xr-x root/root etc/ drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/kadmind +-rwxr-xr-x root/root etc/rc.d/kpropd -rwxr-xr-x root/root etc/rc.d/krb5 +-rwxr-xr-x root/root etc/rc.d/krb5kdc drwxr-xr-x root/root lib/ lrwxrwxrwx root/root lib/libk5crypto.so.3 -> libk5crypto.so.3.1 -rwxr-xr-x root/root lib/libk5crypto.so.3.1 diff --git a/krb5/.md5sum b/krb5/.md5sum index f557f08..d837035 100644 --- a/krb5/.md5sum +++ b/krb5/.md5sum @@ -1,2 +1,5 @@ beb34d1dfc72ba0571ce72bed03e06eb krb5-1.21.3.tar.gz -b8ef6658d4d1057ed17081a29eb1e706 rc.krb5 +6dd2e9f47e537fdbb5966a307a175a92 rc.kadmind +f6b968dee400c2e819ea8a03ed653503 rc.kpropd +c0955a05e275b12e76fe5c31c8378a10 rc.krb5 +5cc66fb80a5e95ea94273eb0459bae42 rc.krb5kdc diff --git a/krb5/Pkgfile b/krb5/Pkgfile index 747d928..e178f2a 100644 --- a/krb5/Pkgfile +++ b/krb5/Pkgfile @@ -5,9 +5,12 @@ name=krb5 version=1.21.3 -release=1 +release=2 source="https://kerberos.org/dist/krb5/${version%.*}/krb5-$version.tar.gz - rc.krb5" + rc.kadmind + rc.kpropd + rc.krb5 + rc.krb5kdc" build() { cd $name-$version/src @@ -24,7 +27,6 @@ build() { --enable-shared \ --disable-rpath \ --disable-nls \ - --without-tcl \ --with-system-et \ --with-system-ss \ --without-system-verto \ @@ -33,7 +35,7 @@ build() { make V=1 make DESTDIR=$PKG install - # move essential libs and the ksu binary to /lib resp. /bin + # move essential libs and the ksu binary from /usr to / mkdir -p $PKG/bin $PKG/lib mv $PKG/usr/bin/ksu $PKG/bin mv $PKG/usr/lib/libkrb5.so.3* $PKG/lib @@ -46,8 +48,10 @@ build() { install -m 0644 -Dt $PKG/usr/share/aclocal util/ac_check_krb5.m4 - # service - install -m 0755 -D $SRC/rc.krb5 $PKG/etc/rc.d/krb5 + # services + for f in kadmind kpropd krb5 krb5kdc; do + install -m 0755 -D $SRC/rc.$f $PKG/etc/rc.d/$f + done # cleanup rm -r $PKG/usr/share/examples $PKG/usr/share/man/cat* $PKG/run diff --git a/krb5/rc.kadmind b/krb5/rc.kadmind new file mode 100644 index 0000000..b3ca67a --- /dev/null +++ b/krb5/rc.kadmind @@ -0,0 +1,33 @@ +#!/bin/sh +# +# /etc/rc.d/kadmind: start/stop kadmind(8) KADM5 administration server +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/kadmind + +case $1 in +start) + $SSD --start --exec $PROG + ;; +stop) + $SSD --stop --retry 10 --exec $PROG + ;; +restart) + $0 stop + $0 start + ;; +status) + $SSD --status --exec $PROG + case $? in + 0) echo "$PROG is running with pid $(pidof $PROG)" ;; + 1|3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file. diff --git a/krb5/rc.kpropd b/krb5/rc.kpropd new file mode 100644 index 0000000..0512b84 --- /dev/null +++ b/krb5/rc.kpropd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# /etc/rc.d/kpropd: start/stop kpropd(8) Kerberos V5 replica KDC update server +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/kpropd + +case $1 in +start) + $SSD --start --exec $PROG + ;; +stop) + $SSD --stop --retry 10 --exec $PROG + ;; +restart) + $0 stop + $0 start + ;; +status) + $SSD --status --exec $PROG + case $? in + 0) echo "$PROG is running with pid $(pidof $PROG)" ;; + 1|3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file. diff --git a/krb5/rc.krb5 b/krb5/rc.krb5 index 5f47bc5..9040b36 100644 --- a/krb5/rc.krb5 +++ b/krb5/rc.krb5 @@ -1,42 +1,27 @@ #!/bin/sh # -# /etc/rc.d/samba: start/stop krb5 daemons +# /etc/rc.d/krb5: start/stop krb5 daemons # -SSD=/sbin/start-stop-daemon -KRB5KDC=/usr/sbin/krb5kdc -KADMIND=/usr/sbin/kadmind -KPROPD=/usr/sbin/kpropd - -print_status() { - $SSD --status --exec $1 - - case $? in - 0) echo "$1 is running with pid $(pidof $1)" ;; - 1|3) echo "$1 is not running" ;; - 4) echo "Unable to determine the program status" ;; - esac -} - case $1 in start) - $SSD --start --exec $KRB5KDC - $SSD --start --exec $KADMIND - $SSD --start --exec $KPROPD + /etc/rc.d/krb5kdc start + /etc/rc.d/kadmind start + /etc/rc.d/kpropd start ;; stop) - $SSD --stop --retry 10 --exec $KPROPD - $SSD --stop --retry 10 --exec $KADMIND - $SSD --stop --retry 10 --exec $KRB5KDC + /etc/rc.d/krb5kdc stop + /etc/rc.d/kadmind stop + /etc/rc.d/kpropd stop ;; restart) $0 stop $0 start ;; status) - print_status $KRB5KDC - print_status $KADMIND - print_status $KPROPD + /etc/rc.d/krb5kdc restart + /etc/rc.d/kadmind restart + /etc/rc.d/kpropd restart ;; *) echo "usage: $0 [start|stop|restart|status]" diff --git a/krb5/rc.krb5kdc b/krb5/rc.krb5kdc new file mode 100644 index 0000000..5b272b4 --- /dev/null +++ b/krb5/rc.krb5kdc @@ -0,0 +1,33 @@ +#!/bin/sh +# +# /etc/rc.d/krb5kdc: start/stop krb5kdc(8) Kerberos V5 KDC +# + +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/krb5kdc + +case $1 in +start) + $SSD --start --exec $PROG + ;; +stop) + $SSD --stop --retry 10 --exec $PROG + ;; +restart) + $0 stop + $0 start + ;; +status) + $SSD --status --exec $PROG + case $? in + 0) echo "$PROG is running with pid $(pidof $PROG)" ;; + 1|3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; +*) + echo "usage: $0 [start|stop|restart|status]" + ;; +esac + +# End of file.