added my Recipes
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
From 244861e2c9bb9cc44f4bd246964ba850a7cf1216 Mon Sep 17 00:00:00 2001
|
||||
From: Xin Ouyang <Xin.Ouyang@windriver.com>
|
||||
Date: Tue, 15 May 2012 15:06:43 +0800
|
||||
Subject: [PATCH] rdist: bitbake build
|
||||
|
||||
Upstream-Status: Inappropriate [OE specific]
|
||||
|
||||
---
|
||||
Makefile.local | 8 ++++----
|
||||
doc/Makefile.real | 4 +++-
|
||||
src/Makefile.real | 1 +
|
||||
3 files changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.local b/Makefile.local
|
||||
index 26092b2..389cb84 100644
|
||||
--- a/Makefile.local
|
||||
+++ b/Makefile.local
|
||||
@@ -14,7 +14,7 @@
|
||||
# BIN_DIR variable, you would uncomment the following line
|
||||
# or add your own line.
|
||||
#
|
||||
-#BIN_DIR = /usr/bin
|
||||
+BIN_DIR = ${DESTDIR}/${bindir}
|
||||
|
||||
#
|
||||
# Add any local definitions you want pass to the compiler to DEFS_LOCAL
|
||||
@@ -46,13 +46,13 @@ LIBS_LOCAL =
|
||||
# Set a site specific install program to use. Must support BSD style
|
||||
# install(1) arguments.
|
||||
#
|
||||
-#INSTALL = install
|
||||
+INSTALL = install
|
||||
|
||||
#
|
||||
# Site specific Man Page configuration.
|
||||
#
|
||||
-#MAN_1_DIR = /usr/local/man/man1
|
||||
-#MAN_8_DIR = /usr/local/man/man8
|
||||
+MAN_1_DIR = ${DESTDIR}/${mandir}/man1
|
||||
+MAN_8_DIR = ${DESTDIR}/${mandir}/man8
|
||||
#MAN_OWNER = bin
|
||||
#MAN_GROUP = bin
|
||||
#MAN_MODE = 644
|
||||
diff --git a/doc/Makefile.real b/doc/Makefile.real
|
||||
index 42cabec..e32c30b 100644
|
||||
--- a/doc/Makefile.real
|
||||
+++ b/doc/Makefile.real
|
||||
@@ -16,9 +16,11 @@ all:
|
||||
|
||||
doc:
|
||||
|
||||
-install:
|
||||
+install: install.man
|
||||
|
||||
install.man: rdist.man rdistd.man
|
||||
+ test -d ${MAN_1_DIR} || ${INSTALL} -d ${MAN_1_DIR}
|
||||
+ test -d ${MAN_8_DIR} || ${INSTALL} -d ${MAN_8_DIR}
|
||||
${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST}
|
||||
${INSTALL} ${INSTALL_ARGS} rdistd.man ${SERVER_DEST}
|
||||
|
||||
diff --git a/src/Makefile.real b/src/Makefile.real
|
||||
index 02179e4..9ec551d 100644
|
||||
--- a/src/Makefile.real
|
||||
+++ b/src/Makefile.real
|
||||
@@ -52,6 +52,7 @@ clean:
|
||||
$(COMMONOBJS) $(MISSINGOBJS)
|
||||
|
||||
install:
|
||||
+ test -d $(BIN_DIR) || $(INSTALL) -d $(BIN_DIR)
|
||||
$(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \
|
||||
$(CLIENT_BIN) $(BIN_DIR)/$(CLIENT)
|
||||
$(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- rdist-6.1.5/src/gram.y.bison 1998-11-10 05:10:42.000000000 +0100
|
||||
+++ rdist-6.1.5/src/gram.y 2003-06-04 16:02:19.000000000 +0200
|
||||
@@ -90,10 +90,10 @@
|
||||
struct namelist *namel;
|
||||
}
|
||||
|
||||
-%type <optval> OPTION, options
|
||||
-%type <string> NAME, STRING
|
||||
-%type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd
|
||||
-%type <namel> namelist, names, opt_namelist nlist
|
||||
+%type <optval> OPTION options
|
||||
+%type <string> NAME STRING
|
||||
+%type <subcmd> INSTALL NOTIFY EXCEPT PATTERN SPECIAL CMDSPECIAL cmdlist cmd
|
||||
+%type <namel> namelist names opt_namelist nlist
|
||||
|
||||
%%
|
||||
|
||||
@@ -101,19 +101,19 @@
|
||||
| file command
|
||||
;
|
||||
|
||||
-command: NAME '=' namelist = {
|
||||
+command: NAME '=' namelist {
|
||||
(void) lookup($1, INSERT, $3);
|
||||
}
|
||||
- | namelist ARROW namelist cmdlist = {
|
||||
+ | namelist ARROW namelist cmdlist {
|
||||
insert((char *)NULL, $1, $3, $4);
|
||||
}
|
||||
- | NAME COLON namelist ARROW namelist cmdlist = {
|
||||
+ | NAME COLON namelist ARROW namelist cmdlist {
|
||||
insert($1, $3, $5, $6);
|
||||
}
|
||||
- | namelist DCOLON NAME cmdlist = {
|
||||
+ | namelist DCOLON NAME cmdlist {
|
||||
append((char *)NULL, $1, $3, $4);
|
||||
}
|
||||
- | NAME COLON namelist DCOLON NAME cmdlist = {
|
||||
+ | NAME COLON namelist DCOLON NAME cmdlist {
|
||||
append($1, $3, $5, $6);
|
||||
}
|
||||
| error
|
||||
@@ -133,10 +133,10 @@
|
||||
}
|
||||
;
|
||||
|
||||
-nlist: NAME = {
|
||||
+nlist: NAME {
|
||||
$$ = makenl($1);
|
||||
}
|
||||
- | '(' names ')' = {
|
||||
+ | '(' names ')' {
|
||||
$$ = $2;
|
||||
}
|
||||
;
|
||||
@@ -144,7 +144,7 @@
|
||||
names: /* VOID */ {
|
||||
$$ = last_n = NULL;
|
||||
}
|
||||
- | names NAME = {
|
||||
+ | names NAME {
|
||||
if (last_n == NULL)
|
||||
$$ = last_n = makenl($2);
|
||||
else {
|
||||
@@ -158,7 +158,7 @@
|
||||
cmdlist: /* VOID */ {
|
||||
$$ = last_sc = NULL;
|
||||
}
|
||||
- | cmdlist cmd = {
|
||||
+ | cmdlist cmd {
|
||||
if (last_sc == NULL)
|
||||
$$ = last_sc = $2;
|
||||
else {
|
||||
@@ -169,7 +169,7 @@
|
||||
}
|
||||
;
|
||||
|
||||
-cmd: INSTALL options opt_namelist ';' = {
|
||||
+cmd: INSTALL options opt_namelist ';' {
|
||||
register struct namelist *nl;
|
||||
|
||||
$1->sc_options = $2 | options;
|
||||
@@ -185,17 +185,17 @@
|
||||
}
|
||||
$$ = $1;
|
||||
}
|
||||
- | NOTIFY namelist ';' = {
|
||||
+ | NOTIFY namelist ';' {
|
||||
if ($2 != NULL)
|
||||
$1->sc_args = expand($2, E_VARS);
|
||||
$$ = $1;
|
||||
}
|
||||
- | EXCEPT namelist ';' = {
|
||||
+ | EXCEPT namelist ';' {
|
||||
if ($2 != NULL)
|
||||
$1->sc_args = expand($2, E_ALL);
|
||||
$$ = $1;
|
||||
}
|
||||
- | PATTERN namelist ';' = {
|
||||
+ | PATTERN namelist ';' {
|
||||
struct namelist *nl;
|
||||
char *cp, *re_comp();
|
||||
|
||||
@@ -205,13 +205,13 @@
|
||||
$1->sc_args = expand($2, E_VARS);
|
||||
$$ = $1;
|
||||
}
|
||||
- | SPECIAL opt_namelist STRING ';' = {
|
||||
+ | SPECIAL opt_namelist STRING ';' {
|
||||
if ($2 != NULL)
|
||||
$1->sc_args = expand($2, E_ALL);
|
||||
$1->sc_name = $3;
|
||||
$$ = $1;
|
||||
}
|
||||
- | CMDSPECIAL opt_namelist STRING ';' = {
|
||||
+ | CMDSPECIAL opt_namelist STRING ';' {
|
||||
if ($2 != NULL)
|
||||
$1->sc_args = expand($2, E_ALL);
|
||||
$1->sc_name = $3;
|
||||
@@ -219,18 +219,18 @@
|
||||
}
|
||||
;
|
||||
|
||||
-options: /* VOID */ = {
|
||||
+options: /* VOID */ {
|
||||
$$ = 0;
|
||||
}
|
||||
- | options OPTION = {
|
||||
+ | options OPTION {
|
||||
$$ |= $2;
|
||||
}
|
||||
;
|
||||
|
||||
-opt_namelist: /* VOID */ = {
|
||||
+opt_namelist: /* VOID */ {
|
||||
$$ = NULL;
|
||||
}
|
||||
- | namelist = {
|
||||
+ | namelist {
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
It fails to produce common.o when system load is high:
|
||||
|
||||
| In file included from common.c:57:
|
||||
| ../include/defs.h:49:10: fatal error: y.tab.h: No such file or directory
|
||||
| 49 | #include "y.tab.h"
|
||||
| | ^~~~~~~~~
|
||||
| compilation terminated.
|
||||
|
||||
Make $(COMMONOBJS) which include common.o to depends on related header files
|
||||
and y.tab.h to fix the parallel build failure.
|
||||
|
||||
Upstream-Status: Inappropriate [no upstream]
|
||||
|
||||
Signed-off-by: Kai Kang <kai.kang@windriver.com>
|
||||
---
|
||||
src/Makefile.real | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.real b/src/Makefile.real
|
||||
index e0f0dfc..53d4944 100644
|
||||
--- a/src/Makefile.real
|
||||
+++ b/src/Makefile.real
|
||||
@@ -41,7 +41,7 @@ $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
|
||||
$(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
|
||||
$(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
|
||||
|
||||
-$(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
|
||||
+$(COMMONOBJS) $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
|
||||
|
||||
y.tab.h: gram.c
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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 {
|
||||
@@ -0,0 +1,142 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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.
|
||||
@@ -0,0 +1,79 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
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
|
||||
@@ -0,0 +1,23 @@
|
||||
Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable.
|
||||
|
||||
Upstream-Status: Inappropriate [no upstream]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
|
||||
diff --git a/src/Makefile.real b/src/Makefile.real
|
||||
index 02179e4..9070974 100644
|
||||
--- a/src/Makefile.real
|
||||
+++ b/src/Makefile.real
|
||||
@@ -36,10 +36,10 @@ all: src
|
||||
src: $(CLIENT_BIN) $(SERVER_BIN)
|
||||
|
||||
$(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS)
|
||||
- $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
|
||||
+ $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
|
||||
|
||||
$(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS)
|
||||
- $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS)
|
||||
+ $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS)
|
||||
|
||||
$(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:rdist
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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];
|
||||
@@ -0,0 +1,28 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -0,0 +1,59 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- rdist-6.1.5/config/config.h.oldpath Tue Nov 10 04:59:48 1998
|
||||
+++ rdist-6.1.5/config/config.h Thu Jan 31 17:33:21 2002
|
||||
@@ -39,7 +39,7 @@
|
||||
* don't have the old rdist, then uncomment the "#undef" line.
|
||||
*/
|
||||
#ifndef _PATH_OLDRDIST
|
||||
-#define _PATH_OLDRDIST "/usr/ucb/oldrdist" /* Enable compat */
|
||||
+#define _PATH_OLDRDIST "/usr/bin/oldrdist" /* Enable compat */
|
||||
#endif
|
||||
/*#undef _PATH_OLDRDIST*/ /* Disable compat */
|
||||
|
||||
--- rdist-6.1.5/doc/rdist.man.oldpath Tue Nov 10 06:38:53 1998
|
||||
+++ rdist-6.1.5/doc/rdist.man Thu Jan 31 17:36:57 2002
|
||||
@@ -170,10 +170,9 @@
|
||||
This option will only work if
|
||||
.I rdist
|
||||
was compiled with the location of the old rdist
|
||||
-(usually either
|
||||
-.I /usr/ucb/oldrdist
|
||||
-or
|
||||
-.I /usr/old/rdist)
|
||||
+(the path
|
||||
+.I /usr/bin/oldrdist
|
||||
+is used on Red Hat linux)
|
||||
and that program is available at run time.
|
||||
.PP
|
||||
.I Rdist
|
||||
@@ -558,7 +557,7 @@
|
||||
should be of form
|
||||
.sp
|
||||
.RS
|
||||
-\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...
|
||||
+\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...\fR
|
||||
.RE
|
||||
.sp
|
||||
The valid facility names are:
|
||||
--- rdist-6.1.5/README.oldpath Fri Jul 19 19:24:09 1996
|
||||
+++ rdist-6.1.5/README Thu Jan 31 17:33:21 2002
|
||||
@@ -65,12 +65,12 @@
|
||||
|
||||
The way the old rdist started a server rdist is to run "rdist
|
||||
-Server". If the new rdist is run with the "-Server" option, then it
|
||||
-will exec a copy of the old rdist (usually /usr/old/rdist or
|
||||
-/usr/ucb/oldrdist). In this way, you get compatibility with hosts
|
||||
+will exec a copy of the old rdist (the path /usr/bin/oldrdist in Red
|
||||
+Hat linux). In this way, you get compatibility with hosts
|
||||
running the old rdist attempting to rdist to a machine running new
|
||||
rdist. If your host running new rdist wants to rdist to a host
|
||||
running the old rdist, then it must run the old rdist program
|
||||
-(/usr/old/rdist or /usr/ucb/oldrdist).
|
||||
+(/usr/bin/oldrdist in Red Hat linux).
|
||||
|
||||
The definition _PATH_OLDRDIST in "config/config.h" controls the
|
||||
location of the old rdist. If this is not defined, or the defined
|
||||
@@ -0,0 +1,14 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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);
|
||||
@@ -0,0 +1,85 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- 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
|
||||
@@ -0,0 +1,16 @@
|
||||
Upstream-Status: Inappropriate [1]
|
||||
|
||||
[1] Not the author, the patch is from:
|
||||
http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm
|
||||
|
||||
--- rdist-6.1.5/config/os-linux.h.varargs 2003-06-17 17:52:33.000000000 +0200
|
||||
+++ rdist-6.1.5/config/os-linux.h 2003-06-17 17:53:07.000000000 +0200
|
||||
@@ -68,7 +68,7 @@
|
||||
/*
|
||||
* Type of arg functions we have.
|
||||
*/
|
||||
-#define ARG_TYPE ARG_VARARGS
|
||||
+#define ARG_TYPE ARG_STDARG
|
||||
|
||||
/*
|
||||
* Do we have select()?
|
||||
@@ -0,0 +1,44 @@
|
||||
SUMMARY = "Remote file distribution client and server"
|
||||
DESCRIPTION = "\
|
||||
Rdist is a program to maintain identical copies of files over multiple \
|
||||
hosts. It preserves the owner, group, mode, and mtime of files if \
|
||||
possible and can update programs that are executing. \
|
||||
"
|
||||
SECTION = "console/network"
|
||||
LICENSE = "BSD-4-Clause"
|
||||
LIC_FILES_CHKSUM = "file://Copyright;md5=3f47ec9f64b11c8192ee05a66b5c2755"
|
||||
|
||||
SRC_URI = "http://www.magnicomp.com/download/${BPN}/${BP}.tar.gz"
|
||||
SRC_URI[md5sum] = "546779700af70aa5f9103e08782cdcac"
|
||||
SRC_URI[sha256sum] = "2bb0d0f5904eadc9e7fe3d60c15389d6897fcf884211070e289a6c710ff37f96"
|
||||
|
||||
SRC_URI += "file://rdist-6.1.5-linux.patch \
|
||||
file://rdist-6.1.5-links.patch \
|
||||
file://rdist-6.1.5-oldpath.patch \
|
||||
file://rdist-6.1.5-hardlink.patch \
|
||||
file://rdist-6.1.5-bison.patch \
|
||||
file://rdist-6.1.5-varargs.patch \
|
||||
file://rdist-6.1.5-maxargs.patch \
|
||||
file://rdist-6.1.5-lfs.patch \
|
||||
file://rdist-6.1.5-cleanup.patch \
|
||||
file://rdist-6.1.5-svr4.patch \
|
||||
file://rdist-6.1.5-ssh.patch \
|
||||
file://rdist-6.1.5-mkstemp.patch \
|
||||
file://rdist-6.1.5-stat64.patch \
|
||||
file://rdist-6.1.5-fix-msgsndnotify-loop.patch \
|
||||
file://rdist-6.1.5-bb-build.patch \
|
||||
file://rdist-6.1.5-makefile-add-ldflags.patch \
|
||||
file://rdist-6.1.5-fix-parallel-build.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/rdist/files/rdist/"
|
||||
UPSTREAM_CHECK_REGEX = "/rdist/(?P<pver>\d+(\.\d+)+)"
|
||||
|
||||
DEPENDS = "bison-native"
|
||||
|
||||
inherit autotools-brokensep
|
||||
|
||||
EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644"
|
||||
|
||||
# http://errors.yoctoproject.org/Errors/Details/186972/
|
||||
COMPATIBLE_HOST:libc-musl = 'null'
|
||||
Reference in New Issue
Block a user