[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]
Jodok Ole Muellers jodok.muellers@aschendorff.de
Wed, 14 Oct 2009 12:03:10 GMT
Hello, I modified the spec file to generate two sub packages conserver-client and conserver-server Because we run a lot of clients that need to run the "console" binary but no need to run the conserver daemon. Can somebody include the attached conserver.spec and make sure that it will be available in further releases, please ? Thanks & Best regards Jodok Reference http://rpm.org/max-rpm-snapshot/s1-rpm-subpack-spec-file-changes.html # rpm -qlp /usr/src/redhat/RPMS/x86_64/conserver-client-8.1.17-2.x86_64.rpm /usr/bin/console /usr/share/doc/conserver-client-8.1.17 /usr/share/doc/conserver-client-8.1.17/CHANGES /usr/share/doc/conserver-client-8.1.17/FAQ /usr/share/doc/conserver-client-8.1.17/INSTALL /usr/share/doc/conserver-client-8.1.17/README /usr/share/man/man1/console.1.gz # rpm -qlp /usr/src/redhat/RPMS/x86_64/conserver-server-8.1.17-2.x86_64.rpm /etc/conserver.cf /etc/conserver.passwd /etc/default/conserver /etc/rc.d/init.d/conserver /usr/lib64/conserver/convert /usr/sbin/conserver /usr/share/doc/conserver-server-8.1.17 /usr/share/doc/conserver-server-8.1.17/CHANGES /usr/share/doc/conserver-server-8.1.17/FAQ /usr/share/doc/conserver-server-8.1.17/INSTALL /usr/share/doc/conserver-server-8.1.17/README /usr/share/doc/conserver-server-8.1.17/conserver.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/INSTALL /usr/share/doc/conserver-server-8.1.17/conserver.cf/Makefile /usr/share/doc/conserver-server-8.1.17/conserver.cf/Makefile.in /usr/share/doc/conserver-server-8.1.17/conserver.cf/conserver.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/conserver.cf.man /usr/share/doc/conserver-server-8.1.17/conserver.cf/conserver.passwd /usr/share/doc/conserver-server-8.1.17/conserver.cf/conserver.passwd.man /usr/share/doc/conserver-server-8.1.17/conserver.cf/label.ps /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples/README /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples/average-distributed.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples/average.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples/basic.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/samples/simple.cf /usr/share/doc/conserver-server-8.1.17/conserver.cf/test.cf /usr/share/examples/conserver/conserver.cf /usr/share/examples/conserver/conserver.passwd /usr/share/man/man5/conserver.cf.5.gz /usr/share/man/man5/conserver.passwd.5.gz /usr/share/man/man8/conserver.8.gz -- Jodok Ole Müllers Infrastruktur Manager Red Hat Certified Engineer
# # rpm spec file for conserver, but I don't think it'll work on any # platform that doesn't have red hat rpm >= 4.0.2 installed. # %define pkg conserver %define ver 8.1.17 # define the name of the machine on which the main conserver # daemon will be running if you don't want to use the default # hostname (console) %define master console # what red hat (or other distibution) version are you running? %define distver 2 # compile arguments. defaults to 0 # example: rpmbuild -bb conserver.spec --with openssl %define with_openssl %{?_with_openssl: 1} %{?!_with_openssl: 0} %define with_libwrap %{?_with_libwrap: 1} %{?!_with_libwrap: 0} %define with_pam %{?_with_pam: 1} %{?!_with_pam: 0} %define with_dmalloc %{?_with_dmalloc: 1} %{?!_with_dmalloc: 0} # additionally you can use macros logfile pidfile # example: rpmbuild -bb conserver.spec --define "pidfile /var/run/conserver/pid" Name: %{pkg} Version: %{ver} Release: %{distver} License: BSD Summary: Serial console server daemon/client Group: System Environment/Daemons URL: http://www.conserver.com/ Source: http://www.conserver.com/%{pkg}-%{ver}.tar.gz BuildRoot: %{_tmppath}/%{pkg}-buildroot %if %{with_openssl} BuildRequires: openssl-devel %endif %if %{with_pam} BuildRequires: pam-devel %endif %if %{with_libwrap} Requires: tcp_wrappers %endif %if %{with_dmalloc} Requires: dmalloc BuildRequires: dmalloc %endif Prefix: %{_prefix} %package server Summary: Serial console server daemon Group: System Environment/Daemons %package client Summary: Serial console server client Group: Applications/Internet %description Conserver is a daemon that allows multiple users to watch a serial console at the same time. It can log the data, allows users to take write-access of a console (one at a time), and has a variety of bells and whistles to accentuate that basic functionality. %description server conserver-server is a daemon that allows multiple users to watch a serial console at the same time. It can log the data, allows users to take write-access of a console (one at a time), and has a variety of bells and whistles to accentuate that basic functionality. %description client conserver-client to connect to conserver-server using a tcp port. Allows multiple users to watch a serial console at the same time. %prep %{__rm} -rf %{buildroot} %setup -q %build # we don't want to install the solaris conserver.rc file f="conserver/Makefile.in" %{__mv} $f $f.orig %{__sed} -e 's/^.*conserver\.rc.*$//' < $f.orig > $f %configure %{?_with_openssl} %{?_with_libwrap} %{?_with_dmalloc} %{?_with_pam} %{?logfile: --with-logfile=%{logfile}} %{?pidfile: --with-pidfile=%{pidfile}} %{?master: --with-master=%{master}} make %install %{makeinstall} # put commented copies of the sample configure files in the # system configuration directory %{__mkdir_p} %{buildroot}/%{_sysconfdir} %{__sed} -e 's/^/#/' \ < conserver.cf/conserver.cf \ > %{buildroot}/%{_sysconfdir}/conserver.cf %{__sed} -e 's/^/#/' \ < conserver.cf/conserver.passwd \ > %{buildroot}/%{_sysconfdir}/conserver.passwd # install copy of init script %{__mkdir_p} %{buildroot}/%{_initrddir} %{__cp} contrib/redhat-rpm/conserver.init %{buildroot}/%{_initrddir}/conserver # install copy of init script defaults %{__mkdir_p} %{buildroot}/%{_sysconfdir}/default %{__cp} contrib/redhat-rpm/conserver.defaults %{buildroot}/%{_sysconfdir}/default/conserver %clean %{__rm} -rf %{buildroot} %post server if [ -x %{_initrddir}/conserver ]; then /sbin/chkconfig --add conserver fi # make sure /etc/services has a conserver entry if ! egrep '\<conserver\>' /etc/services > /dev/null 2>&1 ; then echo "console 782/tcp conserver" >> /etc/services fi %preun server if [ "$1" = 0 ]; then if [ -x %{_initrddir}/conserver ]; then %{_initrddir}/conserver stop /sbin/chkconfig --del conserver fi fi # we need this even if empty #%files %files server %defattr(-,root,root) %doc CHANGES FAQ INSTALL README conserver.cf %config(noreplace) %{_sysconfdir}/conserver.cf %config(noreplace) %{_sysconfdir}/conserver.passwd %config(noreplace) %{_sysconfdir}/default/conserver %attr(555,root,root) %{_initrddir}/conserver %{_libdir}/conserver/convert %{_mandir}/man8/conserver.8.gz %{_mandir}/man5/conserver.cf.5.gz %{_mandir}/man5/conserver.passwd.5.gz %{_datadir}/examples/conserver/conserver.cf %{_datadir}/examples/conserver/conserver.passwd %{_sbindir}/conserver %files client %defattr(-,root,root) %doc CHANGES FAQ INSTALL README %{_bindir}/console %{_mandir}/man1/console.1.gz %changelog * Wed Oct 14 2009 Jodok Ole Muellers <muellejo@aschendorff.de> - 8.1.17-2 - Compiled with SSL support and PAM support * Wed Sep 25 2009 Fabien Wernli - added configure prerequisites * Thu Sep 24 2009 Fabien Wernli - added prefix to configure - changed some hardcoded values to proper macros: didn't work on x64 lib -> lib64