Bug 267501 - x11-wm/nscde: Replace expired ksh2020 dependency, Remove DEPRECATED
Summary: x11-wm/nscde: Replace expired ksh2020 dependency, Remove DEPRECATED
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Nuno Teixeira
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-11-01 17:58 UTC by Chris Moerz
Modified: 2023-03-13 20:29 UTC (History)
2 users (show)

See Also:
freebsd: maintainer-feedback+
eduardo: merge-quarterly+


Attachments
patch for x11-wm/nscde (2.29 KB, patch)
2022-11-01 17:58 UTC, Chris Moerz
no flags Details | Diff
Poudriere run for FreeBSD 13.1-RELEASE (122.82 KB, text/plain)
2022-11-01 17:59 UTC, Chris Moerz
no flags Details
x11-wm/nscde update to 2.2_1 (1.42 KB, patch)
2022-11-27 12:56 UTC, Chris Moerz
freebsd: maintainer-approval+
Details | Diff
x11-wm/nscde update to 2.2_2 (1.07 KB, patch)
2023-01-31 18:25 UTC, Chris Moerz
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Moerz 2022-11-01 17:58:56 UTC
Created attachment 237791 [details]
patch for x11-wm/nscde

Modified dependencies to remove legacy shells/ksh2020; replaced with shells/ksh93.

This should then remove DEPRECATED flag for the port.
Poudriere log will follow in a moment.
Comment 1 Chris Moerz 2022-11-01 17:59:15 UTC
Created attachment 237793 [details]
Poudriere run for FreeBSD 13.1-RELEASE
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-11-01 22:24:15 UTC
Thank you for the update Chris.

I note in the patch that OPTIONS were removed, but it also looks like ksh93:shells/ksh2020 was an 'unconditional' BUILD_DEPENDS and the replacement still is.

 - Is the ksh dependency actually unconditional, or optional?
 - ASTKSH_* was also removed, but appears unrelated to the ksh2020 replacement, could you explain its removal?
 - Likewise KSHOPT removal

Ideally this change should be limited to fixing/removing deprecation issue only, such that it can be merged to the quarterly branch (with no other functional changes)
Comment 3 Chris Moerz 2022-11-05 07:18:35 UTC
(In reply to Kubilay Kocak from comment #2)

thanks, you're making a fair point in regards to ksh.

Basically, upstream nscde requires $PREFIX/bin/ksh93 to run. Originally, it even required it during build, which I assume can be relaxed since it switched to autotools (though I have not tested that yet).

Upstream nscde does not make any assumptions about which ksh it needs to be - at least not to my knowledge. I originally chose ksh2020 because it appeared to be the most recent version. In hindsight, this might have been a mistake.

After the port's first iteration, I realized during some experiments that ksh2020 did not compile on arm64. So I added the option to switch between ksh2020 and ast-ksh, because I wanted to make it work on arm64 without breaking/reinstalling it for existing installs on amd64.

When I saw the deprecation notice, I figured it would be best to move the whole port to a ksh port that will remain stable. Admittedly, this will cause reinstalls for those on ksh2020 and ast-ksh.

I'm a bit unsure what the "best practice" is in such a situation - obviously, there could be numerous different ksh ports. Should I include options for all available ksh ports (except the deprecated ones, obviously)?

I also understand, I should probably use the opportunity to investigate, whether it's possible to remove ksh from the build dependency list?

Appreciate your inputs!

thanks
br chris
Comment 4 Chris Moerz 2022-11-27 12:56:31 UTC
Created attachment 238364 [details]
x11-wm/nscde update to 2.2_1

replacement match to only fix ksh2020
Comment 5 Chris Moerz 2022-12-28 18:21:04 UTC
Hi koobs,

sorry for bumping, the deadline for the port is approaching quickly.
I've posted an updated diff. Is there any chance that you could have a look at this open issue?

thanks!
happy new year
chris
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-29 09:13:49 UTC
portlint:

- Makefile: [89]: use of != in assignments, can be this reworked?
- desktop-file-utils to pet portlint?
Comment 7 Chris Moerz 2022-12-29 12:29:47 UTC
(In reply to Nuno Teixeira from comment #6)

Hi Nuno,

thanks for the quick follow up.

The "!=" was introduced by some other port maintainer; I attempted to work around it with variable substitution, but it breaks "make install", where it is then not replaced correctly. Probably because plist entries are holding %%ARCH%% which then do not get resolved properly.

I tried it this way:
UNAME_M_CMD=    ${UNAME} -m
PLIST_SUB+=     ARCH=$$(${UNAME_M_CMD})

Maybe there's a different way, but I've got to admit this is beyond my grasp atm; if you have any suggestions, I'm all ears.

About desktop-file-utils - what would be your recommended way to integrate that? Or am I misreading the portlint statement?

thanks!
chris
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-29 13:11:57 UTC
(In reply to Chris Moerz from comment #7)

Hello Chris,

> I tried it this way:
> UNAME_M_CMD=    ${UNAME} -m
> PLIST_SUB+=     ARCH=$$(${UNAME_M_CMD})

This is the correct way of doing it as described in:
https://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html

> About desktop-file-utils - what would be your recommended way to integrate
> that? Or am I misreading the portlint statement?

portlint complains about:
---
FATAL: x11-wm/nscde/pkg-plist: [2379]: this port installs .desktop files. Please add `desktop-file-utils` to USES.
---

I will add it to USES just to silence portlint.
Comment 9 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-29 14:55:57 UTC
(In reply to Nuno Teixeira from comment #8)
(...)

====> Checking for pkg-plist issues (check-plist)
/bin/sh: /usr/bin/uname!%%ARCH%%!g: not found

if $$(${UNAME_M_CMD}) is not enclosed with ""
---
UNAME_M_CMD=    ${UNAME} -m
PLIST_SUB+=     ARCH="$$(${UNAME_M_CMD})"
---

Just doing routine testports and will commit soon.
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-29 15:08:00 UTC
(In reply to Nuno Teixeira from comment #9)
(...)

bsd.port.mk:
---
# ARCH - The architecture of the target machine, such as would be
#        returned by "uname -p".
---

Did you try:

PLIST_SUB= ARCH=${ARCH} ?
Comment 11 Chris Moerz 2022-12-29 17:17:52 UTC
(In reply to Nuno Teixeira from comment #10)

Ha, you're right; this one works:
PLIST_SUB+= ARCH=${ARCH}

thanks. Do you want me to post an updated patch or do you edit it in your end?

happy new year
chris
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-29 17:23:35 UTC
(In reply to Chris Moerz from comment #11)

Nice! No need to upload a new diff, I do it from here.
Comment 13 commit-hook freebsd_committer freebsd_triage 2022-12-30 08:41:31 UTC
A commit in branch main references this bug:

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

commit f9080cec69db09ce08dc72da892cc830fdbfe231
Author:     Chris Moerz <freebsd@ny-central.org>
AuthorDate: 2022-12-30 08:36:08 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-30 08:40:33 +0000

    x11-wm/nscde: Replace expired ksh2020 dependency, Remove DEPRECATED

     - add LICENSE_FILE
     - fix avoiding use of != in assignments

    PR:             267501
    MFH:            2022Q4

 x11-wm/nscde/Makefile | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2022-12-30 08:53:35 UTC
A commit in branch 2022Q4 references this bug:

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

commit ec758d993d3b5c197443778f302a5cbae8d5f363
Author:     Chris Moerz <freebsd@ny-central.org>
AuthorDate: 2022-12-30 08:36:08 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-30 08:42:21 +0000

    x11-wm/nscde: Replace expired ksh2020 dependency, Remove DEPRECATED

     - add LICENSE_FILE
     - fix avoiding use of != in assignments

    PR:             267501
    MFH:            2022Q4
    (cherry picked from commit f9080cec69db09ce08dc72da892cc830fdbfe231)

 x11-wm/nscde/Makefile | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
Comment 15 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-30 08:57:24 UTC
Sticking with `uname -m` since ARCH (uname -p) will induce errors already fixed in 4ae82fd by pkubaj@.

Committed, thanks!
Comment 16 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-30 09:18:38 UTC
Hi Chris,

Please analyze message from cy@:

---
shells/ksh is the continuation of the ksh2020 development. I think you'll
want that. CDE, for instance tests for the existence of the ksh and ksh93
binaries. If nscde does the same you may consider testing it with that port.

However I'm pondering on flavorizing the three ksh's to allow them to
coexit if you prefer to wait/discuss. They currently implement this using
option helpers.

shells/ksh93 is the no longer developed legacy AT&T AST ksh, with all of
its warts and bugs should a script depend on them.

shells/ksh and shells/ksh-devel are based on a GH project (ksh93/ksh) that
was forked from ast/ksh when AT&T AST shut down that development and moved
the development to the ksh2020 branch for safe keeping. The developers at
the time forked ast/ksh to continue development under their own project.
So, I think you probably want shells/ksh.
---

Can you do further tests?

Cheers
Comment 17 Chris Moerz 2022-12-30 12:06:56 UTC
(In reply to Nuno Teixeira from comment #16)

Sure, I'll look into shells/ksh; I assume it'll work.
Let me get back to you after running nscde for a day with it.
Comment 18 Nuno Teixeira freebsd_committer freebsd_triage 2023-01-31 09:52:48 UTC
Friendly ping
Comment 19 Chris Moerz 2023-01-31 18:25:43 UTC
Created attachment 239831 [details]
x11-wm/nscde update to 2.2_2

Thanks for the reminder, Nuno.
I've been running on this updated version with regular ksh ever since the last reply. I believe we can switch it over.

We should probably consider removing the ksh selection option completely, but I left it untouched for the moment so not to upset anyone depending on this. Thing is, I don't know whether anyone is using nscde with ast-ksh (i.e. for particular old scripts outside of nscde).

Is there any way to deprecate the option?

Thanks
Comment 20 Nuno Teixeira freebsd_committer freebsd_triage 2023-02-01 11:24:08 UTC
(In reply to Chris Moerz from comment #19)

Removing KSH2020 option will not affect people who have shells/ksh93 or shells/ksh installed.

If KSH2020 option is not needed anymore just remove it.
If you see that it breaks something, a pkg-message could be added to inform users that this option was removed using 'maximum_version' and/or 'minimum_version' when upgrading:

https://docs.freebsd.org/en/books/porters-handbook/book/#porting-message-ucl

Cheers
Comment 21 Chris Moerz 2023-03-13 20:10:22 UTC
Hi Nuno,

your status change just made me realize that this might still be kind of "open" because I did not follow up with a patch to remove the checkbox option.

Would you prefer that I post an additional patch or should I file a new bug with a new port revision to remove it? I assume delaying this a little longer would not affect too many people because the deprecation flag was already resolved, from what I can see?

Apologies for dropping the ball on this.

Thanks
chris
Comment 22 commit-hook freebsd_committer freebsd_triage 2023-03-13 20:21:01 UTC
A commit in branch main references this bug:

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

commit ca3863ffe5a2ee0539305de19d8d5fe5239437bc
Author:     Chris Moerz <freebsd@ny-central.org>
AuthorDate: 2023-03-13 09:54:44 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-03-13 20:20:20 +0000

    x11-wm/nscde: Replace shells/ksh93 with shells/ksh dependency

    shells/ksh is the continuation of the ksh2020 development.
    shells/ksh93 is the no longer developed legacy AT&T AST ksh.

    PR:             267501
    Reported by:    cy

 x11-wm/nscde/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 23 Nuno Teixeira freebsd_committer freebsd_triage 2023-03-13 20:29:36 UTC
(In reply to Chris Moerz from comment #21)
Hello Chris,

I've committed shells replacement from the diff you sent.
Please reopen this PR or create a new one for option deprecation.

Committed, thanks!