# $Id: ITO.spec,v 1.7 2012/03/19 15:57:24 ksb Exp $ # $KeyFile: ${echo:-echo} netlint # $Level2: ${echo:-echo} netlint %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/libexec %define _local_mandir %{_local_prefix}/man/man8 # for signing of packages #%_signature gpg #%_gpg_name FIXME@example.org # %dist should be defined on the target but in case it isn't we can guess one %define distguess %(cat /etc/{redhat,fedora,suse,ubuntu}-release | sed -e 's/Fedora Core/fc@/; s/Fedora/f@/; s/Red Hat[^0-9]*\(Enterprise|Server\)*[^0-9]*/rhel@/; s/Red Hat[^0-9]*/rh/; s/.*Suse[^0-9]*/se@/; s/Ubuntu[^0-9]*/ubuntu@/; s/@[^0-9]*//;s/\([0-9][0-9]*\)[^0-9][^0-9]*\([0-9][0-9]*\)/\1_\2/; s/[^0-9]*$//') %{!?dist:%define dist .%{distguess}} # Do not generate debugging packages by default - older versions of rpmbuild # (like RehHat 6.2) choke on the line with the percent in the macro name: # We need a sed spell on RH6.x to "s/\(^.define \)%d/\1d/", Sigh. -- ksb %define debug_package %{nil} Name: netlint Version: 1.66 Release: 2%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC host lint check for network local configuration Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: msrc_base install_base # Autoreq:0 prevents misleading depencies from being generated. Normally, this # is perfectly sane; however, the system is picking up mk directives and # mkcmd directives as well as system depencies. Autoreq: 1 Requires: /bin/ksh msrc_base install_base iputils net-tools netlint_plugins %description Any site that has more than 2 hosts needs to check the network between them. Some site policy must be applied to the results. See netlint-hooks and the generic reporter for more details. %prep %setup -q %build %install umask 022 mkdir -p %{buildroot}/%{_local_bindir} mkdir -p %{buildroot}/%{_local_mandir} F=`mktemp -d /tmp/bmHMXXXXXX` mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} install mk -mInstall -D DESTDIR=%{buildroot} *.man rm -rf $F find %{buildroot} -depth -type d -name OLD -exec rm -rf \{\} \; %clean # Do not confilct with the next user of the fixed-path build directory rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %doc %{_local_mandir}/ %changelog * Mon Mar 19 2012 KS Braunsdorf - fixed a bug in -V for modules, they need the netlint functions as well * Fri Jan 20 2012 KS Braunsdorf - the FQDN function didn't check /etc/hosts (and it should) - the FQDN function was not as portable as I thought, so I fixed that too * Tue Dec 13 2011 KS Braunsdorf - added the -R, and -p options to allow for a more up-to-date policy poll - without updating the local copy * Fri Dec 05 2008 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache