From keramida@freebsd.org  Thu Jan 22 05:35:41 2009
Return-Path: <keramida@freebsd.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2B0E0106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Jan 2009 05:35:41 +0000 (UTC)
	(envelope-from keramida@freebsd.org)
Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36])
	by mx1.freebsd.org (Postfix) with ESMTP id 767588FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Jan 2009 05:35:36 +0000 (UTC)
	(envelope-from keramida@freebsd.org)
Received: from kobe.laptop (adsl189-242.kln.forthnet.gr [79.103.2.242])
	(authenticated bits=128)
	by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n0M5ZRRs028736
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Jan 2009 07:35:32 +0200
Received: from kobe.laptop (kobe.laptop [127.0.0.1])
	by kobe.laptop (8.14.3/8.14.3) with ESMTP id n0M5ZQ29060202
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Jan 2009 07:35:26 +0200 (EET)
	(envelope-from keramida@freebsd.org)
Received: (from keramida@localhost)
	by kobe.laptop (8.14.3/8.14.3/Submit) id n0M5ZQeZ060201;
	Thu, 22 Jan 2009 07:35:26 +0200 (EET)
	(envelope-from keramida@freebsd.org)
Message-Id: <87ljt3ucm9.fsf@kobe.laptop>
Date: Thu, 22 Jan 2009 07:35:26 +0200
From: Giorgos Keramidas <keramida@freebsd.org>
Reply-To: Giorgos Keramidas <keramida@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [PATCH] make installworld work when WITHOUT_GAMES is set
X-Send-Pr-Version: 3.113
X-GNATS-Notify: keramida

>Number:         130856
>Category:       misc
>Synopsis:       [build] [patch] make installworld work when WITHOUT_GAMES is set
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 22 05:40:03 UTC 2009
>Closed-Date:    
>Last-Modified:  Fri Dec 18 11:40:05 UTC 2009
>Originator:     Giorgos Keramidas
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
FreeBSD
>Environment:

System: FreeBSD kobe 8.0-CURRENT FreeBSD 8.0-CURRENT #0: \
Wed Jan 14 02:12:50 EET 2009 build@kobe:/usr/obj/usr/src/sys/KOBE i386

>Description:

An old post at freebsd-questions mentioned that there are 'make world'
issues when the "games" group is missing.  It turns out that we need
this only for /var/games files, so I patched `src/etc/Makefile' and
`src/etc/mtree' to make the /var/games mtree info conditional on
MK_GAMES != "no".

>How-To-Repeat:

Run `make installworld' with:

    env WITHOUT_GAMES='yes' make installworld

The installation should bomb at:

% --------------------------------------------------------------
% >>> Making hierarchy
% --------------------------------------------------------------
% cd /home/build/src; make -f Makefile.inc1 hierarchy
% cd /home/build/src/etc;         make distrib-dirs
% mtree -eU  -f /home/build/src/etc/mtree/BSD.root.dist -p /
% mtree -eU  -f /home/build/src/etc/mtree/BSD.var.dist -p /var
% mtree: line 48: unknown group games
% *** Error code 1
%
% Stop in /home/build/src/etc.
% *** Error code 1
%
% Stop in /home/build/src.
% *** Error code 1
%
% Stop in /home/build/src.
% *** Error code 1
%
% Stop in /home/build/src.
% *** Error code 1
%
% Stop in /home/build/src.
% root@kobe:/home/build/src#

>Fix:

--- nogames.diff begins here ---
diff -r 2860acfe4d07 -r 141cd5ffef80 etc/Makefile
--- a/etc/Makefile	Wed Jan 21 17:49:23 2009 +0000
+++ b/etc/Makefile	Thu Jan 22 07:18:48 2009 +0200
@@ -100,6 +100,9 @@
 .if ${MK_SENDMAIL} != "no"
 MTREE+=	BSD.sendmail.dist
 .endif
+.if ${MK_GAMES} != "no"
+MTREE+= BSD.games.dist
+.endif
 .if ${MK_BIND} != "no"
 MTREE+=	BIND.chroot.dist
 .if ${MK_BIND_LIBS} != "no"
@@ -261,6 +264,9 @@
 .if ${MK_SENDMAIL} != "no"
 	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
 .endif
+.if ${MK_GAMES} != "no"
+	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.games.dist -p ${DESTDIR}/
+.endif
 	cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
 	cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
 	cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
diff -r 2860acfe4d07 -r 141cd5ffef80 etc/mtree/BSD.games.dist
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mtree/BSD.games.dist	Thu Jan 22 07:18:48 2009 +0200
@@ -0,0 +1,16 @@
+# $FreeBSD$
+#
+# Please see the file src/etc/mtree/README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    usr
+        games
+        ..
+    ..
+    var
+        games           gname=games mode=0775
+        ..
+    ..
+..
diff -r 2860acfe4d07 -r 141cd5ffef80 etc/mtree/BSD.usr.dist
--- a/etc/mtree/BSD.usr.dist	Wed Jan 21 17:49:23 2009 +0000
+++ b/etc/mtree/BSD.usr.dist	Thu Jan 22 07:18:48 2009 +0200
@@ -7,8 +7,6 @@
 .
     bin
     ..
-    games
-    ..
     include
     ..
     lib
diff -r 2860acfe4d07 -r 141cd5ffef80 etc/mtree/BSD.var.dist
--- a/etc/mtree/BSD.var.dist	Wed Jan 21 17:49:23 2009 +0000
+++ b/etc/mtree/BSD.var.dist	Thu Jan 22 07:18:48 2009 +0200
@@ -45,8 +45,6 @@
     ..
     empty           mode=0555 flags=schg
     ..
-    games           gname=games mode=0775
-    ..
     heimdal         mode=0700
     ..
     log
--- nogames.diff ends here ---


>Release-Note:
>Audit-Trail:

From: vinzstyle@free.fr
To: bug-followup@freebsd.org, keramida@freebsd.org
Cc:  
Subject: Re: misc/130856: [build] [patch] make installworld work when
 WITHOUT_GAMES is set
Date: Fri, 18 Dec 2009 12:14:00 +0100 (CET)

 Hello,
 
 I'm running 8.0-RELEASE and I've got the same problem. When will this patch be commited ?
 
 Thank you :)
>Unformatted:
