Creating custom ports versions.

Steffen Nurpmeso steffen at
Mon Nov 25 23:12:54 UTC 2019

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

On the other hand your approach integrates a signature.
.footprint changes are a problem whatever you do?!?

|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)

More information about the CRUX mailing list