Date: Thu, 16 Jul 2015 10:59:16 +0200 From: Michael Gmelin <freebsd@grem.de> To: freebsd-ports@freebsd.org Cc: Matthew Seaman <matthew@FreeBSD.org>, Aristedes Maniatis <ari@ish.com.au> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <matthew@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150716105916.45e23b9a>