Date: Wed, 17 Dec 2014 10:52:39 -0200 From: Jean Milanez Melo <jmelo@freebsdbrasil.com.br> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: "ports@freebsd.org" <ports@freebsd.org>, Cassiano Peixoto <peixotocassiano@gmail.com> Subject: Re: Pkg 1.4.0 and packaging base system Message-ID: <86292A12-52F8-4F2C-B469-D7C769351012@freebsdbrasil.com.br> In-Reply-To: <5490D983.1030202@FreeBSD.org> References: <CAJajdNU-1QqVwuxPauF4wQRFxzbB7j81Htfqoq1onsjkn7xvVQ@mail.gmail.com> <5490D983.1030202@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I don=92t know if it helps you but i=92ve been packing base since = FreeBSD 10.0: # pkg info | grep freebsd freebsd-base-10.1 FreeBSD Base Package freebsd-kernel-10.1 FreeBSD Kernel Package My purpose was create a simple way to deploy updates to my customers = with both a custom base and kernel. The way i=92m doing is quite simple, = but it fits what i need. I didn=92t split base system, but the concept would be the same. First = i use a =93release" machine to build world after each update. Then i = just point to installworld on a different place, like tmp: make = installworld DESTDIR=3D/tmp/world. Then i compress everything in /tmp/world as freebsd-base.tar.gz. My port is like this: PORTNAME=3D freebsd-base PORTVERSION=3D 10.1 CATEGORIES=3D custom MASTER_SITES=3D # DISTFILES=3D # EXTRACT_ONLY=3D # NONE MAINTAINER=3D jmelo@freebsdbrasil.com.br COMMENT=3D FreeBSD Base Package NO_MTREE=3D yes SUB_FILES=3D pkg-install NO_BUILD=3D yes NO_WRKSUBDIR=3D yes do-install: mkdir -p ${STAGEDIR}${DATADIR} @${CP} -r ${FILESDIR}/versions ${STAGEDIR}${DATADIR}/ post-install: ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.mk> My pkg-plist: %%DATADIR%%/versions/freebsd-base.sh %%DATADIR%%/versions/freebsd-base.tar.gz @dirrmtry %%DATADIR%%/versions @dirrmtry %%DATADIR%% In my files dir i have pkg-install.in to PKGINSTALL script execution: #!/bin/sh if [ $2 =3D "POST-INSTALL" ]; then for i in `ls %%DATADIR%%/versions/*.sh` ; do sh $i done fi And freebsd-base.sh contents: #!/bin/sh SHAREDIR=3D/usr/local/share/freebsd-base chflags -R nosunlink,noschg /usr/bin /usr/games = /usr/include /usr/lib* /usr/sbin /usr/share /lib /bin /sbin /lib = /libexec /rescue > /dev/null 2>&1 tar zxfvp ${SHAREDIR}/versions/freebsd-base.tar.gz -C / = > /dev/null 2>&1 rm ${SHAREDIR}/versions/freebsd-base.tar.gz > /dev/null = 2>&1 =09 And finally i add freebsd-base.tar.gz generated on my =93release = machine=94 in my versions directory.=20 Then just build freebsd-base package using poudriere and make it = available for who is using your repository.=20 As i said, it's quite simple, but works. Maybe the concept would be used = by pkg team. Bryan, if there is something i can help let me know. > Em 16/12/2014, =E0(s) 23:16, Bryan Drewery <bdrewery@FreeBSD.org> = escreveu: >=20 > On 12/16/2014 5:41 PM, Cassiano Peixoto wrote: >> Hi guys, >>=20 >> Some weeks ago i read an email sent by bapt about new features to pkg = 1.4.0 >> release. One of them was about packaging base system. As 1.4.0 has >> been releases i'd like know if this feature is already available. >>=20 >=20 > The short answer is "no". >=20 > The longer answer is that it is almost trivial to package the base > system. There are issues with upgrading though with handling config > files (1.4.0 addresses this). However, even with that, there is no = work > available that you can test for a comprehensive build+install+upgrade > packaged base. There remains a lot to do this "right" and consider the > whole picture. There's the issue of splitting up base into components, > conflicting packages between base and ports, freebsd-update, Security > Advisories, etc. There's a lot more work to be done IMHO. >=20 >=20 > --=20 > Regards, > Bryan Drewery >=20 -- Atenciosamente Jean Milanez Melo FreeBSD Brasil LTDA Fone: (31) 3516-0800 http://www.freebsdbrasil.com.br <http://www.freebsdbrasil.com.br/>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86292A12-52F8-4F2C-B469-D7C769351012>