Subject: bin/5415: rcs build problem when LocalId defined
To: None <gnats-bugs@gnats.netbsd.org>
From: Patrick Welche,SCC,ext.30488, <prlw1@newn.cam.ac.uk>
List: netbsd-bugs
Date: 05/07/1998 12:16:36
>Number: 5415
>Category: bin
>Synopsis: rcs build problem when LocalId defined
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 7 04:35:01 1998
>Last-Modified:
>Originator: Patrick Welche
>Organization:
>Release: 1 May 1998
>Environment:
System: NetBSD 1.3E Fri Apr 24 10:47:16 BST 1998 i386
>Description:
Two associated problems:
1) RCS_LOCALID is not picked up from mk.conf (should be changed)
2) Problem if strlen(RCS_LOCALID)>8 (advice needed)
1) src/gnu/usr.bin/rcs/lib/Makefile suggests:
# If you wish to use a different Id token in addition to Id,
# set the variable RCS_LOCALID in mk.conf or environment.
.if defined(RCS_LOCALID)
CPPFLAGS+=-DLOCALID=\"${RCS_LOCALID}\"
.endif
but only reads mk.conf at the end of the file, so RCS_LOCALID cannot be defined
where it is tested.
2) If strlen(RCS_LOCALID)>8, it will be truncated to 8 and not recognised.
>How-To-Repeat:
>Fix:
1) Change the order to test for RCS_LOCALID at the end
*** gnu/usr.bin/rcs/lib/Makefile Thu May 7 11:57:22 1998
--- gnu/usr.bin/rcs/lib/Makefile.orig Wed May 6 17:46:46 1998
***************
*** 1,10 ****
# $NetBSD: Makefile,v 1.14 1998/03/26 13:56:42 tv Exp $
- CFLAGS+=-g
# Define FSYNC_ALL to get slower but safer writes in case of crashes in
# the middle of CVS/RCS changes
CPPFLAGS+=-DFSYNC_ALL
LIB= rcs
SRCS= maketime.c merger.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcstime.c \
--- 1,15 ----
# $NetBSD: Makefile,v 1.14 1998/03/26 13:56:42 tv Exp $
# Define FSYNC_ALL to get slower but safer writes in case of crashes in
# the middle of CVS/RCS changes
CPPFLAGS+=-DFSYNC_ALL
+ # If you wish to use a different Id token in addition to Id,
+ # set the variable RCS_LOCALID in mk.conf or environment.
+ .if defined(RCS_LOCALID)
+ CPPFLAGS+=-DLOCALID=\"${RCS_LOCALID}\"
+ .endif
+
LIB= rcs
SRCS= maketime.c merger.c partime.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcstime.c \
***************
*** 17,25 ****
libinstall::
.include <bsd.lib.mk>
-
- # If you wish to use a different Id token in addition to Id,
- # set the variable RCS_LOCALID in mk.conf or environment.
- .if defined(RCS_LOCALID)
- CPPFLAGS+=-DLOCALID=\"${RCS_LOCALID}\"
- .endif
--- 22,24 ----
2) Either mention in said makefile that the value of keylength in rcsbase.h
must be increased if strlen(RCS_LOCALID)>8, or
CPPFLAGS+=-DLOCALID=\"${RCS_LOCALID}\" -Dkeylength=10
and a mention in the Makefile and
*** gnu/usr.bin/rcs/lib/rcsbase.h Thu May 7 11:56:05 1998
--- gnu/usr.bin/rcs/lib/rcsbase.h.orig Thu May 7 11:53:47 1998
***************
*** 435,443 ****
#define REVISION "Revision"
#define SOURCE "Source"
#define STATE "State"
- #if ( (!defined(keylength)) || (keylength < 8) )
#define keylength 8 /* max length of any of the above keywords */
- #endif
enum markers { Nomatch, Author, Date, Header, Id,
#ifdef LOCALID
--- 435,441 ----
>Audit-Trail:
>Unformatted: