rpms/crack/EL-6 crack-FHS.patch,1.1,1.2 crack.spec,1.14,1.15

Christian Iseli c4chris at fedoraproject.org
Thu Jul 8 11:35:24 UTC 2010


Author: c4chris

Update of /cvs/extras/rpms/crack/EL-6
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv24815

Modified Files:
	crack-FHS.patch crack.spec 
Log Message:
Add spot's FHS cleanup patch, and fix description accordingly.

crack-FHS.patch:
 Crack               |   24 ++++++++++++++----------
 Reporter            |    4 ++--
 src/util/kickdict.c |    2 +-
 3 files changed, 17 insertions(+), 13 deletions(-)

Index: crack-FHS.patch
===================================================================
RCS file: /cvs/extras/rpms/crack/EL-6/crack-FHS.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- crack-FHS.patch	25 Nov 2008 21:01:59 -0000	1.1
+++ crack-FHS.patch	8 Jul 2010 11:35:24 -0000	1.2
@@ -1,17 +1,18 @@
 diff -up c50a/Crack.FHS c50a/Crack
---- c50a/Crack.FHS	2008-11-25 14:21:34.000000000 -0500
-+++ c50a/Crack	2008-11-25 14:25:49.000000000 -0500
-@@ -36,7 +36,8 @@ node=`uname -n`                         
+--- c50a/Crack.FHS	2010-03-31 10:07:08.233610673 -0400
++++ c50a/Crack	2010-03-31 10:07:08.236608122 -0400
+@@ -36,7 +36,9 @@ node=`uname -n`                         
  
  old_wd=`pwd`
  
 -CRACK_HOME=${CRACK_HOME:-"/var/lib/crack"}
 +CRACK_HOME=${CRACK_HOME:-"/usr/share/crack"}
 +CRACK_BIN_HOME=${CRACK_BIN_HOME:-"/usr/libexec/crack/"}
++CRACK_STATE_DIR=${CRACK_STATE_DIR:-"/var/lib/crack"}
  
  if cd $CRACK_HOME
  then
-@@ -47,6 +48,7 @@ else
+@@ -47,6 +49,7 @@ else
  fi
  
  export CRACK_HOME
@@ -19,7 +20,7 @@ diff -up c50a/Crack.FHS c50a/Crack
  
  ###
  # Flagwaving
-@@ -56,6 +58,7 @@ echo "Crack $version: The Password Crack
+@@ -56,6 +59,7 @@ echo "Crack $version: The Password Crack
  echo "(c) Alec Muffett, 1991, 1992, 1993, 1994, 1995, 1996"
  echo "System:" `uname -a 2>/dev/null`
  echo "Home: $CRACK_HOME"
@@ -27,7 +28,7 @@ diff -up c50a/Crack.FHS c50a/Crack
  echo "Invoked: $0 $*"
  
  ###
-@@ -205,7 +208,7 @@ fi
+@@ -205,7 +209,7 @@ fi
  # Reset PATH in advance
  ###
  
@@ -36,16 +37,16 @@ diff -up c50a/Crack.FHS c50a/Crack
  export PATH
  
  ###
-@@ -222,7 +225,7 @@ fi
+@@ -222,7 +226,7 @@ fi
  # Make the dictionary passes
  ###
  
 -dp=run/dict
-+dp=$CRACK_HOME/run/dict
++dp=$CRACK_STATE_DIR/run/dict
  dplf=$dp/.dictmade
  
  if [ ! -f $dplf ]
-@@ -253,21 +256,21 @@ fi
+@@ -253,21 +257,21 @@ fi
  ###
  
  # F-files are feedback
@@ -53,15 +54,15 @@ diff -up c50a/Crack.FHS c50a/Crack
 -crackfb=run/D.boot.$$           # D-files are data from the cracker/fb
 -crackout=run/D$node.$$
 -crackerr=run/E$node.$$          # E-files are errors from the cracker
-+crackin=$CRACK_HOME/run/I$node.$$           # I-files are input to the cracker
-+crackfb=$CRACK_HOME/run/D.boot.$$           # D-files are data from the cracker/fb
-+crackout=$CRACK_HOME/run/D$node.$$
-+crackerr=$CRACK_HOME/run/E$node.$$          # E-files are errors from the cracker
++crackin=$CRACK_STATE_DIR/run/I$node.$$           # I-files are input to the cracker
++crackfb=$CRACK_STATE_DIR/run/D.boot.$$           # D-files are data from the cracker/fb
++crackout=$CRACK_STATE_DIR/run/D$node.$$
++crackerr=$CRACK_STATE_DIR/run/E$node.$$          # E-files are errors from the cracker
  
  if [ "x$killflag" = "x" ]
  then
 -	crackkf=run/K$node.$$   # K-files are kill file for 'plaster'
-+	crackkf=$CRACK_HOME/run/K$node.$$   # K-files are kill file for 'plaster'
++	crackkf=$CRACK_STATE_DIR/run/K$node.$$   # K-files are kill file for 'plaster'
  else
  	crackkf=$killflag
  fi
@@ -69,28 +70,42 @@ diff -up c50a/Crack.FHS c50a/Crack
  if [ "x$mailflag" != "x" ]
  then
 -	crackmf=run/M$node.$$   # M-files are for mail commands
-+	crackmf=$CRACK_HOME/run/M$node.$$   # M-files are for mail commands
++	crackmf=$CRACK_STATE_DIR/run/M$node.$$   # M-files are for mail commands
  fi
  
  
-@@ -302,7 +305,7 @@ then
+@@ -302,7 +306,7 @@ then
  	echo "Crack: Merging password files..."
  
  	(
 -		cat run/F-merged        # first the feedback
-+		cat $CRACK_HOME/run/F-merged        # first the feedback
++		cat $CRACK_STATE_DIR/run/F-merged        # first the feedback
  
  		while [ "x$1" != "x" ]
  		do
 diff -up c50a/Reporter.FHS c50a/Reporter
---- c50a/Reporter.FHS	2008-11-25 14:36:48.000000000 -0500
-+++ c50a/Reporter	2008-11-25 14:36:30.000000000 -0500
-@@ -10,7 +10,7 @@
+--- c50a/Reporter.FHS	2010-03-31 10:07:08.233610673 -0400
++++ c50a/Reporter	2010-03-31 10:07:08.236608122 -0400
+@@ -10,8 +10,8 @@
  # document which accompanies distributions of Crack v5.0 and upwards.
  ###
  
 -CRACK_HOME=${CRACK_HOME:-"/var/lib/crack"}
-+CRACK_HOME=${CRACK_HOME:-"/usr/share/crack"}
- cd $CRACK_HOME
+-cd $CRACK_HOME
++CRACK_STATE_DIR=${CRACK_STATE_DIR:-"/var/lib/crack/"}
++cd $CRACK_STATE_DIR
  
  tfile=run/T$$
+ date=`date`
+diff -up c50a/src/util/kickdict.c.FHS c50a/src/util/kickdict.c
+--- c50a/src/util/kickdict.c.FHS	2010-03-31 10:12:34.665486313 -0400
++++ c50a/src/util/kickdict.c	2010-03-31 10:12:44.187480349 -0400
+@@ -15,7 +15,7 @@
+ #undef DEBUG2
+ 
+ static char dictconf[] = "conf/dictrun.conf";
+-static char dictgrps[] = "run/dict";
++static char dictgrps[] = "/var/lib/crack/run/dict";
+ static char xprogram[] = "dictfilt | crack-sort | uniq";
+ 
+ int


Index: crack.spec
===================================================================
RCS file: /cvs/extras/rpms/crack/EL-6/crack.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- crack.spec	24 Jul 2009 19:36:19 -0000	1.14
+++ crack.spec	8 Jul 2010 11:35:24 -0000	1.15
@@ -1,7 +1,7 @@
 Summary:   Password cracker
 Name:      crack
 Version:   5.0a
-Release:   12%{?dist}
+Release:   14%{?dist}
 License:   Artistic clarified
 Group:     Applications/System
 Source:    ftp://ftp.cerias.purdue.edu/pub/tools/unix/pwdutils/crack/%{name}5.0.tar.gz
@@ -18,7 +18,7 @@ password file, looking for users who hav
 password.
 
 This package creates a group named "crack" and the Crack program puts all
-its results in the /usr/share/crack/run directory, which belongs to that group.
+its results in the /var/lib/crack/run directory, which belongs to that group.
 Only users in the crack group can use this package.
 
 
@@ -40,7 +40,7 @@ sed -i 's|/usr/dict/|/usr/share/dict/|g'
 %build
 C5FLAGS="-D_XOPEN_SOURCE -DUSE_STRING_H -DUSE_STDLIB_H -DUSE_SIGNAL_H -DUSE_SYS_TYPES_H -DUSE_UNISTD_H -DUSE_PWD_H"
 make XDIR=../../bin XCC=gcc XCFLAGS="$RPM_OPT_FLAGS $C5FLAGS" XLIBS=-lcrypt utils
-CRACK_HOME=`pwd` CRACK_BIN_HOME=`pwd` ./Crack -makedict
+CRACK_HOME=`pwd` CRACK_BIN_HOME=`pwd` CRACK_STATE_DIR=`pwd` ./Crack -makedict
 
 
 %install
@@ -49,8 +49,10 @@ rm -f bin/libc5.a bin/stdlib-cracker
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
 mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
+mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
 cp -a bin $RPM_BUILD_ROOT%{_libexecdir}/%{name} 
-cp -a conf dict run scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a conf dict scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
+cp -a run $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
 install -p -m0755 Crack $RPM_BUILD_ROOT%{_bindir}/Crack
 install -p -m0755 Reporter $RPM_BUILD_ROOT%{_bindir}/CrackReporter
 
@@ -70,17 +72,21 @@ fi
 %doc LICENCE manual.* doc
 %attr(00750, root, crack) %{_bindir}/Crack*
 %{_libexecdir}/%{name}/
-%dir %{_datadir}/%{name}/
-%attr(02770, root, crack) %dir %{_datadir}/%{name}/run/
-%attr(02770, root, crack) %dir %{_datadir}/%{name}/run/dict/
-%attr(00640, root, crack) %{_datadir}/%{name}/run/dict/*
-%attr(00640, root, crack) %{_datadir}/%{name}/run/dict/.dictmade
-%{_datadir}/%{name}/conf/
-%{_datadir}/%{name}/dict/
-%{_datadir}/%{name}/scripts/
+%{_datadir}/%{name}/
+%dir %{_sharedstatedir}/%{name}/
+%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/
+%attr(02770, root, crack) %dir %{_sharedstatedir}/%{name}/run/dict/
+%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/*
+%attr(00640, root, crack) %{_sharedstatedir}/%{name}/run/dict/.dictmade
 
 
 %changelog
+* Wed Mar 31 2010 Christian Iseli <Christian.Iseli at licr.org> - 5.0a-14
+- fix description wrt FHS cleanup patch
+
+* Wed Mar 31 2010 Tom "spot" Callaway <tcallawa at redhat.com> - 5.0a-13
+- cleanup FHS patch and spec to properly use /var/lib/crack/run
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.0a-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 



More information about the scm-commits mailing list