diff --git a/.gitignore b/.gitignore index c62909a..f82d86f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ conman-0.2.5.tar.bz2 /conman-0.2.7.tar.bz2 /conman-0.2.7.tar.gz +/conman-0.2.8.tar.gz diff --git a/conman.init b/conman.init deleted file mode 100644 index d2db772..0000000 --- a/conman.init +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# -# chkconfig: - 95 5 -# description: The ConMan daemon is used for console management. -# - -CONMAND=/usr/sbin/conmand - -# Source function library. -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 1 - -# Default params, override in /etc/sysconfig/conman -CONFIG=/etc/conman.conf -OPTIONS= -USER=root -NICE= -#SIGHUP_RELOAD= -#PIDFILE= - -. /etc/sysconfig/conman - -RETVAL="0" - -# Disable suppression of stderr msgs. -INITLOG_ARGS="" - -[ -x "$CONMAND" ] || exit 5 - -# See how we were called. -case "$1" in - start) - echo -n "Starting ConMan: " - CONSOLES=`grep -ci "^CONSOLE" $CONFIG` - RETVAL=$? - if [ "$RETVAL" -ge "1" ]; then - echo - echo -n " ERROR: No CONSOLE(s) defined! " - echo_failure - else - daemon $NICE --user $USER $CONMAND -c $CONFIG $OPTIONS - RETVAL=$? - fi - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/conman - ;; - stop) - echo -n "Stopping ConMan: " - killproc conmand - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/conman - ;; - status) - status conmand - RETVAL=$? - ;; - restart) - $0 status >/dev/null && $0 stop - $0 start - RETVAL=$? - ;; - condrestart) - [ -f "/var/lock/subsys/conman" ] && $0 restart || : - RETVAL=$? - echo - ;; - reload) - echo -n "Reloading ConMan: " - killproc conmand -HUP - RETVAL=$? - echo - ;; - *) - echo "Usage: $0 {start|stop|status|restart|reload}" - exit 3 -esac - -exit $RETVAL diff --git a/conman.logrotate b/conman.logrotate deleted file mode 100644 index 13a135a..0000000 --- a/conman.logrotate +++ /dev/null @@ -1,21 +0,0 @@ -## -# ConMan Logrotate Configuration -## - -/var/log/conman/* { - compress - missingok - nocopytruncate - nocreate - nodelaycompress - nomail - notifempty - olddir /var/log/conman.old/ - rotate 4 - sharedscripts - size=5M - weekly - postrotate - /usr/bin/killall -HUP conmand - endscript -} diff --git a/conman.service b/conman.service deleted file mode 100644 index 2d9a34a..0000000 --- a/conman.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=ConMan Console Management Daemon -After=network.target - -[Service] -Type=forking -ExecStart=/usr/sbin/conmand -c /etc/conman.conf - -[Install] -WantedBy=multi-user.target diff --git a/conman.spec b/conman.spec index 39fff01..0e98b88 100644 --- a/conman.spec +++ b/conman.spec @@ -1,23 +1,20 @@ Name: conman -Version: 0.2.7 -Release: 11%{?dist} +Version: 0.2.8 +Release: 1%{?dist} Summary: ConMan - The Console Manager Group: Applications/System License: GPLv3+ URL: https://dun.github.io/conman/ Source0: https://github.com/dun/%{name}/archive/%{name}-%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: %{name}.service -Source2: %{name}.logrotate -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: logrotate -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -BuildRequires: perl-generators +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +BuildRequires: freeipmi-devel BuildRequires: tcp_wrappers -BuildRequires: systemd-units +BuildRequires: systemd %description ConMan is a serial console management program designed to support a large @@ -32,90 +29,70 @@ Its features include: - allowing clients to join or steal console "write" privileges - executing Expect scripts across multiple consoles in parallel + %prep %setup -qn %{name}-%{name}-%{version} -%build -# not really lib material, more like share -mv lib share -chmod -x share/examples/*.exp -%{__perl} -pi.orig -e 's|cd lib|cd share|g' \ - Makefile.in -%{__perl} -pi -e 's|lib\/|share\/|g' \ - Makefile.in share/examples/*.exp -# don't strip the bins on install, let find-debug.sh do it -%{__perl} -pi -e 's|-m 755 -s conman|-m 755 conman|g' \ - Makefile.in +# fix paths +sed -i -e 's|lib\/|share\/|g' lib/examples/*.exp + +# fix shebang +sed -i -e 's|\/usr\/bin\/env perl|\/usr\/bin\/perl|g' conmen + +%build %configure --with-tcp-wrappers make %{?_smp_mflags} + %install -rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT -# put in our own initscript and logrotate -install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init.d -install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} + +# clean sysvinit stuff +rm -r $RPM_BUILD_ROOT/etc/{init.d,sysconfig} + # make log directories mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name} mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.old -# examples don't belong in datadir... -rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/examples -# these shouldn't be executable -chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} -# adjust perms on main config file -chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf -%clean -rm -rf "$RPM_BUILD_ROOT" +# examples don't belong in libdir +rm -r $RPM_BUILD_ROOT/usr/lib/%{name}/examples +# move scripts to proper place +mv $RPM_BUILD_ROOT/usr/lib/%{name} $RPM_BUILD_ROOT%{_datadir}/%{name} +chmod -x $RPM_BUILD_ROOT%{_datadir}/%{name}/*.exp + %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post conman.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable conman.service > /dev/null 2>&1 || : - /bin/systemctl stop conman.service > /dev/null 2>&1 || : -fi +%systemd_preun conman.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart conman.service >/dev/null 2>&1 || : -fi - -%triggerun -- conman < 0.2.7-1 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply conman -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save conman >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del conman >/dev/null 2>&1 || : -/bin/systemctl try-restart conman.service >/dev/null 2>&1 || : +%systemd_postun_with_restart conman.service + %files -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING FAQ NEWS -%doc share/examples +%license COPYING +%doc AUTHORS FAQ NEWS +%doc lib/examples %config(noreplace) %{_sysconfdir}/%{name}.conf -%config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_unitdir}/%{name}.service -%{_localstatedir}/log/%{name} -%{_localstatedir}/log/%{name}.old +%dir %{_localstatedir}/log/%{name} +%dir %{_localstatedir}/log/%{name}.old %{_bindir}/* %{_sbindir}/* -%{_datadir}/%{name} +%{_datadir}/%{name}/ %{_mandir}/*/* + %changelog +* Thu Mar 09 2017 Dan HorĂ¡k - 0.2.8-1 +- updated to 0.2.8 +- spec cleanups (#1244218) +- enable IPMI support + * Fri Feb 10 2017 Fedora Release Engineering - 0.2.7-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 507525a..8936c64 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -00316e7340e4741d5d38dcb952fb1e83 conman-0.2.7.tar.gz +SHA512 (conman-0.2.8.tar.gz) = 334d9d373b8ad53a569bed01cc5d1ae876dc94193ae71c16c125745bee356ab2ac24659927c894a008236ec89fc283bcb1abfd457b8e942bc543380b2af78521