From owner-freebsd-ports@freebsd.org Thu Jul 16 09:06:06 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA7A9A206A for ; Thu, 16 Jul 2015 09:06:06 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 5D1A21EC8 for ; Thu, 16 Jul 2015 09:06:04 +0000 (UTC) (envelope-from freebsd@grem.de) Received: (qmail 24413 invoked by uid 89); 16 Jul 2015 08:59:22 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@88.217.180.206) by mail.grem.de with ESMTPA; 16 Jul 2015 08:59:22 -0000 Date: Thu, 16 Jul 2015 10:59:16 +0200 From: Michael Gmelin To: freebsd-ports@freebsd.org Cc: Matthew Seaman , Aristedes Maniatis Subject: Re: poudriere with custom packages Message-ID: <20150716105916.45e23b9a@bsd64.grem.de> In-Reply-To: <55A758B3.2050502@FreeBSD.org> References: <55A729C8.10301@ish.com.au> <55A758B3.2050502@FreeBSD.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/G2bbydp=HBehxHvZ5Og8dLo"; protocol="application/pgp-signature" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2015 09:06:06 -0000 --Sig_/G2bbydp=HBehxHvZ5Og8dLo Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 16 Jul 2015 08:09:39 +0100 Matthew Seaman wrote: > On 16/07/2015 04:49, Aristedes Maniatis wrote: > > I have a custom built package which I'm building outside the FreeBSD > > ports system (using pkg-create commands). How can I add that package > > to a poudriere managed repository so that it appears in the package > > index and can be easily installed like any other package? > >=20 > > Thanks for any help >=20 > I can think of two ways to handle this: >=20 > 1) Manually build your own repo containing just your custom package. > Simply copy the package .txz to a directory accessible from your > webserver (or however you want to publish the repo.) Then run > 'pkg repo' in that directory. See pkg-repo(8) for the gory details. >=20 > This fails on your 'poudriere managed' requirement, but it's pretty > simple. You could even add your own package to the directory that > poudriere creates and then use pkg repo to rebuild the catalogue > there. >=20 > 2) Integrate your custom package into the ports tree. You can add a > 'Makefile.local' in /usr/ports containing something like: >=20 > SUBDIR +=3D myports >=20 > which adds 'myports' as a new category for your custom stuff. Then > just mimic the layout from any of the other categories. This > obviously works best if your custom stuff uses the standard ports > machinery to build your package. You can then add > 'myports/mypackage' to the list of what poudriere should build. >=20 > I'd be interested to hear about how you are creating packages outside > the ports tree. This is something we'd like to facilitate, but at the > moment pkg(8) and the ports are deeply entwined and there isn't much > useable documentation or prior art for how to do it 'by hand'. >=20 Hi Matthew, hi Ari, We're planing to use poudriere to build our custom packages as well and it seems like we're in a similar situation as Ari, therefore let me explain what we're doing right now (I'm quite curious if their process looks roughly the same). We've been doing this for a few years now, porting it from pkg_tools to pkg was quite easy: cmake and a custom wrapper script are used to build our custom code and stage it in a local directory. That directory already resembles the final directory layout, we then write +DESC and +MANIFEST using a shell script. During this process package dependencies are determined used "ldd -f pkg which -q %p\\n $DISTDIR/bin/* $DISTDIR/lib/*". This is probably a bit problematic for poudriere, as it needs to know dependencies beforehand. Finally "pkg create -o $PACKAGEDIR -r $DISTBASE -m $DISTBASE" is called to create the package. ($DISTBASE contains +MANIFEST and +DESC, $DISTDIR is a directory within $DISTBASE). One idea is to add a "port-skeleton" target to our build system, which emits a Makefile containing (BUILD|RUN)_DEPENDS automatically. Another question is how to handle check-out of the code from our source repositories and the fact that it's more or less continuous integration at that point (meaning that distinfo is changing all the time). It might be easiest to have a job that checks out all repos on a regular basis, tars them up and writes them to a webserver on localhost and then runs "make makesum" on all custom ports outside of poudriere before starting a build. - Michael --=20 Michael Gmelin --Sig_/G2bbydp=HBehxHvZ5Og8dLo Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVp3JpXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFODQyNDA4MjEyRDI3NjdBRTI5RUZDQTQ2 ODk3RjhDMTZCRkFGRjlGAAoJEGiX+MFr+v+fZRMH/0lCfuQDOuZgIa5ctxzBXYXu 6fIvnzjitxqvO/2S2D4pDQ+YTfyvCfCsfXjY6g4LFEfl1mVudB2k6IxycYYZeJyJ QIXN4nHaZcF7ipyIap5Kd+JYCbk93MgHsV2EdxAZ1hvlqgv1jcJxPAT2lG2voWEg wxotRQ6yBt3etOvvJqK80OXUvJwPuaS2AEKiL5J3SuG5gmNa5VtEr3rlRs44946g 4lDqsPKZX2l/stpIWIYKR20pFpUbsU2+MLJddxwcNfPOoy6iMd2CnfmJXyybYEF/ fTYwK31NhxI1513Bp26Lun47UHpJO08RFL8L6Qr6FMIxik8i0D0StcLQoBVuPQI= =77D8 -----END PGP SIGNATURE----- --Sig_/G2bbydp=HBehxHvZ5Og8dLo--