MFH to r289370
Sponsored by: The FreeBSD Foundation
This commit is contained in:
commit
609a691ada
2
Makefile
2
Makefile
@ -251,7 +251,7 @@ ${TGTS}: .MAKE
|
||||
tinderbox toolchains kernel-toolchains: .MAKE
|
||||
.endif
|
||||
|
||||
${TGTS}:
|
||||
${TGTS}: .PHONY
|
||||
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
|
||||
|
||||
# The historic default "all" target creates files which may cause stale
|
||||
|
@ -575,6 +575,10 @@ _worldtmp:
|
||||
mkdir -p ${WORLDTMP}${TESTSBASE}
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
|
||||
-p ${WORLDTMP}${TESTSBASE} >/dev/null
|
||||
.if ${MK_DEBUG_FILES} != "no"
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
|
||||
-p ${WORLDTMP}/usr/lib/debug/${TESTSBASE} >/dev/null
|
||||
.endif
|
||||
.endif
|
||||
.for _mtree in ${LOCAL_MTREE}
|
||||
mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
|
||||
@ -910,6 +914,10 @@ distributeworld installworld stageworld: _installcheck_world
|
||||
-mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE}
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
|
||||
-p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null
|
||||
.if ${MK_DEBUG_FILES} != "no"
|
||||
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
|
||||
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null
|
||||
.endif
|
||||
.endif
|
||||
.if defined(NO_ROOT)
|
||||
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
|
||||
@ -1086,7 +1094,7 @@ INSTALLKERNEL= ${_kernel}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE
|
||||
buildkernel ${WMAKE_TGTS:N_worldtmp} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY
|
||||
|
||||
#
|
||||
# buildkernel
|
||||
|
20
UPDATING
20
UPDATING
@ -13,8 +13,8 @@ Items affecting the ports and packages system can be found in
|
||||
|
||||
NOTE: FreeBSD has switched from gcc to clang. If you have trouble bootstrapping
|
||||
from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
|
||||
the tip of head, and then rebuild without this option. The bootstrap process from
|
||||
older version of current across the gcc/clang cutover is a bit fragile.
|
||||
the tip of head, and then rebuild without this option. The bootstrap process
|
||||
from older version of current across the gcc/clang cutover is a bit fragile.
|
||||
|
||||
NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
FreeBSD 11.x has many debugging features turned on, in both the kernel
|
||||
@ -31,6 +31,22 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
disable the most expensive debugging functionality run
|
||||
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||
|
||||
20151012:
|
||||
If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster
|
||||
and etcupdate will now use this file. A custom sendmail.cf is now
|
||||
updated via this mechanism rather than via installworld. If you had
|
||||
excluded sendmail.cf in mergemaster.rc or etcupdate.conf, you may
|
||||
want to remove the exclusion or change it to "always install".
|
||||
/etc/mail/sendmail.cf is now managed the same way regardless of
|
||||
whether SENDMAIL_MC/SENDMAIL_CF is used. If you are not using
|
||||
SENDMAIL_MC/SENDMAIL_CF there should be no change in behavior.
|
||||
|
||||
20151011:
|
||||
Compatibility shims for legacy ATA device names have been removed.
|
||||
It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases
|
||||
and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.*
|
||||
environment variables, /dev/ad* and /dev/ar* symbolic links.
|
||||
|
||||
20151006:
|
||||
Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0.
|
||||
Please see the 20141231 entry below for information about prerequisites
|
||||
|
@ -1,11 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
OBJTOP= ${.OBJDIR}/../../..
|
||||
SRCTOP= ${.CURDIR}/../../..
|
||||
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/cat
|
||||
|
||||
NETBSD_ATF_TESTS_SH= cat_test
|
||||
|
||||
FILESDIR= ${TESTSDIR}
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/date
|
||||
|
||||
ATF_TESTS_SH= format_string_test
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -1,11 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
OBJTOP= ${.OBJDIR}/../../..
|
||||
SRCTOP= ${.CURDIR}/../../..
|
||||
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/expr
|
||||
|
||||
NETBSD_ATF_TESTS_SH= expr_test
|
||||
|
||||
ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g'
|
||||
|
@ -1,7 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/ls
|
||||
|
||||
ATF_TESTS_SH+= ls_tests
|
||||
# This seems like overkill, but the idea in mind is that all of the testcases
|
||||
# should be runnable as !root
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/mv
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/pax
|
||||
|
||||
TAP_TESTS_PERL= legacy_test
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/pkill
|
||||
|
||||
TAP_TESTS_SH= pgrep-F_test
|
||||
TAP_TESTS_SH+= pgrep-LF_test
|
||||
TAP_TESTS_SH+= pgrep-P_test
|
||||
|
@ -82,7 +82,7 @@ static int builtin_flags; /* evalcommand flags for builtins */
|
||||
|
||||
|
||||
char *commandname;
|
||||
struct strlist *cmdenviron;
|
||||
struct arglist *cmdenviron;
|
||||
int exitstatus; /* exit status of last command */
|
||||
int oexitstatus; /* saved exit status */
|
||||
|
||||
@ -352,20 +352,19 @@ evalfor(union node *n, int flags)
|
||||
{
|
||||
struct arglist arglist;
|
||||
union node *argp;
|
||||
struct strlist *sp;
|
||||
int i;
|
||||
int status;
|
||||
|
||||
arglist.lastp = &arglist.list;
|
||||
emptyarglist(&arglist);
|
||||
for (argp = n->nfor.args ; argp ; argp = argp->narg.next) {
|
||||
oexitstatus = exitstatus;
|
||||
expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
|
||||
}
|
||||
*arglist.lastp = NULL;
|
||||
|
||||
loopnest++;
|
||||
status = 0;
|
||||
for (sp = arglist.list ; sp ; sp = sp->next) {
|
||||
setvar(n->nfor.var, sp->text, 0);
|
||||
for (i = 0; i < arglist.count; i++) {
|
||||
setvar(n->nfor.var, arglist.args[i], 0);
|
||||
evaltree(n->nfor.body, flags);
|
||||
status = exitstatus;
|
||||
if (evalskip) {
|
||||
@ -396,12 +395,12 @@ evalcase(union node *n)
|
||||
union node *patp;
|
||||
struct arglist arglist;
|
||||
|
||||
arglist.lastp = &arglist.list;
|
||||
emptyarglist(&arglist);
|
||||
oexitstatus = exitstatus;
|
||||
expandarg(n->ncase.expr, &arglist, EXP_TILDE);
|
||||
for (cp = n->ncase.cases ; cp ; cp = cp->nclist.next) {
|
||||
for (patp = cp->nclist.pattern ; patp ; patp = patp->narg.next) {
|
||||
if (casematch(patp, arglist.list->text)) {
|
||||
if (casematch(patp, arglist.args[0])) {
|
||||
while (cp->nclist.next &&
|
||||
cp->type == NCLISTFALLTHRU &&
|
||||
cp->nclist.body == NULL)
|
||||
@ -508,7 +507,7 @@ exphere(union node *redir, struct arglist *fn)
|
||||
else {
|
||||
handler = &jmploc;
|
||||
expandarg(redir->nhere.doc, fn, 0);
|
||||
redir->nhere.expdoc = fn->list->text;
|
||||
redir->nhere.expdoc = fn->args[0];
|
||||
INTOFF;
|
||||
}
|
||||
handler = savehandler;
|
||||
@ -532,7 +531,7 @@ expredir(union node *n)
|
||||
|
||||
for (redir = n ; redir ; redir = redir->nfile.next) {
|
||||
struct arglist fn;
|
||||
fn.lastp = &fn.list;
|
||||
emptyarglist(&fn);
|
||||
switch (redir->type) {
|
||||
case NFROM:
|
||||
case NTO:
|
||||
@ -540,13 +539,13 @@ expredir(union node *n)
|
||||
case NAPPEND:
|
||||
case NCLOBBER:
|
||||
expandarg(redir->nfile.fname, &fn, EXP_TILDE);
|
||||
redir->nfile.expfname = fn.list->text;
|
||||
redir->nfile.expfname = fn.args[0];
|
||||
break;
|
||||
case NFROMFD:
|
||||
case NTOFD:
|
||||
if (redir->ndup.vname) {
|
||||
expandarg(redir->ndup.vname, &fn, EXP_TILDE);
|
||||
fixredir(redir, fn.list->text, 1);
|
||||
fixredir(redir, fn.args[0], 1);
|
||||
}
|
||||
break;
|
||||
case NXHERE:
|
||||
@ -753,28 +752,30 @@ isdeclarationcmd(struct narg *arg)
|
||||
static void
|
||||
xtracecommand(struct arglist *varlist, struct arglist *arglist)
|
||||
{
|
||||
struct strlist *sp;
|
||||
char sep = 0;
|
||||
const char *p, *ps4;
|
||||
const char *text, *p, *ps4;
|
||||
int i;
|
||||
|
||||
ps4 = expandstr(ps4val());
|
||||
out2str(ps4 != NULL ? ps4 : ps4val());
|
||||
for (sp = varlist->list ; sp ; sp = sp->next) {
|
||||
for (i = 0; i < varlist->count; i++) {
|
||||
text = varlist->args[i];
|
||||
if (sep != 0)
|
||||
out2c(' ');
|
||||
p = strchr(sp->text, '=');
|
||||
p = strchr(text, '=');
|
||||
if (p != NULL) {
|
||||
p++;
|
||||
outbin(sp->text, p - sp->text, out2);
|
||||
outbin(text, p - text, out2);
|
||||
out2qstr(p);
|
||||
} else
|
||||
out2qstr(sp->text);
|
||||
out2qstr(text);
|
||||
sep = ' ';
|
||||
}
|
||||
for (sp = arglist->list ; sp ; sp = sp->next) {
|
||||
for (i = 0; i < arglist->count; i++) {
|
||||
text = arglist->args[i];
|
||||
if (sep != 0)
|
||||
out2c(' ');
|
||||
out2qstr(sp->text);
|
||||
out2qstr(text);
|
||||
sep = ' ';
|
||||
}
|
||||
out2c('\n');
|
||||
@ -822,7 +823,6 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
int argc;
|
||||
char **envp;
|
||||
int varflag;
|
||||
struct strlist *sp;
|
||||
int mode;
|
||||
int pip[2];
|
||||
struct cmdentry cmdentry;
|
||||
@ -838,11 +838,12 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
int realstatus;
|
||||
int do_clearcmdentry;
|
||||
const char *path = pathval();
|
||||
int i;
|
||||
|
||||
/* First expand the arguments. */
|
||||
TRACE(("evalcommand(%p, %d) called\n", (void *)cmd, flags));
|
||||
arglist.lastp = &arglist.list;
|
||||
varlist.lastp = &varlist.list;
|
||||
emptyarglist(&arglist);
|
||||
emptyarglist(&varlist);
|
||||
varflag = 1;
|
||||
jp = NULL;
|
||||
do_clearcmdentry = 0;
|
||||
@ -857,25 +858,17 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
varflag = isdeclarationcmd(&argp->narg) ? 2 : 0;
|
||||
expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
|
||||
}
|
||||
*arglist.lastp = NULL;
|
||||
*varlist.lastp = NULL;
|
||||
expredir(cmd->ncmd.redirect);
|
||||
argc = 0;
|
||||
for (sp = arglist.list ; sp ; sp = sp->next)
|
||||
argc++;
|
||||
argc = arglist.count;
|
||||
/* Add one slot at the beginning for tryexec(). */
|
||||
argv = stalloc(sizeof (char *) * (argc + 2));
|
||||
argv++;
|
||||
|
||||
for (sp = arglist.list ; sp ; sp = sp->next) {
|
||||
TRACE(("evalcommand arg: %s\n", sp->text));
|
||||
*argv++ = sp->text;
|
||||
}
|
||||
*argv = NULL;
|
||||
memcpy(argv, arglist.args, sizeof(*argv) * argc);
|
||||
argv[argc] = NULL;
|
||||
lastarg = NULL;
|
||||
if (iflag && funcnest == 0 && argc > 0)
|
||||
lastarg = argv[-1];
|
||||
argv -= argc;
|
||||
lastarg = argv[argc - 1];
|
||||
|
||||
/* Print the command if xflag is set. */
|
||||
if (xflag)
|
||||
@ -895,9 +888,9 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
* Modify the command lookup path, if a PATH= assignment
|
||||
* is present
|
||||
*/
|
||||
for (sp = varlist.list ; sp ; sp = sp->next)
|
||||
if (strncmp(sp->text, PATH, sizeof(PATH) - 1) == 0) {
|
||||
path = sp->text + sizeof(PATH) - 1;
|
||||
for (i = 0; i < varlist.count; i++)
|
||||
if (strncmp(varlist.args[i], PATH, sizeof(PATH) - 1) == 0) {
|
||||
path = varlist.args[i] + sizeof(PATH) - 1;
|
||||
/*
|
||||
* On `PATH=... command`, we need to make
|
||||
* sure that the command isn't using the
|
||||
@ -999,7 +992,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
}
|
||||
if (cmdentry.cmdtype == CMDNORMAL &&
|
||||
cmd->ncmd.redirect == NULL &&
|
||||
varlist.list == NULL &&
|
||||
varlist.count == 0 &&
|
||||
(mode == FORK_FG || mode == FORK_NOJOB) &&
|
||||
!disvforkset() && !iflag && !mflag) {
|
||||
vforkexecshell(jp, argv, environment(), path,
|
||||
@ -1053,8 +1046,8 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
funcnest++;
|
||||
redirect(cmd->ncmd.redirect, REDIR_PUSH);
|
||||
INTON;
|
||||
for (sp = varlist.list ; sp ; sp = sp->next)
|
||||
mklocal(sp->text);
|
||||
for (i = 0; i < varlist.count; i++)
|
||||
mklocal(varlist.args[i]);
|
||||
exitstatus = oexitstatus;
|
||||
evaltree(getfuncnode(cmdentry.u.func),
|
||||
flags & (EV_TESTED | EV_EXIT));
|
||||
@ -1087,7 +1080,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
}
|
||||
savecmdname = commandname;
|
||||
savetopfile = getcurrentfile();
|
||||
cmdenviron = varlist.list;
|
||||
cmdenviron = &varlist;
|
||||
e = -1;
|
||||
savehandler = handler;
|
||||
if (setjmp(jmploc.loc)) {
|
||||
@ -1152,8 +1145,8 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
trputs("normal command: "); trargs(argv);
|
||||
#endif
|
||||
redirect(cmd->ncmd.redirect, 0);
|
||||
for (sp = varlist.list ; sp ; sp = sp->next)
|
||||
setvareq(sp->text, VEXPORT|VSTACK);
|
||||
for (i = 0; i < varlist.count; i++)
|
||||
setvareq(varlist.args[i], VEXPORT|VSTACK);
|
||||
envp = environment();
|
||||
shellexec(argv, envp, path, cmdentry.u.index);
|
||||
/*NOTREACHED*/
|
||||
@ -1336,6 +1329,8 @@ truecmd(int argc __unused, char **argv __unused)
|
||||
int
|
||||
execcmd(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Because we have historically not supported any options,
|
||||
* only treat "--" specially.
|
||||
@ -1343,13 +1338,11 @@ execcmd(int argc, char **argv)
|
||||
if (argc > 1 && strcmp(argv[1], "--") == 0)
|
||||
argc--, argv++;
|
||||
if (argc > 1) {
|
||||
struct strlist *sp;
|
||||
|
||||
iflag = 0; /* exit on error */
|
||||
mflag = 0;
|
||||
optschanged();
|
||||
for (sp = cmdenviron; sp ; sp = sp->next)
|
||||
setvareq(sp->text, VEXPORT|VSTACK);
|
||||
for (i = 0; i < cmdenviron->count; i++)
|
||||
setvareq(cmdenviron->args[i], VEXPORT|VSTACK);
|
||||
shellexec(argv + 1, environment(), pathval(), 0);
|
||||
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
extern char *commandname; /* currently executing command */
|
||||
extern int exitstatus; /* exit status of last command */
|
||||
extern int oexitstatus; /* saved exit status */
|
||||
extern struct strlist *cmdenviron; /* environment for builtin command */
|
||||
extern struct arglist *cmdenviron; /* environment for builtin command */
|
||||
|
||||
|
||||
struct backcmd { /* result of evalbackcmd */
|
||||
|
215
bin/sh/expand.c
215
bin/sh/expand.c
@ -96,7 +96,6 @@ static char *expdest; /* output of current string */
|
||||
static struct nodelist *argbackq; /* list of back quote expressions */
|
||||
static struct ifsregion ifsfirst; /* first struct in list of ifs regions */
|
||||
static struct ifsregion *ifslastp; /* last struct in list */
|
||||
static struct arglist exparg; /* holds expanded arg list */
|
||||
|
||||
static char *argstr(char *, int);
|
||||
static char *exptilde(char *, int);
|
||||
@ -110,15 +109,43 @@ static void varvalue(const char *, int, int, int);
|
||||
static void recordregion(int, int, int);
|
||||
static void removerecordregions(int);
|
||||
static void ifsbreakup(char *, struct arglist *);
|
||||
static void expandmeta(struct strlist *);
|
||||
static void expmeta(char *, char *);
|
||||
static void addfname(char *);
|
||||
static struct strlist *expsort(struct strlist *);
|
||||
static struct strlist *msort(struct strlist *, int);
|
||||
static void expandmeta(struct arglist *, struct arglist *);
|
||||
static void expmeta(char *, char *, struct arglist *);
|
||||
static int expsortcmp(const void *, const void *);
|
||||
static int patmatch(const char *, const char *, int);
|
||||
static char *cvtnum(int, char *);
|
||||
static void appendarglist(struct arglist *, char *);
|
||||
static int collate_range_cmp(wchar_t, wchar_t);
|
||||
|
||||
void
|
||||
emptyarglist(struct arglist *list)
|
||||
{
|
||||
|
||||
list->args = list->smallarg;
|
||||
list->count = 0;
|
||||
list->capacity = sizeof(list->smallarg) / sizeof(list->smallarg[0]);
|
||||
}
|
||||
|
||||
static void
|
||||
appendarglist(struct arglist *list, char *str)
|
||||
{
|
||||
char **newargs;
|
||||
int newcapacity;
|
||||
|
||||
if (list->count >= list->capacity) {
|
||||
newcapacity = list->capacity * 2;
|
||||
if (newcapacity < 16)
|
||||
newcapacity = 16;
|
||||
if (newcapacity > INT_MAX / (int)sizeof(newargs[0]))
|
||||
error("Too many entries in arglist");
|
||||
newargs = stalloc(newcapacity * sizeof(newargs[0]));
|
||||
memcpy(newargs, list->args, list->count * sizeof(newargs[0]));
|
||||
list->args = newargs;
|
||||
list->capacity = newcapacity;
|
||||
}
|
||||
list->args[list->count++] = str;
|
||||
}
|
||||
|
||||
static int
|
||||
collate_range_cmp(wchar_t c1, wchar_t c2)
|
||||
{
|
||||
@ -157,7 +184,7 @@ stputs_quotes(const char *data, const char *syntax, char *p)
|
||||
void
|
||||
expandarg(union node *arg, struct arglist *arglist, int flag)
|
||||
{
|
||||
struct strlist *sp;
|
||||
struct arglist exparg;
|
||||
char *p;
|
||||
|
||||
argbackq = arg->narg.backquote;
|
||||
@ -171,18 +198,12 @@ expandarg(union node *arg, struct arglist *arglist, int flag)
|
||||
}
|
||||
STPUTC('\0', expdest);
|
||||
p = grabstackstr(expdest);
|
||||
exparg.lastp = &exparg.list;
|
||||
emptyarglist(&exparg);
|
||||
if (flag & EXP_FULL) {
|
||||
ifsbreakup(p, &exparg);
|
||||
*exparg.lastp = NULL;
|
||||
exparg.lastp = &exparg.list;
|
||||
expandmeta(exparg.list);
|
||||
} else {
|
||||
sp = (struct strlist *)stalloc(sizeof (struct strlist));
|
||||
sp->text = p;
|
||||
*exparg.lastp = sp;
|
||||
exparg.lastp = &sp->next;
|
||||
}
|
||||
expandmeta(&exparg, arglist);
|
||||
} else
|
||||
appendarglist(arglist, p);
|
||||
while (ifsfirst.next != NULL) {
|
||||
struct ifsregion *ifsp;
|
||||
INTOFF;
|
||||
@ -191,11 +212,6 @@ expandarg(union node *arg, struct arglist *arglist, int flag)
|
||||
ifsfirst.next = ifsp;
|
||||
INTON;
|
||||
}
|
||||
*exparg.lastp = NULL;
|
||||
if (exparg.list) {
|
||||
*arglist->lastp = exparg.list;
|
||||
arglist->lastp = exparg.lastp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -984,7 +1000,6 @@ static void
|
||||
ifsbreakup(char *string, struct arglist *arglist)
|
||||
{
|
||||
struct ifsregion *ifsp;
|
||||
struct strlist *sp;
|
||||
char *start;
|
||||
char *p;
|
||||
char *q;
|
||||
@ -996,10 +1011,7 @@ ifsbreakup(char *string, struct arglist *arglist)
|
||||
|
||||
if (ifslastp == NULL) {
|
||||
/* Return entire argument, IFS doesn't apply to any of it */
|
||||
sp = (struct strlist *)stalloc(sizeof *sp);
|
||||
sp->text = start;
|
||||
*arglist->lastp = sp;
|
||||
arglist->lastp = &sp->next;
|
||||
appendarglist(arglist, start);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1038,10 +1050,7 @@ ifsbreakup(char *string, struct arglist *arglist)
|
||||
|
||||
/* Save this argument... */
|
||||
*q = '\0';
|
||||
sp = (struct strlist *)stalloc(sizeof *sp);
|
||||
sp->text = start;
|
||||
*arglist->lastp = sp;
|
||||
arglist->lastp = &sp->next;
|
||||
appendarglist(arglist, start);
|
||||
p++;
|
||||
|
||||
if (ifsspc != NULL) {
|
||||
@ -1071,12 +1080,8 @@ ifsbreakup(char *string, struct arglist *arglist)
|
||||
* Some recent clarification of the Posix spec say that it
|
||||
* should only generate one....
|
||||
*/
|
||||
if (had_param_ch || *start != 0) {
|
||||
sp = (struct strlist *)stalloc(sizeof *sp);
|
||||
sp->text = start;
|
||||
*arglist->lastp = sp;
|
||||
arglist->lastp = &sp->next;
|
||||
}
|
||||
if (had_param_ch || *start != 0)
|
||||
appendarglist(arglist, start);
|
||||
}
|
||||
|
||||
|
||||
@ -1086,45 +1091,42 @@ static char expdir[PATH_MAX];
|
||||
/*
|
||||
* Perform pathname generation and remove control characters.
|
||||
* At this point, the only control characters should be CTLESC and CTLQUOTEMARK.
|
||||
* The results are stored in the list exparg.
|
||||
* The results are stored in the list dstlist.
|
||||
*/
|
||||
static void
|
||||
expandmeta(struct strlist *str)
|
||||
expandmeta(struct arglist *srclist, struct arglist *dstlist)
|
||||
{
|
||||
char *p;
|
||||
struct strlist **savelastp;
|
||||
struct strlist *sp;
|
||||
int firstmatch;
|
||||
int i;
|
||||
char c;
|
||||
|
||||
while (str) {
|
||||
savelastp = exparg.lastp;
|
||||
for (i = 0; i < srclist->count; i++) {
|
||||
firstmatch = dstlist->count;
|
||||
if (!fflag) {
|
||||
p = str->text;
|
||||
p = srclist->args[i];
|
||||
for (; (c = *p) != '\0'; p++) {
|
||||
/* fast check for meta chars */
|
||||
if (c == '*' || c == '?' || c == '[') {
|
||||
INTOFF;
|
||||
expmeta(expdir, str->text);
|
||||
expmeta(expdir, srclist->args[i],
|
||||
dstlist);
|
||||
INTON;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (exparg.lastp == savelastp) {
|
||||
if (dstlist->count == firstmatch) {
|
||||
/*
|
||||
* no matches
|
||||
*/
|
||||
*exparg.lastp = str;
|
||||
rmescapes(str->text);
|
||||
exparg.lastp = &str->next;
|
||||
rmescapes(srclist->args[i]);
|
||||
appendarglist(dstlist, srclist->args[i]);
|
||||
} else {
|
||||
*exparg.lastp = NULL;
|
||||
*savelastp = sp = expsort(*savelastp);
|
||||
while (sp->next != NULL)
|
||||
sp = sp->next;
|
||||
exparg.lastp = &sp->next;
|
||||
qsort(&dstlist->args[firstmatch],
|
||||
dstlist->count - firstmatch,
|
||||
sizeof(dstlist->args[0]), expsortcmp);
|
||||
}
|
||||
str = str->next;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1134,7 +1136,7 @@ expandmeta(struct strlist *str)
|
||||
*/
|
||||
|
||||
static void
|
||||
expmeta(char *enddir, char *name)
|
||||
expmeta(char *enddir, char *name, struct arglist *arglist)
|
||||
{
|
||||
const char *p;
|
||||
const char *q;
|
||||
@ -1199,7 +1201,7 @@ expmeta(char *enddir, char *name)
|
||||
return;
|
||||
}
|
||||
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
|
||||
addfname(expdir);
|
||||
appendarglist(arglist, stsavestr(expdir));
|
||||
return;
|
||||
}
|
||||
endname = name + (p - name);
|
||||
@ -1251,7 +1253,7 @@ expmeta(char *enddir, char *name)
|
||||
continue;
|
||||
memcpy(enddir, dp->d_name, namlen + 1);
|
||||
if (atend)
|
||||
addfname(expdir);
|
||||
appendarglist(arglist, stsavestr(expdir));
|
||||
else {
|
||||
if (dp->d_type != DT_UNKNOWN &&
|
||||
dp->d_type != DT_DIR &&
|
||||
@ -1261,7 +1263,7 @@ expmeta(char *enddir, char *name)
|
||||
continue;
|
||||
enddir[namlen] = '/';
|
||||
enddir[namlen + 1] = '\0';
|
||||
expmeta(enddir + namlen + 1, endname);
|
||||
expmeta(enddir + namlen + 1, endname, arglist);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1271,81 +1273,13 @@ expmeta(char *enddir, char *name)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Add a file name to the list.
|
||||
*/
|
||||
|
||||
static void
|
||||
addfname(char *name)
|
||||
static int
|
||||
expsortcmp(const void *p1, const void *p2)
|
||||
{
|
||||
char *p;
|
||||
struct strlist *sp;
|
||||
const char *s1 = *(const char * const *)p1;
|
||||
const char *s2 = *(const char * const *)p2;
|
||||
|
||||
p = stsavestr(name);
|
||||
sp = (struct strlist *)stalloc(sizeof *sp);
|
||||
sp->text = p;
|
||||
*exparg.lastp = sp;
|
||||
exparg.lastp = &sp->next;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sort the results of file name expansion. It calculates the number of
|
||||
* strings to sort and then calls msort (short for merge sort) to do the
|
||||
* work.
|
||||
*/
|
||||
|
||||
static struct strlist *
|
||||
expsort(struct strlist *str)
|
||||
{
|
||||
int len;
|
||||
struct strlist *sp;
|
||||
|
||||
len = 0;
|
||||
for (sp = str ; sp ; sp = sp->next)
|
||||
len++;
|
||||
return msort(str, len);
|
||||
}
|
||||
|
||||
|
||||
static struct strlist *
|
||||
msort(struct strlist *list, int len)
|
||||
{
|
||||
struct strlist *p, *q = NULL;
|
||||
struct strlist **lpp;
|
||||
int half;
|
||||
int n;
|
||||
|
||||
if (len <= 1)
|
||||
return list;
|
||||
half = len >> 1;
|
||||
p = list;
|
||||
for (n = half ; --n >= 0 ; ) {
|
||||
q = p;
|
||||
p = p->next;
|
||||
}
|
||||
q->next = NULL; /* terminate first half of list */
|
||||
q = msort(list, half); /* sort first half of list */
|
||||
p = msort(p, len - half); /* sort second half */
|
||||
lpp = &list;
|
||||
for (;;) {
|
||||
if (strcmp(p->text, q->text) < 0) {
|
||||
*lpp = p;
|
||||
lpp = &p->next;
|
||||
if ((p = *lpp) == NULL) {
|
||||
*lpp = q;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
*lpp = q;
|
||||
lpp = &q->next;
|
||||
if ((q = *lpp) == NULL) {
|
||||
*lpp = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
return (strcmp(s1, s2));
|
||||
}
|
||||
|
||||
|
||||
@ -1666,11 +1600,11 @@ freebsd_wordexpcmd(int argc __unused, char **argv __unused)
|
||||
{
|
||||
struct arglist arglist;
|
||||
union node *args, *n;
|
||||
struct strlist *sp;
|
||||
size_t count, len;
|
||||
size_t len;
|
||||
int ch;
|
||||
int protected = 0;
|
||||
int fd = -1;
|
||||
int i;
|
||||
|
||||
while ((ch = nextopt("f:p")) != '\0') {
|
||||
switch (ch) {
|
||||
@ -1699,14 +1633,13 @@ freebsd_wordexpcmd(int argc __unused, char **argv __unused)
|
||||
}
|
||||
}
|
||||
outcslow(' ', out1);
|
||||
arglist.lastp = &arglist.list;
|
||||
emptyarglist(&arglist);
|
||||
for (n = args; n != NULL; n = n->narg.next)
|
||||
expandarg(n, &arglist, EXP_FULL | EXP_TILDE);
|
||||
*arglist.lastp = NULL;
|
||||
for (sp = arglist.list, count = len = 0; sp; sp = sp->next)
|
||||
count++, len += strlen(sp->text);
|
||||
out1fmt("%016zx %016zx", count, len);
|
||||
for (sp = arglist.list; sp; sp = sp->next)
|
||||
outbin(sp->text, strlen(sp->text) + 1, out1);
|
||||
for (i = 0, len = 0; i < arglist.count; i++)
|
||||
len += strlen(arglist.args[i]);
|
||||
out1fmt("%016x %016zx", arglist.count, len);
|
||||
for (i = 0; i < arglist.count; i++)
|
||||
outbin(arglist.args[i], strlen(arglist.args[i]) + 1, out1);
|
||||
return (0);
|
||||
}
|
||||
|
@ -33,15 +33,11 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
struct strlist {
|
||||
struct strlist *next;
|
||||
char *text;
|
||||
};
|
||||
|
||||
|
||||
struct arglist {
|
||||
struct strlist *list;
|
||||
struct strlist **lastp;
|
||||
char **args;
|
||||
int count;
|
||||
int capacity;
|
||||
char *smallarg[1];
|
||||
};
|
||||
|
||||
/*
|
||||
@ -55,6 +51,7 @@ struct arglist {
|
||||
#define EXP_LIT_QUOTED 0x40 /* for EXP_SPLIT_LIT, start off quoted */
|
||||
|
||||
|
||||
void emptyarglist(struct arglist *);
|
||||
union node;
|
||||
void expandarg(union node *, struct arglist *, int);
|
||||
void rmescapes(char *);
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/sh
|
||||
|
||||
TESTS_SUBDIRS+= builtins
|
||||
TESTS_SUBDIRS+= errors
|
||||
TESTS_SUBDIRS+= execution
|
||||
|
28
bin/sh/var.c
28
bin/sh/var.c
@ -403,14 +403,13 @@ setvareq_const(const char *s, int flags)
|
||||
*/
|
||||
|
||||
void
|
||||
listsetvar(struct strlist *list, int flags)
|
||||
listsetvar(struct arglist *list, int flags)
|
||||
{
|
||||
struct strlist *lp;
|
||||
int i;
|
||||
|
||||
INTOFF;
|
||||
for (lp = list ; lp ; lp = lp->next) {
|
||||
setvareq(savestr(lp->text), flags);
|
||||
}
|
||||
for (i = 0; i < list->count; i++)
|
||||
setvareq(savestr(list->args[i]), flags);
|
||||
INTON;
|
||||
}
|
||||
|
||||
@ -442,14 +441,14 @@ lookupvar(const char *name)
|
||||
char *
|
||||
bltinlookup(const char *name, int doall)
|
||||
{
|
||||
struct strlist *sp;
|
||||
struct var *v;
|
||||
char *result;
|
||||
int i;
|
||||
|
||||
result = NULL;
|
||||
for (sp = cmdenviron ; sp ; sp = sp->next) {
|
||||
if (varequal(sp->text, name))
|
||||
result = strchr(sp->text, '=') + 1;
|
||||
if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) {
|
||||
if (varequal(cmdenviron->args[i], name))
|
||||
result = strchr(cmdenviron->args[i], '=') + 1;
|
||||
}
|
||||
if (result != NULL)
|
||||
return result;
|
||||
@ -468,13 +467,12 @@ bltinlookup(const char *name, int doall)
|
||||
void
|
||||
bltinsetlocale(void)
|
||||
{
|
||||
struct strlist *lp;
|
||||
int act = 0;
|
||||
char *loc, *locdef;
|
||||
int i;
|
||||
|
||||
for (lp = cmdenviron ; lp ; lp = lp->next) {
|
||||
if (localevar(lp->text)) {
|
||||
if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) {
|
||||
if (localevar(cmdenviron->args[i])) {
|
||||
act = 1;
|
||||
break;
|
||||
}
|
||||
@ -507,11 +505,11 @@ bltinsetlocale(void)
|
||||
void
|
||||
bltinunsetlocale(void)
|
||||
{
|
||||
struct strlist *lp;
|
||||
int i;
|
||||
|
||||
INTOFF;
|
||||
for (lp = cmdenviron ; lp ; lp = lp->next) {
|
||||
if (localevar(lp->text)) {
|
||||
if (cmdenviron) for (i = 0; i < cmdenviron->count; i++) {
|
||||
if (localevar(cmdenviron->args[i])) {
|
||||
setlocale(LC_ALL, "");
|
||||
updatecharset();
|
||||
return;
|
||||
|
@ -114,8 +114,8 @@ extern int initial_localeisutf8;
|
||||
void initvar(void);
|
||||
void setvar(const char *, const char *, int);
|
||||
void setvareq(char *, int);
|
||||
struct strlist;
|
||||
void listsetvar(struct strlist *, int);
|
||||
struct arglist;
|
||||
void listsetvar(struct arglist *, int);
|
||||
char *lookupvar(const char *);
|
||||
char *bltinlookup(const char *, int);
|
||||
void bltinsetlocale(void);
|
||||
|
@ -1,12 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep
|
||||
.PATH: ${TESTSRC}
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/sleep
|
||||
ATF_TESTS_SH= sleep_test
|
||||
ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh
|
||||
NETBSD_ATF_TESTS_SH= sleep_test
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/test
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
# Some tests in here are silently not run when the tests are executed as
|
||||
# root. Explicitly tell Kyua to drop privileges.
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin
|
||||
|
||||
.PATH: ${.CURDIR:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -189,17 +189,25 @@
|
||||
.Op Fl i Ar snapshot Ns | Ns bookmark
|
||||
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
|
||||
.Nm
|
||||
.Cm send
|
||||
.Op Fl Penv
|
||||
.Fl t Ar receive_resume_token
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Op Fl vnFu
|
||||
.Op Fl vnsFu
|
||||
.Op Fl o Sy origin Ns = Ns Ar snapshot
|
||||
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Op Fl vnFu
|
||||
.Op Fl vnsFu
|
||||
.Op Fl d | e
|
||||
.Op Fl o Sy origin Ns = Ns Ar snapshot
|
||||
.Ar filesystem
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Fl A
|
||||
.Ar filesystem Ns | Ns Ar volume
|
||||
.Nm
|
||||
.Cm allow
|
||||
.Ar filesystem Ns | Ns Ar volume
|
||||
.Nm
|
||||
@ -597,6 +605,13 @@ For cloned file systems or volumes, the snapshot from which the clone was
|
||||
created. See also the
|
||||
.Sy clones
|
||||
property.
|
||||
.It Sy receive_resume_token
|
||||
For filesystems or volumes which have saved partially-completed state from
|
||||
.Sy zfs receive -s ,
|
||||
this opaque token can be provided to
|
||||
.Sy zfs send -t
|
||||
to resume and complete the
|
||||
.Sy zfs receive .
|
||||
.It Sy referenced
|
||||
The amount of data that is accessible by this dataset, which may or may not be
|
||||
shared with other datasets in the pool. When a snapshot or clone is created, it
|
||||
@ -2630,6 +2645,9 @@ useful in conjunction with the
|
||||
or
|
||||
.Fl P
|
||||
flags to determine what data will be sent.
|
||||
In this case, the verbose output will be written to
|
||||
standard output (contrast with a non-dry-run, where the stream is written
|
||||
to standard output and the verbose output goes to standard error).
|
||||
.It Fl P
|
||||
Print machine-parsable verbose information about the stream package generated.
|
||||
.It Fl v
|
||||
@ -2711,15 +2729,28 @@ feature.
|
||||
.El
|
||||
.It Xo
|
||||
.Nm
|
||||
.Cm send
|
||||
.Op Fl Penv
|
||||
.Fl t
|
||||
.Ar receive_resume_token
|
||||
.Xc
|
||||
Creates a send stream which resumes an interrupted receive. The
|
||||
.Ar receive_resume_token
|
||||
is the value of this property on the filesystem
|
||||
or volume that was being received into. See the documentation for
|
||||
.Sy zfs receive -s
|
||||
for more details.
|
||||
.It Xo
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Op Fl vnFu
|
||||
.Op Fl vnsFu
|
||||
.Op Fl o Sy origin Ns = Ns Ar snapshot
|
||||
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
|
||||
.Xc
|
||||
.It Xo
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Op Fl vnFu
|
||||
.Op Fl vnsFu
|
||||
.Op Fl d | e
|
||||
.Op Fl o Sy origin Ns = Ns Ar snapshot
|
||||
.Ar filesystem
|
||||
@ -2816,9 +2847,42 @@ performing the receive operation. If receiving an incremental replication
|
||||
stream (for example, one generated by
|
||||
.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) ,
|
||||
destroy snapshots and file systems that do not exist on the sending side.
|
||||
.It Fl s
|
||||
If the receive is interrupted, save the partially received state, rather
|
||||
than deleting it. Interruption may be due to premature termination of
|
||||
the stream
|
||||
.Po e.g. due to network failure or failure of the remote system
|
||||
if the stream is being read over a network connection
|
||||
.Pc ,
|
||||
a checksum error in the stream, termination of the
|
||||
.Nm zfs Cm receive
|
||||
process, or unclean shutdown of the system.
|
||||
.Pp
|
||||
The receive can be resumed with a stream generated by
|
||||
.Nm zfs Cm send Fl t Ar token ,
|
||||
where the
|
||||
.Ar token
|
||||
is the value of the
|
||||
.Sy receive_resume_token
|
||||
property of the filesystem or volume which is received into.
|
||||
.Pp
|
||||
To use this flag, the storage pool must have the
|
||||
.Sy extensible_dataset
|
||||
feature enabled. See
|
||||
.Xr zpool-features 5
|
||||
for details on ZFS feature flags.
|
||||
.El
|
||||
.It Xo
|
||||
.Nm
|
||||
.Cm receive Ns | Ns Cm recv
|
||||
.Fl A
|
||||
.Ar filesystem Ns | Ns Ar volume
|
||||
.Xc
|
||||
Abort an interrupted
|
||||
.Nm zfs Cm receive Fl s ,
|
||||
deleting its saved partially received state.
|
||||
.It Xo
|
||||
.Nm
|
||||
.Cm allow
|
||||
.Ar filesystem Ns | Ns Ar volume
|
||||
.Xc
|
||||
|
@ -263,10 +263,11 @@ get_usage(zfs_help_t idx)
|
||||
case HELP_PROMOTE:
|
||||
return (gettext("\tpromote <clone-filesystem>\n"));
|
||||
case HELP_RECEIVE:
|
||||
return (gettext("\treceive|recv [-vnFu] <filesystem|volume|"
|
||||
return (gettext("\treceive|recv [-vnsFu] <filesystem|volume|"
|
||||
"snapshot>\n"
|
||||
"\treceive|recv [-vnFu] [-o origin=<snapshot>] [-d | -e] "
|
||||
"<filesystem>\n"));
|
||||
"\treceive|recv [-vnsFu] [-o origin=<snapshot>] [-d | -e] "
|
||||
"<filesystem>\n"
|
||||
"\treceive|recv -A <filesystem|volume>\n"));
|
||||
case HELP_RENAME:
|
||||
return (gettext("\trename [-f] <filesystem|volume|snapshot> "
|
||||
"<filesystem|volume|snapshot>\n"
|
||||
@ -279,7 +280,8 @@ get_usage(zfs_help_t idx)
|
||||
return (gettext("\tsend [-DnPpRvLe] [-[iI] snapshot] "
|
||||
"<snapshot>\n"
|
||||
"\tsend [-Le] [-i snapshot|bookmark] "
|
||||
"<filesystem|volume|snapshot>\n"));
|
||||
"<filesystem|volume|snapshot>\n"
|
||||
"\tsend [-nvPe] -t <receive_resume_token>\n"));
|
||||
case HELP_SET:
|
||||
return (gettext("\tset <property=value> "
|
||||
"<filesystem|volume|snapshot> ...\n"));
|
||||
@ -3728,6 +3730,7 @@ zfs_do_send(int argc, char **argv)
|
||||
{
|
||||
char *fromname = NULL;
|
||||
char *toname = NULL;
|
||||
char *resume_token = NULL;
|
||||
char *cp;
|
||||
zfs_handle_t *zhp;
|
||||
sendflags_t flags = { 0 };
|
||||
@ -3736,7 +3739,7 @@ zfs_do_send(int argc, char **argv)
|
||||
boolean_t extraverbose = B_FALSE;
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, ":i:I:RDpvnPLe")) != -1) {
|
||||
while ((c = getopt(argc, argv, ":i:I:RDpvnPLet:")) != -1) {
|
||||
switch (c) {
|
||||
case 'i':
|
||||
if (fromname)
|
||||
@ -3777,6 +3780,9 @@ zfs_do_send(int argc, char **argv)
|
||||
case 'e':
|
||||
flags.embed_data = B_TRUE;
|
||||
break;
|
||||
case 't':
|
||||
resume_token = optarg;
|
||||
break;
|
||||
case ':':
|
||||
(void) fprintf(stderr, gettext("missing argument for "
|
||||
"'%c' option\n"), optopt);
|
||||
@ -3792,14 +3798,28 @@ zfs_do_send(int argc, char **argv)
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
/* check number of arguments */
|
||||
if (argc < 1) {
|
||||
(void) fprintf(stderr, gettext("missing snapshot argument\n"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
if (argc > 1) {
|
||||
(void) fprintf(stderr, gettext("too many arguments\n"));
|
||||
usage(B_FALSE);
|
||||
if (resume_token != NULL) {
|
||||
if (fromname != NULL || flags.replicate || flags.props ||
|
||||
flags.dedup) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("invalid flags combined with -t\n"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
if (argc != 0) {
|
||||
(void) fprintf(stderr, gettext("no additional "
|
||||
"arguments are permitted with -t\n"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
} else {
|
||||
if (argc < 1) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("missing snapshot argument\n"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
if (argc > 1) {
|
||||
(void) fprintf(stderr, gettext("too many arguments\n"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (!flags.dryrun && isatty(STDOUT_FILENO)) {
|
||||
@ -3809,6 +3829,11 @@ zfs_do_send(int argc, char **argv)
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (resume_token != NULL) {
|
||||
return (zfs_send_resume(g_zfs, &flags, STDOUT_FILENO,
|
||||
resume_token));
|
||||
}
|
||||
|
||||
/*
|
||||
* Special case sending a filesystem, or from a bookmark.
|
||||
*/
|
||||
@ -3914,8 +3939,6 @@ zfs_do_send(int argc, char **argv)
|
||||
}
|
||||
|
||||
/*
|
||||
* zfs receive [-vnFu] [-d | -e] <fs@snap>
|
||||
*
|
||||
* Restore a backup stream from stdin.
|
||||
*/
|
||||
static int
|
||||
@ -3923,6 +3946,8 @@ zfs_do_receive(int argc, char **argv)
|
||||
{
|
||||
int c, err;
|
||||
recvflags_t flags = { 0 };
|
||||
boolean_t abort_resumable = B_FALSE;
|
||||
|
||||
nvlist_t *props;
|
||||
nvpair_t *nvp = NULL;
|
||||
|
||||
@ -3930,7 +3955,7 @@ zfs_do_receive(int argc, char **argv)
|
||||
nomem();
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, ":o:denuvF")) != -1) {
|
||||
while ((c = getopt(argc, argv, ":o:denuvFsA")) != -1) {
|
||||
switch (c) {
|
||||
case 'o':
|
||||
if (parseprop(props, optarg) != 0)
|
||||
@ -3952,9 +3977,15 @@ zfs_do_receive(int argc, char **argv)
|
||||
case 'v':
|
||||
flags.verbose = B_TRUE;
|
||||
break;
|
||||
case 's':
|
||||
flags.resumable = B_TRUE;
|
||||
break;
|
||||
case 'F':
|
||||
flags.force = B_TRUE;
|
||||
break;
|
||||
case 'A':
|
||||
abort_resumable = B_TRUE;
|
||||
break;
|
||||
case ':':
|
||||
(void) fprintf(stderr, gettext("missing argument for "
|
||||
"'%c' option\n"), optopt);
|
||||
@ -3987,6 +4018,44 @@ zfs_do_receive(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (abort_resumable) {
|
||||
if (flags.isprefix || flags.istail || flags.dryrun ||
|
||||
flags.resumable || flags.nomount) {
|
||||
(void) fprintf(stderr, gettext("invalid option"));
|
||||
usage(B_FALSE);
|
||||
}
|
||||
|
||||
char namebuf[ZFS_MAXNAMELEN];
|
||||
(void) snprintf(namebuf, sizeof (namebuf),
|
||||
"%s/%%recv", argv[0]);
|
||||
|
||||
if (zfs_dataset_exists(g_zfs, namebuf,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME)) {
|
||||
zfs_handle_t *zhp = zfs_open(g_zfs,
|
||||
namebuf, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
|
||||
if (zhp == NULL)
|
||||
return (1);
|
||||
err = zfs_destroy(zhp, B_FALSE);
|
||||
} else {
|
||||
zfs_handle_t *zhp = zfs_open(g_zfs,
|
||||
argv[0], ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
|
||||
if (zhp == NULL)
|
||||
usage(B_FALSE);
|
||||
if (!zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) ||
|
||||
zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN,
|
||||
NULL, 0, NULL, NULL, 0, B_TRUE) == -1) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("'%s' does not have any "
|
||||
"resumable receive state to abort\n"),
|
||||
argv[0]);
|
||||
return (1);
|
||||
}
|
||||
err = zfs_destroy(zhp, B_FALSE);
|
||||
}
|
||||
|
||||
return (err != 0);
|
||||
}
|
||||
|
||||
if (isatty(STDIN_FILENO)) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("Error: Backup stream can not be read "
|
||||
@ -3994,7 +4063,6 @@ zfs_do_receive(int argc, char **argv)
|
||||
"You must redirect standard input.\n"));
|
||||
return (1);
|
||||
}
|
||||
|
||||
err = zfs_receive(g_zfs, argv[0], props, &flags, STDIN_FILENO, NULL);
|
||||
|
||||
return (err != 0);
|
||||
@ -5815,6 +5883,24 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* If this filesystem is inconsistent and has a receive resume
|
||||
* token, we can not mount it.
|
||||
*/
|
||||
if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) &&
|
||||
zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN,
|
||||
NULL, 0, NULL, NULL, 0, B_TRUE) == 0) {
|
||||
if (!explicit)
|
||||
return (0);
|
||||
|
||||
(void) fprintf(stderr, gettext("cannot %s '%s': "
|
||||
"Contains partially-completed state from "
|
||||
"\"zfs receive -r\", which can be resumed with "
|
||||
"\"zfs send -t\"\n"),
|
||||
cmdname, zfs_get_name(zhp));
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point, we have verified that the mountpoint and/or
|
||||
* shareopts are appropriate for auto management. If the
|
||||
|
@ -125,7 +125,7 @@ read_hdr(dmu_replay_record_t *drr, zio_cksum_t *cksum)
|
||||
saved_cksum.zc_word[1],
|
||||
saved_cksum.zc_word[2],
|
||||
saved_cksum.zc_word[3]);
|
||||
exit(1);
|
||||
return (0);
|
||||
}
|
||||
return (sizeof (*drr));
|
||||
}
|
||||
@ -346,8 +346,7 @@ main(int argc, char *argv[])
|
||||
if (verbose)
|
||||
(void) printf("\n");
|
||||
|
||||
if ((DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) ==
|
||||
DMU_COMPOUNDSTREAM) && drr->drr_payloadlen != 0) {
|
||||
if (drr->drr_payloadlen != 0) {
|
||||
nvlist_t *nv;
|
||||
int sz = drr->drr_payloadlen;
|
||||
|
||||
|
@ -621,6 +621,10 @@ typedef boolean_t (snapfilter_cb_t)(zfs_handle_t *, void *);
|
||||
extern int zfs_send(zfs_handle_t *, const char *, const char *,
|
||||
sendflags_t *, int, snapfilter_cb_t, void *, nvlist_t **);
|
||||
extern int zfs_send_one(zfs_handle_t *, const char *, int, enum lzc_send_flags);
|
||||
extern int zfs_send_resume(libzfs_handle_t *, sendflags_t *, int outfd,
|
||||
const char *);
|
||||
extern nvlist_t *zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl,
|
||||
const char *token);
|
||||
|
||||
extern int zfs_promote(zfs_handle_t *);
|
||||
extern int zfs_hold(zfs_handle_t *, const char *, const char *,
|
||||
@ -661,6 +665,12 @@ typedef struct recvflags {
|
||||
/* set "canmount=off" on all modified filesystems */
|
||||
boolean_t canmountoff;
|
||||
|
||||
/*
|
||||
* Mark the file systems as "resumable" and do not destroy them if the
|
||||
* receive is interrupted
|
||||
*/
|
||||
boolean_t resumable;
|
||||
|
||||
/* byteswap flag is used internally; callers need not specify */
|
||||
boolean_t byteswap;
|
||||
|
||||
|
@ -74,6 +74,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_t *zc)
|
||||
|
||||
if (zfs_ioctl_version >= ZFS_IOCVER_DEADMAN) {
|
||||
switch (zfs_ioctl_version) {
|
||||
case ZFS_IOCVER_EDBP:
|
||||
cflag = ZFS_CMD_COMPAT_EDBP;
|
||||
break;
|
||||
case ZFS_IOCVER_ZCMD:
|
||||
cflag = ZFS_CMD_COMPAT_ZCMD;
|
||||
break;
|
||||
|
@ -1778,22 +1778,21 @@ getprop_uint64(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
|
||||
return (value);
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
|
||||
{
|
||||
nvlist_t *nv;
|
||||
char *value;
|
||||
const char *value;
|
||||
|
||||
*source = NULL;
|
||||
if (nvlist_lookup_nvlist(zhp->zfs_props,
|
||||
zfs_prop_to_name(prop), &nv) == 0) {
|
||||
verify(nvlist_lookup_string(nv, ZPROP_VALUE, &value) == 0);
|
||||
value = fnvlist_lookup_string(nv, ZPROP_VALUE);
|
||||
(void) nvlist_lookup_string(nv, ZPROP_SOURCE, source);
|
||||
} else {
|
||||
verify(!zhp->zfs_props_table ||
|
||||
zhp->zfs_props_table[prop] == B_TRUE);
|
||||
if ((value = (char *)zfs_prop_default_string(prop)) == NULL)
|
||||
value = "";
|
||||
value = zfs_prop_default_string(prop);
|
||||
*source = "";
|
||||
}
|
||||
|
||||
@ -2195,7 +2194,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
||||
{
|
||||
char *source = NULL;
|
||||
uint64_t val;
|
||||
char *str;
|
||||
const char *str;
|
||||
const char *strval;
|
||||
boolean_t received = zfs_is_recvd_props_mode(zhp);
|
||||
|
||||
@ -2300,14 +2299,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
||||
break;
|
||||
|
||||
case ZFS_PROP_ORIGIN:
|
||||
(void) strlcpy(propbuf, getprop_string(zhp, prop, &source),
|
||||
proplen);
|
||||
/*
|
||||
* If there is no parent at all, return failure to indicate that
|
||||
* it doesn't apply to this dataset.
|
||||
*/
|
||||
if (propbuf[0] == '\0')
|
||||
str = getprop_string(zhp, prop, &source);
|
||||
if (str == NULL)
|
||||
return (-1);
|
||||
(void) strlcpy(propbuf, str, proplen);
|
||||
break;
|
||||
|
||||
case ZFS_PROP_CLONES:
|
||||
@ -2488,8 +2483,10 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
||||
break;
|
||||
|
||||
case PROP_TYPE_STRING:
|
||||
(void) strlcpy(propbuf,
|
||||
getprop_string(zhp, prop, &source), proplen);
|
||||
str = getprop_string(zhp, prop, &source);
|
||||
if (str == NULL)
|
||||
return (-1);
|
||||
(void) strlcpy(propbuf, str, proplen);
|
||||
break;
|
||||
|
||||
case PROP_TYPE_INDEX:
|
||||
|
@ -1072,6 +1072,17 @@ mount_cb(zfs_handle_t *zhp, void *data)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* If this filesystem is inconsistent and has a receive resume
|
||||
* token, we can not mount it.
|
||||
*/
|
||||
if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) &&
|
||||
zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN,
|
||||
NULL, 0, NULL, NULL, 0, B_TRUE) == 0) {
|
||||
zfs_close(zhp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
libzfs_add_handle(cbp, zhp);
|
||||
if (zfs_iter_filesystems(zhp, mount_cb, cbp) != 0) {
|
||||
zfs_close(zhp);
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
|
||||
* All rights reserved.
|
||||
@ -51,6 +51,7 @@
|
||||
#include "zfs_prop.h"
|
||||
#include "zfs_fletcher.h"
|
||||
#include "libzfs_impl.h"
|
||||
#include <zlib.h>
|
||||
#include <sha2.h>
|
||||
#include <sys/zio_checksum.h>
|
||||
#include <sys/ddt.h>
|
||||
@ -67,6 +68,8 @@ extern void zfs_setprop_error(libzfs_handle_t *, zfs_prop_t, int, char *);
|
||||
static int zfs_receive_impl(libzfs_handle_t *, const char *, const char *,
|
||||
recvflags_t *, int, const char *, nvlist_t *, avl_tree_t *, char **, int,
|
||||
uint64_t *);
|
||||
static int guid_to_name(libzfs_handle_t *, const char *,
|
||||
uint64_t, boolean_t, char *);
|
||||
|
||||
static const zio_cksum_t zero_cksum = { 0 };
|
||||
|
||||
@ -284,8 +287,7 @@ cksummer(void *arg)
|
||||
DMU_BACKUP_FEATURE_DEDUPPROPS);
|
||||
DMU_SET_FEATUREFLAGS(drrb->drr_versioninfo, fflags);
|
||||
|
||||
if (DMU_GET_STREAM_HDRTYPE(drrb->drr_versioninfo) ==
|
||||
DMU_COMPOUNDSTREAM && drr->drr_payloadlen != 0) {
|
||||
if (drr->drr_payloadlen != 0) {
|
||||
sz = drr->drr_payloadlen;
|
||||
|
||||
if (sz > SPA_MAXBLOCKSIZE) {
|
||||
@ -818,7 +820,8 @@ typedef struct send_dump_data {
|
||||
char prevsnap[ZFS_MAXNAMELEN];
|
||||
uint64_t prevsnap_obj;
|
||||
boolean_t seenfrom, seento, replicate, doall, fromorigin;
|
||||
boolean_t verbose, dryrun, parsable, progress, embed_data, large_block;
|
||||
boolean_t verbose, dryrun, parsable, progress, embed_data, std_out;
|
||||
boolean_t large_block;
|
||||
int outfd;
|
||||
boolean_t err;
|
||||
nvlist_t *fss;
|
||||
@ -994,17 +997,14 @@ static void *
|
||||
send_progress_thread(void *arg)
|
||||
{
|
||||
progress_arg_t *pa = arg;
|
||||
|
||||
zfs_cmd_t zc = { 0 };
|
||||
zfs_handle_t *zhp = pa->pa_zhp;
|
||||
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
||||
unsigned long long bytes;
|
||||
char buf[16];
|
||||
|
||||
time_t t;
|
||||
struct tm *tm;
|
||||
|
||||
assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT);
|
||||
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
|
||||
|
||||
if (!pa->pa_parsable)
|
||||
@ -1037,6 +1037,51 @@ send_progress_thread(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap,
|
||||
uint64_t size, boolean_t parsable)
|
||||
{
|
||||
if (parsable) {
|
||||
if (fromsnap != NULL) {
|
||||
(void) fprintf(fout, "incremental\t%s\t%s",
|
||||
fromsnap, tosnap);
|
||||
} else {
|
||||
(void) fprintf(fout, "full\t%s",
|
||||
tosnap);
|
||||
}
|
||||
} else {
|
||||
if (fromsnap != NULL) {
|
||||
if (strchr(fromsnap, '@') == NULL &&
|
||||
strchr(fromsnap, '#') == NULL) {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"send from @%s to %s"),
|
||||
fromsnap, tosnap);
|
||||
} else {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"send from %s to %s"),
|
||||
fromsnap, tosnap);
|
||||
}
|
||||
} else {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"full send of %s"),
|
||||
tosnap);
|
||||
}
|
||||
}
|
||||
|
||||
if (size != 0) {
|
||||
if (parsable) {
|
||||
(void) fprintf(fout, "\t%llu",
|
||||
(longlong_t)size);
|
||||
} else {
|
||||
char buf[16];
|
||||
zfs_nicenum(size, buf, sizeof (buf));
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
" estimated size is %s"), buf);
|
||||
}
|
||||
}
|
||||
(void) fprintf(fout, "\n");
|
||||
}
|
||||
|
||||
static int
|
||||
dump_snapshot(zfs_handle_t *zhp, void *arg)
|
||||
{
|
||||
@ -1047,6 +1092,7 @@ dump_snapshot(zfs_handle_t *zhp, void *arg)
|
||||
int err;
|
||||
boolean_t isfromsnap, istosnap, fromorigin;
|
||||
boolean_t exclude = B_FALSE;
|
||||
FILE *fout = sdd->std_out ? stdout : stderr;
|
||||
|
||||
err = 0;
|
||||
thissnap = strchr(zhp->zfs_name, '@') + 1;
|
||||
@ -1115,37 +1161,14 @@ dump_snapshot(zfs_handle_t *zhp, void *arg)
|
||||
(sdd->fromorigin || sdd->replicate);
|
||||
|
||||
if (sdd->verbose) {
|
||||
uint64_t size;
|
||||
err = estimate_ioctl(zhp, sdd->prevsnap_obj,
|
||||
uint64_t size = 0;
|
||||
(void) estimate_ioctl(zhp, sdd->prevsnap_obj,
|
||||
fromorigin, &size);
|
||||
|
||||
if (sdd->parsable) {
|
||||
if (sdd->prevsnap[0] != '\0') {
|
||||
(void) fprintf(stderr, "incremental\t%s\t%s",
|
||||
sdd->prevsnap, zhp->zfs_name);
|
||||
} else {
|
||||
(void) fprintf(stderr, "full\t%s",
|
||||
zhp->zfs_name);
|
||||
}
|
||||
} else {
|
||||
(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
|
||||
"send from @%s to %s"),
|
||||
sdd->prevsnap, zhp->zfs_name);
|
||||
}
|
||||
if (err == 0) {
|
||||
if (sdd->parsable) {
|
||||
(void) fprintf(stderr, "\t%llu\n",
|
||||
(longlong_t)size);
|
||||
} else {
|
||||
char buf[16];
|
||||
zfs_nicenum(size, buf, sizeof (buf));
|
||||
(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
|
||||
" estimated size is %s\n"), buf);
|
||||
}
|
||||
sdd->size += size;
|
||||
} else {
|
||||
(void) fprintf(stderr, "\n");
|
||||
}
|
||||
send_print_verbose(fout, zhp->zfs_name,
|
||||
sdd->prevsnap[0] ? sdd->prevsnap : NULL,
|
||||
size, sdd->parsable);
|
||||
sdd->size += size;
|
||||
}
|
||||
|
||||
if (!sdd->dryrun) {
|
||||
@ -1356,6 +1379,233 @@ dump_filesystems(zfs_handle_t *rzhp, void *arg)
|
||||
return (0);
|
||||
}
|
||||
|
||||
nvlist_t *
|
||||
zfs_send_resume_token_to_nvlist(libzfs_handle_t *hdl, const char *token)
|
||||
{
|
||||
unsigned int version;
|
||||
int nread;
|
||||
unsigned long long checksum, packed_len;
|
||||
|
||||
/*
|
||||
* Decode token header, which is:
|
||||
* <token version>-<checksum of payload>-<uncompressed payload length>
|
||||
* Note that the only supported token version is 1.
|
||||
*/
|
||||
nread = sscanf(token, "%u-%llx-%llx-",
|
||||
&version, &checksum, &packed_len);
|
||||
if (nread != 3) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt (invalid format)"));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (version != ZFS_SEND_RESUME_TOKEN_VERSION) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt (invalid version %u)"),
|
||||
version);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* convert hexadecimal representation to binary */
|
||||
token = strrchr(token, '-') + 1;
|
||||
int len = strlen(token) / 2;
|
||||
unsigned char *compressed = zfs_alloc(hdl, len);
|
||||
for (int i = 0; i < len; i++) {
|
||||
nread = sscanf(token + i * 2, "%2hhx", compressed + i);
|
||||
if (nread != 1) {
|
||||
free(compressed);
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt "
|
||||
"(payload is not hex-encoded)"));
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* verify checksum */
|
||||
zio_cksum_t cksum;
|
||||
fletcher_4_native(compressed, len, &cksum);
|
||||
if (cksum.zc_word[0] != checksum) {
|
||||
free(compressed);
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt (incorrect checksum)"));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* uncompress */
|
||||
void *packed = zfs_alloc(hdl, packed_len);
|
||||
uLongf packed_len_long = packed_len;
|
||||
if (uncompress(packed, &packed_len_long, compressed, len) != Z_OK ||
|
||||
packed_len_long != packed_len) {
|
||||
free(packed);
|
||||
free(compressed);
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt (decompression failed)"));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* unpack nvlist */
|
||||
nvlist_t *nv;
|
||||
int error = nvlist_unpack(packed, packed_len, &nv, KM_SLEEP);
|
||||
free(packed);
|
||||
free(compressed);
|
||||
if (error != 0) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt (nvlist_unpack failed)"));
|
||||
return (NULL);
|
||||
}
|
||||
return (nv);
|
||||
}
|
||||
|
||||
int
|
||||
zfs_send_resume(libzfs_handle_t *hdl, sendflags_t *flags, int outfd,
|
||||
const char *resume_token)
|
||||
{
|
||||
char errbuf[1024];
|
||||
char *toname;
|
||||
char *fromname = NULL;
|
||||
uint64_t resumeobj, resumeoff, toguid, fromguid, bytes;
|
||||
zfs_handle_t *zhp;
|
||||
int error = 0;
|
||||
char name[ZFS_MAXNAMELEN];
|
||||
enum lzc_send_flags lzc_flags = 0;
|
||||
|
||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||
"cannot resume send"));
|
||||
|
||||
nvlist_t *resume_nvl =
|
||||
zfs_send_resume_token_to_nvlist(hdl, resume_token);
|
||||
if (resume_nvl == NULL) {
|
||||
/*
|
||||
* zfs_error_aux has already been set by
|
||||
* zfs_send_resume_token_to_nvlist
|
||||
*/
|
||||
return (zfs_error(hdl, EZFS_FAULT, errbuf));
|
||||
}
|
||||
if (flags->verbose) {
|
||||
(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
|
||||
"resume token contents:\n"));
|
||||
nvlist_print(stderr, resume_nvl);
|
||||
}
|
||||
|
||||
if (nvlist_lookup_string(resume_nvl, "toname", &toname) != 0 ||
|
||||
nvlist_lookup_uint64(resume_nvl, "object", &resumeobj) != 0 ||
|
||||
nvlist_lookup_uint64(resume_nvl, "offset", &resumeoff) != 0 ||
|
||||
nvlist_lookup_uint64(resume_nvl, "bytes", &bytes) != 0 ||
|
||||
nvlist_lookup_uint64(resume_nvl, "toguid", &toguid) != 0) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"resume token is corrupt"));
|
||||
return (zfs_error(hdl, EZFS_FAULT, errbuf));
|
||||
}
|
||||
fromguid = 0;
|
||||
(void) nvlist_lookup_uint64(resume_nvl, "fromguid", &fromguid);
|
||||
|
||||
if (flags->embed_data || nvlist_exists(resume_nvl, "embedok"))
|
||||
lzc_flags |= LZC_SEND_FLAG_EMBED_DATA;
|
||||
|
||||
if (guid_to_name(hdl, toname, toguid, B_FALSE, name) != 0) {
|
||||
if (zfs_dataset_exists(hdl, toname, ZFS_TYPE_DATASET)) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"'%s' is no longer the same snapshot used in "
|
||||
"the initial send"), toname);
|
||||
} else {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"'%s' used in the initial send no longer exists"),
|
||||
toname);
|
||||
}
|
||||
return (zfs_error(hdl, EZFS_BADPATH, errbuf));
|
||||
}
|
||||
zhp = zfs_open(hdl, name, ZFS_TYPE_DATASET);
|
||||
if (zhp == NULL) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"unable to access '%s'"), name);
|
||||
return (zfs_error(hdl, EZFS_BADPATH, errbuf));
|
||||
}
|
||||
|
||||
if (fromguid != 0) {
|
||||
if (guid_to_name(hdl, toname, fromguid, B_TRUE, name) != 0) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"incremental source %#llx no longer exists"),
|
||||
(longlong_t)fromguid);
|
||||
return (zfs_error(hdl, EZFS_BADPATH, errbuf));
|
||||
}
|
||||
fromname = name;
|
||||
}
|
||||
|
||||
if (flags->verbose) {
|
||||
uint64_t size = 0;
|
||||
error = lzc_send_space(zhp->zfs_name, fromname, &size);
|
||||
if (error == 0)
|
||||
size = MAX(0, (int64_t)(size - bytes));
|
||||
send_print_verbose(stderr, zhp->zfs_name, fromname,
|
||||
size, flags->parsable);
|
||||
}
|
||||
|
||||
if (!flags->dryrun) {
|
||||
progress_arg_t pa = { 0 };
|
||||
pthread_t tid;
|
||||
/*
|
||||
* If progress reporting is requested, spawn a new thread to
|
||||
* poll ZFS_IOC_SEND_PROGRESS at a regular interval.
|
||||
*/
|
||||
if (flags->progress) {
|
||||
pa.pa_zhp = zhp;
|
||||
pa.pa_fd = outfd;
|
||||
pa.pa_parsable = flags->parsable;
|
||||
|
||||
error = pthread_create(&tid, NULL,
|
||||
send_progress_thread, &pa);
|
||||
if (error != 0) {
|
||||
zfs_close(zhp);
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
error = lzc_send_resume(zhp->zfs_name, fromname, outfd,
|
||||
lzc_flags, resumeobj, resumeoff);
|
||||
|
||||
if (flags->progress) {
|
||||
(void) pthread_cancel(tid);
|
||||
(void) pthread_join(tid, NULL);
|
||||
}
|
||||
|
||||
char errbuf[1024];
|
||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||
"warning: cannot send '%s'"), zhp->zfs_name);
|
||||
|
||||
zfs_close(zhp);
|
||||
|
||||
switch (error) {
|
||||
case 0:
|
||||
return (0);
|
||||
case EXDEV:
|
||||
case ENOENT:
|
||||
case EDQUOT:
|
||||
case EFBIG:
|
||||
case EIO:
|
||||
case ENOLINK:
|
||||
case ENOSPC:
|
||||
#ifdef illumos
|
||||
case ENOSTR:
|
||||
#endif
|
||||
case ENXIO:
|
||||
case EPIPE:
|
||||
case ERANGE:
|
||||
case EFAULT:
|
||||
case EROFS:
|
||||
zfs_error_aux(hdl, strerror(errno));
|
||||
return (zfs_error(hdl, EZFS_BADBACKUP, errbuf));
|
||||
|
||||
default:
|
||||
return (zfs_standard_error(hdl, errno, errbuf));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
zfs_close(zhp);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate a send stream for the dataset identified by the argument zhp.
|
||||
*
|
||||
@ -1388,6 +1638,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||
int pipefd[2];
|
||||
dedup_arg_t dda = { 0 };
|
||||
int featureflags = 0;
|
||||
FILE *fout;
|
||||
|
||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||
"cannot send '%s'"), zhp->zfs_name);
|
||||
@ -1515,6 +1766,9 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||
sdd.filter_cb_arg = cb_arg;
|
||||
if (debugnvp)
|
||||
sdd.debugnv = *debugnvp;
|
||||
if (sdd.verbose && sdd.dryrun)
|
||||
sdd.std_out = B_TRUE;
|
||||
fout = sdd.std_out ? stdout : stderr;
|
||||
|
||||
/*
|
||||
* Some flags require that we place user holds on the datasets that are
|
||||
@ -1554,12 +1808,12 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||
|
||||
if (flags->verbose) {
|
||||
if (flags->parsable) {
|
||||
(void) fprintf(stderr, "size\t%llu\n",
|
||||
(void) fprintf(fout, "size\t%llu\n",
|
||||
(longlong_t)sdd.size);
|
||||
} else {
|
||||
char buf[16];
|
||||
zfs_nicenum(sdd.size, buf, sizeof (buf));
|
||||
(void) fprintf(stderr, dgettext(TEXT_DOMAIN,
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"total estimated size is %s\n"), buf);
|
||||
}
|
||||
}
|
||||
@ -1891,6 +2145,7 @@ recv_destroy(libzfs_handle_t *hdl, const char *name, int baselen,
|
||||
|
||||
typedef struct guid_to_name_data {
|
||||
uint64_t guid;
|
||||
boolean_t bookmark_ok;
|
||||
char *name;
|
||||
char *skip;
|
||||
} guid_to_name_data_t;
|
||||
@ -1899,20 +2154,25 @@ static int
|
||||
guid_to_name_cb(zfs_handle_t *zhp, void *arg)
|
||||
{
|
||||
guid_to_name_data_t *gtnd = arg;
|
||||
const char *slash;
|
||||
int err;
|
||||
|
||||
if (gtnd->skip != NULL &&
|
||||
strcmp(zhp->zfs_name, gtnd->skip) == 0) {
|
||||
(slash = strrchr(zhp->zfs_name, '/')) != NULL &&
|
||||
strcmp(slash + 1, gtnd->skip) == 0) {
|
||||
zfs_close(zhp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (zhp->zfs_dmustats.dds_guid == gtnd->guid) {
|
||||
if (zfs_prop_get_int(zhp, ZFS_PROP_GUID) == gtnd->guid) {
|
||||
(void) strcpy(gtnd->name, zhp->zfs_name);
|
||||
zfs_close(zhp);
|
||||
return (EEXIST);
|
||||
}
|
||||
|
||||
err = zfs_iter_children(zhp, guid_to_name_cb, gtnd);
|
||||
if (err != EEXIST && gtnd->bookmark_ok)
|
||||
err = zfs_iter_bookmarks(zhp, guid_to_name_cb, gtnd);
|
||||
zfs_close(zhp);
|
||||
return (err);
|
||||
}
|
||||
@ -1926,45 +2186,48 @@ guid_to_name_cb(zfs_handle_t *zhp, void *arg)
|
||||
*/
|
||||
static int
|
||||
guid_to_name(libzfs_handle_t *hdl, const char *parent, uint64_t guid,
|
||||
char *name)
|
||||
boolean_t bookmark_ok, char *name)
|
||||
{
|
||||
/* exhaustive search all local snapshots */
|
||||
char pname[ZFS_MAXNAMELEN];
|
||||
guid_to_name_data_t gtnd;
|
||||
int err = 0;
|
||||
zfs_handle_t *zhp;
|
||||
char *cp;
|
||||
|
||||
gtnd.guid = guid;
|
||||
gtnd.bookmark_ok = bookmark_ok;
|
||||
gtnd.name = name;
|
||||
gtnd.skip = NULL;
|
||||
|
||||
(void) strlcpy(pname, parent, sizeof (pname));
|
||||
|
||||
/*
|
||||
* Search progressively larger portions of the hierarchy. This will
|
||||
* Search progressively larger portions of the hierarchy, starting
|
||||
* with the filesystem specified by 'parent'. This will
|
||||
* select the "most local" version of the origin snapshot in the case
|
||||
* that there are multiple matching snapshots in the system.
|
||||
*/
|
||||
while ((cp = strrchr(pname, '/')) != NULL) {
|
||||
|
||||
(void) strlcpy(pname, parent, sizeof (pname));
|
||||
char *cp = strrchr(pname, '@');
|
||||
if (cp == NULL)
|
||||
cp = strchr(pname, '\0');
|
||||
for (; cp != NULL; cp = strrchr(pname, '/')) {
|
||||
/* Chop off the last component and open the parent */
|
||||
*cp = '\0';
|
||||
zhp = make_dataset_handle(hdl, pname);
|
||||
zfs_handle_t *zhp = make_dataset_handle(hdl, pname);
|
||||
|
||||
if (zhp == NULL)
|
||||
continue;
|
||||
|
||||
err = zfs_iter_children(zhp, guid_to_name_cb, >nd);
|
||||
int err = guid_to_name_cb(zfs_handle_dup(zhp), >nd);
|
||||
if (err != EEXIST)
|
||||
err = zfs_iter_children(zhp, guid_to_name_cb, >nd);
|
||||
if (err != EEXIST && bookmark_ok)
|
||||
err = zfs_iter_bookmarks(zhp, guid_to_name_cb, >nd);
|
||||
zfs_close(zhp);
|
||||
if (err == EEXIST)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* Remember the dataset that we already searched, so we
|
||||
* skip it next time through.
|
||||
* Remember the last portion of the dataset so we skip it next
|
||||
* time through (as we've already searched that portion of the
|
||||
* hierarchy).
|
||||
*/
|
||||
gtnd.skip = pname;
|
||||
gtnd.skip = strrchr(pname, '/') + 1;
|
||||
}
|
||||
|
||||
return (ENOENT);
|
||||
@ -2562,11 +2825,9 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap)
|
||||
|
||||
switch (drr->drr_type) {
|
||||
case DRR_BEGIN:
|
||||
/* NB: not to be used on v2 stream packages */
|
||||
if (drr->drr_payloadlen != 0) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"invalid substream header"));
|
||||
return (zfs_error(hdl, EZFS_BADSTREAM, errbuf));
|
||||
(void) recv_read(hdl, fd, buf,
|
||||
drr->drr_payloadlen, B_FALSE, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2627,6 +2888,40 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
recv_ecksum_set_aux(libzfs_handle_t *hdl, const char *target_snap,
|
||||
boolean_t resumable)
|
||||
{
|
||||
char target_fs[ZFS_MAXNAMELEN];
|
||||
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"checksum mismatch or incomplete stream"));
|
||||
|
||||
if (!resumable)
|
||||
return;
|
||||
(void) strlcpy(target_fs, target_snap, sizeof (target_fs));
|
||||
*strchr(target_fs, '@') = '\0';
|
||||
zfs_handle_t *zhp = zfs_open(hdl, target_fs,
|
||||
ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
|
||||
if (zhp == NULL)
|
||||
return;
|
||||
|
||||
char token_buf[ZFS_MAXPROPLEN];
|
||||
int error = zfs_prop_get(zhp, ZFS_PROP_RECEIVE_RESUME_TOKEN,
|
||||
token_buf, sizeof (token_buf),
|
||||
NULL, NULL, 0, B_TRUE);
|
||||
if (error == 0) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"checksum mismatch or incomplete stream.\n"
|
||||
"Partially received snapshot is saved.\n"
|
||||
"A resuming stream can be generated on the sending "
|
||||
"system by running:\n"
|
||||
" zfs send -t %s"),
|
||||
token_buf);
|
||||
}
|
||||
zfs_close(zhp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Restores a backup of tosnap from the file descriptor specified by infd.
|
||||
*/
|
||||
@ -2790,7 +3085,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
*/
|
||||
if (drrb->drr_flags & DRR_FLAG_CLONE) {
|
||||
if (guid_to_name(hdl, zc.zc_value,
|
||||
drrb->drr_fromguid, zc.zc_string) != 0) {
|
||||
drrb->drr_fromguid, B_FALSE, zc.zc_string) != 0) {
|
||||
zcmd_free_nvlists(&zc);
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"local origin for clone %s does not exist"),
|
||||
@ -2806,8 +3101,10 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
zc.zc_string);
|
||||
}
|
||||
|
||||
boolean_t resuming = DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) &
|
||||
DMU_BACKUP_FEATURE_RESUMING;
|
||||
stream_wantsnewfs = (drrb->drr_fromguid == 0 ||
|
||||
(drrb->drr_flags & DRR_FLAG_CLONE) || originsnap);
|
||||
(drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming;
|
||||
|
||||
if (stream_wantsnewfs) {
|
||||
/*
|
||||
@ -2826,7 +3123,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
char suffix[ZFS_MAXNAMELEN];
|
||||
(void) strcpy(suffix, strrchr(zc.zc_value, '/'));
|
||||
if (guid_to_name(hdl, zc.zc_name, parent_snapguid,
|
||||
zc.zc_value) == 0) {
|
||||
B_FALSE, zc.zc_value) == 0) {
|
||||
*strchr(zc.zc_value, '@') = '\0';
|
||||
(void) strcat(zc.zc_value, suffix);
|
||||
}
|
||||
@ -2853,7 +3150,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
char snap[ZFS_MAXNAMELEN];
|
||||
(void) strcpy(snap, strchr(zc.zc_value, '@'));
|
||||
if (guid_to_name(hdl, zc.zc_name, drrb->drr_fromguid,
|
||||
zc.zc_value) == 0) {
|
||||
B_FALSE, zc.zc_value) == 0) {
|
||||
*strchr(zc.zc_value, '@') = '\0';
|
||||
(void) strcat(zc.zc_value, snap);
|
||||
}
|
||||
@ -2867,11 +3164,12 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
zfs_handle_t *zhp;
|
||||
|
||||
/*
|
||||
* Destination fs exists. Therefore this should either
|
||||
* be an incremental, or the stream specifies a new fs
|
||||
* (full stream or clone) and they want us to blow it
|
||||
* away (and have therefore specified -F and removed any
|
||||
* snapshots).
|
||||
* Destination fs exists. It must be one of these cases:
|
||||
* - an incremental send stream
|
||||
* - the stream specifies a new fs (full stream or clone)
|
||||
* and they want us to blow away the existing fs (and
|
||||
* have therefore specified -F and removed any snapshots)
|
||||
* - we are resuming a failed receive.
|
||||
*/
|
||||
if (stream_wantsnewfs) {
|
||||
if (!flags->force) {
|
||||
@ -2926,6 +3224,18 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are resuming a newfs, set newfs here so that we will
|
||||
* mount it if the recv succeeds this time. We can tell
|
||||
* that it was a newfs on the first recv because the fs
|
||||
* itself will be inconsistent (if the fs existed when we
|
||||
* did the first recv, we would have received it into
|
||||
* .../%recv).
|
||||
*/
|
||||
if (resuming && zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT))
|
||||
newfs = B_TRUE;
|
||||
|
||||
zfs_close(zhp);
|
||||
} else {
|
||||
/*
|
||||
@ -2958,9 +3268,10 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
newfs = B_TRUE;
|
||||
}
|
||||
|
||||
zc.zc_begin_record = drr_noswap->drr_u.drr_begin;
|
||||
zc.zc_begin_record = *drr_noswap;
|
||||
zc.zc_cookie = infd;
|
||||
zc.zc_guid = flags->force;
|
||||
zc.zc_resumable = flags->resumable;
|
||||
if (flags->verbose) {
|
||||
(void) printf("%s %s stream of %s into %s\n",
|
||||
flags->dryrun ? "would receive" : "receiving",
|
||||
@ -3097,8 +3408,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
(void) zfs_error(hdl, EZFS_BADSTREAM, errbuf);
|
||||
break;
|
||||
case ECKSUM:
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"invalid stream (checksum mismatch)"));
|
||||
recv_ecksum_set_aux(hdl, zc.zc_value, flags->resumable);
|
||||
(void) zfs_error(hdl, EZFS_BADSTREAM, errbuf);
|
||||
break;
|
||||
case ENOTSUP:
|
||||
@ -3300,7 +3610,8 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap,
|
||||
* Restores a backup of tosnap from the file descriptor specified by infd.
|
||||
* Return 0 on total success, -2 if some things couldn't be
|
||||
* destroyed/renamed/promoted, -1 if some things couldn't be received.
|
||||
* (-1 will override -2).
|
||||
* (-1 will override -2, if -1 and the resumable flag was specified the
|
||||
* transfer can be resumed if the sending side supports it).
|
||||
*/
|
||||
int
|
||||
zfs_receive(libzfs_handle_t *hdl, const char *tosnap, nvlist_t *props,
|
||||
|
@ -514,6 +514,13 @@ lzc_get_holds(const char *snapname, nvlist_t **holdsp)
|
||||
int
|
||||
lzc_send(const char *snapname, const char *from, int fd,
|
||||
enum lzc_send_flags flags)
|
||||
{
|
||||
return (lzc_send_resume(snapname, from, fd, flags, 0, 0));
|
||||
}
|
||||
|
||||
int
|
||||
lzc_send_resume(const char *snapname, const char *from, int fd,
|
||||
enum lzc_send_flags flags, uint64_t resumeobj, uint64_t resumeoff)
|
||||
{
|
||||
nvlist_t *args;
|
||||
int err;
|
||||
@ -526,6 +533,10 @@ lzc_send(const char *snapname, const char *from, int fd,
|
||||
fnvlist_add_boolean(args, "largeblockok");
|
||||
if (flags & LZC_SEND_FLAG_EMBED_DATA)
|
||||
fnvlist_add_boolean(args, "embedok");
|
||||
if (resumeobj != 0 || resumeoff != 0) {
|
||||
fnvlist_add_uint64(args, "resume_object", resumeobj);
|
||||
fnvlist_add_uint64(args, "resume_offset", resumeoff);
|
||||
}
|
||||
err = lzc_ioctl(ZFS_IOC_SEND_NEW, snapname, args, NULL);
|
||||
nvlist_free(args);
|
||||
return (err);
|
||||
@ -583,22 +594,9 @@ recv_read(int fd, void *buf, int ilen)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* The simplest receive case: receive from the specified fd, creating the
|
||||
* specified snapshot. Apply the specified properties a "received" properties
|
||||
* (which can be overridden by locally-set properties). If the stream is a
|
||||
* clone, its origin snapshot must be specified by 'origin'. The 'force'
|
||||
* flag will cause the target filesystem to be rolled back or destroyed if
|
||||
* necessary to receive.
|
||||
*
|
||||
* Return 0 on success or an errno on failure.
|
||||
*
|
||||
* Note: this interface does not work on dedup'd streams
|
||||
* (those with DMU_BACKUP_FEATURE_DEDUP).
|
||||
*/
|
||||
int
|
||||
lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
boolean_t force, int fd)
|
||||
static int
|
||||
lzc_receive_impl(const char *snapname, nvlist_t *props, const char *origin,
|
||||
boolean_t force, boolean_t resumable, int fd)
|
||||
{
|
||||
/*
|
||||
* The receive ioctl is still legacy, so we need to construct our own
|
||||
@ -608,7 +606,6 @@ lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
char *atp;
|
||||
char *packed = NULL;
|
||||
size_t size;
|
||||
dmu_replay_record_t drr;
|
||||
int error;
|
||||
|
||||
ASSERT3S(g_refcount, >, 0);
|
||||
@ -644,10 +641,9 @@ lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
(void) strlcpy(zc.zc_string, origin, sizeof (zc.zc_string));
|
||||
|
||||
/* zc_begin_record is non-byteswapped BEGIN record */
|
||||
error = recv_read(fd, &drr, sizeof (drr));
|
||||
error = recv_read(fd, &zc.zc_begin_record, sizeof (zc.zc_begin_record));
|
||||
if (error != 0)
|
||||
goto out;
|
||||
zc.zc_begin_record = drr.drr_u.drr_begin;
|
||||
|
||||
/* zc_cookie is fd to read from */
|
||||
zc.zc_cookie = fd;
|
||||
@ -655,6 +651,8 @@ lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
/* zc guid is force flag */
|
||||
zc.zc_guid = force;
|
||||
|
||||
zc.zc_resumable = resumable;
|
||||
|
||||
/* zc_cleanup_fd is unused */
|
||||
zc.zc_cleanup_fd = -1;
|
||||
|
||||
@ -669,6 +667,39 @@ lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* The simplest receive case: receive from the specified fd, creating the
|
||||
* specified snapshot. Apply the specified properties as "received" properties
|
||||
* (which can be overridden by locally-set properties). If the stream is a
|
||||
* clone, its origin snapshot must be specified by 'origin'. The 'force'
|
||||
* flag will cause the target filesystem to be rolled back or destroyed if
|
||||
* necessary to receive.
|
||||
*
|
||||
* Return 0 on success or an errno on failure.
|
||||
*
|
||||
* Note: this interface does not work on dedup'd streams
|
||||
* (those with DMU_BACKUP_FEATURE_DEDUP).
|
||||
*/
|
||||
int
|
||||
lzc_receive(const char *snapname, nvlist_t *props, const char *origin,
|
||||
boolean_t force, int fd)
|
||||
{
|
||||
return (lzc_receive_impl(snapname, props, origin, force, B_FALSE, fd));
|
||||
}
|
||||
|
||||
/*
|
||||
* Like lzc_receive, but if the receive fails due to premature stream
|
||||
* termination, the intermediate state will be preserved on disk. In this
|
||||
* case, ECKSUM will be returned. The receive may subsequently be resumed
|
||||
* with a resuming send stream generated by lzc_send_resume().
|
||||
*/
|
||||
int
|
||||
lzc_receive_resumable(const char *snapname, nvlist_t *props, const char *origin,
|
||||
boolean_t force, int fd)
|
||||
{
|
||||
return (lzc_receive_impl(snapname, props, origin, force, B_TRUE, fd));
|
||||
}
|
||||
|
||||
/*
|
||||
* Roll back this filesystem or volume to its most recent snapshot.
|
||||
* If snapnamebuf is not NULL, it will be filled in with the name
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013 by Martin Matuska <mm@FreeBSD.org>. All rights reserved.
|
||||
*/
|
||||
|
||||
@ -59,7 +59,11 @@ enum lzc_send_flags {
|
||||
};
|
||||
|
||||
int lzc_send(const char *, const char *, int, enum lzc_send_flags);
|
||||
int lzc_send_resume(const char *, const char *, int,
|
||||
enum lzc_send_flags, uint64_t, uint64_t);
|
||||
int lzc_receive(const char *, nvlist_t *, const char *, boolean_t, int);
|
||||
int lzc_receive_resumable(const char *, nvlist_t *, const char *,
|
||||
boolean_t, int);
|
||||
int lzc_send_space(const char *, const char *, uint64_t *);
|
||||
|
||||
boolean_t lzc_exists(const char *);
|
||||
|
@ -8,10 +8,10 @@
|
||||
LIB= zfs
|
||||
DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \
|
||||
${LIBAVL} ${LIBZFS_CORE} ${LIBUUTIL} ${LIBBSDXML} ${LIBGEOM} \
|
||||
${LIBNVPAIR}
|
||||
${LIBNVPAIR} ${LIBZ}
|
||||
|
||||
LDADD= -lmd -lpthread -lumem -lutil -luutil -lm -lnvpair -lavl \
|
||||
-lbsdxml -lgeom -lnvpair -lzfs_core
|
||||
-lbsdxml -lgeom -lnvpair -lz -lzfs_core
|
||||
|
||||
SRCS= deviceid.c \
|
||||
fsshare.c \
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl/lib
|
||||
|
||||
.PATH: ${.CURDIR:H:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl/sbin
|
||||
|
||||
.PATH: ${.CURDIR:H:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl
|
||||
|
||||
.PATH: ${.CURDIR:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl/usr.bin
|
||||
|
||||
.PATH: ${.CURDIR:H:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -2,10 +2,9 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace
|
||||
TESTS_SUBDIRS+= common
|
||||
|
||||
.PATH: ${.CURDIR:H:H:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= YES
|
||||
|
||||
.PATH: ${.CURDIR}/tools
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/cddl/usr.sbin
|
||||
|
||||
.PATH: ${.CURDIR:H:H:H}/tests
|
||||
.PATH: ${SRCTOP}/tests
|
||||
KYUAFILE= yes
|
||||
|
||||
.include <bsd.test.mk>
|
||||
|
@ -1,28 +0,0 @@
|
||||
# $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
|
||||
#
|
||||
|
||||
version!= sh get-version.sh
|
||||
|
||||
CFLAGS+= -I${.CURDIR}
|
||||
CFLAGS+= -DHAVE_REALLOCF -DHAVE_STRLCPY -DHAVE_GETPROGNAME
|
||||
CFLAGS+= -DLIBEXEC_PATH='"${LIBEXEC}"' -DDMA_VERSION='"${version}"'
|
||||
CFLAGS+= -DCONF_PATH='"${CONFDIR}"'
|
||||
|
||||
DPADD= ${LIBSSL} ${LIBCRYPTO}
|
||||
LDADD= -lssl -lcrypto
|
||||
|
||||
PROG= dma
|
||||
SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
|
||||
SRCS+= dma.c dns.c local.c mail.c net.c spool.c util.c
|
||||
MAN= dma.8
|
||||
|
||||
PREFIX?= /usr/local
|
||||
LIBEXEC?= ${PREFIX}/libexec
|
||||
CONFDIR?= ${PREFIX}/etc/dma
|
||||
|
||||
BINOWN= root
|
||||
BINGRP= mail
|
||||
BINMODE=2555
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
@ -1,5 +1,5 @@
|
||||
Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
Copyright (c) 2008 The DragonFly Project.
|
||||
Copyright (c) 2008-2011, Simon Schubert <2@0x2c.org>.
|
||||
All rights reserved.
|
||||
|
||||
This code is derived from software contributed to The DragonFly Project
|
||||
@ -37,7 +37,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
Copyright (c) 1995-2001 Kungliga Tekniska Högskolan
|
||||
Copyright (c) 1995-2001 Kungliga Tekniska Högskolan
|
||||
(Royal Institute of Technology, Stockholm, Sweden).
|
||||
All rights reserved.
|
||||
|
||||
|
@ -15,8 +15,13 @@ incoming connections.
|
||||
Building
|
||||
--------
|
||||
|
||||
In Linux:
|
||||
|
||||
make
|
||||
|
||||
In BSD:
|
||||
|
||||
cd bsd && make
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
@ -1,5 +1,4 @@
|
||||
- unquote/handle quoted local recipients
|
||||
- use proper sysexit codes
|
||||
- handle/use ESMTP extensions
|
||||
- .forward support
|
||||
- suggest way to run a queue flush on boot
|
||||
|
@ -1 +1 @@
|
||||
v0.9
|
||||
v0.10
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
extern int yylineno;
|
||||
static void yyerror(const char *);
|
||||
int yywrap(void);
|
||||
int yylex(void);
|
||||
|
||||
static void
|
||||
yyerror(const char *msg)
|
||||
|
@ -1,11 +1,11 @@
|
||||
%{
|
||||
|
||||
#include <string.h>
|
||||
#include "dma.h"
|
||||
#include "aliases_parse.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
int yylex(void);
|
||||
%}
|
||||
|
||||
%option yylineno
|
||||
|
@ -64,7 +64,7 @@ trim_line(char *line)
|
||||
if (line[0] == '.') {
|
||||
if ((linelen + 2) > 1000) {
|
||||
syslog(LOG_CRIT, "Cannot escape leading dot. Buffer overflow");
|
||||
exit(1);
|
||||
exit(EX_DATAERR);
|
||||
}
|
||||
memmove((line + 1), line, (linelen + 1));
|
||||
line[0] = '.';
|
||||
@ -101,7 +101,7 @@ parse_authfile(const char *path)
|
||||
|
||||
a = fopen(path, "r");
|
||||
if (a == NULL) {
|
||||
errlog(1, "can not open auth file `%s'", path);
|
||||
errlog(EX_NOINPUT, "can not open auth file `%s'", path);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ parse_authfile(const char *path)
|
||||
|
||||
au = calloc(1, sizeof(*au));
|
||||
if (au == NULL)
|
||||
errlog(1, "calloc failed");
|
||||
errlog(EX_OSERR, "calloc()");
|
||||
|
||||
data = strdup(line);
|
||||
au->login = strsep(&data, "|");
|
||||
@ -131,8 +131,7 @@ parse_authfile(const char *path)
|
||||
if (au->login == NULL ||
|
||||
au->host == NULL ||
|
||||
au->password == NULL) {
|
||||
errlogx(1, "syntax error in authfile %s:%d",
|
||||
path, lineno);
|
||||
errlogx(EX_CONFIG, "syntax error in authfile %s:%d", path, lineno);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
@ -160,7 +159,7 @@ parse_conf(const char *config_path)
|
||||
/* Don't treat a non-existing config file as error */
|
||||
if (errno == ENOENT)
|
||||
return;
|
||||
errlog(1, "can not open config `%s'", config_path);
|
||||
errlog(EX_NOINPUT, "can not open config `%s'", config_path);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
@ -211,7 +210,7 @@ parse_conf(const char *config_path)
|
||||
} else {
|
||||
host = data;
|
||||
}
|
||||
if (host && *host == 0)
|
||||
if (host && *host == 0)
|
||||
host = NULL;
|
||||
if (user && *user == 0)
|
||||
user = NULL;
|
||||
@ -232,13 +231,13 @@ parse_conf(const char *config_path)
|
||||
else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL)
|
||||
config.features |= NULLCLIENT;
|
||||
else {
|
||||
errlogx(1, "syntax error in %s:%d", config_path, lineno);
|
||||
errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
|
||||
if ((config.features & NULLCLIENT) && config.smarthost == NULL) {
|
||||
errlogx(1, "%s: NULLCLIENT requires SMARTHOST", config_path);
|
||||
errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
dma (0.0.2010.06.17-3) unstable; urgency=low
|
||||
|
||||
The default delivery mode has been changed to immediate, as it is in
|
||||
the upstream version of dma; the DEFER keyword is now disabled by default
|
||||
in dma.conf.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Tue, 27 Jul 2010 13:26:48 +0300
|
||||
|
||||
dma (0.0.2010.06.17-1) unstable; urgency=low
|
||||
|
||||
The dma spool directory format has changed. The Debian package of dma now
|
||||
recommends a separate package containing the dma-migrate utility; if it is
|
||||
present, it will be invoked at each periodic dma queue flush and attempt to
|
||||
convert the existing old-style queued messages to the new format. In most
|
||||
cases, this should not incur any performance penalties in normal operation,
|
||||
since dma-migrate will scan the spool directory and ignore any new messages
|
||||
(they should already be in the new format); however, if it appears that
|
||||
the periodic queue flush runs take longer than usual to start up, you may
|
||||
remove the dma-migrate package once you have ascertained that your queue
|
||||
directory (/var/spool/dma) only contains files with names beginning with
|
||||
the letters M or Q.
|
||||
|
||||
This version of dma knows how to perform MX lookups, so remote delivery is
|
||||
now possible directly, not through a smarthost. However, a smarthost setup
|
||||
might still be preferred on many systems for various reasons - e.g. dynamic
|
||||
address assignment, a central outgoing mailserver, a roaming laptop, etc.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Mon, 21 Jun 2010 11:03:57 +0300
|
||||
|
@ -1,12 +0,0 @@
|
||||
dma for Debian
|
||||
--------------
|
||||
|
||||
Smarthost operation by default - needs to be configured!
|
||||
|
||||
After first installing dma, you need to configure it for proper operation -
|
||||
whether it should deliver all outgoing e-mail messages through a single
|
||||
smarthost or attempt to contact the remote mail servers directly. This should
|
||||
be configured through the debconf questions, but you may change the setting
|
||||
using the SMARTHOST directive in the /etc/dma/dma.conf file.
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Fri, 29 Oct 2010 00:25:48 +0200
|
@ -1,297 +0,0 @@
|
||||
dma (0.9) unstable; urgency=low
|
||||
|
||||
[ Ed Maste ]
|
||||
* Be explicit about missing user.
|
||||
* Allow DMA_ROOT_USER & DMA_GROUP to be overridden.
|
||||
* Add compat #ifdef for older OpenSSL
|
||||
* Add CONF_DIR, as in Makefile
|
||||
* More detailed error message for tmp file failure.
|
||||
|
||||
[ Simon Schubert ]
|
||||
* spool.c: bzero contents of pointer
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Mon, 03 Jun 2013 15:58:44 +0200
|
||||
|
||||
dma (0.8) unstable; urgency=low
|
||||
|
||||
[ Gert van den Berg ]
|
||||
* Added some more documentation on compiling
|
||||
* Make Makefile and README consistent with INSTALL
|
||||
|
||||
[ Sascha Wildner ]
|
||||
* dma.8: Fix a few small issues.
|
||||
|
||||
[ Simon Schubert ]
|
||||
* dma.8: we only have 2 config files at the moment
|
||||
* Merge pull request #2 from mohag/master
|
||||
* don't treat -options following -q as argument to it
|
||||
* deliver_remote: propagate back DNS errors
|
||||
* don't complain when we can't lock a queue file during flush
|
||||
* implement queue flushing prod
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Fri, 30 Mar 2012 12:03:54 +0200
|
||||
|
||||
dma (0.7) unstable; urgency=low
|
||||
|
||||
[ Simon Schubert ]
|
||||
* add semicolon before date in Received: header
|
||||
* parse_conf: fix bug with masqueraded domains
|
||||
* clear up warnings found by clang static analysis
|
||||
* mark printf-alike functions
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Tue, 03 Jan 2012 14:53:43 +0100
|
||||
|
||||
dma (0.6) unstable; urgency=low
|
||||
|
||||
[ Simon Schubert ]
|
||||
* deliver_local: quote "From " more liberally
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Wed, 07 Dec 2011 12:42:22 +0100
|
||||
|
||||
dma (0.5) unstable; urgency=low
|
||||
|
||||
[ Simon Schubert ]
|
||||
* implement masquerading using the MASQUERADE config option
|
||||
* access config files at CONF_PATH, add makefile target to install conf files
|
||||
* implement the "*" catch-all alias
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Wed, 16 Nov 2011 13:34:43 +0100
|
||||
|
||||
dma (0.4) unstable; urgency=low
|
||||
|
||||
[ Simon Schubert ]
|
||||
* Makefile: put libraries at the end when linking
|
||||
* LICENSE: add
|
||||
* Merge commit 'refs/merge-requests/3' of git://gitorious.org/dma/dma
|
||||
* Merge commit 'refs/merge-requests/4' of git://gitorious.org/dma/dma
|
||||
* Add symlink for sendmail which is expected by many packages
|
||||
* Makefile: create spool directories in a separate target
|
||||
* Makefile: add symlink for mailq
|
||||
* README: elaborate, use markdown
|
||||
|
||||
[ Peter Pentchev ]
|
||||
* Fix straight SSL/TLS delivery to remote MX's.
|
||||
* Fix a minor memory leak discovered by cppcheck.
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Wed, 16 Nov 2011 00:08:28 +0100
|
||||
|
||||
dma (0.3) unstable; urgency=low
|
||||
|
||||
[ Simon Schubert ]
|
||||
* todo: we create mboxes properly now
|
||||
* dma-mbox-create: group mail only needs to write to mboxes
|
||||
* errlog: preserve errno
|
||||
* dma-mbox-create: add error/status logging
|
||||
* dns_get_mx_list: handle errors properly
|
||||
|
||||
[ Peter Pentchev ]
|
||||
* Make add_host() really return an error code.
|
||||
|
||||
[ Simon Schubert ]
|
||||
* readmail: accept mail without newline at the end
|
||||
|
||||
[ Peter Pentchev ]
|
||||
* In OpenSSL 1.0, TLSv1_client_method() returns a const pointer.
|
||||
|
||||
[ Simon Schubert ]
|
||||
* make dma compile again on DragonFly
|
||||
* parse_addrs: fix parsing for multiple <addresses>
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Sat, 09 Jul 2011 02:38:05 +0200
|
||||
|
||||
dma (0.2) unstable; urgency=low
|
||||
|
||||
* Update to dma 0.2
|
||||
- debian: better mark as UNRELEASED
|
||||
- add ppa makefile recipe
|
||||
- TODO: suggest way to run a queue flush on boot
|
||||
- partially adopt 34-manpage-defaults.patch: AUTHPATH is not set by default
|
||||
- Revert "debian: better mark as UNRELEASED"
|
||||
- setlogident: openlog() wants a static variable
|
||||
- writequeuef: create files with g+rw
|
||||
- drop privileges when run by root
|
||||
- implement mbox creation via setuid helper
|
||||
- debian: build with consistent flags
|
||||
- debian: remove unused files
|
||||
- debian: fix lintian warnings and errors
|
||||
- make ppa: force lower version number
|
||||
- make ppa: proper name
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Sun, 31 Oct 2010 23:57:50 +0100
|
||||
|
||||
dma (0.1) unstable; urgency=low
|
||||
|
||||
* Update dma to 0.1
|
||||
|
||||
-- Simon Schubert <2@0x2c.org> Fri, 29 Oct 2010 00:57:26 +0200
|
||||
|
||||
dma (0.0.2010.06.17-6) unstable; urgency=low
|
||||
|
||||
* Add the 37-gnu-hurd patch to really fix the FTBFS on GNU/Hurd.
|
||||
* Convert several shell output assignments from = to :=
|
||||
* Switch to bzip2 compression for the Debian tarball.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Sun, 17 Oct 2010 00:08:33 +0300
|
||||
|
||||
dma (0.0.2010.06.17-5) unstable; urgency=low
|
||||
|
||||
* Only use SA_NOCLDWAIT if available to fix the Hurd FTBFS.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Thu, 07 Oct 2010 11:42:23 +0300
|
||||
|
||||
dma (0.0.2010.06.17-4) unstable; urgency=low
|
||||
|
||||
* Fix an infinite loop in dma-migrate if char is unsigned.
|
||||
Closes: #599172
|
||||
* Switch to Git and point the Vcs-* fields to Gitorious.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Wed, 06 Oct 2010 17:30:29 +0300
|
||||
|
||||
dma (0.0.2010.06.17-3) unstable; urgency=low
|
||||
|
||||
* Update the debconf translations:
|
||||
- French by Steve Petruzzello; Closes: #587883
|
||||
* Bump Standards-Version to 3.9.1 with no changes.
|
||||
* Disable deferred delivery by default, as in the upstream version:
|
||||
- in the 03-debian-locations patch, comment the DEFER keyword in dma.conf,
|
||||
as it is upstream
|
||||
- refresh the 11-double-bounce.patch
|
||||
- reword the README.Debian section on deferred delivery a bit
|
||||
- add a news blurb
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Tue, 27 Jul 2010 13:34:27 +0300
|
||||
|
||||
dma (0.0.2010.06.17-2) unstable; urgency=low
|
||||
|
||||
* Quick on the heels of -1 to fix a momentary lapse of reason on my part:
|
||||
in the 03-debian-locations patch, revert part of the 0.0.2010.06.17-1
|
||||
change: do not set a un-overrideable default for the deferred delivery!
|
||||
Closes: #587593
|
||||
* Update the debconf translations:
|
||||
- Japanese by Hideki Yamane; Closes: #587543
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Wed, 30 Jun 2010 11:59:46 +0300
|
||||
|
||||
dma (0.0.2010.06.17-1) unstable; urgency=low
|
||||
|
||||
* New upstream version:
|
||||
- no longer reports the remote port number; Closes: #544820
|
||||
- fixes some queue locking problems; Closes: #582593
|
||||
- adapt the rules file to use the GNU Makefile instead of the BSD one
|
||||
- drop pmake from Build-Depends
|
||||
- remove the 01-debian-build patch, overtaken by upstream changes
|
||||
- in the 03-debian-locations patch, make the Debian defaults actual
|
||||
defaults for the dma binary, not just in the dma.conf file
|
||||
- adapt the 04-debian-setgid patch for the GNU Makefile
|
||||
- in the 10-liblockfile patch, change the GNU Makefile, too
|
||||
- enhance the 11-double-bounce patch a bit:
|
||||
- use dma's own delqueue() function instead of a naive unlink() so
|
||||
all the queue files are cleaned up
|
||||
- document the Debian default for DBOUNCEPROG in the manual page
|
||||
- resurrect the 13-hardening patch, correcting a couple of
|
||||
unchecked asprintf(3) and vasprintf(3) invocations
|
||||
- the functionality of the 20-parse-recipient patch was implemented
|
||||
upstream in a different way, so replace it with a small bugfix
|
||||
- remove the 22-openfiles patch, overtaken by upstream changes
|
||||
- in the 24-random-message-id patch, change the GNU Makefile, too
|
||||
- add the 27-int-size patch to cast a variable to the correct type
|
||||
- add the 28-valid-recipient patch to fix parsing recipients out of
|
||||
the message body
|
||||
- add the 29-double-free patch to fix a double-free error
|
||||
- add the 30-ldflags patch to honor LDFLAGS if specified
|
||||
- refresh the 09-typos, 17-mailname, 23-dirent-d_type, and
|
||||
25-unsupported-starttls patches
|
||||
- teach the dbounce-simple-safecat handler about the M*/Q* spool
|
||||
files scheme
|
||||
* Bump Standards-Version to 3.9.0 with no changes.
|
||||
* Update the copyright file:
|
||||
- bring it up to the latest revision of the DEP 5
|
||||
- update the upstream copyright notices
|
||||
- bump the year on my copyright notice
|
||||
* Remove the diffsrc rules target which was intended for my own
|
||||
internal use, but has outlived its time.
|
||||
* Use dpkg-buildflags from dpkg-dev >= 1.15.7~ to get the default
|
||||
values for CFLAGS, CPPFLAGS, and LDFLAGS; no longer rely on
|
||||
dpkg-buildpackage to set them by default.
|
||||
* Add the dma-migrate utility (in a separate binary package) to convert
|
||||
spool files to the new queue format (M* and Q* files for each message)
|
||||
* Add a dma-migrate invocation to dma.cron.d
|
||||
* Shorten the Vcs-Browser URL.
|
||||
* Add the 31-sigalrm-backoff patch to force a delivery attempt on SIGALRM.
|
||||
* Properly substitute the debconf-supplied values for DBOUNCEPROG and
|
||||
SMARTHOST into dma.conf even if they are empty without generating
|
||||
an invalid dma.conf file.
|
||||
* Remove the smarthost default; dma does MX lookups now, so it doesn't
|
||||
really *need* one anymore.
|
||||
* Reword the debconf relayhost question - dma does not really need
|
||||
a smarthost anymore.
|
||||
* Update the debconf translations:
|
||||
- Bulgarian
|
||||
- Portuguese by Américo Monteiro
|
||||
- German by Helge Kreutzmann; Closes: #586531
|
||||
- Russian by Yuri Kozlov; Closes: #586579
|
||||
- Czech by Michal Simunek; Closes: #586791
|
||||
- Swedish by Martin Bagge; Closes: #586825
|
||||
- Spanish by Francisco Javier Cuadrado; Closes: #587088
|
||||
* Update the smarthost configuration information in README.Debian.
|
||||
* Add the 32-comment-uncomment patch to correct the manual page wording.
|
||||
* Add the 33-opportunistic-tls patch to allow remote connections to proceed
|
||||
even if the STARTTLS negotiation fails.
|
||||
* Fix the 25-unsupported-starttls patch to actually error out if the SSL
|
||||
negotiation fails.
|
||||
* Forward all the non-Debian-specific patches upstream to Simon Schubert.
|
||||
* Add the 34-manpage-defaults patch to properly document what dma will use
|
||||
as default values if not specified in the config file instead of what
|
||||
the default config file specifies. Closes: #544748
|
||||
* Add the 35-delivery-retry patch to try local deliveries a bit more often
|
||||
and to randomize the delivery timeout to avoid locking issues.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Mon, 28 Jun 2010 23:26:36 +0300
|
||||
|
||||
dma (0.0.2009.07.17-3) unstable; urgency=low
|
||||
|
||||
* Really install the files in /etc/dma/ as root/mail/640 and
|
||||
change the ownership of the existing files in the postinst script
|
||||
when upgrading from older versions. Closes: #544664
|
||||
* Install the /usr/bin/mailq and /usr/bin/newaliases symlinks.
|
||||
Closes: #558421
|
||||
* Switch to the 3.0 (quilt) source format.
|
||||
* Update the debconf translations:
|
||||
- add German. Closes: #552754
|
||||
- add Japanese. Closes: #554515
|
||||
- remove a double space and unfuzzy the translations. Closes: #552586
|
||||
* Fix a crash when the SMTP server does not support STARTTLS.
|
||||
Closes: #547594
|
||||
* Always use the user-supplied value from the debconf query for
|
||||
the smarthost and the double-bounce program. This may result in
|
||||
debconf overriding a manually-edited config file, so add a note to
|
||||
dma.conf stating that these values are handled via debconf.
|
||||
Closes: #544663
|
||||
* Fix a misspelling of dma/dbounceprog as dma/defer in the debconf
|
||||
configuration script. Oops.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Sat, 19 Dec 2009 14:35:10 +0200
|
||||
|
||||
dma (0.0.2009.07.17-2) unstable; urgency=low
|
||||
|
||||
* Allow the spool directory to live on a filesystem that does not
|
||||
set the d_type member of the dirent structure, like XFS.
|
||||
Closes: #544357
|
||||
* Randomize the Message-Id a bit more. Closes: #544475
|
||||
* Bump Standards-Version to 3.8.3 with no changes.
|
||||
* Only enable the build hardening wrapper if the "hardening" build
|
||||
option is specified.
|
||||
* Switch the copyright file header from the Wiki to DEP 5.
|
||||
* Remove the manual page ".Dx" patch - the groff version in Squeeze
|
||||
knows about the .Dx mdoc macro. Add a lintian override for
|
||||
the "Unknown DragonFly version" error.
|
||||
* Convert the patch file headers to the DEP 3 format.
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Tue, 01 Sep 2009 13:36:33 +0300
|
||||
|
||||
dma (0.0.2009.07.17-1) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
(Closes: #511410, #533458, #533614, #533890, #534101, #534860)
|
||||
|
||||
-- Peter Pentchev <roam@ringlet.net> Tue, 11 Aug 2009 16:08:41 +0300
|
@ -1 +0,0 @@
|
||||
7
|
@ -1,37 +0,0 @@
|
||||
Source: dma
|
||||
Section: mail
|
||||
Priority: optional
|
||||
Maintainer: Peter Pentchev <roam@ringlet.net>
|
||||
DM-Upload-Allowed: yes
|
||||
Build-Depends: debhelper (>= 7.0.50), byacc, dpkg-dev (>= 1.15.7~), flex, hardening-wrapper, libssl-dev, po-debconf
|
||||
Standards-Version: 3.9.1
|
||||
Homepage: http://devel.ringlet.net/mail/dma/
|
||||
Vcs-Git: git://gitorious.org/dma-roam/pkg-debian.git
|
||||
Vcs-Browser: http://gitorious.org/dma-roam/pkg-debian
|
||||
|
||||
Package: dma
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: mail-transport-agent
|
||||
Conflicts: mail-transport-agent
|
||||
Replaces: mail-transport-agent
|
||||
Recommends: dma-migrate
|
||||
Description: lightweight mail transport agent
|
||||
The DragonFly Mail Agent is a small Mail Transport Agent (MTA),
|
||||
designed for home and office use. It accepts mails from local Mail
|
||||
User Agents (MUA) and delivers them either to local mailboxes or
|
||||
remote SMTP servers. Remote delivery includes support for features
|
||||
such as TLS/SSL and SMTP authentication.
|
||||
.
|
||||
dma is not intended as a replacement for full-featured MTAs like
|
||||
Sendmail, Postfix, or Exim. Consequently, dma does not listen on
|
||||
port 25 for incoming connections.
|
||||
|
||||
Package: dma-migrate
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Enhances: dma
|
||||
Description: migration utility for the DragonFly Mail Agent's spool files
|
||||
The dma-migrate utility examines the DragonFly Mail Agent's mail queue
|
||||
and performs any conversions from old message file formats to the most
|
||||
recent one as needed.
|
@ -1,91 +0,0 @@
|
||||
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
|
||||
Name: dma
|
||||
|
||||
Files: base64.c
|
||||
Copyright: Copyright (c) 1995-2001 Kungliga Tekniska Högskolan
|
||||
(Royal Institute of Technology, Stockholm, Sweden).
|
||||
All rights reserved.
|
||||
License: BSD-3
|
||||
|
||||
Files: conf.c crypto.c net.c
|
||||
Copyright: Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
This code is derived from software contributed to The DragonFly Project
|
||||
by Matthias Schmidt <matthias@dragonflybsd.org>, University of Marburg,
|
||||
Germany.
|
||||
License: BSD-3
|
||||
|
||||
Files: dfcompat.c
|
||||
Copyright: Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
Copyright (c) 1998, M. Warner Losh <imp@freebsd.org> All rights reserved.
|
||||
License: BSD-1 BSD-2
|
||||
|
||||
Files: dma.8
|
||||
Copyright: Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
License: BSD-3
|
||||
|
||||
Files: dma.c dns.c mail.c spool.c util.c
|
||||
Copyright: Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
This code is derived from software contributed to The DragonFly Project
|
||||
by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
License: BSD-3
|
||||
|
||||
Files: dma.h
|
||||
Copyright: Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
This code is derived from software contributed to The DragonFly Project
|
||||
by Simon 'corecode' Schubert <corecode@fs.ei.tum.de> and
|
||||
Matthias Schmidt <matthias@dragonflybsd.org>.
|
||||
License: BSD-3
|
||||
|
||||
Files: debian/*
|
||||
Copyright: Copyright (c) 2009, 2010 Peter Pentchev.
|
||||
License: BSD-3
|
||||
|
||||
License: BSD-3
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
3. Neither the name of The DragonFly Project nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific, prior written permission.
|
||||
|
||||
License: BSD-1
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
License: BSD-2
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
@ -1,2 +0,0 @@
|
||||
usr/sbin
|
||||
usr/share/man/man8
|
@ -1 +0,0 @@
|
||||
debian/migrate/dma-migrate usr/sbin
|
@ -1 +0,0 @@
|
||||
debian/migrate/dma-migrate.8
|
@ -1,4 +0,0 @@
|
||||
etc/dma
|
||||
usr/sbin
|
||||
usr/share/lintian/overrides
|
||||
usr/share/man/man8
|
@ -1,6 +0,0 @@
|
||||
usr/sbin/dma usr/bin/mailq
|
||||
usr/sbin/dma usr/bin/newaliases
|
||||
usr/sbin/dma usr/sbin/sendmail
|
||||
usr/share/man/man8/dma.8 usr/share/man/man8/mailq.8
|
||||
usr/share/man/man8/dma.8 usr/share/man/man8/newaliases.8
|
||||
usr/share/man/man8/dma.8 usr/share/man/man8/sendmail.8
|
@ -1,8 +0,0 @@
|
||||
dma: manpage-has-errors-from-man *Unknown DragonFly version*
|
||||
dma: non-standard-dir-in-var var/mail/
|
||||
dma: non-standard-dir-perm var/spool/dma/ 0770 != 0755
|
||||
dma: non-standard-dir-perm var/spool/dma/ 2775 != 0755
|
||||
dma: non-standard-file-perm etc/dma/auth.conf 0640 != 0644
|
||||
dma: no-upstream-changelog
|
||||
dma: setgid-binary usr/sbin/dma 2755 root/mail
|
||||
dma: setuid-binary usr/lib/dma-mbox-create 4754 root/mail
|
@ -1,4 +0,0 @@
|
||||
all: dma-migrate
|
||||
|
||||
clean:
|
||||
rm -f dma-migrate dma-migrate.o
|
@ -1,6 +0,0 @@
|
||||
Change log for dma-migrate, the DragonFly Mail Agent queue migration utility.
|
||||
|
||||
0.01 not yet ;)
|
||||
- first public release
|
||||
|
||||
Comments: Peter Pentchev <roam@ringlet.net>
|
@ -1,98 +0,0 @@
|
||||
.\" Copyright (c) 2010 Peter Pentchev
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd May 11, 2009
|
||||
.Dt dma-migrate 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm dma-migrate
|
||||
.Nd convert the DragonFly Mail Agent's queue files
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl v
|
||||
.Op Fl d Ar spooldir
|
||||
.Nm
|
||||
.Op Fl h | Fl V
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility is used to convert the mail queue files in the
|
||||
.Xr dma 8
|
||||
spool directory to the latest spool directory format supported by
|
||||
the installed version of
|
||||
.Xr dma 8 .
|
||||
Currently it only handles the conversion from a single file containing
|
||||
both message and delivery metadata to the M/Q format.
|
||||
.Pp
|
||||
The following command-line options are available:
|
||||
.Bl -tag -width indent
|
||||
.It Fl d
|
||||
Specify the location of the
|
||||
.Xr dma 8
|
||||
spool directory, default
|
||||
.Pa /var/spool/dma .
|
||||
.It Fl h
|
||||
Display usage information and exit.
|
||||
.It Fl V
|
||||
Display program version information and exit.
|
||||
.It Fl v
|
||||
Verbose output - display diagnostic messages.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
The operation of the
|
||||
.Nm
|
||||
utility is currently not influenced by environment variables.
|
||||
.Sh FILES
|
||||
The
|
||||
.Nm
|
||||
utility looks for the
|
||||
.Xr dma 8
|
||||
mail queue files in the
|
||||
.Pa /var/spool/dma
|
||||
directory, unless another location is specified by the
|
||||
.Fl d
|
||||
command-line option.
|
||||
.Sh EXIT STATUS
|
||||
The
|
||||
.Nm
|
||||
utility will scan the whole spool directory and attempt to convert all
|
||||
suitable files there.
|
||||
If there are no files to be converted, or if all the conversions are
|
||||
successful, it will complete with an exit code of zero.
|
||||
If any conversion errors are encountered, a message will be displayed
|
||||
to the standard error stream and
|
||||
.Nm
|
||||
will exit with an exit code of 1 after attempting to convert the rest of
|
||||
the suitable files in the spool directory.
|
||||
.Sh SEE ALSO
|
||||
.Xr dma 8
|
||||
.Sh STANDARDS
|
||||
No standards documentation was harmed in the process of creating
|
||||
.Nm .
|
||||
.Sh BUGS
|
||||
Please report any bugs in
|
||||
.Nm
|
||||
to the author.
|
||||
.Sh AUTHOR
|
||||
.An Peter Pentchev Aq roam@ringlet.net
|
@ -1,413 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 2010 Peter Pentchev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <regex.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef __printflike
|
||||
#ifdef __GNUC__
|
||||
#define __printflike(fmtarg, firstvararg) \
|
||||
__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
|
||||
#else
|
||||
#define __printflike(fmtarg, firstvararg)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SPOOLDIR "/var/spool/dma"
|
||||
|
||||
static int verbose = 0;
|
||||
static char copybuf[BUFSIZ];
|
||||
|
||||
static int dma_migrate(int, const char *);
|
||||
|
||||
static int open_locked(const char *, int, ...);
|
||||
static void cleanup_file(int, char *);
|
||||
|
||||
static void usage(int);
|
||||
static void version(void);
|
||||
static void debug(const char *, ...) __printflike(1, 2);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
const char *spooldir;
|
||||
int hflag, Vflag, errs, fd, res;
|
||||
int ch;
|
||||
DIR *d;
|
||||
struct dirent *e;
|
||||
struct stat sb;
|
||||
|
||||
srandom((unsigned long)((time(NULL) ^ getpid()) + ((uintptr_t)argv)));
|
||||
|
||||
hflag = Vflag = 0;
|
||||
spooldir = DEFAULT_SPOOLDIR;
|
||||
while (ch = getopt(argc, argv, "d:hVv"), ch != -1)
|
||||
switch (ch) {
|
||||
case 'd':
|
||||
spooldir = optarg;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
hflag = 1;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
Vflag = 1;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
|
||||
case '?':
|
||||
default:
|
||||
usage(1);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
if (Vflag)
|
||||
version();
|
||||
if (hflag)
|
||||
usage(0);
|
||||
if (hflag || Vflag)
|
||||
exit(0);
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
/* Let's roll! */
|
||||
if (chdir(spooldir) == -1)
|
||||
err(1, "Could not change into spool directory %s", spooldir);
|
||||
if (d = opendir("."), d == NULL)
|
||||
err(1, "Could not read spool directory %s", spooldir);
|
||||
errs = 0;
|
||||
while (e = readdir(d), e != NULL) {
|
||||
/* Do we care about this entry? */
|
||||
debug("Read a directory entry: %s\n", e->d_name);
|
||||
if (strncmp(e->d_name, "tmp_", 4) == 0 ||
|
||||
e->d_name[0] == 'M' || e->d_name[0] == 'Q' ||
|
||||
(e->d_type != DT_REG && e->d_type != DT_UNKNOWN))
|
||||
continue;
|
||||
if (e->d_type == DT_UNKNOWN)
|
||||
if (stat(e->d_name, &sb) == -1 || !S_ISREG(sb.st_mode))
|
||||
continue;
|
||||
debug("- want to process it\n");
|
||||
|
||||
/* Try to lock it - skip it if dma is delivering the message */
|
||||
if (fd = open_locked(e->d_name, O_RDONLY|O_NDELAY), fd == -1) {
|
||||
debug("- seems to be locked, skipping\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Okay, convert it to the M/Q schema */
|
||||
res = dma_migrate(fd, e->d_name);
|
||||
close(fd);
|
||||
if (res == -1)
|
||||
errs++;
|
||||
}
|
||||
if (errs)
|
||||
debug("Finished, %d conversion errors\n", errs);
|
||||
else
|
||||
debug("Everything seems to be all right\n");
|
||||
return (errs && 1);
|
||||
}
|
||||
|
||||
static int
|
||||
dma_migrate(int fd, const char *fname)
|
||||
{
|
||||
const char *id;
|
||||
char *mname, *qname, *tempname, *sender, *recp, *line, *recpline;
|
||||
int mfd, qfd, tempfd;
|
||||
struct stat sb;
|
||||
FILE *fp, *qfp, *mfp;
|
||||
size_t sz, len;
|
||||
static regex_t *qidreg = NULL;
|
||||
|
||||
mfd = tempfd = qfd = -1;
|
||||
mname = qname = sender = recp = line = NULL;
|
||||
fp = qfp = NULL;
|
||||
|
||||
if (fstat(fd, &sb) == -1) {
|
||||
warn("Could not fstat(%s)", fname);
|
||||
return (-1);
|
||||
}
|
||||
/*
|
||||
* Let's just blithely assume that the queue ID *is* the filename,
|
||||
* since that's the way dma did things so far.
|
||||
* Well, okay, let's check it.
|
||||
*/
|
||||
if (qidreg == NULL) {
|
||||
regex_t *nreg;
|
||||
|
||||
if ((nreg = malloc(sizeof(*qidreg))) == NULL) {
|
||||
warn("Could not allocate memory for a regex");
|
||||
return (-1);
|
||||
}
|
||||
if (regcomp(nreg, "^[a-fA-F0-9]\\+\\.[a-fA-F0-9]\\+$", 0)
|
||||
!= 0) {
|
||||
warnx("Could not compile a dma queue ID regex");
|
||||
free(nreg);
|
||||
return (-1);
|
||||
}
|
||||
qidreg = nreg;
|
||||
}
|
||||
if (regexec(qidreg, fname, 0, NULL, 0) != 0) {
|
||||
warnx("The name '%s' is not a valid dma queue ID", fname);
|
||||
return (-1);
|
||||
}
|
||||
id = fname;
|
||||
debug(" - queue ID %s\n", id);
|
||||
if (asprintf(&mname, "M%s", id) == -1 ||
|
||||
asprintf(&tempname, "tmp_%s", id) == -1 ||
|
||||
asprintf(&qname, "Q%s", id) == -1 ||
|
||||
mname == NULL || tempname == NULL || qname == NULL)
|
||||
goto fail;
|
||||
|
||||
/* Create the message placeholder early to avoid races */
|
||||
mfd = open_locked(mname, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (mfd == -1) {
|
||||
warn("Could not create temporary file %s", mname);
|
||||
goto fail;
|
||||
}
|
||||
if (stat(qname, &sb) != -1 || errno != ENOENT ||
|
||||
stat(tempname, &sb) != -1 || errno != ENOENT) {
|
||||
warnx("Some of the queue files for %s already exist", fname);
|
||||
goto fail;
|
||||
}
|
||||
debug(" - mfd %d names %s, %s, %s\n", mfd, mname, tempname, qname);
|
||||
|
||||
fp = fdopen(fd, "r");
|
||||
if (fp == NULL) {
|
||||
warn("Could not reopen the descriptor for %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Parse the header of the old-format message file */
|
||||
/* ...sender... */
|
||||
if (getline(&sender, &sz, fp) == -1) {
|
||||
warn("Could not read the initial line from %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
sz = strlen(sender);
|
||||
while (sz > 0 && (sender[sz - 1] == '\n' || sender[sz - 1] == '\r'))
|
||||
sender[--sz] = '\0';
|
||||
if (sz == 0) {
|
||||
warnx("Empty sender line in %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
debug(" - sender %s\n", sender);
|
||||
/* ...recipient(s)... */
|
||||
len = strlen(fname);
|
||||
recpline = NULL;
|
||||
while (1) {
|
||||
if (getline(&line, &sz, fp) == -1) {
|
||||
warn("Could not read a recipient line from %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
sz = strlen(line);
|
||||
while (sz > 0 &&
|
||||
(line[sz - 1] == '\n' || line[sz - 1] == '\r'))
|
||||
line[--sz] = '\0';
|
||||
if (sz == 0) {
|
||||
free(line);
|
||||
line = NULL;
|
||||
break;
|
||||
}
|
||||
if (recp == NULL &&
|
||||
strncmp(line, fname, len) == 0 && line[len] == ' ') {
|
||||
recp = line + len + 1;
|
||||
recpline = line;
|
||||
} else {
|
||||
free(line);
|
||||
}
|
||||
line = NULL;
|
||||
}
|
||||
if (recp == NULL) {
|
||||
warnx("Could not find its own recipient line in %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
/* ..phew, finished with the header. */
|
||||
|
||||
tempfd = open_locked(tempname, O_CREAT | O_EXCL | O_RDWR, 0600);
|
||||
if (tempfd == -1) {
|
||||
warn("Could not create a queue file for %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
qfp = fdopen(tempfd, "w");
|
||||
if (qfp == NULL) {
|
||||
warn("Could not fdopen(%s) for %s", tempname, fname);
|
||||
goto fail;
|
||||
}
|
||||
mfp = fdopen(mfd, "w");
|
||||
if (mfp == NULL) {
|
||||
warn("Could not fdopen(%s) for %s", mname, fname);
|
||||
goto fail;
|
||||
}
|
||||
fprintf(qfp, "ID: %s\nSender: %s\nRecipient: %s\n", id, sender, recp);
|
||||
fflush(qfp);
|
||||
fsync(tempfd);
|
||||
|
||||
/* Copy the message file over to mname */
|
||||
while ((sz = fread(copybuf, 1, sizeof(copybuf), fp)) > 0)
|
||||
if (fwrite(copybuf, 1, sz, mfp) != sz) {
|
||||
warn("Could not copy the message from %s to %s",
|
||||
fname, mname);
|
||||
goto fail;
|
||||
}
|
||||
if (ferror(fp)) {
|
||||
warn("Could not read the full message from %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
fflush(mfp);
|
||||
fsync(mfd);
|
||||
|
||||
if (rename(tempname, qname) == -1) {
|
||||
warn("Could not rename the queue file for %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
qfd = tempfd;
|
||||
tempfd = -1;
|
||||
if (unlink(fname) == -1) {
|
||||
warn("Could not remove the old converted file %s", fname);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
fclose(qfp);
|
||||
free(sender);
|
||||
free(line);
|
||||
free(recpline);
|
||||
free(mname);
|
||||
free(qname);
|
||||
free(tempname);
|
||||
return (0);
|
||||
|
||||
fail:
|
||||
if (fp != NULL)
|
||||
fclose(fp);
|
||||
if (qfp != NULL)
|
||||
fclose(qfp);
|
||||
if (sender != NULL)
|
||||
free(sender);
|
||||
if (line != NULL)
|
||||
free(line);
|
||||
if (recpline != NULL)
|
||||
free(recpline);
|
||||
cleanup_file(mfd, mname);
|
||||
cleanup_file(qfd, qname);
|
||||
cleanup_file(tempfd, tempname);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup_file(int fd, char *fname)
|
||||
{
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
unlink(fname);
|
||||
}
|
||||
if (fname != NULL)
|
||||
free(fname);
|
||||
}
|
||||
|
||||
static void
|
||||
usage(int ferr)
|
||||
{
|
||||
const char *s =
|
||||
"Usage:\tdma-migrate [-hVv] [-d spooldir]\n"
|
||||
"\t-d\tspecify the spool directory (" DEFAULT_SPOOLDIR ")\n"
|
||||
"\t-h\tdisplay program usage information and exit\n"
|
||||
"\t-V\tdisplay program version information and exit\n"
|
||||
"\t-v\tverbose operation - display diagnostic messages";
|
||||
|
||||
if (ferr)
|
||||
errx(1, "%s", s);
|
||||
puts(s);
|
||||
}
|
||||
|
||||
static void
|
||||
version(void)
|
||||
{
|
||||
printf("dma-migrate 0.01 (dma 0.0.2010.06.17)\n");
|
||||
}
|
||||
|
||||
static void
|
||||
debug(const char *fmt, ...)
|
||||
{
|
||||
va_list v;
|
||||
|
||||
if (verbose < 1)
|
||||
return;
|
||||
va_start(v, fmt);
|
||||
vfprintf(stderr, fmt, v);
|
||||
va_end(v);
|
||||
}
|
||||
|
||||
static int
|
||||
open_locked(const char *fname, int flags, ...)
|
||||
{
|
||||
int mode = 0;
|
||||
#ifndef O_EXLOCK
|
||||
int fd, save_errno;
|
||||
#endif
|
||||
|
||||
if (flags & O_CREAT) {
|
||||
va_list ap;
|
||||
va_start(ap, flags);
|
||||
mode = va_arg(ap, int);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#ifndef O_EXLOCK
|
||||
fd = open(fname, flags, mode);
|
||||
if (fd < 0)
|
||||
return(fd);
|
||||
if (flock(fd, LOCK_EX|((flags & O_NONBLOCK)? LOCK_NB: 0)) < 0) {
|
||||
save_errno = errno;
|
||||
close(fd);
|
||||
errno = save_errno;
|
||||
return(-1);
|
||||
}
|
||||
return(fd);
|
||||
#else
|
||||
return(open(fname, flags|O_EXLOCK, mode));
|
||||
#endif
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Debian build rules for dma, the DragonFly mail agent
|
||||
|
||||
DDIR= $(CURDIR)/debian
|
||||
D= $(DDIR)/dma
|
||||
|
||||
BUILDDEFS= DESTDIR=$D PREFIX=/usr
|
||||
|
||||
CFLAGS:= $(shell dpkg-buildflags --get CFLAGS)
|
||||
CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS)
|
||||
LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
|
||||
|
||||
CONFFILES= dma.conf auth.conf
|
||||
|
||||
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS+= -Werror
|
||||
endif
|
||||
ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
export STRIPFLAG=
|
||||
endif
|
||||
ifneq (,$(filter hardening,$(DEB_BUILD_OPTIONS)))
|
||||
export DEB_BUILD_HARDENING=1
|
||||
else
|
||||
export DEB_BUILD_HARDENING=0
|
||||
endif
|
||||
|
||||
export CFLAGS CPPFLAGS LDFLAGS
|
||||
|
||||
override_dh_auto_build:
|
||||
$(MAKE) -f Makefile ${BUILDDEFS}
|
||||
$(MAKE) -C $(DDIR)/migrate
|
||||
|
||||
override_dh_auto_clean:
|
||||
$(MAKE) -f Makefile clean
|
||||
$(MAKE) -C $(DDIR)/migrate clean
|
||||
|
||||
override_dh_auto_install:
|
||||
$(MAKE) -f Makefile ${BUILDDEFS} install sendmail-link mailq-link install-spool-dirs install-etc
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms -Xusr/sbin/dma -Xusr/lib/dma-mbox-create -Xvar/spool/dma -Xetc/dma
|
||||
|
||||
override_dh_installchangelogs:
|
||||
dh_installchangelogs -p dma
|
||||
dh_installchangelogs -p dma-migrate debian/migrate/NEWS
|
||||
|
||||
%:
|
||||
dh $@
|
@ -1 +0,0 @@
|
||||
3.0 (native)
|
@ -1,2 +0,0 @@
|
||||
compression = "bzip2"
|
||||
compression-level = 9
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Simon Schubert <2@0x2c.org>
|
||||
* Copyright (c) 2010-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
|
||||
static void
|
||||
logfail(const char *fmt, ...)
|
||||
logfail(int exitcode, const char *fmt, ...)
|
||||
{
|
||||
int oerrno = errno;
|
||||
va_list ap;
|
||||
@ -73,7 +73,7 @@ logfail(const char *fmt, ...)
|
||||
else
|
||||
syslog(LOG_ERR, errno ? "%m" : "unknown error");
|
||||
|
||||
exit(1);
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -98,21 +98,21 @@ main(int argc, char **argv)
|
||||
errno = 0;
|
||||
gr = getgrnam(DMA_GROUP);
|
||||
if (!gr)
|
||||
logfail("cannot find dma group `%s'", DMA_GROUP);
|
||||
logfail(EX_CONFIG, "cannot find dma group `%s'", DMA_GROUP);
|
||||
|
||||
mail_gid = gr->gr_gid;
|
||||
|
||||
if (setgid(mail_gid) != 0)
|
||||
logfail("cannot set gid to %d (%s)", mail_gid, DMA_GROUP);
|
||||
logfail(EX_NOPERM, "cannot set gid to %d (%s)", mail_gid, DMA_GROUP);
|
||||
if (getegid() != mail_gid)
|
||||
logfail("cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid());
|
||||
logfail(EX_NOPERM, "cannot set gid to %d (%s), still at %d", mail_gid, DMA_GROUP, getegid());
|
||||
|
||||
/*
|
||||
* We take exactly one argument: the username.
|
||||
*/
|
||||
if (argc != 2) {
|
||||
errno = 0;
|
||||
logfail("no arguments");
|
||||
logfail(EX_USAGE, "no arguments");
|
||||
}
|
||||
user = argv[1];
|
||||
|
||||
@ -121,7 +121,7 @@ main(int argc, char **argv)
|
||||
/* the username may not contain a pathname separator */
|
||||
if (strchr(user, '/')) {
|
||||
errno = 0;
|
||||
logfail("path separator in username `%s'", user);
|
||||
logfail(EX_DATAERR, "path separator in username `%s'", user);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ main(int argc, char **argv)
|
||||
errno = 0;
|
||||
pw = getpwnam(user);
|
||||
if (!pw)
|
||||
logfail("cannot find user `%s'", user);
|
||||
logfail(EX_NOUSER, "cannot find user `%s'", user);
|
||||
|
||||
user_uid = pw->pw_uid;
|
||||
|
||||
@ -137,20 +137,20 @@ main(int argc, char **argv)
|
||||
if (error < 0 || (size_t)error >= sizeof(fn)) {
|
||||
if (error >= 0) {
|
||||
errno = 0;
|
||||
logfail("mbox path too long");
|
||||
logfail(EX_USAGE, "mbox path too long");
|
||||
}
|
||||
logfail("cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user);
|
||||
logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user);
|
||||
}
|
||||
|
||||
f = open(fn, O_RDONLY|O_CREAT, 0600);
|
||||
if (f < 0)
|
||||
logfail("cannot open mbox `%s'", fn);
|
||||
logfail(EX_NOINPUT, "cannt open mbox `%s'", fn);
|
||||
|
||||
if (fchown(f, user_uid, mail_gid))
|
||||
logfail("cannot change owner of mbox `%s'", fn);
|
||||
logfail(EX_OSERR, "cannot change owner of mbox `%s'", fn);
|
||||
|
||||
if (fchmod(f, 0620))
|
||||
logfail("cannot change permissions of mbox `%s'", fn);
|
||||
logfail(EX_OSERR, "cannot change permissions of mbox `%s'", fn);
|
||||
|
||||
/* file should be present with the right owner and permissions */
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
.\"
|
||||
.\" Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
.\" Copyright (c) 2008
|
||||
.\" The DragonFly Project. All rights reserved.
|
||||
.\"
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -247,7 +248,7 @@ go_background(struct queue *queue)
|
||||
|
||||
if (daemonize && daemon(0, 0) != 0) {
|
||||
syslog(LOG_ERR, "can not daemonize: %m");
|
||||
exit(1);
|
||||
exit(EX_OSERR);
|
||||
}
|
||||
daemonize = 0;
|
||||
|
||||
@ -264,7 +265,7 @@ go_background(struct queue *queue)
|
||||
switch (pid) {
|
||||
case -1:
|
||||
syslog(LOG_ERR, "can not fork: %m");
|
||||
exit(1);
|
||||
exit(EX_OSERR);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
@ -286,11 +287,11 @@ go_background(struct queue *queue)
|
||||
break;
|
||||
case 1:
|
||||
if (doqueue)
|
||||
exit(0);
|
||||
exit(EX_OK);
|
||||
syslog(LOG_WARNING, "could not lock queue file");
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
default:
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
}
|
||||
dropspool(queue, it);
|
||||
return (it);
|
||||
@ -306,7 +307,7 @@ go_background(struct queue *queue)
|
||||
}
|
||||
|
||||
syslog(LOG_CRIT, "reached dead code");
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -331,12 +332,12 @@ deliver(struct qitem *it)
|
||||
case 0:
|
||||
delqueue(it);
|
||||
syslog(LOG_INFO, "delivery successful");
|
||||
exit(0);
|
||||
exit(EX_OK);
|
||||
|
||||
case 1:
|
||||
if (stat(it->queuefn, &st) != 0) {
|
||||
syslog(LOG_ERR, "lost queue file `%s'", it->queuefn);
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
}
|
||||
if (gettimeofday(&now, NULL) == 0 &&
|
||||
(now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) {
|
||||
@ -438,16 +439,16 @@ main(int argc, char **argv)
|
||||
pw = getpwnam(DMA_ROOT_USER);
|
||||
if (pw == NULL) {
|
||||
if (errno == 0)
|
||||
errx(1, "user '%s' not found", DMA_ROOT_USER);
|
||||
errx(EX_CONFIG, "user '%s' not found", DMA_ROOT_USER);
|
||||
else
|
||||
err(1, "cannot drop root privileges");
|
||||
err(EX_OSERR, "cannot drop root privileges");
|
||||
}
|
||||
|
||||
if (setuid(pw->pw_uid) != 0)
|
||||
err(1, "cannot drop root privileges");
|
||||
err(EX_OSERR, "cannot drop root privileges");
|
||||
|
||||
if (geteuid() == 0 || getuid() == 0)
|
||||
errx(1, "cannot drop root privileges");
|
||||
errx(EX_OSERR, "cannot drop root privileges");
|
||||
}
|
||||
|
||||
atexit(deltmp);
|
||||
@ -460,15 +461,15 @@ main(int argc, char **argv)
|
||||
argv++; argc--;
|
||||
showq = 1;
|
||||
if (argc != 0)
|
||||
errx(1, "invalid arguments");
|
||||
errx(EX_USAGE, "invalid arguments");
|
||||
goto skipopts;
|
||||
} else if (strcmp(argv[0], "newaliases") == 0) {
|
||||
logident_base = "dma";
|
||||
setlogident("%s", logident_base);
|
||||
|
||||
if (read_aliases() != 0)
|
||||
errx(1, "could not parse aliases file `%s'", config.aliases);
|
||||
exit(0);
|
||||
errx(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases);
|
||||
exit(EX_OK);
|
||||
}
|
||||
|
||||
opterr = 0;
|
||||
@ -547,7 +548,7 @@ main(int argc, char **argv)
|
||||
|
||||
default:
|
||||
fprintf(stderr, "invalid argument: `-%c'\n", optopt);
|
||||
exit(1);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
@ -555,10 +556,10 @@ main(int argc, char **argv)
|
||||
opterr = 1;
|
||||
|
||||
if (argc != 0 && (showq || doqueue))
|
||||
errx(1, "sending mail and queue operations are mutually exclusive");
|
||||
errx(EX_USAGE, "sending mail and queue operations are mutually exclusive");
|
||||
|
||||
if (showq + doqueue > 1)
|
||||
errx(1, "conflicting queue operations");
|
||||
errx(EX_USAGE, "conflicting queue operations");
|
||||
|
||||
skipopts:
|
||||
if (logident_base == NULL)
|
||||
@ -578,7 +579,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (showq) {
|
||||
if (load_queue(&queue) < 0)
|
||||
errlog(1, "can not load queue");
|
||||
errlog(EX_NOINPUT, "can not load queue");
|
||||
show_queue(&queue);
|
||||
return (0);
|
||||
}
|
||||
@ -586,38 +587,38 @@ main(int argc, char **argv)
|
||||
if (doqueue) {
|
||||
flushqueue_signal();
|
||||
if (load_queue(&queue) < 0)
|
||||
errlog(1, "can not load queue");
|
||||
errlog(EX_NOINPUT, "can not load queue");
|
||||
run_queue(&queue);
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (read_aliases() != 0)
|
||||
errlog(1, "could not parse aliases file `%s'", config.aliases);
|
||||
errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases);
|
||||
|
||||
if ((sender = set_from(&queue, sender)) == NULL)
|
||||
errlog(1, "set_from failed");
|
||||
errlog(EX_SOFTWARE, "set_from()");
|
||||
|
||||
if (newspoolf(&queue) != 0)
|
||||
errlog(1, "can not create temp file in `%s'", config.spooldir);
|
||||
errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir);
|
||||
|
||||
setlogident("%s", queue.id);
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (add_recp(&queue, argv[i], EXPAND_WILDCARD) != 0)
|
||||
errlogx(1, "invalid recipient `%s'", argv[i]);
|
||||
errlogx(EX_DATAERR, "invalid recipient `%s'", argv[i]);
|
||||
}
|
||||
|
||||
if (LIST_EMPTY(&queue.queue) && !recp_from_header)
|
||||
errlogx(1, "no recipients");
|
||||
errlogx(EX_NOINPUT, "no recipients");
|
||||
|
||||
if (readmail(&queue, nodot, recp_from_header) != 0)
|
||||
errlog(1, "can not read mail");
|
||||
errlog(EX_NOINPUT, "can not read mail");
|
||||
|
||||
if (LIST_EMPTY(&queue.queue))
|
||||
errlogx(1, "no recipients");
|
||||
errlogx(EX_NOINPUT, "no recipients");
|
||||
|
||||
if (linkspool(&queue) != 0)
|
||||
errlog(1, "can not create spools");
|
||||
errlog(EX_CANTCREAT, "can not create spools");
|
||||
|
||||
/* From here on the mail is safe. */
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de> and
|
||||
* by Simon Schubert <2@0x2c.org> and
|
||||
* Matthias Schmidt <matthias@dragonflybsd.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -43,6 +44,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <netdb.h>
|
||||
#include <sysexits.h>
|
||||
|
||||
#define VERSION "DragonFly Mail Agent " DMA_VERSION
|
||||
|
||||
@ -173,6 +175,8 @@ extern char errmsg[ERRMSG_SIZE];
|
||||
|
||||
/* aliases_parse.y */
|
||||
int yyparse(void);
|
||||
int yywrap(void);
|
||||
int yylex(void);
|
||||
extern FILE *yyin;
|
||||
|
||||
/* conf.c */
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -67,7 +68,6 @@ add_host(int pref, const char *host, int port, struct mx_hostentry **he, size_t
|
||||
char servname[10];
|
||||
struct mx_hostentry *p;
|
||||
const int count_inc = 10;
|
||||
int err;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
@ -75,9 +75,26 @@ add_host(int pref, const char *host, int port, struct mx_hostentry **he, size_t
|
||||
hints.ai_protocol = IPPROTO_TCP;
|
||||
|
||||
snprintf(servname, sizeof(servname), "%d", port);
|
||||
err = getaddrinfo(host, servname, &hints, &res0);
|
||||
if (err)
|
||||
return (err == EAI_AGAIN ? 1 : -1);
|
||||
switch (getaddrinfo(host, servname, &hints, &res0)) {
|
||||
case 0:
|
||||
break;
|
||||
case EAI_AGAIN:
|
||||
case EAI_NONAME:
|
||||
/*
|
||||
* EAI_NONAME gets returned for:
|
||||
* SMARTHOST set but DNS server not reachable -> defer
|
||||
* SMARTHOST set but DNS server returns "host does not exist"
|
||||
* -> buggy configuration
|
||||
* -> either defer or bounce would be ok -> defer
|
||||
* MX entry was returned by DNS server but name doesn't resolve
|
||||
* -> hopefully transient situation -> defer
|
||||
* all other DNS problems should have been caught earlier
|
||||
* in dns_get_mx_list().
|
||||
*/
|
||||
goto out;
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
|
||||
for (res = res0; res != NULL; res = res->ai_next) {
|
||||
if (*ps + 1 >= roundup(*ps, count_inc)) {
|
||||
|
@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmp=$1
|
||||
file=${tmp:=VERSION}
|
||||
gitver=$(git describe 2>/dev/null | tr - .)
|
||||
filever=$(cat VERSION)
|
||||
filever=$(cat ${file} 2>/dev/null)
|
||||
|
||||
version=${gitver}
|
||||
: ${version:=$filever}
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -81,7 +82,7 @@ create_mbox(const char *name)
|
||||
|
||||
execl(LIBEXEC_PATH "/dma-mbox-create", "dma-mbox-create", name, NULL);
|
||||
syslog(LOG_ERR, "cannot execute "LIBEXEC_PATH"/dma-mbox-create: %m");
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
|
||||
default:
|
||||
/* parent */
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -51,7 +52,7 @@ bounce(struct qitem *it, const char *reason)
|
||||
/* Don't bounce bounced mails */
|
||||
if (it->sender[0] == 0) {
|
||||
syslog(LOG_INFO, "can not bounce a bounce message, discarding");
|
||||
exit(1);
|
||||
exit(EX_SOFTWARE);
|
||||
}
|
||||
|
||||
bzero(&bounceq, sizeof(bounceq));
|
||||
@ -132,7 +133,7 @@ bounce(struct qitem *it, const char *reason)
|
||||
fail:
|
||||
syslog(LOG_CRIT, "error creating bounce: %m");
|
||||
delqueue(it);
|
||||
exit(1);
|
||||
exit(EX_IOERR);
|
||||
}
|
||||
|
||||
struct parse_state {
|
||||
@ -332,10 +333,10 @@ parse_addrs(struct parse_state *ps, char *s, struct queue *queue)
|
||||
ps->pos = 0;
|
||||
addr = strdup(ps->addr);
|
||||
if (addr == NULL)
|
||||
errlog(1, "strdup failed");
|
||||
errlog(EX_SOFTWARE, "strdup");
|
||||
|
||||
if (add_recp(queue, addr, EXPAND_WILDCARD) != 0)
|
||||
errlogx(1, "invalid recipient `%s'", addr);
|
||||
errlogx(EX_DATAERR, "invalid recipient `%s'", addr);
|
||||
|
||||
goto again;
|
||||
}
|
||||
@ -374,7 +375,9 @@ readmail(struct queue *queue, int nodot, int recp_from_header)
|
||||
if (fgets(line, sizeof(line) - 1, stdin) == NULL)
|
||||
break;
|
||||
if (had_last_line)
|
||||
errlogx(1, "bad mail input format");
|
||||
errlogx(EX_DATAERR, "bad mail input format:"
|
||||
" from %s (uid %d) (envelope-from %s)",
|
||||
username, useruid, queue->sender);
|
||||
linelen = strlen(line);
|
||||
if (linelen == 0 || line[linelen - 1] != '\n') {
|
||||
/*
|
||||
@ -405,7 +408,7 @@ readmail(struct queue *queue, int nodot, int recp_from_header)
|
||||
|
||||
if (parse_state.state != NONE) {
|
||||
if (parse_addrs(&parse_state, line, queue) < 0) {
|
||||
errlogx(1, "invalid address in header\n");
|
||||
errlogx(EX_DATAERR, "invalid address in header\n");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
@ -416,7 +419,7 @@ readmail(struct queue *queue, int nodot, int recp_from_header)
|
||||
strprefixcmp(line, "Bcc:") == 0)) {
|
||||
parse_state.state = START;
|
||||
if (parse_addrs(&parse_state, line, queue) < 0) {
|
||||
errlogx(1, "invalid address in header\n");
|
||||
errlogx(EX_DATAERR, "invalid address in header\n");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -289,7 +290,7 @@ load_queue(struct queue *queue)
|
||||
|
||||
spooldir = opendir(config.spooldir);
|
||||
if (spooldir == NULL)
|
||||
err(1, "reading queue");
|
||||
err(EX_NOINPUT, "reading queue");
|
||||
|
||||
while ((de = readdir(spooldir)) != NULL) {
|
||||
queuefn = NULL;
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2014, Simon Schubert <2@0x2c.org>.
|
||||
* Copyright (c) 2008 The DragonFly Project. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The DragonFly Project
|
||||
* by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>.
|
||||
* by Simon Schubert <2@0x2c.org>.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -1678,19 +1678,19 @@ _ELF_DEFINE_RELOC(R_MIPS_GOTHI16, 21) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_GOTLO16, 22) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLHI16, 30) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_CALLLO16, 31) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32 38) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32 39) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64 40) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64 41) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GD 42) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM 43) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16 44) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16 45) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL 46) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32 47) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64 48) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16 49) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16 50)
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD32, 38) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL32, 39) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPMOD64, 40) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL64, 41) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GD, 42) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_LDM, 43) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_HI16, 44) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_DTPREL_LO16, 45) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_GOTTPREL, 46) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL32, 47) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL64, 48) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_HI16, 49) \
|
||||
_ELF_DEFINE_RELOC(R_MIPS_TLS_TPREL_LO16, 50)
|
||||
|
||||
#define _ELF_DEFINE_PPC32_RELOCATIONS() \
|
||||
_ELF_DEFINE_RELOC(R_PPC_NONE, 0) \
|
||||
|
@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, const X86Subtarget *Subtarget,
|
||||
DAG.getConstant(SSECC, dl, MVT::i8));
|
||||
}
|
||||
|
||||
MVT VTOp0 = Op0.getSimpleValueType();
|
||||
assert(VTOp0 == Op1.getSimpleValueType() &&
|
||||
"Expected operands with same type!");
|
||||
assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
|
||||
"Invalid number of packed elements for source and destination!");
|
||||
|
||||
if (VT.is128BitVector() && VTOp0.is256BitVector()) {
|
||||
// On non-AVX512 targets, a vector of MVT::i1 is promoted by the type
|
||||
// legalizer to a wider vector type. In the case of 'vsetcc' nodes, the
|
||||
// legalizer firstly checks if the first operand in input to the setcc has
|
||||
// a legal type. If so, then it promotes the return type to that same type.
|
||||
// Otherwise, the return type is promoted to the 'next legal type' which,
|
||||
// for a vector of MVT::i1 is always a 128-bit integer vector type.
|
||||
//
|
||||
// We reach this code only if the following two conditions are met:
|
||||
// 1. Both return type and operand type have been promoted to wider types
|
||||
// by the type legalizer.
|
||||
// 2. The original operand type has been promoted to a 256-bit vector.
|
||||
//
|
||||
// Note that condition 2. only applies for AVX targets.
|
||||
SDValue NewOp = DAG.getSetCC(dl, VTOp0, Op0, Op1, SetCCOpcode);
|
||||
return DAG.getZExtOrTrunc(NewOp, dl, VT);
|
||||
}
|
||||
|
||||
// The non-AVX512 code below works under the assumption that source and
|
||||
// destination types are the same.
|
||||
assert((Subtarget->hasAVX512() || (VT == VTOp0)) &&
|
||||
"Value types for source and destination must be the same!");
|
||||
|
||||
// Break 256-bit integer vector compare into smaller ones.
|
||||
if (VT.is256BitVector() && !Subtarget->hasInt256())
|
||||
return Lower256IntVSETCC(Op, DAG);
|
||||
|
142
contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff
Normal file
142
contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff
Normal file
@ -0,0 +1,142 @@
|
||||
Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
|
||||
|
||||
[x86] Fix wrong lowering of vsetcc nodes (PR25080).
|
||||
|
||||
Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
|
||||
assumption that for non-AVX512 targets, the source type and destination type
|
||||
of a type-legalized setcc node were always the same type.
|
||||
|
||||
This assumption was unfortunately incorrect; the type legalizer is not always
|
||||
able to promote the return type of a setcc to the same type as the first
|
||||
operand of a setcc.
|
||||
|
||||
In the case of a vsetcc node, the legalizer firstly checks if the first input
|
||||
operand has a legal type. If so, then it promotes the return type of the vsetcc
|
||||
to that same type. Otherwise, the return type is promoted to the 'next legal
|
||||
type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.
|
||||
|
||||
Example (-mattr=+avx):
|
||||
|
||||
%0 = trunc <8 x i32> %a to <8 x i23>
|
||||
%1 = icmp eq <8 x i23> %0, zeroinitializer
|
||||
|
||||
The initial selection dag for the code above is:
|
||||
|
||||
v8i1 = setcc t5, t7, seteq:ch
|
||||
t5: v8i23 = truncate t2
|
||||
t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
|
||||
t7: v8i32 = build_vector of all zeroes.
|
||||
|
||||
The type legalizer would firstly check if 't5' has a legal type. If so, then it
|
||||
would reuse that same type to promote the return type of the setcc node.
|
||||
Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
|
||||
promote the return type of the setcc node. Consequently, the setcc return type
|
||||
is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
|
||||
following dag node:
|
||||
v8i16 = setcc t32, t25, seteq:ch
|
||||
|
||||
where t32 and t25 are now values of type v8i32.
|
||||
|
||||
Before this patch, function LowerVSETCC would have wrongly expanded the setcc
|
||||
to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
|
||||
instruction. In our case, ISel would have matched a VPCMPEQWrr:
|
||||
t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25
|
||||
|
||||
However, t36 and t25 are both VR256, while the result type is instead of class
|
||||
VR128. This inconsistency ended up causing the insertion of COPY instructions
|
||||
like this:
|
||||
%vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3
|
||||
|
||||
Which is an invalid full copy (not a sub register copy).
|
||||
Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
|
||||
instruction" in the attempt to expand the malformed pseudo COPY instructions.
|
||||
|
||||
This patch fixes the problem adding the missing logic in LowerVSETCC to handle
|
||||
the corner case of a setcc with 128-bit return type and 256-bit operand type.
|
||||
|
||||
This problem was originally reported by Dimitry as PR25080. It has been latent
|
||||
for a very long time. I have added the minimal reproducible from that bugzilla
|
||||
as test setcc-lowering.ll.
|
||||
|
||||
Differential Revision: http://reviews.llvm.org/D13660
|
||||
|
||||
This should fix the "Cannot emit physreg copy instruction" errors when
|
||||
compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
|
||||
to a CPU supporting AVX (e.g. sandybridge, ivybridge).
|
||||
|
||||
Introduced here: http://svnweb.freebsd.org/changeset/base/289221
|
||||
|
||||
Index: lib/Target/X86/X86ISelLowering.cpp
|
||||
===================================================================
|
||||
--- lib/Target/X86/X86ISelLowering.cpp
|
||||
+++ lib/Target/X86/X86ISelLowering.cpp
|
||||
@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, const X86Su
|
||||
DAG.getConstant(SSECC, dl, MVT::i8));
|
||||
}
|
||||
|
||||
+ MVT VTOp0 = Op0.getSimpleValueType();
|
||||
+ assert(VTOp0 == Op1.getSimpleValueType() &&
|
||||
+ "Expected operands with same type!");
|
||||
+ assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() &&
|
||||
+ "Invalid number of packed elements for source and destination!");
|
||||
+
|
||||
+ if (VT.is128BitVector() && VTOp0.is256BitVector()) {
|
||||
+ // On non-AVX512 targets, a vector of MVT::i1 is promoted by the type
|
||||
+ // legalizer to a wider vector type. In the case of 'vsetcc' nodes, the
|
||||
+ // legalizer firstly checks if the first operand in input to the setcc has
|
||||
+ // a legal type. If so, then it promotes the return type to that same type.
|
||||
+ // Otherwise, the return type is promoted to the 'next legal type' which,
|
||||
+ // for a vector of MVT::i1 is always a 128-bit integer vector type.
|
||||
+ //
|
||||
+ // We reach this code only if the following two conditions are met:
|
||||
+ // 1. Both return type and operand type have been promoted to wider types
|
||||
+ // by the type legalizer.
|
||||
+ // 2. The original operand type has been promoted to a 256-bit vector.
|
||||
+ //
|
||||
+ // Note that condition 2. only applies for AVX targets.
|
||||
+ SDValue NewOp = DAG.getSetCC(dl, VTOp0, Op0, Op1, SetCCOpcode);
|
||||
+ return DAG.getZExtOrTrunc(NewOp, dl, VT);
|
||||
+ }
|
||||
+
|
||||
+ // The non-AVX512 code below works under the assumption that source and
|
||||
+ // destination types are the same.
|
||||
+ assert((Subtarget->hasAVX512() || (VT == VTOp0)) &&
|
||||
+ "Value types for source and destination must be the same!");
|
||||
+
|
||||
// Break 256-bit integer vector compare into smaller ones.
|
||||
if (VT.is256BitVector() && !Subtarget->hasInt256())
|
||||
return Lower256IntVSETCC(Op, DAG);
|
||||
Index: test/CodeGen/X86/setcc-lowering.ll
|
||||
===================================================================
|
||||
--- test/CodeGen/X86/setcc-lowering.ll
|
||||
+++ test/CodeGen/X86/setcc-lowering.ll
|
||||
@@ -0,0 +1,29 @@
|
||||
+; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s
|
||||
+
|
||||
+; Verify that we don't crash during codegen due to a wrong lowering
|
||||
+; of a setcc node with illegal operand types and return type.
|
||||
+
|
||||
+define <8 x i16> @pr25080(<8 x i32> %a) {
|
||||
+; CHECK-LABEL: pr25080:
|
||||
+; CHECK: # BB#0: # %entry
|
||||
+; CHECK-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
|
||||
+; CHECK-NEXT: vextractf128 $1, %ymm0, %xmm1
|
||||
+; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
|
||||
+; CHECK-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1
|
||||
+; CHECK-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15]
|
||||
+; CHECK-NEXT: vpshufb %xmm3, %xmm1, %xmm1
|
||||
+; CHECK-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0
|
||||
+; CHECK-NEXT: vpshufb %xmm3, %xmm0, %xmm0
|
||||
+; CHECK-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
|
||||
+; CHECK-NEXT: vpor {{.*}}(%rip), %xmm0, %xmm0
|
||||
+; CHECK-NEXT: vpsllw $15, %xmm0, %xmm0
|
||||
+; CHECK-NEXT: vpsraw $15, %xmm0, %xmm0
|
||||
+; CHECK-NEXT: vzeroupper
|
||||
+; CHECK-NEXT: retq
|
||||
+entry:
|
||||
+ %0 = trunc <8 x i32> %a to <8 x i23>
|
||||
+ %1 = icmp eq <8 x i23> %0, zeroinitializer
|
||||
+ %2 = or <8 x i1> %1, <i1 true, i1 true, i1 true, i1 true, i1 false, i1 false, i1 false, i1 false>
|
||||
+ %3 = sext <8 x i1> %2 to <8 x i16>
|
||||
+ ret <8 x i16> %3
|
||||
+}
|
88
contrib/subversion/.ycm_extra_conf.py
Normal file
88
contrib/subversion/.ycm_extra_conf.py
Normal file
@ -0,0 +1,88 @@
|
||||
# Configuration file for YouCompleteMe vim plugin to allow the plugin
|
||||
# to determine the compile flags. This file is based on:
|
||||
# https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/.ycm_extra_conf.py
|
||||
#
|
||||
# This is free and unencumbered software released into the public domain.
|
||||
#
|
||||
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
# distribute this software, either in source code form or as a compiled
|
||||
# binary, for any purpose, commercial or non-commercial, and by any
|
||||
# means.
|
||||
#
|
||||
# In jurisdictions that recognize copyright laws, the author or authors
|
||||
# of this software dedicate any and all copyright interest in the
|
||||
# software to the public domain. We make this dedication for the benefit
|
||||
# of the public at large and to the detriment of our heirs and
|
||||
# successors. We intend this dedication to be an overt act of
|
||||
# relinquishment in perpetuity of all present and future rights to this
|
||||
# software under copyright law.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
# OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
import os
|
||||
import ycm_core
|
||||
from clang_helpers import PrepareClangFlags
|
||||
|
||||
compilation_database_folder = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if compilation_database_folder:
|
||||
database = ycm_core.CompilationDatabase( compilation_database_folder )
|
||||
else:
|
||||
database = None
|
||||
|
||||
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
|
||||
if not working_directory:
|
||||
return flags
|
||||
new_flags = []
|
||||
make_next_absolute = False
|
||||
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
|
||||
for flag in flags:
|
||||
new_flag = flag
|
||||
|
||||
if make_next_absolute:
|
||||
make_next_absolute = False
|
||||
if not flag.startswith( '/' ):
|
||||
new_flag = os.path.join( working_directory, flag )
|
||||
|
||||
for path_flag in path_flags:
|
||||
if flag == path_flag:
|
||||
make_next_absolute = True
|
||||
break
|
||||
|
||||
if flag.startswith( path_flag ):
|
||||
path = flag[ len( path_flag ): ]
|
||||
new_flag = path_flag + os.path.join( working_directory, path )
|
||||
break
|
||||
|
||||
if new_flag:
|
||||
new_flags.append( new_flag )
|
||||
return new_flags
|
||||
|
||||
|
||||
def FlagsForFile( filename ):
|
||||
if database:
|
||||
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
|
||||
# python list, but a "list-like" StringVec object
|
||||
compilation_info = database.GetCompilationInfoForFile( filename )
|
||||
final_flags = PrepareClangFlags(
|
||||
MakeRelativePathsInFlagsAbsolute(
|
||||
compilation_info.compiler_flags_,
|
||||
compilation_info.compiler_working_dir_ ),
|
||||
filename )
|
||||
do_cache = True
|
||||
else:
|
||||
final_flags = [ ]
|
||||
do_cache = False
|
||||
|
||||
return {
|
||||
'flags': final_flags,
|
||||
'do_cache': do_cache
|
||||
}
|
@ -1,3 +1,799 @@
|
||||
Version 1.9.2
|
||||
(30 Sep 2015, from /branches/1.9.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.9.2
|
||||
|
||||
User-visible changes:
|
||||
- Client-side bugfixes:
|
||||
* svn: fix crash when saving credentials in kwallet (r1700740, r1700951)
|
||||
* checkout/update: fix "access denied" error on Windows (r1701064 et al)
|
||||
* update: fix crash when updating a conflicted tree (r1702198, r1702200)
|
||||
* commit: fix possible crash (r1702231)
|
||||
* ra_serf: do not crash on unexpected 'X-SVN-VR-Base' headers (r1702288)
|
||||
* merge: fix crash when merging to a local add (r1702299 et al)
|
||||
* svnmucc: fix error during propset+put for existing file (r1702467 et al)
|
||||
* update: fix crash without .svn/tmp folder (r1701838, r1702203)
|
||||
* checkout: remove unnecessary I/O operation (r1701638)
|
||||
* merge: fix possible crash (r1701997)
|
||||
* update: fix crash with some of the incoming deletes (r1702247)
|
||||
* upgrade: fix crash for pre-1.3 wc with externals (r1702218 et al)
|
||||
* revert: fix crash when reverting the root of a move (r1702237 et al)
|
||||
* svn: do not crash upon specific database corruptions (r1702974, r1702991)
|
||||
* svn: show utf8proc version in svn --version --verbose (r1702533, r1702891)
|
||||
|
||||
- Server-side bugfixes:
|
||||
* fix reporting for empty representations in svnfsfs stats (r1698312 et al)
|
||||
|
||||
Developer-visible changes:
|
||||
- General:
|
||||
* fix svnfsfs_tests.py in fsfs-v4 and fsfs-v6 modes (r1700215 et al)
|
||||
|
||||
- API changes:
|
||||
* disable unsupported operations for standard streams (r1701633 et al)
|
||||
|
||||
|
||||
Version 1.9.1
|
||||
(02 Sep 2015, from /branches/1.9.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.9.1
|
||||
|
||||
User-visible changes:
|
||||
- Client-side bugfixes:
|
||||
* Fix crash with GPG-agent with non-canonical $HOME (r1691928, issue #4584)
|
||||
* Fix checkout errors with svn+ssh:// on Windows (r1696222, r1696225)
|
||||
* svn: expose expat and zlib versions in svn --version --verbose (r1696387, r1697664)
|
||||
* svn: improve help text for 'svn info --show-item' (r1698106)
|
||||
|
||||
- Server-side bugfixes:
|
||||
* svnserve: fixed minor typo in help text (r1694023)
|
||||
* Enable caching with memcached on Windows (1674626, r1674785)
|
||||
* Fix an error leak in FSFS verification (r1693886)
|
||||
* Fix incomplete membuffer cache initialization (r1695022)
|
||||
* svnfsfs: fix some bugs and inconsistencies in load-index (r1697381 et al.)
|
||||
|
||||
- Client-side and server-side bugfixes:
|
||||
* Fix alignment fault in ra_svn on 32 bit SPARC machines (r1697914)
|
||||
|
||||
- Bindings bugfixes:
|
||||
* Fix memory corruption in copy source SWIG bindings (r1694929)
|
||||
|
||||
Developer-visible changes:
|
||||
* Better configure-time detection of httpd version and authz fix (r1687304 et al.)
|
||||
* Correct a parameter name in svn_repos_get_fs_build_parser5 (r1694194)
|
||||
* Resolve circular library reference in libsvn_fs_x (r1696695)
|
||||
* Fix Unix build on systems without GPG agent (r1694481, r1697824)
|
||||
|
||||
Version 1.9.0
|
||||
(5 Aug 2015, from /branches/1.9.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.9.0
|
||||
|
||||
User-visible changes:
|
||||
- General:
|
||||
* make all commands provide brief description in help output (r1522518)
|
||||
* flush stdout before exiting to avoid information being lost (r1543868)
|
||||
|
||||
- Major new features:
|
||||
* fsfs: new format 7 with more efficient on-disk layout (r1547045 et al)
|
||||
* blame: support showing prospective as well as previous changes
|
||||
* info: support printing of individual values with --show-item (r1662620)
|
||||
* svn auth: new subcommand to manage cached credentials and certs
|
||||
* svnserve: cache config and authz to lower resource usage and be able to
|
||||
serve large numbers of connections with a limited number of threads
|
||||
* membuffer: quadruple the maximum cacheable directory size (r1545948 et al)
|
||||
* new filesystem fsx (faster, smaller); experimental - see release notes
|
||||
|
||||
- Minor new features and improvements:
|
||||
* new 'diff-ignore-content-type' runtime configuration option
|
||||
* new option for 'svnadmin verify': --check-normalization
|
||||
* new option for 'svnadmin verify': --keep-going
|
||||
* svnadmin info: new subcommand to print info about a repository
|
||||
* print summary of conflicts before/after interactive conflict resolution
|
||||
* import: reduce number of connections to the server needed (r1482962)
|
||||
* membuffer: rework cache eviction heuristics (r1476664 et at)
|
||||
* membuffer: improved cache usage statistics (r1489883)
|
||||
* mergeinfo: new '--log' option (r1492168)
|
||||
* svnadmin upgrade: progress and cancellation support (r1495545, r1495566)
|
||||
* cleanup: add '--remove-unversioned' and '--remove-ignored' (issue #3549)
|
||||
* cleanup: add '--include-externals' option (issue #2325)
|
||||
* cleanup: add '--quiet' option (r1498661)
|
||||
* svnadmin load: speedup by setting revprops in one call (r1504079)
|
||||
* svnadmin load: set svn:date revprop in the initial commit (r1504951)
|
||||
* reimplement UTF-8 fuzzy conversion using utf8proc (r1511676)
|
||||
* svnadmin verify: speed up for repos with large directories (r1520419)
|
||||
* svn merge: interactive conflict resolver tries external tools (r1524145)
|
||||
* minor speed up in string to time conversion (r1533387)
|
||||
* windows: speed up console output (r1533994)
|
||||
* update: optimize wc db usage when obtaining children (r1537065 et al)
|
||||
* decreased overhead for case-sensitive configuration access (r1538068)
|
||||
* avoid re-opening repo for in-repo authz if already open (r1538120)
|
||||
* svnserve: output errors in a more standard way (r1544250)
|
||||
* faster parsing of config file comments (r1544716)
|
||||
* avoid trying to open the hooks-env file when it doesn't exist (r1544721)
|
||||
* svnserve: provide the same logging detail in "run once" mode as provided
|
||||
in the log file (r1544731)
|
||||
* svnserve: reduce connection latency (r1544732)
|
||||
* wc: reduce the number of locks and transactions required (r1545127 et al)
|
||||
* cat: add '--ignore-keywords' option (r1547517)
|
||||
* merge and mergeinfo: use fewer RA sessions (r1552265)
|
||||
* fsfs: limit delta chains from crossing too many shards (r1554942)
|
||||
* fsfs: option to configure compression level in deltas (r1559748)
|
||||
* fsfs: enable dir and prop deltas by default for formats that support
|
||||
it (r1555286)
|
||||
* fsfs: avoid out of date errors from files in a directory changing when
|
||||
you change a property on the directory (r1558224)
|
||||
* fsfs: temporary transaction properties are preserved when commit is
|
||||
interrupted (r1549907 et al)
|
||||
* fsfs: speed up transaction creation (r1544719)
|
||||
* fsfs: avoid trying to open lock digest files that don't exist (r1544721)
|
||||
* fsfs: reduce internal overhead by using sorted array instead of hash for
|
||||
directory representation (r1554711)
|
||||
* fsfs: skip decoding txdelta windows that are already cached (r1555284)
|
||||
* fsfs: avoid constructing fulltext when delta we need is stored (r1555297)
|
||||
* fsfs: improvements to format 6 reading/writing (r1517479)
|
||||
* fsfs: reduce overhead of parsing noderev structures (r1544717)
|
||||
* fsfs: speed up node relation comparison (r1554807)
|
||||
* fsfs: speed up critical open_path() call (r1483301 et al)
|
||||
* fsfs: speed up node verification (r1520421 et al)
|
||||
* fsfs: speed up serialization into cache buffer format (r1505056)
|
||||
* fsfs: avoid caching intermediate fulltexts (r1565100)
|
||||
* fsfs: reduce lock contention on txn-list-lock (r1569549)
|
||||
* svnadmin: don't display warnings as errors (r1556297)
|
||||
* ra_serf: avoid caching properties in the update editor (r1557538)
|
||||
* ra_serf: decrease latency of requests to get directory contents by
|
||||
pipelining requests, speeds up 'svn ls --include externals' and
|
||||
some cases of multi-url diff, including merge (r1557548)
|
||||
* ra_serf: spool small update reports in memory to avoid making temp files
|
||||
for small requests (r1557599)
|
||||
* ra_serf: allow the reuse of serf connections after an error (r1553341)
|
||||
* ra_serf: improve many error messages (r1551910 et al)
|
||||
* ra_serf: pipeline lock/unlock requests (r1551918, r1551993, r1552008)
|
||||
* ra_serf: pipeline requests for inherited properties against old servers
|
||||
that don't support the faster REPORT (r1552455, r1552475)
|
||||
* ra_serf: allow reuse of sessions after a canceled request (r1557686)
|
||||
* ra_serf: reduce memory usage when retrieving revision props (r1557689)
|
||||
* mod_dav_svn: make out of date error message consistent with generic repos
|
||||
logic (r1558247)
|
||||
* allow SQLite to optimize functions that are deterministic (r1559352)
|
||||
* speed up delta calculations on non-deltifyable sections (r1559767)
|
||||
* ra_serf: improve memory usage in commit processing (r1520028)
|
||||
* report progress as cumulative across all sessions (issue #3260)
|
||||
* ra_serf: don't send DAV headers with GET requests (r1517472)
|
||||
* mod_dav_svn: SVNCacheTextDeltas defaults to on (r1517479)
|
||||
* fs: improve scalability of fs_open and similar functions (r1523450 et al)
|
||||
* svnserve: improve performance and scalability (r1523465 et al)
|
||||
* svnadmin verify: output progress messages to stdout (r1471095)
|
||||
* svnadmin crashtest: make output less misleading (r1486046)
|
||||
* mod_dav_svn: discover copy to src earlier in some cases (r1537440)
|
||||
* speed up mergeinfo parsing (r1483292, r1483309 et al)
|
||||
* optimize hash lookups used in mergeinfo and caching (r1483434 et al)
|
||||
* log: optimize string handling in repos layer (r1483570, r1483572)
|
||||
* ask disk hardware to sync instead of only syncing to hardware buffers
|
||||
when OS supports it (r1484439, r1484445)
|
||||
* optimize diff code to avoid unneeded comparisons (r1485488)
|
||||
* optimize check if relpaths are canonical (r1485496, r1489828)
|
||||
* ra_svn: reduce protocol implementation overhead (r1485499, r1485504 et al)
|
||||
* optimize file translation without keyword substitution (r1486058)
|
||||
* optimize config file parsing by using unbuffered I/O (r1486897)
|
||||
* patch: apply ignore settings when deciding to delete dirs (r1490378)
|
||||
* use a cheaper RA operation for common client calculation (r1496468 et al)
|
||||
* ra_svn: avoid unnecessary work when doing a blame (r1503046)
|
||||
* optimize reading files into memory if size is known (r1505068)
|
||||
* copy: do not error on properties when doing a foreign copy (r1563361)
|
||||
* membuffer: reduce memory usage by using shorter lived pools (r1564217)
|
||||
* svnadmin load: add '--ignore-dates' option (r1564789)
|
||||
* update: reduce sessions used with '--parents' option (r1565920)
|
||||
* diff: report properties on deleted nodes (r1569320, r1570055)
|
||||
* diff: switch to diff processor APIs instead of old style callbacks, step
|
||||
towards resolving long standing bugs and feature requests (r1569551 et al)
|
||||
* diff: use the proper revision in headers for addition and deletion
|
||||
of files (r1570053)
|
||||
* svnadmin lslocks: add cancellation (r1571992)
|
||||
* svn --version: list available authentication credential caches (r1572106)
|
||||
* fs: improved detection of changes between two nodes, this should reduce
|
||||
the number of out of date errors clients see (r1572336)
|
||||
* allow the use of libmagic to be configured via subversion configuration
|
||||
file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916)
|
||||
* new '--pin-externals' option for svn copy (issue #1258)
|
||||
* the '--strict' option was renamed '--no-newline' (r1662224)
|
||||
* merge/update: switch to three-way text conflict markers
|
||||
(r1591951, r1595522)
|
||||
* patch: handle renames in git formatted patches (r1594636)
|
||||
* svnfsfs: new expert tool (r1594860)
|
||||
* mod_dav_svn: allow server admin to GET the FSFS global cache stats
|
||||
(r1595160)
|
||||
* diff: support git-like binary file diffs with '--git' (r1599552)
|
||||
* diff: support arbitrary context size for internal diff tool with
|
||||
'-U' option (r1603847, 1603871)
|
||||
* commit: print progress notification between client finishing
|
||||
transmitting text deltas and asking server to commit (r1604179)
|
||||
* fsfs: optimize log commands for repos on Windows by not
|
||||
using a locale specific function to parse ids (r1605123)
|
||||
* fsfs: reduce memory usage of reading/writing changed paths caches
|
||||
(r1605188 et al)
|
||||
* mod_dav_svn: log post-commit errors to httpd error log as well
|
||||
as returning them to client (r1606004)
|
||||
* make server config groups work with svn:// URLs (issue #4512)
|
||||
* svnadmin hotcopy: report progress when copying revisions and packed
|
||||
shards for FSFS repositories (r1613339)
|
||||
* info: show revisions for missing tree conflicts (r1617932)
|
||||
* fsfs: avoid shared data clashes due to multiple distinct repositories
|
||||
having identical UUIDs (r1618138 et al)
|
||||
* status: ignore thumbs.db files by default (r1620955)
|
||||
* fsfs: harden parsers against data corruption (r1622931, r1622937,
|
||||
r1622942)
|
||||
* diff: respect svn:keywords and svn:eol-style when doing arbitrary
|
||||
diffs (r1623820)
|
||||
* ra_serf: reduce size of XML generated for reports (r1627333)
|
||||
* replace generic --trust-server-cert with more specific options to
|
||||
override specific certificate failures (r1630117 et al)
|
||||
* commit: improve speed of commits with many files (r1630312 et al)
|
||||
* svnadmin setrevprop: add '--transaction' option (r1631435)
|
||||
* svnadmin delrevprop: new subcommand (1592723)
|
||||
* svnadmin verify: validate the index data against checksums (r1631598)
|
||||
* svnadmin verify: new option '--metadata-only' (r1593753)
|
||||
* cp: improve performance of local copies (r1632284, et al)
|
||||
* fsfs: speed up operations that use revision properties (r1634875,
|
||||
r1634879)
|
||||
* checkout/update: use fewer RA sessions (r1635753 et al)
|
||||
* log: do less work when '--with-no-revprops' is used (r1642231)
|
||||
* patch: improve command to be more capable as compared to GNU patch
|
||||
(issue #4533)
|
||||
* limit server caches to avoid running out of memory if server admin
|
||||
configured caches larger than supported by the platform (r1645572)
|
||||
* mod_authz_svn: log implicit read access failures with INFO log level;
|
||||
Explicit read access failures are still logged with ERROR log level
|
||||
(r1653032)
|
||||
* ra_serf: reduce memory usage by removing some extra intermediary state
|
||||
(r1654681, r1654690)
|
||||
* revert: improve performance on large working copies without changes
|
||||
(r1657083)
|
||||
* ra_svn: improve efficiency of editor processing (r1658194 et al)
|
||||
* merge: provide different conflict reasons for local additions and
|
||||
unversioned obstructions (r1659381)
|
||||
* windows: improve checkout performance on windows by using sqlite truncate
|
||||
journal mode rather than delete (r1659426)
|
||||
* status: now accept '-r' argument (r1671164, 1672578, 1673228)
|
||||
* ls: improve performance of '-v' on tag directories (r1673153)
|
||||
* resolve: improve conflict prompts for binary files (r1667228 et al)
|
||||
* fsfs: improve error messages for parsing errors (r1678147, r1678149)
|
||||
* warn when the '--config-option' FILE:SECTION:OPTION combination may
|
||||
be invalid. (r1674301 et al)
|
||||
* ensure full key matching in membuffer cache (r1678950 et al)
|
||||
* mod_dav_svn: expose cache statistics via HTTP (r1595160)
|
||||
|
||||
- Client-side bugfixes:
|
||||
* export: fix problem exporting symlinks on windows (r1476093)
|
||||
* fix non-ascii character handling of command line options (r1476461)
|
||||
* log: strip EOL marker only after converting to UTF-8 (r1476608)
|
||||
* ra_serf: avoid dropping errors when making a lock request (r1489526)
|
||||
* ra_serf: fix an error leak in update logic (r1499686)
|
||||
* windows: fix issues with wcs in symlinked folders (r1501251)
|
||||
* fix regression that broke parallel nested checkouts (issue #4390)
|
||||
* svnmucc: ignore leading r in revision number arguments to -r (r1502636)
|
||||
* mkdir: use absolute paths to avoid Windows path length limits (r1516816)
|
||||
* avoid encoding support code when C runtime doesn't support it (r1530582)
|
||||
* ra_svn: add check against dirents with path separators (r1533812)
|
||||
* properly delete temporary files when atomic write fails (r1537466)
|
||||
* wc: fix corner cases in move-update tree conflicts (r1538639 et al)
|
||||
* windows: fix crash report indentation for x64 reports (r1543589)
|
||||
* mergeinfo: allow to work on a moved target (issue #4301)
|
||||
* windows: avoid delay when no homedir is available (r1546814)
|
||||
* status: report externals in a deterministic way (r1550200)
|
||||
* copy: avoid an unneeded extra RA session for wc to repo case (r1551564)
|
||||
* ra_serf: show pre-revprop-change failure on revprop delete (issue #3086)
|
||||
* svnsync: avoid extra request at end of every revision sync (r1553370)
|
||||
* ra_serf: fix replace + propset of locked file failures (issue #3674)
|
||||
* ra_serf: prevent overwriting directory during copy (issue #3314)
|
||||
* commit: limit number of temporary files open at same time (issue #4172)
|
||||
* ra_serf: verify incoming integers are really integers (r1557709 et al)
|
||||
* log: -g --xml doesn't differentiate between forward and reverse merges
|
||||
(issue #4463)
|
||||
* windows: improve update and checkout speed (issue #4450)
|
||||
* log: reduce performance penalties of using -g (r1559912)
|
||||
* blame: reduce performance penalties of using -g (r1560112)
|
||||
* ra_local: set svn:txn-user-agent for consistency (r1498608)
|
||||
* ra_svn: use the stream API properly for communications (r1562072)
|
||||
* update: provide error when none of targets are wcs (r1565388)
|
||||
* wc: reduce dependence on unspecified SQLite behavior (r1567080 et al)
|
||||
* diff: fix diffing directory without permissions to read parent (r1569265,
|
||||
r1569290)
|
||||
* diff: improve resolving peg revisions (r1570205 et al)
|
||||
* diff: fix bug in calculating header paths (r1570584)
|
||||
* ra_serf: add SSL certificate issuers common name to output (r1573728)
|
||||
* updates keywords in files not modified during 'svn switch' (issue #1975)
|
||||
* svnmucc: Normalize line endings with '-F' and '-m' options
|
||||
(r1592148, r1592150)
|
||||
* fix problems with read-only authentication caches (issue #4504)
|
||||
* commit: don't bump just locked files (r1603617)
|
||||
* log: reduce memory with '-v' (r1604569 et al)
|
||||
* diff: fix diffing locally deleted nodes under copied directories
|
||||
(r1605832)
|
||||
* diff: fix missing node error when diffing a replaced node (r1605866)
|
||||
* propget: forbid using 'show-inherited-properties' with 'strict' (r1611698)
|
||||
* windows: avoid delay when user profile isn't writable (r1617926)
|
||||
* merge: display the correct node kinds for tree conflicts (r1618024,
|
||||
r1619418, r1619717)
|
||||
* diff: show the correct revisions in the header (r1619452)
|
||||
* diff: fix missing header for files with only property changes (r1619476)
|
||||
* update: raise a tree conflict rather than an obstruction when an
|
||||
incoming server-excluded node conflicts with a locally added node
|
||||
(r1619495)
|
||||
* update: improve tree conflict reason and action descriptions (r1619777)
|
||||
* ra_serf: fix stalls during checkout/update over http/https (r1621596)
|
||||
* svnmucc: don't crash when '--version' is used with other arguments
|
||||
(r1625496)
|
||||
* checkout: report svn:externals failures via the exit code as other
|
||||
commands already do (r1628398)
|
||||
* svn & svnlook: use the right error code when fputs() fails (r1630369)
|
||||
* export: reject peg specifiers on local destination path (r1635085)
|
||||
* don't reject command-line arguments in the form of ".@abc", where
|
||||
"abc" is a peg specifier that may be empty (r1635118)
|
||||
* fix directory externals not following history (issue #4529)
|
||||
* remove 'df' and 'm' options from the interactive conflict resolver for
|
||||
binary files (r1645578)
|
||||
* mergeinfo parsing: allow source path to be empty (issue #4537)
|
||||
* mkdir: when using '--parents' don't add entire contents recursively if
|
||||
target already exists (r1649951)
|
||||
* resolve errors with move of a nested delete (r1651980, r1651997)
|
||||
* update: prevent breaking a working copy when a directory is replaced
|
||||
with an external to a foreign repository (issue #4550)
|
||||
* update: prevent an invalid wc state when applying a move (r1652184 et al)
|
||||
* resolve: fix a segfault when breaking a move inside a delete (issue #4491)
|
||||
* ra_serf: don't handle a commit that didn't produce a new revision as
|
||||
a successful commit (r1653532)
|
||||
* export: fix the lack of notifications when starting to handle externals
|
||||
(issue #4527)
|
||||
* update: fix a case where we reported an error rather than a tree conflict
|
||||
(r1655017)
|
||||
* info: Use local platform style paths in all cases (r1659283)
|
||||
* handle lack of a configuration file properly (r1660369)
|
||||
* update: resolve issues with tree conflicts caused by an incoming
|
||||
delete removing a mixed revision tree (r1660742)
|
||||
* don't hold onto locks of deleted paths in the client on commit (r1661363)
|
||||
* info: fix url calculation for a few statuses (r1661476)
|
||||
* update: when using '--set-depth' avoid removing local changes (r1661585)
|
||||
* update: fix tree conflict detection on unversioned nodes that exist where
|
||||
there used to be a deleted node (r1661664)
|
||||
* status: display tree conflicts even if the node with the tree conflict is
|
||||
shadowed by a file (r1662331)
|
||||
* pre-1.6 wc compatibility: fix with obstructed working copies (r1662412)
|
||||
* resolve: allow directly resolving tree conflicts (r1658435)
|
||||
* copy: when copying from a wc to a url show all the changes (r1655729)
|
||||
* info: provide results in a stable order (r1662030)
|
||||
* revert: allow depth limited reverts of nodes that only have not-present
|
||||
and/or excluded child nodes (r1662091)
|
||||
* wc: fix calculating repo path after commits of nodes that shadow a
|
||||
switched (not-present) node (r1663991, r1666258, r1674032)
|
||||
* update: resolve assertion on bad update report involving incomplete
|
||||
status (r1663671, r1666832)
|
||||
* update: allow a real file to replace a file external (r1664035)
|
||||
* merge: raise a tree conflict on root of obstructing dir (r1666690)
|
||||
* cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456)
|
||||
* status: fix incorrect output with file externals (issue #4580)
|
||||
* merge: fix part of issue #4582 (r1686175, r1687029, r1688258)
|
||||
|
||||
- Server-side bugfixes:
|
||||
* svnserve: don't ignore socket initialization errors (r1544253)
|
||||
* svnserve: don't hide fatal errors in inetd and tunnel modes (r1544256)
|
||||
* fsfs: log repo path in local style for cache init failure (r1494314)
|
||||
* fsfs: fix potential transaction corruption (r1519624)
|
||||
* svnserve: fix logging in multi-threaded servers (r1523502)
|
||||
* fsfs: don't report out of date errors due to FS corruption (r1527084)
|
||||
* svnadmin verify: detect inconsistencies that prevent loading (r1536854)
|
||||
* mod_dav_svn: use 404 status for errors caused by invalid URIs (r1542063)
|
||||
* mod_dav_svn: use 404 when the repository doesn't exist (r1544259)
|
||||
* mod_dav_svn: use 'dav_svn:' prefix for filename instead of 'svn:'
|
||||
(r1544711)
|
||||
* mod_dav_svn: XML escape lock tokens (r1547427)
|
||||
* hotcopy: don't create config files when copying pre-1.5 repos (r1547454)
|
||||
* hotcopy: preserve the rep-cache.db permissions when hotcopying (r1547877)
|
||||
* mod_dav_svn: fix SVNCacheTextDeltas and SVNAdvertisV2Protocol directive
|
||||
merging (r1548124)
|
||||
* mod_dav_svn: always produce an error text even when text specifies
|
||||
the default message to make diagnosing issues easier (r1553441)
|
||||
* mod_dav_svn: fix some pool lifetime issues with error messages (r1553868)
|
||||
* mod_dav_svn: avoid setting option headers multiple times (r1557103)
|
||||
* fsfs: prevent some commits that could cause future corruption (r1560673)
|
||||
* cache: fix premature eviction due to 64-bit underflows (r1567996 et al)
|
||||
* svnserve: fix potential integer overflow in Cyrus SASL support (r1570434)
|
||||
* bdb: fix potential integer overflow and underflow (r1570701)
|
||||
* bdb: prevent silent propogation of some corruption (r1570778)
|
||||
* svnadmin hotcopy: do not corrupt db/current contents when copying old
|
||||
FSFS repos (r1603485)
|
||||
* svnadmin hotcopy: don't produce broken copies when a concurrent pack
|
||||
happens (r1605633)
|
||||
* log: reduce memory consumption of '-v' (r1605195)
|
||||
* mod_dav_svn: fix performance issue on Windows with named atomics
|
||||
(r1611379)
|
||||
* log: fix a segfault in handling changed paths (r1615364)
|
||||
* mod_dav_svn: properly forward post-lock/post-unlock failures (r1622235)
|
||||
* diff: fix handling of depth empty in added directories (r1622024)
|
||||
* fix a segfault with corrupted changed path lists that try to add root
|
||||
nodes (r1622944)
|
||||
* svnadmin verify: report errors nicely rather than possibly aborting
|
||||
(r1622955)
|
||||
* svnlook propget: report transaction name rather than revision number in
|
||||
errors if run with '-t' option (r1623317)
|
||||
* svnadmin verify: prevent stack overflow conditions in corrupted
|
||||
repositories (r1623398)
|
||||
* fsfs upgrade: fix an issue that could block an upgraded format 1 or 2
|
||||
repository from being committed to (r1624011)
|
||||
* fs backends: fix memory lifetime issue (r1632646)
|
||||
* bdb: output correct checksum in error message about corruption (r1640707)
|
||||
* fsfs: fix a pool lifetime error related to transaction local caches
|
||||
(r1643139, 1643233)
|
||||
* fsfs: avoid "random DAG walks" during checkout over ra_serf (r1645567)
|
||||
* fsfs/bdb: reduce memory use during tree deletions (r1647820, r1655022)
|
||||
* mod_authz_svn: fix unbounded memory use when SVNPathAuthz short_circuit
|
||||
is used (r1647887)
|
||||
* fsfs: reduce memory use when walking back in history (r1648230)
|
||||
* dump: remove incorrect kind header on replaced nodes (issue #4553)
|
||||
* dump: remove duplicate headers for replace-with-copy (issue #4552)
|
||||
* mod_dav_svn: don't send XML-unsafe characters in svn:author
|
||||
(issue #4415)
|
||||
* dump: don't write broken dump files in some ambiguously encoded fsfs
|
||||
repositories (issue #4554)
|
||||
* mod_dav_svn: provide a more intuitive error message to the client when
|
||||
trying to create a directory that already exists (issue #2295)
|
||||
* fsfs: fix uninitialized memory use in lock/unlock code (r1657525)
|
||||
* fix a segfault executing a pre-commit hook with legacy locks (r1657893)
|
||||
* mod_dav_svn: do not ignore skel parsing errors (r1658168)
|
||||
* fsfs: fix multiple reporting of the same lock (r1658482)
|
||||
* fsfs: fix pool lifetime issue in lock handling (r1659314)
|
||||
* mod_dav_svn: properly log assertions and malfuctions (r1660480)
|
||||
* svnadmin load/dump: preserve deletion of svn:date from r0 (issue #4563)
|
||||
* svnrdump: don't provide HEAD+1 as base revision when loading deletes
|
||||
(r1664684)
|
||||
* mod_dav_svn: improve error message sent with a 405 status code
|
||||
(r1665195, r1666096, r1666379)
|
||||
* make detection of invalid base revision on commit behave the same on
|
||||
all RA layers (r1664664, r1664672, r1664674)
|
||||
* mod_dav_svn: emit the first few log items as soon as they are available
|
||||
(r1666965, r1667120)
|
||||
* mod_dav_svn: prevent a tree walk on copy sources (issue #4351)
|
||||
* fsfs: fix 'EOF found' error when reading repo (issue #4577)
|
||||
* svnadmin freeze: unlock rep-cache.db as part of unfreezing
|
||||
(r1679169, r1679287)
|
||||
* fsfs: improve stability in the presence of power or network
|
||||
disk failures during 'svnadmin pack' (r1683378)
|
||||
* detect invalid svndiff data earlier (r1684077)
|
||||
|
||||
- Client-side and server-side bugfixes:
|
||||
* use less memory when retrieving extension from filename (r1548480)
|
||||
* use more optimal code path with old txdelta v1 data (r1485480)
|
||||
* windows: allow opening SQLite databases on long paths (r1564338)
|
||||
* fix an out-of-bounds read in the delta combiner (r1569415)
|
||||
* fix a number of cases of undefined behavior when passing invalid
|
||||
arguments to memcpy() (r1632530, et al)
|
||||
* windows: avoid a 12 second delay due to a retry loop in some error
|
||||
conditions when opening a file (r1657583)
|
||||
|
||||
- Other tool improvements and bugfixes:
|
||||
* windows: add build-svn-deps-win.pl tool to build dependencies (r1467715)
|
||||
* svnpubsub: add support for revprop changes (r1486463)
|
||||
* svnpubsub: do not pass svn commands through shell (r148466, r1486467)
|
||||
* svnpubsub: hooks exit with an error if they fail (r1486500, r1486597)
|
||||
* svnpubsub: hooks use "--" to signal end of arguments (r1486513)
|
||||
* mailer: properly encode mail headers per RFC2047 (r1487532)
|
||||
* svnwcsub: add a pre-update hook, which can deny update (r1494542 et al)
|
||||
* fsfs-stats: count file nodes that are added without history (r1519283)
|
||||
* fsfs-stats: replaced by 'svnfsfs stats' (r1594860)
|
||||
* fsfs-access-map: count empty reads and unnecessary seeks (r1523441)
|
||||
* fsfs-access-map: generate scaled/rectangular heatmaps (r1505065)
|
||||
* fsfs-access-map: deal with strace format issues (r1505065)
|
||||
* fsfs-access-map: update to know about index files (r1505065)
|
||||
* svnbench: renamed from svn-bench (r1659226)
|
||||
* svnbench: add null-info command (r1532196)
|
||||
* svnlook.py: made usable as a library by adding getter methods (r1541558)
|
||||
* svnbench, svnraisetreeconflict, svnauthz, svn-rep-sharing-stats: More
|
||||
consistent error reporting, following pattern of core command-line
|
||||
programs (r1544194)
|
||||
* which-error.py: allow which-error.py to be run from symlink (r1547977)
|
||||
* bash_completion: add svnlook filesize command and options to svn cat,
|
||||
info, and mergeinfo commands (r1569021)
|
||||
* new '--conflict-style' option to standalone diff3 tool (r1591750)
|
||||
* update standalone diff3 tool so it can be used with --diff-cmd
|
||||
directly (r1591871, r1591876)
|
||||
* bash_completion: support for auth command (r1596841)
|
||||
* diff: support '-U' option (r1618618)
|
||||
* svn-rep-sharing-stats: replaced by 'svnfsfs stats' (r1618861)
|
||||
* add svn-vendor.py as an alternative to svn_load_dirs.pl that can
|
||||
auto-detect renames and copies (r1623660)
|
||||
* svnpredumpfilter.py: fix a scalability problem that made run time
|
||||
increase greatly on large repositories (r1625674 et al)
|
||||
* svnpredumpfilter.py: detect copies of copies and handle properly
|
||||
(r1626182)
|
||||
* bash_completion: add svnadmin delrevprop (r1631473)
|
||||
* showchange.pl: removed, obsoleted by 'svn log --diff' (r1631686)
|
||||
* bash_completion: add new trust options (r1660373)
|
||||
* bash_completion: add '--pin-externals' (r1662250)
|
||||
* bash_completion: stop offering deprecated options (r1662291)
|
||||
* bash_completion: add '--show-item' and '--no-newline' (r1662622)
|
||||
* svnbench: add null-blame command (r1673785, r1673803, r1674015)
|
||||
* svnbench: install with default 'make install' (r1685085)
|
||||
|
||||
Developer-visible changes:
|
||||
- General:
|
||||
* require Python 2.7+ for development and testing (r1691712, r1691713, r1692448)
|
||||
* include symbolic names for error codes in maintainer mode (r1467643)
|
||||
* include symbolic names for warning codes in maintainer mode (r1469855)
|
||||
* support YouCompleteMe vim plugin (r1476374 et al)
|
||||
* cache: add pretend_empty mode for maintainers (r1461689, et al)
|
||||
* allow tests to be run with exclusive wc locks (r1496475)
|
||||
* fix check for Microsoft C/C++ compiler (r1503148)
|
||||
* improve windows build to use pre-built dependencies
|
||||
* optimize ramdrive usage in the windows test runner (r1504511)
|
||||
* SVN_CMDLINE_DISABLE_CRASH_HANDLER env var added for Windows (r1506507)
|
||||
* gen-make.py: support Visual Studio 2013 by --vsnet-version=2013 (r1533907)
|
||||
* windows: don't require APR source when building (r1534037, et al)
|
||||
* don't compile SQLite amalgamation twice (r1536364)
|
||||
* make C tests use same temp path as Python tests (r1536700)
|
||||
* davautocheck: access log logs the r->filename now (r1538048)
|
||||
* added test to detect duplicate SQL queries (r1538962)
|
||||
* windows test runner: copy additional apr dlls (r1539300)
|
||||
* support for debug logging that should be available in serf 1.4.0 (r1541561)
|
||||
* OS X: fix build when Gnome is installed (r1541698)
|
||||
* properly detect if expat is libexpat.lib or xml.lib on windows (r1541981)
|
||||
* doc-clean target works properly with separate build dir (r1542303)
|
||||
* don't break entire test run if cleaning temp directory failed but return
|
||||
an error anyway (r1542817)
|
||||
* windows tests: find java.exe via the sdk if not found via PATH (r1543876)
|
||||
* fix davautocheck with httpd 2.3.x+ and worker/prefork MPMs (r1544302-3)
|
||||
* add parallel mode for C tests (r1545334 et al)
|
||||
* use --bin path for svnrdump when running Python tests (r1548706)
|
||||
* remove unused --with-openssl option from configure (r1548714)
|
||||
* tests: stop rewriting shared authz file for every sandbox (r1552064 et al)
|
||||
* fix unnecessary aborts in maintainer mode on sqlite errors (r1536325)
|
||||
* new --sqlite-logging option for C tests (r1560409)
|
||||
* allow building with APR-2 (r1560586)
|
||||
* remove support for ASM Zlib from Windows build system (r1560864)
|
||||
* gen-make.py: new -D option (r1567046)
|
||||
* improve how we fetch the version of Windows (r1568798, 1568806)
|
||||
* move common code in python tests to library files to avoid side effects of
|
||||
having tests depending on each other (r1570654)
|
||||
* disable compiling on platforms where int is shorter than 32-bits and add
|
||||
the SVN_ALLOW_SHORT_INTS compile definition to override (r1570882)
|
||||
* disable building *.sbr files with Visual C++ 2010 or later (r1571020)
|
||||
* require serf 1.3.4 (r1572261)
|
||||
* require APR and APR-Util 1.3.x (r1572261)
|
||||
* add mod_dontdothat to davautocheck.sh (r1572312)
|
||||
* require Apache httpd 2.2.x (r1572339)
|
||||
* support pkg-config for serf when using a prefix (r1572762)
|
||||
* don't depend on stdbool.h and inttypes.h for utf8proc (r1573069 et al)
|
||||
* avoid non-portable find extensions so the build works on Solaris (r1573780)
|
||||
* Allow PARALLEL value to specify the number of threads to run tests with,
|
||||
PARALLEL=1 means to use the default (r1573320)
|
||||
* pkg-config support for libsvn_* libraries (issue #4435)
|
||||
* binaries built on Mac OS X 10.6+ will not run on older versions (r1651549)
|
||||
* fix random failure of Makefile-based parallel builds on Unix
|
||||
when the amalgamated SQLite is being used (r1658357)
|
||||
* C tests only run with ra_local to avoid duplicate testing (r1609477)
|
||||
* allow skipping the C tests for any RA method (r1609489)
|
||||
* new tools for benchmarking on Windows (r1610264)
|
||||
* svnbench: no longer part of tools but main subversion (r1618860)
|
||||
* improve detection for libtool (r1627276)
|
||||
* check the runtime version of the fs_util library in the fs backends
|
||||
(r1651567)
|
||||
* properly initialize the src_kind value to avoid problems for other API
|
||||
users during a copy (r1655723)
|
||||
* try to improve reliability of applications that do not call
|
||||
svn_dso_initialize2() right after apr_initialize() (r1659604)
|
||||
* add svn-wc-db-tester tool for testing working copies (r1660874)
|
||||
* fix bugs and performance issues using svn_wc_walk_entries3() (r1661110)
|
||||
* support using Python 3 for building (r1661247)
|
||||
* don't add -lstdc++ on FreeBSD 10 (r1662329)
|
||||
* add build support for Visual Studio 2015 (r1663183, r1663184, r1689721 et al.)
|
||||
* fix test failures when running from a directory whose name contains
|
||||
characters that must be escaped when used in a URL. (r1664997)
|
||||
* fix breakage of the serf ra session with svn_ra_get_dir2() and
|
||||
svn_ra_get_log2(). (r1665213, r1665259, r1665609)
|
||||
* resolve a race condition in some test suite cleanup code (r1683303)
|
||||
* fix some tests on non-US default locale on Windows (r1684034)
|
||||
* document the meaning of "XFAIL" for users building from source (r1683071)
|
||||
|
||||
- API changes:
|
||||
* new RA callbacks for managing ra_svn tunnels:
|
||||
svn_ra_callbacks2_t::check_tunnel_func,
|
||||
svn_ra_callbacks2_t::open_tunnel_func and
|
||||
svn_ra_callbacks2_t::close_tunnel_func
|
||||
* new API for retrieving info about a file system: svn_fs_info()
|
||||
* new API svn_io_file_flush() that wraps apr_file_flush()
|
||||
* new API svn_io_write_atomic(), that writes, sync and renames a file
|
||||
* new API svn_compat_log_revprops_out_string()
|
||||
* deprecate unused datatype svn_ra_get_latest_revnum_func_t
|
||||
* new API svn_client_cleanup2() (r1496954 et al)
|
||||
* new API svn_stringbuf_create_wrap() (r1502248)
|
||||
* new API svn_io_file_aligned_seek() (r1502539)
|
||||
* ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043)
|
||||
* svn_client_commit6: notify which path prevents a mv commit (r1503662)
|
||||
* new APIs svn_io_file_create_empty() and svn_io_file_create_bytes()
|
||||
(r1505006)
|
||||
* new API svn_ver_check_list2() (r1502267)
|
||||
* new API svn_stringbuf_from_stream() (r1532193)
|
||||
* svn_auth_get_platform_specific_client_providers() now includes ssl
|
||||
providers (r1534153)
|
||||
* change dav_svn_split_uri() repos_path argument (r1537812)
|
||||
* new API svn_repos_fs_type() returns filesystem type (r1538585)
|
||||
* svn_client__get_inheritable_props() clears wcroot_iprops when revision is
|
||||
not valid (r1538602)
|
||||
* SVN_VA_NULL: New macro which is null-pointer constant (r1536307)
|
||||
* SVN_NEEDS_SENTINEL_NULL: New macro to mark functions that require final
|
||||
NULL sentinel value, so compilers can warn when missing (r1543394)
|
||||
* platform specific svn_auth_get_* functions are deprecated, use the
|
||||
svn_auth_get_platform_specific_provider() function instead (r1543992)
|
||||
* SVN_INT_ERR macro is deprecated; use svn_handle_error2() or
|
||||
svn_cmdline_handle_exit_error() instead (r1544142)
|
||||
* new API svn_client_cat3() allow disabling keyword expansion and retrieving
|
||||
props (r1544182)
|
||||
* svn_auth_first_credentials(): provides an error rather than crashing if
|
||||
auth_baton is NULL (r1544320)
|
||||
* svn_auth_set_parameter(): Do nothing if auth_baton is NULL (r1544320)
|
||||
* new API svn_relpath_prefix which returns a relpath with a maximum number
|
||||
of path components (r1545123, r1673282)
|
||||
* svn_fs_initialize() is now threadsafe (r1546409)
|
||||
* svn_checksum_kind_t has two new FNV-1a checksums (r1546699)
|
||||
* svn_fs_lock: control characters are not allowed in lock tokens (r1547445)
|
||||
* new API svn_wc_cleanup4() makes some functionality optional and adds
|
||||
notifications (r1548075 et al)
|
||||
* new API svn_client_info4() supports walking externals (r1550206 et al)
|
||||
* new flag for svn_fs_begin_txn2() SVN_FS_TXN_CLIENT_DATE to allow client
|
||||
to set the final svn:date (r1550228)
|
||||
* new APIs for easier RA commits svn_client_mtcc_* (r1550758 et al)
|
||||
* new API svn_ra_session_dup() (r1552324 et al)
|
||||
* svn_ra_stat() now handles compatibility with 1.0-1.1 svnserve (r1552441)
|
||||
* new error code SVN_ERR_COMPOSED_ERROR added to allow detection of
|
||||
composed errors by API consumers (r1553266)
|
||||
* new error code SVN_ERR_RA_DAV_PRECONDITION_FAILED (r1553668)
|
||||
* new error code SVN_ERR_RA_CANNOT_CREATE_SESSION (r1554027)
|
||||
* new API svn_fs_node_relation() (r1554800)
|
||||
* SVN_EXPERIMENTAL to mark functions that might change in future (r1526012)
|
||||
* fix bug in svn_client_get_merging_summary() with some params (r1532396)
|
||||
* new error code SVN_ERR_XML_UNEXPECTED_ELEMENT (r1498938)
|
||||
* extend stream API to also support incomplete reads (r1561688 et al)
|
||||
* new API svn_wc_add_from_disk3() (r1563361)
|
||||
* new API svn_client_revert3() to allow clearing changelists and to have
|
||||
a metadata_only flag (r1568635, r1657026)
|
||||
* svn_rangelist_inheritable2(): don't change inheritabilty of remaining
|
||||
ranges (r1569731)
|
||||
* svn_rangelist_inheritable2() and svn_mergeinfo_inheritable2(): fix a
|
||||
pool lifetime issue (r1569764)
|
||||
* new APIs to support cancelation during unified diff output and
|
||||
allow the context size to be specified (r1570149 et al)
|
||||
* APIs related to retrieving logs are now documented to be unlimited when
|
||||
a negative value is passed for the limit (r1570330, 1570335)
|
||||
* new APIs: svn_fs_props_different() and svn_fs_contents_different()
|
||||
(r1572363, r1573111)
|
||||
* expose SVN_CONFIG_AUTHN_* macros in public API (r1572640)
|
||||
* add SVN_CONFIG_OPTION_SQLITE_TIMEOUT to allow SQLite busy timeout
|
||||
to be configured by clients (r1592093)
|
||||
* add new notification between transmitting deltas and finalizing
|
||||
commit as svn_wc_notify_commit_finalizing (r1603388)
|
||||
* svn_client_cat3() API no longer returns entry or WC props (r1603501)
|
||||
* properly handle canonical paths in svn_io_start_cmd3() (r1604761)
|
||||
* add SVN_FS_CONFIG_FSFS_BLOCK_READ to control FSFS format 7 block
|
||||
read feature (r1604933)
|
||||
* new API svn_cstring_skip_prefix() (r1612823)
|
||||
* new API svn_diff_mem_string_output_merge3() (r1618599)
|
||||
* extend svn_wc_info_t with conflicts2 (r1618643)
|
||||
* new API svn_diff_mem_string_output_unified3() (r1618839)
|
||||
* new API svn_diff_file_output_merge3() (r1618857)
|
||||
* svn_fs_props_changed() and svn_fs_contents_changed() no longer return
|
||||
false positives (r1618880)
|
||||
* new API svn_wc_conflict_description2_dup() (r1618883)
|
||||
* extend svn_wc_conflict_description2_t with prop_reject_abspath field
|
||||
(r1619096)
|
||||
* extend svn_wc_conflict_description2_t with property values as
|
||||
svn_string_t's (r1619122)
|
||||
* fix svn_client_import5() to use absolute paths (r1623974)
|
||||
* fix a few cases of invalid filling of svn_client_commit_item3_t (r1623981)
|
||||
* add SVN_FS_CONFIG_FSFS_SHARD_SIZE to allow creation of repositories with
|
||||
a custom shard size (r1624512)
|
||||
* new API svn_cmdline_create_auth_baton2 (r1630117)
|
||||
* make svn_string_*() and svn_stringbuf_*() functions handle C strings
|
||||
of NULL with 0 length (r1632530, et al)
|
||||
* fix svn_stream_compressed() for streams without partial read support
|
||||
(r1639626)
|
||||
* do not segfault on svn_stream_read_full() or svn_stream_skip() are called
|
||||
for a no-op stream created via svn_stream_create() (r1639637)
|
||||
* add SVN_FS_CONFIG_FSFS_LOG_ADDRESSING to control logical addressing
|
||||
feature of fsfs format 7 (r1640915)
|
||||
* rename the 'parent_directory' parameter of
|
||||
svn_wc_parse_externals_description3() to 'defining_directory' and improve
|
||||
the documentation (r1642690)
|
||||
* new API svn_repos_get_fs_build_parser5() (r1647563)
|
||||
* SVN_VERSION_BODY changed so that it is embedded into libraries, ultimately
|
||||
allowing SVN_VER_TAG constant to be modified by patches (r1651565)
|
||||
* rename repos_url to repos_url_deocded argument to
|
||||
svn_repos_get_commit_editor5() to clairfy usage (r1653609)
|
||||
* make svn_io_set_file_read_only() and svn_io_remove_dir2() ignore
|
||||
ENOTDIR when ignore_enoent argument is set so the behavior is consistent
|
||||
across platforms (r1653680)
|
||||
* make svn_ra_open4() return the documented error when a repository
|
||||
should be opened in a different location (r1655648)
|
||||
* no longer return an error when using svn_ra_get_lock() and the path does
|
||||
not exist (r1656875)
|
||||
* svn_string_dup() will accept a NULL pointer and return a NULL (r1657254)
|
||||
* svn_ra_get_file_revs2() now handles SVN_INVALID_REVNUM as HEAD (r1660463)
|
||||
* new API svn_error_quick_wrapf() (r1662668)
|
||||
* new API svn_fs_node_has_props() (r1673170, r1673172, r1673692, r1673746)
|
||||
* new API svn_repos_verify_fs3() (r1492651 ... r1687769)
|
||||
|
||||
- Bindings:
|
||||
* javahl: add support for the RA layer (r1494650 et al)
|
||||
* javahl: add ignore-keywords knob to ISVNCLient.doExport (r1494936)
|
||||
* javahl: improve performance of rev_range_vector_to_apr_array (r1496243)
|
||||
* javahl: provide whole stack of errors from native exceptions (r1496353)
|
||||
* javahl: new framework for manipulating in-memory config data (r1497746)
|
||||
* javahl: add methods to set config change handler callback (r1497753)
|
||||
* javahl: add inheritance info to JavaHL's RevisionRange type (r1499308)
|
||||
* swig-rb: fixes to building on Windows (1505406 et al)
|
||||
* libsvn_swig_*libraries now work as proper shared librares (r1506520 et al)
|
||||
* swig-py: 'import svn.core.*' imports libsvn_subr public symbols (r1507860)
|
||||
* javahl: expose the svn_rangelist operations (r1509025)
|
||||
* javahl: new utility class SVNUtil (r1512354)
|
||||
* javahl: serialize init of native library (r1519803)
|
||||
* javahl: fix value truncation checks (r1519913)
|
||||
* javahl: add ISVNClient.info which exposes svn_client_info4 (r1603481)
|
||||
* javahl: include name of exception class in error messages (r1532117)
|
||||
* javahl: simplify JNI environment handling (r1533804)
|
||||
* javahl: Revsion.UNSPECIFIED added as alias to Revision.START (r1533928)
|
||||
* javahl: do not require JUnit to build javahl; only to test (r1535603)
|
||||
* javahl: update Action enum with new entries added in 1.9 (r1536319)
|
||||
* javahl: expose node property validation utility (r1538133)
|
||||
* javahl: new style JNI wrapper (r1539114 et al)
|
||||
* javahl: new utility API to parse/unparse svn:externals (r1539130 et al)
|
||||
* javahl: allow tests to be run from a RAM disk (r1539215 et al)
|
||||
* javahl: expose and use the url member of svn_wc_notify_t (r1539601)
|
||||
* javahl: expose a utility API to resolve relative externals (r1540921)
|
||||
* javahl: new utility API for file content translation (r1542401)
|
||||
* javahl: throw NullPointerException when sources is empty (r1543328)
|
||||
* swig-pl: fix compilation against perl 5.18 on Windows (r1543980)
|
||||
* javahl: implement streamed file contents translation (r1543985)
|
||||
* javahl: enable warnings with javac (r1544163, r1544169)
|
||||
* javahl: cleanup warnings (r1544578 et al)
|
||||
* javahl: add common utilities for new-style map iterations (r1545925)
|
||||
* javahl: add an API to get runtime version of native libs (r1545945)
|
||||
* javahl: use default cache size instead of no cache (r1547248)
|
||||
* swig-py: add typemap for hunks field of svn_patch_t (r1548379)
|
||||
* javahl: don't ignore difference between NULL and empty changelist in
|
||||
ISVNClient.getChangelists (r1553254)
|
||||
* swig-pl: fix pool issues with setting dates as revisions (r1553822)
|
||||
* swig-pl: make svn_auth_set_parameter() usable (r1553823)
|
||||
* javahl: expose inheritiable property names (r1560338)
|
||||
* javahl: fix bug in parsing single revision merginfo data (r1563140)
|
||||
* javahl: create JVM crashlogs from svn malfunctions (r1563927, r1564252)
|
||||
* javahl: avoid problems when building without NLS support (r1566578 et al)
|
||||
* javahl: expose --alow-mixed-revisions merge option (r1567602)
|
||||
* javahl: support incomplete reads from streams (r1569631)
|
||||
* javahl: allow revert API to take a set of paths (r1571461)
|
||||
* javahl: improve authentication callback (r1597758 et al)
|
||||
* javahl: load (most) classes on demand (r1602822)
|
||||
* javahl: expose confg file keys in JavaHL (r1604448)
|
||||
* javahl: update ISVNClient.info, ISVnClient.cleanup and add
|
||||
ISvnClient.vacuum (r1604449)
|
||||
* javahl: update ISVNRepos.hotcopy (r1618894)
|
||||
* swig-py: Add close to the core.Stream class (r1619077)
|
||||
* javahl: add example clients that use the authn API (r1640533)
|
||||
* swig-py: implement dump stream parser (r1642813)
|
||||
* swig-pl: remove some unneded cleanup code that triggered a cleanup
|
||||
failure on windows (r1643072)
|
||||
* swig-pl: make cancel_func, cancel_baton parameter pairs work (r1648852)
|
||||
* javahl: expose whitespace diff parameters to blame method (issue #4475)
|
||||
* javahl: update ConflictDescriptor (r1655842)
|
||||
* javahl: update FileRevision to provide textDelta (r1656911)
|
||||
* swig-pl: install into prefix (r1658459)
|
||||
* javahl: expose the metadataOnly option to copy support (r1661451)
|
||||
* swig-py: add support for svn_fs_lock_many(), svn_fs_unlock_many(),
|
||||
svn_repos_fs_lock_many() and svn_repos_fs_unlock_many() (r1662867)
|
||||
* swig-py: fix support for svn_ra_lock() and svn_ra_unlock() (r1662891)
|
||||
* javahl: allow java callbacks to throw errors back to the svn code
|
||||
(r1664938, r1664939, r1664940, r1664978, r1664984)
|
||||
* swig-pl: fix some stack memory problems (r1668618, 1671388)
|
||||
* swig: warn on using SWIG 3.x as we have compatibility problems
|
||||
with newer versions of SWIG (1675149)
|
||||
* javahl: requires Java 1.6 (r1677003)
|
||||
* javahl: on OS X use /usr/libexec/java_home to find the JDK (r1675774)
|
||||
* javahl: allow compiling with a C++11 compiler (r1684412)
|
||||
|
||||
|
||||
Version 1.8.14
|
||||
(5 Aug 2015, from /branches/1.8.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.8.14
|
||||
@ -13,6 +809,9 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.14
|
||||
of user and revision after 'svn up' (r1680242)
|
||||
|
||||
- Server-side bugfixes:
|
||||
* mod_authz_svn: do not leak information in mixed anonymous/authenticated
|
||||
httpd (dav) configurations (CVE-2015-3184)
|
||||
* do not leak paths that were hidden by path-based authz (CVE-2015-3187)
|
||||
* mod_dav_svn: do not ignore skel parsing errors (r1658168)
|
||||
* detect invalid svndiff data earlier (r1684077)
|
||||
* prevent possible repository corruption on power/disk failures (r1680819)
|
||||
@ -863,10 +1662,17 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.0
|
||||
* add missing API functions to JavaHL bindings (issue #4326)
|
||||
* fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
|
||||
|
||||
Version 1.7.22
|
||||
(12 Aug 2015, from /branches/1.7.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.7.22
|
||||
|
||||
Developer-visible changes:
|
||||
- General:
|
||||
* fix the regression test suite which was broken in 1.7.21 (r1694012)
|
||||
|
||||
Version 1.7.21
|
||||
(5 Aug 2015, from /branches/1.7.x)
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.8.21
|
||||
http://svn.apache.org/repos/asf/subversion/tags/1.7.21
|
||||
|
||||
User-visible changes:
|
||||
- Client-side bugfixes:
|
||||
@ -875,6 +1681,9 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.21
|
||||
non-deltas dumpfile (r1652182 et al.)
|
||||
|
||||
- Server-side bugfixes:
|
||||
* mod_authz_svn: do not leak information in mixed anonymous/authenticated
|
||||
httpd (dav) configurations (CVE-2015-3184)
|
||||
* do not leak paths that were hidden by path-based authz (CVE-2015-3187)
|
||||
* fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419)
|
||||
|
||||
Developer-visible changes:
|
||||
|
@ -1,4 +1,4 @@
|
||||
The following people have commit access to the Subversion sources.
|
||||
The following people have commit access to the Subversion sources.
|
||||
Note that this is not a full list of Subversion's authors, however --
|
||||
for that, you'd need to look over the log messages to see all the
|
||||
patch contributors.
|
||||
@ -58,6 +58,7 @@ Blanket commit access:
|
||||
stefan2 Stefan Fuhrmann <stefan.fuhrmann@wandisco.com>
|
||||
jcorvel Johan Corveleyn <jcorvel@gmail.com>
|
||||
trent Trent Nelson <trent@snakebite.org>
|
||||
kotkov Evgeny Kotkov <evgeny.kotkov@visualsvn.com>
|
||||
|
||||
[[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]]
|
||||
|
||||
@ -96,6 +97,9 @@ Commit access for specific areas:
|
||||
jrvernooij Jelmer Vernooij <jelmer@samba.org> (Python bindings)
|
||||
sage Sage LaTorra <sagelt@gmail.com> (Ctypes-Python b.)
|
||||
vmpn Vladimir Berezniker <vmpn@hitechman.com> (JavaHL bindings)
|
||||
rschupp Roderich Schupp <roderich.schupp@gmail.com> (Swig bindings)
|
||||
stilor Alexey Neyman <stilor@att.net> (Python bindings,
|
||||
svn-vendor.py)
|
||||
|
||||
Packages:
|
||||
|
||||
@ -157,8 +161,10 @@ Commit access for specific areas:
|
||||
artagnon Ramkumar Ramachandra <artagnon@gmail.com> (svnrdump, svntest)
|
||||
arwin Arwin Arni <arwin@collab.net> (svn-bisect)
|
||||
joes Joe Schaefer <joe_schaefer@yahoo.com> (svnpubsub)
|
||||
prabhugs Prabhu Gnana Sundar <prabhugs@collab.net> (verify-keep-going)
|
||||
|
||||
humbedooh Daniel Gruno <humbedooh@apache.org> (svnpubsub)
|
||||
prabhugs Prabhu Gnana Sundar <pprabhugs@gmail.com> (verify-keep-going)
|
||||
schabi Markus Schaber <schabi@apache.org> (testsuite)
|
||||
gbg Gabriela Gibson <gabriela.gibson@gmail.com> (gtest)
|
||||
|
||||
Translation of message files:
|
||||
|
||||
@ -186,6 +192,7 @@ giorgio_valoti Giorgio Valoti <giorgio_v@mac.com> (po: it)
|
||||
IS BOUNCING]
|
||||
fabien Fabien Coelho <fabien@coelho.net> (po: fr)
|
||||
marcelg Marcel Gosselin <marcel.gosselin@polymtl.ca> (po: fr)
|
||||
mattiase Mattias Engdegård <mattiase@acm.org> (po: sv)
|
||||
|
||||
Experimental branches:
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
A Quick Guide
|
||||
======================================
|
||||
|
||||
$LastChangedDate: 2013-09-27 06:57:44 +0000 (Fri, 27 Sep 2013) $
|
||||
$LastChangedDate: 2015-07-26 23:03:10 +0000 (Sun, 26 Jul 2015) $
|
||||
|
||||
|
||||
Contents:
|
||||
@ -15,7 +15,7 @@ Contents:
|
||||
D. Documentation
|
||||
|
||||
II. INSTALLATION
|
||||
A. Building from a Tarball or RPM
|
||||
A. Building from a Tarball
|
||||
B. Building the Latest Source under Unix
|
||||
C. Building under Unix in Different Directories
|
||||
D. Installing from a Zip or Installer File under Windows
|
||||
@ -123,7 +123,8 @@ I. INTRODUCTION
|
||||
create a repository, you have the option of specifying a
|
||||
storage back-end. The Berkeley DB back-end will only be
|
||||
available if the BDB libraries are discovered at compile
|
||||
time.
|
||||
time. The Berkeley DB back-end has been deprecated and
|
||||
is not recommend.
|
||||
|
||||
* libsasl (OPTIONAL for client and server)
|
||||
|
||||
@ -145,7 +146,7 @@ I. INTRODUCTION
|
||||
Subversion contains optional support for storing passwords in
|
||||
KWallet (KDE 4) or GNOME Keyring.
|
||||
|
||||
* libmagic
|
||||
* libmagic (OPTIONAL)
|
||||
|
||||
If the libmagic library is detected at compile time,
|
||||
it will be used to determine mime-types of binary files
|
||||
@ -153,6 +154,12 @@ I. INTRODUCTION
|
||||
configured via auto-props or the mime-types-file option
|
||||
take precedence.
|
||||
|
||||
* Googlemock aka Gmock (OPTIONAL)
|
||||
|
||||
This optional package is used by the tests for Subversions'
|
||||
C++ bindings.
|
||||
|
||||
|
||||
C. Dependencies in Detail
|
||||
|
||||
Subversion depends on a number of third party tools and libraries.
|
||||
@ -186,7 +193,7 @@ I. INTRODUCTION
|
||||
commands described in section II.B before installing the following.
|
||||
|
||||
|
||||
1. Apache Portable Runtime 0.9.7 or 1.X.X (REQUIRED)
|
||||
1. Apache Portable Runtime 1.3 or newer (REQUIRED)
|
||||
|
||||
Whenever you want to build any part of Subversion, you need the
|
||||
Apache Portable Runtime (APR) and the APR Utility (APR-util)
|
||||
@ -194,8 +201,8 @@ I. INTRODUCTION
|
||||
|
||||
|
||||
****************************************************************
|
||||
** IMPORTANT ISSUE ABOUT APR VERSIONS: READ THIS. **
|
||||
** **
|
||||
** IMPORTANT ISSUE ABOUT APR VERSIONS: READ THIS **
|
||||
** IF UPGRADING FROM MUCH OLDER SUBVERSION **
|
||||
****************************************************************
|
||||
| |
|
||||
| APR 0.9.X and 1.X are binary-incompatible. |
|
||||
@ -288,7 +295,7 @@ I. INTRODUCTION
|
||||
compression. Most Unix systems have libz pre-installed, but
|
||||
if you need it, you can get it from
|
||||
|
||||
http://www.zlib.net
|
||||
http://www.zlib.net/
|
||||
|
||||
|
||||
3. autoconf 2.59 or newer (Unix only)
|
||||
@ -306,7 +313,7 @@ I. INTRODUCTION
|
||||
newer. The autogen.sh script knows about that.
|
||||
|
||||
|
||||
5. Serf library 1.2.1 or newer (OPTIONAL)
|
||||
5. Serf library 1.3.4 or newer (OPTIONAL)
|
||||
|
||||
If you want your client to be able to speak to an Apache
|
||||
server (via a http:// or https:// URL), you must link against
|
||||
@ -349,11 +356,7 @@ I. INTRODUCTION
|
||||
Under Windows, you can specify the paths to these libraries by
|
||||
passing the options --with-zlib and --with-openssl to gen-make.py.
|
||||
|
||||
### Is that right? In-tree build of Neon was disabled in r875974.
|
||||
This may now apply to Serf, or else gen-make.py should be
|
||||
updated to remove such options.
|
||||
|
||||
c. Using OpenSSL on the Apache server
|
||||
b. Using OpenSSL on the Apache server
|
||||
|
||||
You can also add support for these features to an Apache httpd
|
||||
server to be used for Subversion using the same support libraries.
|
||||
@ -430,7 +433,7 @@ I. INTRODUCTION
|
||||
http://freshmeat.net/projects/cyrussasl/
|
||||
|
||||
|
||||
9. Apache Web Server 2.X (OPTIONAL)
|
||||
9. Apache Web Server 2.2.X or newer (OPTIONAL)
|
||||
|
||||
(http://httpd.apache.org/download.cgi)
|
||||
|
||||
@ -443,14 +446,16 @@ I. INTRODUCTION
|
||||
is done: See section III for details.
|
||||
|
||||
|
||||
10. Python 2.5 or newer (http://www.python.org/) (OPTIONAL)
|
||||
10. Python 2.7 or newer (http://www.python.org/) (OPTIONAL)
|
||||
|
||||
If you want to run "make check" or build from the latest source
|
||||
under Unix as described in section II.B and III.D, install
|
||||
Python 2.5 or higher on your system. The majority of the test
|
||||
suite is written in Python, as is part of Subversion's build
|
||||
under Unix/Windows as described in section II.B, II.E and III.D,
|
||||
install Python 2.7 or higher on your system. The majority of the
|
||||
test suite is written in Python, as is part of Subversion's build
|
||||
system.
|
||||
|
||||
Note that Python 3.x is not supported and most likely won't work.
|
||||
|
||||
|
||||
11. Perl 5.8 or newer (Windows only) (OPTIONAL)
|
||||
|
||||
@ -459,26 +464,10 @@ I. INTRODUCTION
|
||||
script.
|
||||
|
||||
|
||||
12. MASM 6 or newer (Windows only, OPTIONAL)
|
||||
12. SQLite (REQUIRED)
|
||||
|
||||
The Windows build scripts for Subversion can use the Microsoft
|
||||
Macro Assembler (MASM) to build an optimized version of the ZLib
|
||||
library. Make sure that the version of MASM you use is compatible
|
||||
with the C compiler. If you're using MSVC 6, and don't have MASM 6,
|
||||
a free MASM-compatible assembler is available here:
|
||||
|
||||
http://www.masm32.com/
|
||||
|
||||
You only need ML.EXE and ML.ERR from this distribution.
|
||||
|
||||
The VS.NET installation already contains MASM (but note, that
|
||||
version if MASM is not compatible with MSVC 6).
|
||||
|
||||
|
||||
13. SQLite (REQUIRED)
|
||||
|
||||
Subversion 1.8 requires SQLite version 3.7.12 or above. You can meet
|
||||
this dependency several ways:
|
||||
Subversion requires SQLite version 3.7.12 or above. You can meet this
|
||||
dependency several ways:
|
||||
* Use an SQLite amalgamation file.
|
||||
* Specify an SQLite installation to use.
|
||||
* Let Subversion find an installed SQLite.
|
||||
@ -491,26 +480,26 @@ I. INTRODUCTION
|
||||
http://www.sqlite.org/download.html
|
||||
|
||||
|
||||
14. pkg-config (Unix only, OPTIONAL)
|
||||
13. pkg-config (Unix only, OPTIONAL)
|
||||
|
||||
Subversion uses pkg-config to find appropriate options used
|
||||
at build time.
|
||||
|
||||
|
||||
15. D-Bus (Unix only, OPTIONAL)
|
||||
14. D-Bus (Unix only, OPTIONAL)
|
||||
|
||||
D-Bus is a message bus system. D-Bus is required for support for KWallet
|
||||
and GNOME Keyring. pkg-config is needed to find D-Bus headers and library.
|
||||
|
||||
|
||||
16. Qt 4 (Unix only, OPTIONAL)
|
||||
15. Qt 4 (Unix only, OPTIONAL)
|
||||
|
||||
Qt is a cross-platform application framework. QtCore, QtDBus and QtGui
|
||||
modules are required for support for KWallet. pkg-config is needed
|
||||
to find Qt headers and libraries.
|
||||
|
||||
|
||||
17. KDELibs 4 (Unix only, OPTIONAL)
|
||||
16. KDELibs 4 (Unix only, OPTIONAL)
|
||||
|
||||
Subversion contains optional support for storing passwords in KWallet.
|
||||
KDELibs contains core KDE libraries. Subversion uses libkdecore and libkdeui
|
||||
@ -522,13 +511,13 @@ I. INTRODUCTION
|
||||
|
||||
--with-kwallet=/path/to/KDE/prefix
|
||||
|
||||
18. GLib 2 (Unix only, OPTIONAL)
|
||||
17. GLib 2 (Unix only, OPTIONAL)
|
||||
|
||||
GLib is a general-purpose utility library. GLib is required for support
|
||||
for GNOME Keyring. pkg-config is needed to find GLib headers and library.
|
||||
|
||||
|
||||
19. GNOME Keyring (Unix only, OPTIONAL)
|
||||
18. GNOME Keyring (Unix only, OPTIONAL)
|
||||
|
||||
Subversion contains optional support for storing passwords in GNOME Keyring.
|
||||
pkg-config is needed to find GNOME Keyring headers and library. D-Bus and
|
||||
@ -536,7 +525,7 @@ I. INTRODUCTION
|
||||
then pass the '--with-gnome-keyring' option to `configure`.
|
||||
|
||||
|
||||
20. Ctypesgen (OPTIONAL)
|
||||
19. Ctypesgen (OPTIONAL)
|
||||
|
||||
Ctypesgen is Python wrapper generator for ctypes. It is used to generate
|
||||
a part of Subversion Ctypes Python bindings (CSVN). If you want to build
|
||||
@ -547,7 +536,7 @@ I. INTRODUCTION
|
||||
|
||||
For more information on CSVN, see subversion/bindings/ctypes-python/README.
|
||||
|
||||
21. libmagic (OPTIONAL)
|
||||
20. libmagic (OPTIONAL)
|
||||
|
||||
Subversion's configure script attempts to find libmagic automatically.
|
||||
If it is installed in a non-standard location, then use:
|
||||
@ -568,6 +557,12 @@ I. INTRODUCTION
|
||||
|
||||
--with-libmagic
|
||||
|
||||
21. Googlemock (OPTIONAL)
|
||||
|
||||
Googlemock can be installed and built in-tree by invoking
|
||||
|
||||
$ ./get-dep.sh gmock
|
||||
|
||||
D. Documentation
|
||||
|
||||
The primary documentation for Subversion is the free book
|
||||
@ -582,7 +577,7 @@ I. INTRODUCTION
|
||||
II. INSTALLATION
|
||||
============
|
||||
|
||||
A. Building from a Tarball or RPM
|
||||
A. Building from a Tarball
|
||||
------------------------------
|
||||
|
||||
1. Building from a Tarball
|
||||
@ -597,34 +592,10 @@ II. INSTALLATION
|
||||
$ make
|
||||
# make install
|
||||
|
||||
You can also run the full test suite by running 'make check'.
|
||||
|
||||
|
||||
2. Building from an RPM
|
||||
|
||||
If you are using Linux (or any OS that can use RPM) then another
|
||||
possibility is to download the binary RPM from the
|
||||
http://summersoft.fay.ar.us/pub/subversion directory.
|
||||
|
||||
Currently only Linux on the i386 platform is supported
|
||||
using this method. You might also require additional RPMS
|
||||
(which can be found in the above mentioned directory) to use the
|
||||
subversion RPM depending on what packages you already have installed:
|
||||
|
||||
subversion*.i386.rpm
|
||||
apache*.i386.rpm (Version 2.0.49 or greater)
|
||||
db*.i386.rpm (Version 4.0.14 or greater; version 4.3.27 or
|
||||
4.2.52 is preferred however)
|
||||
expat (Comes with RedHat)
|
||||
|
||||
After downloading, install it (as root user):
|
||||
|
||||
# rpm -ivh subversion*.386.rpm (add other packages as necessary)
|
||||
|
||||
Note: For an easy way to generate a new version of the RPM
|
||||
source and binary package from the latest source code you
|
||||
just checked out, see the packages/rpm/README file for a
|
||||
one-line build procedure.
|
||||
You can also run the full test suite by running 'make check'. Even
|
||||
in successful runs, some tests will report XFAIL; that is normal.
|
||||
Failed runs are indicated by FAIL or XPASS results, or a non-zero exit
|
||||
code from "make check".
|
||||
|
||||
|
||||
B. Building the Latest Source under Unix
|
||||
@ -646,7 +617,6 @@ II. INSTALLATION
|
||||
|
||||
# rm -f /usr/local/lib/libsvn*
|
||||
# rm -f /usr/local/lib/libapr*
|
||||
# rm -f /usr/local/lib/libexpat*
|
||||
# rm -f /usr/local/lib/libserf*
|
||||
|
||||
Start the process by running "autogen.sh":
|
||||
@ -655,7 +625,7 @@ II. INSTALLATION
|
||||
|
||||
This script will make sure you have all the necessary components
|
||||
available to build Subversion. If any are missing, you will be
|
||||
told where to get them from. (See the 'Build Requirements' in
|
||||
told where to get them from. (See the 'Dependency Overview' in
|
||||
section I.)
|
||||
|
||||
Note: if the command "autoconf" on your machine does not run
|
||||
@ -786,27 +756,30 @@ II. INSTALLATION
|
||||
E.1 Prerequisites
|
||||
|
||||
* Visual Studio 6 and service pack. It can be built with later versions
|
||||
of Visual Studio (Visual Studio.NET 2002, 2003, 2005, 2008 and Visual
|
||||
C++ Express 2005, 2008) but these instructions assume VS6.
|
||||
of Visual Studio (Visual Studio.NET 2005-2015, Visual C++ Express
|
||||
2005-2010, Visual Studio Express 2012-2013 and Visual Studio Community
|
||||
2013-2015) but these instructions assume VS6.
|
||||
* A recent Windows SDK. (Not needed with Visual Studio 2005 and later)
|
||||
If you are using Visual Studio 6, you need the latest SDK which
|
||||
is compatible with VC6, which is the one from february 2003.
|
||||
is compatible with VC6, which is the one from February 2003.
|
||||
You can get it from MSDN:
|
||||
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
|
||||
* Python 2.5 or higher, downloaded from http://www.python.org/ which is
|
||||
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/e1147034-9b0b-4494-a5bc-6dfebb6b7eb1/download-and-install-microsoft-platform-sdk-febuary-2003-last-version-with-vc6-support?forum=windowssdk
|
||||
* Python 2.7 or higher, downloaded from http://www.python.org/ which is
|
||||
used to generate the project files.
|
||||
Note that Python 3.x is not supported (yet).
|
||||
* Perl 5.8 or higher from http://www.activestate.com/
|
||||
* Awk (from http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe) is
|
||||
needed to compile Apache or APR. Note that this is the actual awk
|
||||
program, not an installer - just rename it to awk.exe and it is
|
||||
ready to use.
|
||||
* Apache apr, apr-util, and optionally apr-iconv libraries, version
|
||||
0.9.12 or later. Included in both the Subversion dependencies ZIP file
|
||||
1.3 or later. Included in both the Subversion dependencies ZIP file
|
||||
and the Apache 2 source zip. If you are building from a Subversion
|
||||
checkout and have not downloaded Apache 2, then get these 3 libraries
|
||||
from http://www.apache.org/dist/apr/.
|
||||
* SQLite 3.7.12 or higher from http://www.sqlite.org/download.html
|
||||
* ZLib 1.2 or higher is required and is included in the Subversion
|
||||
dependencies zip file or can be obtained from http://www.zlib.org
|
||||
dependencies zip file or can be obtained from http://www.zlib.net/
|
||||
* Either a Subversion client binary from http://subversion.apache.org/ to
|
||||
do the initial checkout of the Subversion source or the zip file
|
||||
source distribution. See the section "Bootstrapping from a Zip or
|
||||
@ -818,11 +791,7 @@ II. INSTALLATION
|
||||
* [Optional] Apache 2 source, downloaded from
|
||||
http://httpd.apache.org/download.cgi, these instructions assume
|
||||
version 2.0.58. This is only needed for building the Subversion
|
||||
server Apache modules. Note that although Subversion will compile
|
||||
against Apache 2.2.3 and APR 1.2.7, there is a bug that causes
|
||||
runtime failures with Subversion on Windows. The fix is included in
|
||||
APR 1.2.8 and will be bundled in the next HTTP Server release
|
||||
(likely to be 2.2.4).
|
||||
server Apache modules. ### FIXME Apache 2.2 or greater required.
|
||||
* [Optional] Apache 2 msi install file, also from
|
||||
http://httpd.apache.org/download.cgi (required for running the
|
||||
tests). Only needed for testing the server dso modules and if
|
||||
@ -835,7 +804,7 @@ II. INSTALLATION
|
||||
components -- versions 4.3.27 and 4.4.20 are available from
|
||||
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
|
||||
as db-4.3.27-win32.zip and db-4.4.20-win32.zip.
|
||||
For more information see Section I.5.
|
||||
For more information see Section I.C.7.
|
||||
* [Optional] Openssl 0.9.7f or higher can be obtained from
|
||||
http://www.openssl.org/source/openssl-0.9.7f.tar.gz
|
||||
* [Optional] A modified version of GNU libintl, called
|
||||
@ -856,7 +825,7 @@ II. INSTALLATION
|
||||
The Serf library supports secure connections with OpenSSL and
|
||||
on-the-wire compression with zlib. If you want to use the
|
||||
secure connections feature, you should pass the option
|
||||
"--with-openssl" to the gen-make.py script. See Section I.11 for
|
||||
"--with-openssl" to the gen-make.py script. See Section I.C.6 for
|
||||
more details.
|
||||
|
||||
E.3 Preparation
|
||||
@ -874,7 +843,7 @@ II. INSTALLATION
|
||||
* Install Visual Studio Environment. You either have to tell the
|
||||
installer to register environment variables or run VCVARS32.BAT
|
||||
before building anything. If you are using a newer Visual Studio,
|
||||
use the 'Visual Studio 200x Command Prompt' on the Start menu.
|
||||
use the 'Visual Studio 20xx Command Prompt' on the Start menu.
|
||||
* Install and register a recent Windows Core SDK if you are using
|
||||
Visual Studio 6. This is a quote from the Microsoft February 2003
|
||||
SDK documentation:
|
||||
@ -897,14 +866,15 @@ II. INSTALLATION
|
||||
* Install Perl (it should add itself to the path)
|
||||
* Copy AWK (awk95.exe) to awk.exe (e.g. SVN\awk\awk.exe) and add
|
||||
the directory containing it (e.g. SVN\awk) to the path.
|
||||
* Install Apache 2 using the msi file if you are going to test the
|
||||
server dso modules and are using Visual Studio 6. You must build
|
||||
* [Optional] Install Apache 2 using the msi file if you are going to test
|
||||
the server dso modules and are using Visual Studio 6. You must build
|
||||
and install it from source if you are not using Visual Studio 6 and
|
||||
want to build and/or test the server modules.
|
||||
* If you checked out Subversion from the repository then install the serf
|
||||
sources into SVN\src-trunk\serf.
|
||||
* If you want BDB backend support, extract the Berkeley DB files
|
||||
into SVN\src-trunk\db4-win32. It's a good idea to add
|
||||
* [Optional] If you checked out Subversion from the repository and want
|
||||
to build Subversion with http/https access support then install the
|
||||
serf sources into SVN\src-trunk\serf.
|
||||
* [Optional] If you want BDB backend support, extract the Berkeley DB
|
||||
files into SVN\src-trunk\db4-win32. It's a good idea to add
|
||||
SVN\src-trunk\db4-win32\bin to your PATH, so that Subversion can find
|
||||
the Berkeley DB DLLs.
|
||||
|
||||
@ -919,8 +889,8 @@ II. INSTALLATION
|
||||
SVN\src-trunk\db4-win32\lib. Again, the DLLs should be somewhere in
|
||||
your path.
|
||||
|
||||
* If you want to build the server modules, extract Apache source into
|
||||
SVN\httpd-2.x.x.
|
||||
* [Optional] If you want to build the server modules, extract Apache
|
||||
source into SVN\httpd-2.x.x.
|
||||
* If you are building from a checkout of Subversion, and you are NOT
|
||||
building Apache, then you will need the APR libraries. Depending
|
||||
on how you got your version of APR, either:
|
||||
@ -932,14 +902,20 @@ II. INSTALLATION
|
||||
SVN\apr-util, and SVN\apr-iconv respectively.
|
||||
* Extract the ZLib sources into SVN\zlib if you are not using the zlib
|
||||
included in the dependencies zip file.
|
||||
* If you want secure connection (https) client support, extract openssl
|
||||
into SVN\openssl-x.x.x
|
||||
* If you want localized message support, extract svn-win32-libintl.zip
|
||||
into SVN\svn-win32-libintl and extract gettext-x.x.x-bin.zip and
|
||||
gettext-x.x.x-dep.zip into SVN\gettext-x.x.x-bin.
|
||||
* [Optional] If you want secure connection (https) client support, or if
|
||||
you are building with enabled support for serf extract openssl into
|
||||
SVN\openssl-x.x.x
|
||||
* [Optional] If you want localized message support, extract
|
||||
svn-win32-libintl.zip into SVN\svn-win32-libintl and extract
|
||||
gettext-x.x.x-bin.zip and gettext-x.x.x-dep.zip into
|
||||
SVN\gettext-x.x.x-bin.
|
||||
Add SVN\gettext-x.x.x-bin\bin to your path.
|
||||
* [Optional] Extract MASM32 (only the ML.EXE and ML.ERR files) into
|
||||
SVN\asm (or extract nasm into SVN\asm) and put it in your path.
|
||||
* Download the SQLite amalgemation from
|
||||
http://www.sqlite.org/download.html
|
||||
and extract it into SVN\sqlite-amalgemation.
|
||||
See I.C.12 for alternatives to using the amalgemation package.
|
||||
|
||||
E.4 Building the Binaries
|
||||
|
||||
@ -955,14 +931,14 @@ II. INSTALLATION
|
||||
|
||||
C:>set VER=trunk
|
||||
C:>set DIR=trunk
|
||||
C:>set DRIVE=C
|
||||
C:>set BUILD_ROOT=C:\SVN
|
||||
C:>set PYTHONDIR=C:\Python22
|
||||
C:>set AWKDIR=C:\SVN\Awk
|
||||
C:>set ASMDIR=C:\SVN\asm
|
||||
C:>set SDKINC=C:\Program Files\Microsoft SDK\include
|
||||
C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
|
||||
C:>set SDKINC="C:\Program Files\Microsoft SDK\include"
|
||||
C:>set SDKLIB="C:\Program Files\Microsoft SDK\lib"
|
||||
C:>set GETTEXTBIN=C:\SVN\gettext-0.14.1-bin\bin
|
||||
C:>PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%ASMDIR%;
|
||||
C:>PATH=%PATH%;%BUILD_ROOT%\src-%DIR%\db4-win32;%ASMDIR%;
|
||||
%PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
|
||||
C:>set INCLUDE=%SDKINC%;%INCLUDE%
|
||||
C:>set LIB=%SDKLIB%;%LIB%
|
||||
@ -995,6 +971,41 @@ II. INSTALLATION
|
||||
C:>set APACHEDIR=C:\Program Files\Apache Group\Apache2
|
||||
C:>msdev httpd-2.0.58\apache.dsw /MAKE "BuildBin - Win32 Release"
|
||||
|
||||
APR
|
||||
|
||||
If you downloaded APR / APR-UTIL / APR_ICONV by source, you will have to
|
||||
build these libraries first.
|
||||
Building these libraries on Windows is straight forward and in most cases
|
||||
as simple as issuing these two commands:
|
||||
|
||||
C:>nmake -f Makefile.win
|
||||
C:>nmake -f Makefile.win install
|
||||
|
||||
Please refere to the build instructions provided by the library source
|
||||
for actual build instructions.
|
||||
|
||||
ZLib
|
||||
|
||||
If you downloaded the zlib source, you will have to build ZLib first.
|
||||
Building ZLib using Visual Studio should be quite simple. Just open the
|
||||
appropriate solution and build the project zlibstat using the IDE.
|
||||
|
||||
Please refere to the build instructions provided by the library source
|
||||
for actual build instructions.
|
||||
|
||||
Note that you'd make sure to define ZLIB_WINAPI in the ZLib config
|
||||
header and move the lib-file into the zlib root-directory.
|
||||
|
||||
Serf
|
||||
|
||||
### Section about serf might be required/useful to add.
|
||||
### scons is required too and serf needs to be configured prior to be
|
||||
### able to build Subversion using:
|
||||
### scons APR=[PATH_TO_APR] APU=[PATH_TO_APU] OPENSSL=[PATH_TO_OPENSSL]
|
||||
### ZLIB=[PATH_TO_ZLIB] PREFIX=[PATH_TO_SERF_DEST]
|
||||
### scons check
|
||||
### scons install
|
||||
|
||||
Subversion
|
||||
|
||||
Things to note:
|
||||
@ -1006,7 +1017,7 @@ II. INSTALLATION
|
||||
the APR libraries; the options are --with-apr, --with-apr-util and
|
||||
--with-apr-iconv.
|
||||
* If you would like a debug build substitute Debug for Release in
|
||||
the msdev commands.
|
||||
the msdev/msbuild commands.
|
||||
* There have been rumors that Subversion on Win32 can be built
|
||||
using the latest cygwin, you probably don't want the zip file source
|
||||
distribution though. ymmv.
|
||||
@ -1019,8 +1030,9 @@ II. INSTALLATION
|
||||
directories must be in the Tools/Options/Directories settings (if you
|
||||
followed the 'Register the SDK with Visual Studio 6' instructions
|
||||
above this has been done for you).
|
||||
* If you are using Visual Studio .NET change -t dsw into -t vcproj and
|
||||
add the --vsnet-version=200x option on the gen-make.py command.
|
||||
* If you are using Visual Studio later than VC6 change -t dsw into
|
||||
-t vcproj and add the --vsnet-version=20xx option on the gen-make.py
|
||||
command.
|
||||
In this case you will also have to distribute the C runtime dll with
|
||||
the binaries. Also, since Apache/APR do not provide .vcproj files,
|
||||
you will need to convert the Apache/APR .dsp files to .vcproj files
|
||||
@ -1051,12 +1063,13 @@ II. INSTALLATION
|
||||
C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
|
||||
C:>cd ..
|
||||
|
||||
Or, with Visual C++.NET 2002, 2003, 2005:
|
||||
Or, with Visual C++.NET 2005 or C++ Express 2005:
|
||||
|
||||
C:>devenv subversion_vcnet.sln /build "Release" /project "__ALL_TESTS__"
|
||||
C:>cd ..
|
||||
|
||||
Or, with Visual C++ Express 2005:
|
||||
Or, with Visual C++.NET 2008+, C++ Express 2008+, Studio Express 2012+ or
|
||||
Studio Community 2013+:
|
||||
|
||||
C:>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release
|
||||
C:>cd ..
|
||||
@ -1102,7 +1115,7 @@ II. INSTALLATION
|
||||
|
||||
Then run the client tests:
|
||||
|
||||
C:>PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
|
||||
C:>PATH=%BUILD_ROOT%\svn-win32-%VER%\bin;%PATH%
|
||||
C:>cd src-%DIR%
|
||||
C:>python win-tests.py -c -r -v
|
||||
|
||||
@ -1152,12 +1165,6 @@ III. BUILDING A SUBVERSION SERVER
|
||||
A. Setting Up Apache
|
||||
-----------------
|
||||
|
||||
(Following the BOOTSTRAPPING FROM RPM procedures above will install and
|
||||
build the latest Subversion server for Linux RedHat 7.1, 7.2, and PPC
|
||||
Linux systems *IF* the apache-devel-2.0.41 or greater package is already
|
||||
installed when the SUBVERSION RPM is built.)
|
||||
|
||||
|
||||
1. Obtaining and Installing Apache 2
|
||||
|
||||
Subversion tries to compile against the latest released version
|
||||
@ -1213,7 +1220,7 @@ III. BUILDING A SUBVERSION SERVER
|
||||
line. Make sure this is the same db as the one Subversion uses.
|
||||
This note assumes you have installed Berkeley DB 4.2.52
|
||||
at its default locations. For more info about the db requirement,
|
||||
see section I.5.
|
||||
see section I.C.7.
|
||||
|
||||
You may also want to include other modules in your build. Add
|
||||
--enable-ssl to turn on SSL support, and --enable-deflate to turn on
|
||||
|
@ -268,3 +268,101 @@ For the file subversion/libsvn_subr/utf_width.c
|
||||
* Permission to use, copy, modify, and distribute this software
|
||||
* for any purpose and without fee is hereby granted. The author
|
||||
* disclaims all warranties with regard to this software.
|
||||
|
||||
For the (modified) utf8proc library in subversion/libsvn_subr/utf8proc
|
||||
|
||||
Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
This software distribution contains derived data from a modified version of
|
||||
the Unicode data files. The following license applies to that data:
|
||||
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed
|
||||
under the Terms of Use in http://www.unicode.org/copyright.html.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of the Unicode data files and any associated documentation (the "Data
|
||||
Files") or Unicode software and any associated documentation (the
|
||||
"Software") to deal in the Data Files or Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, and/or sell copies of the Data Files or Software, and
|
||||
to permit persons to whom the Data Files or Software are furnished to do
|
||||
so, provided that (a) the above copyright notice(s) and this permission
|
||||
notice appear with all copies of the Data Files or Software, (b) both the
|
||||
above copyright notice(s) and this permission notice appear in associated
|
||||
documentation, and (c) there is clear notice in each modified Data File or
|
||||
in the Software as well as in the documentation associated with the Data
|
||||
File(s) or Software that the data or software has been modified.
|
||||
|
||||
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
|
||||
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall
|
||||
not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in these Data Files or Software without prior written
|
||||
authorization of the copyright holder.
|
||||
|
||||
Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
|
||||
registered in some jurisdictions. All other trademarks and registered
|
||||
trademarks mentioned herein are the property of their respective owners.
|
||||
|
||||
For the files subversion/libsvn_subr/x509parse.c and
|
||||
subversion/libsvn_subr/x509.h
|
||||
|
||||
* Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
|
||||
*
|
||||
* Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the names of PolarSSL or XySSL nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
@ -48,6 +48,7 @@ SVN_GPG_AGENT_LIBS = @SVN_GPG_AGENT_LIBS@
|
||||
SVN_GNOME_KEYRING_LIBS = @SVN_GNOME_KEYRING_LIBS@
|
||||
SVN_KWALLET_LIBS = @SVN_KWALLET_LIBS@
|
||||
SVN_MAGIC_LIBS = @SVN_MAGIC_LIBS@
|
||||
SVN_INTL_LIBS = @SVN_INTL_LIBS@
|
||||
SVN_SASL_LIBS = @SVN_SASL_LIBS@
|
||||
SVN_SERF_LIBS = @SVN_SERF_LIBS@
|
||||
SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@
|
||||
@ -87,6 +88,9 @@ swig_pldir = @libdir@/svn-perl
|
||||
swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext
|
||||
toolsdir = @bindir@/svn-tools
|
||||
|
||||
# where to install pkg-config files
|
||||
pkgconfig_dir = $(datadir)/pkgconfig
|
||||
|
||||
javahl_javadir = @libdir@/svn-javahl
|
||||
javahl_javahdir = @libdir@/svn-javahl/include
|
||||
javahl_libdir = @libdir@
|
||||
@ -132,6 +136,9 @@ APACHE_INCLUDES = @APACHE_INCLUDES@
|
||||
APACHE_LIBEXECDIR = $(DESTDIR)@APACHE_LIBEXECDIR@
|
||||
APACHE_LDFLAGS = @APACHE_LDFLAGS@
|
||||
|
||||
SVN_USE_GMOCK = @SVN_USE_GMOCK@
|
||||
GMOCK_INCLUDES = -I@GMOCK_SRCDIR@
|
||||
|
||||
SWIG = @SWIG@
|
||||
SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py
|
||||
SWIG_PY_COMPILE = @SWIG_PY_COMPILE@
|
||||
@ -165,11 +172,13 @@ MKDIR = @MKDIR@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
|
||||
# The EXTRA_ parameters can be used to pass extra flags at 'make' time.
|
||||
CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS)
|
||||
CFLAGS = @CFLAGS@ @CUSERFLAGS@ $(EXTRA_CFLAGS)
|
||||
CMODEFLAGS = @CMODEFLAGS@
|
||||
CNOWARNFLAGS = @CNOWARNFLAGS@
|
||||
CMAINTAINERFLAGS = @CMAINTAINERFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@ $(EXTRA_CXXFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@ @CXXUSERFLAGS@ $(EXTRA_CXXFLAGS)
|
||||
CXXMODEFLAGS = @CXXMODEFLAGS@
|
||||
CXXNOWARNFLAGS = @CXXNOWARNFLAGS@
|
||||
CXXMAINTAINERFLAGS = @CXXMAINTAINERFLAGS@
|
||||
### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes,
|
||||
### -Wmissing-declarations) are not valid for C++, and should be somehow
|
||||
@ -180,10 +189,12 @@ SWIG_LDFLAGS = @SWIG_LDFLAGS@ $(EXTRA_SWIG_LDFLAGS)
|
||||
SWIG_CPPFLAGS = @SWIG_CPPFLAGS@ $(EXTRA_CPPFLAGS)
|
||||
|
||||
COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS) $(INCLUDES)
|
||||
COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS) $(INCLUDES)
|
||||
COMPILE_CXX = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXMAINTAINERFLAGS) $(CXXFLAGS) $(INCLUDES)
|
||||
COMPILE_CXX_NOWARN = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXNOWARNFLAGS) $(CXXFLAGS) $(INCLUDES)
|
||||
LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) $(LT_CFLAGS)
|
||||
LT_COMPILE_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS)
|
||||
|
||||
LT_COMPILE_CXX_NOWARN = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX_NOWARN) $(LT_CFLAGS)
|
||||
# Execute a command that loads libraries from the build dir
|
||||
LT_EXECUTE = $(LIBTOOL) $(LTFLAGS) --mode=execute `for f in $(abs_builddir)/subversion/*/*.la; do echo -dlopen $$f; done`
|
||||
|
||||
@ -199,8 +210,12 @@ COMPILE_SWIG_RB = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_RB_COMPILE) $(CPPF
|
||||
COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(JAVAHL_INCLUDES) -o $@ -c
|
||||
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
|
||||
COMPILE_JAVAHL_JAVAH = $(JAVAH)
|
||||
COMPILE_JAVAHL_COMPAT_JAVAC = $(JAVAC) $(JAVAC_COMPAT_FLAGS)
|
||||
|
||||
# export an env variable so that the tests can run without being installed
|
||||
# On Mac OS X, export an env variable so that the tests can run without
|
||||
# being installed. OS X needs the DYLD_LIBRARY_PATH env variable set in
|
||||
# order to find the libraries to link against, because we can't effectively
|
||||
# use rpath due to way rpath is implemented in the Mach executable format.
|
||||
TEST_SHLIB_VAR_JAVAHL=\
|
||||
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
|
||||
for d in $(abs_builddir)/subversion/libsvn_*; do \
|
||||
@ -212,9 +227,33 @@ TEST_SHLIB_VAR_JAVAHL=\
|
||||
done; \
|
||||
export @SVN_APR_SHLIB_PATH_VAR@; \
|
||||
fi;
|
||||
TEST_SHLIB_VAR_SWIG_PY=\
|
||||
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
|
||||
for d in $(SWIG_PY_DIR)/libsvn_swig_py $(SWIG_PY_DIR)/../../../libsvn_*; do \
|
||||
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
|
||||
else \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
|
||||
fi; \
|
||||
done; \
|
||||
export @SVN_APR_SHLIB_PATH_VAR@; \
|
||||
fi;
|
||||
TEST_SHLIB_VAR_SWIG_RB=\
|
||||
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
|
||||
for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \
|
||||
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
|
||||
else \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
|
||||
fi; \
|
||||
done; \
|
||||
export @SVN_APR_SHLIB_PATH_VAR@; \
|
||||
fi;
|
||||
|
||||
# special compilation for files destined for cxxhl
|
||||
COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(CXXHL_INCLUDES) -o $@ -c
|
||||
COMPILE_CXXHL_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) -o $@ -c
|
||||
COMPILE_GMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GMOCK_INCLUDES) -o $@ -c
|
||||
COMPILE_CXXHL_GMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GMOCK_INCLUDES) -o $@ -c
|
||||
|
||||
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
|
||||
LINK_LIB = $(LINK) $(LT_SO_VERSION)
|
||||
@ -300,19 +339,6 @@ INSTALL_EXTRA_SWIG_PY=\
|
||||
compileall.compile_dir("$(DESTDIR)$(swig_pydir_extra)", 1, \
|
||||
"$(swig_pydir_extra)");'
|
||||
|
||||
# export an env variable so that the tests can run without being installed
|
||||
TEST_SHLIB_VAR_SWIG_PY=\
|
||||
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
|
||||
for d in $(SWIG_PY_DIR)/libsvn_swig_py $(SWIG_PY_DIR)/../../../libsvn_*; do \
|
||||
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
|
||||
else \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
|
||||
fi; \
|
||||
done; \
|
||||
export @SVN_APR_SHLIB_PATH_VAR@; \
|
||||
fi;
|
||||
|
||||
# The path to generated and complementary source files for the SWIG
|
||||
# bindings.
|
||||
SWIG_PL_DIR = $(abs_builddir)/subversion/bindings/swig/perl
|
||||
@ -343,19 +369,6 @@ INSTALL_EXTRA_SWIG_RB=\
|
||||
$(INSTALL_DATA) "$$i" $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn; \
|
||||
done
|
||||
|
||||
# export an env variable so that the tests can run without being installed
|
||||
TEST_SHLIB_VAR_SWIG_RB=\
|
||||
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
|
||||
for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \
|
||||
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
|
||||
else \
|
||||
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
|
||||
fi; \
|
||||
done; \
|
||||
export @SVN_APR_SHLIB_PATH_VAR@; \
|
||||
fi;
|
||||
|
||||
APXS = @APXS@
|
||||
HTTPD_VERSION = @HTTPD_VERSION@
|
||||
|
||||
@ -367,6 +380,7 @@ JAVA = @JAVA@
|
||||
JAVAC = @JAVAC@
|
||||
JAVADOC = @JAVADOC@
|
||||
JAVAC_FLAGS = @JAVAC_FLAGS@
|
||||
JAVAC_COMPAT_FLAGS = @JAVAC_COMPAT_FLAGS@
|
||||
JAVAH = @JAVAH@
|
||||
JAR = @JAR@
|
||||
|
||||
@ -430,6 +444,7 @@ local-distclean: local-clean
|
||||
libtool mkmf.log subversion/svn_private_config.h \
|
||||
subversion/bindings/javahl/classes \
|
||||
subversion/bindings/javahl/include \
|
||||
subversion/libsvn_*/*.pc \
|
||||
$(SVN_CONFIG_SCRIPT_FILES)
|
||||
rm -f Makefile
|
||||
|
||||
@ -467,13 +482,15 @@ revision-install:
|
||||
install-static: @INSTALL_STATIC_RULES@
|
||||
|
||||
# JavaHL target aliases
|
||||
javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-types-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
|
||||
javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-remote-javah javahl-types-javah javahl-util-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
|
||||
install-javahl: javahl install-javahl-java install-javahl-javah install-javahl-lib
|
||||
javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
|
||||
|
||||
clean-javahl:
|
||||
if [ -d $(javahl_test_rootdir) ]; then \
|
||||
rm -rf $(javahl_test_rootdir)/*; \
|
||||
fi
|
||||
rm -rf $(javahl_java_PATH) $(javahl_javah_PATH) @JAVAHL_OBJDIR@
|
||||
rm -fr $(javahl_test_rootdir)
|
||||
rm -f $(libsvnjavahl_PATH)/*.la $(JAVAHL_JAR)
|
||||
rm -f $(libsvnjavahl_PATH)/*.lo
|
||||
rm -f $(libsvnjavahl_PATH)/*.o
|
||||
@ -481,37 +498,47 @@ clean-javahl:
|
||||
check-tigris-javahl: javahl-compat
|
||||
@FIX_JAVAHL_LIB@
|
||||
$(TEST_SHLIB_VAR_JAVAHL) \
|
||||
$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
|
||||
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
|
||||
|
||||
check-apache-javahl: javahl
|
||||
@FIX_JAVAHL_LIB@
|
||||
$(TEST_SHLIB_VAR_JAVAHL) \
|
||||
$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
|
||||
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
|
||||
|
||||
check-deprecated-authn-javahl: javahl
|
||||
@FIX_JAVAHL_LIB@
|
||||
$(TEST_SHLIB_VAR_JAVAHL) \
|
||||
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" "-Dtest.authn.deprecated=true" org.apache.subversion.javahl.RunTests
|
||||
|
||||
check-javahl: check-apache-javahl
|
||||
|
||||
check-all-javahl: check-apache-javahl check-tigris-javahl
|
||||
check-all-javahl: check-apache-javahl check-tigris-javahl check-deprecated-authn-javahl
|
||||
|
||||
# "make check CLEANUP=true" will clean up directories for successful tests.
|
||||
# "make check TESTS=subversion/tests/cmdline/basic_tests.py"
|
||||
# will perform only basic tests (likewise for other tests).
|
||||
check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
@if test "$(PYTHON)" != "none"; then \
|
||||
flags="--verbose"; \
|
||||
if test "$(CLEANUP)" != ""; then \
|
||||
flags="--cleanup $$flags"; \
|
||||
fi; \
|
||||
if test "$(BASE_URL)" != ""; then \
|
||||
flags="--url $(BASE_URL) $$flags"; \
|
||||
fi; \
|
||||
if test "$(SKIP_C_TESTS)" != ""; then \
|
||||
flags="--skip-c-tests $$flags"; \
|
||||
fi; \
|
||||
if test "$(DUMP_LOAD_CROSS_CHECK)" != ""; then \
|
||||
flags="--dump-load-cross-check $$flags"; \
|
||||
fi; \
|
||||
if test "$(FS_TYPE)" != ""; then \
|
||||
flags="--fs-type $(FS_TYPE) $$flags"; \
|
||||
fi; \
|
||||
if test "$(HTTP_LIBRARY)" != ""; then \
|
||||
flags="--http-library $(HTTP_LIBRARY) $$flags"; \
|
||||
fi; \
|
||||
if test "$(HTTPD_VERSION)" != ""; then \
|
||||
flags="--httpd-version $(HTTPD_VERSION) $$flags"; \
|
||||
if test "$(HTTPD_VERSION)" != ""; then \
|
||||
flags="--httpd-version $(HTTPD_VERSION) $$flags"; \
|
||||
fi; \
|
||||
if test "$(SERVER_MINOR_VERSION)" != ""; then \
|
||||
flags="--server-minor-version $(SERVER_MINOR_VERSION) $$flags"; \
|
||||
@ -526,7 +553,7 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
flags="--fsfs-packing $$flags"; \
|
||||
fi; \
|
||||
if test "$(PARALLEL)" != ""; then \
|
||||
flags="--parallel $$flags"; \
|
||||
flags="--parallel $(PARALLEL) $$flags"; \
|
||||
fi; \
|
||||
if test "$(LOG_TO_STDOUT)" != ""; then \
|
||||
flags="--log-to-stdout $$flags"; \
|
||||
@ -544,13 +571,19 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
if test "$(HTTP_PROXY)" != ""; then \
|
||||
flags="--http-proxy $(HTTP_PROXY) $$flags"; \
|
||||
fi; \
|
||||
if test "$(EXCLUSIVE_WC_LOCKS)" != ""; then \
|
||||
flags="--exclusive-wc-locks $$flags"; \
|
||||
fi; \
|
||||
if test "$(MEMCACHED_SERVER)" != ""; then \
|
||||
flags="--memcached-server $(MEMCACHED_SERVER) $$flags"; \
|
||||
fi; \
|
||||
LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)' \
|
||||
$(PYTHON) $(top_srcdir)/build/run_tests.py \
|
||||
--config-file $(top_srcdir)/subversion/tests/tests.conf \
|
||||
$$flags \
|
||||
'$(abs_srcdir)' '$(abs_builddir)' $(TESTS); \
|
||||
else \
|
||||
echo "make check: Python 2.5 or greater is required,"; \
|
||||
echo "make check: Python 2.7 or greater is required,"; \
|
||||
echo " but was not detected during configure"; \
|
||||
exit 1; \
|
||||
fi;
|
||||
@ -564,7 +597,7 @@ davcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod
|
||||
# run make check.
|
||||
davautocheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod
|
||||
@# Takes MODULE_PATH, USE_HTTPV1 and SVN_PATH_AUTHZ in the environment.
|
||||
@APXS=$(APXS) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
|
||||
@APXS=$(APXS) MAKE=$(MAKE) $(SHELL) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
|
||||
|
||||
# First, run:
|
||||
# subversion/svnserve/svnserve -d -r `pwd`/subversion/tests/cmdline
|
||||
@ -573,8 +606,8 @@ svncheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
|
||||
# 'make svnserveautocheck' runs svnserve for you and kills it.
|
||||
svnserveautocheck: svnserve bin $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
@env PYTHON=$(PYTHON) THREADED=$(THREADED) \
|
||||
$(top_srcdir)/subversion/tests/cmdline/svnserveautocheck.sh
|
||||
@env PYTHON=$(PYTHON) THREADED=$(THREADED) MAKE=$(MAKE) \
|
||||
$(SHELL) $(top_srcdir)/subversion/tests/cmdline/svnserveautocheck.sh
|
||||
|
||||
# First, run:
|
||||
# subversion/svnserve/svnserve --listen-host "::1" -d -r `pwd`/subversion/tests/cmdline
|
||||
@ -591,6 +624,15 @@ svnsshcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
bdbcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
|
||||
@$(MAKE) check FS_TYPE=bdb
|
||||
|
||||
# Produce the clang compilation database as the compile_commands.json file
|
||||
# in the srcdir. This is used by tools such as the YouCompleteMe vim plugin
|
||||
# to know the compile flags for various source files so that analysis such
|
||||
# as syntax checking, static analysis or symbol completion can be done
|
||||
# outside the build system. To do this it uses the tool called bear:
|
||||
# https://github.com/rizsotto/Bear
|
||||
compile-commands:
|
||||
@bear -o $(abs_srcdir)/compile_commands.json -- $(MAKE) all
|
||||
|
||||
# Create an execution coverage report from the data collected during
|
||||
# all execution since the last reset.
|
||||
gcov:
|
||||
@ -605,12 +647,11 @@ gcov-reset:
|
||||
gcov-clean:
|
||||
rm -f gcov-lcov.dat gcov-lcov.log gcov-genhtml.log
|
||||
rm -rf gcov-report
|
||||
find . -name "*.gcda" -o -name "*.gcno" -print0 | xargs -0 rm -f --
|
||||
find . -name "*.gcda" -o -name "*.gcno" -exec rm -f -- {} \;
|
||||
|
||||
check-clean: gcov-clean
|
||||
if [ -d subversion/tests/cmdline/svn-test-work ]; then \
|
||||
find subversion/tests/cmdline/svn-test-work -mindepth 1 -maxdepth 1 \
|
||||
-print0 | xargs -0 rm -rf --; \
|
||||
rm -rf subversion/tests/cmdline/svn-test-work/*; \
|
||||
fi
|
||||
rm -rf subversion/tests/libsvn_fs/test-repo-* \
|
||||
subversion/tests/libsvn_fs_base/test-repo-* \
|
||||
@ -654,28 +695,42 @@ doc-javahl:
|
||||
-sourcepath $(top_srcdir)/subversion/bindings/javahl/src \
|
||||
-link http://java.sun.com/javase/6/docs/api/ \
|
||||
org.tigris.subversion.javahl \
|
||||
org.apache.subversion.javahl \
|
||||
org.apache.subversion.javahl.callback \
|
||||
org.apache.subversion.javahl.types
|
||||
org.apache.subversion.javahl \
|
||||
org.apache.subversion.javahl.callback \
|
||||
org.apache.subversion.javahl.remote \
|
||||
org.apache.subversion.javahl.types \
|
||||
org.apache.subversion.javahl.util
|
||||
|
||||
doc-clean:
|
||||
rm -rf $(top_srcdir)/doc/doxygen
|
||||
rm -rf $(top_srcdir)/doc/javadoc
|
||||
rm -rf $(abs_builddir)/doc/doxygen
|
||||
rm -rf $(abs_builddir)/doc/javadoc
|
||||
|
||||
# Converting from the .rnc XML shcemas to various other schema formats.
|
||||
SCHEMAS_DTD = $(SCHEMA_DIR)/blame.dtd $(SCHEMA_DIR)/info.dtd \
|
||||
$(SCHEMA_DIR)/list.dtd $(SCHEMA_DIR)/log.dtd \
|
||||
$(SCHEMA_DIR)/status.dtd $(SCHEMA_DIR)/props.dtd
|
||||
# Converting from the .rnc XML schemas to various other schema formats.
|
||||
SCHEMAS_DTD = $(SCHEMA_DIR)/blame.dtd \
|
||||
$(SCHEMA_DIR)/diff.dtd \
|
||||
$(SCHEMA_DIR)/info.dtd \
|
||||
$(SCHEMA_DIR)/list.dtd \
|
||||
$(SCHEMA_DIR)/log.dtd \
|
||||
$(SCHEMA_DIR)/props.dtd \
|
||||
$(SCHEMA_DIR)/status.dtd
|
||||
|
||||
SCHEMAS_RNG = $(SCHEMA_DIR)/blame.rng $(SCHEMA_DIR)/info.rng \
|
||||
$(SCHEMA_DIR)/list.rng $(SCHEMA_DIR)/log.rng \
|
||||
$(SCHEMA_DIR)/status.rng $(SCHEMA_DIR)/props.rng
|
||||
SCHEMAS_RNG = $(SCHEMA_DIR)/blame.rng \
|
||||
$(SCHEMA_DIR)/diff.rng \
|
||||
$(SCHEMA_DIR)/info.rng \
|
||||
$(SCHEMA_DIR)/list.rng \
|
||||
$(SCHEMA_DIR)/log.rng \
|
||||
$(SCHEMA_DIR)/props.rng \
|
||||
$(SCHEMA_DIR)/status.rng
|
||||
|
||||
SCHEMAS_XSD = $(SCHEMA_DIR)/blame.xsd $(SCHEMA_DIR)/info.xsd \
|
||||
$(SCHEMA_DIR)/list.xsd $(SCHEMA_DIR)/log.xsd \
|
||||
$(SCHEMA_DIR)/status.xsd $(SCHEMA_DIR)/props.xsd
|
||||
SCHEMAS_XSD = $(SCHEMA_DIR)/blame.xsd \
|
||||
$(SCHEMA_DIR)/diff.xsd \
|
||||
$(SCHEMA_DIR)/info.xsd \
|
||||
$(SCHEMA_DIR)/list.xsd \
|
||||
$(SCHEMA_DIR)/log.xsd \
|
||||
$(SCHEMA_DIR)/props.xsd \
|
||||
$(SCHEMA_DIR)/status.xsd
|
||||
|
||||
schema: schema-rng schema-dtd schema-xsd
|
||||
schema: mkdir-init schema-rng schema-dtd schema-xsd
|
||||
|
||||
schema-rng: $(SCHEMAS_RNG)
|
||||
schema-dtd: $(SCHEMAS_DTD)
|
||||
@ -781,7 +836,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in
|
||||
./config.status subversion/bindings/swig/perl/native/Makefile.PL
|
||||
|
||||
$(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
|
||||
cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
|
||||
cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
|
||||
|
||||
# There is a "readlink -f" command on some systems for the same purpose,
|
||||
# but it's not as portable (e.g. Mac OS X doesn't have it). These should
|
||||
@ -925,4 +980,5 @@ INSTALL_EXTRA_TOOLS=\
|
||||
ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \
|
||||
if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \
|
||||
ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \
|
||||
ln -sf $(bindir)/svnbench$(EXEEXT) $(DESTDIR)$(toolsdir)/svn-bench$(EXEEXT); \
|
||||
fi
|
||||
|
@ -21,3 +21,8 @@ Inc. MD5 Message-Digest Algorithm, including various
|
||||
modifications by Spyglass Inc., Carnegie Mellon University, and
|
||||
Bell Communications Research, Inc (Bellcore).
|
||||
|
||||
This product includes software developed by Public Software Group e. V.
|
||||
under a permissive license, see LICENSE.
|
||||
|
||||
This software contains code derived from TropicSSL under a BSD 3-Clause
|
||||
license, see LICENSE.
|
||||
|
@ -63,7 +63,8 @@ done
|
||||
# ### APR's libtool. deferring to a second round of change...
|
||||
#
|
||||
|
||||
libtoolize="`./build/PrintPath glibtoolize libtoolize libtoolize15`"
|
||||
# Much like APR except we do not prefer libtool 1 over libtool 2.
|
||||
libtoolize="`./build/PrintPath glibtoolize libtoolize glibtoolize1 libtoolize15 libtoolize14`"
|
||||
lt_major_version=`$libtoolize --version 2>/dev/null | sed -e 's/^[^0-9]*//' -e 's/\..*//' -e '/^$/d' -e 1q`
|
||||
|
||||
if [ "x$libtoolize" = "x" ]; then
|
||||
@ -156,11 +157,11 @@ fi
|
||||
#
|
||||
# Note: this dependency on Python is fine: only SVN developers use autogen.sh
|
||||
# and we can state that dev people need Python on their machine. Note
|
||||
# that running gen-make.py requires Python 2.5 or newer.
|
||||
# that running gen-make.py requires Python 2.7 or newer.
|
||||
|
||||
PYTHON="`./build/find_python.sh`"
|
||||
if test -z "$PYTHON"; then
|
||||
echo "Python 2.5 or later is required to run autogen.sh"
|
||||
echo "Python 2.7 or later is required to run autogen.sh"
|
||||
echo "If you have a suitable Python installed, but not on the"
|
||||
echo "PATH, set the environment variable PYTHON to the full path"
|
||||
echo "to the Python executable, and re-run autogen.sh"
|
||||
@ -204,7 +205,7 @@ fi
|
||||
echo "Creating svn_private_config.h.in..."
|
||||
${AUTOHEADER:-autoheader}
|
||||
|
||||
# If there's a config.cache file, we may need to delete it.
|
||||
# If there's a config.cache file, we may need to delete it.
|
||||
# If we have an existing configure script, save a copy for comparison.
|
||||
if [ -f config.cache ] && [ -f configure ]; then
|
||||
cp configure configure.$$.tmp
|
||||
@ -239,7 +240,7 @@ echo "./configure --enable-maintainer-mode"
|
||||
echo "./configure --disable-shared"
|
||||
echo "./configure --enable-maintainer-mode --disable-shared"
|
||||
echo "./configure --disable-optimize --enable-debug"
|
||||
echo "./configure CUSERFLAGS='--flags-for-C' CXXUSERFLAGS='--flags-for-C++'"
|
||||
echo "./configure CFLAGS='--flags-for-C' CXXFLAGS='--flags-for-C++'"
|
||||
echo ""
|
||||
echo "Note: If you wish to run a Subversion HTTP server, you will need"
|
||||
echo "Apache 2.x. See the INSTALL file for details."
|
||||
|
File diff suppressed because one or more lines are too long
@ -40,13 +40,23 @@ private-includes =
|
||||
subversion/libsvn_delta/compose_delta.c
|
||||
subversion/bindings/cxxhl/include/*.hpp
|
||||
subversion/bindings/cxxhl/include/svncxxhl/*.hpp
|
||||
subversion/bindings/cxxhl/src/*.hpp
|
||||
subversion/bindings/cxxhl/src/aprwrap/*.hpp
|
||||
subversion/bindings/cxxhl/src/private/*.hpp
|
||||
subversion/bindings/javahl/native/*.hpp
|
||||
subversion/bindings/javahl/native/jniwrapper/jni_*.hpp
|
||||
subversion/libsvn_subr/utf8proc/utf8proc.h
|
||||
subversion/libsvn_subr/utf8proc/utf8proc.c
|
||||
subversion/libsvn_subr/utf8proc/utf8proc_data.c
|
||||
private-built-includes =
|
||||
subversion/svn_private_config.h
|
||||
subversion/libsvn_fs_fs/rep-cache-db.h
|
||||
subversion/libsvn_fs_x/rep-cache-db.h
|
||||
subversion/libsvn_wc/wc-metadata.h
|
||||
subversion/libsvn_wc/wc-queries.h
|
||||
subversion/libsvn_wc/wc-checks.h
|
||||
subversion/libsvn_subr/internal_statements.h
|
||||
subversion/tests/libsvn_wc/wc-test-queries.h
|
||||
subversion/bindings/swig/proxy/swig_python_external_runtime.swg
|
||||
subversion/bindings/swig/proxy/swig_perl_external_runtime.swg
|
||||
subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg
|
||||
@ -56,15 +66,30 @@ private-built-includes =
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_Path.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNRepos.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNClient.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeInputStream.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeOutputStream.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Version.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLibIterator.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RuntimeVersion.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RevisionRangeList.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
|
||||
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_CommitEditor.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_StateReporter.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigImpl_Category.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_DiffLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_PropLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_SubstLib.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_TunnelChannel.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_RequestChannel.h
|
||||
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ResponseChannel.h
|
||||
|
||||
test-scripts =
|
||||
subversion/tests/cmdline/*_tests.py
|
||||
@ -106,6 +131,7 @@ swig-checkout-files = common.swg swigrun.swg runtime.swg
|
||||
# msvc-libs - additional libraries to link with on Windows
|
||||
# msvc-export - additional list of files to expose in dsp/vc(x)proj
|
||||
# msvc-static - visual studio target produces only a static lib
|
||||
# msvc-force-static- visual studio always uses static libraries for svn libs
|
||||
# add-deps - expands to additional autoconf-defined dependencies
|
||||
# add-install-deps - like add-deps, but for the install step
|
||||
# external-lib - expands to additional autoconf-defined libs
|
||||
@ -121,6 +147,7 @@ libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr
|
||||
apriconv apr
|
||||
manpages = subversion/svn/svn.1
|
||||
install = bin
|
||||
msvc-libs = setargv.obj
|
||||
|
||||
# The subversion repository administration tool
|
||||
[svnadmin]
|
||||
@ -130,6 +157,7 @@ path = subversion/svnadmin
|
||||
install = bin
|
||||
manpages = subversion/svnadmin/svnadmin.1
|
||||
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
msvc-libs = setargv.obj
|
||||
|
||||
# The subversion repository dump filtering tool
|
||||
[svndumpfilter]
|
||||
@ -215,7 +243,7 @@ type = lib
|
||||
path = subversion/libsvn_client
|
||||
libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr
|
||||
install = lib
|
||||
msvc-export = svn_client.h private/svn_client_private.h
|
||||
msvc-export = svn_client.h private/svn_client_mtcc.h private/svn_client_private.h
|
||||
|
||||
# Routines for binary diffing and tree-deltas
|
||||
[libsvn_delta]
|
||||
@ -248,6 +276,7 @@ add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
|
||||
msvc-export = svn_fs.h private/svn_fs_private.h
|
||||
|
||||
[libsvn_fs_base]
|
||||
description = Subversion Filesystem Base Library
|
||||
type = fs-module
|
||||
path = subversion/libsvn_fs_base
|
||||
sources = *.c bdb/*.c util/*.c
|
||||
@ -256,14 +285,24 @@ libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb libsvn_fs_util
|
||||
msvc-static = yes
|
||||
|
||||
[libsvn_fs_fs]
|
||||
description = Subversion FSFS Repository Filesystem Library
|
||||
type = fs-module
|
||||
path = subversion/libsvn_fs_fs
|
||||
install = fsmod-lib
|
||||
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
|
||||
msvc-static = yes
|
||||
|
||||
[libsvn_fs_x]
|
||||
description = Subversion FSX Repository Filesystem Library
|
||||
type = fs-module
|
||||
path = subversion/libsvn_fs_x
|
||||
install = fsmod-lib
|
||||
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
|
||||
msvc-static = yes
|
||||
|
||||
# Low-level grab bag of utilities
|
||||
[libsvn_fs_util]
|
||||
description = Subversion Filesystem Utility Library
|
||||
type = lib
|
||||
install = fsmod-lib
|
||||
path = subversion/libsvn_fs_util
|
||||
@ -273,7 +312,7 @@ msvc-static = yes
|
||||
|
||||
# General API for accessing repositories
|
||||
[libsvn_ra]
|
||||
description = Subversion Repository Access Library
|
||||
description = Subversion General Repository Access Library
|
||||
type = lib
|
||||
path = subversion/libsvn_ra
|
||||
libs = libsvn_delta libsvn_subr ra-libs apriconv apr
|
||||
@ -285,15 +324,16 @@ msvc-export = svn_ra.h private\svn_ra_private.h
|
||||
|
||||
# Accessing repositories via DAV through serf
|
||||
[libsvn_ra_serf]
|
||||
description = Subversion HTTP/WebDAV Protocol Repository Access Library
|
||||
type = ra-module
|
||||
path = subversion/libsvn_ra_serf
|
||||
install = serf-lib
|
||||
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf xml
|
||||
msvc-libs = secur32.lib
|
||||
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf xml zlib
|
||||
msvc-static = yes
|
||||
|
||||
# Accessing repositories via SVN
|
||||
[libsvn_ra_svn]
|
||||
description = Subversion SVN Protocol Repository Access Library
|
||||
type = ra-module
|
||||
path = subversion/libsvn_ra_svn
|
||||
install = ramod-lib
|
||||
@ -302,6 +342,7 @@ msvc-static = yes
|
||||
|
||||
# Accessing repositories via direct libsvn_fs
|
||||
[libsvn_ra_local]
|
||||
description = Subversion Local Repository Access Library
|
||||
type = ra-module
|
||||
path = subversion/libsvn_ra_local
|
||||
install = ramod-lib
|
||||
@ -323,7 +364,7 @@ description = Subversion General Utility Library
|
||||
type = lib
|
||||
install = fsmod-lib
|
||||
path = subversion/libsvn_subr
|
||||
libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic
|
||||
libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic intl
|
||||
msvc-libs = kernel32.lib advapi32.lib shfolder.lib ole32.lib
|
||||
crypt32.lib version.lib
|
||||
msvc-export =
|
||||
@ -332,7 +373,7 @@ msvc-export =
|
||||
svn_error.h svn_hash.h svn_io.h svn_iter.h svn_md5.h svn_mergeinfo.h
|
||||
svn_nls.h svn_opt.h svn_path.h svn_pools.h svn_props.h svn_quoprint.h
|
||||
svn_sorts.h svn_string.h svn_subst.h svn_time.h svn_types.h svn_user.h
|
||||
svn_utf.h svn_version.h svn_xml.h
|
||||
svn_utf.h svn_version.h svn_xml.h svn_x509.h
|
||||
private\svn_atomic.h private\svn_cache.h private\svn_cmdline_private.h
|
||||
private\svn_debug.h private\svn_error_private.h private\svn_fspath.h
|
||||
private\svn_log.h private\svn_mergeinfo_private.h
|
||||
@ -340,9 +381,10 @@ msvc-export =
|
||||
private\svn_utf_private.h private\svn_eol_private.h
|
||||
private\svn_token.h private\svn_adler32.h
|
||||
private\svn_temp_serializer.h private\svn_io_private.h
|
||||
private\svn_sorts_private.h private\svn_auth_private.h
|
||||
private\svn_string_private.h private\svn_magic.h
|
||||
private\svn_subr_private.h private\svn_mutex.h private\svn_named_atomic.h
|
||||
private\svn_cert.h
|
||||
private\svn_subr_private.h private\svn_mutex.h
|
||||
private\svn_packed_data.h private\svn_object_pool.h private\svn_cert.h
|
||||
|
||||
# Working copy management lib
|
||||
[libsvn_wc]
|
||||
@ -360,10 +402,9 @@ when = INSTALL_APACHE_MODS
|
||||
type = apache-mod
|
||||
path = subversion/mod_dav_svn
|
||||
sources = *.c reports/*.c posts/*.c
|
||||
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
|
||||
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libhttpd mod_dav
|
||||
nonlibs = apr aprutil
|
||||
install = apache-mod
|
||||
msvc-libs = mod_dav.lib libhttpd.lib
|
||||
|
||||
[mod_authz_svn]
|
||||
description = Subversion path-based authorization module for Apache
|
||||
@ -371,9 +412,8 @@ when = INSTALL_APACHE_MODS
|
||||
type = apache-mod
|
||||
path = subversion/mod_authz_svn
|
||||
nonlibs = mod_dav_svn apr aprutil
|
||||
libs = libsvn_repos libsvn_subr
|
||||
libs = libsvn_repos libsvn_subr libhttpd
|
||||
install = apache-mod
|
||||
msvc-libs = libhttpd.lib
|
||||
|
||||
[mod_dontdothat]
|
||||
description = Apache Httpd module to block certain kinds of Apache Subversion requests
|
||||
@ -381,21 +421,35 @@ when = INSTALL_APACHE_MODS
|
||||
type = apache-mod
|
||||
path = tools/server-side/mod_dontdothat
|
||||
nonlibs = mod_dav_svn apr aprutil
|
||||
libs = libsvn_subr xml
|
||||
libs = libsvn_subr xml libhttpd
|
||||
install = tools
|
||||
msvc-libs = libhttpd.lib
|
||||
|
||||
# The Subversion FSFS repository manipulation tool
|
||||
[svnfsfs]
|
||||
description = Subversion FSFS Repository Manipulation Tool
|
||||
type = exe
|
||||
path = subversion/svnfsfs
|
||||
install = bin
|
||||
libs = libsvn_repos libsvn_fs libsvn_fs_fs libsvn_delta libsvn_subr apriconv apr
|
||||
msvc-libs = setargv.obj
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# CONSTRUCTED HEADERS
|
||||
#
|
||||
|
||||
[rep_cache]
|
||||
description = Schema for the rep-sharing feature
|
||||
[rep_cache_fs_fs]
|
||||
description = Schema for the FSFS rep-sharing feature
|
||||
type = sql-header
|
||||
path = subversion/libsvn_fs_fs
|
||||
sources = rep-cache-db.sql
|
||||
|
||||
[rep_cache_fs_x]
|
||||
description = Schema for the FSX rep-sharing feature
|
||||
type = sql-header
|
||||
path = subversion/libsvn_fs_x
|
||||
sources = rep-cache-db.sql
|
||||
|
||||
[wc_queries]
|
||||
desription = Queries on the WC database
|
||||
type = sql-header
|
||||
@ -408,6 +462,11 @@ type = sql-header
|
||||
path = subversion/libsvn_subr
|
||||
sources = internal_statements.sql
|
||||
|
||||
[wc_test_queries]
|
||||
description = Queries using working copy tests
|
||||
type = sql-header
|
||||
path = subversion/tests/libsvn_wc
|
||||
sources = wc-test-queries.sql
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
@ -431,7 +490,6 @@ sources = core.i
|
||||
libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
|
||||
libsvn_diff libsvn_subr apr
|
||||
description = Subversion core library bindings
|
||||
include-runtime = yes
|
||||
|
||||
[swig_client]
|
||||
type = swig
|
||||
@ -501,35 +559,39 @@ description = Subversion WC library bindings
|
||||
type = swig_lib
|
||||
lang = python
|
||||
path = subversion/bindings/swig/python/libsvn_swig_py
|
||||
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
|
||||
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
|
||||
apriconv apr python swig
|
||||
link-cmd = $(LINK)
|
||||
install = swig-py-lib
|
||||
# need special build rule to include -DSWIGPYTHON
|
||||
compile-cmd = $(COMPILE_SWIG_PY)
|
||||
msvc-static = no
|
||||
msvc-export = ../bindings/swig/python/libsvn_swig_py/swigutil_py.h
|
||||
|
||||
# SWIG utility library for Perl modules
|
||||
[libsvn_swig_perl]
|
||||
type = swig_lib
|
||||
lang = perl
|
||||
path = subversion/bindings/swig/perl/libsvn_swig_perl
|
||||
libs = libsvn_delta libsvn_subr apriconv apr
|
||||
libs = libsvn_delta libsvn_subr apriconv apr perl swig
|
||||
install = swig-pl-lib
|
||||
# need special build rule to include
|
||||
compile-cmd = $(COMPILE_SWIG_PL)
|
||||
msvc-static = yes
|
||||
msvc-static = no
|
||||
msvc-export = ../bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
|
||||
|
||||
# SWIG utility library for Ruby modules
|
||||
[libsvn_swig_ruby]
|
||||
type = swig_lib
|
||||
lang = ruby
|
||||
path = subversion/bindings/swig/ruby/libsvn_swig_ruby
|
||||
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
|
||||
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
|
||||
link-cmd = $(LINK) $(SWIG_RB_LIBS)
|
||||
install = swig-rb-lib
|
||||
# need special build rule to include
|
||||
compile-cmd = $(COMPILE_SWIG_RB)
|
||||
msvc-static = no
|
||||
msvc-export = ../bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
@ -539,7 +601,9 @@ msvc-static = no
|
||||
type = java
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl
|
||||
subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
|
||||
subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
|
||||
subversion/bindings/javahl/src/org/apache/subversion/javahl/types
|
||||
subversion/bindings/javahl/src/org/apache/subversion/javahl/util
|
||||
src-root = subversion/bindings/javahl/src
|
||||
sources = *.java
|
||||
install = javahl-java
|
||||
@ -552,7 +616,7 @@ type = java
|
||||
path = subversion/bindings/javahl/src/org/tigris/subversion/javahl
|
||||
sources = *.java
|
||||
install = javahl-java
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAC)
|
||||
link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
|
||||
classes = subversion/bindings/javahl/classes
|
||||
add-deps = $(javahl_java_DEPS)
|
||||
### Replace JAR call in INSTALL_EXTRA_JAVAHL_JAVA macro Makefile.in.
|
||||
@ -576,26 +640,15 @@ type = java
|
||||
path = subversion/bindings/javahl/tests/org/tigris/subversion/javahl
|
||||
sources = *.java
|
||||
install = javahl-java
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAC)
|
||||
link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
|
||||
classes = subversion/bindings/javahl/classes
|
||||
package-roots = org
|
||||
### Java targets don't do up-to-date checks yet.
|
||||
#add-deps = javahl-compat-java
|
||||
add-deps = $(javahl_compat_java_DEPS)
|
||||
|
||||
[javahl-types-javah]
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
package = org.apache.subversion.javahl.types
|
||||
sources = *.java
|
||||
add-deps = $(javahl_java_DEPS)
|
||||
install = javahl-javah
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
|
||||
|
||||
[javahl-callback-javah]
|
||||
type = javah
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
@ -605,8 +658,41 @@ add-deps = $(javahl_java_DEPS)
|
||||
install = javahl-javah
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
|
||||
|
||||
[javahl-remote-javah]
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
package = org.apache.subversion.javahl.remote
|
||||
sources = *.java
|
||||
add-deps = $(javahl_java_DEPS)
|
||||
install = javahl-javah
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
|
||||
|
||||
[javahl-types-javah]
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
package = org.apache.subversion.javahl.types
|
||||
sources = *.java
|
||||
add-deps = $(javahl_java_DEPS)
|
||||
install = javahl-javah
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
|
||||
|
||||
[javahl-util-javah]
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/util
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
package = org.apache.subversion.javahl.util
|
||||
sources = *.java
|
||||
add-deps = $(javahl_java_DEPS)
|
||||
install = javahl-javah
|
||||
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
|
||||
|
||||
[javahl-javah]
|
||||
type = javah
|
||||
type = javah
|
||||
path = subversion/bindings/javahl/src/org/apache/subversion/javahl
|
||||
classes = subversion/bindings/javahl/classes
|
||||
headers = subversion/bindings/javahl/include
|
||||
@ -621,9 +707,11 @@ description = Subversion Java HighLevel binding
|
||||
type = lib
|
||||
path = subversion/bindings/javahl/native
|
||||
libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff
|
||||
libsvn_subr libsvn_fs aprutil apriconv apr
|
||||
sources = *.cpp *.c
|
||||
add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_types_javah_DEPS)
|
||||
libsvn_subr libsvn_fs aprutil apriconv apr java-sdk
|
||||
sources = *.cpp jniwrapper/*.cpp
|
||||
add-deps = $(javahl_java_DEPS) $(javahl_callback_javah_DEPS)
|
||||
$(javahl_remote_javah_DEPS) $(javahl_types_javah_DEPS)
|
||||
$(javahl_util_javah_DEPS) $(javahl_javah_DEPS)
|
||||
install = javahl-lib
|
||||
# need special build rule to include -I$(JDK)/include/jni.h
|
||||
compile-cmd = $(COMPILE_JAVAHL_CXX)
|
||||
@ -640,7 +728,7 @@ type = lib
|
||||
path = subversion/bindings/cxxhl
|
||||
libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff
|
||||
libsvn_subr libsvn_fs aprutil apriconv apr
|
||||
sources = src/*.cpp
|
||||
sources = src/*.cpp src/aprwrap/*.cpp
|
||||
install = cxxhl-lib
|
||||
msvc-static = yes
|
||||
compile-cmd = $(COMPILE_CXXHL_CXX)
|
||||
@ -648,14 +736,32 @@ link-cmd = $(LINK_CXX_LIB)
|
||||
|
||||
[cxxhl-tests]
|
||||
description = Unit tests for Subversion C++ HighLevel bindings
|
||||
when = SVN_USE_GMOCK
|
||||
type = exe
|
||||
path = subversion/bindings/cxxhl
|
||||
libs = libsvncxxhl libsvn_subr
|
||||
libs = libsvncxxhl libgmock libsvn_subr apr
|
||||
sources = tests/*.cpp
|
||||
install = tests
|
||||
compile-cmd = $(COMPILE_CXXHL_CXX)
|
||||
compile-cmd = $(COMPILE_CXXHL_GMOCK_CXX)
|
||||
link-cmd = $(LINK_CXX)
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# Gmock targets
|
||||
#
|
||||
|
||||
[libgmock]
|
||||
description = Googlemock Library
|
||||
when = SVN_USE_GMOCK
|
||||
type = lib
|
||||
path = gmock-fused
|
||||
sources = gmock-gtest-all.cc
|
||||
install = tests
|
||||
msvc-static = yes
|
||||
compile-cmd = $(COMPILE_GMOCK_CXX)
|
||||
link-cmd = $(LINK_CXX_LIB)
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# TESTING TARGETS
|
||||
@ -702,15 +808,52 @@ libs = libsvn_test libsvn_fs libsvn_fs_base libsvn_delta
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_fs_fs
|
||||
[fs-pack-test]
|
||||
[fs-fs-pack-test]
|
||||
description = Test fsfs packing in libsvn_fs_fs
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_fs_fs
|
||||
sources = fs-pack-test.c
|
||||
sources = fs-fs-pack-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
|
||||
libsvn_subr apriconv apr
|
||||
|
||||
[fs-fs-fuzzy-test]
|
||||
description = Use fuzzying to test FSFS corruption resilience
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_fs_fs
|
||||
sources = fs-fs-fuzzy-test.c
|
||||
install = sub-test
|
||||
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
|
||||
libsvn_repos libsvn_subr apriconv apr
|
||||
|
||||
[fs-fs-private-test]
|
||||
description = Test FSSF private API
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_fs_fs
|
||||
sources = fs-fs-private-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
|
||||
libsvn_repos libsvn_subr apriconv apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_fs_x
|
||||
[fs-x-pack-test]
|
||||
description = Test fsx packing in libsvn_fs_x
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_fs_x
|
||||
sources = fs-x-pack-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs libsvn_fs_x libsvn_delta
|
||||
libsvn_subr apriconv apr
|
||||
|
||||
[string-table-test]
|
||||
description = Test fsfs string tables
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_fs_x
|
||||
sources = string-table-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs_x libsvn_subr apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_fs
|
||||
|
||||
@ -721,6 +864,7 @@ path = subversion/tests/libsvn_fs
|
||||
sources = locks-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[fs-test]
|
||||
description = Test locks in libsvn_fs
|
||||
@ -729,7 +873,7 @@ path = subversion/tests/libsvn_fs
|
||||
sources = fs-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_fs libsvn_delta
|
||||
libsvn_subr aprutil apriconv apr
|
||||
libsvn_fs_util libsvn_subr aprutil apriconv apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_repos
|
||||
@ -742,6 +886,14 @@ sources = repos-test.c dir-delta-editor.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
|
||||
[dump-load-test]
|
||||
description = Test dumping/loading repositories in libsvn_repos
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_repos
|
||||
sources = dump-load-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_subr
|
||||
|
||||
@ -753,6 +905,14 @@ sources = auth-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr
|
||||
|
||||
[bit-array-test]
|
||||
description = Test packed bit arrays
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = bit-array-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr
|
||||
|
||||
[cache-test]
|
||||
description = Test in-memory cache
|
||||
type = exe
|
||||
@ -768,6 +928,7 @@ path = subversion/tests/libsvn_subr
|
||||
sources = checksum-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr zlib
|
||||
msvc-force-static = yes
|
||||
|
||||
[compat-test]
|
||||
description = Test compatibility functions
|
||||
@ -792,6 +953,7 @@ path = subversion/tests/libsvn_subr
|
||||
sources = crypto-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr aprutil apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[dirent_uri-test]
|
||||
description = Test dirent_uri library
|
||||
@ -849,21 +1011,13 @@ sources = mergeinfo-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr
|
||||
|
||||
[named_atomic-test]
|
||||
description = Test named atomics
|
||||
[packed-data-test]
|
||||
description = Test path library
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = named_atomic-test.c
|
||||
sources = packed-data-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr
|
||||
|
||||
[named_atomic-proc-test]
|
||||
description = Sub-process for named atomics
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = named_atomic-test-proc.c
|
||||
install = sub-test
|
||||
libs = libsvn_subr apr
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[path-test]
|
||||
description = Test path library
|
||||
@ -873,6 +1027,22 @@ sources = path-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[prefix-string-test]
|
||||
description = Test path library
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = prefix-string-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[priority-queue-test]
|
||||
description = Test path library
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = priority-queue-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[revision-test]
|
||||
description = Test revision library
|
||||
type = exe
|
||||
@ -881,6 +1051,14 @@ sources = revision-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apr
|
||||
|
||||
[root-pools-test]
|
||||
description = Test time functions
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = root-pools-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[skel-test]
|
||||
description = Test skels in libsvn_subr
|
||||
type = exe
|
||||
@ -913,6 +1091,14 @@ sources = string-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[sqlite-test]
|
||||
description = Test stream library
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = sqlite-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[time-test]
|
||||
description = Test time functions
|
||||
type = exe
|
||||
@ -945,6 +1131,15 @@ sources = translate-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
[x509-test]
|
||||
description = Test x509 parser
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_subr
|
||||
sources = x509-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_delta
|
||||
|
||||
@ -974,6 +1169,15 @@ path = subversion/tests/libsvn_client
|
||||
sources = client-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[mtcc-test]
|
||||
description = Test Multi Command Context
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_client
|
||||
sources = mtcc-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Tests for libsvn_diff
|
||||
@ -1003,7 +1207,7 @@ type = exe
|
||||
path = subversion/tests/libsvn_ra
|
||||
sources = ra-test.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
|
||||
libs = libsvn_test libsvn_ra libsvn_ra_svn libsvn_fs libsvn_delta libsvn_subr
|
||||
apriconv apr
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@ -1028,6 +1232,7 @@ path = subversion/tests/libsvn_wc
|
||||
sources = conflict-data-test.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[db-test]
|
||||
description = Test the wc-ng database subsystem
|
||||
@ -1036,6 +1241,7 @@ path = subversion/tests/libsvn_wc
|
||||
sources = db-test.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[pristine-store-test]
|
||||
description = Test the wc-ng pristine text storage subsystem
|
||||
@ -1044,6 +1250,7 @@ path = subversion/tests/libsvn_wc
|
||||
sources = pristine-store-test.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[entries-compat-test]
|
||||
description = Test backwards compat for the entry interface
|
||||
@ -1052,6 +1259,7 @@ path = subversion/tests/libsvn_wc
|
||||
sources = entries-compat.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[op-depth-test]
|
||||
description = Test layered tree changes
|
||||
@ -1060,12 +1268,13 @@ path = subversion/tests/libsvn_wc
|
||||
sources = op-depth-test.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
[wc-queries-test]
|
||||
description = Test Sqlite query evaluation
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_wc
|
||||
sources = wc-queries-test.c
|
||||
sources = wc-queries-test.c ../../libsvn_subr/sqlite3wrapper.c
|
||||
install = test
|
||||
libs = libsvn_test libsvn_subr apriconv apr sqlite
|
||||
|
||||
@ -1076,6 +1285,7 @@ path = subversion/tests/libsvn_wc
|
||||
sources = wc-test.c utils.c
|
||||
install = test
|
||||
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# These are not unit tests at all, they are small programs that exercise
|
||||
@ -1107,6 +1317,7 @@ path = subversion/tests/cmdline
|
||||
sources = entries-dump.c
|
||||
install = test
|
||||
libs = libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
testing = skip
|
||||
|
||||
[atomic-ra-revprop-change]
|
||||
@ -1117,12 +1328,21 @@ install = test
|
||||
libs = libsvn_ra libsvn_subr apriconv apr
|
||||
testing = skip
|
||||
|
||||
[lock-helper]
|
||||
type = exe
|
||||
path = subversion/tests/cmdline
|
||||
sources = lock-helper.c
|
||||
install = test
|
||||
libs = libsvn_fs libsvn_subr apriconv apr
|
||||
testing = skip
|
||||
|
||||
[wc-lock-tester]
|
||||
type = exe
|
||||
path = subversion/tests/libsvn_wc
|
||||
sources = wc-lock-tester.c
|
||||
install = test
|
||||
libs = libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
testing = skip
|
||||
|
||||
[wc-incomplete-tester]
|
||||
@ -1131,6 +1351,16 @@ path = subversion/tests/libsvn_wc
|
||||
sources = wc-incomplete-tester.c
|
||||
install = test
|
||||
libs = libsvn_wc libsvn_subr apriconv apr
|
||||
msvc-force-static = yes
|
||||
testing = skip
|
||||
|
||||
[svn-wc-db-tester]
|
||||
type = exe
|
||||
path = tools/dev/wc-ng
|
||||
sources = svn-wc-db-tester.c
|
||||
install = test
|
||||
libs = libsvn_wc libsvn_subr apr
|
||||
msvc-force-static = yes
|
||||
testing = skip
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
@ -1142,15 +1372,25 @@ testing = skip
|
||||
type = lib
|
||||
external-lib = $(SVN_APR_LIBS)
|
||||
msvc-libs = ws2_32.lib rpcrt4.lib mswsock.lib
|
||||
pkg-config = apr-@SVN_APR_MAJOR_VERSION@
|
||||
|
||||
[aprutil]
|
||||
type = lib
|
||||
external-lib = $(SVN_APRUTIL_LIBS)
|
||||
pkg-config = apr-util-@SVN_APR_MAJOR_VERSION@
|
||||
|
||||
[apriconv]
|
||||
type = lib
|
||||
external-lib = $(SVN_APRUTIL_LIBS)
|
||||
|
||||
[libhttpd]
|
||||
type = lib
|
||||
external-lib = $(SVN_HTTPD_LIBS)
|
||||
|
||||
[mod_dav]
|
||||
type = lib
|
||||
external-lib = $(SVN_MOD_DAV_LIBS)
|
||||
|
||||
[bdb]
|
||||
type = lib
|
||||
external-lib = $(SVN_DB_LIBS)
|
||||
@ -1158,6 +1398,7 @@ external-lib = $(SVN_DB_LIBS)
|
||||
[gnome-keyring]
|
||||
type = lib
|
||||
external-lib = $(SVN_GNOME_KEYRING_LIBS)
|
||||
pkg-config = gnome-keyring-1
|
||||
|
||||
[kwallet]
|
||||
type = lib
|
||||
@ -1171,10 +1412,18 @@ external-lib = $(SVN_MAGIC_LIBS)
|
||||
type = lib
|
||||
external-lib = $(SVN_SASL_LIBS)
|
||||
|
||||
[openssl]
|
||||
type = lib
|
||||
external-lib = $(SVN_OPENSSL_LIBS)
|
||||
msvc-libs = ssleay32.lib libeay32.lib
|
||||
|
||||
[intl]
|
||||
type = lib
|
||||
external-lib = $(SVN_INTL_LIBS)
|
||||
|
||||
[zlib]
|
||||
type = lib
|
||||
external-lib = $(SVN_ZLIB_LIBS)
|
||||
external-project = zlib
|
||||
msvc-static = yes
|
||||
|
||||
[apr_memcache]
|
||||
@ -1184,18 +1433,41 @@ external-lib = $(SVN_APR_MEMCACHE_LIBS)
|
||||
[serf]
|
||||
type = lib
|
||||
external-lib = $(SVN_SERF_LIBS)
|
||||
external-project = serf/serf
|
||||
libs = apr aprutil xml
|
||||
msvc-static = yes
|
||||
libs = apr aprutil openssl xml zlib
|
||||
msvc-libs = secur32.lib
|
||||
pkg-config = serf-1
|
||||
pkg-config-private = yes
|
||||
|
||||
[sqlite]
|
||||
type = lib
|
||||
external-lib = $(SVN_SQLITE_LIBS)
|
||||
pkg-config = sqlite3
|
||||
pkg-config-private = yes
|
||||
|
||||
[xml]
|
||||
type = lib
|
||||
external-lib = $(SVN_XML_LIBS)
|
||||
|
||||
[swig]
|
||||
type = lib
|
||||
external-lib = $(SVN_SWIG_LIBS)
|
||||
|
||||
[perl]
|
||||
type = lib
|
||||
external-lib = $(SVN_PERL_LIBS)
|
||||
|
||||
[python]
|
||||
type = lib
|
||||
external-lib = $(SVN_PYTHON_LIBS)
|
||||
|
||||
[ruby]
|
||||
type = lib
|
||||
external-lib = $(SVN_RUBY_LIBS)
|
||||
|
||||
[java-sdk]
|
||||
type = lib
|
||||
external-lib = $(SVN_JAVA_SDK_LIBS)
|
||||
|
||||
[ra-libs]
|
||||
type = lib
|
||||
external-lib = $(SVN_RA_LIB_LINK)
|
||||
@ -1204,7 +1476,7 @@ libs = libsvn_ra_serf libsvn_ra_local libsvn_ra_svn
|
||||
[fs-libs]
|
||||
type = lib
|
||||
external-lib = $(SVN_FS_LIB_LINK)
|
||||
libs = libsvn_fs_base libsvn_fs_fs
|
||||
libs = libsvn_fs_base libsvn_fs_fs libsvn_fs_x
|
||||
|
||||
[__ALL__]
|
||||
type = project
|
||||
@ -1213,37 +1485,44 @@ libs = svn svnadmin svndumpfilter svnlook svnmucc svnserve svnrdump svnsync
|
||||
svnversion
|
||||
mod_authz_svn mod_dav_svn mod_dontdothat
|
||||
svnauthz svnauthz-validate svnraisetreeconflict
|
||||
svnfsfs svnbench
|
||||
|
||||
[__ALL_TESTS__]
|
||||
type = project
|
||||
path = build/win32
|
||||
libs = __ALL__
|
||||
fs-test fs-base-test fs-fsfs-test fs-pack-test skel-test
|
||||
strings-reps-test changes-test locks-test repos-test
|
||||
fs-test fs-base-test fs-fsfs-test fs-fs-pack-test fs-fs-fuzzy-test
|
||||
fs-fs-private-test fs-x-pack-test string-table-test
|
||||
skel-test strings-reps-test changes-test locks-test
|
||||
repos-test dump-load-test
|
||||
checksum-test compat-test config-test hashdump-test mergeinfo-test
|
||||
opt-test path-test stream-test string-test time-test utf-test
|
||||
opt-test packed-data-test path-test prefix-string-test
|
||||
priority-queue-test root-pools-test stream-test
|
||||
string-test time-test utf-test bit-array-test
|
||||
error-test error-code-test cache-test spillbuf-test crypto-test
|
||||
named_atomic-test named_atomic-proc-test revision-test
|
||||
revision-test
|
||||
subst_translate-test io-test
|
||||
translate-test
|
||||
random-test window-test
|
||||
diff-diff3-test
|
||||
ra-test
|
||||
ra-local-test
|
||||
sqlite-test
|
||||
svndiff-test vdelta-test
|
||||
entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester
|
||||
client-test
|
||||
lock-helper
|
||||
client-test mtcc-test
|
||||
conflict-data-test db-test pristine-store-test entries-compat-test
|
||||
op-depth-test dirent_uri-test wc-queries-test wc-test
|
||||
auth-test
|
||||
parse-diff-test
|
||||
parse-diff-test x509-test
|
||||
|
||||
[__MORE__]
|
||||
type = project
|
||||
path = build/win32
|
||||
libs = __ALL_TESTS__
|
||||
diff diff3 diff4 fsfs-reorg fsfs-stats fsfs-access-map svn-bench
|
||||
svn-rep-sharing-stats svn-populate-node-origins-index
|
||||
diff diff3 diff4 fsfs-access-map svnauth
|
||||
svn-populate-node-origins-index x509-parser svn-wc-db-tester
|
||||
|
||||
[__LIBS__]
|
||||
type = project
|
||||
@ -1286,20 +1565,6 @@ libs = __JAVAHL__ javahl-tests javahl-compat-tests
|
||||
# ----------------------------------------------------------------------------
|
||||
# Contrib and tools
|
||||
|
||||
[fsfs-reorg]
|
||||
type = exe
|
||||
path = tools/dev
|
||||
sources = fsfs-reorg.c
|
||||
install = tools
|
||||
libs = libsvn_delta libsvn_subr apr
|
||||
|
||||
[fsfs-stats]
|
||||
type = exe
|
||||
path = tools/server-side
|
||||
sources = fsfs-stats.c
|
||||
install = tools
|
||||
libs = libsvn_delta libsvn_subr apr
|
||||
|
||||
[fsfs-access-map]
|
||||
type = exe
|
||||
path = tools/dev
|
||||
@ -1328,10 +1593,11 @@ sources = diff4.c
|
||||
install = tools
|
||||
libs = libsvn_diff libsvn_subr apriconv apr
|
||||
|
||||
[svn-bench]
|
||||
[svnbench]
|
||||
description = Benchmarking and diagnostics tool for the network layer
|
||||
type = exe
|
||||
path = tools/client-side/svn-bench
|
||||
install = tools
|
||||
path = subversion/svnbench
|
||||
install = bin
|
||||
libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr libsvn_delta
|
||||
apriconv apr
|
||||
|
||||
@ -1371,9 +1637,10 @@ path = tools/dev/svnraisetreeconflict
|
||||
libs = libsvn_wc libsvn_subr apriconv apr
|
||||
install = tools
|
||||
|
||||
[svn-rep-sharing-stats]
|
||||
[x509-parser]
|
||||
description = Tool to verify x509 certificates
|
||||
type = exe
|
||||
path = tools/server-side
|
||||
sources = svn-rep-sharing-stats.c
|
||||
path = tools/dev
|
||||
sources = x509-parser.c
|
||||
install = tools
|
||||
libs = libsvn_repos libsvn_fs libsvn_fs_fs libsvn_subr apriconv apr
|
||||
libs = libsvn_subr apr
|
||||
|
1602
contrib/subversion/configure
vendored
1602
contrib/subversion/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -49,13 +49,11 @@ SVN_CONFIG_NICE(config.nice)
|
||||
# ==== Check for programs ====================================================
|
||||
|
||||
# Look for a C compiler (before anything can set CFLAGS)
|
||||
CMAINTAINERFLAGS="$CUSERFLAGS"
|
||||
CUSERFLAGS="$CFLAGS"
|
||||
AC_PROG_CC
|
||||
SVN_CC_MODE_SETUP
|
||||
|
||||
# Look for a C++ compiler (before anything can set CXXFLAGS)
|
||||
CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
|
||||
CXXUSERFLAGS="$CXXFLAGS"
|
||||
AC_PROG_CXX
|
||||
SVN_CXX_MODE_SETUP
|
||||
@ -92,13 +90,8 @@ AC_SUBST([MKDIR])
|
||||
|
||||
dnl verify apr version and set apr flags
|
||||
dnl These regular expressions should not contain "\(" and "\)".
|
||||
dnl The specific reason we require APR 0.9.7 is:
|
||||
dnl It contains fixes to its file writing routines
|
||||
dnl now generating errors instead of silently ignoring
|
||||
dnl them. Only .7 and later can guarantee repository
|
||||
dnl integrity with FSFS.
|
||||
|
||||
APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
|
||||
APR_VER_REGEXES=["1\.[3-9]\. 2\."]
|
||||
|
||||
SVN_LIB_APR($APR_VER_REGEXES)
|
||||
|
||||
@ -111,11 +104,14 @@ if test `expr $apr_version : 2` -ne 0; then
|
||||
AC_SUBST(SVN_APRUTIL_INCLUDES)
|
||||
AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
|
||||
AC_SUBST(SVN_APRUTIL_LIBS)
|
||||
SVN_APR_MAJOR_VERSION=2
|
||||
else
|
||||
svn_lib_ver=0
|
||||
APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
|
||||
APU_VER_REGEXES=["1\.[3-9]\."]
|
||||
SVN_LIB_APRUTIL($APU_VER_REGEXES)
|
||||
SVN_APR_MAJOR_VERSION=1
|
||||
fi
|
||||
AC_SUBST(SVN_APR_MAJOR_VERSION)
|
||||
SVN_LT_SOVERSION="-version-info $svn_lib_ver"
|
||||
AC_SUBST(SVN_LT_SOVERSION)
|
||||
AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
|
||||
@ -125,7 +121,7 @@ dnl Search for pkg-config
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
||||
|
||||
dnl Search for serf
|
||||
SVN_LIB_SERF(1,2,1)
|
||||
SVN_LIB_SERF(1,3,4)
|
||||
|
||||
if test "$svn_lib_serf" = "yes"; then
|
||||
AC_DEFINE([SVN_HAVE_SERF], 1,
|
||||
@ -142,7 +138,7 @@ fi
|
||||
|
||||
|
||||
dnl Find Apache with a recent-enough magic module number
|
||||
SVN_FIND_APACHE(20020903)
|
||||
SVN_FIND_APACHE(20051115)
|
||||
|
||||
dnl Search for SQLite. If you change SQLITE_URL from a .zip to
|
||||
dnl something else also update build/ac-macros/sqlite.m4 to reflect
|
||||
@ -167,7 +163,6 @@ if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
|
||||
fi
|
||||
|
||||
SVN_CHECK_FOR_ATOMIC_BUILTINS
|
||||
|
||||
if test "$svn_cv_atomic_builtins" = "yes"; then
|
||||
AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
|
||||
fi
|
||||
@ -227,7 +222,7 @@ if test "$experimental_libtool" = "yes"; then
|
||||
SVN_LIBTOOL="$sh_libtool"
|
||||
else
|
||||
sh_libtool="$abs_builddir/libtool"
|
||||
SVN_LIBTOOL="\$(SHELL) $sh_libtool"
|
||||
SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
|
||||
fi
|
||||
AC_SUBST(SVN_LIBTOOL)
|
||||
|
||||
@ -324,18 +319,6 @@ case $host in
|
||||
esac
|
||||
AC_SUBST(LT_NO_UNDEFINED)
|
||||
|
||||
AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
|
||||
case $host in
|
||||
*-*-cygwin*)
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
|
||||
[Define if circular linkage is not possible on this platform.])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Check for trang.
|
||||
trang=yes
|
||||
AC_ARG_WITH(trang,
|
||||
@ -570,64 +553,97 @@ found_gnome_keyring=no
|
||||
AC_MSG_CHECKING([whether to look for GNOME Keyring])
|
||||
if test "$with_gnome_keyring" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
if test "$svn_enable_shared" = "yes"; then
|
||||
if test "$APR_HAS_DSO" = "yes"; then
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
|
||||
if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
|
||||
AC_MSG_RESULT([yes])
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
|
||||
CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
|
||||
AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
|
||||
AC_MSG_CHECKING([for GNOME Keyring])
|
||||
if test "$found_gnome_keyring" = "yes"; then
|
||||
case "$host" in
|
||||
*-*-darwin*)
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([--with-gnome-keyring is not supported on Mac OS X.])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if test "$svn_enable_shared" = "yes"; then
|
||||
if test "$APR_HAS_DSO" = "yes"; then
|
||||
if test -n "$PKG_CONFIG"; then
|
||||
AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
|
||||
if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
|
||||
[Is GNOME Keyring support enabled?])
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
|
||||
CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
|
||||
AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
|
||||
AC_MSG_CHECKING([for GNOME Keyring])
|
||||
if test "$found_gnome_keyring" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
|
||||
[Is GNOME Keyring support enabled?])
|
||||
CPPFLAGS="$old_CPPFLAGS"
|
||||
SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([cannot find GNOME Keyring])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([cannot find GNOME Keyring])
|
||||
AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
|
||||
AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
|
||||
AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
|
||||
AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$with_gnome_keyring" = "yes"; then
|
||||
AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
|
||||
else
|
||||
with_gnome_keyring=no
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
|
||||
AC_SUBST(SVN_GNOME_KEYRING_LIBS)
|
||||
|
||||
dnl Googlemock -----------------
|
||||
AC_ARG_ENABLE([gmock],
|
||||
AS_HELP_STRING([--disable-gmock],
|
||||
[Do not use the Googlemock testing framework]),
|
||||
[],
|
||||
[enable_gmock=yes])
|
||||
|
||||
AC_SUBST([GMOCK_SRCDIR], [$abs_srcdir/gmock-fused])
|
||||
AC_MSG_CHECKING([whether use Googlemock])
|
||||
if test "$enable_gmock" != "no"; then
|
||||
if test -d "$GMOCK_SRCDIR"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
SVN_USE_GMOCK=true
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
SVN_USE_GMOCK=false
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
SVN_USE_GMOCK_SOURCES=false
|
||||
fi
|
||||
AC_SUBST([SVN_USE_GMOCK])
|
||||
|
||||
dnl Ev2 experimental features ----------------------
|
||||
dnl Note: The Ev2 implementations will be built unconditionally, but by
|
||||
@ -651,13 +667,22 @@ AC_ARG_ENABLE(nls,
|
||||
[enable_nls=$enableval],[enable_nls=yes])
|
||||
|
||||
USE_NLS="no"
|
||||
SVN_INTL_LIBS=""
|
||||
if test "$enable_nls" = "yes"; then
|
||||
dnl First, check to see if there is a working msgfmt.
|
||||
AC_PATH_PROG(MSGFMT, msgfmt, none)
|
||||
AC_PATH_PROG(MSGMERGE, msgmerge, none)
|
||||
AC_PATH_PROG(XGETTEXT, xgettext, none)
|
||||
if test "$MSGFMT" != "none"; then
|
||||
AC_SEARCH_LIBS(bindtextdomain, [intl], [],
|
||||
AC_SEARCH_LIBS(bindtextdomain, [intl],
|
||||
[
|
||||
# in case libintl needs to be linked explicitly,
|
||||
# $ac_cv_search_bindtextdomain contains -l linker flags
|
||||
if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
|
||||
then
|
||||
SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
|
||||
fi
|
||||
],
|
||||
[
|
||||
enable_nls="no"
|
||||
])
|
||||
@ -669,6 +694,10 @@ if test "$enable_nls" = "yes"; then
|
||||
AC_SEARCH_LIBS(bindtextdomain, [intl],
|
||||
[
|
||||
enable_nls="yes"
|
||||
if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
|
||||
then
|
||||
SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
|
||||
fi
|
||||
# This is here so that -liconv ends up in LIBS
|
||||
# if it worked with -liconv.
|
||||
AC_CHECK_LIB(iconv, libiconv_open)
|
||||
@ -687,6 +716,8 @@ if test "$enable_nls" = "yes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(SVN_INTL_LIBS)
|
||||
|
||||
AH_BOTTOM([
|
||||
/* Indicate to translators that string X should be translated. Do not look
|
||||
up the translation at run time; just expand to X. This macro is suitable
|
||||
@ -711,6 +742,30 @@ AH_BOTTOM([
|
||||
#define gettext(x) (x)
|
||||
#define dgettext(domain, x) (x)
|
||||
#endif
|
||||
|
||||
/* compiler hints */
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
# define SVN__PREDICT_FALSE(x) (__builtin_expect(x, 0))
|
||||
# define SVN__PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
|
||||
#else
|
||||
# define SVN__PREDICT_FALSE(x) (x)
|
||||
# define SVN__PREDICT_TRUE(x) (x)
|
||||
#endif
|
||||
|
||||
#if defined(SVN_DEBUG)
|
||||
# define SVN__FORCE_INLINE
|
||||
# define SVN__PREVENT_INLINE
|
||||
#elif defined(__GNUC__)
|
||||
# define SVN__FORCE_INLINE APR_INLINE __attribute__ ((always_inline))
|
||||
# define SVN__PREVENT_INLINE __attribute__ ((noinline))
|
||||
#else
|
||||
# define SVN__FORCE_INLINE APR_INLINE
|
||||
# define SVN__PREVENT_INLINE
|
||||
#endif
|
||||
|
||||
/* Macro used to specify that a variable is intentionally left unused.
|
||||
Supresses compiler warnings about the variable being unused. */
|
||||
#define SVN_UNUSED(v) ( (void)(v) )
|
||||
])
|
||||
|
||||
dnl Used to simulate makefile conditionals.
|
||||
@ -887,16 +942,6 @@ AC_CHECK_HEADER(termios.h,[
|
||||
|
||||
dnl Process some configuration options ----------
|
||||
|
||||
AC_ARG_WITH(openssl,
|
||||
AS_HELP_STRING([--with-openssl],
|
||||
[This option does NOT affect the Subversion build process in any
|
||||
way. It tells an integrated Serf HTTP client library build
|
||||
process where to locate the OpenSSL library when (and only when)
|
||||
building Serf as an integrated part of the Subversion build
|
||||
process. When linking to a previously installed version of Serf
|
||||
instead, you do not need to use this option.]),
|
||||
[])
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
AS_HELP_STRING([--enable-debug],
|
||||
[Turn on debugging]),
|
||||
@ -989,7 +1034,7 @@ AS_HELP_STRING([--enable-maintainer-mode],
|
||||
dnl but throw too many warnings in svn code, of too little importance,
|
||||
dnl to keep these enabled. Remove the "dnl" to do a run with these
|
||||
dnl switches enabled.
|
||||
dnl ./configure CUSERFLAGS="-Wswitch-enum -Wswitch-default"
|
||||
dnl ./configure CFLAGS="-Wswitch-enum -Wswitch-default"
|
||||
|
||||
dnl Add each of the following flags only if the C compiler accepts it.
|
||||
CFLAGS_KEEP="$CFLAGS"
|
||||
@ -1003,12 +1048,13 @@ AS_HELP_STRING([--enable-maintainer-mode],
|
||||
SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
|
||||
SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
|
||||
SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
|
||||
SVN_CFLAGS_ADD_IFELSE([-Wmissing-variable-declarations])
|
||||
|
||||
CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
|
||||
CMAINTAINERFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS_KEEP"
|
||||
|
||||
dnl Add flags that all versions of GCC (should) support
|
||||
CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long $CMAINTAINERFLAGS"
|
||||
CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wbad-function-cast $CMAINTAINERFLAGS"
|
||||
fi
|
||||
if test "$GXX" = "yes"; then
|
||||
AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
|
||||
@ -1022,7 +1068,7 @@ AS_HELP_STRING([--enable-maintainer-mode],
|
||||
SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
|
||||
SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers])
|
||||
|
||||
CXXMAINTAINERFLAGS="$CXXFLAGS $CXXMAINTAINERFLAGS"
|
||||
CXXMAINTAINERFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS_KEEP"
|
||||
|
||||
dnl Add flags that all versions of G++ (should) support
|
||||
@ -1227,7 +1273,7 @@ AS_HELP_STRING([--enable-gprof],
|
||||
|
||||
PYTHON="`$abs_srcdir/build/find_python.sh`"
|
||||
if test -z "$PYTHON"; then
|
||||
AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
|
||||
AC_MSG_WARN([Python 2.7 or later is required to run the testsuite])
|
||||
AC_MSG_WARN([or to use the Subversion Python bindings])
|
||||
AC_MSG_WARN([])
|
||||
AC_MSG_WARN([If you have a suitable Python installed, but not on the])
|
||||
@ -1237,7 +1283,7 @@ fi
|
||||
AC_PATH_PROGS(PYTHON, "$PYTHON", none)
|
||||
|
||||
# The minimum version for the JVM runtime for our Java bytecode.
|
||||
JAVA_OLDEST_WORKING_VER='1.5'
|
||||
JAVA_OLDEST_WORKING_VER='1.6'
|
||||
# SVN_CHECK_JDK sets $JAVA_CLASSPATH
|
||||
SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
|
||||
|
||||
@ -1341,6 +1387,13 @@ if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then
|
||||
svn_fs_lib_install_deps="install-fsmod-lib"
|
||||
svn_fs_lib_link="\$(FS_FS_LINK)"
|
||||
|
||||
AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_X, 1,
|
||||
[Defined if libsvn_fs should link against libsvn_fs_x])
|
||||
svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_X_DEPS)"
|
||||
svn_fs_lib_link="$svn_fs_lib_link \$(FS_X_LINK)"
|
||||
dnl FSFS already installs fsmod
|
||||
dnl svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-fsmod-lib"
|
||||
|
||||
if test "$svn_lib_berkeley_db" = "yes"; then
|
||||
AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
|
||||
[Defined if libsvn_fs should link against libsvn_fs_base])
|
||||
@ -1402,8 +1455,15 @@ if test "$do_javahl_build" = "yes"; then
|
||||
# it.
|
||||
AC_MSG_CHECKING([for additional flags to link C++ libraries])
|
||||
if test "x$ac_compiler_gnu" = "xyes"; then
|
||||
LT_CXX_LIBADD="-lstdc++"
|
||||
AC_MSG_RESULT([$LT_CXX_LIBADD])
|
||||
case "$host" in
|
||||
*freebsd10*)
|
||||
AC_MSG_RESULT([none needed])
|
||||
;;
|
||||
*)
|
||||
LT_CXX_LIBADD="-lstdc++"
|
||||
AC_MSG_RESULT([$LT_CXX_LIBADD])
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_RESULT([none needed])
|
||||
fi
|
||||
@ -1433,6 +1493,8 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
|
||||
|
||||
# ==== Miscellaneous bits ====================================================
|
||||
|
||||
AC_CHECK_HEADERS([stdbool.h inttypes.h])
|
||||
|
||||
# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
|
||||
### I think we get this flag from APR, so the fix probably belongs there
|
||||
if test "$CC" = "clang"; then
|
||||
@ -1484,6 +1546,13 @@ AC_CONFIG_COMMANDS([svn_private_config.h.tmp],
|
||||
SVN_DB_HEADER="$SVN_DB_HEADER"])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
# Create pkg-config .pc files from .pc.in files
|
||||
for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do
|
||||
pc_file=${pc_in_file#${abs_srcdir}/}
|
||||
pc_file=${pc_file%.in}
|
||||
AC_CONFIG_FILES([${pc_file}])
|
||||
done
|
||||
|
||||
SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
|
||||
SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
|
||||
SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)
|
||||
|
30
contrib/subversion/doc/programmer/gtest-guide.txt
Normal file
30
contrib/subversion/doc/programmer/gtest-guide.txt
Normal file
@ -0,0 +1,30 @@
|
||||
Googlemock and Googletest Suite for Subversion
|
||||
---------------------------------------------
|
||||
|
||||
Googlemock and Googletest are external packages that are downloaded
|
||||
and compiled on request, as part of regular compilations.
|
||||
|
||||
Googlemock is available here:
|
||||
|
||||
https://code.google.com/p/googlemock/
|
||||
|
||||
The source packages already include Googletest, which is available
|
||||
here:
|
||||
|
||||
https://code.google.com/p/googletest/
|
||||
|
||||
Subversion uses Googlemock and Googletest for the C++HL test suite.
|
||||
|
||||
|
||||
|
||||
To configure Subversion to use Googlemock, type
|
||||
|
||||
./get-dep.sh gmock
|
||||
|
||||
This will download Googlemock and put the fused source into the
|
||||
'gmock-fused' directory. Once it's there, configure will pick it up
|
||||
automatically (but you do have to re-run autogen.sh and configure).
|
||||
|
||||
You can disable building Googlemock (and hence the C++HL test suite)
|
||||
with the --disable-gmock configure option. This will tell configure to
|
||||
ignore the gmock-fused directory.
|
@ -53,7 +53,7 @@ root" contains exactly three subdirectories: <tt>/trunk</tt>,
|
||||
only one project root, or it may contain a number of them.</p>
|
||||
|
||||
<p><em>Book reference:</em> <a
|
||||
href="http://svnbook.red-bean.com/svnbook/ch05s04.html#svn-ch-5-sect-6.1">Choosing
|
||||
href="http://svnbook.red-bean.com/nightly/en/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout">Choosing
|
||||
a Repository Layout</a>.</p>
|
||||
|
||||
|
||||
@ -70,10 +70,8 @@ change. You can mention this revision number in bug databases, or use
|
||||
it as an argument to <tt>svn merge</tt> should you want to undo the
|
||||
change or port it to another branch.</p>
|
||||
|
||||
<p><em>Book reference:</em> "Subversion and Changesets" sidebar,
|
||||
within <a
|
||||
href="http://svnbook.red-bean.com/svnbook/ch04s03.html">chapter
|
||||
4</a>.</p>
|
||||
<p><em>Book reference:</em> <a
|
||||
href="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.changesets">Changesets</a>.</p>
|
||||
|
||||
<!-- =================================================== -->
|
||||
|
||||
@ -91,8 +89,11 @@ and your issue-tracking database as possible:</p>
|
||||
|
||||
<!-- =================================================== -->
|
||||
|
||||
<div style="color:grey">
|
||||
<h2>Track merges manually</h2>
|
||||
|
||||
<p><em>### OBSOLETE RECOMMENDATION ###</em></p>
|
||||
|
||||
<p>When committing the result of a merge, be sure to write a
|
||||
descriptive log message that explains what was merged, something
|
||||
like:</p>
|
||||
@ -103,6 +104,7 @@ like:</p>
|
||||
href="http://svnbook.red-bean.com/svnbook/ch04s03.html#svn-ch-4-sect-3.2">Tracking
|
||||
merges manually</a>, and <a
|
||||
href="http://svnbook.red-bean.com/svnbook/ch04s04.html#svn-ch-4-sect-4.1">Merging a whole branch to another</a>.</p>
|
||||
</div>
|
||||
|
||||
<!-- =================================================== -->
|
||||
|
||||
@ -134,8 +136,7 @@ revision, and everything else is at an older revision.</li>
|
||||
</ol>
|
||||
|
||||
<p><em>Book reference:</em> <a
|
||||
href="http://svnbook.red-bean.com/svnbook/ch02s03.html#svn-ch-2-sect-3.4">The
|
||||
limitation of mixed revisions</a>.</p>
|
||||
href="http://svnbook.red-bean.com/nightly/en/svn.basic.in-action.html#svn.basic.in-action.mixedrevs">Mixed-revision working copies</a>.</p>
|
||||
|
||||
|
||||
<!-- =================================================== -->
|
||||
@ -180,39 +181,6 @@ of patient waiting while your client chugs away. You can rest
|
||||
assured, however, that unlike CVS, your large files won't incapacitate
|
||||
the server or affect other users.</p>
|
||||
|
||||
<!-- =================================================== -->
|
||||
|
||||
<h2>Work around commands that don't understand copies/renames</h2>
|
||||
|
||||
<p>When a file or directory is copied or renamed, the Subversion repository
|
||||
tracks that history. Unfortunately in Subversion 1.0, the only client
|
||||
subcommand which actually takes advantage of this feature is <tt>svn
|
||||
log</tt>. A number of other commands (such as <tt>svn diff</tt> and
|
||||
<tt>svn cat</tt>) ought to be automatically following rename-history,
|
||||
but aren't doing so yet.</p>
|
||||
|
||||
<p>In all of these cases, a basic workaround is to use <tt>'svn log
|
||||
-v'</tt> to discover the proper path within the older revision.</p>
|
||||
|
||||
<p>For example, suppose you copied <tt>/trunk</tt> to
|
||||
<tt>/branches/mybranch</tt> in revision 200, and then committed some
|
||||
changes to <tt>/branches/mybranch/foo.c</tt> in subsequent revisions.
|
||||
Now you'd like to compare revisions 80 and 250 of the file.</p>
|
||||
|
||||
<p>If you have a working copy of the branch and run <tt>svn diff
|
||||
-r80:250 foo.c</tt>, you'll see an error about
|
||||
<tt>/branches/mybranch/foo.c</tt> not existing in revision 80. To
|
||||
remedy, you would run <tt>svn log -v</tt> on your branch or file to
|
||||
discover that it was named <tt>/trunk/foo.c</tt> prior to revision 200,
|
||||
and then compare the two URLs directly:</p>
|
||||
|
||||
<pre>
|
||||
$ svn diff http://.../trunk/foo.c@80 \
|
||||
http://.../branches/mybranch/foo.c@200
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<!-- =================================================== -->
|
||||
|
||||
<h2>Know when to create branches</h2>
|
||||
|
@ -25,7 +25,9 @@
|
||||
|
||||
|
||||
import os
|
||||
import traceback
|
||||
import sys
|
||||
|
||||
import getopt
|
||||
try:
|
||||
my_getopt = getopt.gnu_getopt
|
||||
@ -64,6 +66,8 @@ def main(fname, gentype, verfname=None,
|
||||
|
||||
generator.write()
|
||||
generator.write_sqlite_headers()
|
||||
generator.write_errno_table()
|
||||
generator.write_config_keys()
|
||||
|
||||
if ('--debug', '') in other_options:
|
||||
for dep_type, target_dict in generator.graph.deps.items():
|
||||
@ -192,12 +196,6 @@ def _usage_exit(err=None):
|
||||
print(" --enable-nls")
|
||||
print(" add support for gettext localization")
|
||||
print("")
|
||||
print(" --enable-bdb-in-apr-util")
|
||||
print(" configure APR-Util to use Berkeley DB")
|
||||
print("")
|
||||
print(" --enable-ml")
|
||||
print(" enable use of ML assembler with zlib")
|
||||
print("")
|
||||
print(" --disable-shared")
|
||||
print(" only build static libraries")
|
||||
print("")
|
||||
@ -208,11 +206,18 @@ def _usage_exit(err=None):
|
||||
print(" Use static openssl")
|
||||
print("")
|
||||
print(" --vsnet-version=VER")
|
||||
print(" generate for VS.NET version VER (2002, 2003, 2005, 2008, 2010 or 2012)")
|
||||
print(" generate for VS.NET version VER (2002, 2003, 2005, 2008,")
|
||||
print(" 2010, 2012, 2013 or 2015)")
|
||||
print(" [only valid in combination with '-t vcproj']")
|
||||
print("")
|
||||
print(" -D NAME[=value]")
|
||||
print(" define NAME macro during compilation")
|
||||
print(" [only valid in combination with '-t vcproj']")
|
||||
print("")
|
||||
print(" --with-apr_memcache=DIR")
|
||||
print(" the apr_memcache sources are in DIR")
|
||||
print(" --disable-gmock")
|
||||
print(" do not use Googlemock")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@ -221,16 +226,17 @@ def __init__(self):
|
||||
self.list = []
|
||||
self.dict = {}
|
||||
|
||||
def add(self, opt, val):
|
||||
def add(self, opt, val, overwrite=True):
|
||||
if opt in self.dict:
|
||||
self.list[self.dict[opt]] = (opt, val)
|
||||
if overwrite:
|
||||
self.list[self.dict[opt]] = (opt, val)
|
||||
else:
|
||||
self.dict[opt] = len(self.list)
|
||||
self.list.append((opt, val))
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
opts, args = my_getopt(sys.argv[1:], 'st:',
|
||||
opts, args = my_getopt(sys.argv[1:], 'st:D:',
|
||||
['debug',
|
||||
'release',
|
||||
'reload',
|
||||
@ -256,23 +262,17 @@ def add(self, opt, val):
|
||||
'enable-purify',
|
||||
'enable-quantify',
|
||||
'enable-nls',
|
||||
'enable-bdb-in-apr-util',
|
||||
'enable-ml',
|
||||
'disable-shared',
|
||||
'installed-libs=',
|
||||
'vsnet-version=',
|
||||
|
||||
# Keep distributions that help by adding a path
|
||||
# working. On unix this would be filtered by
|
||||
# configure, but on Windows gen-make.py is used
|
||||
# directly.
|
||||
'with-neon=',
|
||||
'without-neon',
|
||||
'disable-gmock',
|
||||
])
|
||||
if len(args) > 1:
|
||||
_usage_exit("Too many arguments")
|
||||
except getopt.GetoptError, e:
|
||||
_usage_exit(str(e))
|
||||
except getopt.GetoptError:
|
||||
typ, val, tb = sys.exc_info()
|
||||
msg = ''.join(traceback.format_exception_only(typ, val))
|
||||
_usage_exit(msg)
|
||||
|
||||
conf = 'build.conf'
|
||||
skip = 0
|
||||
@ -306,9 +306,12 @@ def add(self, opt, val):
|
||||
gentype = val
|
||||
else:
|
||||
if opt == '--with-httpd':
|
||||
rest.add('--with-apr', os.path.join(val, 'srclib', 'apr'))
|
||||
rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util'))
|
||||
rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv'))
|
||||
rest.add('--with-apr', os.path.join(val, 'srclib', 'apr'),
|
||||
overwrite=False)
|
||||
rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util'),
|
||||
overwrite=False)
|
||||
rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv'),
|
||||
overwrite=False)
|
||||
|
||||
# Remember all options so that --reload and other scripts can use them
|
||||
opt_conf = open('gen-make.opts', 'w')
|
||||
|
@ -36,7 +36,7 @@ APU_VERSION=${APU_VERSION:-"1.5.1"}
|
||||
SERF_VERSION=${SERF_VERSION:-"1.3.8"}
|
||||
ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
|
||||
SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
|
||||
GTEST_VERSION=${GTEST_VERSION:-"1.6.0"}
|
||||
GMOCK_VERSION=${GMOCK_VERSION:-"1.6.0"}
|
||||
HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
|
||||
APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
|
||||
|
||||
@ -46,8 +46,8 @@ SERF=serf-${SERF_VERSION}
|
||||
ZLIB=zlib-${ZLIB_VERSION}
|
||||
SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
|
||||
SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
|
||||
GTEST=gtest-${GTEST_VERSION}
|
||||
GTEST_URL=http://googletest.googlecode.com/files/
|
||||
GMOCK=gmock-${GMOCK_VERSION}
|
||||
GMOCK_URL=https://googlemock.googlecode.com/files/
|
||||
|
||||
HTTPD=httpd-${HTTPD_VERSION}
|
||||
APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
|
||||
@ -67,7 +67,7 @@ APACHE_MIRROR=http://archive.apache.org/dist
|
||||
# helpers
|
||||
usage() {
|
||||
echo "Usage: $0"
|
||||
echo "Usage: $0 [ apr | serf | zlib | sqlite | gtest ] ..."
|
||||
echo "Usage: $0 [ apr | serf | zlib | sqlite | gmock ] ..."
|
||||
exit $1
|
||||
}
|
||||
|
||||
@ -122,23 +122,24 @@ get_sqlite() {
|
||||
|
||||
}
|
||||
|
||||
get_gtest() {
|
||||
test -d $BASEDIR/gtest && return
|
||||
get_gmock() {
|
||||
test -d $BASEDIR/gmock-fused && return
|
||||
|
||||
cd $TEMPDIR
|
||||
$HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
|
||||
$HTTP_FETCH ${GMOCK_URL}/${GMOCK}.zip
|
||||
cd $BASEDIR
|
||||
|
||||
unzip -q $TEMPDIR/$GTEST.zip
|
||||
unzip -q $TEMPDIR/$GMOCK.zip
|
||||
|
||||
mv $GTEST gtest
|
||||
mv $GMOCK/fused-src gmock-fused
|
||||
rm -fr $GMOCK
|
||||
}
|
||||
|
||||
# main()
|
||||
get_deps() {
|
||||
mkdir -p $TEMPDIR
|
||||
|
||||
for i in zlib serf sqlite-amalgamation apr apr-util gtest; do
|
||||
for i in zlib serf sqlite-amalgamation apr apr-util gmock-fused; do
|
||||
if [ -d $i ]; then
|
||||
echo "Local directory '$i' already exists; the downloaded copy won't be used" >&2
|
||||
fi
|
||||
|
@ -40,7 +40,7 @@ extern "C" {
|
||||
/**
|
||||
Given an apache request @a r, a @a uri, and a @a root_path to the svn
|
||||
location block, process @a uri and return many things, allocated in
|
||||
@a r->pool:
|
||||
@a pool:
|
||||
|
||||
- @a cleaned_uri: The uri with duplicate and trailing slashes removed.
|
||||
|
||||
@ -74,7 +74,25 @@ extern "C" {
|
||||
- @a relative_path: /!svn/blah/13/A/B/alpha
|
||||
- @a repos_path: A/B/alpha
|
||||
- @a trailing_slash: FALSE
|
||||
|
||||
NOTE: The returned dav_error will be also allocated in @a pool, not
|
||||
in @a r->pool.
|
||||
|
||||
@since New in 1.9
|
||||
*/
|
||||
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri2(request_rec *r,
|
||||
const char *uri_to_split,
|
||||
const char *root_path,
|
||||
const char **cleaned_uri,
|
||||
int *trailing_slash,
|
||||
const char **repos_basename,
|
||||
const char **relative_path,
|
||||
const char **repos_path,
|
||||
apr_pool_t *pool);
|
||||
|
||||
/**
|
||||
* Same as dav_svn_split_uri2() but allocates the result in @a r->pool.
|
||||
*/
|
||||
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
|
||||
const char *uri,
|
||||
const char *root_path,
|
||||
@ -87,7 +105,22 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
|
||||
|
||||
/**
|
||||
* Given an apache request @a r and a @a root_path to the svn location
|
||||
* block, set @a *repos_path to the path of the repository on disk. */
|
||||
* block, set @a *repos_path to the path of the repository on disk.
|
||||
* Perform all allocations in @a pool.
|
||||
*
|
||||
* NOTE: The returned dav_error will be also allocated in @a pool, not
|
||||
* in @a r->pool.
|
||||
*
|
||||
* @since New in 1.9
|
||||
*/
|
||||
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path2(request_rec *r,
|
||||
const char *root_path,
|
||||
const char **repos_path,
|
||||
apr_pool_t *pool);
|
||||
|
||||
/**
|
||||
* Same as dav_svn_get_repos_path2() but allocates the result in@a r->pool.
|
||||
*/
|
||||
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
|
||||
const char *root_path,
|
||||
const char **repos_path);
|
||||
|
@ -46,39 +46,19 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/** The type used by all the other atomic operations. */
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_t apr_uint32_t
|
||||
#else
|
||||
#define svn_atomic_t apr_atomic_t
|
||||
#endif
|
||||
|
||||
/** Atomically read an #svn_atomic_t from memory. */
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_read(mem) apr_atomic_read32((mem))
|
||||
#else
|
||||
#define svn_atomic_read(mem) apr_atomic_read((mem))
|
||||
#endif
|
||||
|
||||
/** Atomically set an #svn_atomic_t in memory. */
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_set(mem, val) apr_atomic_set32((mem), (val))
|
||||
#else
|
||||
#define svn_atomic_set(mem, val) apr_atomic_set((mem), (val))
|
||||
#endif
|
||||
|
||||
/** Atomically increment an #svn_atomic_t. */
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_inc(mem) apr_atomic_inc32(mem)
|
||||
#else
|
||||
#define svn_atomic_inc(mem) apr_atomic_inc(mem)
|
||||
#endif
|
||||
|
||||
/** Atomically decrement an #svn_atomic_t. */
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_dec(mem) apr_atomic_dec32(mem)
|
||||
#else
|
||||
#define svn_atomic_dec(mem) apr_atomic_dec(mem)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Atomic compare-and-swap.
|
||||
@ -91,13 +71,8 @@ extern "C" {
|
||||
* that on some platforms, the CAS function is implemented in a
|
||||
* way that is incompatible with the other atomic operations.
|
||||
*/
|
||||
#if APR_VERSION_AT_LEAST(1, 0, 0)
|
||||
#define svn_atomic_cas(mem, with, cmp) \
|
||||
apr_atomic_cas32((mem), (with), (cmp))
|
||||
#else
|
||||
#define svn_atomic_cas(mem, with, cmp) \
|
||||
apr_atomic_cas((mem), (with), (cmp))
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
@ -231,6 +231,16 @@ svn_auth__ssl_client_cert_pw_set(svn_boolean_t *done,
|
||||
svn_boolean_t non_interactive,
|
||||
apr_pool_t *pool);
|
||||
|
||||
/* Apply the specified configuration for connecting with SERVER_NAME
|
||||
to the auth baton */
|
||||
svn_error_t *
|
||||
svn_auth__make_session_auth(svn_auth_baton_t **session_auth_baton,
|
||||
const svn_auth_baton_t *auth_baton,
|
||||
apr_hash_t *config,
|
||||
const char *server_name,
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
|
||||
/**
|
||||
* Set @a *provider to an authentication provider that implements
|
||||
|
@ -173,6 +173,12 @@ typedef struct svn_cache__info_t
|
||||
* May be 0 if that information is not available.
|
||||
*/
|
||||
apr_uint64_t total_entries;
|
||||
|
||||
/** Number of index buckets with the given number of entries.
|
||||
* Bucket sizes larger than the array will saturate into the
|
||||
* highest array index.
|
||||
*/
|
||||
apr_uint64_t histogram[32];
|
||||
} svn_cache__info_t;
|
||||
|
||||
/**
|
||||
@ -251,7 +257,8 @@ svn_cache__create_memcache(svn_cache__t **cache_p,
|
||||
* Given @a config, returns an APR memcached interface in @a
|
||||
* *memcache_p allocated in @a result_pool if @a config contains entries in
|
||||
* the SVN_CACHE_CONFIG_CATEGORY_MEMCACHED_SERVERS section describing
|
||||
* memcached servers; otherwise, sets @a *memcache_p to NULL.
|
||||
* memcached servers; otherwise, sets @a *memcache_p to NULL. Use
|
||||
* @a scratch_pool for temporary allocations.
|
||||
*
|
||||
* If Subversion was not built with apr_memcache_support, then raises
|
||||
* SVN_ERR_NO_APR_MEMCACHE if and only if @a config is configured to
|
||||
@ -260,7 +267,8 @@ svn_cache__create_memcache(svn_cache__t **cache_p,
|
||||
svn_error_t *
|
||||
svn_cache__make_memcache_from_config(svn_memcache_t **memcache_p,
|
||||
svn_config_t *config,
|
||||
apr_pool_t *result_pool);
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/**
|
||||
* Creates a new membuffer cache object in @a *cache. It will contain
|
||||
@ -302,6 +310,33 @@ svn_cache__membuffer_cache_create(svn_membuffer_t **cache,
|
||||
svn_boolean_t allow_blocking_writes,
|
||||
apr_pool_t *result_pool);
|
||||
|
||||
/**
|
||||
* @defgroup Standard priority classes for #svn_cache__create_membuffer_cache.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Data in this priority class should not be removed from the cache unless
|
||||
* absolutely necessary. Use of this should be very restricted.
|
||||
*/
|
||||
#define SVN_CACHE__MEMBUFFER_HIGH_PRIORITY 10000
|
||||
|
||||
/**
|
||||
* Data in this priority class has a good chance to remain in cache unless
|
||||
* there is more data in this class than the cache's capacity. Use of this
|
||||
* as the default for all information that is costly to fetch from disk.
|
||||
*/
|
||||
#define SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY 1000
|
||||
|
||||
/**
|
||||
* Data in this priority class will be removed as soon as the cache starts
|
||||
* filling up. Use of this for ephemeral data that can easily be acquired
|
||||
* again from other sources.
|
||||
*/
|
||||
#define SVN_CACHE__MEMBUFFER_LOW_PRIORITY 100
|
||||
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* Creates a new cache in @a *cache_p, storing the data in a potentially
|
||||
* shared @a membuffer object. The elements in the cache will be indexed
|
||||
@ -310,7 +345,10 @@ svn_cache__membuffer_cache_create(svn_membuffer_t **cache,
|
||||
* serialize_func and deserialized using @a deserialize_func. Because
|
||||
* the same memcache object may cache many different kinds of values
|
||||
* form multiple caches, @a prefix should be specified to differentiate
|
||||
* this cache from other caches. @a *cache_p will be allocated in @a result_pool.
|
||||
* this cache from other caches. All entries written through this cache
|
||||
* interface will be assigned into the given @a priority class. @a *cache_p
|
||||
* will be allocated in @a result_pool. @a scratch_pool is used for
|
||||
* temporary allocations.
|
||||
*
|
||||
* If @a deserialize_func is NULL, then the data is returned as an
|
||||
* svn_stringbuf_t; if @a serialize_func is NULL, then the data is
|
||||
@ -329,8 +367,10 @@ svn_cache__create_membuffer_cache(svn_cache__t **cache_p,
|
||||
svn_cache__deserialize_func_t deserialize,
|
||||
apr_ssize_t klen,
|
||||
const char *prefix,
|
||||
apr_uint32_t priority,
|
||||
svn_boolean_t thread_safe,
|
||||
apr_pool_t *result_pool);
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/**
|
||||
* Sets @a handler to be @a cache's error handling routine. If any
|
||||
@ -374,6 +414,18 @@ svn_cache__get(void **value,
|
||||
const void *key,
|
||||
apr_pool_t *result_pool);
|
||||
|
||||
/**
|
||||
* Looks for an entry indexed by @a key in @a cache, setting @a *found
|
||||
* to TRUE if an entry has been found and FALSE otherwise. @a key may be
|
||||
* NULL in which case @a *found will be FALSE. Temporary allocations will
|
||||
* be made from @a scratch_pool.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_cache__has_key(svn_boolean_t *found,
|
||||
svn_cache__t *cache,
|
||||
const void *key,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/**
|
||||
* Stores the value @a value under the key @a key in @a cache. Uses @a
|
||||
* scratch_pool for temporary allocations. The cache makes copies of
|
||||
@ -465,13 +517,16 @@ svn_cache__get_info(svn_cache__t *cache,
|
||||
|
||||
/**
|
||||
* Return the information given in @a info formatted as a multi-line string.
|
||||
* Allocations take place in @a result_pool.
|
||||
* If @a access_only has been set, size and fill-level statistics will be
|
||||
* omitted. Allocations take place in @a result_pool.
|
||||
*/
|
||||
svn_string_t *
|
||||
svn_cache__format_info(const svn_cache__info_t *info,
|
||||
svn_boolean_t access_only,
|
||||
apr_pool_t *result_pool);
|
||||
|
||||
/* Access the process-global (singleton) membuffer cache. The first call
|
||||
/**
|
||||
* Access the process-global (singleton) membuffer cache. The first call
|
||||
* will automatically allocate the cache using the current cache config.
|
||||
* NULL will be returned if the desired cache size is 0.
|
||||
*
|
||||
@ -480,6 +535,22 @@ svn_cache__format_info(const svn_cache__info_t *info,
|
||||
struct svn_membuffer_t *
|
||||
svn_cache__get_global_membuffer_cache(void);
|
||||
|
||||
/**
|
||||
* Return total access and size stats over all membuffer caches as they
|
||||
* share the underlying data buffer. The result will be allocated in POOL.
|
||||
*/
|
||||
svn_cache__info_t *
|
||||
svn_cache__membuffer_get_global_info(apr_pool_t *pool);
|
||||
|
||||
/**
|
||||
* Remove all current contents from CACHE.
|
||||
*
|
||||
* NOTE: In a multi-threaded environment, new contents may have been put
|
||||
* into the cache by the time this function returns.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_cache__membuffer_clear(svn_membuffer_t *cache);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
|
226
contrib/subversion/subversion/include/private/svn_client_mtcc.h
Normal file
226
contrib/subversion/subversion/include/private/svn_client_mtcc.h
Normal file
@ -0,0 +1,226 @@
|
||||
/**
|
||||
* @copyright
|
||||
* ====================================================================
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* ====================================================================
|
||||
* @endcopyright
|
||||
*
|
||||
* @file svn_client_mtcc.h
|
||||
* @brief Subversion multicommand client support
|
||||
*
|
||||
* Requires: The working copy library and client library.
|
||||
* Provides: High level multicommand api.
|
||||
* Used By: Client programs, svnmucc.
|
||||
*/
|
||||
|
||||
#ifndef SVN_CLIENT_MTCC_H
|
||||
#define SVN_CLIENT_MTCC_H
|
||||
|
||||
#include "svn_client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @defgroup clnt_mtcc Multi Command Context related functions
|
||||
*
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
/** This is a structure which stores a list of repository commands
|
||||
* that can be played to a repository as a single operation
|
||||
*
|
||||
* Use svn_client__mtcc_create() to create instances
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
typedef struct svn_client__mtcc_t svn_client__mtcc_t;
|
||||
|
||||
/** Creates a new multicommand context for an operation on @a anchor_url and
|
||||
* its descendants.
|
||||
*
|
||||
* Allocate the context in @a result_pool and perform temporary allocations in
|
||||
* @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_create(svn_client__mtcc_t **mtcc,
|
||||
const char *anchor_url,
|
||||
svn_revnum_t base_revision,
|
||||
svn_client_ctx_t *ctx,
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Adds a file add operation of @a relpath to @a mtcc. If @a src_checksum
|
||||
* is not null it will be provided to the repository to verify if the file
|
||||
* was transferred successfully.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @note The current implementation keeps @a src_stream open until @a mtcc
|
||||
* is committed.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_add_file(const char *relpath,
|
||||
svn_stream_t *src_stream,
|
||||
const svn_checksum_t *src_checksum,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Adds a copy operation of the node @a src_relpath at revision @a revision
|
||||
* to @a dst_relpath to @a mtcc.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_copy(const char *src_relpath,
|
||||
svn_revnum_t revision,
|
||||
const char *dst_relpath,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Adds a delete of @a relpath to @a mtcc.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_delete(const char *relpath,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Adds an mkdir operation of @a relpath to @a mtcc.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_mkdir(const char *relpath,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
|
||||
/** Adds a move operation of the node @a src_relpath to @a dst_relpath to
|
||||
* @a mtcc.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_move(const char *src_relpath,
|
||||
const char *dst_relpath,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Adds a propset operation for the property @a propname to @a propval
|
||||
* (which can be NULL for a delete) on @a relpath to @a mtcc.
|
||||
*
|
||||
* If @a skip_checks is not FALSE Subversion defined properties are verified
|
||||
* for correctness like svn_client_propset_remote()
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_propset(const char *relpath,
|
||||
const char *propname,
|
||||
const svn_string_t *propval,
|
||||
svn_boolean_t skip_checks,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
|
||||
/** Adds an update file operation for @a relpath to @a mtcc.
|
||||
*
|
||||
* The final version of the file is provided with @a src_stream. If @a
|
||||
* src_checksum is provided it will be provided to the repository to verify
|
||||
* the final result.
|
||||
*
|
||||
* If @a base_checksum is provided it will be used by the repository to verify
|
||||
* if the base file matches this checksum.
|
||||
*
|
||||
* If @a base_stream is not NULL only the binary diff from @a base_stream to
|
||||
* @a src_stream is written to the repository.
|
||||
*
|
||||
* Perform temporary allocations in @a scratch_pool.
|
||||
*
|
||||
* @note Callers should assume that the mtcc requires @a src_stream and @a
|
||||
* base_stream to be valid until @a mtcc is committed.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_add_update_file(const char *relpath,
|
||||
svn_stream_t *src_stream,
|
||||
const svn_checksum_t *src_checksum,
|
||||
svn_stream_t *base_stream,
|
||||
const svn_checksum_t *base_checksum,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Obtains the kind of node at @a relpath in the current state of @a mtcc.
|
||||
* This value might be from the cache (in case of modifications, copies)
|
||||
* or fetched from the repository.
|
||||
*
|
||||
* If @a check_repository is TRUE, verify the node type with the repository at
|
||||
* least once and cache the result for further checks.
|
||||
*
|
||||
* When a node does not exist this functions sets @a *kind to @c svn_node_node.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_check_path(svn_node_kind_t *kind,
|
||||
const char *relpath,
|
||||
svn_boolean_t check_repository,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/** Commits all operations stored in @a mtcc as a new revision and destroys
|
||||
* @a mtcc.
|
||||
*
|
||||
* @since New in 1.9.
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__mtcc_commit(apr_hash_t *revprop_table,
|
||||
svn_commit_callback2_t commit_callback,
|
||||
void *commit_baton,
|
||||
svn_client__mtcc_t *mtcc,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
|
||||
/** @} end group: Multi Command Context related functions */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* SVN_CLIENT_MTCC_H */
|
@ -33,11 +33,58 @@
|
||||
#include "svn_client.h"
|
||||
#include "svn_types.h"
|
||||
|
||||
#include "private/svn_diff_tree.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* Set *REVNUM to the revision number identified by REVISION.
|
||||
|
||||
If REVISION->kind is svn_opt_revision_number, just use
|
||||
REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
|
||||
|
||||
Else if REVISION->kind is svn_opt_revision_committed,
|
||||
svn_opt_revision_previous, or svn_opt_revision_base, or
|
||||
svn_opt_revision_working, then the revision can be identified
|
||||
purely based on the working copy's administrative information for
|
||||
LOCAL_ABSPATH, so RA_SESSION is ignored. If LOCAL_ABSPATH is not
|
||||
under revision control, return SVN_ERR_UNVERSIONED_RESOURCE, or if
|
||||
LOCAL_ABSPATH is null, return SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED.
|
||||
|
||||
Else if REVISION->kind is svn_opt_revision_date or
|
||||
svn_opt_revision_head, then RA_SESSION is used to retrieve the
|
||||
revision from the repository (using REVISION->value.date in the
|
||||
former case), and LOCAL_ABSPATH is ignored. If RA_SESSION is null,
|
||||
return SVN_ERR_CLIENT_RA_ACCESS_REQUIRED.
|
||||
|
||||
Else if REVISION->kind is svn_opt_revision_unspecified, set
|
||||
*REVNUM to SVN_INVALID_REVNUM.
|
||||
|
||||
If YOUNGEST_REV is non-NULL, it is an in/out parameter. If
|
||||
*YOUNGEST_REV is valid, use it as the youngest revision in the
|
||||
repository (regardless of reality) -- don't bother to lookup the
|
||||
true value for HEAD, and don't return any value in *REVNUM greater
|
||||
than *YOUNGEST_REV. If *YOUNGEST_REV is not valid, and a HEAD
|
||||
lookup is required to populate *REVNUM, then also populate
|
||||
*YOUNGEST_REV with the result. This is useful for making multiple
|
||||
serialized calls to this function with a basically static view of
|
||||
the repository, avoiding race conditions which could occur between
|
||||
multiple invocations with HEAD lookup requests.
|
||||
|
||||
Else return SVN_ERR_CLIENT_BAD_REVISION.
|
||||
|
||||
Use SCRATCH_POOL for any temporary allocation. */
|
||||
svn_error_t *
|
||||
svn_client__get_revision_number(svn_revnum_t *revnum,
|
||||
svn_revnum_t *youngest_rev,
|
||||
svn_wc_context_t *wc_ctx,
|
||||
const char *local_abspath,
|
||||
svn_ra_session_t *ra_session,
|
||||
const svn_opt_revision_t *revision,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/* Return true if KIND is a revision kind that is dependent on the working
|
||||
* copy. Otherwise, return false. */
|
||||
#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
|
||||
@ -200,29 +247,6 @@ svn_client__create_status(svn_client_status_t **cst,
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/* Set *ANCESTOR_URL and *ANCESTOR_REVISION to the URL and revision,
|
||||
* respectively, of the youngest common ancestor of the two locations
|
||||
* PATH_OR_URL1@REV1 and PATH_OR_URL2@REV2. Set *ANCESTOR_RELPATH to
|
||||
* NULL and *ANCESTOR_REVISION to SVN_INVALID_REVNUM if they have no
|
||||
* common ancestor. This function assumes that PATH_OR_URL1@REV1 and
|
||||
* PATH_OR_URL2@REV2 both refer to the same repository.
|
||||
*
|
||||
* Use the authentication baton cached in CTX to authenticate against
|
||||
* the repository.
|
||||
*
|
||||
* See also svn_client__get_youngest_common_ancestor().
|
||||
*/
|
||||
svn_error_t *
|
||||
svn_client__youngest_common_ancestor(const char **ancestor_url,
|
||||
svn_revnum_t *ancestor_rev,
|
||||
const char *path_or_url1,
|
||||
const svn_opt_revision_t *revision1,
|
||||
const char *path_or_url2,
|
||||
const svn_opt_revision_t *revision2,
|
||||
svn_client_ctx_t *ctx,
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/* Get the repository location of the base node at LOCAL_ABSPATH.
|
||||
*
|
||||
* A pathrev_t wrapper around svn_wc__node_get_base().
|
||||
@ -257,20 +281,6 @@ svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
|
||||
apr_pool_t *result_pool,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/* Produce a diff with depth DEPTH between two files or two directories at
|
||||
* LOCAL_ABSPATH1 and LOCAL_ABSPATH2, using the provided diff callbacks to
|
||||
* show changes in files. The files and directories involved may be part of
|
||||
* a working copy or they may be unversioned. For versioned files, show
|
||||
* property changes, too. */
|
||||
svn_error_t *
|
||||
svn_client__arbitrary_nodes_diff(const char *local_abspath1,
|
||||
const char *local_abspath2,
|
||||
svn_depth_t depth,
|
||||
const svn_wc_diff_callbacks4_t *callbacks,
|
||||
void *callback_baton,
|
||||
svn_client_ctx_t *ctx,
|
||||
apr_pool_t *scratch_pool);
|
||||
|
||||
/* Copy the file or directory on URL in some repository to DST_ABSPATH,
|
||||
* copying node information and properties. Resolve URL using PEG_REV and
|
||||
* REVISION.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user