Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2016 14:27:38 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Sean Bruno <sbruno@freebsd.org>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: metalog -> makefs is broken again in -HEAD
Message-ID:  <CAJ-Vmo=1p4t8zEfBm9CUyc-A9tKY3mrt9-ZeoUQS%2BBmtKCYg=w@mail.gmail.com>
In-Reply-To: <68cb112b-9334-045a-d860-7011573a2b47@freebsd.org>
References:  <CAJ-VmoknWRf0bkfksp61pamKsLky_b=indGogS%2BJtFrFa%2BXaFw@mail.gmail.com> <78463d96-4dc3-b9a1-4793-05d6c6a76537@freebsd.org> <CAJ-Vmok1weKRsS4F_QWJP5-h%2BTBjAqQE2=PxSFStjh_VZqPF6w@mail.gmail.com> <b3a107fd-80d5-20aa-1f2b-ff60a75b8f94@freebsd.org> <8b012527-e76c-060d-be5b-547deca5cb07@FreeBSD.org> <01069203-3566-12f7-993b-10e8e43be1ac@freebsd.org> <0dbec794-9dc2-4e72-6114-1e4b0968dae5@FreeBSD.org> <60a8da58-dbd5-dd26-6047-745bcf6a21f4@freebsd.org> <894b4841-166c-422f-9fe8-50ed261d76bb@FreeBSD.org> <1836ae28-b510-06dd-b83f-d08060cf87ac@freebsd.org> <8478b8aa-b8cf-7383-9923-249fced3dac3@FreeBSD.org> <4c28236a-f9ca-4601-336f-0829842b6d1a@freebsd.org> <270be6c4-16f9-3b89-c3b3-5983ec85834f@FreeBSD.org> <a0515f16-d40f-35b5-29bd-523924b4a8a3@freebsd.org> <68cb112b-9334-045a-d860-7011573a2b47@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
hi,

ok, so here's the hilarity.

We don't really have tools for consistently manipulating
metalog/manifest files. So, in order to do things like
add/delete/modify things in the manifest file, we need to do some ..
hackery.

So that's what filter.pl does. It takes in the metalog file and does a
replace or append. It currently doesn't have a "delete" method.

the .tmp file is "the extra files that we add /after/ the system
installs". Ie, it's the customisations done. It goes through filter.pl
and then the resultant metalog file has the complete thing that's
going into the image.

When I get around to adding package support for mips (not mips_ap)
then it'll also have a second intermediary metalog file that has the
combination of all of the package installs, so makefs knows what to
do.

Ok, so for metalog versus manifest. I remember doing it one way and
then brooks saying "Don't do that, here's the bugs". I'll have to go
over that and see.

Thanks,


-adrian


On 19 August 2016 at 13:34, Sean Bruno <sbruno@freebsd.org> wrote:
>
>
> On 08/19/16 14:19, Sean Bruno wrote:
>>>> Hrm ... I added a "ls -ld" to the script immediately preceding the
>>>> install directive, it appears to be there.
>>>>
>>>>
>>>>
>>>> + INSTALL_PROG='install -U -M
>>>> /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp -D
>>>> /home/sbruno/bsd/fbsd_head/../mfsroot/malta'
>>>> + echo '*** Deleting old file system..'
>>>> *** Deleting old file system..
>>>> + ls -ld /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp
>>>> -rw-r--r--  1 sbruno  sbruno  203 Aug 19 13:45
>>>> /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp
>>>> + install -U -M /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp
>>>> -D /home/sbruno/bsd/fbsd_head/../mfsroot/malta -d
>>>> /home/sbruno/bsd/fbsd_head/../mfsroot/malta
>>>
>>> There seems to be no error now?
>>
>> Yeah, this looks like a error in the scripts.  Cleaned and removed the
>> mfsroot dir, and the "ls -ld" and the install error appear to be in
>> correspondence.
>>
>> + INSTALL_PROG='install -U -M
>> /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp -D
>> /home/sbruno/bsd/fbsd_head/../mfsroot/malta'
>> + echo '*** Deleting old file system..'
>> *** Deleting old file system..
>> + ls -ld /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp
>> ls: /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp: No such
>> file or directory
>> + install -U -M /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp
>> -D /home/sbruno/bsd/fbsd_head/../mfsroot/malta -d
>> /home/sbruno/bsd/fbsd_head/../mfsroot/malta
>> install: open /home/sbruno/bsd/fbsd_head/../mfsroot/METALOG.malta.tmp:
>> No such file or directory
>> + chflags -R noschg /home/sbruno/bsd/fbsd_head/../mfsroot/malta
>> + rm -rf /home/sbruno/bsd/fbsd_head/../mfsroot/malta
>> + rm -rf /home/sbruno/bsd/fbsd_head/../tmp/malta
>> + echo '*** Creating new filesystem...'
>>
>>
>
> adrian:
>
> Hmmm ... what should the METALOG.malta.tmp file contain at this point,
> it looks like only a fewlines once its created, which doesn't happen at
> this point.
>
> ./etc//fstab type=file uname=root gname=wheel mode=0644 size=23
> ./etc//rc.conf type=file uname=root gname=wheel mode=0644 size=68
> ./etc/rc.d//autosize type=file uname=root gname=wheel mode=0755 size=653
> . type=dir mode=0755
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=1p4t8zEfBm9CUyc-A9tKY3mrt9-ZeoUQS%2BBmtKCYg=w>