cvs commit: src/usr.sbin/config configvers.h mkmakefile.c src/sys/conf Makefile.alpha Makefile.amd64 Makefile.arm Makefile.i386 Makefile.ia64 Makefile.pc98 Makefile.powerpc Makefile.sparc64 files files.alpha files.amd64 files.i386 ...

Ruslan Ermilov ru at FreeBSD.org
Sun Nov 27 23:02:44 GMT 2005


Hi Warner,

On Sun, Nov 27, 2005 at 03:27:19PM -0700, M. Warner Losh wrote:
> In message: <200511272141.jARLfwca016783 at repoman.freebsd.org>
>             Ruslan Ermilov <ru at FreeBSD.org> writes:
> :   Make config(8) understand ORed dependecies in "files*" and
> :   improve tracking of known devices.  Bump config(8) version.
> 
> I don't think that this bump should have been a major version bump.
> the new config can configure old kernels just fine.  I do think it
> needed a minor bump.  This reminds me, I think that it is time to
> commit my major/minor version stuff...
> 
> If it is OK with you, I'd like to change this to be version 600003.
> 
Should be 600004, 600003 is what it was (the old version that doesn't
understand the new syntax).

> That way, we can use the new config to do both 6.x and 7.x
> configuration.  When we have a config that will no longer do 6.x
> configuration, we can bump the major version to the then current
> -current branch number.
> 
> More specificly, I'd like to apply the following patch (+ fix the
> %VERSREQ in the src/sys/conf/Makefile.*):
> 
> Index: configvers.h
> ===================================================================
> RCS file: /home/ncvs/src/usr.sbin/config/configvers.h,v
> retrieving revision 1.41
> diff -u -r1.41 configvers.h
> --- configvers.h	27 Nov 2005 21:41:57 -0000	1.41
> +++ configvers.h	27 Nov 2005 22:31:10 -0000
> @@ -27,7 +27,8 @@
>   *
>   * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.41 2005/11/27 21:41:57 ru Exp $
>   */
> -#define	CONFIGVERS	700000
> +#define MAJOR_VERS(x)	((x) / 100000)
> +#define	CONFIGVERS	600003
>  
600004

>  /*
>   * Examples of when there should NOT be a bump:
> Index: mkmakefile.c
> ===================================================================
> RCS file: /home/ncvs/src/usr.sbin/config/mkmakefile.c,v
> retrieving revision 1.83
> diff -u -r1.83 mkmakefile.c
> --- mkmakefile.c	27 Nov 2005 21:41:57 -0000	1.83
> +++ mkmakefile.c	27 Nov 2005 22:31:10 -0000
> @@ -160,7 +160,8 @@
>  			do_clean(ofp);
>  		else if (strncmp(line, "%VERSREQ=", sizeof("%VERSREQ=") - 1) == 0) {
>  			versreq = atoi(line + sizeof("%VERSREQ=") - 1);
> -			if (versreq != CONFIGVERS) {
> +			if (MAJOR_VERS(versreq) != MAJOR_VERS(CONFIGVERS) ||
> +			    versreq > CONFIGVERS) {
>  				fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n");
>  				fprintf(stderr, "config version = %d, ", CONFIGVERS);
>  				fprintf(stderr, "version required = %d\n\n", versreq);
> 
> Comments?
> 
This adds an implicit new requirement that inside the same major,
no backward incompatible changes to config(8) are allowed.  I.e.,
all 7xxxxx versions should be able to work with 700000 version of
configs.  It means that backward incompatible changes can only be
made once, when the major number is updated.  This isn't documented
in your patch, so I'm not sure if it was considered (by you) or
not.  So either we divorce CONFIGVERS from __FreeBSD_version and
document this fact and new scheme at the top of mkmakefile.c, or
we shouldn't do it.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20051128/7e816f89/attachment.bin


More information about the cvs-src mailing list