Bug 254237 - irc/irssi: Revert to 1.2.2
Summary: irc/irssi: Revert to 1.2.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: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-12 13:08 UTC by David O'Rourke
Modified: 2021-03-16 11:29 UTC (History)
5 users (show)

See Also:


Attachments
irc/irssi: Revert to 1.2.2 (12.87 KB, patch)
2021-03-12 13:08 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff
irc/irssi: Revert to 1.2.2 (21.44 KB, patch)
2021-03-13 17:20 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David O'Rourke 2021-03-12 13:08:17 UTC
Created attachment 223207 [details]
irc/irssi: Revert to 1.2.2

This diff reverts irc/irssi to the released 1.2.2 version.

The reason for the revert is complaints on IRC and questions on the subject outside of the bug tracker (ie. to my email).

The diff:
  - Restores the port to what it was before 1.3
  - Bumps PORTEPOCH and PORTREVISION to 2
    - These were both at 1 on the previous 1.2.2 package
  - Fixes a minor issue when compiling with OTR (--with-otr being passed twice)
  - Includes a patch for a glib related issue where pushing ctrl+space could break the client

The above brings the port back inline with the current release version of irssi as advertised on their download page (1.2.2 client + glib patch).

If there is enough interest, the 1.3 version of the client could be recreated as a separate irssi-dev package.

As I have not had a port in this situation before (needing to bump the PORTEPOCH for a version downgrade), a more seasoned porter may wish to look at this closely to make sure I've done the right thing here.

Thanks,
-David
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2021-03-13 06:11:55 UTC
Out of curiosity, what complaints?
You also need to backport the SSL stuff which is broken in 1.2.2 (irssi doesn't reset SSL bit between SSL and non SSL servers in the same server list)
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2021-03-13 10:57:21 UTC
Can't this be taken forward with a fresher upstream import or patches, rather than going backwards? 

Are patches for 1.2.2 for Daniel's concerns (comment #1) available?
Comment 3 David O'Rourke 2021-03-13 17:18:01 UTC
(In reply to daniel.engberg.lists from comment #1)

> Out of curiosity, what complaints?

Freenode is very vocal about irssi 1.3 not being released, saying things like "testing happens in prod, aka freebsd". Generally poking fun in this direction.
Meme websites: http://is-irssi1.3-out.today/
Pinned issues: https://github.com/irssi/irssi/issues/1278
I'm guessing we're causing them to get questions about things that they don't want to answer, because it's we're not packaging a stable version.

Questions in my email are about the differences that irssi 1.3 has, why is there a need to /load perl when that isn't needed elsewhere, why is OTR weird now (maybe it is, I don't use OTR), requests to just downgrade back to 1.2.2.  Things I'd rather not be wasting my time answering, and which can be avoided by just packaging the stable release.

There is a patch available for Daniel's concern, it's available at https://github.com/irssi/irssi/pull/1134, I've got a new diff available which I'll attach shortly which includes this patch. I don't use SSL directly in irssi myself, it's offloaded to a local BNC, so I'm not really able to test this patch.

Additionally, I've included a patch for a /quit segfault which can happen depending on module use.

> Can't this be taken forward with a fresher upstream import or patches, rather than going backwards? 

Unfortunately, this probably wouldn't prevent upstream or myself getting questions and comments about FreeBSD using the 1.3 development version.

-David
Comment 4 David O'Rourke 2021-03-13 17:20:40 UTC
Created attachment 223233 [details]
irc/irssi: Revert to 1.2.2

This diff includes (in additional to patches already mentioned earlier in the tracker):
  - SSL/non-SSL server list patch
  - /quit segfaults depending on module unload order
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2021-03-13 19:09:27 UTC
So, again, what are the practical concrete specific issues and bugs with the 1.3 development version other than it doesn't have the holy writing "release" on it?
Comment 6 Tassilo Philipp 2021-03-14 09:58:32 UTC
Hello, I came across this PR b/c yeah, the 1.3 version seems to be unstable. And not just in the way outlined above.

Ever since the port upgrade irssi crashes hard for me when joining certain channels on efnet. It crashes in some perl module (TextUI.so). With 1.2.2 it's stable. I hope to find some time next week to debug this and send reports upstream to irssi. However, this doesn't change that the 1.3 port is more or less unusable right now - at least for me.

So in order to use it at all, I had to port downgrade to 1.2.2.
Comment 7 Marco Beishuizen 2021-03-14 10:32:14 UTC
Why not create a separate irc/irssi-devel for the 1.3 version? And keep irc/irssi for the stable 1.2.2.
Comment 8 Tassilo Philipp 2021-03-14 17:53:44 UTC
(In reply to Marco Beishuizen from comment #7)

+1
I think this also makes the most sense given that 1.3 isn't officially released and yeah.. not stable.
Comment 9 Neel Chauhan freebsd_committer freebsd_triage 2021-03-15 17:38:19 UTC
Committed!
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-03-15 17:38:39 UTC
A commit references this bug:

Author: nc
Date: Mon Mar 15 17:38:17 UTC 2021
New revision: 568480
URL: https://svnweb.freebsd.org/changeset/ports/568480

Log:
  irc/irssi: Revert to 1.2.2

  The reason for the revert is complaints on IRC and questions to the maintainer
  via email.

  This commit:

    - Restores the port to what it was before 1.3
    - Bumps PORTEPOCH and PORTREVISION to 2
      - These were both at 1 on the previous 1.2.2 package
    - Fixes a minor issue when compiling with OTR (--with-otr being passed twice)
    - Includes a patch for a glib related issue where pushing ctrl+space could break the client

  This commit brings the port back inline with the current release version of
  irssi as advertised on their download page (1.2.2 client + glib patch).

  PR:		254237
  Submitted by:	David O'Rourke <dor.bsd@xm0.uk> (maintainer)

Changes:
  head/irc/irssi/Makefile
  head/irc/irssi/distinfo
  head/irc/irssi/files/patch-Makefile.in
  head/irc/irssi/files/patch-configure.ac
  head/irc/irssi/files/patch-meson.build
  head/irc/irssi/files/patch-perl-Makefile
  head/irc/irssi/files/patch-src_core_modules.c
  head/irc/irssi/files/patch-src_core_servers-reconnect.c
  head/irc/irssi/files/patch-src_core_servers-setup.c
  head/irc/irssi/files/patch-src_fe-text_term-terminfo.c
  head/irc/irssi/pkg-message
  head/irc/irssi/pkg-plist
Comment 11 Daniel Engberg freebsd_committer freebsd_triage 2021-03-15 18:05:39 UTC
@ Tassilo Philipp
Can you please share your setup and how to replicate?

@ All
This was in tree for over 3 months (with maintainer approval) so it's a bit odd that one person is reporting issues now.
Comment 12 Tassilo Philipp 2021-03-16 09:23:49 UTC
(In reply to daniel.engberg.lists from comment #11)

I don't think it's odd... I for myself don't update my ports every week or so, so it's very normal that I notice issues months later. Either way, I don't see why this is a point to elaborate on further, 1.3 simply isn't released, so why should FreeBSD have a port claiming it has a 1.3 version, with the "devel" part hidden somewhere in the version number?
It's a reasonable suggestion in my opinion to have an irssi-devel port for that. I mean that without any hard feelings, I might just be a bit more old-school, fully acknowledging that times changed and that there is a new culture where everything is bleeding edge all the time, especially with github folks. But still, 1.2.2 is the stable version, it's as simple as that.

About replication of what I was talking about, please give me a day or so to get back to you on that, it's a bit more complex than that and I'm trying to break it down to the simplest possible case, b/c:
- it only happens with a bouncer in place, so it's probably related to the backlog, however which bouncer doesn't seem to matter so it's not bouncer specific
- I need to rebuild this with debug info and get a usable backtrace to poinpoint this more
- should I report back here? I mean this issue is closed, so let me know where to report to... I personally would've reported upstream
Comment 13 Tassilo Philipp 2021-03-16 11:29:44 UTC
@ Daniel Engberg:

I actually got some time right away and found it quickly, and this is what happens, the below should be clear to not even need to repro:

- it's related to the openurl script: https://github.com/irssi/scripts.irssi.org/blob/master/scripts/openurl.pl

- the crash is only triggered if the max number of urls to keep by the script is exhausted, and thus del_notes is called, explaining why this crashes for me with a bouncer backlog, and only for some channels (note that this would also crash without a bouncer when just leaving a channel open for a while)

- on line 184 you have: $view->set_bookmark($_, undef);

- this in turn makes line to be NULL in src/perl/textui/TextBufferView.xs at line 85

- given that in 1.3-... dev that file changed to specify some CODE: directly that does a line->line dereference, this segfaults

- in 1.2.2, this behaves differently in that line gets eventually passed to glib's g_hash_table_insert as value, which is perfectly fine for when it's NULL, so it is never dereferenced

It is an open question who is at fault here, as the script should probably try to do what it's doing in a different way. However, irssi's new behaviour is de-facto not checking the input for this function (and also many others that changed in similar ways), and given this is externally facing stuff to be used by scripts/users, etc., this isn't really the way it should be coded, either (IMHO).

Hth, I'm not sure if you are involved with irssi in any way, given you asked, but if so, do you mind taking this issue over from here? If not, no problem, just let me know.