Bug 277588 - net/openradius: refactor source, port, and move to codeberg, update to 0.9.14
Summary: net/openradius: refactor source, port, and move to codeberg, update to 0.9.14
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Zsolt Udvari
URL:
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2024-03-08 23:54 UTC by Chris Hutchinson
Modified: 2024-08-15 04:53 UTC (History)
1 user (show)

See Also:


Attachments
patch for net/openradius (5.00 KB, patch)
2024-03-08 23:54 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
patch against net/openradius (5.61 KB, patch)
2024-03-09 04:11 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
patch for net/openradius (version 3) (5.79 KB, patch)
2024-04-30 03:42 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
git diff against net/openradius (11.97 KB, patch)
2024-05-24 01:21 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
git diff against net/openradius (final) (12.60 KB, patch)
2024-05-24 08:42 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
git diff against net/openradius (FINAL) (12.41 KB, patch)
2024-05-24 18:47 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
net/openradius: re upping patch (12.41 KB, patch)
2024-08-12 20:52 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff
build log from releng-13.3 (7.92 KB, text/plain)
2024-08-13 22:18 UTC, Chris Hutchinson
no flags Details
build log from releng-14 (7.99 KB, text/plain)
2024-08-13 22:18 UTC, Chris Hutchinson
no flags Details
build log from 15-current (7.99 KB, text/plain)
2024-08-13 22:19 UTC, Chris Hutchinson
no flags Details
net/openradius: patch, final-version (11.86 KB, patch)
2024-08-14 14:31 UTC, Chris Hutchinson
portmaster: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hutchinson 2024-03-08 23:54:19 UTC
Created attachment 249042 [details]
patch for net/openradius

This pr(1) removes a dead MASTERSITES. While here
cleanup Makefile, and patch files.

That's it.

Thanks!

--Chris
Comment 1 Chris Hutchinson 2024-03-09 04:11:47 UTC
Created attachment 249044 [details]
patch against net/openradius

Committed local source changes and posted source to public VCS.

Changes:
Change MASTERSITES, bump version (0.9.13), cleanup patches.
update distinfo.

Tested against releng/13,14 and CURRENT.

That's it.

Thanks
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-14 18:30:28 UTC
Could you check please "portfmt -D Makefile"?
Could you replace ".if ${PORT_OPTIONS:MLDAP}" to "Options Helpers" (https://docs.freebsd.org/en/books/porters-handbook/book/#options-helpers)?
Comment 3 Chris Hutchinson 2024-04-30 03:42:09 UTC
Created attachment 250295 [details]
patch for net/openradius (version 3)

Sorry. I seemed to have missed this.

> Could you check please "portfmt -D Makefile"?
DONE

> Could you replace ".if ${PORT_OPTIONS:MLDAP}" to "Options Helpers"
All attempts reject any incantation of the SCRIPTS_ENV
Comment 4 Zsolt Udvari freebsd_committer freebsd_triage 2024-04-30 18:30:28 UTC
(In reply to Chris Hutchinson from comment #3)
"All attempts reject any incantation of the SCRIPTS_ENV"
Did you try OPT_VARS?
https://docs.freebsd.org/en/books/porters-handbook/book/#options-vars

Can be the post-install target simpler? As I see you copy (almost) every file. Maybe you may want check https://docs.freebsd.org/en/books/porters-handbook/book/#install-copytree

I'm checking your "scripts/configure". As I see it overwrites openradius's Makefile, only with a small changes.
I don't know openradius but the modules/memory/memory isn't included in your TGT_LIB. Is it intentional? And the S_CF_CRYPT is missed too.
Your configure script declare AR variable but in the original Makefile there is ARCHIVE variable (and it's used common/ and language/Rules.mk).
And if I understand correctly the CF_ALL is CFLAGS. Why don't you use the system's CFLAGS? (https://docs.freebsd.org/en/books/porters-handbook/book/#dads-cflags)
As I see you want modify the Makefile because of only LOGFILE and LDAP.
What do you think about create a patch? IMHO it would be simpler and easier to maintain - and in this case you don't need SCRIPTS_ENV :)
Comment 5 Chris Hutchinson 2024-04-30 19:03:05 UTC
(In reply to Zsolt Udvari from comment #4)
All really good points.
I'll submit something later today.

Thanks.
Comment 6 Chris Hutchinson 2024-05-24 01:21:00 UTC
Created attachment 250915 [details]
git diff against net/openradius

OK. I've put a tremendous amount into both
the source, and the port. I've eliminated several
patch files, added a one, and renamed all of them
to the current naming conventions. I've addressed
all of your comments. I reworked the LDAP source,
and the options layout. Everything builds as intended.
But the ports framework barfs upon generating pkg-plist:

===>   Generating temporary packing list
sed: 1: "s!%%!g
": unescaped newline inside substitute pattern
*** Error code 1

I can find no reason/explanation. The git diff attached
reflects an otherwise perfect port.

Suggestions on how to proceed?

--Chris
Comment 7 Chris Hutchinson 2024-05-24 08:42:27 UTC
Created attachment 250919 [details]
git diff against net/openradius (final)

OK. This patch *finally* resolves all the outstanding issues.
- Makefile: refactor options, change MASTER_SITES,
  PORTVERSION, WWW, cleanup...
- distinfo: update
- files/*: deleted several, added one, renamed all to
  current naming conventions

The head of the attached git diff provides a nice summary.

All tests return OK on 13, 14 && 15.

Please commit.

Thanks!

--Chris
Comment 8 Chris Hutchinson 2024-05-24 18:47:14 UTC
Created attachment 250929 [details]
git diff against net/openradius (FINAL)

Same patch as last one. But without leftover
useless comments.

We're done here. :)

Thanks!

--Chris
Comment 9 Zsolt Udvari freebsd_committer freebsd_triage 2024-05-25 17:52:26 UTC
(In reply to Chris Hutchinson from comment #8)
Uh, big work :)

I see an error while building:
===>   Building openradius-0.9.14
pkg-static: cannot load keyword from /usr/ports/Keywords/commentlib/openradius/radldap.ucl: No such file or directory
pkg-static: unknown keyword commentlib/openradius/radldap: @commentlib/openradius/radldap
*** Error code 1

And a warning:
Warning: Bad symlink '/usr/local/lib/openradius/radclient' pointing to an absolute pathname '/usr/local/bin/radclient'
Comment 10 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-11 19:39:37 UTC
Friendly ping.
Comment 11 Chris Hutchinson 2024-08-12 20:48:14 UTC
(In reply to Zsolt Udvari from comment #10)
Thanks for the reminder. I don't know how I forgot this.

> Uh, big work :)
Seems like. :)

Applying the patch attached to this pr(1):

> I see an error while building:
> ===>   Building openradius-0.9.14
> pkg-static: cannot load keyword from /usr/ports/Keywords/commentlib/openradius/radldap.ucl: No such file or directory
> pkg-static: unknown keyword commentlib/openradius/radldap: @commentlib/openradius/radldap
> *** Error code 1
I can't reproduce this.

> And a warning:
> Warning: Bad symlink '/usr/local/lib/openradius/radclient' pointing to
> an absolute pathname '/usr/local/bin/radclient'
Yes. I see it too. I see this a lot. It's harmless.
Not sure how I'd even change it.

--Chris
Comment 12 Chris Hutchinson 2024-08-12 20:52:59 UTC
Created attachment 252721 [details]
net/openradius: re upping patch

Attaching patch again. To make sure we're both using the same one.

Thanks!

--Chris
Comment 13 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-13 18:47:12 UTC
Same error as above :(
Did you test with poudriere?
Comment 14 Chris Hutchinson 2024-08-13 22:15:07 UTC
> Same error as above :(
> Did you test with poudriere?
Ahh. That explains it. Your copy of poudriere is broken. This
is one of the reasons I stopped using poudriere to test ports.
It introduces variables that don't exist in real-life port builds && usage.
I build and test all my ports in a fresh jail(8). This way I
see the same thing as my users see when *they* build/install/run
my ports. I can also actually test my ports in a jail. Something
that can't be done in poudriere.

So I've built && tested this port in releng-13.3, releng-14, and
15-current. I'm attaching the logs from each of them.

Thanks for your continued attention to this port.

--Chis
Comment 15 Chris Hutchinson 2024-08-13 22:18:08 UTC
Created attachment 252747 [details]
build log from releng-13.3
Comment 16 Chris Hutchinson 2024-08-13 22:18:57 UTC
Created attachment 252748 [details]
build log from releng-14
Comment 17 Chris Hutchinson 2024-08-13 22:19:50 UTC
Created attachment 252749 [details]
build log from 15-current
Comment 18 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-14 05:21:10 UTC
(In reply to Chris Hutchinson from comment #14)
I can build the current version with poudriere. The newest version can't.

The package repository built with poudriere so if your port can't build with poudriere then doesn't appear in package repository and you'll receive email about failing build (for example see https://lists.freebsd.org/archives/freebsd-pkg-fallout/2024-August/632486.html).

I (and other committers) don't commit with failing of poudriere.
Comment 19 Chris Hutchinson 2024-08-14 06:40:12 UTC
(In reply to Zsolt Udvari from comment #18)
Oh, I see what's wrong:

===>  Building packages for openradius-0.9.14
===>   Building openradius-0.9.14
pkg-static: cannot load keyword from /usr/ports/Keywords/commentlib/openradius/radldap.ucl: No such file or directory
pkg-static: unknown keyword commentlib/openradius/radldap: @commentlib/openradius/radldap
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/openradius
*** Error code 1

Stop.
make: stopped in /usr/ports/net/openradius
11:14pm

pkg(8) is broken. So now I've got to figure out how to trick pkg
into believing that
/usr/ports/Keywords/commentlib/openradius/radldap.ucl
exists, and everything will be fine. :(
radldap.ucl is not, nor has never been part of the ports framework.
I guess I'll just have to wait until pkg(8) starts working again.

Sigh...
I'll try to fix pkg tomorrow. It's late here, I'm going to sleep now.
Comment 20 Chris Hutchinson 2024-08-14 14:31:09 UTC
Created attachment 252756 [details]
net/openradius: patch, final-version

Sorry for the unnecessary drama last night. This patch should
satisfy your needs. :)
Closer examination with a clear mind this morning, revealed it
was a pkg-plist entry that tripped up pkg(8). Glad this is
finally over. :)

Thanks again, for all your time here.

--Chris
Comment 21 commit-hook freebsd_committer freebsd_triage 2024-08-15 04:52:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dee466c071b5f1cff1aa85e394e60cd17affcfdc

commit dee466c071b5f1cff1aa85e394e60cd17affcfdc
Author:     Chris Hutchinson <portmaster@bsdforge.com>
AuthorDate: 2024-08-14 18:44:42 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-08-15 04:50:56 +0000

    net/openradius: update to 0.9.14

    Update WWW and MASTER_SITES.
    Pet portlint, portfmt, portclippy.

    Changelog: https://codeberg.org/BSDforge/openradius/src/branch/main/CHANGELOG

    PR:             277588
    Approved by:    submitter is maintainer

 net/openradius/Makefile                            | 75 +++++++++-------------
 net/openradius/distinfo                            |  5 +-
 net/openradius/files/openradius.in                 |  4 +-
 net/openradius/files/patch-Rules.mk                |  4 +-
 net/openradius/files/patch-common-misc.c (gone)    | 11 ----
 net/openradius/files/patch-common-misc.h (gone)    | 11 ----
 ...patch-common-Rules.mk => patch-common_Rules.mk} |  4 +-
 net/openradius/files/patch-constants.h (gone)      | 12 ----
 .../{patch-ETCRules.mk => patch-etc_Rules.mk}      |  4 +-
 ...h-language-Rules.mk => patch-language_Rules.mk} |  4 +-
 net/openradius/pkg-plist                           |  3 +-
 net/openradius/scripts/configure                   |  8 ++-
 12 files changed, 49 insertions(+), 96 deletions(-)
Comment 22 Zsolt Udvari freebsd_committer freebsd_triage 2024-08-15 04:53:35 UTC
(In reply to Chris Hutchinson from comment #20)
No problem :) We don't hurry. If you're tired need to rest - I do the same :)

Committed, thanks!