Accepting request 451005 from home:eeich:branches:network:cluster
- Removed stray file. - Conditionalized support for freeipmi to distro version. - Set use of tcpwrappers to 'off' by default. - Fixed build for pre-systemd versions. OBS-URL: https://build.opensuse.org/request/show/451005 OBS-URL: https://build.opensuse.org/package/show/network:cluster/conman?expand=0&rev=2
This commit is contained in:
parent
a91061cb55
commit
fd75eacdcb
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 17 13:53:52 UTC 2017 - eich@suse.com
|
||||||
|
|
||||||
|
- Removed stray file.
|
||||||
|
- Conditionalized support for freeipmi to distro version.
|
||||||
|
- Set use of tcpwrappers to 'off' by default.
|
||||||
|
- Fixed build for pre-systemd versions.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 4 16:41:33 UTC 2017 - eich@suse.com
|
Wed Jan 4 16:41:33 UTC 2017 - eich@suse.com
|
||||||
|
|
||||||
|
34
conman.spec
34
conman.spec
@ -28,11 +28,15 @@ Requires: expect
|
|||||||
Requires: logrotate
|
Requires: logrotate
|
||||||
|
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: tcpd-devel
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
BuildRequires: freeipmi-devel
|
BuildRequires: freeipmi-devel
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
Source0: https://github.com/dun/conman/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
Source0: https://github.com/dun/conman/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
Source1: %{name}.service
|
Source1: %{name}.service
|
||||||
|
%endif
|
||||||
|
|
||||||
# 8/15/14 karl.w.schulz@intel.com - include prereq
|
# 8/15/14 karl.w.schulz@intel.com - include prereq
|
||||||
%if 0%{?sles_version} || 0%{?suse_version}
|
%if 0%{?sles_version} || 0%{?suse_version}
|
||||||
@ -59,18 +63,28 @@ Its features include:
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-tcp-wrappers \
|
%configure --with-tcp-wrappers \
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
--with-freeipmi \
|
--with-freeipmi \
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR="%{buildroot}"
|
%make_install
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
||||||
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rcconman
|
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rcconman
|
||||||
|
%else
|
||||||
|
awk "/END INIT INFO/ { print \"# Default-Start: 3 5\"; } {print;}" \
|
||||||
|
%{buildroot}%_sysconfdir/init.d/conman > %{buildroot}%_sysconfdir/init.d/conman.tmp
|
||||||
|
mv %{buildroot}%_sysconfdir/init.d/conman.tmp %{buildroot}%_sysconfdir/init.d/conman
|
||||||
|
ln -s %{_sysconfdir}/init.d/conman %{buildroot}%{_sbindir}/rcconman
|
||||||
|
chmod u+x %{buildroot}%{_sysconfdir}/init.d/conman
|
||||||
|
%endif
|
||||||
%{__mkdir_p} %{buildroot}/var/adm/fillup-templates
|
%{__mkdir_p} %{buildroot}/var/adm/fillup-templates
|
||||||
%{__mv} %{buildroot}%{_sysconfdir}/sysconfig/conman \
|
%{__mv} %{buildroot}%{_sysconfdir}/sysconfig/conman \
|
||||||
%{buildroot}/var/adm/fillup-templates/sysconfig.conman
|
%{buildroot}/var/adm/fillup-templates/sysconfig.conman
|
||||||
@ -92,7 +106,7 @@ SERVER logfile="/var/log/conman.log"
|
|||||||
SERVER loopback=ON
|
SERVER loopback=ON
|
||||||
SERVER pidfile="/var/run/conman.pid"
|
SERVER pidfile="/var/run/conman.pid"
|
||||||
SERVER resetcmd="powerman -0 %N; sleep 3; powerman -1 %N"
|
SERVER resetcmd="powerman -0 %N; sleep 3; powerman -1 %N"
|
||||||
SERVER tcpwrappers=ON
|
SERVER tcpwrappers=OFF
|
||||||
SERVER timestamp=1h
|
SERVER timestamp=1h
|
||||||
GLOBAL seropts="115200,8n1"
|
GLOBAL seropts="115200,8n1"
|
||||||
GLOBAL log="console.%N"
|
GLOBAL log="console.%N"
|
||||||
@ -101,17 +115,29 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%service_add_pre conman.service
|
%service_add_pre conman.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%service_del_preun conman.service
|
%service_del_preun conman.service
|
||||||
|
%else
|
||||||
|
%{stop_on_removal conman}
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%fillup_only conman
|
%fillup_only conman
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%service_add_post conman.service
|
%service_add_post conman.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%service_del_postun conman.service
|
%service_del_postun conman.service
|
||||||
|
%else
|
||||||
|
%{restart_on_update conman}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -129,5 +155,9 @@ fi
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%{_prefix}/lib/conman
|
%{_prefix}/lib/conman
|
||||||
|
%if 0%{?suse_version} > 1140
|
||||||
%{_prefix}/lib/systemd/*
|
%{_prefix}/lib/systemd/*
|
||||||
|
%else
|
||||||
|
%{_sysconfdir}/init.d/*
|
||||||
|
%endif
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
@ -1,171 +0,0 @@
|
|||||||
#
|
|
||||||
# spec file for package conman
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
||||||
#
|
|
||||||
# All modifications and additions to the file contributed by third parties
|
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
|
||||||
# upon. The license for this file, and modifications and additions to the
|
|
||||||
# file, is the same license as for the pristine package itself (unless the
|
|
||||||
# license for the pristine package is not an Open Source License, in which
|
|
||||||
# case the license is the MIT License). An "Open Source License" is a
|
|
||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
|
||||||
# published by the Open Source Initiative.
|
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
||||||
#
|
|
||||||
|
|
||||||
Name: conman
|
|
||||||
Version: 0.2.7
|
|
||||||
Release: 0
|
|
||||||
|
|
||||||
Summary: The Console Manager Client
|
|
||||||
Group: System/Console
|
|
||||||
License: GPL-3.0+
|
|
||||||
URL: http://dun.github.io/conman/
|
|
||||||
|
|
||||||
Requires: expect
|
|
||||||
Requires: logrotate
|
|
||||||
Requires: %{name}-doc
|
|
||||||
|
|
||||||
BuildRequires: tcpd-devel
|
|
||||||
%ifarch x86_64
|
|
||||||
BuildRequires: freeipmi-devel
|
|
||||||
%endif
|
|
||||||
Source0: https://github.com/dun/conman/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
|
|
||||||
Source1: %{name}.service
|
|
||||||
|
|
||||||
# 8/15/14 karl.w.schulz@intel.com - include prereq
|
|
||||||
%if 0%{?sles_version} || 0%{?suse_version}
|
|
||||||
PreReq: %{fillup_prereq}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
|
||||||
ConMan is a serial console management program designed to support a large
|
|
||||||
number of console devices and simultaneous users. It supports:
|
|
||||||
- local serial devices
|
|
||||||
- remote terminal servers (via the telnet protocol)
|
|
||||||
- IPMI Serial-Over-LAN (via FreeIPMI)
|
|
||||||
- Unix domain sockets
|
|
||||||
- external processes (eg, using Expect for telnet/ssh/ipmi-sol connections)
|
|
||||||
|
|
||||||
Its features include:
|
|
||||||
- logging (and optionally timestamping) console device output to file
|
|
||||||
- connecting to consoles in monitor (R/O) or interactive (R/W) mode
|
|
||||||
- allowing clients to share or steal console write privileges
|
|
||||||
- broadcasting client output to multiple consoles
|
|
||||||
|
|
||||||
%package doc
|
|
||||||
Summary: The Console Manager Client/Server Documentation
|
|
||||||
BuildArch: noarch
|
|
||||||
Group: System/Console
|
|
||||||
|
|
||||||
%description doc
|
|
||||||
ConMan is a serial console management program designed to support a large
|
|
||||||
number of console devices and simultaneous users.
|
|
||||||
This package contains the common documentation files for client and server.
|
|
||||||
|
|
||||||
|
|
||||||
%package -n conmand
|
|
||||||
Summary: The Console Manager Server Daemon
|
|
||||||
BuildArch: noarch
|
|
||||||
Group: System/Console
|
|
||||||
Requires: %{name}-doc
|
|
||||||
|
|
||||||
%description -n conmand
|
|
||||||
ConMan is a serial console management program designed to support a large
|
|
||||||
number of console devices and simultaneous users.
|
|
||||||
This package contains the server daemon. The client is provided with
|
|
||||||
package %{name}
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q -n %{name}-%{version}
|
|
||||||
|
|
||||||
%build
|
|
||||||
%configure --with-tcp-wrappers \
|
|
||||||
%ifarch x86_64
|
|
||||||
--with-freeipmi \
|
|
||||||
%endif
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
|
||||||
make install DESTDIR="%{buildroot}"
|
|
||||||
|
|
||||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
|
||||||
rm -rf %{buildroot}%{_sysconfdir}/init.d
|
|
||||||
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rcconman
|
|
||||||
%{__mkdir_p} %{buildroot}/var/adm/fillup-templates
|
|
||||||
%{__mv} %{buildroot}%{_sysconfdir}/sysconfig/conman \
|
|
||||||
%{buildroot}/var/adm/fillup-templates/sysconfig.conman
|
|
||||||
for i in $(find %{buildroot}/usr/lib/conman) ; do
|
|
||||||
if [ -f $i -a -x $i ]; then
|
|
||||||
if ! head -1 $i | grep "^#!"; then
|
|
||||||
echo "#!/usr/bin/expect -f" > /tmp/$(basename $i)
|
|
||||||
cat $i >> /tmp/$(basename $i)
|
|
||||||
mv /tmp/$(basename $i) $i
|
|
||||||
chmod 0755 $i
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if ! grep "^SERVER" %{buildroot}/etc/conman.conf > /dev/null; then
|
|
||||||
cat <<EOF >> %{buildroot}/etc/conman.conf
|
|
||||||
SERVER keepalive=ON
|
|
||||||
SERVER logdir="/var/log/conman"
|
|
||||||
SERVER logfile="/var/log/conman.log"
|
|
||||||
SERVER loopback=ON
|
|
||||||
SERVER pidfile="/var/run/conman.pid"
|
|
||||||
SERVER resetcmd="powerman -0 %N; sleep 3; powerman -1 %N"
|
|
||||||
SERVER tcpwrappers=ON
|
|
||||||
SERVER timestamp=1h
|
|
||||||
GLOBAL seropts="115200,8n1"
|
|
||||||
GLOBAL log="console.%N"
|
|
||||||
GLOBAL logopts="sanitize,timestamp"
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf "%{buildroot}"
|
|
||||||
|
|
||||||
%pre
|
|
||||||
%service_add_pre conman.service
|
|
||||||
|
|
||||||
%preun
|
|
||||||
%service_del_preun conman.service
|
|
||||||
|
|
||||||
%post
|
|
||||||
%fillup_only conman
|
|
||||||
%service_add_post conman.service
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%service_del_postun conman.service
|
|
||||||
|
|
||||||
%files
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_bindir}/*
|
|
||||||
%dir %{_prefix}/lib/conman
|
|
||||||
%{_prefix}/lib/conman/*.exp
|
|
||||||
%{_prefix}/lib/conman/examples
|
|
||||||
%{_mandir}/man1/*
|
|
||||||
|
|
||||||
%files doc
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc AUTHORS
|
|
||||||
%doc ChangeLog
|
|
||||||
%doc COPYING
|
|
||||||
%doc DISCLAIMER*
|
|
||||||
%doc FAQ
|
|
||||||
%doc NEWS
|
|
||||||
%doc README
|
|
||||||
%doc THANKS
|
|
||||||
|
|
||||||
%files -n conmand
|
|
||||||
%{_localstatedir}/adm/fillup-templates/sysconfig.conman
|
|
||||||
%config(noreplace) %{_sysconfdir}/conman.conf
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/conman
|
|
||||||
%{_sbindir}/*
|
|
||||||
%dir %{_prefix}/lib/conman
|
|
||||||
%{_prefix}/lib/conman/exec
|
|
||||||
%{_prefix}/lib/systemd/*
|
|
||||||
%{_mandir}/man5/*
|
|
||||||
%{_mandir}/man8/*
|
|
Loading…
x
Reference in New Issue
Block a user