Bug 252584 - net/chrony-lite: Chrony slimmed down
Summary: net/chrony-lite: Chrony slimmed down
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernhard Froehlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 16:26 UTC by Bernhard Froehlich
Modified: 2021-01-19 08:49 UTC (History)
2 users (show)

See Also:


Attachments
patch for net/chrony to be slave port friendly (908 bytes, patch)
2021-01-11 16:26 UTC, Bernhard Froehlich
mandree: maintainer-approval+
Details | Diff
patch for new net/chrony-lite (430 bytes, patch)
2021-01-11 16:26 UTC, Bernhard Froehlich
no flags Details | Diff
chrony with flavors (642 bytes, text/plain)
2021-01-17 13:25 UTC, Bernhard Froehlich
mandree: maintainer-approval-
Details
Preparations for slave port (546 bytes, patch)
2021-01-19 08:46 UTC, Bernhard Froehlich
decke: maintainer-approval? (mandree)
Details | Diff
New net/chrony-lite port (457 bytes, patch)
2021-01-19 08:49 UTC, Bernhard Froehlich
decke: maintainer-approval? (mandree)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Froehlich freebsd_committer 2021-01-11 16:26:01 UTC
Created attachment 221467 [details]
patch for net/chrony to be slave port friendly

Since chrony 4.0 upstream implemented NTS (Network Time Security) which allows to authenticate NTP packets. This is definitely a good idea in todays internet but also pulls in many (22) runtime dependencies:

* bash
* bash-completion
* ca_root_nss
* gettext-runtime
* glib
* gmp
* gnutls
* indexinfo
* libedit
* libffi
* libiconv
* libidn2
* libtasn1
* libunistring
* libxml2
* nettle
* p11-kit
* pcre
* python37
* readline
* tpm-emulator
* trousers

So I propose a net/chrony-lite port with all options off per default (except USER) then chrony-lite only needs 1 runtime dependency which is libedit.
Comment 1 Bernhard Froehlich freebsd_committer 2021-01-11 16:26:37 UTC
Created attachment 221468 [details]
patch for new net/chrony-lite
Comment 2 Bernhard Froehlich freebsd_committer 2021-01-11 16:28:37 UTC
For the patch to net/chrony and the general idea I want to have some feedback from mandree@
Comment 3 daniel.engberg.lists 2021-01-11 18:59:40 UTC
Would this be a good example for using flavors?
Comment 4 Matthias Andree freebsd_committer 2021-01-11 19:53:20 UTC
Comment on attachment 221467 [details]
patch for net/chrony to be slave port friendly

Hi Bernhard, approved of.
Comment 5 Matthias Andree freebsd_committer 2021-01-11 19:56:56 UTC
Comment on attachment 221468 [details]
patch for new net/chrony-lite

Hi Bernhard, 

Is an OPTIONS_DEFAULT override what you want? 

Or do you need OPTIONS_EXCLUDE and/or OPTIONS_SLAVE instead? security/putty-nogtk is a practical example.


Regarding the FLAVOURS proposal by Daniel, it appears not to be a typical use case for now.
Comment 6 daniel.engberg.lists 2021-01-16 23:31:29 UTC
It was introduced specifically for this use case
https://www.freebsd.org/doc/en/books/porters-handbook/book.html#flavors
Comment 7 Bernhard Froehlich freebsd_committer 2021-01-17 13:25:37 UTC
Created attachment 221673 [details]
chrony with flavors

It took a bit to get some hands on experience with our flavors. The patch now flavorizes chrony and adds a lite flavor. Default (=as is right now) is not affected.
Comment 8 Matthias Andree freebsd_committer 2021-01-17 22:30:30 UTC
(In reply to daniel.engberg.lists from comment #6)
Yes, but the tool support situation is abysmal, and I will not pollute my port with premature features.
Comment 9 Matthias Andree freebsd_committer 2021-01-17 22:31:42 UTC
Comment on attachment 221673 [details]
chrony with flavors

Please make a traditional slave port for now, instead. 
FLAVORS are not fully integrated into our ports-mgmt toolchains yet.
Comment 10 daniel.engberg.lists 2021-01-18 00:48:54 UTC
Can you please elaborate regarding ports-mgmt toolchain(s)?
Comment 11 Matthias Andree freebsd_committer 2021-01-18 17:41:26 UTC
Daniel, for instance, you cannot have pkg(8) list the flavors on ports but need to retroactively re-add those pieces of information, for instance, with this hack to list all installed ports as origins with the @fla4 suffix:

#!/usr/bin/env bash
exec join -t " " -a1 <(pkg query %o |sort) <(pkg query '%o %At @%Av'|grep flavor|sort) | sed 's/ flavor @/@/'

Until this is remedied, I am avoiding FLAVORing my ports.
Comment 12 Bernhard Froehlich freebsd_committer 2021-01-19 08:46:15 UTC
Created attachment 221727 [details]
Preparations for slave port

Okay, based on the discussions we go back to the classic slave port approach.
Comment 13 Bernhard Froehlich freebsd_committer 2021-01-19 08:49:09 UTC
Created attachment 221728 [details]
New net/chrony-lite port

This is the new net/chrony-lite slave port and it uses OPTIONS_EXCLUDE now.

@mandree: I think it makes sense that you become the maintainer for the new port. If you don't want that I can also take it under my umbrella. What do you think?