Blame SPECS/conman.spec

b5c7fc
Name:               conman
b5c7fc
Version:            0.2.7
b5c7fc
Release:            5%{?dist}
b5c7fc
Summary:            ConMan - The Console Manager
b5c7fc
b5c7fc
Group:              Applications/System
b5c7fc
License:            GPLv2+
b5c7fc
URL:                http://home.gna.org/conman/
b5c7fc
Source0:            http://download.gna.org/%{name}/%{version}/%{name}-%{version}.tar.bz2
b5c7fc
Source1:            %{name}.service
b5c7fc
Source2:            %{name}.logrotate
b5c7fc
Patch1:             conman-0.2.5-openfiles.patch
b5c7fc
Patch2:             conman-0.2.5-strftime.patch
b5c7fc
BuildRoot:          %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b5c7fc
b5c7fc
Requires:           logrotate
b5c7fc
Requires(post): systemd-units
b5c7fc
Requires(preun): systemd-units
b5c7fc
Requires(postun): systemd-units
b5c7fc
BuildRequires:      tcp_wrappers
b5c7fc
b5c7fc
%description
b5c7fc
ConMan is a serial console management program designed to support a large
b5c7fc
number of console devices and simultaneous users.  It currently supports
b5c7fc
local serial devices and remote terminal servers (via the telnet protocol).
b5c7fc
Its features include:
b5c7fc
b5c7fc
  - mapping symbolic names to console devices
b5c7fc
  - logging all output from a console device to file
b5c7fc
  - supporting monitor (R/O), interactive (R/W), and
b5c7fc
    broadcast (W/O) modes of console access
b5c7fc
  - allowing clients to join or steal console "write" privileges
b5c7fc
  - executing Expect scripts across multiple consoles in parallel
b5c7fc
b5c7fc
%prep
b5c7fc
%setup -q
b5c7fc
%patch1 -b .openfiles -p1
b5c7fc
%patch2 -b .strftime -p1
b5c7fc
b5c7fc
%build
b5c7fc
# not really lib material, more like share
b5c7fc
mv lib share
b5c7fc
chmod -x share/examples/*.exp
b5c7fc
%{__perl} -pi.orig -e 's|cd lib|cd share|g' \
b5c7fc
    Makefile.in
b5c7fc
%{__perl} -pi -e 's|lib\/|share\/|g' \
b5c7fc
    Makefile.in share/examples/*.exp
b5c7fc
# don't strip the bins on install, let find-debug.sh do it
b5c7fc
%{__perl} -pi -e 's|-m 755 -s conman|-m 755 conman|g' \
b5c7fc
    Makefile.in
b5c7fc
b5c7fc
%configure --with-tcp-wrappers
b5c7fc
make %{?_smp_mflags}
b5c7fc
b5c7fc
%install
b5c7fc
rm -rf $RPM_BUILD_ROOT
b5c7fc
make install DESTDIR=$RPM_BUILD_ROOT
b5c7fc
# put in our own initscript and logrotate
b5c7fc
install -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
b5c7fc
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init.d
b5c7fc
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
b5c7fc
# make log directories
b5c7fc
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
b5c7fc
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.old
b5c7fc
# examples don't belong in datadir...
b5c7fc
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
b5c7fc
# these shouldn't be executable
b5c7fc
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
b5c7fc
# adjust perms on main config file
b5c7fc
chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
b5c7fc
b5c7fc
%clean
b5c7fc
rm -rf "$RPM_BUILD_ROOT"
b5c7fc
b5c7fc
%post
b5c7fc
if [ $1 -eq 1 ] ; then 
b5c7fc
    # Initial installation 
b5c7fc
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
b5c7fc
fi
b5c7fc
b5c7fc
%preun
b5c7fc
if [ $1 -eq 0 ] ; then
b5c7fc
    # Package removal, not upgrade
b5c7fc
    /bin/systemctl --no-reload disable conman.service > /dev/null 2>&1 || :
b5c7fc
    /bin/systemctl stop conman.service > /dev/null 2>&1 || :
b5c7fc
fi
b5c7fc
b5c7fc
%postun
b5c7fc
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
b5c7fc
if [ $1 -ge 1 ] ; then
b5c7fc
    # Package upgrade, not uninstall
b5c7fc
    /bin/systemctl try-restart conman.service >/dev/null 2>&1 || :
b5c7fc
fi
b5c7fc
b5c7fc
%triggerun -- conman < 0.2.7-1
b5c7fc
# Save the current service runlevel info
b5c7fc
# User must manually run systemd-sysv-convert --apply conman
b5c7fc
# to migrate them to systemd targets
b5c7fc
/usr/bin/systemd-sysv-convert --save conman >/dev/null 2>&1 ||:
b5c7fc
b5c7fc
# Run these because the SysV package being removed won't do them
b5c7fc
/sbin/chkconfig --del conman >/dev/null 2>&1 || :
b5c7fc
/bin/systemctl try-restart conman.service >/dev/null 2>&1 || :
b5c7fc
b5c7fc
%files
b5c7fc
%defattr(-,root,root,-)
b5c7fc
%doc AUTHORS ChangeLog COPYING FAQ NEWS
b5c7fc
%doc share/examples
b5c7fc
%config(noreplace) %{_sysconfdir}/%{name}.conf
b5c7fc
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
b5c7fc
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
b5c7fc
%{_unitdir}/%{name}.service
b5c7fc
%{_localstatedir}/log/%{name}
b5c7fc
%{_localstatedir}/log/%{name}.old
b5c7fc
%{_bindir}/*
b5c7fc
%{_sbindir}/*
b5c7fc
%{_datadir}/%{name}
b5c7fc
%{_mandir}/*/*
b5c7fc
b5c7fc
%changelog
b5c7fc
* Tue May  7 2013 Denys Vlasenko <dvlasenk@redhat.com> - 0.2.7-5
b5c7fc
- Again fixed "License:" in spec file (GPLv2+ -> GPLv3+).
b5c7fc
b5c7fc
* Tue May  7 2013 Denys Vlasenko <dvlasenk@redhat.com> - 0.2.7-4
b5c7fc
- Forward-porting fixes from RHEL6.
b5c7fc
- Enlarge buffer used for formatting date in a string format.
b5c7fc
- Resolves: rhbz#891938.
b5c7fc
- Allow configuration of the maximum number of open files.
b5c7fc
- Resolves: rhbz#738967.
b5c7fc
b5c7fc
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-3
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b5c7fc
b5c7fc
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.7-2
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b5c7fc
b5c7fc
* Tue Apr 17 2012 Jon Ciesla <limburgher@gmail.com> - 0.2.7-1
b5c7fc
- Migrate to systemd, BZ 771474.
b5c7fc
b5c7fc
* Sun Apr 15 2012 Steven M. Parrish <smparrish@gmail.com> - 0.2.7-0
b5c7fc
- New upstream release
b5c7fc
b5c7fc
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-4
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b5c7fc
b5c7fc
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-3
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b5c7fc
b5c7fc
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.5-2
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b5c7fc
b5c7fc
* Mon Jun 08 2009 Steven M. Parrish <tuxbrewr@fedoraproject.org> - 0.2.5-0
b5c7fc
- New upstream release
b5c7fc
b5c7fc
* Mon Apr 20 2009 Steven M. Parrish <tuxbrewr@fedoraproject.org> - 0.2.4.1-1
b5c7fc
- New upstream release
b5c7fc
b5c7fc
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.2-3
b5c7fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b5c7fc
b5c7fc
* Mon Oct 06 2008 Jarod Wilson <jarod@redhat.com> 0.2.2-2
b5c7fc
- The console option in conman.conf is case-insensitive, so relax
b5c7fc
  defined consoles check in initscript (Mark McLoughlin, #465777)
b5c7fc
b5c7fc
* Mon Sep 08 2008 Steven M. Parrish <smparrish@shallowcreek.net> 0.2.2-1
b5c7fc
- New upstream release
b5c7fc
b5c7fc
* Fri May 02 2008 Jarod Wilson <jwilson@redhat.com> 0.2.1-1
b5c7fc
- New upstream release
b5c7fc
b5c7fc
* Wed Feb 13 2008 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-8
b5c7fc
- Bump and rebuild for gcc 4.3
b5c7fc
b5c7fc
* Thu Apr 26 2007 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-7
b5c7fc
- Update project urls
b5c7fc
- Fix up initscript exit codes (#237936)
b5c7fc
b5c7fc
* Tue Sep 05 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-6
b5c7fc
- Bump for new glibc
b5c7fc
b5c7fc
* Fri Jul 28 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-5
b5c7fc
- Properly enable smp_mflags this time
b5c7fc
b5c7fc
* Fri Jul 28 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-4
b5c7fc
- Add Reqs on chkconfig and service
b5c7fc
- Turn on smp_mflags
b5c7fc
- Initial build for RHEL5
b5c7fc
b5c7fc
* Wed Jul 05 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-3
b5c7fc
- Add missing condrestart fuction to initscript
b5c7fc
b5c7fc
* Tue Jun 27 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-2
b5c7fc
- Don't strip bins on make install, leave for find-debug.sh
b5c7fc
b5c7fc
* Tue Jun 27 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.2-1
b5c7fc
- Update to 0.1.9.2
b5c7fc
b5c7fc
* Tue Jun 20 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-3
b5c7fc
- Add Requires: logrotate
b5c7fc
- Ugh, conmand exits cleanly if no CONSOLE(s) are defined in
b5c7fc
  /etc/conman.conf, add check to initscript to report failure
b5c7fc
  if none are defined
b5c7fc
b5c7fc
* Wed Jun 14 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-2
b5c7fc
- Create log directories and install working logrotate config
b5c7fc
- Use a much cleaner RH/FC-specific initscript
b5c7fc
b5c7fc
* Tue Jun 13 2006 Jarod Wilson <jwilson@redhat.com> 0.1.9.1-1
b5c7fc
- Initial build for Fedora Extras