From nobody@FreeBSD.org  Thu Aug  1 11:41:13 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 93D7637B401
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  1 Aug 2002 11:41:13 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5607843E65
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  1 Aug 2002 11:41:13 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g71IfCOT045725
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 1 Aug 2002 11:41:13 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g71IfCtA045724;
	Thu, 1 Aug 2002 11:41:12 -0700 (PDT)
Message-Id: <200208011841.g71IfCtA045724@www.freebsd.org>
Date: Thu, 1 Aug 2002 11:41:12 -0700 (PDT)
From: David Sanderson <dsanderson@panasas.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysinstall build uses kbdcontrol keymaps from the host instead of the source tree
X-Send-Pr-Version: www-1.0

>Number:         41241
>Category:       conf
>Synopsis:       sysinstall build uses kbdcontrol keymaps from the host instead of the source tree
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    murray
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 01 11:50:01 PDT 2002
>Closed-Date:    Thu Jul 15 06:45:06 GMT 2004
>Last-Modified:  Thu Jul 15 06:45:06 GMT 2004
>Originator:     David Sanderson
>Release:        FreeBSD 4.6-RELEASE
>Organization:
Panasas
>Environment:
FreeBSD rack-bsd3 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Tue Jun 11 06:14:12 GMT 2002     murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC  i386     
>Description:
The build of sysinstall runs kbdcontrol -L with the unadorned names of
keymap files, which kbdcontrol finds on the host system instead of the
source tree.  This is a problem when trying to compile the 4.6
sysinstall on an older system that does not have all the keymaps.
For instance, on FreeBSD 4.3 there is no ua.koi8-u.shift.alt keymap
file.
>How-To-Repeat:
mv /usr/share/syscons/keymaps /usr/share/syscons/keymaps.save

and try to build sysinstall.
>Fix:
The following patch to my copy of src/release/sysinstall/Makefile seems
to do the trick:

@@ -82,7 +82,7 @@
 keymap.h:
        rm -f keymap.tmp
        for map in ${KEYMAPS} ; do \
-               kbdcontrol -L $$map | \
+               (cd ${.CURDIR}/../../share/syscons/keymaps; kbdcontrol -L $$map) | \
                        sed -e '/^static accentmap_t/,$$d' >> keymap.tmp ; \
        done
        echo "static struct keymapInfo keymapInfos[] = {" >> keymap.tmp

>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: David Sanderson <dsanderson@panasas.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/41241: sysinstall build uses kbdcontrol keymaps from the host instead of the source tree
Date: Fri, 2 Aug 2002 10:16:24 +0300

 On Thu, Aug 01, 2002 at 11:41:12AM -0700, David Sanderson wrote:
 > 
 > >Number:         41241
 > >Category:       conf
 > >Synopsis:       sysinstall build uses kbdcontrol keymaps from the host instead of the source tree
 > >Originator:     David Sanderson
 > >Release:        FreeBSD 4.6-RELEASE
 > >Environment:
 > FreeBSD rack-bsd3 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Tue Jun 11 06:14:12 GMT 2002     murray@builder.freebsdmall.com:/usr/src/sys/compile/GENERIC  i386     
 > >Description:
 > The build of sysinstall runs kbdcontrol -L with the unadorned names of
 > keymap files, which kbdcontrol finds on the host system instead of the
 > source tree.  This is a problem when trying to compile the 4.6
 > sysinstall on an older system that does not have all the keymaps.
 > For instance, on FreeBSD 4.3 there is no ua.koi8-u.shift.alt keymap
 > file.
 > >How-To-Repeat:
 > mv /usr/share/syscons/keymaps /usr/share/syscons/keymaps.save
 > 
 > and try to build sysinstall.
 > >Fix:
 > The following patch to my copy of src/release/sysinstall/Makefile seems
 > to do the trick:
 > 
 > @@ -82,7 +82,7 @@
 >  keymap.h:
 >         rm -f keymap.tmp
 >         for map in ${KEYMAPS} ; do \
 > -               kbdcontrol -L $$map | \
 > +               (cd ${.CURDIR}/../../share/syscons/keymaps; kbdcontrol -L $$map) | \
 >                         sed -e '/^static accentmap_t/,$$d' >> keymap.tmp ; \
 >         done
 >         echo "static struct keymapInfo keymapInfos[] = {" >> keymap.tmp
 
 Might it not be better to use 'kbdcontrol -L ${.CURDIR}/$$map' ?
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 When you are not looking at it, this sentence is in Spanish.

From: David Sanderson <dsanderson@panasas.com>
To: Peter Pentchev <roam@ringlet.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/41241: sysinstall build uses kbdcontrol keymaps from the host instead of the source tree 
Date: Fri, 02 Aug 2002 09:54:36 -0400

 | > >Fix:
 | > The following patch to my copy of src/release/sysinstall/Makefile seems
 | > to do the trick:
 | > 
 | > @@ -82,7 +82,7 @@
 | >  keymap.h:
 | >         rm -f keymap.tmp
 | >         for map in ${KEYMAPS} ; do \
 | > -               kbdcontrol -L $$map | \
 | > +               (cd ${.CURDIR}/../../share/syscons/keymaps; kbdcontrol -L $$map) | \
 | >                         sed -e '/^static accentmap_t/,$$d' >> keymap.tmp ; \
 | >         done
 | >         echo "static struct keymapInfo keymapInfos[] = {" >> keymap.tmp
 | 
 | Might it not be better to use 'kbdcontrol -L ${.CURDIR}/$$map' ?
 
 Well, I think it would have to be
 
     kbdcontrol -L ${.CURDIR}/../../share/syscons/keymaps/$$map
 
 but I take your point.
 
 The problem with doing this is that kbdcontrol incorporates the path
 given on the command line into the names of the variables it creates.
 For instance (using installed keymaps):
 
 $ kbdcontrol -L /usr/share/syscons/keymaps/ua.koi8-u.kbd | grep ua_koi8
 static keymap_t keymap__usr_share_syscons_keymaps_ua_koi8_u_kbd = { 0xec, {
 static accentmap_t accentmap__usr_share_syscons_keymaps_ua_koi8_u_kbd = { 0 };
 $ kbdcontrol -L ua.koi8-u.kbd | grep ua_koi8
 static keymap_t keymap_ua_koi8_u_kbd = { 0xec, {
 static accentmap_t accentmap_ua_koi8_u_kbd = { 0 };
 
 Since my goal is to be able to compile the 4.6 sysinstall on a 4.3
 system, I chose a solution that required no changes to kbdcontrol.
 I suppose I *could* alter the loop in the Makefile that generates the
 keymapInfos array to use the longer symbol names, but I thought that
 just cd'ing before running the command would be simpler! :-)

From: Peter Pentchev <roam@ringlet.net>
To: David Sanderson <dsanderson@panasas.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: conf/41241: sysinstall build uses kbdcontrol keymaps from the host instead of the source tree
Date: Fri, 2 Aug 2002 17:03:38 +0300

 --IJpNTDwzlM2Ie8A6
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Fri, Aug 02, 2002 at 09:54:36AM -0400, David Sanderson wrote:
 > | > >Fix:
 > | > The following patch to my copy of src/release/sysinstall/Makefile see=
 ms
 > | > to do the trick:
 > | >=20
 > | > @@ -82,7 +82,7 @@
 > | >  keymap.h:
 > | >         rm -f keymap.tmp
 > | >         for map in ${KEYMAPS} ; do \
 > | > -               kbdcontrol -L $$map | \
 > | > +               (cd ${.CURDIR}/../../share/syscons/keymaps; kbdcontro=
 l -L $$map) | \
 > | >                         sed -e '/^static accentmap_t/,$$d' >> keymap.=
 tmp ; \
 > | >         done
 > | >         echo "static struct keymapInfo keymapInfos[] =3D {" >> keymap=
 .tmp
 > |=20
 > | Might it not be better to use 'kbdcontrol -L ${.CURDIR}/$$map' ?
 [snip]=20
 > The problem with doing this is that kbdcontrol incorporates the path
 > given on the command line into the names of the variables it creates.
 > For instance (using installed keymaps):
 >=20
 > $ kbdcontrol -L /usr/share/syscons/keymaps/ua.koi8-u.kbd | grep ua_koi8
 > static keymap_t keymap__usr_share_syscons_keymaps_ua_koi8_u_kbd =3D { 0xe=
 c, {
 > static accentmap_t accentmap__usr_share_syscons_keymaps_ua_koi8_u_kbd =3D=
  { 0 };
 > $ kbdcontrol -L ua.koi8-u.kbd | grep ua_koi8
 > static keymap_t keymap_ua_koi8_u_kbd =3D { 0xec, {
 > static accentmap_t accentmap_ua_koi8_u_kbd =3D { 0 };
 
 Ah.. I wasn't aware of that.  Too lazy to check, basically :(
 OK then, I see your point.
 
 G'luck,
 Peter
 
 --=20
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 This sentence claims to be an Epimenides paradox, but it is lying.
 
 --IJpNTDwzlM2Ie8A6
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 
 iD8DBQE9SpE67Ri2jRYZRVMRAoG5AJ4nKJ4jYAUvQehx65seuJOsQk0g7ACePCiR
 qNAN5Q9LdRX3WXExIGM25EA=
 =yXJ5
 -----END PGP SIGNATURE-----
 
 --IJpNTDwzlM2Ie8A6--
Responsible-Changed-From-To: freebsd-bugs->qa 
Responsible-Changed-By: matusita 
Responsible-Changed-When: Fri Sep 20 09:33:51 PDT 2002 
Responsible-Changed-Why:  
Over to sysinstall maintainer group.  Patch included in this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41241 
Responsible-Changed-From-To: qa->murray 
Responsible-Changed-By: murray 
Responsible-Changed-When: Sat May 17 22:38:58 PDT 2003 
Responsible-Changed-Why:  
I'll get this committed.  Thanks for the submission. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=41241 
State-Changed-From-To: open->closed 
State-Changed-By: murray 
State-Changed-When: Thu Jul 15 06:43:44 GMT 2004 
State-Changed-Why:  
Ruslan Ermilov (ru@freebsd.org) came up with another solution using an 
environment variable.  This fix went into the tree in revision 
1.92.2.22 of sysinstall/Makefile so FreeBSD 4.8 and subsequent 
versions do not have this problem.  Thanks for the submission! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=41241 
>Unformatted:
