Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2005 16:38:30 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        ru@freebsd.org
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: 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 ...
Message-ID:  <20051127.163830.43671826.imp@bsdimp.com>
In-Reply-To: <20051127230109.GB73919@ip.net.ua>
References:  <200511272141.jARLfwca016783@repoman.freebsd.org> <20051127.152719.78798756.imp@bsdimp.com> <20051127230109.GB73919@ip.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
How does this look to you?

Warner

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 23:37:50 -0000
@@ -1,7 +1,15 @@
+/*-
+ * This file is in the public domain
+ *
+ * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.41 2005/11/27 21:41:57 ru Exp $
+ */
+
 /*
- * 6 digits of version.  The most significant are branch indicators
- * (eg: RELENG_2_2 = 22, -current presently = 70 etc).  The least
- * significant digits are incremented as needed.
+ * 6 digits of version.  The most significant are branch indicators at the
+ * time when the last incompatible change was made (which is why it is
+ * presently 6 on 7-current).  The least significant digits are incremented
+ * as described below.  The format is similar to the __FreeBSD_version, but
+ * not tied to it.
  *
  * DO NOT CASUALLY BUMP THIS NUMBER!  The rules are not the same as shared
  * libs or param.h/osreldate.
@@ -23,23 +31,29 @@
  *
  * Most end-users will use buildkenel and the build tools from buildworld.
  * The people that are inconvenienced by gratuitous bumps are developers
- * who run config by hand. 
+ * who run config by hand.  However, developers shouldn't gratuitously be
+ * inconvenienced.
  *
- * $FreeBSD: src/usr.sbin/config/configvers.h,v 1.41 2005/11/27 21:41:57 ru Exp $
+ * One should bump the CONFIGVERS in the following ways:
+ *
+ * (1) If you change config such that it won't read old config files,
+ *     then bump the major number.  You shouldn't be doing this unless
+ *     you are overhauling config.  Do not casually bump this number
+ *     and by implication do not make changes that would force a bump
+ *     of this number casually.  You should limit major bumps to once
+ *     per branch.
+ * (2) For each new feature added, bump the minor version of this file.
+ *     When a new feature is actually used by the build system, update the
+ *     %VERSREQ field in the Makefile.$ARCH of all the affected makefiles
+ *     (typically all of them).
+ * (3) When you add the first new feature after a branch that's still
+ *     compatible with that branch, increment the hundreds column and reset
+ *     the tens and units column to zero.  If we version 6 of the config
+ *     syntax and we use that same syntax on FreeBSD 7, then the first
+ *     change after 6.x is branch should be 600100.  If we continue to
+ *     use version 6 of the config syntax for FreeBSD 8, it should be
+ *     incremented to 600200.
  */
-#define	CONFIGVERS	700000
 
-/*
- * Examples of when there should NOT be a bump:
- * - Adding a new keyword
- * - Changing the syntax of a keyword such that old syntax will break config.
- * - Changing the syntax of a keyword such that new syntax will break old
- *   config binaries.
- *
- * Examples of when there should be a bump:
- * - When files generated in sys/$mach/compile/NAME are changed and the
- *   Makefile.$mach rules might not handle it correctly.
- * - When there are incompatable changes to the way sys/conf/files.* or the
- *   other associated files are parsed such that they will be interpreted
- *   incorrectly rather than fail outright.
- */
+#define MAJOR_VERS(x)	((x) / 100000)
+#define	CONFIGVERS	600100
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 23:37:50 -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051127.163830.43671826.imp>