# $Id: ITO.spec,v 4.59 2012/08/12 18:59:29 ksb Exp $ # $KeyFile: ${echo:-echo} msync.ksh %define _tmpdir /tmp %define _local_prefix /usr/local %define _local_bindir %{_local_prefix}/sbin %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: msync Version: 4.52 Release: 1%{?dist} BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release} Vendor: NPCGuild.org Summary: NPC tool for assuring that a master source structure is stable Group: Utilities License: BSD URL: http://patch.sac.fedex.com/RPMS Source: http://patch.sac.fedex.com/tarball/%{name}-%{version}.tgz BuildRequires: m4 /bin/ksh msrc_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: 0 Requires: gcc bzip2 /bin/ksh msrc oue rcs instck %description After an engineer completes a source change she runs this program to be sure that all the files are completely committed and at the same release version. %prep %setup %build %install mkdir -p %{buildroot}/usr/local/sbin mkdir -p %{buildroot}/usr/local/man/man8 F=`mktemp -d /tmp/bmHMXXXXXX` PATH=/usr/local/bin:$PATH export PATH mmsrc -y INTO=$F -Cauto.cf -- make DESTDIR=%{buildroot} install mk -mInstall -D DESTDIR=%{buildroot} %{name}.man rm -rf $F find %{buildroot} -type d -name OLD -depth -exec rm -rf \{\} \; %clean rm -rf %{buildroot} %files %defattr(-,root,root) %{_local_bindir}/%{name} %{_local_bindir}/verof %doc %{_local_mandir}/ %changelog * Sun Aug 12 2012 KS Braunsdorf - Allow GEN files to be Cache dirs or .host files in msrc (like mk's lib) * Fri Jun 29 2012 KS Braunsdorf - removed silly complaints about SUBDIRs not having a local RCS cache file * Mon Sep 26 2011 KS Braunsdorf - some comments and white-space cleanup * Fri Aug 5 2011 KS Braunsdorf - a comment inserted to note that we, sadly, don't finish the command line - when we find a target markup in the control recipe. * Tue Jul 26 2011 KS Braunsdorf - updated diff option documentation and processing. - added -3 to make my life easier * Thu Jul 14 2011 KS Braunsdorf - added checks for .dot-files in RCS/CVS dirs, I can't believe people do that. * Tue Apr 26 2011 KS Braunsdorf - logic for recursion limit should be in 1 place, not two - made the output from control group markup override the environment - also publish the group found for recursive dirs, just in case they don't - (so dirs that follow on the command-line see the last group forced) - removed extra white-space in code - made -V output flow in a better order, added missing colon - fixed a bug where -R could process command-line dirs twice - made -N and -G do a simple "are these the same" check for multiple dirs * Mon Apr 25 2011 KS Braunsdorf - identify subdirectory and multiple directory output * Fri Apr 15 2011 KS Braunsdorf - when given a directory path we prefix on the control file better * Thu Apr 14 2011 KS Braunsdorf - I broke -N and -G with the recursion, same fix as -V * Thu Apr 14 2011 KS Braunsdorf - version output now includes any control recipe target we see - renamed $SOURCE to $MSYNC_GROUP - added mk marker Msync(target) to the control makefile spec - $MSYNC_CHECK prevents mk infinite recursion (yay) - added -G to output the group owner of a directory - changed the current working directory to the target directory - to support the target spell (else it didn't work at all). - This change was a little big, expect bugs. * Tue Apr 12 2011 KS Braunsdorf - fixed the source group issue with a mk marked line - added -G to output the source group for a directory (like -N) - updated the HTML doument * Mon Apr 11 2011 KS Braunsdorf - updated the manual page - made msync recognize distrib-based msrc dirs and report them - use a perl function and "msrc -d P" to plunder the control recipe * Fri Apr 8 2011 KS Braunsdorf - made the GEN checks active. This completes the planned developement. * Fri Apr 1 2011 KS Braunsdorf - better and fewer error reports on a platfrom host * Wed Mar 30 2011 KS Braunsdorf - Fixed the fallback to make (-b) to actually try to work, at least on BSD. - The wording on $SOURCE messages was lame, as ${SOURCE} is the - way to spell it. I changed it to "the SOURCE macro" to make it more clear. - We do loose some exit code information from make/mmsrc on a failure, but - this is an interactive program (mostly) and I think stderr is fine. - If we can't find a SOURCE macro with make we use find and guess. - We complain about more missing RCS directories now, since we actually - handle relative paths to SOURCE files now (at least mostly). - We don't know about "." and "++" which make -b might output: install mmsrc. * Mon Dec 20 2010 KS Braunsdorf - check the perms on RCS, CVS, or SVN match the parent directory - added the $SOUCE hook for policy group - added some SVN stub logic * Thu Nov 18 2010 KS Braunsdorf - output a better error message when the make recipe has (syntax) issues - removed build depend on gcc * Tue Nov 18 2008 KS Braunsdorf - upgraded spec file to better build tactics * Sun Nov 09 2008 KS Braunsdorf - Built the RPM spec file and added it to the msrc cache