From owner-cvs-all@FreeBSD.ORG Sun Nov 27 23:39:50 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56E1216A41F; Sun, 27 Nov 2005 23:39:50 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D97E43D58; Sun, 27 Nov 2005 23:39:49 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jARNcC88052885; Sun, 27 Nov 2005 16:38:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 27 Nov 2005 16:38:30 -0700 (MST) Message-Id: <20051127.163830.43671826.imp@bsdimp.com> To: ru@freebsd.org From: "M. Warner Losh" 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> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 27 Nov 2005 16:38:12 -0700 (MST) 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 ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 23:39:50 -0000 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);