Creating custom ports versions.
crux at eckner.net
Wed Nov 27 05:30:29 UTC 2019
-----BEGIN PGP SIGNED MESSAGE-----
On Tue, 26 Nov 2019, Steffen Nurpmeso wrote:
> Erich Eckner wrote in <alpine.LNX.2.21.99999.375.1911250848400.2310480 at n\
> |On Mon, 25 Nov 2019, KPECT wrote:
> |> Very often I use slightly modified ports just to achieve some additional \
> |> or
> |> remove some extra options that the original port provides. I'd like to
> |> suggest to propose implementing a new ports function that would allow \
> |> users
> |> to create a child port (for example in /usr/ports/custom) that has \
> |> the same
> |> name as the parent, but which has some differences that the user needs.
> |> Every time the ports are updated if the version of the parent port is
> |> changed, this also affects the child ports, so you do not need to \
> |> track them
> |> manually.
> |> I belieive that this is very demanded function.
> |I would definitely use that feature. My approach so far was:
> I also think this would be a nice feature! I could use that for
> the minimum adjustment i need for dnssmasq, for example.
> |put patches into /usr/patches/$repository/$port/
> |and apply them during `ports -u`, resigning the ports using a private key.
> |The feature itself is implemented as a patch to ports:
> |What I like about this approach (and what I would like to see in an
> |official implementation, too), is, that you do not need to modify anything
> |in order to keep your packages up-to-date - as long as your patches
> |still cleanly apply.
> That is true. What i do not like with your approach is that the
> original port is lost. I mean, one could reverse-apply the patch
> and then everything is clear, even easier it is with a git-based
> port. But wouldn't it be nicer to have some e.g. PKGMK_PATCH_DIR=
> in /etc/pkgmk.conf, and to have build_package() of pkgmk look
> whether that exists and has something to apply for the current
> port, right after the call to unpack_source(), before it goes
One could improve this approach by saving the (modified) ports somewhere
else, so the original one is still available. This couls also be done
during `ports -u`. I tried not to change pkgmk, so I can still blame
errors during compilation on the source instead of having to make sure it
is not due to my hackery.
> On the other hand your approach integrates a signature.
> .footprint changes are a problem whatever you do?!?
Just add a .footprint.patch and you're done (though I don't use this in my
> |Der Kragenbaer, The moon bear,
> |der holt sich munter he cheerfully and one by one
> |einen nach dem anderen runter wa.ks himself off
> |(By Robert Gernhardt)
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
More information about the CRUX