64bit stuff breaks in bad ways. more testing needed
This commit is contained in:
parent
5622166807
commit
0aa50eff78
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2002/08/28 14:38:25 todd Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2002/08/28 22:23:29 todd Exp $
|
||||
|
||||
COMMENT= "OpenCM change management system"
|
||||
COMMENT-docs= "OpenCM Documentation"
|
||||
@ -7,7 +7,7 @@ V= 0.1.0alpha16
|
||||
sV= -1
|
||||
DISTNAME= opencm-${V}${sV}-src
|
||||
PKGNAME= opencm-${V}
|
||||
FULLPKGNAME= opencm-${V}
|
||||
FULLPKGNAME= opencm-${V}p1
|
||||
FULLPKGNAME-docs= opencm-docs-${V}
|
||||
CATEGORIES= devel
|
||||
|
||||
|
30
devel/opencm/patches/patch-base_etc_opencm_rc
Normal file
30
devel/opencm/patches/patch-base_etc_opencm_rc
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-base_etc_opencm_rc,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/etc/opencm.rc.orig Mon Jul 8 16:29:08 2002
|
||||
+++ base/etc/opencm.rc Wed Aug 28 14:26:39 2002
|
||||
@@ -68,7 +68,7 @@ then
|
||||
fi
|
||||
|
||||
# Make sure the binary is there
|
||||
-if [ ! -x /usr/bin/opencm ]
|
||||
+if [ ! -x /usr/bin/cm ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
@@ -89,7 +89,7 @@ prog="opencm"
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
- daemon --user opencm --notify "${OPENCM_NOTIFY}" opencm server "${OPENCM_REPOSITORY}"
|
||||
+ daemon --user opencm cm --notify "${OPENCM_NOTIFY}" server "${OPENCM_REPOSITORY}"
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/opencm
|
||||
@@ -98,7 +98,7 @@ start() {
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
- killproc opencm
|
||||
+ killproc cm
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/opencm
|
61
devel/opencm/patches/patch-base_src_client_Merge_c
Normal file
61
devel/opencm/patches/patch-base_src_client_Merge_c
Normal file
@ -0,0 +1,61 @@
|
||||
$OpenBSD: patch-base_src_client_Merge_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/Merge.c.orig Mon Aug 5 21:38:03 2002
|
||||
+++ base/src/client/Merge.c Wed Aug 28 14:26:39 2002
|
||||
@@ -1208,6 +1208,10 @@ static void
|
||||
check_name_collisions(ObVec *tuples, StrVec *names)
|
||||
{
|
||||
unsigned u = 0;
|
||||
+ OC_bool collisions = FALSE; /* until proven otherwise */
|
||||
+
|
||||
+ /* Make sure names is sorted, since we use bsearch... */
|
||||
+ strvec_sort(names);
|
||||
|
||||
/* Make a simulated deletion pass of the fsnames that are either
|
||||
going to disappear entirely (due to being deleted or renamed) or
|
||||
@@ -1226,9 +1230,6 @@ check_name_collisions(ObVec *tuples, Str
|
||||
continue;
|
||||
|
||||
assert(mt->result);
|
||||
-
|
||||
- /* ws_Enumerate returns a sorted vector, so we can use bsearch()
|
||||
- here: */
|
||||
assert(mt->ws->cur_fsName);
|
||||
assert(mt->finalName);
|
||||
{
|
||||
@@ -1251,12 +1252,18 @@ check_name_collisions(ObVec *tuples, Str
|
||||
assert(mt->result);
|
||||
assert(mt->finalName);
|
||||
|
||||
- if (strvec_bsearch(names, mt->finalName) >= 0)
|
||||
- THROW(ExObjectExists,
|
||||
- format("Merge/Update would clobber \"%s\""
|
||||
- " -- move it out of the way.",
|
||||
- mt->finalName));
|
||||
+ if (strvec_bsearch(names, mt->finalName) >= 0) {
|
||||
+ collisions = TRUE;
|
||||
+ report(0,"Merge/Update would clobber \"%s\""
|
||||
+ " -- move it out of the way.\n", mt->finalName);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ /* Wait until all collisions are reported before throwing the
|
||||
+ exception. This allows the user to resolve all of them at
|
||||
+ once. */
|
||||
+ if (collisions)
|
||||
+ THROW(ExObjectExists, "Merge/Update name collisions!");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1535,7 +1542,11 @@ ws_mergeFrom(WorkSpace *ws, Repository *
|
||||
have to do this after executing the merge plan, because the
|
||||
'merge' or 'update' command may add new files to the Workspace
|
||||
and/or may rename current Workspace files. */
|
||||
- names = ws_Enumerate(ws, WSE_UNFILTERED, 0); /* get EVERYTHING */
|
||||
+ names = strvec_create();
|
||||
+
|
||||
+ /* Enumerate the filesystem space, getting everything. Then do a
|
||||
+ name collision check against that list. */
|
||||
+ ws_EnumeratePath(ws, names, path_curdir(), WSE_UNFILTERED, 0);
|
||||
check_name_collisions(tuples, names);
|
||||
|
||||
report(1, "No name collisions\n"
|
290
devel/opencm/patches/patch-base_src_client_WorkSpace_c
Normal file
290
devel/opencm/patches/patch-base_src_client_WorkSpace_c
Normal file
@ -0,0 +1,290 @@
|
||||
$OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/WorkSpace.c.orig Mon Aug 5 20:07:37 2002
|
||||
+++ base/src/client/WorkSpace.c Wed Aug 28 14:26:39 2002
|
||||
@@ -193,7 +193,6 @@ ws_Init(struct command *cmd, const char
|
||||
*/
|
||||
|
||||
WorkSpace *ws = GC_MALLOC(sizeof(WorkSpace));
|
||||
- SER_MODIFIED(ws);
|
||||
|
||||
/* Eventually we will support layered projects, and it will be
|
||||
possible for rootPath to be non-null. Until then, just barf if
|
||||
@@ -248,8 +247,6 @@ ws_Init(struct command *cmd, const char
|
||||
void
|
||||
ws_Connect(WorkSpace *ws, PubKey *pk)
|
||||
{
|
||||
- SER_MODIFIED(ws);
|
||||
-
|
||||
if (ws->r == NULL)
|
||||
THROW(ExNoConnect, "No repository specified in Workspace.");
|
||||
|
||||
@@ -270,7 +267,7 @@ ws_Connect(WorkSpace *ws, PubKey *pk)
|
||||
void
|
||||
ws_RewriteWorkspace(WorkSpace *ws)
|
||||
{
|
||||
- SER_MODIFIED(ws);
|
||||
+ SER_MODIFIED(ws->pc);
|
||||
|
||||
if (ws->projPath == 0) {
|
||||
const char *scratchPath;
|
||||
@@ -322,19 +319,31 @@ ws_AddFile(WorkSpace *ws, const char *fn
|
||||
WsEntity *wse = pendingchange_FindEntity(ws->pc,fnm);
|
||||
|
||||
if (wse) {
|
||||
- /* First, complain (rather aggressively) if user is trying to
|
||||
- cancel a file that was deleted by a 'merge' operation. */
|
||||
- if ((wse->flags & NEF_MERGED) && (wse->flags & NEF_DELETED))
|
||||
- THROW(ExBadValue,
|
||||
- format("File \"%s\"was just merged and I can't let you "
|
||||
- "partially undo a merge. Use \"%s revert\" to "
|
||||
- "undo the merge first.", fnm, path_tail(appInvokedName)));
|
||||
+ /* If NEF_JADD and NEF_DELETED, then change it back to just NEF_JADD */
|
||||
+ if ((wse->flags & NEF_JADD) && (wse->flags & NEF_DELETED)) {
|
||||
+ wse->flags &= ~ NEF_DELETED;
|
||||
+ SER_MODIFIED(wse);
|
||||
+ }
|
||||
|
||||
- else if (wse->flags & NEF_DELETED)
|
||||
- wse->flags &= ~ NEF_DELETED; /* cancel a previous 'rm' */
|
||||
- else if (wse->flags & NEF_CONDDEL)
|
||||
+ /* If NEF_MERGED and NEF_DELETED, then just override the deletion
|
||||
+ of this Entity: */
|
||||
+ else if ((wse->flags & NEF_MERGED) && (wse->flags & NEF_DELETED)) {
|
||||
+ wse->flags &= ~ (NEF_MERGED | NEF_DELETED);
|
||||
+ SER_MODIFIED(wse);
|
||||
+ }
|
||||
+
|
||||
+ /* If just NEF_DELETED, cancel that: */
|
||||
+ else if (wse->flags & NEF_DELETED) {
|
||||
+ wse->flags &= ~ NEF_DELETED;
|
||||
+ SER_MODIFIED(wse);
|
||||
+ }
|
||||
+
|
||||
+ /* If just NEF_CONDDEL, cancel that: */
|
||||
+ else if (wse->flags & NEF_CONDDEL) {
|
||||
wse->flags &= ~ NEF_CONDDEL; /* cancel a previous CONDDEL set by
|
||||
'merge' */
|
||||
+ SER_MODIFIED(wse);
|
||||
+ }
|
||||
/* If the object is already in the workspace, silently ignore.
|
||||
This is needed because ws_EnumeratePath is promiscuous. */
|
||||
}
|
||||
@@ -356,47 +365,32 @@ ws_AddFile(WorkSpace *ws, const char *fn
|
||||
return wse;
|
||||
}
|
||||
|
||||
-#if 0
|
||||
-WsEntity *
|
||||
-ws_AddFile(WorkSpace *ws, const char *fnm)
|
||||
-{
|
||||
- WsEntity *wse = wsentity_addFromFile(ws->pc, fnm, opt_eType);
|
||||
-
|
||||
- pendingchange_InsertEntity(ws->pc, wse);
|
||||
-
|
||||
- SER_MODIFIED(wse);
|
||||
-
|
||||
- return wse;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
void
|
||||
ws_RemoveFile(WorkSpace *ws, const char *fnm)
|
||||
{
|
||||
WsEntity *wse = pendingchange_FindEntity(ws->pc,fnm);
|
||||
|
||||
if (wse) {
|
||||
- /* First, complain (rather aggressively) if user is trying to remove
|
||||
- a file that was either added or touched by a 'merge'
|
||||
- operation. */
|
||||
- if (wse->flags & NEF_JADD ||
|
||||
- (wse->flags & NEF_MERGED && (wse->flags & NEF_DELETED) == 0))
|
||||
- THROW(ExBadValue,
|
||||
- format("File \"%s\" was just merged and I can't let you "
|
||||
- "partially undo a merge. Use \"%s revert\" to "
|
||||
- "undo the merge first.", fnm, path_tail(appInvokedName)));
|
||||
-
|
||||
+ /* If this is a mergespace orphan that was just added to the
|
||||
+ Workspace from 'merge', (NEF_MERGED and NEF_JADD) change its
|
||||
+ state to (NEF_MERGED | NEF_JADD | NEF_DELETED). This allows
|
||||
+ user to be wishy-washy and change this entity back to
|
||||
+ (NEF_MERGED | NEF_JADD) if he wants. */
|
||||
+ if (wse->flags & NEF_JADD && wse->flags & NEF_MERGED) {
|
||||
+ wse->flags |= NEF_DELETED;
|
||||
+ wsentity_ReportStatus(wse);
|
||||
+ SER_MODIFIED(wse);
|
||||
+ }
|
||||
/* If WsEntity is marked NEF_ADDED, remove it from PendingChange,
|
||||
- but leave the actual file in place. This will result in that
|
||||
- file becoming "unknown" to the 'status' command. */
|
||||
- if (wse->flags & NEF_ADDED) {
|
||||
+ but leave the actual file in place. This will result in that
|
||||
+ file becoming "unknown" to the 'status' command. */
|
||||
+ else if (wse->flags & NEF_ADDED) {
|
||||
pendingchange_RemoveEntity(ws->pc, wse);
|
||||
xprintf("%s %10d %s\n",
|
||||
"[ forget ]",
|
||||
wse->lk_length,
|
||||
wse->cur_fsName);
|
||||
SER_MODIFIED(ws->pc);
|
||||
- SER_MODIFIED(ws);
|
||||
}
|
||||
else if (wse->flags & NEF_DELETED)
|
||||
report(0, "File is already marked for deletion.\n");
|
||||
@@ -410,6 +404,7 @@ ws_RemoveFile(WorkSpace *ws, const char
|
||||
wse->flags |= NEF_DELETED;
|
||||
|
||||
SER_MODIFIED(wse);
|
||||
+ wsentity_ReportStatus(wse);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -507,7 +502,8 @@ ws_EnumeratePath(WorkSpace *ws,
|
||||
{
|
||||
/* Make sure 'path' is relative to the Workspace top dir, since
|
||||
that's how everything is processed */
|
||||
- path = ws_NormalizePath(ws, path);
|
||||
+ if (flags & WSE_NORMALIZE)
|
||||
+ path = ws_NormalizePath(ws, path);
|
||||
|
||||
/* If we are asked on the command line to enumerate a file, we need
|
||||
to apply the user-supplied filter in all cases. */
|
||||
@@ -523,12 +519,32 @@ ws_EnumeratePath(WorkSpace *ws,
|
||||
}
|
||||
|
||||
StrVec *
|
||||
-ws_Enumerate(WorkSpace *ws, unsigned flags, OC_bool (*filter)(WorkSpace *, const char *))
|
||||
+ws_EnumerateWsEnts(WorkSpace *ws, StrVec *regexpVec)
|
||||
{
|
||||
+ unsigned u, j;
|
||||
StrVec *names = strvec_create();
|
||||
-
|
||||
- ws_EnumeratePath(ws, names, path_curdir(), flags, filter);
|
||||
|
||||
+ if (regexpVec) strvec_sort(regexpVec);
|
||||
+
|
||||
+ for (u = 0; u < vec_size(ws->pc->entSet); u++) {
|
||||
+ WsEntity *wse = (WsEntity *) vec_fetch(ws->pc->entSet, u);
|
||||
+
|
||||
+ if (regexpVec == NULL || strvec_bsearch(regexpVec, wse->cur_fsName) >= 0) {
|
||||
+ strvec_append(names, wse->cur_fsName);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /* In some cases, "names" can contain a glob expression, such as
|
||||
+ the name of a subdir (which may or may not exist). Here's
|
||||
+ where we handle that. */
|
||||
+ for (j = 0; j < vec_size(regexpVec); j++) {
|
||||
+ const char *glob_expr = vec_fetch(regexpVec, j);
|
||||
+
|
||||
+ if (glob_match(wse->cur_fsName, glob_expr, GM_FS_COMPONENT))
|
||||
+ strvec_append(names, wse->cur_fsName);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
strvec_sort(names);
|
||||
|
||||
return names;
|
||||
@@ -539,9 +555,11 @@ ws_PruneWorkspace(WorkSpace *ws)
|
||||
{
|
||||
/* Grab an unfiltered list of directories: */
|
||||
|
||||
- StrVec *s = ws_Enumerate(ws, WSE_DIRS, 0);
|
||||
+ StrVec *s = strvec_create();
|
||||
unsigned u;
|
||||
|
||||
+ ws_EnumeratePath(ws, s, path_curdir(), WSE_DIRS, 0);
|
||||
+
|
||||
strvec_sort(s);
|
||||
|
||||
/* This is sleazy. We simply rely on the fact that rmdir() fails
|
||||
@@ -573,7 +591,7 @@ ws_BuildPendingChange(WorkSpace *ws,
|
||||
oc_uint64_t nRevs)
|
||||
{
|
||||
ws->pc = pendingchange_create(r, branchURI, nRevs);
|
||||
- SER_MODIFIED(ws);
|
||||
+ SER_MODIFIED(ws->pc);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -655,7 +673,6 @@ ws_RestoreFiles(WorkSpace *ws, unsigned
|
||||
went->lk_modTime = 0; /* force modify recomputation */
|
||||
SER_MODIFIED(went);
|
||||
SER_MODIFIED(ws->pc);
|
||||
- SER_MODIFIED(ws);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,14 +737,13 @@ ws_Revert(WorkSpace *ws)
|
||||
oc_uint64_t nRevs = ws->pc->nRevisions;
|
||||
|
||||
ws->pc = pendingchange_create(ws->r, branchURI, nRevs);
|
||||
- SER_MODIFIED(ws);
|
||||
+ SER_MODIFIED(ws->pc);
|
||||
}
|
||||
|
||||
ws_RestoreFiles(ws, WSR_CHECKCOLLIDE|WSR_FORCE);
|
||||
|
||||
ws->pc->mergedChange = 0;
|
||||
SER_MODIFIED(ws->pc);
|
||||
- SER_MODIFIED(ws);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -735,7 +751,12 @@ ws_Populate(WorkSpace *ws)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
- StrVec *names = ws_Enumerate(ws, WSE_NORMAL, 0);
|
||||
+ StrVec *names = strvec_create();
|
||||
+
|
||||
+ ws_EnumeratePath(ws, names, path_curdir(),
|
||||
+ WSE_FILES | WSE_FILTER, /* don't normalize and NO
|
||||
+ symlinks! */
|
||||
+ 0);
|
||||
|
||||
for (i = 0; i < vec_size(names); i++) {
|
||||
const char *relpath = vec_fetch(names,i);
|
||||
@@ -750,7 +771,7 @@ ws_Populate(WorkSpace *ws)
|
||||
}
|
||||
}
|
||||
|
||||
- SER_MODIFIED(ws);
|
||||
+ SER_MODIFIED(ws->pc);
|
||||
}
|
||||
|
||||
static OC_bool
|
||||
@@ -843,7 +864,8 @@ ws_Rename(WorkSpace *ws, const char *old
|
||||
non-OpenCM files as well as workspace entities, and it's quite
|
||||
astonishing how many ways there are for these to collide. */
|
||||
|
||||
- fsvec = ws_Enumerate(ws, WSE_FILES|WSE_SYMLINKS, 0);
|
||||
+ fsvec = strvec_create();
|
||||
+ ws_EnumeratePath(ws, fsvec, path_curdir(), WSE_FILES|WSE_SYMLINKS, 0);
|
||||
strvec_sort(fsvec);
|
||||
|
||||
/* First, go through the OpenCM workspace entries: */
|
||||
@@ -1034,7 +1056,7 @@ ws_Commit(WorkSpace *ws, StrVec *names)
|
||||
*/
|
||||
|
||||
pendingchange_addNote(ws->pc, opt_Message);
|
||||
- SER_MODIFIED(ws);
|
||||
+ SER_MODIFIED(ws->pc);
|
||||
|
||||
/* Smash opt_Message to point to the result of the combination in
|
||||
* order to preserve the silent commit behavior:
|
||||
@@ -1232,7 +1254,6 @@ ws_Commit(WorkSpace *ws, StrVec *names)
|
||||
ws->pc->isSorted = FALSE;
|
||||
|
||||
SER_MODIFIED(ws->pc);
|
||||
- SER_MODIFIED(ws); /* FIX: ws isn't a Serializable. ??? */
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1278,7 +1299,6 @@ ws_Update(WorkSpace *ws)
|
||||
ws->pc->baseCmtInfoName = topChange->commitInfoTrueName;
|
||||
|
||||
SER_MODIFIED(ws->pc);
|
||||
- SER_MODIFIED(ws);
|
||||
}
|
||||
|
||||
void
|
36
devel/opencm/patches/patch-base_src_client_WorkSpace_h
Normal file
36
devel/opencm/patches/patch-base_src_client_WorkSpace_h
Normal file
@ -0,0 +1,36 @@
|
||||
$OpenBSD: patch-base_src_client_WorkSpace_h,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/WorkSpace.h.orig Mon Aug 5 20:07:37 2002
|
||||
+++ base/src/client/WorkSpace.h Wed Aug 28 14:26:39 2002
|
||||
@@ -76,19 +76,25 @@ void ws_Revert(WorkSpace *);
|
||||
|
||||
void ws_RestoreFiles(WorkSpace *, unsigned flags);
|
||||
|
||||
-#define WSE_FILTER 0x1u
|
||||
-#define WSE_FILES 0x2u
|
||||
-#define WSE_DIRS 0x4u
|
||||
-#define WSE_SYMLINKS 0x8u
|
||||
+#define WSE_FILTER 0x1u /* Apply directory-level filters */
|
||||
+#define WSE_FILES 0x2u /* Looking for files only */
|
||||
+#define WSE_DIRS 0x4u /* Include subdirs */
|
||||
+#define WSE_SYMLINKS 0x8u /* Include symbolic links */
|
||||
+#define WSE_NORMALIZE 0x10u /* Make path relative to ws top dir */
|
||||
|
||||
-#define WSE_NORMAL (WSE_FILES|WSE_SYMLINKS|WSE_FILTER)
|
||||
-#define WSE_UNFILTERED (WSE_FILES|WSE_SYMLINKS)
|
||||
+#define WSE_STANDARD (WSE_FILES|WSE_FILTER|WSE_NORMALIZE)
|
||||
+#define WSE_UNFILTERED (WSE_FILES|WSE_DIRS|WSE_SYMLINKS)
|
||||
|
||||
+/* Used to enumerate actual files, as opposed to WsEntity objects. */
|
||||
void ws_EnumeratePath(WorkSpace *, StrVec *names, const char *path,
|
||||
unsigned flags,
|
||||
OC_bool (*filter)(WorkSpace *, const char *));
|
||||
|
||||
-StrVec *ws_Enumerate(WorkSpace *, unsigned flags, OC_bool (*fn)(WorkSpace *, const char *));
|
||||
+/* Used to enumerate the WsEntity objects, as opposed to actual
|
||||
+ files. The 'regexpVec' argument is a list of regular expressions
|
||||
+ against which to filter the WsEntities (based on their
|
||||
+ cur_fsName). */
|
||||
+StrVec *ws_EnumerateWsEnts(WorkSpace *, StrVec *regexpVec);
|
||||
|
||||
void ws_Commit(WorkSpace *ws, StrVec *names);
|
||||
void ws_Update(WorkSpace *ws);
|
53
devel/opencm/patches/patch-base_src_client_WsEntity_c
Normal file
53
devel/opencm/patches/patch-base_src_client_WsEntity_c
Normal file
@ -0,0 +1,53 @@
|
||||
$OpenBSD: patch-base_src_client_WsEntity_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/WsEntity.c.orig Mon Aug 5 20:06:46 2002
|
||||
+++ base/src/client/WsEntity.c Wed Aug 28 14:26:39 2002
|
||||
@@ -246,7 +246,6 @@ wsentity_fromEntity(const Entity *e)
|
||||
static const char *
|
||||
wsentity_status(WsEntity *wse)
|
||||
{
|
||||
- /* FIX: Report change in executable status too */
|
||||
if (wse->flags == 0)
|
||||
return "[same ]";
|
||||
else if (wse->flags & NEF_MISSING)
|
||||
@@ -273,11 +272,11 @@ wsentity_ReportStatus(WsEntity *wse_u)
|
||||
wse_u->cur_fsName);
|
||||
|
||||
/* Display old name */
|
||||
- if (wse_u->flags & NEF_RENAMED)
|
||||
+ if ((wse_u->flags & NEF_RENAMED) && opt_Verbosity >= 1)
|
||||
report(0, " Name was: \"%s\"\n", wse_u->old->fsName);
|
||||
|
||||
/* Display status of executable bit */
|
||||
- if (wse_u->flags & NEF_PERMS) {
|
||||
+ if ((wse_u->flags & NEF_PERMS) && opt_Verbosity >= 1) {
|
||||
if (wse_u->cur_entityPerms & EPRM_EXEC)
|
||||
xprintf(" File is executable.\n");
|
||||
else
|
||||
@@ -420,9 +419,8 @@ wsentity_RecomputeStatus(WsEntity *wse)
|
||||
}
|
||||
}
|
||||
|
||||
- /* If NEF_JADD, definitely can't be NEF_DELETED and can't be NEF_ADDED*/
|
||||
+ /* If NEF_JADD, definitely can't be NEF_ADDED*/
|
||||
if (wse->flags & NEF_JADD) {
|
||||
- assert( (wse->flags & NEF_DELETED) == 0 );
|
||||
assert( (wse->flags & NEF_ADDED) == 0 );
|
||||
}
|
||||
|
||||
@@ -444,7 +442,6 @@ wsentity_RecomputeStatus(WsEntity *wse)
|
||||
/* NOTE: We continue to track modification on deleted things. */
|
||||
if (wse->flags & NEF_DELETED) {
|
||||
assert( (wse->flags & NEF_ADDED) == 0 );
|
||||
- assert( (wse->flags & NEF_JADD) == 0 );
|
||||
}
|
||||
|
||||
#if 0
|
||||
@@ -531,8 +528,6 @@ wsentity_UploadTo(WsEntity *wse,
|
||||
|
||||
assert(nmequal(wse->lk_contentTrueName, wse->old->contentTrueName));
|
||||
assert(wse->lk_length == wse->old->length);
|
||||
-
|
||||
- /* FIX: update the predecessor stuff here */
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-base_src_client_WsEntity_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/client/WsEntity.h.orig Mon Aug 5 20:06:46 2002
|
||||
+++ base/src/client/WsEntity.h Tue Aug 27 12:25:26 2002
|
||||
@@ -181,7 +181,7 @@ struct WsEntity {
|
||||
unsigned flags;
|
||||
const char *cur_fsName;
|
||||
unsigned char cur_entityType;
|
||||
- unsigned long cur_entityPerms;
|
||||
+ u_int32_t cur_entityPerms;
|
||||
const char *cur_mergeParent;
|
||||
const char *cur_mergeParentChange;
|
||||
|
||||
@@ -190,7 +190,7 @@ struct WsEntity {
|
||||
believe them unless you have recently recomputed them via
|
||||
wsentity_RecomputeStatus(). */
|
||||
const char *lk_contentTrueName;
|
||||
- unsigned long lk_length;
|
||||
+ u_int32_t lk_length;
|
||||
|
||||
/* Last known modification time. This is used to avoid running the
|
||||
expensive SHA-1 check in wsentity_RecomputeStatus(). If the mod
|
@ -1,12 +1,180 @@
|
||||
$OpenBSD: patch-base_src_client_browse_Browse_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
$OpenBSD: patch-base_src_client_browse_Browse_c,v 1.2 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/browse/Browse.c.orig Mon Jul 22 02:02:51 2002
|
||||
+++ base/src/client/browse/Browse.c Tue Aug 27 12:25:26 2002
|
||||
@@ -101,7 +101,7 @@ uri_encode(const char *s)
|
||||
*to++ = *from;
|
||||
}
|
||||
else {
|
||||
- unsigned long c = ((unsigned)*from) & 0xffu;
|
||||
+ u_int32_t c = ((unsigned)*from) & 0xffu;
|
||||
+++ base/src/client/browse/Browse.c Wed Aug 28 14:26:40 2002
|
||||
@@ -276,6 +276,11 @@ show_files(SDR_stream *out, Repository *
|
||||
|
||||
for (w = 0; w < vec_size(ev); w++) {
|
||||
const FileEntry *fe = vec_fetch(ev, w);
|
||||
+ const char *email = fe->u ? pubkey_GetEmail(fe->u->pubKey) : "??";
|
||||
+ const char *author = email;
|
||||
+ if (fe->u)
|
||||
+ author = format(LINK("/opencm/everyone/%s", CONTENT("%s")),
|
||||
+ email, email);
|
||||
|
||||
if (last && strcmp(fe->name, last) == 0)
|
||||
continue;
|
||||
@@ -292,8 +297,7 @@ show_files(SDR_stream *out, Repository *
|
||||
stream_printf(out, "<td>" "%c" "</td>", fe->isDir ? ' ' : fe->e->entityType);
|
||||
stream_printf(out, "<td>" "%s" "</td>",
|
||||
fe->ci ? xlate_time(fe->ci->time) : "");
|
||||
- stream_printf(out, "<td>" "%s" "</td>",
|
||||
- fe->u ? pubkey_GetEmail(fe->u->pubKey) : "??");
|
||||
+ stream_printf(out, "<td>" "%s" "</td>", author);
|
||||
|
||||
stream_printf(out, "</tr>");
|
||||
}
|
||||
@@ -303,6 +307,19 @@ show_files(SDR_stream *out, Repository *
|
||||
|
||||
}
|
||||
|
||||
+static const char *
|
||||
+page_header(const char *title)
|
||||
+{
|
||||
+ return format("<head><title>%s</title>"
|
||||
+ "<style type=\"text/css\"> <!--"
|
||||
+ "A { text-decoration: none }"
|
||||
+ "A:visited { text-decoration: none; color: blue }"
|
||||
+ "A:hover { text-decoration: none; color: red }"
|
||||
+ "A:active { text-decoration: none; color: blue }"
|
||||
+ "--></style>"
|
||||
+ "</head>\n");
|
||||
+}
|
||||
+
|
||||
static void
|
||||
show_html(SDR_stream *out, Repository *repos, Resolution *res,
|
||||
const char *thisPageURI)
|
||||
@@ -318,7 +335,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
User *u = (User *) res->tail;
|
||||
const char *u_s = u ? pubkey_GetEmail(u->pubKey) : "??";
|
||||
|
||||
- stream_printf(out, "<head><title>User %s</title></head>\n", u_s);
|
||||
+ stream_printf(out, page_header(format("User %s", u_s)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "User<br>%s\n", u_s);
|
||||
@@ -431,7 +448,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
Directory *dir = (Directory *) res->tail;
|
||||
unsigned u;
|
||||
|
||||
- stream_printf(out, "<head><title>Directory %s</title></head>\n", decodedURI);
|
||||
+ stream_printf(out, page_header(format("Directory %s", decodedURI)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Directory %s<br>", decodedURI);
|
||||
@@ -473,7 +490,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
|
||||
stream_printf(out, "<tr valign=\"top\">");
|
||||
|
||||
- stream_printf(out, "<td>%s%s</ty>",
|
||||
+ stream_printf(out, "<td>%s%s</td>",
|
||||
(m && (m->flags & MF_FROZEN)) ? "F" : "",
|
||||
(m && (m->flags & MF_NOTRAIL)) ? "N" : "");
|
||||
|
||||
@@ -481,11 +498,15 @@ show_html(SDR_stream *out, Repository *r
|
||||
thisPageURI,
|
||||
uri_encode(de->key), de->key);
|
||||
if (s) {
|
||||
- stream_printf(out, "<td>%s</ty>", xunsigned64_str(m->nRevisions));
|
||||
- stream_printf(out, "<td>%s</ty>", s->ser_type->tyName);
|
||||
- stream_printf(out, "<td>%s</ty>", xlate_time(rev->reviseTime));
|
||||
- stream_printf(out, "<td>%s</ty>",
|
||||
- u ? pubkey_GetEmail(u->pubKey) : "???");
|
||||
+ const char *email = u ? pubkey_GetEmail(u->pubKey) : "???";
|
||||
+ const char *author = email;
|
||||
+ if (u)
|
||||
+ author = format(LINK("/opencm/everyone/%s", CONTENT("%s")),
|
||||
+ email, email);
|
||||
+ stream_printf(out, "<td>%s</td>", xunsigned64_str(m->nRevisions));
|
||||
+ stream_printf(out, "<td>%s</td>", s->ser_type->tyName);
|
||||
+ stream_printf(out, "<td>%s</td>", xlate_time(rev->reviseTime));
|
||||
+ stream_printf(out, "<td>%s</td>", author);
|
||||
}
|
||||
else {
|
||||
stream_printf(out, "<td colspan='5'><em>inaccessable</em></td>");
|
||||
@@ -505,7 +526,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
Group *grp = (Group *) res->tail;
|
||||
unsigned u;
|
||||
|
||||
- stream_printf(out, "<head><title>Group %s</title></head>\n", decodedURI);
|
||||
+ stream_printf(out, page_header(format("Group %s", decodedURI)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Group<br>%s\n", decodedURI);
|
||||
@@ -563,7 +584,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
(Buffer *)repos_GetEntity(repos, res->m->uri,
|
||||
e->contentTrueName);
|
||||
|
||||
- stream_printf(out, "<head><title>File %s</title></head>\n", res->fp_frag);
|
||||
+ stream_printf(out, page_header(format("File %s", res->fp_frag)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "File %s\n", res->fp_frag);
|
||||
@@ -599,7 +620,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
oc_uint64_t last = res->m->nRevisions - 1;
|
||||
oc_uint64_t first = (last < 20) ? 0 : last - 19;
|
||||
|
||||
- stream_printf(out, "<head><title>Branch %s</title></head>\n", res->fp_frag);
|
||||
+ stream_printf(out, page_header(format("Branch %s", res->fp_frag)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Branch %s\n", res->fp_frag);
|
||||
@@ -636,6 +657,8 @@ show_html(SDR_stream *out, Repository *r
|
||||
TRY {
|
||||
u = repos_GetEntity(repos, res->m->uri, rev->revisor);
|
||||
userName = pubkey_GetEmail(u->pubKey);
|
||||
+ userName = format(LINK("/opencm/everyone/%s", CONTENT("%s")),
|
||||
+ userName, userName);
|
||||
}
|
||||
DEFAULT(ex) {
|
||||
}
|
||||
@@ -669,7 +692,7 @@ show_html(SDR_stream *out, Repository *r
|
||||
(CommitInfo *)repos_GetEntity(repos, res->m->uri,
|
||||
chg->commitInfoTrueName);
|
||||
|
||||
- stream_printf(out, "<head><title>Commit %s</title></head>\n", res->fp_frag);
|
||||
+ stream_printf(out, page_header(format("Commit %s", res->fp_frag)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Commit %s (%s)\n", res->fp_frag, xunsigned64_str(ver->rev));
|
||||
@@ -698,9 +721,8 @@ show_html(SDR_stream *out, Repository *r
|
||||
|
||||
const char *revNo = xunsigned64_str(fsDir->rev);
|
||||
|
||||
- stream_printf(out, "<head><title>Commit %s, %s/</title></head>\n", revNo,
|
||||
- fsDir->path);
|
||||
-
|
||||
+ stream_printf(out, page_header(format("Commit %s, %s/",
|
||||
+ revNo, fsDir->path)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Commit %s, %s/\n", revNo, fsDir->path);
|
||||
@@ -722,7 +744,8 @@ show_html(SDR_stream *out, Repository *r
|
||||
{
|
||||
const char *tname = res->tail->ser_type->tyName;
|
||||
|
||||
- stream_printf(out, "<head><title>Unhandled %s</title></head>\n", res->fp_frag);
|
||||
+ stream_printf(out, page_header(format("Unhandled %s",
|
||||
+ res->fp_frag)));
|
||||
stream_printf(out, BODY);
|
||||
stream_printf(out, "<center>\n");
|
||||
stream_printf(out, "Unhandled type %s\n", tname);
|
||||
@@ -771,7 +794,7 @@ opencm_browse(WorkSpace *ws, int argc, c
|
||||
|
||||
if (v == 0 || vec_size(v) != 1) {
|
||||
xprintf("<html>\n");
|
||||
- xprintf("<head><title>%s</title></head>\n", arg);
|
||||
+ xprintf(page_header(arg));
|
||||
xprintf("<body BGCOLOR='#ffeedd' text='#000000' link='#0000ee'"
|
||||
" vlink='#551a8b' alink='#ff0000'>\n");
|
||||
xprintf("<center>\n");
|
||||
@@ -796,9 +819,7 @@ opencm_browse(WorkSpace *ws, int argc, c
|
||||
ok = FALSE;
|
||||
|
||||
xprintf("<html>");
|
||||
- xprintf("<head>");
|
||||
- xprintf("<title>EXCEPTION!</title>");
|
||||
- xprintf("</head>");
|
||||
+ xprintf(page_header("EXCEPTION!"));
|
||||
xprintf("<body>");
|
||||
xprintf("<pre>");
|
||||
|
||||
*to++ = '%';
|
||||
*to++ = hex[c >> 4];
|
||||
|
@ -1,6 +1,26 @@
|
||||
$OpenBSD: patch-base_src_client_command_c,v 1.3 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/command.c.orig Mon Aug 5 16:03:03 2002
|
||||
+++ base/src/client/command.c Tue Aug 27 12:30:49 2002
|
||||
@@ -154,7 +154,7 @@ struct command top_cmds[] = {
|
||||
+++ base/src/client/command.c Wed Aug 28 14:26:40 2002
|
||||
@@ -100,6 +100,8 @@ struct command create_cmds[] = {
|
||||
"create-branch.help" },
|
||||
{ "group", opencm_create_group, 1, CF_NAME, 0,
|
||||
"create-group.help" },
|
||||
+ { "project", opencm_create_project, 1, CF_NAME, 0,
|
||||
+ "create-project.help" },
|
||||
{ "repository", opencm_create_repository, 3,
|
||||
CF_NOCONNECT|CF_ADMIN, 0,
|
||||
"create-repository.help" },
|
||||
@@ -143,8 +145,7 @@ struct command show_workspace_cmds[] = {
|
||||
};
|
||||
|
||||
struct command show_cmds[] = {
|
||||
- { "object", opencm_show_object, 1, CF_OPTARGS, 0,
|
||||
- "show-object.help" },
|
||||
+ { "object", opencm_show_object, 1, CF_OPTARGS, 0, 0 },
|
||||
{ "workspace", 0, 0, 0, show_workspace_cmds, 0 },
|
||||
{ (char *)0 }
|
||||
};
|
||||
@@ -154,7 +155,7 @@ struct command top_cmds[] = {
|
||||
{ "add", opencm_add_file, 1, CF_OPTARGS|CF_NOCONNECT|CF_WSINIT, 0,
|
||||
"add.help" },
|
||||
{ "adduser", opencm_add_user, 2, CF_ADMIN, 0,
|
||||
@ -9,3 +29,52 @@
|
||||
{ "bind", opencm_bind, 2, 0, 0,
|
||||
"bind.help" },
|
||||
{ "browse", opencm_browse, 0, CF_OPTARGS, 0, 0 },
|
||||
@@ -170,9 +171,8 @@ struct command top_cmds[] = {
|
||||
{ "diff", opencm_diff, 0, CF_OPTARGS|CF_WSINIT, 0,
|
||||
"diff.help" },
|
||||
#ifdef DEBUG
|
||||
- { "dump", opencm_dump, 0, 0, 0, 0 },
|
||||
- { "enumerate", opencm_enumerate, 0, CF_OPTARGS, 0,
|
||||
- "enumerate.help" },
|
||||
+ { "dump", opencm_dump, 0, CF_WSINIT, 0, 0 },
|
||||
+ { "enumerate", opencm_enumerate, 0, CF_OPTARGS, 0, 0 },
|
||||
#endif
|
||||
{ "gadd", opencm_add_member, 2, 0, 0,
|
||||
"gadd.help" },
|
||||
@@ -192,7 +192,7 @@ struct command top_cmds[] = {
|
||||
{ "mkdir", opencm_mkdir, 1, 0, 0,
|
||||
"mkdir.help" },
|
||||
{ "mv", opencm_rename, 2, CF_WSINIT|CF_NOCONNECT, 0,
|
||||
- "rename-entity.help" }, /* shortcut! */
|
||||
+ "mv.help" },
|
||||
|
||||
/* NOTE: This is for testing the new diff algorithm. It will later
|
||||
be removed. */
|
||||
@@ -204,8 +204,7 @@ struct command top_cmds[] = {
|
||||
"notes.help" },
|
||||
{ "options", 0, 0, 0, options_cmds, 0 },
|
||||
#ifdef DEBUG
|
||||
- { "preds", opencm_preds, 1, CF_OPTARGS|CF_WSINIT, 0,
|
||||
- "preds.help" },
|
||||
+ { "preds", opencm_preds, 1, CF_OPTARGS|CF_WSINIT, 0, 0 },
|
||||
#endif
|
||||
{ "rebind", opencm_rebind, 2, 0, 0,
|
||||
"rebind.help" },
|
||||
@@ -215,7 +214,7 @@ struct command top_cmds[] = {
|
||||
{ "revert", opencm_revert, 0, CF_WSINIT, 0,
|
||||
"revert.help" },
|
||||
{ "rm", opencm_remove_file,1, CF_OPTARGS|CF_NOCONNECT|CF_WSINIT, 0,
|
||||
- "remove-file.help" }, /* shortcut! */
|
||||
+ "rm.help" },
|
||||
{ "server", opencm_server, 1, CF_NOCONNECT, 0,
|
||||
"server.help" },
|
||||
{ "set", 0, 0, 0, set_cmds, 0 },
|
||||
@@ -236,7 +235,7 @@ struct command top_cmds[] = {
|
||||
{ "version", opencm_version, 0, CF_OPTCONNECT, 0,
|
||||
"version.help" },
|
||||
{ "whoami", opencm_whoami, 0, CF_NOCONNECT|CF_WSINIT, 0,
|
||||
- "whoami.help"},
|
||||
+ "whoami.help" },
|
||||
{ "xdcs", 0, 0, 0, xdcs_cmds, 0 },
|
||||
{ (char *)0 }
|
||||
};
|
||||
|
11
devel/opencm/patches/patch-base_src_client_command_h
Normal file
11
devel/opencm/patches/patch-base_src_client_command_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-base_src_client_command_h,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/command.h.orig Mon Aug 5 16:03:03 2002
|
||||
+++ base/src/client/command.h Wed Aug 28 14:26:40 2002
|
||||
@@ -83,6 +83,7 @@ opencm_find_command(int argc, char **arg
|
||||
extern void opencm_server(WorkSpace *, int argc, char **argv);
|
||||
|
||||
extern void opencm_create_branch(WorkSpace *, int argc, char **argv);
|
||||
+extern void opencm_create_project(WorkSpace *, int argc, char **argv);
|
||||
extern void opencm_rename(WorkSpace *, int argc, char **argv);
|
||||
extern void opencm_version(WorkSpace *, int argc, char **argv);
|
||||
extern void opencm_checkout(WorkSpace *, int argc, char **argv);
|
@ -1,12 +1,300 @@
|
||||
$OpenBSD: patch-base_src_client_opencm_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
$OpenBSD: patch-base_src_client_opencm_c,v 1.2 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/client/opencm.c.orig Mon Aug 5 23:58:07 2002
|
||||
+++ base/src/client/opencm.c Tue Aug 27 12:25:26 2002
|
||||
@@ -334,7 +334,7 @@ client_doDupBranchMut(Repository *r, Res
|
||||
unsigned mutFlags)
|
||||
{
|
||||
Mutable *dupM = NULL;
|
||||
- unsigned long version = 0ul;
|
||||
+ u_int32_t version = 0ul;
|
||||
+++ base/src/client/opencm.c Wed Aug 28 14:26:40 2002
|
||||
@@ -104,8 +104,12 @@ relative_to_homedir(const char *path)
|
||||
return path_join("~", path);
|
||||
}
|
||||
|
||||
/* By default, we want to copy the ACLs when we duplicate the mutable.
|
||||
* The --private command line option overrides this and sets the ACLs of
|
||||
+/* Given command line args, convert them to pathnames (or "pathglobs")
|
||||
+ that are relative to the top of the Workspace. This is needed
|
||||
+ because all client commands are currently executed with respect to
|
||||
+ the Workspace topdir. */
|
||||
static StrVec *
|
||||
-args_to_wsnames(WorkSpace *ws, int argc, char **argv)
|
||||
+normalize_args(WorkSpace *ws, int argc, char **argv)
|
||||
{
|
||||
unsigned i;
|
||||
StrVec *nmlist = strvec_create();
|
||||
@@ -129,19 +133,7 @@ args_to_wsnames(WorkSpace *ws, int argc,
|
||||
if (nm == NULL)
|
||||
continue;
|
||||
|
||||
- /* FIX: We have a bug when 'nm' is a dir but is missing! */
|
||||
- if (path_isdir(nm)) {
|
||||
- unsigned v;
|
||||
-
|
||||
- for (v = 0; v < vec_size(ws->pc->entSet); v++) {
|
||||
- WsEntity *wse_u = (WsEntity *) vec_fetch(ws->pc->entSet, v);
|
||||
-
|
||||
- if(glob_match(wse_u->cur_fsName, nm, GM_FS_COMPONENT))
|
||||
- strvec_append(nmlist, wse_u->cur_fsName);
|
||||
-
|
||||
- }
|
||||
- } else
|
||||
- strvec_append(nmlist, nm);
|
||||
+ strvec_append(nmlist, nm);
|
||||
}
|
||||
|
||||
return nmlist;
|
||||
@@ -195,7 +187,7 @@ opencm_resolve(WorkSpace *ws, int argc,
|
||||
Serializable *s = res->tail ? res->tail : res->s;
|
||||
report(0, "tail[%s] s[%s] rest[%s] for %s (and fp_frag = %s)\n",
|
||||
res->tail ? res->tail->ser_type->tyName : "<fsdir>",
|
||||
- s->ser_trueName,
|
||||
+ ser_getTrueName(s),
|
||||
res->rest,
|
||||
res->fullPath,
|
||||
res->fp_frag);
|
||||
@@ -920,6 +912,27 @@ opencm_create_repository(WorkSpace *ws,
|
||||
}
|
||||
|
||||
void
|
||||
+opencm_create_project(WorkSpace *ws, int argc, char **argv)
|
||||
+{
|
||||
+ char *description = NULL;
|
||||
+ Mutable *m = NULL;
|
||||
+ Repository *r = this_repos;
|
||||
+
|
||||
+ xassert(opt_Name);
|
||||
+
|
||||
+ if (!validate_pet_name(path_tail(argv[0])))
|
||||
+ THROW(ExBadValue, format("Invalid name: %s", argv[0]));
|
||||
+
|
||||
+ /* Note that get_message() will take whatever's in opt_Message if
|
||||
+ it's not NULL. It opt_Message is NULL, then user gets
|
||||
+ prompted. */
|
||||
+ description = get_message("Please enter description\n",
|
||||
+ xstrcat(COMMENT_LEADER, " New Project:"), 0);
|
||||
+
|
||||
+ m = client_doCreateProject(r, opt_Name, description, argv[0]);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
opencm_create_branch(WorkSpace *ws, int argc, char **argv)
|
||||
{
|
||||
char *description = NULL;
|
||||
@@ -1007,13 +1020,17 @@ void
|
||||
opencm_preds(WorkSpace *ws, int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
- void *v;
|
||||
Entity *ent;
|
||||
Repository *r = ws->r;
|
||||
-
|
||||
+ void *v;
|
||||
+
|
||||
for (i = 0; i < argc; i++) {
|
||||
TRY {
|
||||
- v = repos_GetEntity(r, argv[i]);
|
||||
+ /* This is wrong, but at least it compiles now. Since I don't know what
|
||||
+ this command is for, it's hard to know what should be done here.
|
||||
+ - JL (8/20/2002)
|
||||
+ */
|
||||
+ v = repos_GetEntity(r, 0, argv[i]);
|
||||
}
|
||||
DEFAULT(AnyException) {
|
||||
v = NULL;
|
||||
@@ -1022,8 +1039,8 @@ opencm_preds(WorkSpace *ws, int argc, ch
|
||||
if (v == NULL)
|
||||
continue;
|
||||
|
||||
- ent = (Entity *)v;
|
||||
- xprintf("Entity: %s\n", ent->serTrueName);
|
||||
+ ent = (Entity*)v;
|
||||
+ xprintf("Entity: %s\n", ser_getTrueName(ent));
|
||||
xprintf(" parent: %s\n",
|
||||
ent->parent ? ent->parent : "<none>");
|
||||
xprintf(" mergeParent: %s\n",
|
||||
@@ -1111,9 +1128,7 @@ opencm_checkout(WorkSpace *ws, int argc,
|
||||
void
|
||||
opencm_dump(WorkSpace *ws, int argc, char **argv)
|
||||
{
|
||||
- Repository *r = ws->r;
|
||||
-
|
||||
- if (!ws->haveProject) {
|
||||
+ if (!ws || !ws->haveProject) {
|
||||
report(0, "No project found.\n");
|
||||
return;
|
||||
}
|
||||
@@ -1156,14 +1171,6 @@ static OC_bool __attribute__ ((unused))
|
||||
return (ws_Lookup(ws, relpath) ? FALSE : TRUE);
|
||||
}
|
||||
|
||||
-#ifdef DEBUG
|
||||
-static OC_bool
|
||||
-is_not_ignored(WorkSpace *ws, const char *relpath)
|
||||
-{
|
||||
- return TRUE;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
static int
|
||||
check_for_conditionals(WorkSpace *ws)
|
||||
{
|
||||
@@ -1279,7 +1286,7 @@ do_log_entity(WorkSpace *ws, Entity *ent
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
- continue;
|
||||
+ break;
|
||||
|
||||
/* Now we have the parent Entity and can display its ci message */
|
||||
ci = (CommitInfo *)repos_GetEntity(ws->r, ws->pc->branchURI,
|
||||
@@ -1313,38 +1320,54 @@ do_remove(WorkSpace *ws, StrVec *argname
|
||||
{
|
||||
unsigned u;
|
||||
|
||||
- if (argnames) strvec_sort(argnames);
|
||||
+ assert(argnames);
|
||||
+
|
||||
+ argnames = ws_EnumerateWsEnts(ws, argnames);
|
||||
|
||||
- for (u = 0; u < vec_size(argnames); u++) {
|
||||
- ws_RemoveFile(ws, vec_fetch(argnames, u));
|
||||
+ if (vec_size(argnames) == 0)
|
||||
+ report(1, "Nothing to remove.\n");
|
||||
+ else {
|
||||
+ strvec_sort(argnames);
|
||||
+
|
||||
+ for (u = 0; u < vec_size(argnames); u++) {
|
||||
+ ws_RemoveFile(ws, vec_fetch(argnames, u));
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
+/* Returns number of unknown files. */
|
||||
static int
|
||||
do_status(WorkSpace *ws, StrVec *argnames)
|
||||
{
|
||||
int i;
|
||||
- StrVec *names = NULL;
|
||||
+ StrVec *unknown = strvec_create();
|
||||
|
||||
- pendingchange_RecomputeStatus(ws->pc, argnames);
|
||||
- pendingchange_ReportStatus(ws->pc, argnames);
|
||||
+ /* Build a list of known WsEntity names from 'argnames'. Use this
|
||||
+ list for the pendingchange_XXX calls. */
|
||||
+ StrVec *names = ws_EnumerateWsEnts(ws, argnames);
|
||||
+
|
||||
+ pendingchange_RecomputeStatus(ws->pc, names);
|
||||
+ pendingchange_ReportStatus(ws->pc, names);
|
||||
|
||||
/* Now make a separate pass to report unknown files: */
|
||||
if (argnames) {
|
||||
unsigned u;
|
||||
- names = strvec_create();
|
||||
|
||||
for (u = 0; u < vec_size(argnames); u++)
|
||||
- ws_EnumeratePath(ws, names, vec_fetch(argnames, u),
|
||||
- WSE_NORMAL, discard_wsentities);
|
||||
+ /* Ignore SYMLINKS and no need to NORMALIZE again: */
|
||||
+ ws_EnumeratePath(ws, unknown, vec_fetch(argnames, u),
|
||||
+ WSE_FILES|WSE_FILTER, discard_wsentities);
|
||||
}
|
||||
else
|
||||
- names = ws_Enumerate(ws, WSE_NORMAL, discard_wsentities);
|
||||
+ /* Ignore SYMLINKS and no need to NORMALIZE the ws->topDir */
|
||||
+ ws_EnumeratePath(ws, unknown, path_curdir(),
|
||||
+ WSE_FILES|WSE_FILTER,
|
||||
+ discard_wsentities);
|
||||
|
||||
- for (i = 0; i < vec_size(names); i++)
|
||||
- xprintf("? %s\n", vec_fetch(names, i));
|
||||
+ for (i = 0; i < vec_size(unknown); i++)
|
||||
+ xprintf("? %s\n", vec_fetch(unknown, i));
|
||||
|
||||
- return vec_size(names);
|
||||
+ return vec_size(unknown);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1529,7 +1552,7 @@ opencm_status(WorkSpace *ws, int argc, c
|
||||
return;
|
||||
}
|
||||
|
||||
- paths = args_to_wsnames(ws, argc, argv);
|
||||
+ paths = normalize_args(ws, argc, argv);
|
||||
(void) do_status(ws, paths);
|
||||
|
||||
/* Now that status updates things we need to track, we need to
|
||||
@@ -1561,7 +1584,7 @@ opencm_update(WorkSpace *ws, int argc, c
|
||||
pendingchange_ReportStatus(ws->pc, 0);
|
||||
|
||||
names = strvec_create();
|
||||
- names = ws_Enumerate(ws, WSE_NORMAL, discard_wsentities);
|
||||
+ ws_EnumeratePath(ws, names, path_curdir(), WSE_STANDARD, discard_wsentities);
|
||||
|
||||
for (i = 0; i < vec_size(names); i++)
|
||||
xprintf("? %s\n", vec_fetch(names, i));
|
||||
@@ -1618,7 +1641,7 @@ opencm_commit(WorkSpace *ws, int argc, c
|
||||
report(3, "Before status");
|
||||
|
||||
if (argc > 0)
|
||||
- names = args_to_wsnames(ws, argc, argv);
|
||||
+ names = normalize_args(ws, argc, argv);
|
||||
|
||||
if (do_status(ws, names) &&
|
||||
!opencm_confirm("Unknown files. Are you sure?", 1))
|
||||
@@ -1654,7 +1677,12 @@ opencm_add_file(WorkSpace *ws, int argc,
|
||||
THROW(ExNoObject,
|
||||
format("File/dir \"%s\" does not exist", argv[i]));
|
||||
|
||||
- ws_EnumeratePath(ws, names, argv[i], WSE_NORMAL, 0);
|
||||
+ ws_EnumeratePath(ws, names, argv[i], WSE_STANDARD, 0);
|
||||
+ }
|
||||
+
|
||||
+ if (vec_size(names) == 0) {
|
||||
+ report(1, "Nothing to add.\n");
|
||||
+ return;
|
||||
}
|
||||
|
||||
/* This is trickier than it looks, because argv[x] is always
|
||||
@@ -1684,7 +1712,7 @@ opencm_remove_file(WorkSpace *ws, int ar
|
||||
return;
|
||||
}
|
||||
|
||||
- paths = args_to_wsnames(ws, argc, argv);
|
||||
+ paths = normalize_args(ws, argc, argv);
|
||||
|
||||
do_remove(ws, paths);
|
||||
|
||||
@@ -1700,7 +1728,7 @@ opencm_enumerate(WorkSpace *ws, int argc
|
||||
StrVec *names;
|
||||
StrVec *nmlist = nmlist_create(ws->relStartDir, argc, argv);
|
||||
|
||||
- names = ws_Enumerate(ws, is_not_ignored);
|
||||
+ names = ws_EnumerateWsEnts(ws, nmlist);
|
||||
|
||||
for (i = 0; i < vec_size(names); i++) {
|
||||
const char *nm = vec_fetch(names, i);
|
||||
@@ -1717,7 +1745,6 @@ opencm_diff(WorkSpace *ws, int argc, cha
|
||||
ObVec *v;
|
||||
int i;
|
||||
|
||||
- //StrVec *nmlist = nmlist_create(ws->relStartDir, argc, argv);
|
||||
StrVec *names;
|
||||
|
||||
if (!ws->haveProject) {
|
||||
@@ -1725,18 +1752,19 @@ opencm_diff(WorkSpace *ws, int argc, cha
|
||||
return;
|
||||
}
|
||||
|
||||
+ names = strvec_create();
|
||||
+
|
||||
if (argc) {
|
||||
- names = strvec_create();
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (!path_exists(ws_NormalizePath(ws, argv[i])))
|
||||
THROW(ExNoObject,
|
||||
format("File/dir \"%s\" does not exist", argv[i]));
|
||||
|
||||
- ws_EnumeratePath(ws, names, argv[i], WSE_NORMAL, 0);
|
||||
+ ws_EnumeratePath(ws, names, argv[i], WSE_STANDARD, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
- names = ws_Enumerate(ws, WSE_NORMAL, keep_wsentities);
|
||||
+ ws_EnumeratePath(ws, names, path_curdir(), WSE_STANDARD, keep_wsentities);
|
||||
|
||||
|
||||
if (opt_Against) {
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_ChannelSSL_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/ChannelSSL.c.orig Sun Aug 4 11:51:37 2002
|
||||
+++ base/src/common/ChannelSSL.c Tue Aug 27 12:25:27 2002
|
||||
@@ -117,7 +117,7 @@ chan_alisten_ssl(ChannelCompletionFn fn,
|
||||
}
|
||||
|
||||
static void
|
||||
-report_ssl_error(int level, unsigned long errcode)
|
||||
+report_ssl_error(int level, u_int32_t errcode)
|
||||
{
|
||||
if(errcode == 0)
|
||||
report(level, "No OpenSSL error reported (!)\n");
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_EntityCache_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/EntityCache.c.orig Mon Jul 29 22:48:38 2002
|
||||
+++ base/src/common/EntityCache.c Tue Aug 27 12:25:27 2002
|
||||
@@ -61,8 +61,8 @@ struct EcacheNode {
|
||||
};
|
||||
|
||||
struct EntityCache {
|
||||
- unsigned long sz;
|
||||
- unsigned long max;
|
||||
+ u_int32_t sz;
|
||||
+ u_int32_t max;
|
||||
rbtree *tree;
|
||||
|
||||
EcacheNode *oldest; /* pointer to oldest */
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_Entity_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/Entity.h.orig Thu Jul 18 20:30:51 2002
|
||||
+++ base/src/common/Entity.h Tue Aug 27 12:25:27 2002
|
||||
@@ -58,7 +58,7 @@ struct Entity {
|
||||
*/
|
||||
|
||||
const char *contentTrueName;
|
||||
- unsigned long length; /* length of object */
|
||||
+ u_int32_t length; /* length of object */
|
||||
|
||||
/* Miscellaneous per-entity meta information. Much of this is
|
||||
* contained in the Change record, but it isn't accessable to the
|
||||
@@ -72,7 +72,7 @@ struct Entity {
|
||||
|
||||
unsigned char entityType; /* type of content */
|
||||
|
||||
- unsigned long entityPerms; /* permissions flags */
|
||||
+ u_int32_t entityPerms; /* permissions flags */
|
||||
|
||||
const char *parent; /* preceding Entity (on same Branch) */
|
||||
const char *mergeParent; /* merged, preceding Entity (if any) */
|
38
devel/opencm/patches/patch-base_src_common_OS_unix-path_c
Normal file
38
devel/opencm/patches/patch-base_src_common_OS_unix-path_c
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-base_src_common_OS_unix-path_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/common/OS/unix-path.c.orig Thu Jul 18 20:30:50 2002
|
||||
+++ base/src/common/OS/unix-path.c Wed Aug 28 14:26:40 2002
|
||||
@@ -305,15 +305,30 @@ path_portstat(const char *fname, portsta
|
||||
|
||||
memset(ps, 0, sizeof(*ps));
|
||||
|
||||
- result = stat(fname, &sb);
|
||||
+ /* Use "lstat" here so we don't traverse any symlinks! Originally we
|
||||
+ used just "stat", and ran into interesting results as OpenCM
|
||||
+ tried to follow the symlinks to their targets. */
|
||||
+ result = lstat(fname, &sb);
|
||||
if (result == -1) {
|
||||
if (errno == ENOENT) {
|
||||
ps->exists = FALSE;
|
||||
return;
|
||||
}
|
||||
-
|
||||
- THROW(ExNoObject,
|
||||
- format("Could not stat path [%s]: errno %d", fname, errno));
|
||||
+ /* A component of the path is not a directory:
|
||||
+ We don't want to just ignore this, because 'update' will fail when it
|
||||
+ tries to write to something inside the "directory". But making the
|
||||
+ error message more descriptive is nice, so users can understand what
|
||||
+ is wrong, and hopefully how to fix it (that may be a bit of a stretch,
|
||||
+ but whatever)
|
||||
+ */
|
||||
+ else if (errno == ENOTDIR) {
|
||||
+ THROW(ExNoObject,
|
||||
+ format("One or more components of %s is not a directory", fname));
|
||||
+ }
|
||||
+ else {
|
||||
+ THROW(ExNoObject,
|
||||
+ format("Could not stat path [%s]: errno %d", fname, errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
ps->exists = TRUE;
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_ObDict_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/ObDict.h.orig Wed Jul 17 23:27:55 2002
|
||||
+++ base/src/common/ObDict.h Tue Aug 27 12:25:27 2002
|
||||
@@ -44,7 +44,7 @@
|
||||
typedef struct ObDictEntry ObDictEntry;
|
||||
struct ObDictEntry {
|
||||
const char *trueName; /* of the object */
|
||||
- unsigned long tnHash; /* hash of the truename for quick compare */
|
||||
+ u_int32_t tnHash; /* hash of the truename for quick compare */
|
||||
unsigned w; /* aux word */
|
||||
|
||||
void *value;
|
37
devel/opencm/patches/patch-base_src_common_PRNG_c
Normal file
37
devel/opencm/patches/patch-base_src_common_PRNG_c
Normal file
@ -0,0 +1,37 @@
|
||||
$OpenBSD: patch-base_src_common_PRNG_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/common/PRNG.c.orig Thu Jul 18 20:30:48 2002
|
||||
+++ base/src/common/PRNG.c Wed Aug 28 14:26:40 2002
|
||||
@@ -75,18 +75,17 @@ void initialize_PRNG(void)
|
||||
if(getenv("RANDFILE"))
|
||||
RAND_load_file(getenv("RANDFILE"), MAX_READ);
|
||||
|
||||
- /* We limit gathering entropy from EGD to only 128 bytes. This is because
|
||||
- a) EGD is slow
|
||||
- b) EGD will sometimes crash if too many requests come in. I reported
|
||||
- this to the author a few months ago, but never got a response.
|
||||
- c) EGD gathers entropy at a not very fast rate; if we read much
|
||||
- more than this, we'll probably start running out, which would
|
||||
- be bad, especially for the client (several invocations might occur
|
||||
- over the course of only a few minutes)
|
||||
+ /* We limit gathering entropy from an EGD socket to only 128 bytes to work
|
||||
+ around some flaws in the design of EGD (in particular, EGD is slow, it
|
||||
+ will crash if too many requests come in too fast, it gathers entropy
|
||||
+ slowly, and it will block if it doesn't have enough).
|
||||
|
||||
- However, EGD is by far the best choice for a RNG on systems that don't
|
||||
- have /dev/random, so it seems wise to support it.
|
||||
- */
|
||||
+ I (Jack L) recommend using PRNGD (a fast and stable EGD clone written in
|
||||
+ C) instead of EGD for these reasons.
|
||||
+
|
||||
+ RAND_egd_bytes is only available in OpenSSL 0.9.6 and up. However, given
|
||||
+ that 0.9.5 and previous versions have exploitable overflows, this is not a
|
||||
+ major concern. */
|
||||
if(getenv("EGD_PATH"))
|
||||
RAND_egd_bytes(getenv("EGD_PATH"), 128);
|
||||
|
||||
@@ -96,3 +95,4 @@ void initialize_PRNG(void)
|
||||
THROW(ExPrngError, "Insufficient randomness to seed the PRNG");
|
||||
}
|
||||
}
|
||||
+
|
@ -1,14 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_Revision_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/Revision.c.orig Mon Jul 29 22:48:34 2002
|
||||
+++ base/src/common/Revision.c Tue Aug 27 12:25:27 2002
|
||||
@@ -47,8 +47,8 @@ revision_show(const void *vp)
|
||||
|
||||
xprintf("mutURI: %s\n", r->mutURI);
|
||||
xprintf("Seq Num: 0x%08x%08x\n",
|
||||
- (unsigned long) (r->seq_number >> 32),
|
||||
- (unsigned long) (r->seq_number));
|
||||
+ (u_int32_t) (r->seq_number >> 32),
|
||||
+ (u_int32_t) (r->seq_number));
|
||||
xprintf("ReviseTime: %s\n", r->reviseTime);
|
||||
xprintf("Revisor: %s\n", r->revisor);
|
||||
xprintf("NewObject: %s\n", r->newObject);
|
@ -1,297 +1,134 @@
|
||||
$OpenBSD: patch-base_src_common_SDR_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
$OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/common/SDR.c.orig Mon Jul 29 22:48:31 2002
|
||||
+++ base/src/common/SDR.c Tue Aug 27 12:27:10 2002
|
||||
@@ -82,8 +82,8 @@ struct serializer {
|
||||
void (*w_u16)(const char *, SDR_stream *, unsigned short);
|
||||
unsigned short (*r_u16)(const char *, SDR_stream *);
|
||||
+++ base/src/common/SDR.c Wed Aug 28 14:26:40 2002
|
||||
@@ -116,13 +116,15 @@ file_stream_putc(SDR_stream *s, int c)
|
||||
s->pos++;
|
||||
s->len++;
|
||||
s->bound++;
|
||||
- return fputc(c, s->state);
|
||||
+ return fputc(c, (FILE*)s->state);
|
||||
}
|
||||
|
||||
- void (*w_u32)(const char *, SDR_stream *, unsigned long);
|
||||
- unsigned long (*r_u32)(const char *, SDR_stream *);
|
||||
+ void (*w_u32)(const char *, SDR_stream *, u_int32_t);
|
||||
+ u_int32_t (*r_u32)(const char *, SDR_stream *);
|
||||
|
||||
void (*w_u64)(const char *, SDR_stream *,
|
||||
oc_uint64_t);
|
||||
@@ -92,8 +92,8 @@ struct serializer {
|
||||
void (*w_buffer)(const char *elem, SDR_stream *, const Buffer*);
|
||||
Buffer * (*r_buffer)(const char *elem, SDR_stream *, ocmoff_t len);
|
||||
|
||||
- void (*w_bytes)(const char *, SDR_stream *, unsigned long len, const void *);
|
||||
- void * (*r_bytes)(const char *, SDR_stream *, unsigned long len);
|
||||
+ void (*w_bytes)(const char *, SDR_stream *, u_int32_t len, const void *);
|
||||
+ void * (*r_bytes)(const char *, SDR_stream *, u_int32_t len);
|
||||
|
||||
void (*w_string)(const char *, SDR_stream *, const char *);
|
||||
char * (*r_string)(const char *, SDR_stream *);
|
||||
@@ -568,8 +568,8 @@ stream_ungetc(SDR_stream *strm, int c)
|
||||
size_t
|
||||
stream_vprintf(SDR_stream *s, const char *fmt, va_list ap)
|
||||
static ocmoff_t
|
||||
file_stream_puts(SDR_stream *s, const void *vp, ocmoff_t len)
|
||||
{
|
||||
- unsigned long len;
|
||||
- unsigned long width = 0;
|
||||
+ u_int32_t len;
|
||||
+ u_int32_t width = 0;
|
||||
OC_bool sign;
|
||||
OC_bool rightAdjust;
|
||||
char fillchar;
|
||||
@@ -584,7 +584,7 @@ stream_vprintf(SDR_stream *s, const char
|
||||
continue;
|
||||
- size_t wlen = fwrite(vp, 1, len, s->state);
|
||||
+ size_t wlen = fwrite(vp, 1, len, (FILE*)s->state);
|
||||
+ if(len != wlen || ferror((FILE*)s->state))
|
||||
+ THROW(ExTruncated, format("Writing to %s was truncated\n", s->name));
|
||||
s->pos += wlen;
|
||||
s->len += wlen;
|
||||
s->bound += wlen;
|
||||
@@ -142,7 +144,7 @@ file_stream_getc(SDR_stream *s)
|
||||
{
|
||||
int c;
|
||||
|
||||
- c = fgetc(s->state);
|
||||
+ c = fgetc((FILE*)s->state);
|
||||
s->pos++;
|
||||
return c;
|
||||
}
|
||||
@@ -150,7 +152,7 @@ file_stream_getc(SDR_stream *s)
|
||||
static ocmoff_t
|
||||
file_stream_gets(SDR_stream *s, void *vp, ocmoff_t len)
|
||||
{
|
||||
- size_t rlen = fread(vp, 1, len, s->state);
|
||||
+ size_t rlen = fread(vp, 1, len, (FILE*)s->state);
|
||||
s->pos += rlen;
|
||||
|
||||
return rlen;
|
||||
@@ -161,8 +163,8 @@ file_stream_reread(SDR_stream *s)
|
||||
{
|
||||
assert(s->state);
|
||||
|
||||
- fflush(s->state);
|
||||
- rewind(s->state);
|
||||
+ fflush((FILE*)s->state);
|
||||
+ rewind((FILE*)s->state);
|
||||
s->pos = 0;
|
||||
|
||||
s->mode = MODE_RSTREAM;
|
||||
@@ -175,7 +177,7 @@ static void
|
||||
file_stream_close(SDR_stream *s)
|
||||
{
|
||||
if (s->state) {
|
||||
- fflush(s->state);
|
||||
+ fflush((FILE*)s->state);
|
||||
xfclose((FILE *) s->state);
|
||||
}
|
||||
s->state = 0;
|
||||
@@ -1028,7 +1030,7 @@ stream_autodetect_format(SDR_stream *str
|
||||
/* Texty format starts with TEXTY\n
|
||||
*
|
||||
* The newline isn't really necessary, but otherwise the file
|
||||
- * will look kind of ugly, with stupid stuff like Tobtype ...
|
||||
+ * will look kind of ugly, with stupid stuff like TEXTYobtype 5...
|
||||
*/
|
||||
const char* expecting = "EXTY\n";
|
||||
|
||||
@@ -1046,6 +1048,26 @@ stream_autodetect_format(SDR_stream *str
|
||||
|
||||
break;
|
||||
}
|
||||
+ case 'D':
|
||||
+ {
|
||||
+ /* Texty format starts with DTEXTY\n
|
||||
+ */
|
||||
+ const char* expecting = "TEXTY\n";
|
||||
+
|
||||
+ do {
|
||||
+ c = stream_getc(stream);
|
||||
+ if(c != *expecting)
|
||||
+ THROW(ExMalformed,
|
||||
+ format("Bad stream format (thought it was DTEXTY); "
|
||||
+ "source \"%s\", starts with char %x\n",
|
||||
+ stream->name, c));
|
||||
+ expecting++;
|
||||
+ } while (c != '\n');
|
||||
+
|
||||
+ stream->format = SDR_DTEXTY;
|
||||
+
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
THROW(ExMalformed,
|
||||
@@ -2125,6 +2147,11 @@ isSafeChar(unsigned char c)
|
||||
return (isprint(c) && c != ENCODE_CHAR) || isspace(c);
|
||||
}
|
||||
|
||||
+static void dtexty_onCreate(SDR_stream *strm)
|
||||
+{
|
||||
+ stream_printf(strm, "DTEXTY\n");
|
||||
+}
|
||||
+
|
||||
static ocmoff_t
|
||||
encodedLength(const void *vp, ocmoff_t len)
|
||||
{
|
||||
@@ -2207,7 +2234,6 @@ dtexty_get_field(const char *name, char
|
||||
{
|
||||
/* Do an in-place conversion to safe form on the string that came
|
||||
back: */
|
||||
-
|
||||
unsigned char *base = fld->rep;
|
||||
unsigned char *end = base + fld->value;
|
||||
unsigned char *to = fld->rep;
|
||||
@@ -2240,8 +2266,7 @@ dtexty_get_field(const char *name, char
|
||||
THROW(ExMalformed, "Mis-encoded or malformed input string");
|
||||
|
||||
}
|
||||
- else
|
||||
- *to++ = c;
|
||||
+ *to++ = c;
|
||||
}
|
||||
|
||||
- /* largest thing we might convert fits in 20 digits (unsigned long
|
||||
+ /* largest thing we might convert fits in 20 digits (u_int32_t
|
||||
* long as decimal */
|
||||
|
||||
pend = &buf[20];
|
||||
@@ -647,7 +647,7 @@ stream_vprintf(SDR_stream *s, const char
|
||||
case 'd':
|
||||
{
|
||||
long l;
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
|
||||
l = va_arg(ap, long);
|
||||
|
||||
@@ -661,7 +661,7 @@ stream_vprintf(SDR_stream *s, const char
|
||||
ul = (l < 0) ? (unsigned) -l : (unsigned) l;
|
||||
|
||||
if (l == LONG_MIN)
|
||||
- ul = ((unsigned long) LONG_MAX) + 1ul;
|
||||
+ ul = ((u_int32_t) LONG_MAX) + 1ul;
|
||||
|
||||
while(ul) {
|
||||
*(--p) = '0' + (ul % 10);
|
||||
@@ -675,9 +675,9 @@ stream_vprintf(SDR_stream *s, const char
|
||||
}
|
||||
case 'u':
|
||||
{
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
|
||||
- ul = va_arg(ap, unsigned long);
|
||||
+ ul = va_arg(ap, u_int32_t);
|
||||
|
||||
if (ul == 0) {
|
||||
*(--p) = '0';
|
||||
@@ -692,11 +692,11 @@ stream_vprintf(SDR_stream *s, const char
|
||||
}
|
||||
case 'x':
|
||||
{
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
|
||||
char *hexout = "0123456789abcdef";
|
||||
|
||||
- ul = va_arg(ap, unsigned long);
|
||||
+ ul = va_arg(ap, u_int32_t);
|
||||
|
||||
if (ul == 0) {
|
||||
*(--p) = '0';
|
||||
@@ -826,7 +826,7 @@ stream_scanf(SDR_stream *s, const char *
|
||||
case 'u':
|
||||
case 'U':
|
||||
{
|
||||
- unsigned long ull = 0;
|
||||
+ u_int32_t ull = 0;
|
||||
|
||||
do {
|
||||
c = stream_getc(s);
|
||||
@@ -852,10 +852,10 @@ stream_scanf(SDR_stream *s, const char *
|
||||
--input_count;
|
||||
|
||||
if (*fmt == 'u') {
|
||||
- unsigned long *ulp;
|
||||
+ u_int32_t *ulp;
|
||||
|
||||
- ulp = va_arg(ap, unsigned long *);
|
||||
- *ulp = (unsigned long) ull;
|
||||
+ ulp = va_arg(ap, u_int32_t *);
|
||||
+ *ulp = (u_int32_t) ull;
|
||||
assert(ull <= ULONG_MAX);
|
||||
}
|
||||
else {
|
||||
@@ -869,10 +869,10 @@ stream_scanf(SDR_stream *s, const char *
|
||||
}
|
||||
case 'x':
|
||||
{
|
||||
- unsigned long ul = 0;
|
||||
- unsigned long *ulp;
|
||||
+ u_int32_t ul = 0;
|
||||
+ u_int32_t *ulp;
|
||||
|
||||
- ulp = va_arg(ap, unsigned long *);
|
||||
+ ulp = va_arg(ap, u_int32_t *);
|
||||
|
||||
do {
|
||||
c = stream_getc(s);
|
||||
@@ -1345,13 +1345,13 @@ sdr_r_u16(const char *elem, SDR_stream *
|
||||
}
|
||||
|
||||
void
|
||||
-sdr_w_u32(const char *elem, SDR_stream *strm, unsigned long u)
|
||||
+sdr_w_u32(const char *elem, SDR_stream *strm, u_int32_t u)
|
||||
{
|
||||
assert(sermodes[strm->format].w_u32);
|
||||
sermodes[strm->format].w_u32(elem, strm, u);
|
||||
}
|
||||
|
||||
-unsigned long
|
||||
+u_int32_t
|
||||
sdr_r_u32(const char *elem, SDR_stream *strm)
|
||||
{
|
||||
assert(sermodes[strm->format].r_u32);
|
||||
@@ -1387,14 +1387,14 @@ sdr_r_buffer(const char *elem, SDR_strea
|
||||
}
|
||||
|
||||
void
|
||||
-sdr_w_bytes(const char *elem, SDR_stream *strm, unsigned long len, const void *v)
|
||||
+sdr_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len, const void *v)
|
||||
{
|
||||
assert(sermodes[strm->format].w_bytes);
|
||||
sermodes[strm->format].w_bytes(elem, strm, len, v);
|
||||
}
|
||||
|
||||
void *
|
||||
-sdr_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
|
||||
+sdr_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
|
||||
{
|
||||
assert(sermodes[strm->format].r_bytes);
|
||||
return sermodes[strm->format].r_bytes(elem, strm, len);
|
||||
@@ -1496,7 +1496,7 @@ bin_r_u16(const char *elem, SDR_stream *
|
||||
u = 0;
|
||||
|
||||
do {
|
||||
- unsigned long bu;
|
||||
+ u_int32_t bu;
|
||||
|
||||
i--;
|
||||
u = u << 8;
|
||||
@@ -1508,7 +1508,7 @@ bin_r_u16(const char *elem, SDR_stream *
|
||||
}
|
||||
|
||||
static void
|
||||
-bin_w_u32(const char *elem, SDR_stream *strm, unsigned long u)
|
||||
+bin_w_u32(const char *elem, SDR_stream *strm, u_int32_t u)
|
||||
{
|
||||
int i;
|
||||
unsigned char bytes[sizeof(u)];
|
||||
@@ -1522,11 +1522,11 @@ bin_w_u32(const char *elem, SDR_stream *
|
||||
THROW(ExTruncated, "Serialization write error");
|
||||
}
|
||||
|
||||
-static unsigned long
|
||||
+static u_int32_t
|
||||
bin_r_u32(const char *elem, SDR_stream *strm)
|
||||
{
|
||||
int i;
|
||||
- unsigned long u;
|
||||
+ u_int32_t u;
|
||||
unsigned char bytes[sizeof(u)];
|
||||
|
||||
if (stream_read(strm, bytes, sizeof(u)) < sizeof(u))
|
||||
@@ -1536,7 +1536,7 @@ bin_r_u32(const char *elem, SDR_stream *
|
||||
u = 0;
|
||||
|
||||
do {
|
||||
- unsigned long bu;
|
||||
+ u_int32_t bu;
|
||||
|
||||
i--;
|
||||
u = u << 8;
|
||||
@@ -1589,7 +1589,7 @@ bin_r_u64(const char *elem, SDR_stream *
|
||||
|
||||
/* Note that these do NOT read/write the actual length! */
|
||||
static void
|
||||
-bin_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
|
||||
+bin_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
|
||||
const void *v)
|
||||
{
|
||||
const char *s = (const char *) v;
|
||||
@@ -1599,7 +1599,7 @@ bin_w_bytes(const char *elem, SDR_stream
|
||||
}
|
||||
|
||||
static void *
|
||||
-bin_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
|
||||
+bin_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
|
||||
{
|
||||
char * s = (char *) GC_MALLOC_ATOMIC(sizeof(char) * (len+1));
|
||||
s[len] = 0;
|
||||
@@ -1935,7 +1935,7 @@ texty_w_u16(const char *elem, SDR_stream
|
||||
}
|
||||
|
||||
static void
|
||||
-texty_w_u32(const char *elem, SDR_stream *strm, unsigned long num)
|
||||
+texty_w_u32(const char *elem, SDR_stream *strm, u_int32_t num)
|
||||
{
|
||||
texty_do_indent(strm);
|
||||
stream_printf(strm, "%s I %u\n", elem, num);
|
||||
@@ -1955,7 +1955,7 @@ texty_r_u16(const char *elem, SDR_stream
|
||||
return fld->value;
|
||||
}
|
||||
|
||||
-static unsigned long
|
||||
+static u_int32_t
|
||||
texty_r_u32(const char *elem, SDR_stream *strm)
|
||||
{
|
||||
texty_field *fld = texty_get_field(elem, 'I', strm);
|
||||
@@ -1978,7 +1978,7 @@ texty_r_u64(const char *elem, SDR_stream
|
||||
|
||||
static void
|
||||
texty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
|
||||
- unsigned long len, const void *vp)
|
||||
+ u_int32_t len, const void *vp)
|
||||
{
|
||||
texty_do_indent(strm);
|
||||
|
||||
@@ -2019,14 +2019,14 @@ texty_r_buffer(const char *elem, SDR_str
|
||||
}
|
||||
|
||||
static void
|
||||
-texty_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
|
||||
+texty_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
|
||||
const void *obj)
|
||||
{
|
||||
texty_w_bytestring(elem, strm, 'B', len, obj);
|
||||
}
|
||||
|
||||
static void *
|
||||
-texty_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
|
||||
+texty_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
|
||||
{
|
||||
texty_field *fld = texty_get_field(elem, 'B', strm);
|
||||
return fld->rep;
|
||||
@@ -2169,7 +2169,7 @@ encodeString(const void *vp, ocmoff_t le
|
||||
|
||||
static void
|
||||
dtexty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
|
||||
- unsigned long len, const void *vp)
|
||||
+ u_int32_t len, const void *vp)
|
||||
{
|
||||
ocmoff_t elen = len; /* encoded length */
|
||||
const void *evp = vp; /* encoded string */
|
||||
@@ -2334,7 +2334,7 @@ dtexty_get_field(const char *name, char
|
||||
#if 0
|
||||
static void
|
||||
dtexty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
|
||||
- unsigned long len, const void *vp)
|
||||
+ u_int32_t len, const void *vp)
|
||||
{
|
||||
texty_do_indent(strm);
|
||||
|
||||
@@ -2415,14 +2415,14 @@ dtexty_r_buffer(const char *elem, SDR_st
|
||||
dtexty_w_bytestring and dtexty_get_field. Yuck.
|
||||
*/
|
||||
static void
|
||||
-dtexty_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
|
||||
+dtexty_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
|
||||
const void *s)
|
||||
{
|
||||
dtexty_w_bytestring(elem, strm, 'B', len, s);
|
||||
}
|
||||
|
||||
static void *
|
||||
-dtexty_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
|
||||
+dtexty_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
|
||||
{
|
||||
texty_field *fld = dtexty_get_field(elem, 'B', strm);
|
||||
return fld->rep;
|
||||
fld->value = to - base; /* len excludes terminating NUL */
|
||||
@@ -2539,7 +2564,7 @@ static struct serializer sermodes[] = {
|
||||
texty_w_obname, texty_r_obname,
|
||||
texty_write, texty_read },
|
||||
/* DTEXTY streams */
|
||||
- { texty_onCreate,
|
||||
+ { dtexty_onCreate,
|
||||
texty_w_u8, texty_r_u8,
|
||||
texty_w_u16, texty_r_u16,
|
||||
texty_w_u32, texty_r_u32,
|
||||
|
@ -1,25 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_SDR_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/SDR.h.orig Mon Jul 22 02:02:49 2002
|
||||
+++ base/src/common/SDR.h Tue Aug 27 12:25:27 2002
|
||||
@@ -104,17 +104,17 @@ void sdr_w_u16(const char *ele
|
||||
unsigned short sdr_r_u16(const char *elem, SDR_stream *);
|
||||
|
||||
void sdr_w_u32(const char *elem, SDR_stream *,
|
||||
- unsigned long);
|
||||
-unsigned long sdr_r_u32(const char *elem, SDR_stream *);
|
||||
+ u_int32_t);
|
||||
+u_int32_t sdr_r_u32(const char *elem, SDR_stream *);
|
||||
|
||||
void sdr_w_u64(const char *elem, SDR_stream *,
|
||||
oc_uint64_t);
|
||||
oc_uint64_t sdr_r_u64(const char *elem, SDR_stream *);
|
||||
|
||||
void sdr_w_bytes(const char *elem, SDR_stream *,
|
||||
- unsigned long len, const void *);
|
||||
+ u_int32_t len, const void *);
|
||||
void * sdr_r_bytes(const char *elem, SDR_stream *,
|
||||
- unsigned long len);
|
||||
+ u_int32_t len);
|
||||
|
||||
void sdr_w_buffer(const char *elem, SDR_stream *, const Buffer*);
|
||||
Buffer * sdr_r_buffer(const char *elem, SDR_stream *, ocmoff_t len);
|
34
devel/opencm/patches/patch-base_src_common_SSLcommon_h
Normal file
34
devel/opencm/patches/patch-base_src_common_SSLcommon_h
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-base_src_common_SSLcommon_h,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/common/SSLcommon.h.orig Mon Jul 8 16:30:58 2002
|
||||
+++ base/src/common/SSLcommon.h Wed Aug 28 14:26:40 2002
|
||||
@@ -42,12 +42,29 @@
|
||||
*/
|
||||
|
||||
#ifndef HAVE_OPENSSL
|
||||
-#error "Configure script did not locate OpenSSL"
|
||||
+ #error "Configure script did not locate OpenSSL"
|
||||
#endif
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rand.h>
|
||||
+
|
||||
+#ifndef OPENSSL_VERSION_NUMBER
|
||||
+ #error "OPENSSL_VERSION_NUMBER is not defined!"
|
||||
+#endif
|
||||
+
|
||||
+/*
|
||||
+ opensslv.h documents this format: it should match 0.9.6-dev or higher
|
||||
+ versions, which seems about right. We need 0.9.6 cause PRNG.c wants
|
||||
+ to use RAND_egd_bytes, which is not available in 0.9.5 or previous versions.
|
||||
+
|
||||
+ A couple other (older) version formats are mentioned in the header. However,
|
||||
+ all of them should result in a version code less than x09060000, so we should
|
||||
+ be OK.
|
||||
+*/
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x00906000)
|
||||
+ #error "OpenSSL 0.9.6 or higher is required by OpenCM"
|
||||
+#endif
|
||||
|
||||
#define BUFSIZZ 1024
|
||||
#define SSLPORT 4433
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_Serializable_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/Serializable.c.orig Mon Jul 29 22:48:29 2002
|
||||
+++ base/src/common/Serializable.c Tue Aug 27 12:25:27 2002
|
||||
@@ -72,7 +72,7 @@ SerialType *serTypes[TY_ntypes] = {
|
||||
#include "OBTYPES.def"
|
||||
|
||||
SerialType *
|
||||
-ser_find_type(unsigned long t)
|
||||
+ser_find_type(u_int32_t t)
|
||||
{
|
||||
unsigned u;
|
||||
|
@ -1,34 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_Serializable_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/Serializable.h.orig Mon Jul 29 22:48:35 2002
|
||||
+++ base/src/common/Serializable.h Tue Aug 27 12:25:27 2002
|
||||
@@ -56,8 +56,8 @@ enum {
|
||||
typedef struct DeserializeInfo DeserializeInfo;
|
||||
struct DeserializeInfo {
|
||||
struct SerialType *st;
|
||||
- unsigned long tyConst; /* type constant as serialized */
|
||||
- unsigned long ver; /* version number as serialized */
|
||||
+ u_int32_t tyConst; /* type constant as serialized */
|
||||
+ u_int32_t ver; /* version number as serialized */
|
||||
};
|
||||
|
||||
#define OBTYPE(nm,prefix,abbrev,ver) \
|
||||
@@ -76,8 +76,8 @@ struct DeserializeInfo {
|
||||
canonicalize the internal representation before displaying the
|
||||
object. */
|
||||
struct SerialType {
|
||||
- unsigned long typ; /* type constant for this object */
|
||||
- unsigned long ver; /* version constant for this object */
|
||||
+ u_int32_t typ; /* type constant for this object */
|
||||
+ u_int32_t ver; /* version constant for this object */
|
||||
const char * tyName; /* used in texty formats */
|
||||
const char * prefix; /* used as first part of truename */
|
||||
void * (*deserialize) (const DeserializeInfo *, SDR_stream *);
|
||||
@@ -99,7 +99,7 @@ struct Serializable {
|
||||
#define serTrueName ser.ser_trueName
|
||||
#define serPrefix ser.ser_type->prefix
|
||||
|
||||
-SerialType *ser_find_type(unsigned long ty);
|
||||
+SerialType *ser_find_type(u_int32_t ty);
|
||||
void ser_init(void);
|
||||
|
||||
const char *ser_getTrueName(const void *);
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_ServerRequest_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/ServerRequest.h.orig Tue Jul 16 21:49:02 2002
|
||||
+++ base/src/common/ServerRequest.h Tue Aug 27 12:25:27 2002
|
||||
@@ -41,7 +41,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
-typedef unsigned long reqlen_t;
|
||||
+typedef u_int32_t reqlen_t;
|
||||
|
||||
typedef struct Request {
|
||||
Serializable ser;
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_TrueName_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/TrueName.h.orig Wed Jul 17 23:27:56 2002
|
||||
+++ base/src/common/TrueName.h Tue Aug 27 12:25:27 2002
|
||||
@@ -49,7 +49,7 @@ const char *truename_NewName(void);
|
||||
|
||||
/* Generate an integer hash of the trueName suitable for use in hash
|
||||
tables */
|
||||
-typedef unsigned long tnhash_t;
|
||||
+typedef u_int32_t tnhash_t;
|
||||
|
||||
tnhash_t truename_hash(const char *trueName);
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_WireException_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/WireException.h.orig Mon Jul 8 16:31:00 2002
|
||||
+++ base/src/common/WireException.h Tue Aug 27 12:25:27 2002
|
||||
@@ -46,7 +46,7 @@ typedef struct WireException {
|
||||
|
||||
const char *name; /* exception name */
|
||||
const char *fname; /* file where thrown (string) */
|
||||
- unsigned long line; /* line number where thrown */
|
||||
+ u_int32_t line; /* line number where thrown */
|
||||
const char *str; /* explanation string */
|
||||
} WireException;
|
||||
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_encode_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/encode.c.orig Mon Jul 8 16:31:06 2002
|
||||
+++ base/src/common/encode.c Tue Aug 27 12:25:27 2002
|
||||
@@ -127,12 +127,12 @@ b64_encode(const void *vp, unsigned int
|
||||
char *pBuf = outbuf;
|
||||
|
||||
while (len) {
|
||||
- unsigned long take = min(len, 3);
|
||||
- unsigned long value = 0;
|
||||
- unsigned long outlen = (take * 8 + 5) / 6;
|
||||
+ u_int32_t take = min(len, 3);
|
||||
+ u_int32_t value = 0;
|
||||
+ u_int32_t outlen = (take * 8 + 5) / 6;
|
||||
unsigned i;
|
||||
|
||||
- assert(sizeof(unsigned long) == 4);
|
||||
+ assert(sizeof(u_int32_t) == 4);
|
||||
|
||||
if (take == 3) {
|
||||
value = cp[2];
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_except_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/except.c.orig Mon Jul 8 16:31:09 2002
|
||||
+++ base/src/common/except.c Tue Aug 27 12:25:27 2002
|
||||
@@ -73,7 +73,7 @@ DEFEXCEPTION(ExUnspecified, "Unspecified
|
||||
excpt_unwind *exit_unwind_list = 0;
|
||||
|
||||
void
|
||||
-_throw(catch_t *_cb, const char *fname, unsigned long line,
|
||||
+_throw(catch_t *_cb, const char *fname, u_int32_t line,
|
||||
Exception ex, const char *s)
|
||||
{
|
||||
_curCatch = _cb;
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_except_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/except.h.orig Thu Jul 18 20:30:57 2002
|
||||
+++ base/src/common/except.h Tue Aug 27 12:25:27 2002
|
||||
@@ -57,7 +57,7 @@ struct catch {
|
||||
jmp_buf jbuf; /* saved catch environment */
|
||||
Exception excpt; /* thrown exception value */
|
||||
const char *fname; /* file where thrown (string) */
|
||||
- unsigned long line; /* line number where thrown */
|
||||
+ u_int32_t line; /* line number where thrown */
|
||||
const char *str; /* explanation string */
|
||||
catch_t *up; /* next (upward) catch block */
|
||||
OC_bool caught; /* whether this exception was handled */
|
||||
@@ -107,7 +107,7 @@ extern catch_t *_curCatch;
|
||||
debugger. */
|
||||
extern void _throw(catch_t *,
|
||||
const char *fname,
|
||||
- unsigned long line,
|
||||
+ u_int32_t line,
|
||||
Exception,
|
||||
const char *s) __attribute__ ((__noreturn__));
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_rbtree_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/rbtree.c.orig Mon Aug 5 21:21:38 2002
|
||||
+++ base/src/common/rbtree.c Tue Aug 27 12:25:27 2002
|
||||
@@ -99,7 +99,7 @@ rbtree_s_cmpkey(const rbnode *rn1, const
|
||||
|
||||
|
||||
rbnode *
|
||||
-rbnode_create(const void *kvp, unsigned long kw, const void *data)
|
||||
+rbnode_create(const void *kvp, u_int32_t kw, const void *data)
|
||||
{
|
||||
rbnode *rbn = GC_MALLOC(sizeof(rbnode));
|
||||
rbn->left = TREE_NIL;
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_rbtree_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/rbtree.h.orig Mon Jul 29 22:48:43 2002
|
||||
+++ base/src/common/rbtree.h Tue Aug 27 12:25:27 2002
|
||||
@@ -47,7 +47,7 @@
|
||||
typedef struct rbkey rbkey;
|
||||
struct rbkey {
|
||||
const void *vp;
|
||||
- unsigned long w;
|
||||
+ u_int32_t w;
|
||||
};
|
||||
|
||||
/* The rbnode and rbkey structures are exposed because it is sometimes
|
||||
@@ -103,7 +103,7 @@ int rbtree_compare_node_to_key(rbtree*,
|
||||
int rbtree_compare_nodes(rbtree*, rbnode *, rbnode *);
|
||||
|
||||
/* For situations where the rbnode itself is sufficient: */
|
||||
-rbnode *rbnode_create(const void *kvp, unsigned long kw, const void *data);
|
||||
+rbnode *rbnode_create(const void *kvp, u_int32_t kw, const void *data);
|
||||
|
||||
#ifndef NDEBUG
|
||||
/* tree_validate() -- check the subtree of ROOT rooted at NODE for
|
@ -1,47 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_sxdelta_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/sxdelta.c.orig Mon Aug 5 16:03:05 2002
|
||||
+++ base/src/common/sxdelta.c Tue Aug 27 12:25:27 2002
|
||||
@@ -133,7 +133,7 @@
|
||||
something using limits.h to choose the proper value. */
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
-typedef unsigned long uint32_t;
|
||||
+typedef u_int32_t uint32_t;
|
||||
#endif
|
||||
|
||||
typedef struct hashpos_t {
|
||||
@@ -597,9 +597,9 @@ emit_finish(sxdelta_t *xd)
|
||||
#define HT_SHA1 0
|
||||
|
||||
typedef struct xdirent_t {
|
||||
- unsigned long insOffset; /* of start of insert pool list */
|
||||
- unsigned long cmdOffset; /* of start of CMD list */
|
||||
- unsigned long cmdLen; /* of CMD list */
|
||||
+ u_int32_t insOffset; /* of start of insert pool list */
|
||||
+ u_int32_t cmdOffset; /* of start of CMD list */
|
||||
+ u_int32_t cmdLen; /* of CMD list */
|
||||
unsigned const char *name; /* entry name */
|
||||
} xdirent_t;
|
||||
|
||||
@@ -608,9 +608,9 @@ typedef struct XDeltaArchive_t {
|
||||
unsigned short version; /* currently 1 */
|
||||
unsigned short flags; /* currently 0 */
|
||||
|
||||
- unsigned long nDirent; /* number of entries */
|
||||
- unsigned long maxDirent; /* allocated dir space */
|
||||
- unsigned long nContent; /* number of stored deltas */
|
||||
+ u_int32_t nDirent; /* number of entries */
|
||||
+ u_int32_t maxDirent; /* allocated dir space */
|
||||
+ u_int32_t nContent; /* number of stored deltas */
|
||||
struct xdirent_t *dir;
|
||||
|
||||
Buffer *content; /* sequence of serialized xdeltas */
|
||||
@@ -694,7 +694,7 @@ xda_rewriteWith(XDeltaArchive_t *xda, sx
|
||||
unsigned u;
|
||||
|
||||
ocmoff_t contentLen = buffer_length(xda->content);
|
||||
- unsigned long newLen = contentLen;
|
||||
+ u_int32_t newLen = contentLen;
|
||||
newLen += stream_length(xd->ins);
|
||||
newLen += stream_length(xd->cmd);
|
||||
xda->nContent = newLen;
|
@ -1,66 +0,0 @@
|
||||
$OpenBSD: patch-base_src_common_util_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/common/util.c.orig Mon Aug 5 16:03:07 2002
|
||||
+++ base/src/common/util.c Tue Aug 27 12:25:27 2002
|
||||
@@ -179,8 +179,8 @@ nmequal(const char *s1, const char *s2)
|
||||
size_t
|
||||
xprintf(const char *fmt, ...)
|
||||
{
|
||||
- unsigned long len;
|
||||
- unsigned long width = 0;
|
||||
+ u_int32_t len;
|
||||
+ u_int32_t width = 0;
|
||||
OC_bool sign;
|
||||
OC_bool rightAdjust;
|
||||
char fillchar;
|
||||
@@ -199,7 +199,7 @@ xprintf(const char *fmt, ...)
|
||||
continue;
|
||||
}
|
||||
|
||||
- /* largest thing we might convert fits in 20 digits (unsigned long
|
||||
+ /* largest thing we might convert fits in 20 digits (u_int32_t
|
||||
* long as decimal */
|
||||
|
||||
pend = &buf[20];
|
||||
@@ -263,7 +263,7 @@ xprintf(const char *fmt, ...)
|
||||
case 'd':
|
||||
{
|
||||
long l;
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
|
||||
l = va_arg(ap, long);
|
||||
|
||||
@@ -277,7 +277,7 @@ xprintf(const char *fmt, ...)
|
||||
ul = (l < 0) ? (unsigned) -l : (unsigned) l;
|
||||
|
||||
if (l == LONG_MIN)
|
||||
- ul = ((unsigned long) LONG_MAX) + 1ul;
|
||||
+ ul = ((u_int32_t) LONG_MAX) + 1ul;
|
||||
|
||||
while(ul) {
|
||||
*(--p) = '0' + (ul % 10);
|
||||
@@ -288,9 +288,9 @@ xprintf(const char *fmt, ...)
|
||||
}
|
||||
case 'u':
|
||||
{
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
|
||||
- ul = va_arg(ap, unsigned long);
|
||||
+ ul = va_arg(ap, u_int32_t);
|
||||
|
||||
if (ul == 0) {
|
||||
*(--p) = '0';
|
||||
@@ -305,10 +305,10 @@ xprintf(const char *fmt, ...)
|
||||
}
|
||||
case 'x':
|
||||
{
|
||||
- unsigned long ul;
|
||||
+ u_int32_t ul;
|
||||
static char *hex_digits = "0123456789abcdef";
|
||||
|
||||
- ul = va_arg(ap, unsigned long);
|
||||
+ ul = va_arg(ap, u_int32_t);
|
||||
|
||||
if (ul == 0) {
|
||||
*(--p) = '0';
|
16
devel/opencm/patches/patch-base_src_common_xfopen_c
Normal file
16
devel/opencm/patches/patch-base_src_common_xfopen_c
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-base_src_common_xfopen_c,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/common/xfopen.c.orig Wed Jul 17 12:10:40 2002
|
||||
+++ base/src/common/xfopen.c Wed Aug 28 14:26:40 2002
|
||||
@@ -73,6 +73,11 @@ xfopen(const char *path, const char mode
|
||||
void
|
||||
xfclose(FILE *f)
|
||||
{
|
||||
+ int retval;
|
||||
if (f != NULL)
|
||||
- fclose(f);
|
||||
+ {
|
||||
+ retval = fclose(f);
|
||||
+ if(retval) /* shame we can't get the filename here... */
|
||||
+ THROW(ExTruncated, format("Closing file failed, error %d\n", retval));
|
||||
+ }
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
$OpenBSD: patch-base_src_help_bind_help,v 1.3 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/bind.help.orig Sun Aug 4 11:51:35 2002
|
||||
+++ base/src/help/bind.help Tue Aug 27 12:30:49 2002
|
||||
@@ -43,5 +43,5 @@ Adds an entry in the user's directory th
|
||||
+++ base/src/help/bind.help Wed Aug 28 14:26:40 2002
|
||||
@@ -43,5 +43,4 @@ Adds an entry in the user's directory th
|
||||
In most cases @i{value} is the truename of some archived object and
|
||||
@i{key} is the more user-friendly name associated with that object.
|
||||
|
||||
-See also: @b{ls}, @b{mkdir}, @b{add user} @b{import},
|
||||
+See also: @b{ls}, @b{mkdir}, @b{adduser} @b{import},
|
||||
@b{create branch}.
|
||||
-@b{create branch}.
|
||||
+See also: @b{ls}, @b{mkdir}, @b{add user} @b{import}, @b{create branch}.
|
||||
|
51
devel/opencm/patches/patch-base_src_help_create-project_help
Normal file
51
devel/opencm/patches/patch-base_src_help_create-project_help
Normal file
@ -0,0 +1,51 @@
|
||||
$OpenBSD: patch-base_src_help_create-project_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/create-project.help.orig Wed Aug 28 14:26:40 2002
|
||||
+++ base/src/help/create-project.help Wed Aug 28 14:26:40 2002
|
||||
@@ -0,0 +1,47 @@
|
||||
+@C Copyright (c) 2002, The EROS Group, LLC and Johns Hopkins
|
||||
+@C University. All rights reserved.
|
||||
+@C
|
||||
+@C This software was developed to support the EROS secure operating
|
||||
+@C system project (http://www.eros-os.org). The latest version of
|
||||
+@C the OpenCM software can be found at http://www.opencm.org.
|
||||
+@C
|
||||
+@C Redistribution and use in source and binary forms, with or
|
||||
+@C without modification, are permitted provided that the following
|
||||
+@C conditions are met:
|
||||
+@C
|
||||
+@C 1. Redistributions of source code must retain the above copyright
|
||||
+@C notice, this list of conditions and the following disclaimer.
|
||||
+@C
|
||||
+@C 2. Redistributions in binary form must reproduce the above
|
||||
+@C copyright notice, this list of conditions and the following
|
||||
+@C disclaimer in the documentation and/or other materials
|
||||
+@C provided with the distribution.
|
||||
+@C
|
||||
+@C 3. Neither the name of the The EROS Group, LLC nor the name of
|
||||
+@C Johns Hopkins University, nor the names of its contributors
|
||||
+@C may be used to endorse or promote products derived from this
|
||||
+@C software without specific prior written permission.
|
||||
+@C
|
||||
+@C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
+@C CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
+@C INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
+@C MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
+@C DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
+@C BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
+@C EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
+@C TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+@C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
+@C ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
+@C OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
+@C OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
+@C POSSIBILITY OF SUCH DAMAGE.
|
||||
+@C
|
||||
+@C
|
||||
+@b{create project} @i{new-name}
|
||||
+
|
||||
+Creates a new project and a new empty branch and binds @i{new-name} to the
|
||||
+new empty branch in the user's directory. All projects are internally
|
||||
+referenced by branches and all operations are done relative to a branch.
|
||||
+Thus, you can always find the associated project name by listing any branch.
|
||||
+
|
||||
+See also: @b{ls}, @b{create branch}
|
@ -1,5 +1,6 @@
|
||||
--- base/src/help/gremove.help.orig Thu Aug 15 13:14:02 2002
|
||||
+++ base/src/help/gremove.help Thu Aug 15 13:14:16 2002
|
||||
$OpenBSD: patch-base_src_help_gremove_help,v 1.2 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/gremove.help.orig Mon Jul 29 22:48:32 2002
|
||||
+++ base/src/help/gremove.help Wed Aug 28 14:26:40 2002
|
||||
@@ -41,4 +41,4 @@
|
||||
|
||||
Removes specified @i{member} from the existing group @i{group-spec}.
|
||||
|
12
devel/opencm/patches/patch-base_src_help_import_help
Normal file
12
devel/opencm/patches/patch-base_src_help_import_help
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_src_help_import_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/import.help.orig Sun Aug 4 11:51:38 2002
|
||||
+++ base/src/help/import.help Wed Aug 28 14:26:40 2002
|
||||
@@ -44,7 +44,7 @@ files in the working directory for uploa
|
||||
|
||||
Permanent changes don't take effect until the execution of the
|
||||
@b{commit} command. To undo any additions, use the @b{revert}
|
||||
-command. A new enty called @i{new-name} is created in the user's
|
||||
+command. A new entry called @i{new-name} is created in the user's
|
||||
directory and is bound to the newly created main branch. An entry for
|
||||
the project name is bound within that branch.
|
||||
|
49
devel/opencm/patches/patch-base_src_help_mv_help
Normal file
49
devel/opencm/patches/patch-base_src_help_mv_help
Normal file
@ -0,0 +1,49 @@
|
||||
$OpenBSD: patch-base_src_help_mv_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/mv.help.orig Wed Aug 28 14:26:40 2002
|
||||
+++ base/src/help/mv.help Wed Aug 28 14:26:40 2002
|
||||
@@ -0,0 +1,45 @@
|
||||
+@C Copyright (c) 2002, The EROS Group, LLC and Johns Hopkins
|
||||
+@C University. All rights reserved.
|
||||
+@C
|
||||
+@C This software was developed to support the EROS secure operating
|
||||
+@C system project (http://www.eros-os.org). The latest version of
|
||||
+@C the OpenCM software can be found at http://www.opencm.org.
|
||||
+@C
|
||||
+@C Redistribution and use in source and binary forms, with or
|
||||
+@C without modification, are permitted provided that the following
|
||||
+@C conditions are met:
|
||||
+@C
|
||||
+@C 1. Redistributions of source code must retain the above copyright
|
||||
+@C notice, this list of conditions and the following disclaimer.
|
||||
+@C
|
||||
+@C 2. Redistributions in binary form must reproduce the above
|
||||
+@C copyright notice, this list of conditions and the following
|
||||
+@C disclaimer in the documentation and/or other materials
|
||||
+@C provided with the distribution.
|
||||
+@C
|
||||
+@C 3. Neither the name of the The EROS Group, LLC nor the name of
|
||||
+@C Johns Hopkins University, nor the names of its contributors
|
||||
+@C may be used to endorse or promote products derived from this
|
||||
+@C software without specific prior written permission.
|
||||
+@C
|
||||
+@C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
+@C CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
+@C INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
+@C MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
+@C DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
+@C BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
+@C EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
+@C TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+@C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
+@C ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
+@C OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
+@C OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
+@C POSSIBILITY OF SUCH DAMAGE.
|
||||
+@C
|
||||
+@C
|
||||
+@b{mv} @i{old-fsname} @i{new-fsname}
|
||||
+
|
||||
+Changes the fsName for an archived object. Permanent changes only take effect
|
||||
+after executing a subsequent @b{commit}.
|
||||
+
|
||||
+See also: @b{commit}, @b{revert}
|
52
devel/opencm/patches/patch-base_src_help_rename-entity_help
Normal file
52
devel/opencm/patches/patch-base_src_help_rename-entity_help
Normal file
@ -0,0 +1,52 @@
|
||||
$OpenBSD: patch-base_src_help_rename-entity_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/rename-entity.help.orig Mon Jul 8 16:32:09 2002
|
||||
+++ base/src/help/rename-entity.help Wed Aug 28 14:26:40 2002
|
||||
@@ -1,48 +0,0 @@
|
||||
-@C Copyright (c) 2002, The EROS Group, LLC and Johns Hopkins
|
||||
-@C University. All rights reserved.
|
||||
-@C
|
||||
-@C This software was developed to support the EROS secure operating
|
||||
-@C system project (http://www.eros-os.org). The latest version of
|
||||
-@C the OpenCM software can be found at http://www.opencm.org.
|
||||
-@C
|
||||
-@C Redistribution and use in source and binary forms, with or
|
||||
-@C without modification, are permitted provided that the following
|
||||
-@C conditions are met:
|
||||
-@C
|
||||
-@C 1. Redistributions of source code must retain the above copyright
|
||||
-@C notice, this list of conditions and the following disclaimer.
|
||||
-@C
|
||||
-@C 2. Redistributions in binary form must reproduce the above
|
||||
-@C copyright notice, this list of conditions and the following
|
||||
-@C disclaimer in the documentation and/or other materials
|
||||
-@C provided with the distribution.
|
||||
-@C
|
||||
-@C 3. Neither the name of the The EROS Group, LLC nor the name of
|
||||
-@C Johns Hopkins University, nor the names of its contributors
|
||||
-@C may be used to endorse or promote products derived from this
|
||||
-@C software without specific prior written permission.
|
||||
-@C
|
||||
-@C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
-@C CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
-@C INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
-@C MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
-@C DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
-@C BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
-@C EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
-@C TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
-@C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
-@C ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
-@C OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
-@C OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-@C POSSIBILITY OF SUCH DAMAGE.
|
||||
-@C
|
||||
-@C
|
||||
-@b{rename entity} @i{old-fsname} @i{new-fsname}
|
||||
-@b{mv} @i{old-fsname} @i{new-fsname}
|
||||
-
|
||||
-Changes the fsName for an archived object.
|
||||
-
|
||||
-Permanent changes only take effect after executing
|
||||
-a subsequent @b{commit}.
|
||||
-
|
||||
-See also: @b{commit}, @b{revert}
|
@ -1,5 +1,6 @@
|
||||
$OpenBSD: patch-base_src_help_revert_help,v 1.3 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/revert.help.orig Sun Aug 4 11:51:40 2002
|
||||
+++ base/src/help/revert.help Tue Aug 27 12:30:49 2002
|
||||
+++ base/src/help/revert.help Wed Aug 28 14:26:40 2002
|
||||
@@ -43,7 +43,7 @@ Removes all modifications to a user's Wo
|
||||
the last @b{commit}.
|
||||
|
||||
|
24
devel/opencm/patches/patch-base_src_help_rm_help
Normal file
24
devel/opencm/patches/patch-base_src_help_rm_help
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-base_src_help_rm_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/rm.help.orig Mon Jul 29 22:48:40 2002
|
||||
+++ base/src/help/rm.help Wed Aug 28 14:26:40 2002
|
||||
@@ -37,14 +37,13 @@
|
||||
@C POSSIBILITY OF SUCH DAMAGE.
|
||||
@C
|
||||
@C
|
||||
-@b{remove file} @i{[file}}+
|
||||
+@b{rm} @i{[file]}+
|
||||
|
||||
-Remove one or more files from an existing project. User's workspace
|
||||
-specifies current (working) branch and this command must be executed
|
||||
-within that workspace.
|
||||
+Remove one or more files from an existing project. User's workspace specifies
|
||||
+current (working) branch and this command must be executed within that
|
||||
+workspace.
|
||||
|
||||
-Permanent changes don't take effect until the execution of the
|
||||
-@i{commit} command. To undo any additions, use the @i{ revert}
|
||||
-command.
|
||||
+Permanent changes don't take effect until the execution of the @i{commit}
|
||||
+command. To undo any additions, use the @i{revert} command.
|
||||
|
||||
See also: @b{commit}, @b{add file}
|
47
devel/opencm/patches/patch-base_src_help_whoami_help
Normal file
47
devel/opencm/patches/patch-base_src_help_whoami_help
Normal file
@ -0,0 +1,47 @@
|
||||
$OpenBSD: patch-base_src_help_whoami_help,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/help/whoami.help.orig Wed Aug 28 14:26:40 2002
|
||||
+++ base/src/help/whoami.help Wed Aug 28 14:26:40 2002
|
||||
@@ -0,0 +1,43 @@
|
||||
+@C Copyright (c) 2002, The EROS Group, LLC and Johns Hopkins
|
||||
+@C University. All rights reserved.
|
||||
+@C
|
||||
+@C This software was developed to support the EROS secure operating
|
||||
+@C system project (http://www.eros-os.org). The latest version of
|
||||
+@C the OpenCM software can be found at http://www.opencm.org.
|
||||
+@C
|
||||
+@C Redistribution and use in source and binary forms, with or
|
||||
+@C without modification, are permitted provided that the following
|
||||
+@C conditions are met:
|
||||
+@C
|
||||
+@C 1. Redistributions of source code must retain the above copyright
|
||||
+@C notice, this list of conditions and the following disclaimer.
|
||||
+@C
|
||||
+@C 2. Redistributions in binary form must reproduce the above
|
||||
+@C copyright notice, this list of conditions and the following
|
||||
+@C disclaimer in the documentation and/or other materials
|
||||
+@C provided with the distribution.
|
||||
+@C
|
||||
+@C 3. Neither the name of the The EROS Group, LLC nor the name of
|
||||
+@C Johns Hopkins University, nor the names of its contributors
|
||||
+@C may be used to endorse or promote products derived from this
|
||||
+@C software without specific prior written permission.
|
||||
+@C
|
||||
+@C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
+@C CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
+@C INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
+@C MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
+@C DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
+@C BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
+@C EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||
+@C TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+@C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
+@C ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
+@C OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
+@C OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
+@C POSSIBILITY OF SUCH DAMAGE.
|
||||
+@C
|
||||
+@C
|
||||
+@b{whoami}
|
||||
+
|
||||
+Displays some information about the current user key, particularly, the email
|
||||
+address associated with that key, and it's expiration date.
|
11
devel/opencm/patches/patch-base_src_opencm-builddir_h
Normal file
11
devel/opencm/patches/patch-base_src_opencm-builddir_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-base_src_opencm-builddir_h,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/src/opencm-builddir.h.orig Mon Aug 5 21:47:11 2002
|
||||
+++ base/src/opencm-builddir.h Wed Aug 28 14:26:40 2002
|
||||
@@ -43,6 +43,6 @@
|
||||
|
||||
/* Generated automatically from opencm-builddir.h.in by configure. */
|
||||
|
||||
-#define CM_BUILD_PWD "/home/opencm/WORK/base"
|
||||
+#define CM_BUILD_PWD "/u/todd/src/cm/DEV/base"
|
||||
|
||||
#endif /* OPENCM_BUILDDIR_H */
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_opencm_h,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/opencm.h.orig Mon Aug 5 16:03:07 2002
|
||||
+++ base/src/opencm.h Tue Aug 27 12:25:27 2002
|
||||
@@ -110,7 +110,7 @@ typedef struct Repository Repository;
|
||||
typedef struct command command;
|
||||
|
||||
#if SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
-typedef unsigned long long oc_uint64_t;
|
||||
+typedef u_int32_t long oc_uint64_t;
|
||||
#elif SIZEOF___UINT64 == 8
|
||||
typedef __uint64 oc_uint64_t;
|
||||
#error "OpenCM requires a 64-bit unsigned type."
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_repos_fs_FSRepos_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/repos/fs/FSRepos.c.orig Mon Aug 5 20:06:47 2002
|
||||
+++ base/src/repos/fs/FSRepos.c Tue Aug 27 12:25:27 2002
|
||||
@@ -1005,7 +1005,7 @@ fsrepos_GetMutable(Repository *r, const
|
||||
}
|
||||
|
||||
static Mutable *
|
||||
-fsrepos_ReviseMutable(Repository *r, const char *mURI, unsigned long
|
||||
+fsrepos_ReviseMutable(Repository *r, const char *mURI, u_int32_t
|
||||
long curTopRev, void *s)
|
||||
{
|
||||
Mutable *m = repos_GetMutable(r, mURI);
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_repos_net_NetRepository_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/repos/net/NetRepository.c.orig Mon Jul 22 02:02:48 2002
|
||||
+++ base/src/repos/net/NetRepository.c Tue Aug 27 12:25:27 2002
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <opencm.h>
|
||||
#include <repos/opencmrepos.h>
|
||||
|
||||
-static unsigned long request_id = 0;
|
||||
+static u_int32_t request_id = 0;
|
||||
|
||||
#define make_request(x) do_make_request(OP_##x)
|
||||
static Request *
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_src_server_DoRequest_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/src/server/DoRequest.c.orig Mon Jul 22 02:02:50 2002
|
||||
+++ base/src/server/DoRequest.c Tue Aug 27 12:25:27 2002
|
||||
@@ -189,7 +189,7 @@ svr_DoRequest(Channel *c, Request *req)
|
||||
Reply *reply;
|
||||
OC_bool shouldQuit = FALSE;
|
||||
|
||||
- static unsigned long nRequests = 0;
|
||||
+ static u_int32_t nRequests = 0;
|
||||
|
||||
SDR_stream *reply_strm;
|
||||
|
@ -1,92 +0,0 @@
|
||||
$OpenBSD: patch-base_tools_cvsconvert_py,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/tools/cvsconvert.py.orig Mon Jul 29 22:48:41 2002
|
||||
+++ base/tools/cvsconvert.py Tue Aug 27 12:25:27 2002
|
||||
@@ -12,9 +12,9 @@ files = []
|
||||
versions = []
|
||||
commits = {}
|
||||
|
||||
-scratch_dir = "/tmp/scratchme.$$"
|
||||
+scratch_dir = "$sd/workspace"
|
||||
co_scratchfile = "%s.%d" % ("/tmp/cvscvt-coscratch", os.getpid())
|
||||
-msg_scratchfile = "/tmp/cvscvt-msgscratch.$$"
|
||||
+msg_scratchfile = "$sd/cvscvt-msgscratch.$$"
|
||||
startup_dir = os.getcwd()
|
||||
verbose = 0
|
||||
|
||||
@@ -202,6 +202,9 @@ class CvtSink:
|
||||
# a branch was created and the file was immediately deleted on the
|
||||
# branch.
|
||||
v.operation = "I"
|
||||
+ elif (v.state == "dead" and brstate[br] == "dead"):
|
||||
+ # I dont know why this happened, but it exists in OpenBSD cvs.
|
||||
+ v.operation = "D"
|
||||
else:
|
||||
raise "%s:%s: Unknown object state transition (%s -> %s)!" % (self.rcsname, v.revision, brstate[br], v.state)
|
||||
|
||||
@@ -554,7 +557,7 @@ class AppGui(Frame):
|
||||
if len(adds) > 0:
|
||||
avec = adds
|
||||
while len(avec) > 0:
|
||||
- self.text.insert(END, "${OPENCM} --flush-io -C %s add" % scratch_dir, "CMD")
|
||||
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io add" % scratch_dir, "CMD")
|
||||
map (lambda x, self=self: self.text.insert(END, " '%s'" % x.opencmname, "INPUT"), avec[0:10])
|
||||
self.text.insert(END, "\n", "CMD")
|
||||
self.text.insert(END, "checkstatus $? \"add failed\"\n", "CMD")
|
||||
@@ -563,7 +566,7 @@ class AppGui(Frame):
|
||||
if len(deletes) > 0:
|
||||
dvec = deletes
|
||||
while len(dvec) > 0:
|
||||
- self.text.insert(END, "${OPENCM} --flush-io -C %s rm" % scratch_dir, "CMD")
|
||||
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io rm" % scratch_dir, "CMD")
|
||||
map (lambda x, self=self: self.text.insert(END, " '%s'" % x.opencmname, "INPUT"), dvec[0:10])
|
||||
self.text.insert(END, "\n", "CMD")
|
||||
self.text.insert(END, "checkstatus $? \"remove failed\"\n", "CMD")
|
||||
@@ -578,7 +581,7 @@ class AppGui(Frame):
|
||||
# Note: Following activity is illegal in 17 states.
|
||||
avec = active
|
||||
while len(avec) > 0:
|
||||
- self.text.insert(END, "${OPENCM} --flush-io -C %s --force-hash status" % scratch_dir, "CMD")
|
||||
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io --force-hash status" % scratch_dir, "CMD")
|
||||
map (lambda x, self=self: self.text.insert(END, " %s" % x.opencmname, "INPUT"), avec[0:10])
|
||||
self.text.insert(END, "\n", "CMD")
|
||||
self.text.insert(END, "checkstatus $? \"status check failed\"\n", "CMD")
|
||||
@@ -593,7 +596,7 @@ class AppGui(Frame):
|
||||
|
||||
# re_squote.sub("'\"'\"'", cmtmsg))
|
||||
|
||||
- self.text.insert(END, "${OPENCM} --flush-io -C %s commit --messagefile %s\n" %
|
||||
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io commit --messagefile %s\n" %
|
||||
(scratch_dir, msg_scratchfile), "CMD")
|
||||
self.text.insert(END, "checkstatus $? \"commit failed\"\n", "CMD")
|
||||
self.text.insert(END, "rm %s\n" % msg_scratchfile, "CMD")
|
||||
@@ -636,9 +639,11 @@ class AppGui(Frame):
|
||||
|
||||
self.text.insert(END, "OPENCM=${OPENCM:-cm}\n", "CMD")
|
||||
self.text.insert(END, "export OPENCM\n", "CMD")
|
||||
+ self.text.insert(END, "TMPDIR=${TMPDIR:-/tmp}\n", "CMD")
|
||||
+ self.text.insert(END, "sd=$(mktemp -d ${TMPDIR}/scratchme.XXXXXX)\n", "CMD")
|
||||
self.text.insert(END, "\n")
|
||||
|
||||
- self.text.insert(END, "function checkstatus()\n");
|
||||
+ self.text.insert(END, "checkstatus()\n");
|
||||
self.text.insert(END, "{\n");
|
||||
self.text.insert(END, " if [ $1 -ne 0 ]\n");
|
||||
self.text.insert(END, " then\n");
|
||||
@@ -647,7 +652,7 @@ class AppGui(Frame):
|
||||
self.text.insert(END, " fi\n");
|
||||
self.text.insert(END, "}\n");
|
||||
self.text.insert(END, "\n")
|
||||
- self.text.insert(END, "function process_cvsignore()\n");
|
||||
+ self.text.insert(END, "process_cvsignore()\n");
|
||||
self.text.insert(END, "{\n");
|
||||
self.text.insert(END, " echo CONVERTING .cvsignore: $1 '->' $2\n");
|
||||
self.text.insert(END, " sed 's/^/exclude /' $1 > $2\n");
|
||||
@@ -660,7 +665,7 @@ class AppGui(Frame):
|
||||
self.text.insert(END, "checkstatus $? \"create project failed\"\n", "CMD");
|
||||
|
||||
self.text.insert(END, "rm -rf %s\n" % scratch_dir, "CMD")
|
||||
- self.text.insert(END, "mkdir %s\n" % scratch_dir, "CMD")
|
||||
+ self.text.insert(END, "mkdir -p %s\n" % scratch_dir, "CMD")
|
||||
self.text.insert(END, "\n")
|
||||
self.text.insert(END, "# Check out empty project so we have something to work with\n", "COMMENT")
|
||||
self.text.insert(END, "(cd %s;${OPENCM} checkout %s)\n" % (scratch_dir, self.petName.get()), "CMD")
|
12
devel/opencm/patches/patch-base_zlib_Makefile
Normal file
12
devel/opencm/patches/patch-base_zlib_Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-base_zlib_Makefile,v 1.1 2002/08/28 22:23:29 todd Exp $
|
||||
--- base/zlib/Makefile.orig Mon Aug 5 21:47:11 2002
|
||||
+++ base/zlib/Makefile Wed Aug 28 14:26:40 2002
|
||||
@@ -23,7 +23,7 @@ CFLAGS=-g
|
||||
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
||||
# -Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
-LDFLAGS=
|
||||
+LDFLAGS=-L/usr/local/lib
|
||||
LDSHARED=$(CC)
|
||||
CPP=$(CC) -E
|
||||
|
@ -1,34 +0,0 @@
|
||||
$OpenBSD: patch-base_zlib_gzio_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/zlib/gzio.c.orig Mon Jul 22 01:37:42 2002
|
||||
+++ base/zlib/gzio.c Tue Aug 27 12:25:27 2002
|
||||
@@ -681,6 +681,7 @@ z_off_t ZEXPORT gzseek (file, offset, wh
|
||||
/* At this point, offset is the number of zero bytes to write. */
|
||||
if (s->inbuf == Z_NULL) {
|
||||
s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
|
||||
+ if (s->inbuf == Z_NULL) return -1L;
|
||||
zmemzero(s->inbuf, Z_BUFSIZE);
|
||||
}
|
||||
while (offset > 0) {
|
||||
@@ -723,6 +724,7 @@ z_off_t ZEXPORT gzseek (file, offset, wh
|
||||
|
||||
if (offset != 0 && s->outbuf == Z_NULL) {
|
||||
s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
|
||||
+ if (s->outbuf == Z_NULL) return -1L;
|
||||
}
|
||||
while (offset > 0) {
|
||||
int size = Z_BUFSIZE;
|
||||
@@ -862,12 +864,13 @@ const char* ZEXPORT gzerror (file, errn
|
||||
*errnum = s->z_err;
|
||||
if (*errnum == Z_OK) return (const char*)"";
|
||||
|
||||
- m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
|
||||
+ m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
|
||||
|
||||
if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
|
||||
|
||||
TRYFREE(s->msg);
|
||||
s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
|
||||
+ if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
|
||||
strcpy(s->msg, s->path);
|
||||
strcat(s->msg, ": ");
|
||||
strcat(s->msg, m);
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-base_zlib_zutil_c,v 1.1 2002/08/27 17:43:14 todd Exp $
|
||||
--- base/zlib/zutil.c.orig Mon Jul 22 01:37:42 2002
|
||||
+++ base/zlib/zutil.c Tue Aug 27 12:25:27 2002
|
||||
@@ -211,6 +211,8 @@ voidpf zcalloc (opaque, items, size)
|
||||
unsigned size;
|
||||
{
|
||||
if (opaque) items += size - size; /* make compiler happy */
|
||||
+ if (items * size == 0)
|
||||
+ return (NULL);
|
||||
return (voidpf)calloc(items, size);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/08/27 16:46:09 todd Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2002/08/28 22:23:29 todd Exp $
|
||||
bin/cm
|
||||
share/opencm/help/add.help
|
||||
share/opencm/help/adduser.help
|
||||
@ -24,7 +24,6 @@ share/opencm/help/opt-basic.help
|
||||
share/opencm/help/opt-obscure.help
|
||||
share/opencm/help/opt-server.help
|
||||
share/opencm/help/rebind.help
|
||||
share/opencm/help/rename-entity.help
|
||||
share/opencm/help/revert.help
|
||||
share/opencm/help/revoke.help
|
||||
share/opencm/help/rm.help
|
||||
|
Loading…
Reference in New Issue
Block a user