Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel grimoire by David Brown (866d65b55f3d74bdc3b92603e481c6ff1ee1bdac)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Brown <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel grimoire by David Brown (866d65b55f3d74bdc3b92603e481c6ff1ee1bdac)
  • Date: Sat, 22 Jul 2006 17:45:18 -0500

GIT changes to devel grimoire by David Brown <dmlb2000@kajit-master.(none)>:

utils/installwatch/BUILD | 23 +----
utils/installwatch/DETAILS | 15 +--
utils/installwatch/HISTORY | 18 +++
utils/installwatch/INSTALL | 6 -
utils/installwatch/access-addition.patch | 63 +++++++++++++
utils/installwatch/checkinstall-1.6.0.tgz.sig |binary
utils/installwatch/execve-addition.patch | 65 ++++++++++++++
utils/installwatch/getcwd-fix.patch | 35 +++++++
utils/installwatch/installwatch-buffer.diff | 33 -------
utils/installwatch/installwatch-cflags.diff | 24 -----
utils/installwatch/installwatch-errno.diff | 55 ------------
utils/installwatch/installwatch-ld-preload.diff | 13 --
utils/installwatch/installwatch-regressions.patch | 100
++++++++++++++++++++++
utils/installwatch/installwatch-syslog.diff | 12 --
utils/installwatch/localdecls.h | 8 -
utils/installwatch/makefile-cflags.patch | 17 +++
utils/installwatch/remove-root-check.patch | 20 ++++
utils/installwatch/utimes-addition.patch | 63 +++++++++++++
18 files changed, 402 insertions(+), 168 deletions(-)

New commits:
commit 866d65b55f3d74bdc3b92603e481c6ff1ee1bdac
Author: David Brown <dmlb2000@kajit-master.(none)>
Commit: David Brown <dmlb2000@kajit-master.(none)>

updated installwatch to 0.7.0beta4

diff --git a/utils/installwatch/BUILD b/utils/installwatch/BUILD
index 38a1846..377ec67 100755
--- a/utils/installwatch/BUILD
+++ b/utils/installwatch/BUILD
@@ -1,14 +1,9 @@
-#!/bin/sh
-
-patch -p1 < "${SCRIPT_DIRECTORY}/installwatch-ld-preload.diff" &&
-patch -p1 < "${SCRIPT_DIRECTORY}/installwatch-errno.diff" &&
-patch -p1 < "${SCRIPT_DIRECTORY}/installwatch-buffer.diff" &&
-patch -p1 < "${SCRIPT_DIRECTORY}/installwatch-cflags.diff" &&
-patch -p1 < "${SCRIPT_DIRECTORY}/installwatch-syslog.diff" &&
-
-# If LIB is not defined, we do not have the bi-arch sorcery, so we
-# define LIB
-
-LIB="${LIB:-/lib}"
-make PREFIX="${TRACK_ROOT}/usr" LIBDIR="${TRACK_ROOT}/usr/${LIB}"
-
+patch -p1 < ${SPELL_DIRECTORY}/installwatch-regressions.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/getcwd-fix.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/utimes-addition.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/access-addition.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/remove-root-check.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/execve-addition.patch &&
+patch -p1 < ${SPELL_DIRECTORY}/makefile-cflags.patch &&
+cd ${SOURCE_DIRECTORY}/${SPELL}-${VERSION} &&
+make
diff --git a/utils/installwatch/DETAILS b/utils/installwatch/DETAILS
index f167871..bbd89b6 100755
--- a/utils/installwatch/DETAILS
+++ b/utils/installwatch/DETAILS
@@ -1,10 +1,13 @@
SPELL=installwatch
- VERSION=0.6.3
- SOURCE=$SPELL-$VERSION.tgz
-
SOURCE_HASH=sha512:901a526171ee91c2c317328337ffd7fe93e872f3cac0a16899c04d6c7d99246b3fc24c795a386e87583895044ce87c2026a003c87b12c606a7617d699a4462fc
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
-
SOURCE_URL[0]=http://asic-linux.com.mx/~izto/checkinstall/files/source/$SOURCE
- WEB_SITE=http://asic-linux.com.mx/~izto/installwatch.html
+ VERSION=0.7.0beta4
+ SPELL_FROM=checkinstall
+ VERSION_FROM=1.6.0
+ SOURCE=${SPELL_FROM}-${VERSION_FROM}.tgz
+ SOURCE_GPG="gurus.gpg:${SOURCE}.sig"
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/${SPELL_FROM}-${VERSION_FROM}
+
SOURCE_URL[0]=http://asic-linux.com.mx/~izto/checkinstall/files/source/${SOURCE}
+ WEB_SITE=http://asic-linux.com.mx/~izto/checkinstall/
+ STAGED_INSTALL=off
ENTERED=20011230
UPDATED=20050106
BUILD_API=2
diff --git a/utils/installwatch/HISTORY b/utils/installwatch/HISTORY
index 6e9c035..e04ebd6 100644
--- a/utils/installwatch/HISTORY
+++ b/utils/installwatch/HISTORY
@@ -1,3 +1,21 @@
+2006-07-22 David Brown <dmlb2000 AT gmail.com>
+ * BUILD: updated patches and new source directory switch
+ * DETAILS: updated version to 0.7.0beta4 source url gpg etc
+ * INSTALL: changed to handle new build directory structure
+ * access-addition.patch: added
+ * execve-addition.patch: added
+ * getcwd-fix.patch: added
+ * makefile-cflags.patch: added
+ * installwatch-regressions.patch: added
+ * remove-root-check.patch: added
+ * utimes-addition.patch: added
+ * installwatch-buffer.diff: removed
+ * installwatch-cflags.diff: removed
+ * installwatch-errno.diff: removed
+ * installwatch-ld-preload.diff: removed
+ * installwatch-syslog.diff: removed
+ * localdecls.h: removed
+
2006-03-12 Karsten Behrmann <BearPerson AT sourcemage.org>
* DETAILS: (automated) Add KEYWORDS

diff --git a/utils/installwatch/INSTALL b/utils/installwatch/INSTALL
index 19ed4a2..fb1fe32 100755
--- a/utils/installwatch/INSTALL
+++ b/utils/installwatch/INSTALL
@@ -1,3 +1,3 @@
-#!/bin/sh
-
-make BINDIR="${INSTALL_ROOT}/usr/bin" LIBDIR="${INSTALL_ROOT}/usr/${LIB}"
install
+cd ${SOURCE_DIRECTORY}/${SPELL}-${VERSION} &&
+make PREFIX=${INSTALL_ROOT}/usr install &&
+touch ${INSTALL_ROOT}/usr/lib/installwatch.so
diff --git a/utils/installwatch/access-addition.patch
b/utils/installwatch/access-addition.patch
new file mode 100644
index 0000000..b51e5d2
--- /dev/null
+++ b/utils/installwatch/access-addition.patch
@@ -0,0 +1,63 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index e2b2e9f..7db45c9 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -91,6 +91,7 @@ static int (*true_truncate)(const char *
+ static int (*true_unlink)(const char *);
+ static int (*true_utime)(const char *,const struct utimbuf *);
+ static int (*true_utimes)(const char *,const struct timeval *);
++static int (*true_access)(const char *, int);
+
+ #if(GLIBC_MINOR >= 1)
+
+@@ -316,6 +317,7 @@ static void initialize(void) {
+ true_unlink = dlsym(libc_handle, "unlink");
+ true_utime = dlsym(libc_handle, "utime");
+ true_utimes = dlsym(libc_handle, "utimes");
++ true_access = dlsym(libc_handle, "access");
+
+ #if(GLIBC_MINOR >= 1)
+ true_creat64 = dlsym(libc_handle, "creat64");
+@@ -3150,6 +3152,42 @@ int utimes (const char *pathname, const
+ return result;
+ }
+
++int access (const char *pathname, int type) {
++ int result;
++ instw_t instw;
++ int status;
++
++ if (!libc_handle)
++ initialize();
++
++#if DEBUG
++ debug(2,"access(%s,%d)\n",pathname,type);
++#endif
++
++ /* We were asked to work in "real" mode */
++ if( !(__instw.gstatus & INSTW_INITIALIZED) ||
++ !(__instw.gstatus & INSTW_OKWRAP) ) {
++ result=true_access(pathname,type);
++ return result;
++ }
++
++ instw_new(&instw);
++ instw_setpath(&instw,pathname);
++
++#if DEBUG
++ instw_print(&instw);
++#endif
++
++ instw_getstatus(&instw,&status);
++ if(status&INSTW_TRANSLATED)
++ result=true_access(instw.translpath,type);
++ else
++ result=true_access(instw.path,type);
++
++ instw_delete(&instw);
++ return result;
++}
++
+ #if(GLIBC_MINOR >= 1)
+
+ int creat64(const char *pathname, __mode_t mode) {
diff --git a/utils/installwatch/checkinstall-1.6.0.tgz.sig
b/utils/installwatch/checkinstall-1.6.0.tgz.sig
new file mode 100644
index 0000000..827c6d8
Binary files /dev/null and b/utils/installwatch/checkinstall-1.6.0.tgz.sig
differ
diff --git a/utils/installwatch/execve-addition.patch
b/utils/installwatch/execve-addition.patch
new file mode 100644
index 0000000..e5eb5b4
--- /dev/null
+++ b/utils/installwatch/execve-addition.patch
@@ -0,0 +1,65 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index fa626d3..93ef522 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -92,6 +92,8 @@ static int (*true_unlink)(const char *);
+ static int (*true_utime)(const char *,const struct utimbuf *);
+ static int (*true_utimes)(const char *,const struct timeval *);
+ static int (*true_access)(const char *, int);
++static int (*true_execve)(const char *,char *const*,char *const*);
++
+
+ #if(GLIBC_MINOR >= 1)
+
+@@ -318,6 +320,7 @@ static void initialize(void) {
+ true_utime = dlsym(libc_handle, "utime");
+ true_utimes = dlsym(libc_handle, "utimes");
+ true_access = dlsym(libc_handle, "access");
++ true_execve = dlsym(libc_handle, "execve");
+
+ #if(GLIBC_MINOR >= 1)
+ true_creat64 = dlsym(libc_handle, "creat64");
+@@ -3179,6 +3182,43 @@ #endif
+ return result;
+ }
+
++int execve(const char *pathname, char *const argv[], char *const envp[])
++{
++ int result;
++ instw_t instw;
++ int status;
++
++ if (!libc_handle)
++ initialize();
++
++#if DEBUG
++ debug(2,"execve(%s)\n",pathname);
++#endif
++
++ /* We were asked to work in "real" mode */
++ if( !(__instw.gstatus & INSTW_INITIALIZED) ||
++ !(__instw.gstatus & INSTW_OKWRAP) ) {
++ result=true_execve(pathname,argv,envp);
++ return result;
++ }
++
++ instw_new(&instw);
++ instw_setpath(&instw,pathname);
++
++#if DEBUG
++ instw_print(&instw);
++#endif
++
++ instw_getstatus(&instw,&status);
++ if(status&INSTW_TRANSLATED)
++ result=true_execve(instw.translpath,argv,envp);
++ else
++ result=true_execve(instw.path,argv,envp);
++
++ instw_delete(&instw);
++ return result;
++}
++
+ #if(GLIBC_MINOR >= 1)
+
+ int creat64(const char *pathname, __mode_t mode) {
diff --git a/utils/installwatch/getcwd-fix.patch
b/utils/installwatch/getcwd-fix.patch
new file mode 100644
index 0000000..5fab73f
--- /dev/null
+++ b/utils/installwatch/getcwd-fix.patch
@@ -0,0 +1,35 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index 176e384..a626b55 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -2404,12 +2404,25 @@ char *getcwd(char *buffer,size_t size) {
+ wsize=strlen(wptr)+1;
+ }
+
+- /* we must adapt to the 'buffer' that was given */
+- if(size>=wsize) {
+- strcpy(buffer,wptr);
++ if (buffer == NULL) {
++ if (size !=0 && size < wsize) {
++ result=NULL;
++ errno=(size<=0?EINVAL:ERANGE);
++ } else {
++ result=malloc(wsize);
++ if(result == NULL) {
++ errno=ENOMEM;
++ } else {
++ strcpy(result,wptr);
++ }
++ }
+ } else {
+- result=NULL;
+- errno=(size<=0?EINVAL:ERANGE);
++ if(size>=wsize) {
++ strcpy(buffer,wptr);
++ } else {
++ result=NULL;
++ errno=(size<=0?EINVAL:ERANGE);
++ }
+ }
+ } else {
+ result=true_getcwd(buffer,size);
diff --git a/utils/installwatch/installwatch-buffer.diff
b/utils/installwatch/installwatch-buffer.diff
deleted file mode 100644
index c6c8093..0000000
--- a/utils/installwatch/installwatch-buffer.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -urN installwatch-0.6.3.ori/installwatch.c
installwatch-0.6.3/installwatch.c
---- installwatch-0.6.3.ori/installwatch.c 2004-08-30 14:47:35.917768321
+0000
-+++ installwatch-0.6.3/installwatch.c 2004-08-30 14:51:30.568600728 +0000
-@@ -142,11 +142,17 @@
- va_start(ap, format);
- count = vsnprintf(buffer, BUFSIZE, format, ap);
- va_end(ap);
-+
-+ buffer [BUFSIZE - 2] = '\n';
-+ buffer [BUFSIZE - 1] = 0;
-+
- if(count == -1) {
- /* The buffer was not big enough */
- strcpy(&(buffer[BUFSIZE - 5]), "...\n");
- count = BUFSIZE - 1;
-- }
-+ } else {
-+ count = strlen(buffer);
-+ }
- if((logname = getenv("INSTALLWATCHFILE"))) {
- logfd = true_open(logname, O_WRONLY | O_CREAT | O_APPEND,
0666);
- if(logfd >= 0) {
-@@ -179,8 +185,9 @@
- * to the current working directory if it was not
- * an absolute path */
- getcwd(resolved_path, MAXPATHLEN - 2);
-+ resolved_path[MAXPATHLEN - 2] = 0;
- strcat(resolved_path, "/");
-- strncat(resolved_path, path, MAXPATHLEN - 1);
-+ strncat(resolved_path, path, MAXPATHLEN - 1 -
strlen(resolved_path));
- }
-
- errno = s_errno;
diff --git a/utils/installwatch/installwatch-cflags.diff
b/utils/installwatch/installwatch-cflags.diff
deleted file mode 100644
index 0078dfa..0000000
--- a/utils/installwatch/installwatch-cflags.diff
+++ /dev/null
@@ -1,24 +0,0 @@
---- installwatch-0.6.3/Makefile.ori 2004-09-08 16:05:24.475554253 +0200
-+++ installwatch-0.6.3/Makefile 2004-09-08 16:06:55.238768317 +0200
-@@ -16,10 +16,10 @@
- all: installwatch.so
-
- installwatch.so: installwatch.o
-- ld -shared -o installwatch.so installwatch.o -ldl -lc
-+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostdlib -o installwatch.so
installwatch.o -ldl -lc
-
- installwatch.o: installwatch.c localdecls.h
-- gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT
-DVERSION=\"$(VERSION)\" installwatch.c
-+ $(CC) $(CFLAGS) -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT
-DVERSION=\"$(VERSION)\" installwatch.c
-
- localdecls.h:
- ./create-localdecls
-@@ -33,7 +33,7 @@
- uninstall:
- rm $(LIBDIR)/installwatch.so
- rm $(BINDIR)/installwatch
--
-+
- clean:
- rm -f *~ *.bak *.o installwatch.so core localdecls.h libctest
test-installwatch
-
diff --git a/utils/installwatch/installwatch-errno.diff
b/utils/installwatch/installwatch-errno.diff
deleted file mode 100644
index f58ecda..0000000
--- a/utils/installwatch/installwatch-errno.diff
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Naur installwatch-0.6.3/installwatch.c
installwatch-0.6.3-new/installwatch.c
---- installwatch-0.6.3/installwatch.c 2001-12-23 00:37:06.000000000 +0100
-+++ installwatch-0.6.3-new/installwatch.c 2004-01-08 01:58:25.000000000
+0100
-@@ -134,7 +134,10 @@
- static void log(const char *format, ...) {
- char buffer[BUFSIZE], *logname;
- va_list ap;
-- int count, logfd;
-+ int count, logfd, s_errno;
-+
-+ /* save errno */
-+ s_errno = errno;
-
- va_start(ap, format);
- count = vsnprintf(buffer, BUFSIZE, format, ap);
-@@ -156,9 +159,21 @@
-
- } else
- syslog(LOGLEVEL, buffer);
-+
-+ /* restore errno */
-+ errno = s_errno;
- }
-
- static void canonicalize(const char *path, char *resolved_path) {
-+
-+ /* 2004/01/08 Benoit PAPILLAULT <benoit.papillault AT free.fr>
-+ Since this function can change errno, we save and restore it
-+ */
-+
-+ int s_errno;
-+
-+ s_errno = errno;
-+
- if(!realpath(path, resolved_path) && (path[0] != '/')) {
- /* The path could not be canonicalized, append it
- * to the current working directory if it was not
-@@ -167,6 +182,8 @@
- strcat(resolved_path, "/");
- strncat(resolved_path, path, MAXPATHLEN - 1);
- }
-+
-+ errno = s_errno;
- }
-
- static void make_path (char *path) {
-@@ -532,7 +549,7 @@
-
- backup (canonic);
-
-- result = true_chown(path, owner, group);
-+ result = true_lchown(path, owner, group);
- log("%d\tlchown\t%s\t%d\t%d\t#%s\n", result, canonic, owner, group,
error(result));
- return result;
- }
diff --git a/utils/installwatch/installwatch-ld-preload.diff
b/utils/installwatch/installwatch-ld-preload.diff
deleted file mode 100644
index 966b5b7..0000000
--- a/utils/installwatch/installwatch-ld-preload.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -Naur installwatch-0.6.3.ori/Makefile installwatch-0.6.3/Makefile
---- installwatch-0.6.3.ori/Makefile 2001-12-22 23:37:06.000000000 +0000
-+++ installwatch-0.6.3/Makefile 2003-09-20 20:31:52.000000000 +0000
-@@ -25,8 +25,8 @@
- ./create-localdecls
-
- install: all
-- if [ -r $(LIBDIR)/installwatch.so ]; then rm
$(LIBDIR)/installwatch.so; export LD_PRELOAD=""; cp installwatch.so
$(LIBDIR); LD_PRELOAD=$(LIBDIR)/installwatch.so; else cp installwatch.so
$(LIBDIR); fi
--
-+ cp installwatch.so $(LIBDIR)/installwatch.so.new
-+ mv $(LIBDIR)/installwatch.so.new $(LIBDIR)/installwatch.so
- sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch
- chmod 755 $(BINDIR)/installwatch
diff --git a/utils/installwatch/installwatch-regressions.patch
b/utils/installwatch/installwatch-regressions.patch
new file mode 100644
index 0000000..bd4cb57
--- /dev/null
+++ b/utils/installwatch/installwatch-regressions.patch
@@ -0,0 +1,100 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index bebd0af..176e384 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -352,13 +352,24 @@ static int vlambda_log(const char *logna
+ int count;
+ int logfd;
+ int rcod=0;
++ int s_errno;
+
++ /* save errno */
++ s_errno = errno;
++
++ buffer[BUFSIZE-2] = '\n';
++ buffer[BUFSIZE-1] = '\0';
++
+ count=vsnprintf(buffer,BUFSIZE,format,ap);
+ if(count == -1) {
+ /* The buffer was not big enough */
+ strcpy(&(buffer[BUFSIZE - 5]), "...\n");
+ count=BUFSIZE-1;
+ }
++ else
++ {
++ count = strlen(buffer);
++ }
+
+ if(logname!=NULL) {
+ logfd=true_open(logname,O_WRONLY|O_CREAT|O_APPEND,0666);
+@@ -377,8 +388,11 @@ static int vlambda_log(const char *logna
+ logname,buffer,strerror(errno));
+ }
+ } else {
+- syslog(LOGLEVEL,buffer);
+- }
++ syslog(LOGLEVEL, "%s", buffer);
++ }
++
++ /* restore errno */
++ errno = s_errno;
+
+ return rcod;
+ }
+@@ -455,6 +469,10 @@ static inline int debug(int dbglvl,const
+ * /
+ */
+ static int canonicalize(const char *path, char *resolved_path) {
++ int s_errno;
++
++ /* save errno */
++ s_errno = errno;
+
+ unset_okwrap();
+
+@@ -464,8 +482,9 @@ static int canonicalize(const char *path
+ * to the current working directory if it was not
+ * an absolute path */
+ true_getcwd(resolved_path, PATH_MAX-2);
++ resolved_path[MAXPATHLEN-2] = '\0';
+ strcat(resolved_path, "/");
+- strncat(resolved_path, path, MAXPATHLEN - 1);
++ strncat(resolved_path, path, MAXPATHLEN - 1 -
strlen(resolved_path));
+ } else {
+ strcpy(resolved_path,path);
+ }
+@@ -476,16 +495,21 @@ static int canonicalize(const char *path
+ #if DEBUG
+ debug(4,"canonicalize(%s,%s)\n",path,resolved_path);
+ #endif
+-
++ /* restore errno */
++ errno = s_errno;
++
+ return 0;
+ }
+
+ static int make_path (const char *path) {
+ char checkdir[BUFSIZ];
+ struct stat inode;
+-
++ int s_errno;
+ int i = 0;
+
++ /* save errno */
++ s_errno = errno;
++
+ #if DEBUG
+ debug(2,"===== make_path: %s\n", path);
+ #endif
+@@ -499,6 +523,10 @@ static int make_path (const char *path)
+ }
+ i++;
+ }
++
++ /* restore errno */
++ errno = s_errno;
++
+ return 0;
+ }
+
diff --git a/utils/installwatch/installwatch-syslog.diff
b/utils/installwatch/installwatch-syslog.diff
deleted file mode 100644
index 8364e45..0000000
--- a/utils/installwatch/installwatch-syslog.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN installwatch-0.6.3/installwatch.c installwatch-0.6.4/installwatch.c
---- installwatch-0.6.3/installwatch.c 2004-11-10 17:34:11.817461389 +0100
-+++ installwatch-0.6.4/installwatch.c 2004-11-10 17:00:42.614038577 +0100
-@@ -164,7 +164,7 @@
- syslog(LOGLEVEL, "Could not open `%s' to write `%s':
%s\n", logname, buffer, strerror(errno));
-
- } else
-- syslog(LOGLEVEL, buffer);
-+ syslog(LOGLEVEL, "%s", buffer);
-
- /* restore errno */
- errno = s_errno;
diff --git a/utils/installwatch/localdecls.h b/utils/installwatch/localdecls.h
deleted file mode 100755
index 050420e..0000000
--- a/utils/installwatch/localdecls.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __LOCALDECLS_H_
-#define __LOCALDECLS_H_
-
-#define TRUNCATE_T off_t
-#define LIBC_VERSION "libc.so.6"
-#define GLIBC_MINOR 2
-
-#endif
diff --git a/utils/installwatch/makefile-cflags.patch
b/utils/installwatch/makefile-cflags.patch
new file mode 100644
index 0000000..5ba1f70
--- /dev/null
+++ b/utils/installwatch/makefile-cflags.patch
@@ -0,0 +1,17 @@
+diff --git a/installwatch-0.7.0beta4/Makefile
b/installwatch-0.7.0beta4/Makefile
+index 9f571fe..d64700e 100644
+--- a/installwatch-0.7.0beta4/Makefile
++++ b/installwatch-0.7.0beta4/Makefile
+@@ -16,10 +16,10 @@ LIBDIR=$(PREFIX)/lib
+ all: installwatch.so
+
+ installwatch.so: installwatch.o
+- ld -shared -o installwatch.so installwatch.o -ldl -lc
++ $(LD) $(LDFLAGS) -shared -o installwatch.so installwatch.o -ldl -lc
+
+ installwatch.o: installwatch.c localdecls.h
+- gcc -Wall -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT
-DVERSION=\"$(VERSION)\" installwatch.c
++ $(CC) $(CFLAGS) -c -D_GNU_SOURCE -DPIC -fPIC -D_REENTRANT
-DVERSION=\"$(VERSION)\" installwatch.c
+
+ localdecls.h:
+ ./create-localdecls
diff --git a/utils/installwatch/remove-root-check.patch
b/utils/installwatch/remove-root-check.patch
new file mode 100644
index 0000000..d1667f6
--- /dev/null
+++ b/utils/installwatch/remove-root-check.patch
@@ -0,0 +1,20 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index 7db45c9..3284760 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -1063,15 +1063,6 @@ #endif
+ if(NULL==__instw.root) return -1;
+ strcpy(__instw.root,wrkpath);
+
+- /* this root path must exist */
+- if(__instw.root[0]=='\0' || true_stat(__instw.root,&info)) {
+- fprintf(stderr,
+- "Please check the INSTW_ROOTPATH and "
+- "be sure that it does exist please !\n"
+- "given value : %s\n", __instw.root);
+- return -1;
+- }
+-
+ if((pbackup=getenv("INSTW_BACKUP"))) {
+ if( !strcmp(pbackup,"1") ||
+ !strcmp(pbackup,"yes") ||
diff --git a/utils/installwatch/utimes-addition.patch
b/utils/installwatch/utimes-addition.patch
new file mode 100644
index 0000000..d7c10c4
--- /dev/null
+++ b/utils/installwatch/utimes-addition.patch
@@ -0,0 +1,63 @@
+diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
+index a626b55..e2b2e9f 100644
+--- a/installwatch-0.7.0beta4/installwatch.c
++++ b/installwatch-0.7.0beta4/installwatch.c
+@@ -90,6 +90,7 @@ static int (*true_symlink)(const char *,
+ static int (*true_truncate)(const char *, TRUNCATE_T);
+ static int (*true_unlink)(const char *);
+ static int (*true_utime)(const char *,const struct utimbuf *);
++static int (*true_utimes)(const char *,const struct timeval *);
+
+ #if(GLIBC_MINOR >= 1)
+
+@@ -314,6 +315,7 @@ static void initialize(void) {
+ true_truncate = dlsym(libc_handle, "truncate");
+ true_unlink = dlsym(libc_handle, "unlink");
+ true_utime = dlsym(libc_handle, "utime");
++ true_utimes = dlsym(libc_handle, "utimes");
+
+ #if(GLIBC_MINOR >= 1)
+ true_creat64 = dlsym(libc_handle, "creat64");
+@@ -3112,6 +3114,42 @@ int utime (const char *pathname, const s
+ return result;
+ }
+
++int utimes (const char *pathname, const struct timeval *newtimes) {
++ int result;
++ instw_t instw;
++
++ if (!libc_handle)
++ initialize();
++
++#if DEBUG
++ debug(2,"utimes(%s,newtimes)\n",pathname);
++#endif
++
++ /* We were asked to work in "real" mode */
++ if( !(__instw.gstatus & INSTW_INITIALIZED) ||
++ !(__instw.gstatus & INSTW_OKWRAP) ) {
++ result=true_utimes(pathname,newtimes);
++ return result;
++ }
++
++ instw_new(&instw);
++ instw_setpath(&instw,pathname);
++
++#if DEBUG
++ instw_print(&instw);
++#endif
++
++ backup(instw.truepath);
++ instw_apply(&instw);
++
++ result=true_utimes(instw.translpath,newtimes);
++ log("%d\tutimes\t%s\t#%s\n",result,instw.reslvpath,error(result));
++
++ instw_delete(&instw);
++
++ return result;
++}
++
+ #if(GLIBC_MINOR >= 1)
+
+ int creat64(const char *pathname, __mode_t mode) {




Archive powered by MHonArc 2.6.24.

Top of Page