Creating custom ports versions.
Hi people. 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. Similar solution for FreeBSD can be found here: https://www.amoradi.org/2019/11/12/maintaining-port-modifications-in-freebsd... I belieive that this is very demanded function. Best regards, Sergey.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Mon, 25 Nov 2019, KPECT wrote:
Hi people.
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. Similar solution for FreeBSD can be found here:https://www.amoradi.org/2019/11/12/maintaining-port-modifications-in-freebs d.html I belieive that this is very demanded function. Best regards, Sergey.
Hi, I would definitely use that feature. My approach so far was: 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: https://git.eckner.net/Erich/crux-patches/tree/core/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. regards, Erich -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE3p92iMrPBP64GmxZCu7JB1Xae1oFAl3biKwACgkQCu7JB1Xa e1pCFxAAqpF00lXOBTZJwoJVGVcA4YCmNkZ5EiothcIJDxzHgnlavdEKLCz/o/qt pCYb+LZVegGet9Z/LqekSX4FvVsO1YvDuO7zyIUMczrY0tJBLOeQlqQWOwHqQ404 Q3gyx8dRsW6ZlwXxD8D3lpQ6nMTNRdxSAdzCq2IC3N9eIOiy4Snot5iTuev+Hm5M NkLXlyYkAZRiLDKlL+ym6UGG3NoE1UoHgk+OGg9wnugegfWXPJzni9Wa+sSdTt5H boGfoMtCc7WzhaU+oREQjhyq/h3g2J1Hzb47l5L9vHtieD8/sJWWMYNtPxk2PYlh okwUPBkzNAtxMkxjnc0c7G1enkAGXhO8m/1OtAvuw0MPzTpDASROWraEwnVr03Hj ar5VigWwZQCb01HbVqOuBoCppAPEqvtCB/UGkxLFvlM8INR4HwWjSG3HWgM3Benh 6t71YiPn02Q3ATlatUBNasiVpxVqfDgxA7er1RaFOLyyt3GCnaijNvguQmCx1GYN mkHSBXa7Sx8VTJ5+Lhqk13QMZnjcNUzZ12M8XmJKCPVMwbwnuF92vF8k5R/9Af8o U49OMmStZBQ5qvpnM4XbA54o2DekpVIrt9WQSwcgpdR+WYfS1IgZkuFuJIZZUiwZ UDeEKI39jdOc2C7muo7oZGT8mhNLvh0pV/nTRLHsNcDo02E8C8Y= =SwAo -----END PGP SIGNATURE-----
Erich Eckner wrote in <alpine.LNX.2.21.99999.375.1911250848400.2310480@n\ lopc43.ioq.uni-jena.de>: |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: | |https://git.eckner.net/Erich/crux-patches/tree/core/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 build()? On the other hand your approach integrates a signature. .footprint changes are a problem whatever you do?!? --steffen | |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 SIGNED MESSAGE----- Hash: SHA256 On Tue, 26 Nov 2019, Steffen Nurpmeso wrote:
Erich Eckner wrote in <alpine.LNX.2.21.99999.375.1911250848400.2310480@n\ lopc43.ioq.uni-jena.de>: |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: | |https://git.eckner.net/Erich/crux-patches/tree/core/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 build()?
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 /usr/patches tree).
--steffen | |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)
regards, Erich -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE3p92iMrPBP64GmxZCu7JB1Xae1oFAl3eCfcACgkQCu7JB1Xa e1oRug/+M2sWeVRO7070t0PAdZ1i2koY/e/9oGKIuYxcxXpTTR0q2rusC/VfJcXr UIiqcwV5b7awJ1sqdsdMZkcqn+bCoMRPi9KSRTGbkdnU+nxjD4HEeXuEXdbhq1yM Lr++JTNlyILfvgZScRV8fZ6bhgsX5ei5Lc1Wm+nRt3cayGSC2G4yPMf+b2m+pIwR s5WGTZv++l9WmfkmbjjzGaR4hXhvJ8cAs0Glk/SGxHR2j2RdiSomXFGoQkv7tQw4 ut1xZb2IqqhCAMp4MzMiA2QV5NDs3GdEqWECHcwN2fJ2L3ntX9wcVjG2rNtzuQuO UpvxxPq6EMYDt7C5VOvFqL9UBRKHEuOu04wD6D9t0mKZ+yrk2BHzSJrwrX2bXRxF vWuaVf9hQtTHGG9vT1lXq41Vryb+VFa+k7fS5pgfIZ0S0CJ3BgGHTuL1fgrMDfXc RNve2B54WKDPvA4MTHxACM1fNJu/j/MJLSGXiRCI1m2ApP2KIx2fWco/okBHSWQi E+vYzZ2EkbM/oS9LXJohHgon6NVUvqaZTDQi/OX56EhObZFrFNp7lo8yYnLAMDXu jSmQxKOTzxDrKd2eKtnbNG8bRM8eJGwzxcAaqhiSzATqDOC3z7Wb+c6l0vIa5Glc T3JZrmImYAkImxQ+25bSael64LeXEADUl4uw5JagAiZADVTa3pI= =eO/M -----END PGP SIGNATURE-----
Erich Eckner wrote in <alpine.LNX.2.21.99999.378.1911270624480.7142@desk\ .ddns.eckner.net>: |On Tue, 26 Nov 2019, Steffen Nurpmeso wrote: |> Erich Eckner wrote in <alpine.LNX.2.21.99999.375.1911250848400.2310480@n\ |> lopc43.ioq.uni-jena.de>: |>|On Mon, 25 Nov 2019, KPECT wrote: |>|> Very often I use slightly modified ports just to achieve some additiona\ |>|> l \ |>|> 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: |>| |>|https://git.eckner.net/Erich/crux-patches/tree/core/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 |> build()? | |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. Any download related thing is definetely better preserved where you placed it. |> 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 |/usr/patches tree). Sure. All in all CRUX is maybe not prepared that well for such a patch system. For example, my dnsmasq-nodnssec port only changes dependencies and the make invocation. Others, gentoo for example, split configuration and building, which would make such simple edits much easier. With CRUX you could only overwrite build() as a whole, or provide NAME_hook() functions to apply edits. And this does not affect dependency resolving that is entirely unrelated to pkgmk. So your ports patch system is possibly the best as it umbrellas over all the other utilities below it. --steffen | |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)
participants (3)
-
Erich Eckner
-
KPECT
-
Steffen Nurpmeso