diff options
Diffstat (limited to 'source/n/rdist')
16 files changed, 643 insertions, 165 deletions
diff --git a/source/n/rdist/rdist-6.1.5-00.linux.diff b/source/n/rdist/rdist-6.1.5-00.linux.diff new file mode 100644 index 00000000..1f9fb824 --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-00.linux.diff @@ -0,0 +1,23 @@ +diff: rdist-6.1.5/config/mf: No such file or directory +--- rdist-6.1.5/config/os-linux.h.linux Mon Nov 9 22:59:59 1998 ++++ rdist-6.1.5/config/os-linux.h Thu Nov 12 14:50:35 1998 +@@ -58,7 +58,7 @@ + /* + * Select the type of executable file format. + */ +-#define EXE_TYPE EXE_AOUT ++#define EXE_TYPE EXE_ELF + + /* + * Select the type of statfs() system call (if any). +--- rdist-6.1.5/mf/Makefile.var.linux Tue Nov 10 00:02:11 1998 ++++ rdist-6.1.5/mf/Makefile.var Thu Nov 12 14:50:35 1998 +@@ -67,7 +67,7 @@ + # + # Name of YACC. + # +-#YACC = bison -y ++YACC = bison -y + + OPT = -g + RM = rm diff --git a/source/n/rdist/rdist-6.1.5-01.links.diff b/source/n/rdist/rdist-6.1.5-01.links.diff new file mode 100644 index 00000000..187dce4d --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-01.links.diff @@ -0,0 +1,74 @@ +--- rdist-6.1.5/src/client.c.links Wed Feb 17 17:46:09 1999 ++++ rdist-6.1.5/src/client.c Wed Feb 17 17:51:15 1999 +@@ -309,6 +309,18 @@ + return(0); + } + ++void freelinkinfo(lp) ++ struct linkbuf *lp; ++{ ++ if (lp->pathname) ++ free(lp->pathname); ++ if (lp->src) ++ free(lp->src); ++ if (lp->target) ++ free(lp->target); ++ free(lp); ++} ++ + /* + * Save and retrieve hard link info + */ +@@ -317,6 +329,7 @@ + { + struct linkbuf *lp; + ++ /* xxx: linear search doesn't scale with many links */ + for (lp = ihead; lp != NULL; lp = lp->nextp) + if (lp->inum == statp->st_ino && lp->devnum == statp->st_dev) { + lp->count--; +@@ -329,12 +342,14 @@ + lp->inum = statp->st_ino; + lp->devnum = statp->st_dev; + lp->count = statp->st_nlink - 1; +- (void) strcpy(lp->pathname, target); +- (void) strcpy(lp->src, source); ++ lp->pathname = strdup(target); ++ lp->src = strdup(source); + if (Tdest) +- (void) strcpy(lp->target, Tdest); ++ lp->target = strdup(Tdest); + else +- *lp->target = CNULL; ++ lp->target = NULL; ++ if (!lp->pathname || !lp->src || !(Tdest && lp->target)) ++ fatalerr("Cannot malloc memory in linkinfo."); + + return((struct linkbuf *) NULL); + } +--- rdist-6.1.5/src/docmd.c.links Wed Feb 17 17:51:23 1999 ++++ rdist-6.1.5/src/docmd.c Wed Feb 17 17:52:44 1999 +@@ -586,7 +586,7 @@ + if (!nflag) { + register struct linkbuf *nextl, *l; + +- for (l = ihead; l != NULL; free((char *)l), l = nextl) { ++ for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) { + nextl = l->nextp; + if (contimedout || IS_ON(opts, DO_IGNLNKS) || + l->count == 0) +--- rdist-6.1.5/include/defs.h.links Wed Feb 17 17:52:58 1999 ++++ rdist-6.1.5/include/defs.h Wed Feb 17 17:53:47 1999 +@@ -276,9 +276,9 @@ + ino_t inum; + dev_t devnum; + int count; +- char pathname[BUFSIZ]; +- char src[BUFSIZ]; +- char target[BUFSIZ]; ++ char *pathname; ++ char *src; ++ char *target; + struct linkbuf *nextp; + }; + diff --git a/source/n/rdist/rdist-6.1.5-03.hardlink.diff b/source/n/rdist/rdist-6.1.5-03.hardlink.diff new file mode 100644 index 00000000..5eeebc1c --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-03.hardlink.diff @@ -0,0 +1,20 @@ +--- rdist-6.1.5/src/client.c.hardlink Thu Jun 3 13:56:31 1999 ++++ rdist-6.1.5/src/client.c Thu Jun 3 14:00:06 1999 +@@ -348,7 +348,7 @@ + lp->target = strdup(Tdest); + else + lp->target = NULL; +- if (!lp->pathname || !lp->src || !(Tdest && lp->target)) ++ if (!lp->pathname || !lp->src || (Tdest && !lp->target)) + fatalerr("Cannot malloc memory in linkinfo."); + + return((struct linkbuf *) NULL); +@@ -370,7 +370,7 @@ + "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n", + rname, lp->pathname, lp->src, lp->target); + +- if (*lp->target == CNULL) ++ if (lp->target == NULL || *lp->target == CNULL) + (void) sendcmd(C_RECVHARDLINK, "%o %s %s", + opts, lp->pathname, rname); + else { diff --git a/source/n/rdist/rdist-6.1.5-bison.diff b/source/n/rdist/rdist-6.1.5-04.bison.diff index a09130ab..a09130ab 100644 --- a/source/n/rdist/rdist-6.1.5-bison.diff +++ b/source/n/rdist/rdist-6.1.5-04.bison.diff diff --git a/source/n/rdist/rdist-6.1.5-varargs.diff b/source/n/rdist/rdist-6.1.5-05.varargs.diff index cf2786d2..cf2786d2 100644 --- a/source/n/rdist/rdist-6.1.5-varargs.diff +++ b/source/n/rdist/rdist-6.1.5-05.varargs.diff diff --git a/source/n/rdist/rdist-6.1.5-06.maxargs.diff b/source/n/rdist/rdist-6.1.5-06.maxargs.diff new file mode 100644 index 00000000..4fbe147b --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-06.maxargs.diff @@ -0,0 +1,11 @@ +--- rdist-6.1.5/src/setargs.c.maxargs 1998-11-10 05:15:56.000000000 +0100 ++++ rdist-6.1.5/src/setargs.c 2003-09-04 14:39:03.000000000 +0200 +@@ -58,7 +58,7 @@ + * Set process argument functions + */ + +-#define MAXUSERENVIRON 40 ++#define MAXUSERENVIRON 1024 + char **Argv = NULL; + char *LastArgv = NULL; + char *UserEnviron[MAXUSERENVIRON+1]; diff --git a/source/n/rdist/rdist-6.1.5-07.lfs.diff b/source/n/rdist/rdist-6.1.5-07.lfs.diff new file mode 100644 index 00000000..e1fe2a18 --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-07.lfs.diff @@ -0,0 +1,137 @@ +--- rdist-6.1.5/src/client.c.lfs 2003-12-16 23:43:56.000000000 +0100 ++++ rdist-6.1.5/src/client.c 2003-12-16 23:46:56.000000000 +0100 +@@ -414,9 +414,9 @@ + /* + * Send file info + */ +- (void) sendcmd(C_RECVREG, "%o %04o %ld %ld %ld %s %s %s", ++ (void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s", + opts, stb->st_mode & 07777, +- (long) stb->st_size, ++ (off_t) stb->st_size, + stb->st_mtime, stb->st_atime, + user, group, rname); + if (response() < 0) { +@@ -424,8 +424,8 @@ + return(-1); + } + +- debugmsg(DM_MISC, "Send file '%s' %d bytes\n", +- rname, (long) stb->st_size); ++ debugmsg(DM_MISC, "Send file '%s' %lld bytes\n", ++ rname, (off_t) stb->st_size); + + /* + * Set remote time out alarm handler. +@@ -676,9 +676,9 @@ + /* + * Gather and send basic link info + */ +- (void) sendcmd(C_RECVSYMLINK, "%o %04o %ld %ld %ld %s %s %s", ++ (void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s", + opts, stb->st_mode & 07777, +- (long) stb->st_size, ++ (off_t) stb->st_size, + stb->st_mtime, stb->st_atime, + user, group, rname); + if (response() < 0) +@@ -858,7 +858,7 @@ + /* + * Parse size + */ +- size = strtol(cp, &cp, 10); ++ size = strtoll(cp, &cp, 10); + if (*cp++ != ' ') { + error("update: size not delimited"); + return(US_NOTHING); +@@ -910,8 +910,8 @@ + + debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n", + rname, lmode, rmode); +- debugmsg(DM_MISC, "update(%s,) size %d mtime %d owner '%s' grp '%s'\n", +- rname, (int) size, mtime, owner, group); ++ debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'\n", ++ rname, (off_t) size, mtime, owner, group); + + if (statp->st_mtime != mtime) { + if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) { +@@ -937,8 +937,8 @@ + } + + if (statp->st_size != size) { +- debugmsg(DM_MISC, "size does not match (%d != %d).\n", +- (int) statp->st_size, size); ++ debugmsg(DM_MISC, "size does not match (%lld != %lld).\n", ++ statp->st_size, size); + return(US_OUTDATE); + } + +--- rdist-6.1.5/src/server.c.lfs 1998-11-10 05:15:31.000000000 +0100 ++++ rdist-6.1.5/src/server.c 2003-12-16 23:50:19.000000000 +0100 +@@ -645,8 +645,8 @@ + case S_IFLNK: + case S_IFDIR: + case S_IFREG: +- (void) sendcmd(QC_YES, "%ld %ld %o %s %s", +- (long) stb.st_size, ++ (void) sendcmd(QC_YES, "%lld %ld %o %s %s", ++ (off_t) stb.st_size, + stb.st_mtime, + stb.st_mode & 07777, + getusername(stb.st_uid, target, options), +@@ -1388,7 +1388,7 @@ + /* + * Get file size + */ +- size = strtol(cp, &cp, 10); ++ size = strtoll(cp, &cp, 10); + if (*cp++ != ' ') { + error("recvit: size not delimited"); + return; +@@ -1441,7 +1441,7 @@ + } + + debugmsg(DM_MISC, +- "recvit: opts = %04o mode = %04o size = %d mtime = %d", ++ "recvit: opts = %04o mode = %04o size = %lld mtime = %d", + opts, mode, size, mtime); + debugmsg(DM_MISC, + "recvit: owner = '%s' group = '%s' file = '%s' catname = %d isdir = %d", +--- rdist-6.1.5/include/defs.h.lfs 2003-12-16 23:43:56.000000000 +0100 ++++ rdist-6.1.5/include/defs.h 2003-12-16 23:43:56.000000000 +0100 +@@ -22,6 +22,8 @@ + #include <stdlib.h> + #endif /* _POSIX_SOURCE */ + #include <stdio.h> ++#include <string.h> ++#include <mntent.h> + #include <ctype.h> + #include <errno.h> + #include <pwd.h> +@@ -317,15 +319,6 @@ + #endif /* USE_STATDB */ + + /* +- * System function declarations +- */ +-char *hasmntopt(); +-char *strchr(); +-char *strdup(); +-char *strrchr(); +-char *strtok(); +- +-/* + * Our own declarations. + */ + char *exptilde(); +--- rdist-6.1.5/Makefile.local.lfs 1998-11-10 04:36:31.000000000 +0100 ++++ rdist-6.1.5/Makefile.local 2003-12-16 23:43:56.000000000 +0100 +@@ -20,7 +20,7 @@ + # Add any local definitions you want pass to the compiler to DEFS_LOCAL + # below. This includes those items found in "config/config.h". + # +-#DEFS_LOCAL = -DDIRECT_RCMD ++DEFS_LOCAL = -O2 -g -pipe -Wall -D_POSIX_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + + # + # Add any local libraries that your system might need to LIBS_LOCAL below. diff --git a/source/n/rdist/rdist-6.1.5-cleanup.diff b/source/n/rdist/rdist-6.1.5-08.cleanup.diff index 19429134..5b5bfa6c 100644 --- a/source/n/rdist/rdist-6.1.5-cleanup.diff +++ b/source/n/rdist/rdist-6.1.5-08.cleanup.diff @@ -7,7 +7,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: gram.y,v 6.30 1998/11/10 04:10:42 mcooper Exp $"; @@ -170,7 +170,7 @@ ; @@ -112,7 +112,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: rdist.c,v 6.66 1998/11/10 04:13:49 mcooper Exp $"; @@ -80,7 +80,7 @@ char *name; @@ -232,7 +232,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: client.c,v 6.82 1998/11/10 04:08:47 mcooper Exp $"; @@ -84,7 +84,7 @@ int destdir; @@ -371,7 +371,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: child.c,v 6.29 1998/11/10 04:18:56 mcooper Exp $"; @@ -90,7 +90,7 @@ static void removechild(child) @@ -438,7 +438,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: docmd.c,v 6.87 1998/11/10 04:08:32 mcooper Exp $"; @@ -99,10 +99,10 @@ */ @@ -623,7 +623,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: distopt.c,v 6.12 1998/11/10 04:09:11 mcooper Exp $"; @@ -55,7 +55,7 @@ extern DISTOPTINFO *getdistopt(name) @@ -679,7 +679,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: expand.c,v 6.19 1998/11/10 04:09:31 mcooper Exp $"; @@ -81,9 +81,9 @@ sizeof(*sortbase), argcmp), sortbase = &eargv[eargc] @@ -857,7 +857,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: lookup.c,v 6.9 1998/11/10 04:12:56 mcooper Exp $"; @@ -68,11 +68,12 @@ /* @@ -896,7 +896,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: isexec.c,v 6.22 1998/11/10 04:11:42 mcooper Exp $"; --- rdist-6.1.5/src/signal.c.cleanup 1998-11-10 05:16:13.000000000 +0100 +++ rdist-6.1.5/src/signal.c 2003-12-17 11:38:16.000000000 +0100 @@ -907,7 +907,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: signal.c,v 6.2 1998/11/10 04:16:13 mcooper Exp $"; --- rdist-6.1.5/src/rshrcmd.c.cleanup 1998-11-10 05:15:07.000000000 +0100 +++ rdist-6.1.5/src/rshrcmd.c 2003-12-17 11:38:16.000000000 +0100 @@ -918,7 +918,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: rshrcmd.c,v 1.9 1998/11/10 04:15:07 mcooper Exp $"; @@ -34,6 +34,7 @@ * program in place of a direct rcmd() function call so as to @@ -945,7 +945,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: common.c,v 6.84 1998/11/10 04:09:01 mcooper Exp $"; @@ -87,14 +87,14 @@ /* @@ -1263,7 +1263,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: message.c,v 6.25 1998/11/10 04:13:30 mcooper Exp $"; @@ -97,7 +97,7 @@ */ @@ -1408,7 +1408,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: setargs.c,v 6.5 1998/11/10 04:15:56 mcooper Exp $"; @@ -66,12 +66,12 @@ /* @@ -1474,7 +1474,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: rdistd.c,v 6.23 1998/11/10 04:14:06 mcooper Exp $"; @@ -53,21 +53,12 @@ @@ -1527,7 +1527,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: server.c,v 6.86 1998/11/10 04:15:31 mcooper Exp $"; @@ -197,7 +197,7 @@ static UID_T last_uid = (UID_T)-2; @@ -1748,7 +1748,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: filesys.c,v 6.25 1998/11/10 04:10:17 mcooper Exp $"; @@ -72,7 +72,7 @@ static char last_pathname[MAXPATHLEN]; @@ -1833,7 +1833,7 @@ -#ifndef lint +#if 0 static char RCSid[] = - "$Id: rdist-6.1.5-cleanup.diff,v 1.1 2008/10/27 20:26:28 eha Exp eha $"; + "$Id: filesys-os.c,v 6.18 1998/11/10 04:09:58 mcooper Exp $"; @@ -314,7 +314,7 @@ diff --git a/source/n/rdist/rdist-6.1.5-09.svr4.diff b/source/n/rdist/rdist-6.1.5-09.svr4.diff new file mode 100644 index 00000000..15fc23fb --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-09.svr4.diff @@ -0,0 +1,10 @@ +--- rdist-6.1.5/build/os-type.svr4 2003-12-17 12:44:18.000000000 +0100 ++++ rdist-6.1.5/build/os-type 2003-12-17 12:44:29.000000000 +0100 +@@ -83,7 +83,6 @@ + if [ -z "${OS}" -a ! -z "${uname}" ]; then + case "`$uname -a | tr '[A-Z]' '[a-z]'`" in + osf1*) OS=break;; +- *"4.0"*) OS=svr4;; # There has to be a better way + *" dcosx "*) OS=dcosx;; + *"cx/ux"*) OS=cxux;; + *"hp-ux"*) # HP-UX 9.x diff --git a/source/n/rdist/rdist-6.1.5-10.ssh.diff b/source/n/rdist/rdist-6.1.5-10.ssh.diff new file mode 100644 index 00000000..f70beb9b --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-10.ssh.diff @@ -0,0 +1,9 @@ +--- rdist-6.1.5/src/rshrcmd.c.dist Tue Dec 12 08:20:56 1995 ++++ rdist-6.1.5/src/rshrcmd.c Wed Dec 11 07:14:13 1996 +@@ -64,5 +64,5 @@ + sp[0]. */ + (void) close(sp[0]); +- if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0 || dup2(0, 2) < 0) { ++ if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0) { + error("dup2 failed: %s.", SYSERR); + _exit(255); diff --git a/source/n/rdist/rdist-6.1.5-11.mkstemp.diff b/source/n/rdist/rdist-6.1.5-11.mkstemp.diff new file mode 100644 index 00000000..9d9297a8 --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-11.mkstemp.diff @@ -0,0 +1,23 @@ +--- rdist-6.1.5/src/server.c.mkstemp 2004-05-25 14:29:37.279312752 +0200 ++++ rdist-6.1.5/src/server.c 2004-05-25 14:31:27.050744340 +0200 +@@ -1479,11 +1479,18 @@ + *file = '/'; + } + fd = mkstemp(new); +- if (fd < 0) { ++ /* ++ * Don't consider it a fatal error if mkstemp() fails ++ * because parent directory didn't exist. (Missing ++ * parents are created later (in recvfile()) ++ */ ++ if ((fd < 0) && (errno != ENOENT)) { + error("Cannot set file name."); + return; ++ } else if (fd >= 0) { ++ close(fd); ++ unlink(new); /* Or symlink() will fail */ + } +- close(fd); + } + + /* diff --git a/source/n/rdist/rdist-6.1.5-12.stat64.diff b/source/n/rdist/rdist-6.1.5-12.stat64.diff new file mode 100644 index 00000000..3b02d3e8 --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-12.stat64.diff @@ -0,0 +1,80 @@ +--- rdist-6.1.5/src/filesys.c.stat64 2005-05-04 14:11:03.000000000 +0200 ++++ rdist-6.1.5/src/filesys.c 2005-05-04 14:11:10.000000000 +0200 +@@ -430,8 +430,8 @@ + */ + int getfilesysinfo(file, freespace, freefiles) + char *file; +- long *freespace; +- long *freefiles; ++ fsblkcnt_t *freespace; ++ fsfilcnt_t *freefiles; + { + #if defined(STATFS_TYPE) + static statfs_t statfsbuf; +--- rdist-6.1.5/src/server.c.stat64 2005-05-04 14:11:23.000000000 +0200 ++++ rdist-6.1.5/src/server.c 2005-05-04 14:20:34.000000000 +0200 +@@ -62,8 +62,8 @@ + int catname = 0; /* cat name to target name */ + char *sptarget[32]; /* stack of saved ptarget's for directories */ + char *fromhost = NULL; /* Client hostname */ +-static long min_freespace = 0; /* Minimium free space on a filesystem */ +-static long min_freefiles = 0; /* Minimium free # files on a filesystem */ ++static fsblkcnt_t min_freespace = 0; /* Minimium free space on a filesystem */ ++static fsfilcnt_t min_freefiles = 0; /* Minimium free # files on a filesystem */ + int oumask; /* Old umask */ + + /* +@@ -1326,7 +1326,7 @@ + fatalerr("Expected digit, got '%s'.", cp); + return; + } +- min_freespace = (unsigned long) atoi(cp); ++ min_freespace = (fsblkcnt_t) atoll(cp); + break; + + case SC_FREEFILES: /* Minimium free files */ +@@ -1334,7 +1334,7 @@ + fatalerr("Expected digit, got '%s'.", cp); + return; + } +- min_freefiles = (unsigned long) atoi(cp); ++ min_freefiles = (fsfilcnt_t) atoll(cp); + break; + + case SC_LOGGING: /* Logging options */ +@@ -1364,7 +1364,8 @@ + time_t mtime, atime; + char *owner, *group, *file; + char new[MAXPATHLEN]; +- long freespace = -1, freefiles = -1; ++ fsfilcnt_t freefiles = -1; ++ fsblkcnt_t freespace = -1; + char *cp = cmd; + + /* +@@ -1499,7 +1500,7 @@ + */ + if (min_freespace || min_freefiles) { + /* Convert file size to kilobytes */ +- long fsize = (long) (size / 1024); ++ fsblkcnt_t fsize = (fsblkcnt_t) (size / 1024); + + if (getfilesysinfo(target, &freespace, &freefiles) != 0) + return; +@@ -1511,14 +1512,14 @@ + if (min_freespace && (freespace >= 0) && + (freespace - fsize < min_freespace)) { + error( +- "%s: Not enough free space on filesystem: min %d free %d", ++ "%s: Not enough free space on filesystem: min %lld free %lld", + target, min_freespace, freespace); + return; + } + if (min_freefiles && (freefiles >= 0) && + (freefiles - 1 < min_freefiles)) { + error( +- "%s: Not enough free files on filesystem: min %d free %d", ++ "%s: Not enough free files on filesystem: min %lld free %lld", + target, min_freefiles, freefiles); + return; + } diff --git a/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff b/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff new file mode 100644 index 00000000..d34aa78d --- /dev/null +++ b/source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff @@ -0,0 +1,32 @@ +--- rdist-6.1.5/src/message.c.thestokes 2006-04-19 17:30:39.000000000 -0400 ++++ rdist-6.1.5/src/message.c 2006-04-19 17:36:37.000000000 -0400 +@@ -793,15 +793,20 @@ + char *msg; + { + static char buf[MSGBUFSIZ]; +- +- ++nerrs; +- +- if (isserver) +- (void) sprintf(buf, "REMOTE ERROR: %s", msg); +- else +- (void) sprintf(buf, "LOCAL ERROR: %s", msg); +- +- _message(MT_FERROR, buf); ++ /* Don't reenter this function. There is a nasty infinite recursion ++ case that pops up when msgsndnotify tries to exit. */ ++ static int inside=0; ++ ++ if(inside==0){ ++ ++nerrs; ++ inside=1; ++ ++ if (isserver) ++ (void) sprintf(buf, "REMOTE ERROR: %s", msg); ++ else ++ (void) sprintf(buf, "LOCAL ERROR: %s", msg); ++ _message(MT_FERROR, buf); ++ } + + exit(nerrs); + } diff --git a/source/n/rdist/rdist-6.1.5.diff b/source/n/rdist/rdist-6.1.5.diff deleted file mode 100644 index 0445ca9b..00000000 --- a/source/n/rdist/rdist-6.1.5.diff +++ /dev/null @@ -1,107 +0,0 @@ -diff -ur rdist-6.1.5.orig/Makefile rdist-6.1.5/Makefile ---- rdist-6.1.5.orig/Makefile Mon Nov 9 19:36:06 1998 -+++ rdist-6.1.5/Makefile Tue Apr 3 10:56:28 2001 -@@ -17,9 +17,10 @@ - SHELL=/bin/sh - - all install install.man: FRC -- @for t in $(TARGETS); do \ -+ @for t in $(TARGETS); do ( \ - echo Making \"$@\" in \"$$t\"; \ - (cd $$t; ${MAKE} $@); \ -+ ) || exit 1; \ - done - - clean: -diff -ur rdist-6.1.5.orig/Makefile.local rdist-6.1.5/Makefile.local ---- rdist-6.1.5.orig/Makefile.local Mon Nov 9 19:36:31 1998 -+++ rdist-6.1.5/Makefile.local Tue Apr 3 10:56:28 2001 -@@ -15,6 +15,20 @@ - # or add your own line. - # - #BIN_DIR = /usr/bin -+BIN_DIR = /usr/bin -+MAN_1_DIR = /usr/man/man1 -+MAN_8_DIR = /usr/man/man8 -+RDIST_MODE = 755 -+RDISTD_MODE = 755 -+MAN_MODE = 644 -+MAN_OWNER = root -+MAN_GROUP = root -+BIN_GROUP = root -+ -+INSTALL = install -+YACC = bison -y -+ -+OPT = -Wall -O2 -pipe - - # - # Add any local definitions you want pass to the compiler to DEFS_LOCAL -Only in rdist-6.1.5: Makefile.local~ -Only in rdist-6.1.5: Makefile~ -diff -ur rdist-6.1.5.orig/config/os-linux.h rdist-6.1.5/config/os-linux.h ---- rdist-6.1.5.orig/config/os-linux.h Mon Nov 9 19:59:59 1998 -+++ rdist-6.1.5/config/os-linux.h Tue Apr 3 10:56:28 2001 -@@ -93,8 +93,8 @@ - /* - * Our types, usually these are uid_t and gid_t. - */ --typedef uid_t UID_T; /* Must be signed */ --typedef gid_t GID_T; /* Must be signed */ -+typedef int UID_T; /* Must be signed */ -+typedef int GID_T; /* Must be signed */ - - /* - * Generic pointer, used by memcpy, malloc, etc. Usually char or void. -Only in rdist-6.1.5/config: os-linux.h~ -diff -ur rdist-6.1.5.orig/doc/Makefile.real rdist-6.1.5/doc/Makefile.real ---- rdist-6.1.5.orig/doc/Makefile.real Mon Nov 9 21:40:06 1998 -+++ rdist-6.1.5/doc/Makefile.real Tue Apr 3 10:56:28 2001 -@@ -16,7 +16,7 @@ - - doc: - --install: -+install: install.man - - install.man: rdist.man rdistd.man - ${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST} -Only in rdist-6.1.5/doc: Makefile.real~ -diff -ur rdist-6.1.5.orig/doc/rdist.man rdist-6.1.5/doc/rdist.man ---- rdist-6.1.5.orig/doc/rdist.man Mon Nov 9 21:38:53 1998 -+++ rdist-6.1.5/doc/rdist.man Tue Apr 3 10:56:28 2001 -@@ -171,7 +171,7 @@ - .I rdist - was compiled with the location of the old rdist - (usually either --.I /usr/ucb/oldrdist -+.I /usr/bin/oldrdist - or - .I /usr/old/rdist) - and that program is available at run time. -@@ -511,7 +511,7 @@ - may be a colon seperated list of possible pathnames. - In this case, the first component of the path to exist is used. - i.e. --.B "/usr/ucb/rsh:/usr/bin/remsh", -+.B "/usr/bin/rsh:/usr/bin/remsh", - .B /usr/bsd/rsh. - .TP - .B "\-t \fItimeout\fR" -Only in rdist-6.1.5/doc: rdist.man~ -diff -ur rdist-6.1.5.orig/src/Makefile.real rdist-6.1.5/src/Makefile.real ---- rdist-6.1.5.orig/src/Makefile.real Mon Nov 9 20:03:46 1998 -+++ rdist-6.1.5/src/Makefile.real Tue Apr 3 10:56:28 2001 -@@ -52,9 +52,9 @@ - $(COMMONOBJS) $(MISSINGOBJS) - - install: -- $(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \ -+ $(INSTALL) ${IN_ARGS} -s -o $(BIN_OWNER) -m ${RDIST_MODE} \ - $(CLIENT_BIN) $(BIN_DIR)/$(CLIENT) -- $(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \ -+ $(INSTALL) ${IN_ARGS} -s -o ${BIN_OWNER} -m ${RDISTD_MODE} \ - $(SERVER_BIN) $(BIN_DIR)/$(SERVER) - - install.man: -Only in rdist-6.1.5/src: Makefile.real~ diff --git a/source/n/rdist/rdist-eu-license.txt b/source/n/rdist/rdist-eu-license.txt new file mode 100644 index 00000000..7ae1591b --- /dev/null +++ b/source/n/rdist/rdist-eu-license.txt @@ -0,0 +1,118 @@ + MagniComp - End User License Agreement + + www.MagniComp.com + + RDist Version 6.1 + + Version of This Document: 19990724 + +GRANT. + +MagniComp grants you a non-exclusive license to use RDist version 6.1 and +all subsequent versions called 6.1.X software (the "Software") free of +charge. + +This license does not entitle you to hard-copy documentation, support or +telephone assistance. MagniComp reserves the right at any time to alter +prices, features, specifications, capabilities, functions, licensing terms, +general availability of the Software. + +SCOPE OF GRANT. + +You may: + + * use the Software in any way you wish on any computer regardless of + ownership of said computer; + * redistribute the Software in any form, including source and binary, to + any party with or without charging a fee; + * copy the Software for any purpose. + +You may not: + + * remove or alter this notice; + * remove or alter any proprietary notices or labels on the Software. + +REQUIREMENTS. + + * All advertising materials mentioning features or use of this software + must display the following acknowledgement: + + This product includes software developed by MagniComp + (www.MagniComp.com) and its contributors. + + * Redistributions in binary form must reproduce this copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither name of MagniComp nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + +TITLE. + +Title, ownership rights, and intellectual property rights in the Software +shall remain in MagniComp and/or its suppliers. The Software is protected by +copyright and other intellectual property laws and by international +treaties. Title and related rights in the content accessed through the +Software is the property of the applicable content owner and may be +protected by applicable law. This license gives you no rights to such +content. + +TERMINATION. + +The license will terminate automatically if you fail to comply with the +limitations described herein. Upon termination of this license, you agree to +destroy all copies of the Software. + +DISCLAIMER OF WARRANTY. + +The Software is provided on an "AS IS" basis, without warranty of any kind, +including without limitation the warranties of merchantability, fitness for +a particular purpose and non-infringement. The entire risk as to the quality +and performance of the Software is borne by you. Should the Software prove +defective, you and not MagniComp or its suppliers assume the entire cost of +any service and repair. In addition, the security mechanisms implemented by +MagniComp software have inherent limitations, and you must determine that +the Software sufficiently meets your requirements. This disclaimer of +warranty constitutes an essential part of the agreement. SOME JURISDICTIONS +DO NOT ALLOW EXCLUSIONS OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT +APPLY TO YOU AND YOU MAY HAVE OTHER LEGAL RIGHTS THAT VARY BY JURISDICTION. + +LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR +OTHERWISE, SHALL MAGNICOMP OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR +ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF +GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL +OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL MAGNICOMP BE LIABLE FOR +ANY DAMAGES, EVEN IF MAGNICOMP SHALL HAVE BEEN INFORMED OF THE POSSIBILITY +OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. THIS LIMITATION OF +LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE +EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. FURTHERMORE, SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR +CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO +YOU. + +HIGH RISK ACTIVITIES. + +The Software is not fault-tolerant and is not designed, manufactured or +intended for use or resale as on-line control equipment in hazardous +environments requiring fail-safe performance, such as in the operation of +nuclear facilities, aircraft navigation or communication systems, air +traffic control, direct life support machines, or weapons systems, in which +the failure of the Software could lead directly to death, personal injury, +or severe physical or environmental damage ("High Risk Activities"). +MagniComp and its suppliers specifically disclaim any express or implied +warranty of fitness for High Risk Activities. + +MISCELLANEOUS. + +This Agreement represents the complete agreement concerning this license and +may amended only by a writing executed by both parties. If any provision of +this Agreement is held to be unenforceable, such provision shall be reformed +only to the extent necessary to make it enforceable. This Agreement shall be +governed by California law (except for conflict of law provisions). The +application the United Nations Convention of Contracts for the International +Sale of Goods is expressly excluded. + + END diff --git a/source/n/rdist/rdist.SlackBuild b/source/n/rdist/rdist.SlackBuild index e2dd87cd..66f48c9b 100755 --- a/source/n/rdist/rdist.SlackBuild +++ b/source/n/rdist/rdist.SlackBuild @@ -1,6 +1,5 @@ #!/bin/sh - -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,59 +19,108 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=6.1.5 -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-1} + +CWD=$(pwd) + +PKGNAM=rdist +VERSION=${VERSION:-6.1.5} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j7 "} -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-rdist +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +if [ "$TMP" = "" ]; then + TMP=/tmp +fi +PKG=$TMP/package-${PKGNAM} rm -rf $PKG -mkdir -p $TMP $PKG +mkdir -p $PKG -# Explode the package framework: -cd $PKG -explodepkg $CWD/_rdist.tar.gz +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2" +fi cd $TMP -rm -rf rdist-$VERSION -tar xvf $CWD/rdist-$VERSION.tar.gz || exit 1 -cd rdist-$VERSION || exit 1 + +rm -rf $PKGNAM-$VERSION +tar xf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1 + +cd ${PKGNAM}-$VERSION + +# Make sure ownerships and permissions are sane: chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -zcat $CWD/rdist-$VERSION.diff.gz | patch -p1 --backup -# Modern tools require patching: -zcat $CWD/rdist-6.1.5-bison.diff.gz | patch -p1 --verbose || exit 1 -zcat $CWD/rdist-6.1.5-cleanup.diff.gz | patch -p1 --verbose || exit 1 -zcat $CWD/rdist-6.1.5-varargs.diff.gz | patch -p1 --verbose || exit 1 +find . -perm 666 -exec chmod 644 {} \; +find . -perm 664 -exec chmod 644 {} \; +find . -perm 600 -exec chmod 644 {} \; +find . -perm 444 -exec chmod 644 {} \; +find . -perm 400 -exec chmod 644 {} \; +find . -perm 440 -exec chmod 644 {} \; +find . -perm 777 -exec chmod 755 {} \; +find . -perm 775 -exec chmod 755 {} \; +find . -perm 511 -exec chmod 755 {} \; +find . -perm 711 -exec chmod 755 {} \; +find . -perm 555 -exec chmod 755 {} \; +# Patch: +for diff in $CWD/*.diff.gz ; do + zcat $diff | patch -p1 --verbose || exit 1 +done + +# Build: make $NUMJOBS || make || exit 1 -cd src -strip rdist rdistd -cat rdist > $PKG/usr/bin/rdist -cat rdistd > $PKG/usr/bin/rdistd +# Install: +mkdir -p $PKG/usr/bin +cp -a src/{rdist,rdistd} $PKG/usr/bin + +mkdir -p $PKG/usr/man/man1 +cat doc/rdist.man | gzip -9c > $PKG/usr/man/man1/rdist.1.gz +cat doc/rdistd.man | gzip -9c > $PKG/usr/man/man1/rdistd.1.gz + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + $CWD/rdist-eu-license.txt Copyright README \ + $PKG/usr/doc/$PKGNAM-$VERSION -cd ../doc -cat rdist.man | gzip -9c > $PKG/usr/man/man1/rdist.1.gz -cat rdistd.man | gzip -9c > $PKG/usr/man/man1/rdistd.1.gz +# Strip binaries: +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) -cd .. -mkdir -p $PKG/usr/doc/rdist-$VERSION -cp -a README $PKG/usr/doc/rdist-$VERSION -chmod 644 $PKG/usr/doc/rdist-$VERSION/* +# Compress and link manpages, if any: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -# Build the package: -cd $PKG -/sbin/makepkg -l y -c n $TMP/rdist-$VERSION-$ARCH-$BUILD.txz +cd $TMP/package-${PKGNAM} +makepkg -l y -c n ../${PKGNAM}-$VERSION-$ARCH-$BUILD.txz |