Checkinstall patch: Difference between revisions

From MDWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| border="1"
*See: http://checkinstall.izto.org
!installwatch.patch
 
|-
 
| --- installwatch.c.svn-base 2007-04-07 14:27:23.000000000 -0400
===Patch 1===
| +++ installwatch.c 2007-04-07 14:25:06.000000000 -0400
| @@ -84,7 +84,7 @@
*Patches installwatch.c so that it will compile on x_64
| static int (*true_open)(const char *, int, ...);
 
| static DIR *(*true_opendir)(const char *);
 
| static struct dirent *(*true_readdir)(DIR *dir);
  --- installwatch.c.svn-base 2007-04-07 14:27:23.000000000 -0400
| -static int (*true_readlink)(const char*,char *,size_t);
    +++ installwatch.c 2007-04-07 14:25:06.000000000 -0400
| +static ssize_t (*true_readlink)(const char*,char *,size_t);
@@ -84,7 +84,7 @@
| static char *(*true_realpath)(const char *,char *);
  static int (*true_open)(const char *, int, ...);
| static int (*true_rename)(const char *, const char *);
  static DIR *(*true_opendir)(const char *);
| static int (*true_rmdir)(const char *);
  static struct dirent *(*true_readdir)(DIR *dir);
| @@ -546,7 +546,7 @@
-static int (*true_readlink)(const char*,char *,size_t);
|        struct utimbuf timbuf;
+static ssize_t (*true_readlink)(const char*,char *,size_t);
| size_t truesz;
  static char *(*true_realpath)(const char *,char *);
| char linkpath[PATH_MAX+1];
  static int (*true_rename)(const char *, const char *);
| - size_t linksz;
  static int (*true_rmdir)(const char *);
| + ssize_t linksz;
@@ -546,7 +546,7 @@
|
struct utimbuf timbuf;
| #if DEBUG
size_t truesz;
| debug(2,"copy_path(%s,%s)\n",truepath,translroot);
char linkpath[PATH_MAX+1];
| @@ -1582,7 +1582,7 @@
- size_t linksz;
struct stat reslvinfo;
+ ssize_t linksz;
| instw_t iw;
| char wpath[PATH_MAX+1];
  #if DEBUG
| - size_t wsz=0;
debug(2,"copy_path(%s,%s)\n",truepath,translroot);
| + ssize_t wsz=0;
@@ -1582,7 +1582,7 @@
| char linkpath[PATH_MAX+1];
struct stat reslvinfo;
|
instw_t iw;
|
char wpath[PATH_MAX+1];
| @@ -2698,8 +2698,8 @@
- size_t wsz=0;
return result;
+ ssize_t wsz=0;
| }
char linkpath[PATH_MAX+1];
|
| -int readlink(const char *path,char *buf,size_t bufsiz) {
| - int result;
@@ -2698,8 +2698,8 @@
| +ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
return result;
| + ssize_t result;
  }
| instw_t instw;
| int status;
-int readlink(const char *path,char *buf,size_t bufsiz) {
|}
- int result;
+ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
+ ssize_t result;
instw_t instw;
int status;
 


  patch -p0 < installwatch_patch.c
  patch -p0 < installwatch_patch.c
===Patch2===
*Patches checkinstall so stop md5 error on rpm installation
Index: checkinstall
===================================================================
--- checkinstall        (revision 3179)
+++ checkinstall        (working copy)
@@ -1523,10 +1523,10 @@
        # Find regular files first
        [ $DEBUG -gt 0 ] && echo "debug: BASE_TMP_DIR: $BASE_TMP_DIR"
-      cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[      ]*unlink' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles
+      cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access)' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles
        # symlinks are next
-      cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[      ]*unlink' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u  >> /${TMP_DIR}/newfiles
+      cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[[:space:]]*(unlink|access)' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u  >> /${TMP_DIR}/newfiles
        # OK, now we clean it up a bit
        mv /${TMP_DIR}/newfiles.tmp /${TMP_DIR}/newfiles.installwatch

Latest revision as of 02:32, 12 August 2007


Patch 1

  • Patches installwatch.c so that it will compile on x_64


  --- installwatch.c.svn-base	2007-04-07 14:27:23.000000000 -0400
   +++ installwatch.c	2007-04-07 14:25:06.000000000 -0400
@@ -84,7 +84,7 @@
static int (*true_open)(const char *, int, ...);
static DIR *(*true_opendir)(const char *);
static struct dirent *(*true_readdir)(DIR *dir);

-static int (*true_readlink)(const char*,char *,size_t); +static ssize_t (*true_readlink)(const char*,char *,size_t);

static char *(*true_realpath)(const char *,char *);
static int (*true_rename)(const char *, const char *);
static int (*true_rmdir)(const char *);

@@ -546,7 +546,7 @@

	struct utimbuf timbuf;
	size_t truesz;
	char linkpath[PATH_MAX+1];

- size_t linksz; + ssize_t linksz;

#if DEBUG
	debug(2,"copy_path(%s,%s)\n",truepath,translroot);

@@ -1582,7 +1582,7 @@

	struct stat reslvinfo;
	instw_t iw;
	char wpath[PATH_MAX+1];

- size_t wsz=0; + ssize_t wsz=0;

	char linkpath[PATH_MAX+1];


@@ -2698,8 +2698,8 @@

	return result;
}

-int readlink(const char *path,char *buf,size_t bufsiz) { - int result; +ssize_t readlink(const char *path,char *buf,size_t bufsiz) { + ssize_t result;

	instw_t instw;
	int status;


patch -p0 < installwatch_patch.c


Patch2

  • Patches checkinstall so stop md5 error on rpm installation


Index: checkinstall

=======================================================

--- checkinstall (revision 3179) +++ checkinstall (working copy) @@ -1523,10 +1523,10 @@

       # Find regular files first
       [ $DEBUG -gt 0 ] && echo "debug: BASE_TMP_DIR: $BASE_TMP_DIR"

- cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[ ]*unlink' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles + cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*space:*(unlink|access)' | cut -f 3 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | sort -u > /${TMP_DIR}/newfiles

       # symlinks are next

- cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*[ ]*unlink' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u >> /${TMP_DIR}/newfiles + cat /${TMP_DIR}/newfiles.tmp | egrep -v '^[-0-9][0-9]*space:*(unlink|access)' | cut -f 4 | egrep -v "^(/dev|$BASE_TMP_DIR|/tmp)" | grep -v "#success" | sort -u >> /${TMP_DIR}/newfiles

       # OK, now we clean it up a bit
       mv /${TMP_DIR}/newfiles.tmp /${TMP_DIR}/newfiles.installwatch