Bug 266771 - [PATCH] devel/readline: Update to 8.2
Summary: [PATCH] devel/readline: Update to 8.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-10-02 19:19 UTC by Cy Schubert
Modified: 2022-11-21 08:31 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)
cy: merge-quarterly?
antoine: exp-run+


Attachments
Update devel/readline to 8.2 (2.19 KB, patch)
2022-10-02 19:19 UTC, Cy Schubert
no flags Details | Diff
my patch (1.63 KB, text/plain)
2022-10-09 20:03 UTC, Po-Chuan Hsieh
no flags Details
my patch (1.63 KB, text/plain)
2022-10-09 20:04 UTC, Po-Chuan Hsieh
no flags Details
Fix to build gdb with readline 8.2 (531 bytes, patch)
2022-10-18 21:00 UTC, Luca Pizzamiglio
pizzamig: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer freebsd_triage 2022-10-02 19:19:58 UTC
Created attachment 237024 [details]
Update devel/readline to 8.2

Update devel/readline to 8.2.
Comment 1 Michael Osipov 2022-10-04 08:48:22 UTC
This also needs to be back ported to 2022Q4 since bash 5.2 is already in 2022Q4.
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2022-10-07 17:12:12 UTC
(In reply to Michael Osipov from comment #1)
Noted. I've put that into my commit log message in my readline branch.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-10-07 17:15:18 UTC
Added pkg-manager@ cc because of suggested exp-run.
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-10-09 20:03:38 UTC
Created attachment 237169 [details]
my patch
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-10-09 20:04:09 UTC
Created attachment 237170 [details]
my patch
Comment 6 Antoine Brodin freebsd_committer freebsd_triage 2022-10-11 12:11:25 UTC
New failure log:

http://package18.nyi.freebsd.org/data/123amd64-default-foo/2022-10-07_19h42m30s/logs/gdb-12.1_1.log

All ports depending on gdb were skipped
Comment 7 Michael Osipov 2022-10-11 12:19:15 UTC
(In reply to Antoine Brodin from comment #6)

Bah, I knew that pulling in bash 5.2 w/o further testing is a mistake :-( I have supplied patches some time ago to bash and readline to use ports only because otherwise LOCALBASE/etc/inputrc isn't used. So current bash with bundled readline isn't really usable.
Comment 8 Michael Osipov 2022-10-12 20:25:53 UTC
Emanuel,

I consider this as a serious blocker as laid out the bundled readline is not patched like the one from the ports. Unless the gdb issue is addressed within days, shells/bash will be broken for quite some time. Can you revert to 5.1.x until this is fully resolved and the both bash and readline can be updated in main and quarterly?
Comment 9 Emanuel Haupt freebsd_committer freebsd_triage 2022-10-14 07:04:19 UTC
Michael,

The PORTS_READLINE option in shells/bash being broken due to an outdated dependency is low hanging fruit. Options break, new ones appear. This is part of a normal ports lifecycle.

Bash is very much usable with the bundled readline.

I suggest you invest your effort into solving the dependency issue.
Comment 10 Michael Osipov 2022-10-14 07:32:41 UTC
(In reply to Emanuel Haupt from comment #9)

While you consider readline a low hanging fruit, taking care of the GDB fallout isn't. At this time, it is beyond my capabilities :-(
Comment 11 Michael Osipov 2022-10-14 07:53:43 UTC
(In reply to Antoine Brodin from comment #6)

Luca, can you have a look at this failure?
Comment 12 Michael Osipov 2022-10-14 08:04:05 UTC
FTR: https://git.savannah.gnu.org/cgit/readline.git/diff/CHANGES?id=f7a382fd09319b20ef4435b9b554183b605468c1

> +h. rl_completer_word_break_characters is now `const char *' like
> +   rl_basic_word_break_characters.
Comment 13 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:02 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 14 Luca Pizzamiglio freebsd_committer freebsd_triage 2022-10-18 21:00:51 UTC
Created attachment 237445 [details]
Fix to build gdb with readline 8.2

This patch fix the build with readline 8.2 (and it should be compatible with 8.1).

I'm testing gdb with this patch with readline 8.1 and, if it works, I will commit it before readline 8.2 lands, if it's OK with you.

However, an exp-run could be retried, to identify potential other affected ports
Comment 15 Michael Osipov 2022-10-18 21:08:50 UTC
(In reply to Luca Pizzamiglio from comment #14)

Mille grazie! An exp-run would be advised since a lot of ports were skipped because of this.
Comment 16 Luca Pizzamiglio freebsd_committer freebsd_triage 2022-10-20 07:34:39 UTC
Comment on attachment 237445 [details]
Fix to build gdb with readline 8.2

This patch has been added to gdb in the main tree.
It can be ignored
Comment 17 Antoine Brodin freebsd_committer freebsd_triage 2022-10-24 07:37:41 UTC
Exp-run looks fine
Comment 18 Michael Osipov 2022-11-02 12:24:30 UTC
(In reply to Luca Pizzamiglio from comment #16)

You likely mean this https://github.com/bminor/binutils-gdb/commit/1add37b567a7dee39d99f37b37802034c3fce9c4, no?

devel/binutils is still at 2.37_4,1, so this should be upgraded, no?
Comment 19 Luca Pizzamiglio freebsd_committer freebsd_triage 2022-11-02 12:52:29 UTC
(In reply to Michael Osipov from comment #18)
I don't understand your comment.
I've added a patch in gdb to support both readline.
My patch is identical to the commit already present in upstream.

devel/binutils is a different port and it follows a different release process.

The gdb dependency to binutils is vendored.
Comment 20 Michael Osipov 2022-11-02 17:17:15 UTC
(In reply to Luca Pizzamiglio from comment #19)

Yes, you are right. I do not fully understand their development model. Here https://github.com/bminor/binutils-gdb/blob/gdb-12-branch/gdb/completer.c#L2014 it is not fixed.
Comment 21 Cy Schubert freebsd_committer freebsd_triage 2022-11-02 17:20:21 UTC
(In reply to Michael Osipov from comment #18)
See PR/265917.

Do we want to block on PR/265917?
Comment 22 John Hein 2022-11-02 18:45:27 UTC
(In reply to Cy Schubert from comment #21)
I don't think this is dependent on bug 265917 (no need for a binutils update).

Luca fixed gdb for old or new readline, and the failures in the exp run (comment 6) are resolved after that fix (committed Oct 20).  I think this update to readline-8.2 is ready to commit from a build perspective - any of the patches will do.  I used attachment 237170 [details] - seems cleanest.  Brief run testing seems fine.

Then after this is updated, bash can remove PORTS_READLINE_BROKEN (see also bug 266897) - that was also build/run tested here.
Comment 23 Emanuel Haupt freebsd_committer freebsd_triage 2022-11-14 06:51:41 UTC
(In reply to John Hein from comment #22)

> Then after this is updated, bash can remove PORTS_READLINE_BROKEN (see also bug 266897) - that was also build/run tested here.

That was always the plan. I'm ready to make the change to bash as soon as devel/readline is updated.
Comment 24 Michael Osipov 2022-11-16 12:46:18 UTC
Any objections to apply this patch?
Comment 25 commit-hook freebsd_committer freebsd_triage 2022-11-19 08:19:32 UTC
A commit in branch main references this bug:

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

commit eedcedd71e71745c7dabf7493961a4bf3e0440ad
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-11-19 08:11:18 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-11-19 08:11:18 +0000

    devel/readline: Update to 8.2

    Changes:        https://tiswww.case.edu/php/chet/readline/CHANGES
    PR:             266771
    Exp-run by:     antoine

 devel/readline/Makefile  | 8 ++++----
 devel/readline/distinfo  | 6 +++---
 devel/readline/pkg-plist | 1 +
 3 files changed, 8 insertions(+), 7 deletions(-)
Comment 26 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-11-19 08:48:05 UTC
(In reply to Emanuel Haupt from comment #23)

I've removed the BROKEN from shells/bash in ports 372693913a051e16e6c79f1e22d78e0036f1575e and ports 74b3fb646c38fb30d6fd1abac8fbefa2f11560af. Sorry for the typo.
Comment 27 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-11-19 08:55:05 UTC
Committed. Thanks you all.
Comment 28 Michael Osipov 2022-11-21 08:31:04 UTC
Since 2022Q4 is broken as well, please cherry pick those commits. I need to maintain a custom branch for poudriere to stay on 5.1.x :-(