Package: checkinstall
Version: 1.6.2-3

Hello, I have written a cumulative patch for checkinstall 1.6.2-3.
It does some fixes and adds some new functionality to checkinstall.
Below I will describe each case.

Fix 1: checkinstall misses files from stripping.
Checkinstall does wrongly check if a file is a binary. It uses 'find -perm' for that. However, many projects(eg. kerberos) after the 'make' procedure DO NOT set the execute bit on the binaries. So that files are skipped and do not get stripped. With my patch I look for the 'ELF.*not stripped' pattern inside every file. This way I get all libraries & programs stripped.

Feature 1: Make use of regular expressions in the ---exclude flag.
This is very useful. Instead of writing by hand whatever you want to exclude from the package one by one, you just write a sort regexp. An example: --exclude="/lib/liba.la,/lib/libb.la,/lib/libc.la" VS --exclude="/lib/.*\.la"

Feature 2: Use information from files to set the flags.
It is used for automated creation of packages in non-interactive mode.
The regular case is --requires="libc6 (>=  2.14.1-1)".
My case is --requires="`cat ../DEPENDENCIES`".
So I never have to write by hand in the command line. I just write on the DEPENDENCIES file.

Support 1: Fix bad installation prefixes.
Everything is installed under odd paths. Just use the common and regular ones.
/etc/checkinstall
/usr/share/local
/usr/bin
/usr/sbin

Support 2: Add GLIBC versions 8 to 15 in installwatch.c

That's all :)

Kostas Tamateas.
diff -ru checkinstall-1.6.2-3.orig/Makefile checkinstall-1.6.2-3/Makefile
--- checkinstall-1.6.2-3.orig/Makefile  2008-11-12 02:43:53.000000000 +0000
+++ checkinstall-1.6.2-3/Makefile       2012-04-05 08:15:40.000000000 +0000
@@ -1,10 +1,10 @@
 # $Id: Makefile,v 1.6.2.1 2008/11/09 07:48:18 izto Exp $
 
 # Where to install.
-PREFIX=/usr/local
+PREFIX=/usr
 BINDIR=$(PREFIX)/sbin
-LCDIR=$(PREFIX)/lib/checkinstall/locale
-CONFDIR=$(PREFIX)/lib/checkinstall
+LCDIR=$(PREFIX)/share/locale
+CONFDIR=/etc/checkinstall
 
 all:
        for file in locale/checkinstall-*.po ; do \
diff -ru checkinstall-1.6.2-3.orig/checkinstall 
checkinstall-1.6.2-3/checkinstall
--- checkinstall-1.6.2-3.orig/checkinstall      2012-04-05 07:42:00.000000000 
+0000
+++ checkinstall-1.6.2-3/checkinstall   2012-04-05 08:51:38.000000000 +0000
@@ -530,80 +530,80 @@
          ;;
       -A|--arch|--pkgarch)
          shift
-         ARCHITECTURE=`eval echo $1`
+         ARCHITECTURE=`eval echo '$1'`
          ;;
       --umask)
          shift
-         CKUMASK=`eval echo $1`
+         CKUMASK=`eval echo '$1'`
          ;;
       --pkgname)
          shift
-         NAME=`eval echo $1`
+         NAME=`eval echo '$1'`
          ;;
       --pkgversion)
          shift
-         VERSION=`eval echo $1`
+         VERSION=`eval echo '$1'`
          ;;
       --pkgrelease)
          shift
-         RELEASE=`eval echo $1`
+         RELEASE=`eval echo '$1'`
          ;;
       --pkglicense)
          shift
-         LICENSE=`eval echo $1`
+         LICENSE=`eval echo '$1'`
          ;;
       --pkggroup)
          shift
         # note: we use PKG_GROUP instead of GROUP since (t)csh sets GROUP.
-         PKG_GROUP=`eval echo $1`
+         PKG_GROUP=`eval echo '$1'`
          ;;
       --pkgsource)
          shift
-         SOURCE=`eval echo $1`
+         SOURCE=`eval echo '$1'`
          ;;
       --pkgaltsource)
          shift
-         ALTSOURCE=`eval echo $1`
+         ALTSOURCE=`eval echo '$1'`
          ;;
       --pakdir)
          shift
-         PAK_DIR=`eval echo $1`
+         PAK_DIR=`eval echo '$1'`
          ;;
       --with-tar)
          shift
-         TAR=`eval echo $1`
+         TAR=`eval echo '$1'`
          ;;
       --docdir)
          shift
-         DOC_DIR=`eval echo $1`
+         DOC_DIR=`eval echo '$1'`
          ;;
       --provides)
          shift
-         PROVIDES=`eval echo $1`
+         PROVIDES=`eval echo '$1'`
          ;;
       --conflicts)
          shift
-         CONFLICTS=`eval echo $1`
+         CONFLICTS=`eval echo '$1'`
          ;;
       --replaces)
          shift
-         REPLACES=`eval echo $1`
+         REPLACES=`eval echo '$1'`
          ;;
       --requires)
          shift
-         REQUIRES=`eval echo $1`
+         REQUIRES=`eval echo '$1'`
          ;;
       --maintainer)
          shift
-         MAINTAINER=`eval echo $1`
+         MAINTAINER=`eval echo '$1'`
          ;;
       --dpkgflags)
          shift
-         DPKG_FLAGS=`eval echo $1`
+         DPKG_FLAGS=`eval echo '$1'`
          ;;
       --rpmflags)
          shift
-         RPM_FLAGS=`eval echo $1`
+         RPM_FLAGS=`eval echo '$1'`
          ;;
       -t|--type)
          shift
@@ -846,7 +846,7 @@
           ;;
       --exclude)
          shift
-         EXCLUDE=`eval echo $1`
+         EXCLUDE="$1"
          ;;
       --include)
          shift
@@ -869,7 +869,7 @@
 
 ################################################################
 # User-configurable variables were moved to the checkinstallrc #
-# file which is probably found at /usr/local/lib/checkinstall  #          
+# file which is probably found at /usr/lib/checkinstall        #
 #                                                              #
 #                  DO NOT modify them here!!                   #
 ################################################################
@@ -1665,11 +1665,13 @@
        [ $DEBUG -gt 0 ] && echo "debug: EXCLUDE=$EXCLUDE"
 
        for exclude in `echo $EXCLUDE | awk '{ split ($0, files,","); for(i=1; 
files[i] != ""; i++) print files[i];}'`; do
-          if [ -d $exclude ]; then  # If it's a directory, ignore everything 
below it
+          if [ -d "$exclude" ]; then  # If it's a directory, ignore everything 
below it
              egrep -v "^$exclude" < /${TMP_DIR}/newfiles > 
/${TMP_DIR}/newfiles.tmp
           else
-             if [ -f $exclude ]; then  # If it's a file, ignore just this one
+             if [ -f "$exclude" ]; then  # If it's a file, ignore just this one
                 egrep -v "^$exclude$" < /${TMP_DIR}/newfiles > 
/${TMP_DIR}/newfiles.tmp
+             else #otherwise consider it a regular expression pattern
+                egrep -v "$exclude" < /${TMP_DIR}/newfiles > 
/${TMP_DIR}/newfiles.tmp
              fi
           fi
           cp /${TMP_DIR}/newfiles.tmp /${TMP_DIR}/newfiles
@@ -1814,16 +1816,11 @@
           else
               echogn "Stripping ELF binaries..."
           fi
-          for f in `find ${BUILD_DIR} -type f \( -perm -0100 -or -perm -0010 
-or -perm -0001 \)` ; do
-
-              if [ $STRIP_SO_ELF -eq "0" -a "`file $f | grep -v ' shared 
object,'`" = "" ]; then
-              #if this is a *.so* file and we don't have to strip it, then 
filter 'em
-                  continue
-              fi
-              if [ "`file $f | sed -n -e 's/^\(.*\):[  ]*ELF.*, not 
stripped/\1/p'`" = "" ]; then
-                  continue
+          for f in `find ${BUILD_DIR} -type f`; do
+              if file $f | grep -q 'ELF.*not stripped'; then
+                   chmod u+x $f
+                   strip -p $f || :
               fi
-              strip -p $f || :
           done
           okfail
        fi
Only in checkinstall-1.6.2-3.orig/: debian
diff -ru checkinstall-1.6.2-3.orig/installwatch/Makefile 
checkinstall-1.6.2-3/installwatch/Makefile
--- checkinstall-1.6.2-3.orig/installwatch/Makefile     2008-11-16 
16:20:53.000000000 +0000
+++ checkinstall-1.6.2-3/installwatch/Makefile  2012-04-05 07:20:13.000000000 
+0000
@@ -4,7 +4,7 @@
 # Well, the only configurable part is the following variable.
 # Make sure the directory you specify exists.
 
-PREFIX=/usr/local
+PREFIX=/usr
 
 # End of configurable part
 
diff -ru checkinstall-1.6.2-3.orig/installwatch/create-localdecls 
checkinstall-1.6.2-3/installwatch/create-localdecls
--- checkinstall-1.6.2-3.orig/installwatch/create-localdecls    2008-11-16 
16:20:53.000000000 +0000
+++ checkinstall-1.6.2-3/installwatch/create-localdecls 2012-04-05 
07:33:07.000000000 +0000
@@ -89,6 +89,30 @@
                7)
                        echo '#define GLIBC_MINOR 7' >> $OUTFILE
                        SUBVERSION='glibc-2.7' ;;
+               8)
+                       echo '#define GLIBC_MINOR 8' >> $OUTFILE
+                       SUBVERSION='glibc-2.8' ;;
+               9)
+                       echo '#define GLIBC_MINOR 9' >> $OUTFILE
+                       SUBVERSION='glibc-2.9' ;;
+               10)
+                       echo '#define GLIBC_MINOR 10' >> $OUTFILE
+                       SUBVERSION='glibc-2.10' ;;
+               11)
+                       echo '#define GLIBC_MINOR 11' >> $OUTFILE
+                       SUBVERSION='glibc-2.11' ;;
+               12)
+                       echo '#define GLIBC_MINOR 12' >> $OUTFILE
+                       SUBVERSION='glibc-2.12' ;;
+               13)
+                       echo '#define GLIBC_MINOR 13' >> $OUTFILE
+                       SUBVERSION='glibc-2.13' ;;
+               14)
+                       echo '#define GLIBC_MINOR 14' >> $OUTFILE
+                       SUBVERSION='glibc-2.14' ;;
+               15)
+                       echo '#define GLIBC_MINOR 15' >> $OUTFILE
+                       SUBVERSION='glibc-2.15' ;;
                *)
                        echo 'Treated as glibc >= 2.1 (finger crossed)'
                        echo '#define GLIBC_MINOR 1' >> $OUTFILE

Reply via email to