Date: Thu, 7 Jun 2018 11:54:54 -0400 From: Kris Moore <kris@ixsystems.com> To: freebsd-pkgbase@freebsd.org Subject: Re: Problems with packaging /etc and etcupdate(8) Message-ID: <06be6c14-1a57-f508-77c7-dc81359b8135@ixsystems.com> In-Reply-To: <CA%2BKr6DPLgZxF-ZV-D0Z-yv%2B-Z_Vm=9G3JTzpjoi-t5TcedLkmQ@mail.gmail.com> References: <20170927163012.GA99112@FreeBSD.org> <20171113172054.GA23670@FreeBSD.org> <1972909.hTPcQf8OeH@ralph.baldwin.cx> <20171113195144.GH53537@corpmail.liquidneon.com> <CA%2BKr6DPLgZxF-ZV-D0Z-yv%2B-Z_Vm=9G3JTzpjoi-t5TcedLkmQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/07/2018 11:49, VinÃcius Zavam via freebsd-pkgbase wrote:
> 2017-11-13 20:51 GMT+01:00 Brad Davis <brd@freebsd.org>:
>> On Mon, Nov 13, 2017 at 09:26:49AM -0800, John Baldwin wrote:
>>> I had assumed that in a pkgbase setup, one wouldn't use etcupdate or
> mergemaster.
>>> Instead, my understanding is that pkg was going to "learn" about
> configuration
>>> files and would grow etcupdate-like functionality to merge in changes
> to configuration
>>> files during upgrades (and would also support 'pkg confdiff', etc. so
> that
>>> 'pkg confdiff -a' would replace 'etcupdate diff' for example, but would
> also support
>>> packages built from ports, not just base system conf files). Each
> pkgbase package
>>> would contain its associated /etc files as configuration files in this
> scheme.
>> To that end Will and I have been working on a patch to move all files in
> head/etc/
>> to the places they belong. I am probably ~75% of the way through them so
>> far. Once I get the last bit wrapped up, I will post a review.
>>
>>
>> Regards,
>> Brad Davis
> I am sorry for getting back into this thread, but talking to some friends a
> while ago it occurred me that something I run at home could be useful for
> others here - related to etcupdate and updates using pkg-base (on HEAD).
> I'll not cover the delete-files things here, and I must admit that I was
> not following the mailing list for a while :\
>
> so, after building world, kernel and creating the respective distfiles
> (base.txz, kernel.txz) my build server generates the "etc.tbz" using the
> following command:
>
> # etcupdate build -B -s /usr/src /dist/etc.tbz
>
> in another machine (my laptop, also running HEAD), where I extract the
> distfiles for base and kernel, here is how I deal with updating/upgrading:
>
> ~ fetch *.txz stuff, and etc.tbz
> ~ extract kernel.txz to /
>
> # rm -rf /var/db/etcupdate/previous
> # mkdir -p /var/db/etcupdate/current
> # mkdir -p /var/db/meu
>
> # tar --unlink -xjpf /whatever/etc.tbz -C /var/db/meu/etc
>
> for FILE in $(find /var/db/meu/etc -type f | cut -d\/ -f6-9); do
> d=$(dirname ${FILE})
> f=$(basename ${FILE})
> mkdir -p /var/db/etcupdate/previous/$d
> cp -a /$d/$f /var/db/etcupdate/previous/$d/$f 2>/dev/null
> done
>
> # etcupdate -p -F -t /var/db/meu/etc.tbz
> # etcupdate resolve -p
> # etcupdate diff > /var/db/meu/etc.diff.pre
>
> ~ extract base.txz to /
>
> # etcupdate -F -t /var/db/meu/etc.tbz
> # etcupdate resolve
> # etcupdate diff > /var/db/meu/etc.diff
>
> ~ reboot.
>
> well, it's indeed NOT an .ucl to be used direclty with pkg, but the idea of
> scripting it is there. right?
>
>
> --
> VinÃcius Zavam
> keybase.io/egypcio/key.asc
> _______________________________________________
> freebsd-pkgbase@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-pkgbase
> To unsubscribe, send any mail to "freebsd-pkgbase-unsubscribe@freebsd.org"
This is more or less how we are doing it for TrueOS. It works remarkably
well.
https://github.com/trueos/trueos/blob/trueos-master/Makefile.inc1#L1687
https://github.com/trueos/trueos/blob/trueos-master/release/packages/runtime.ucl
--
Kris Moore
Vice President of Engineering
iXsystems
Enterprise Storage & Servers Driven By Open Source
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?06be6c14-1a57-f508-77c7-dc81359b8135>
