Hello community,

here is the log from the commit of package dropbear for openSUSE:12.2 checked 
in at 2012-07-09 07:56:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2/dropbear (Old)
 and      /work/SRC/openSUSE:12.2/.dropbear.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dropbear", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:12.2/dropbear/dropbear.changes   2012-06-25 
15:17:57.000000000 +0200
+++ /work/SRC/openSUSE:12.2/.dropbear.new/dropbear.changes      2012-07-09 
07:56:48.000000000 +0200
@@ -1,0 +2,17 @@
+Sat Jun 30 11:49:10 UTC 2012 - [email protected]
+
+- added systemd service files for 12.1 and later
+- cleaned up sysconfig and rcdropbear files
+
+-------------------------------------------------------------------
+Tue Jun 19 12:42:00 UTC 2012 - [email protected]
+
+- added init daemon with key generation option
+- added sysconfig file with default configuration 
+
+-------------------------------------------------------------------
+Fri Jun 15 09:45:36 UTC 2012 - [email protected]
+
+- updated spec file - changed the group
+
+-------------------------------------------------------------------

New:
----
  dropbear-keygen.service
  dropbear.service
  dropbear.sysconfig
  rcdropbear

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dropbear.spec ++++++
--- /var/tmp/diff_new_pack.LmaR7d/_old  2012-07-09 07:56:48.000000000 +0200
+++ /var/tmp/diff_new_pack.LmaR7d/_new  2012-07-09 07:56:48.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# spec file for package 
+# spec file for package dropbear
 #
 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
@@ -15,16 +15,28 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 Name:           dropbear
 Version:        2012.55
 Release:        0
+Summary:        A relatively small SSH 2 server and client
 License:        MIT
+Group:          Productivity/Networking/SSH
 Url:            http://matt.ucc.asn.au/dropbear/dropbear.html
+Source0:        
http://matt.ucc.asn.au/dropbear/releases/%{name}-%{version}.tar.bz2
+Source1:        dropbear.service
+Source2:        dropbear-keygen.service
+Source3:        dropbear.sysconfig
+Source4:        rcdropbear
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  zlib-devel pam-devel
-Group:          System/Daemons
-Summary:        A relatively small SSH 2 server and client
-Source:         
http://matt.ucc.asn.au/dropbear/releases/%{name}-%{version}.tar.bz2
+BuildRequires:  pam-devel
+BuildRequires:  zlib-devel
+Requires(post):        %fillup_prereq %insserv_prereq
+%if 0%{?suse_version} >= 1210
+Requires(post):                systemd
+Requires(preun):       systemd
+Requires(postun):      systemd
+%endif
 
 %description
 Dropbear is a SSH 2 server and client designed to be small enough to be used 
in small memory environments, while still being functional and secure enough 
for general use.
@@ -40,10 +52,51 @@
 
 %install
 make install DESTDIR=%{buildroot}
-install -d -m755 "%{buildroot}%{_mandir}/man8/"
+install -d %{buildroot}%{_sysconfdir}/dropbear
+install -D -m 0644 %{SOURCE3} 
"%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
+install -D -m0755 %{SOURCE4} "%{buildroot}%{_initrddir}/%{name}"
+ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
+%if 0%{?suse_version} >= 1210
+       # systemd unit files
+       install -d %{buildroot}%{_unitdir}
+       install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/dropbear.service
+       install -m 0644 %{SOURCE2} 
%{buildroot}%{_unitdir}/dropbear-keygen.service
+%endif
+install -d "%{buildroot}%{_mandir}/man1/"
+install -m644 dbclient.1 "%{buildroot}%{_mandir}/man1/"
+install -d "%{buildroot}%{_mandir}/man8/"
 install -m644 dropbear.8 "%{buildroot}%{_mandir}/man8/"
 install -m644 dropbearkey.8 "%{buildroot}%{_mandir}/man8/"
 
+%post
+%if 0%{?suse_version} >= 1210
+       if [ $1 -eq 1 ] ; then 
+               # Initial installation 
+               /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+       fi
+%endif
+%{fillup_and_insserv %{name}}
+
+%preun
+%if 0%{?suse_version} >= 1210
+       if [ $1 -eq 0 ] ; then
+               # Package removal, not upgrade
+               /bin/systemctl --no-reload disable dropbear.service > /dev/null 
2>&1 || :
+               /bin/systemctl stop dropbear.service > /dev/null 2>&1 || :
+       fi
+%endif
+%stop_on_removal %{name}
+
+%postun
+%if 0%{?suse_version} >= 1210
+       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+       if [ $1 -ge 1 ] ; then
+               # Package upgrade, not uninstall
+               /bin/systemctl try-restart dropbear.service >/dev/null 2>&1 || :
+       fi
+%endif
+%restart_on_update %{name}
+%insserv_cleanup
 
 %files
 %defattr(-,root,root)
@@ -51,7 +104,16 @@
 %{_bindir}/dropbearconvert
 %{_bindir}/dropbearkey
 %{_sbindir}/dropbear
-%{_mandir}/man8/dropbear*
-
+%{_sbindir}/rcdropbear
+%{_initrddir}/%{name}
+%if 0%{?suse_version} >= 1210
+       %{_unitdir}/dropbear.service
+       %{_unitdir}/dropbear-keygen.service
+%endif
+%dir %{_sysconfdir}/dropbear
+%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+%{_mandir}/man1/dbclient.1.gz
+%{_mandir}/man8/dropbear.8.gz
+%{_mandir}/man8/dropbearkey.8.gz
 
 %changelog

++++++ dropbear-keygen.service ++++++
[Unit]
Description=Dropbear SSH Key Generatior
Before=dropbear.service
ConditionPathExists=!/etc/dropbear/dropbear_rsa_host_key
ConditionPathExists=!/etc/dropbear/dropbear_dss_host_key

[Service]
Type=oneshot
ExecStart=/usr/bin/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
ExecStart=/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
RemainAfterExit=no

++++++ dropbear.service ++++++
[Unit]
Description=Dropbear SSH Server Daemon
Wants=dropbear-keygen.service
After=network.target

[Service]
Type=forking
PIDFile=/run/dropbear.pid
EnvironmentFile=-/etc/sysconfig/dropbear
ExecStart=/usr/sbin/dropbear $OPTIONS

[Install]
WantedBy=multi-user.target
++++++ dropbear.sysconfig ++++++
## Path:           Network/Remote access/Dropbear SSH
## Description:    Dropbear startup parameters

## Type:        string
## Default:     ""
#
# Specifies Dropbear startup parameters
# For example '-p <port>' changes the TCP port that Dropbear listens on
# Check the dropbear manpage for additional options
#
OPTIONS=""

++++++ rcdropbear ++++++
#!/bin/sh
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# Startup script for Dropbear
#
# /etc/init.d/dropbear
#
# and its symbolic link
# /usr/sbin/rcdropbear
#
### BEGIN INIT INFO
# Provides:             dropbear
# Required-Start:       $network $remote_fs
# Required-Stop:        $network $remote_fs
# Default-Start:        3 5
# Default-Stop:         0 1 2 6
# Short-Description:    Dropbear
# Description:          Dropbear is a relatively small SSH 2 server.
### END INIT INFO

# Note on runlevels:
# 0 - halt/poweroff                     6 - reboot
# 1 - single user                       2 - multiuser without network exported
# 3 - multiuser w/ network (text mode)  5 - multiuser w/ network and X11 (xdm)

. /etc/rc.status

DROPBEAR_BIN="/usr/sbin/dropbear"
DROPBEAR_LOCKFILE="/var/run/dropbear.pid"
DROPBEAR_SYSCONFIG="/etc/sysconfig/dropbear"
DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"


test -x $DROPBEAR_BIN || { echo "$DROPBEAR_BIN not installed";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }

# Check for existence of sysconfig file and read it
if [ -r "$DROPBEAR_SYSCONFIG" ]; then
        . "$DROPBEAR_SYSCONFIG"
fi

# Reset status of this service
rc_reset

case "$1" in
    start)
        echo -n "Starting Dropbear "
        if [ ! -r "$DROPBEAR_DSSKEY" ] || [ ! -r "$DROPBEAR_RSAKEY" ]; then
            $0 keygen
        fi

        startproc -p "$DROPBEAR_LOCKFILE" "$DROPBEAR_BIN" $OPTIONS

        # Remember status and be verbose
        rc_status -v
    ;;
    stop)
        echo -n "Shutting down Dropbear "
        killproc -p "$DROPBEAR_LOCKFILE" -TERM "$DROPBEAR_BIN"
        rc_status -v
    ;;
    try-restart)
        ## Do a restart only if the service was active before.
        $0 status
        if test $? = 0; then
            $0 restart
        else
            rc_reset        # Not running is not a failure.
        fi
        rc_status
    ;;
    restart|reload)
        $0 stop
        $0 start
        rc_status
    ;;
    status)
        echo -n "Checking for Dropbear "
        checkproc -p "$DROPBEAR_LOCKFILE" "$DROPBEAR_BIN"
        rc_status -v
    ;;
    keygen)
        echo "Creating keys for Dropbear "
        if [ ! -r "$DROPBEAR_DSSKEY" ]; then
            dropbearkey -t dss -f "$DROPBEAR_DSSKEY"
        fi
        if [ ! -r "$DROPBEAR_RSAKEY" ]; then
            dropbearkey -t rsa -f "$DROPBEAR_RSAKEY"
        fi
        rc_status
    ;;
    *)
        echo "Usage: $0 {start|stop|status|try-restart|restart|reload|keygen}"
        exit 1
        ;;
esac
rc_exit
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to