Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2009 07:35:26 +0200
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/130856: [PATCH] make installworld work when WITHOUT_GAMES is set
Message-ID:  <87ljt3ucm9.fsf@kobe.laptop>
Resent-Message-ID: <200901220540.n0M5e3nO093009@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         130856
>Category:       bin
>Synopsis:       [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:
>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:
>Unformatted:



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