From owner-freebsd-ports@FreeBSD.ORG Wed Dec 17 12:52:50 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33859524 for ; Wed, 17 Dec 2014 12:52:50 +0000 (UTC) Received: from leviatan.freebsdbrasil.com.br (leviatan.freebsdbrasil.com.br [177.10.156.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BEF2868 for ; Wed, 17 Dec 2014 12:52:48 +0000 (UTC) Received: (qmail 12297 invoked from network); 17 Dec 2014 10:52:39 -0200 Received: from unknown (HELO jmelo.bh.freebsdbrasil.com.br) (jmelo@freebsdbrasil.com.br@[10.69.69.15]) (envelope-sender ) by capeta.freebsdbrasil.com.br (qmail-ldap-1.03) with SMTP for ; 17 Dec 2014 10:52:39 -0200 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: Pkg 1.4.0 and packaging base system From: Jean Milanez Melo In-Reply-To: <5490D983.1030202@FreeBSD.org> Date: Wed, 17 Dec 2014 10:52:39 -0200 Message-Id: <86292A12-52F8-4F2C-B469-D7C769351012@freebsdbrasil.com.br> References: <5490D983.1030202@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.1990.1) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "ports@freebsd.org" , Cassiano Peixoto X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 12:52:50 -0000 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 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 = 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