Page MenuHomeFreeBSD

security/krb5-115: Simplify and enhance port
ClosedPublic

Authored by john_saltant.com on Mar 5 2017, 12:34 AM.
Referenced Files
Unknown Object (File)
Dec 20 2023, 2:18 AM
Unknown Object (File)
Oct 25 2023, 9:57 AM
Unknown Object (File)
Oct 24 2023, 7:06 PM
Unknown Object (File)
Jul 12 2023, 7:10 PM
Unknown Object (File)
Jun 17 2023, 1:08 PM
Unknown Object (File)
May 18 2023, 9:23 PM
Unknown Object (File)
Feb 18 2023, 8:12 PM
Unknown Object (File)
Jan 15 2023, 12:09 AM
Subscribers

Details

Summary

In roughly descending order of significance:

  • Enable READLINE OPTION by default
  • Install LDIF and schema files if LDAP is enabled
  • Add READLINE_PORT OPTION to use devel/readline port
  • Respect DOCS and EXAMPLES global OPTIONS
  • Use PORTDOCS and PORTEXAMPLES
  • Describe CMD_LINE_EDITING group
  • Adopt OPTION helper macros
  • Pet portlint (trim newline, tighten CONFLICTS, NLS option for gettext, regenerate patches)
  • A few other minor simplifications to reduce repetition and improve robustness and readability
Test Plan
  1. Build with and without DOCS; inspect plist
  2. Build with and without EXAMPLES; inspect plist
  3. Build with each of READLINE, READLINE_PORT, LIBEDIT, and none of the above; inspect dependencies and dynamic link libraries of kadmin and ktutil
  4. Build with and without LDAP; inspect plist

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

john_saltant.com retitled this revision from to security/krb5-115: Simplify and enhance port.
john_saltant.com updated this object.
john_saltant.com edited the test plan for this revision. (Show Details)
john_saltant.com added a reviewer: cy.
john_saltant.com set the repository for this revision to rP FreeBSD ports repository.
cy requested changes to this revision.Mar 5 2017, 3:18 AM
cy edited edge metadata.

I left a few comments inline.

I'll remove the obsolete message from the krb5-11[345] ports. It should have been deleted when the ports were split into krb5 and krb5-appl.

security/krb5-115/Makefile
39 ↗(On Diff #25986)

I'm confused why DOCS is needed?

security/krb5-115/files/patch-clients__ksu__Makefile.in
13 ↗(On Diff #25986)

Considering no sources are specified, why the change from : to :: ?

security/krb5-115/files/patch-config__pre.in
3 ↗(On Diff #25986)

This looks like a no-op. A regenned patch. Same below.

security/krb5-115/files/patch-config__shlib.conf
3 ↗(On Diff #25986)

I suppose this patch was regenerated?

security/krb5-115/files/patch-lib__gssapi__krb5__import_name.c
4 ↗(On Diff #25986)

I must assume this is due to a build fail on your system. I can't reproduce it. ???

security/krb5-115/files/pkg-message.in
7 ↗(On Diff #25986)

We can remove this. I should have removed this from the Makefile when krb5-appl was created. I'll remove it from the current krb5 port. Thanks for pointing this out.

This revision now requires changes to proceed.Mar 5 2017, 3:18 AM
john_saltant.com updated this object.
john_saltant.com edited the test plan for this revision. (Show Details)
john_saltant.com edited edge metadata.
john_saltant.com marked 5 inline comments as done.

Responded to feedback. Eliminate PDF and HTML in favor of DOCS. Discard obsolete pkg-message and README.

Incorporated feedback. Responded to questions and open issues.

security/krb5-115/Makefile
39 ↗(On Diff #25986)

DOCS and EXAMPLES are needed to make PORTDOCS and PORTEXAMPLES work. See, for example, PR 217436: A port without any OPTIONS_DEFINE won't package file in DOCSDIR or PORTEXAMPLESDIR if WITHOUT=DOCS/EXAMPLES.

The OPTIONS name change was mainly a style choice to make the relationship with DOCS clearer.

DOCSPDF and DOCSHTML are subordinate to DOCS in that when DOCS is disabled, DOCSPDF and DOCSHTML are no-ops. Upon reflection, this seems like a POLA problem. I poked at some ways to make it less so, like warning on the no-op instead of silently ignoring the PDF and HTML options, but haven't found a non-clunky approach.

Right now it seems like the best course of action is to combine the PDF and HTML options and make it all or nothing with DOCS. The updated patch reflects this.

security/krb5-115/files/patch-clients__ksu__Makefile.in
13 ↗(On Diff #25986)

I regen'd several patches to make portlint happy, and this one picked up an upstream change. Note that it is part of the context, not part of the patch.

security/krb5-115/files/patch-config__pre.in
3 ↗(On Diff #25986)

Correct. Making portlint happy.

security/krb5-115/files/patch-config__shlib.conf
3 ↗(On Diff #25986)

Correct. Making portlint happy.

security/krb5-115/files/patch-lib__gssapi__krb5__import_name.c
4 ↗(On Diff #25986)

This was another case where the regen'd patch gained updated context due to an upstream change. The patch was originally generated from a 2005-07-18 copy of the upstream file.

security/krb5-115/files/pkg-message.in
7 ↗(On Diff #25986)

Now that I look more closely, I see that that both pkg-message and README.FreeBSD are obsolete. I'll be glad to update the patch.

cy requested changes to this revision.Mar 5 2017, 6:00 PM
cy edited edge metadata.

Looks like Phab doesn't want to let me reply to the last item. Rather than rework your patch to remove the last comment and use pkg-message, use the lastest copy of the port as the base for your patch.

Also, I like to keep krb5-113, krb5-114 and krb5-115 in sync. Any changes to krb5-115 will need to be back-ported to krb5-114 and krb5-113. Sometimes we can get away with a single patch that applies to all three. Sometimes not.

security/krb5-115/Makefile
39 ↗(On Diff #25986)

Exactly, it's redundant. A user must specify both to make it work. That's not readily apparent and non-intuitive. I suggest that DOCS be set when DOCSPDF or DCSHTML is set (for that matter, then DICSPDF and DOCSHTML names don't matter, but that's juxtaposition to the issue).

Having the user select two options is also a POLA violation.

security/krb5-115/files/patch-clients__ksu__Makefile.in
13 ↗(On Diff #25986)

I prefer not to regen patches unless it's necessary and if they are regenned, that should be a separate commit. Jumbo commit "cross pollinate" or pollute functional commits with each other making it much more difficult for those coming after us to parse out any particular commit in the history. If we do want to do this, which I think is not necessary right now, this should be a separate commit.

This revision now requires changes to proceed.Mar 5 2017, 6:00 PM

I have an example (actually a re-roll of the patch in this ticket). I can upload it if you want or I get it to you some other way if you want.

The other thing I didn't notice before was that the proposed patch removes README.FreeBSD entirely (README.FreeBSD.in) should generate that file. Looks like it's not. We'll need to look at that.

-share/doc/krb5/README.FreeBSD

The following files are also removed and shouldn't be by the patch. They're used as examples of what users should add to kdc.conf, krb5.conf, and services. These have to stay:

-share/examples/krb5/kdc.conf
-share/examples/krb5/krb5.conf
-share/examples/krb5/services.append

nevermind. I see the change. My last comment should be:

Nevermind. I see the change.

My example applies DOCS when DOCSPDF and/or DOCSHTML is requested.

In D9889#204533, @cy wrote:

I have an example (actually a re-roll of the patch in this ticket). I can upload it if you want or I get it to you some other way if you want.

I'm having some trouble following your comments. It sounds like the thing to do is for me to unbundle this work into a sequence of mostly independent changes so you can review or reject each one in turn, and re-combine them however you think best. That should make my life and yours easier.

If you disagree, I'll make another pass at understanding the subthreads and reconciling your comments.

The other thing I didn't notice before was that the proposed patch removes README.FreeBSD entirely (README.FreeBSD.in) should generate that file. Looks like it's not. We'll need to look at that.

-share/doc/krb5/README.FreeBSD

I see you already committed work to the port (r435447-r435449) on this point, so I'll consider it resolved and re-spin my patch(es) accordingly.

The following files are also removed and shouldn't be by the patch. They're used as examples of what users should add to kdc.conf, krb5.conf, and services. These have to stay:

-share/examples/krb5/kdc.conf
-share/examples/krb5/krb5.conf
-share/examples/krb5/services.append

I did not remove these files. I converted them to PORTEXAMPLES, which dynamically adds them to the PLIST iff the EXAMPLES option is enabled, which it is by default. I will re-submit this as an independent change.

Incidentally, thank you for your prompt responses. I may not get to the next round for a few days now that we're exiting the weekend.

security/krb5-115/Makefile
39 ↗(On Diff #25986)

I considered the approach you describe and tested it with DOCSPDF_IMPLIES=DOCS and DOCSHTML_IMPLIES=DOCS (it works). I rejected that approach because it fails to achieve one of my primary goals, to respect the global DOCS option, not to silently override it. My conclusion was that the ports machinery does not current provide a reasonable way to simultaneously play nicely with DOCS and offer subordinate knobs (e.g. PDF, HTML). I found some examples of ports that try for similar goals and end up in a mess.

If you're wedded to retaining the PDF/HTML granularity, I'm afraid it's going to be difficult to work sensibly with DOCS (and thereby the convenience PORTDOCS) unless we first teach Mk/bsd.options.mk something like ${opt}_CONTINGENT or ${opt}_SUBORDINATE. The POLArity (ha!) is all wrong.

In my upcoming decomposition, I intend to retain the subsumption of the PDF and HTML options into a single DOCS option as shown in my second monolithic patch, and to keep it combined with the adoption of the PORTDOCS-based simplifications of the post-install target that depend upon it.

security/krb5-115/files/patch-clients__ksu__Makefile.in
13 ↗(On Diff #25986)

That's fine. I've worked with other maintainers and committers in the past who wouldn't accept patches unless I fixed a bunch of other, unrelated portlint complaints at the same time. As long as I'm decomposing this into separate commits, I'll retain the portlint-motivated work as a separate commit, but won't feel at all badly if you reject it.

I didn't mean that. We can do one commit for the first seven points. If at a future time the patches need their offsets cleaned up we can do a patch cleanup commit separately. To get an idea of what I'm talking about, rather than pollute this ticket with my patch, check http://cschubert.com/krb5-115.diff. I'd rather the patch come from you than me.

I think generally ports committers tend to put too much into a single commit instead of breaking commits into functional pieces. It''s harder to parse out functional diffs that way... When I got my src commit bit my src mentor taught me that each functional commit should be separate from each other, for that very reason. I've taken that wisdom to ports much to the consternation of people who believe that we try to do as much as possible in one commit. But I digress.

This revision was automatically updated to reflect the committed changes.