Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 2003 21:10:14 -0400 (EDT)
From:      "Adam C. Migus" <adam@migus.org>
To:        "Bruce Evans" <bde@zeta.org.au>
Cc:        arch@freebsd.org
Subject:   Re: sys/conf/DEFAULT[S]
Message-ID:  <53701.192.168.4.2.1065834614.squirrel@mail.migus.org>
In-Reply-To: <20031009032431.Y6050@gamplex.bde.org>
References:  <XFMail.20030924170342.jhb@FreeBSD.org>          <20030925092319.H5418@gamplex.bde.org><49939.204.254.155.35.1064593320.squirrel@mail.migus.org><20030927080420.N18558@gamplex.bde.org> <49955.192.168.4.2.1065074430.squirrel@mail.migus.org>     <51310.204.254.155.35.1065622332.squirrel@mail.migus.org><51457.204.254.155.35.1065630793.squirrel@mail.migus.org> <20031009032431.Y6050@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_20031010211014_76716
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Bruce Evans said:
> On Wed, 8 Oct 2003, Adam C. Migus wrote:
>
>> Bruce Evans said:
>> > On Wed, 8 Oct 2003, Adam C. Migus wrote:
>> >> ...
>> >> WRT Stefan's solution, simply nest two includes on the first
>> line,
>> >> like so:
>> >>
>> >> head -1 KERNEL
>> >> include SUB1
>> >>
>> >> head -1 SUB1
>> >> include SUB2
>> >>
>> >> This will cause config to fail in the same manner it did
>> before,
>> >> with his patch.
>> >
>> > Er, but this works for me.  I test with SUB2 having the
>> following:
>> > 1) include GENERIC
>> > 2) same contents as GENERIC
>> > 3) same contents as GENERIC except for no comment lines at
>> > beginning.
>
>> Here's my broken config (with Stefan's patch) compile, run, error,
>> output and config exerpts:
>
> This still works for me :-).
>
>> root@caster:ttyp4:config# make clean
>> rm -f config config.o main.o lang.o mkmakefile.o mkheaders.o
>> mkoptions.o config.8.gz config.8.cat.gz lang.c config.c y.tab.c
>> y.tab.h
>> root@caster:ttyp4:config# make CFLAGS="`make -V CFLAGS`
>> -DYYDEBUG=1"
>> Warning: Object directory not changed from original
>> /src/freebsd/CURRENT/src/usr.sbin/config
>> yacc -d config.y
>> cp y.tab.c config.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c config.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c main.c
>> lex -t  lang.l > lang.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c lang.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c mkmakefile.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c mkheaders.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1 -c mkoptions.c
>> cc -O -pipe -mcpu=pentiumpro -I.
>> -I/src/freebsd/CURRENT/src/usr.sbin/config   -Wsystem-headers
>> -Werror  -DYYDEBUG=1  -o config config.o main.o lang.o
>> mkmakefile.o
>> mkheaders.o mkoptions.o -ll
>> gzip -cn config.8 > config.8.gz
>> root@caster:ttyp4:config# cp config /tmp
>> root@caster:ttyp4:config# cd ../../sys/i386/conf
>> root@caster:ttyp4:conf# export YYDEBUG=1
>> root@caster:ttyp4:conf# /tmp/config DISKLESS_SMP_MAC
>> yydebug: state 0, reducing by rule 3 (Many_specs :)
>> yydebug: after reduction, shifting from state 0 to state 2
>> yydebug: state 2, reading 274 (INCLUDE)
>> yydebug: state 2, shifting to state 19
>> yydebug: state 19, reading 275 (ID)
>> yydebug: state 19, shifting to state 46
>> yydebug: state 46, reading 273 (SEMICOLON)
>> yydebug: state 46, shifting to state 56
>> yydebug: state 56, reducing by rule 20 (Config_spec : INCLUDE ID
>> SEMICOLON)
>
> This seems to be from a patching error.  Stefan's patch moved
> "INCLUDE ID SEMICOLON" from Config_spec to Spec.
>
>> yydebug: after reduction, shifting from state 2 to state 22
>> yydebug: state 22, reading 274 (INCLUDE)
>> config: SMP_MAC:1: syntax error
>> root@caster:ttyp4:conf# head -3 DISKLESS_SMP_MAC SMP_MAC MAC
>> ==> DISKLESS_SMP_MAC <==
>> include SMP_MAC
>>
>> ident           DISKLESS_SMP_MAC
>>
>> ==> SMP_MAC <==
>> include MAC
>>
>> #ident          SMP_MAC
>>
>> ==> MAC <==
>> #
>> # MAC -- Generic kernel configuration file for FreeBSD/i386 w/MAC
>> #
>
> My debugging output shows the move:
>
> %%%
> yydebug: state 0, reducing by rule 3 (Many_specs :)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 274 (INCLUDE)
> yydebug: state 2, shifting to state 19
> yydebug: state 19, reading 275 (ID)
> yydebug: state 19, shifting to state 46
> yydebug: state 46, reading 273 (SEMICOLON)
> yydebug: state 46, shifting to state 56
> yydebug: state 56, reducing by rule 6 (Spec : INCLUDE ID SEMICOLON)
>                                ^^^^^^  ^^^^
>
> [The first difference is here]
>
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 274 (INCLUDE)
> yydebug: state 2, shifting to state 19
> yydebug: state 19, reading 275 (ID)
> yydebug: state 19, shifting to state 46
> yydebug: state 46, reading 273 (SEMICOLON)
> yydebug: state 46, shifting to state 56
> yydebug: state 56, reducing by rule 6 (Spec : INCLUDE ID SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 273 (SEMICOLON)
> yydebug: state 2, shifting to state 18
> yydebug: state 18, reducing by rule 7 (Spec : SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 266 (IDENT)
> yydebug: state 2, shifting to state 11
> yydebug: state 11, reading 275 (ID)
> yydebug: state 11, shifting to state 35
> yydebug: state 35, reducing by rule 15 (Config_spec : IDENT ID)
> yydebug: after reduction, shifting from state 2 to state 22
> yydebug: state 22, reading 273 (SEMICOLON)
> yydebug: state 22, shifting to state 48
> yydebug: state 48, reducing by rule 5 (Spec : Config_spec SEMICOLON)
> yydebug: after reduction, shifting from state 2 to state 20
> yydebug: state 20, reducing by rule 2 (Many_specs : Many_specs Spec)
> yydebug: after reduction, shifting from state 0 to state 2
> yydebug: state 2, reading 0 (end-of-file)
> yydebug: state 2, reducing by rule 1 (Configuration : Many_specs)
> yydebug: after reduction, shifting from state 0 to state 1
> Specify machine type, e.g. ``machine i386''
> %%%
>
> Bruce
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to
> "freebsd-arch-unsubscribe@freebsd.org"
>

Bruce,
After all the confusion here's a patch that will address and fix the
the SEMICOLON and nesting issues and in addition fix the problem you
had with file names.  It does so by introducing a PATH type.  So
'include' can now be used for things like "DEFAULTS.i386" (with or
without quotes).

-- 
Adam - (http://people.migus.org/~amigus/)
Migus Dot Org - (http://www.migus.org/)
------=_20031010211014_76716
Content-Type: application/octet-stream; name="config.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="config.diff"

ZGlmZiAtcnUzIGNvbmZpZy9jb25maWcueSBjb25maWcucGF0Y2gvY29uZmlnLnkKLS0tIGNvbmZp
Zy9jb25maWcueQlTYXQgSnVsICA1IDIyOjAwOjUyIDIwMDMKKysrIGNvbmZpZy5wYXRjaC9jb25m
aWcueQlGcmkgT2N0IDEwIDIwOjU5OjE3IDIwMDMKQEAgLTIzLDYgKzIzLDcgQEAKICV0b2tlbglT
RU1JQ09MT04KICV0b2tlbglJTkNMVURFCiAKKyV0b2tlbgk8c3RyPglQQVRICiAldG9rZW4JPHN0
cj4JSUQKICV0b2tlbgk8dmFsPglOVU1CRVIKIApAQCAtMTE4LDYgKzEx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jggQEAKIAkJCQlCRUdJTiBOT05VTTsKIAkJCXJldHVybiBpOwogCQl9Cis8SU5JVElBTD57
UEFUSH0geworCQkJQkVHSU4gMDsKKwkJCXl5bHZhbC5zdHIgPSBzdHJkdXAoeXl0ZXh0KTsKKwkJ
CXJldHVybiBQQVRIOworCQl9CiA8SU5JVElBTD57SUR9CXsKIAkJCUJFR0lOIDA7CiAJCQl5eWx2
YWwuc3RyID0gc3RyZHVwKHl5dGV4dCk7CiAJCQlyZXR1cm4gSUQ7CisJCX0KK1xcXCJ7UEFUSH1c
XFwiCXsKKwkJCUJFR0lOIDA7CisJCQl5eXRleHRbeXlsZW5nLTJdID0gJyInOworCQkJeXl0ZXh0
W3l5bGVuZy0xXSA9ICdcMCc7CisJCQl5eWx2YWwuc3RyID0gc3RyZHVwKHl5dGV4dCArIDEpOwor
CQkJcmV0dXJuIFBBVEg7CisJCX0KK1wie1BBVEh9XCIJeworCQkJQkVHSU4gMDsKKwkJCXl5dGV4
dFt5eWxlbmctMV0gPSAnXDAnOworCQkJeXlsdmFsLnN0ciA9IHN0cmR1cCh5eXRleHQgKyAxKTsK
KwkJCXJldHVybiBQQVRIOwogCQl9CiBcXFwiW14iXStcXFwiCXsKIAkJCUJFR0lOIDA7Cg==
------=_20031010211014_76716--



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