Bug 249910 - irc/irssi: Update to snapshot 1.3 (20201114)
Summary: irc/irssi: Update to snapshot 1.3 (20201114)
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: Fernando Apesteguía
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-09-26 10:04 UTC by Daniel Engberg
Modified: 2022-01-25 12:48 UTC (History)
4 users (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments
Patch for irssi (WIP) (10.37 KB, patch)
2020-09-26 10:04 UTC, Daniel Engberg
no flags Details | Diff
Patch for irssi v2 (WIP) (9.97 KB, patch)
2020-09-26 13:15 UTC, Daniel Engberg
no flags Details | Diff
Patch for irssi v3 (9.97 KB, patch)
2020-09-26 15:10 UTC, Daniel Engberg
no flags Details | Diff
Patch for irssi v4 (10.16 KB, patch)
2020-11-14 19:57 UTC, Daniel Engberg
no flags Details | Diff
Patch for irssi v5 (10.30 KB, patch)
2020-11-16 01:28 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2020-09-26 10:04:14 UTC
Created attachment 218315 [details]
Patch for irssi (WIP)

Update irssi to snapshot 1.3.20200911

Includes various bug fixes including ones related to Glib and SSL/TLS

Compile and run-tested FreeBSD 13.0-CURRENT #0 r364979 (AMD64)
Poudriere testport OK 12.1-RELEASE (amd64)
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2020-09-26 10:10:24 UTC
I forgot to mention, this also switches to Meson

Known issues:

Capsicum fail during configure stage:

Compiler stderr:
 /usr/ports/irc/irssi/work/irssi-561619f/_build/meson-private/tmp4ziugp_n/testfile.c:17:18: error: "__builtin_nvlist_create_found not found"
                #error "__builtin_nvlist_create_found not found"
                 ^
1 error generated.

Portlint complains about TRUECOLOR option and I can't figure out why

WARN: Makefile: TRUECOLOR is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MTRUECOLOR appears.

Help appreciated

Additional notes, I know that not using releases aren't ideal but upstream at least for now has no intention releasing a new version.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2020-09-26 13:15:15 UTC
Created attachment 218324 [details]
Patch for irssi v2 (WIP)

Use naming schema in used in example 5.14 (Porters Handbook), suggested by jrm@
Use YES/NO ports framework logic (5.13.3.5.3 in Ports handbook), suggested by jrm@ (I missed that paragraph when I looked at it)

portlint till complains about TRUECOLOR (seems to be a false positive)
Capsicum still doesn't build
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2020-09-26 15:10:55 UTC
Created attachment 218328 [details]
Patch for irssi v3

Fixes compilation with capsicum
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2020-09-30 06:24:50 UTC
^Triage: If there is a changelog or release notes URL available for this version, please add it to the URL field.


Thanks!
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2020-09-30 06:51:41 UTC
Hi,

There isn't one except for the commit log which is too long (GitHub cuts it at 250 commits)
https://github.com/irssi/irssi/compare/1.2.2...master

Best regards,
Daniel
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2020-10-11 11:04:03 UTC
Regarding users:

irssi-dcc_send_limiter - Build, Run dep (testport OK)
irssi-fish - Build, Run dep (testport OK)
irssi-icb - Build, Run dep (testport OK)
irssi-xmpp - Doesn't compile with new Glib and seems to be broken in general looking at GitHub
irssi-scripts - Just copies files (scripts)
p5-POE-Session-Irssi - Run dep
twirssi - Run dep
irssi-themes -  Run dep
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2020-10-15 08:18:00 UTC
Reference to glib fix: https://github.com/irssi/irssi/issues/1180
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2020-10-19 12:15:20 UTC
Friendly ping
Comment 9 David O'Rourke 2020-10-19 12:32:07 UTC
Hi,

Apologies for the silence here, things have been busy recently. I should have some time to look at this properly later in the week.

Thanks,
-David
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2020-10-19 12:41:48 UTC
Sounds great, thanks!
Comment 11 Daniel Engberg freebsd_committer freebsd_triage 2020-10-27 06:32:16 UTC
Any progress on this?

Best regards, Daniel
Comment 12 Matthias Andree freebsd_committer freebsd_triage 2020-11-12 16:21:03 UTC
maintainer timeout, 24d
Comment 13 David O'Rourke 2020-11-12 16:35:40 UTC
Sorry about this, I forgot again with a ton of stuff happening recently.

I'm not sure how comfortable I am to be chasing arbitrary upstream commits. It would be great if they could just tag a new release :(

I'll try to give this patch a test later, definitely this time.

-David
Comment 14 Daniel Engberg freebsd_committer freebsd_triage 2020-11-12 16:46:18 UTC
Upstream doesn't seem to have any intentions of tagging a new version anytime soon. https://github.com/irssi/irssi/issues/1222
If you want to cherry-pick commits instead that's fine with me although I would expect that it would quickly become quite messy.
Comment 15 David O'Rourke 2020-11-12 21:56:54 UTC
Unfortunately, I cannot build this patch in a FreeBSD 12.2 `poudriere testport` at the moment.

The build fails while testing to see if Perl is available:

Checking if "working Perl support" compiles: NO
meson.build:377:6: ERROR: Problem encountered: error linking with perl libraries

Everything looks correct, and the problem seems to be that -Werror=unused-command-line-argument is being introduced to the cc command line somewhere.

This is causing the following error during the test for Perl:

cc: error: -Wl,-R/usr/local/lib/perl5/5.32/mach/CORE: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -Wl,-E: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -Wl,--start-group: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -lperl: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -lpthread: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -lm: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -lcrypt: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -lutil: 'linker' input unused [-Werror,-Wunused-command-line-argument]
cc: error: -Wl,--end-group: 'linker' input unused [-Werror,-Wunused-command-line-argument]

Manipulating the command line in an interactive poudriere session to add -Wno-unused-command-line-argument to the end of the build command allows this particular test to pass. Sadly, adding that same argument to CPPFLAGS does not work to avoid this issue as the arguments are order dependent, and -Wno-unused-command-line-argument appears before -Werror=unused-command-line-argument in the command.

The full failing command is:

cc -I/usr/local/include -I/usr/local/lib/perl5/5.32/mach/CORE -L/usr/local/lib -L/usr/local/lib/perl5/5.32/mach/CORE -I/usr/include /wrkdirs/usr/ports/irc/irssi/work/irssi-17c6c22/_build/meson-private/tmpskfkg4ld/testfile.c -o /wrkdirs/usr/ports/irc/irssi/work/irssi-17c6c22/_build/meson-private/tmpskfkg4ld/output.obj -pipe -c -O2 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -D_FILE_OFFSET_BITS=64 -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -fstack-protector-strong -fPIC -Wl,-R/usr/local/lib/perl5/5.32/mach/CORE -pthread -Wl,-E -fstack-protector-strong -Wl,--start-group -lperl -lpthread -lm -lcrypt -lutil -Wl,--end-group

I am unsure where the various -W flags are being introduced. grepping both the irssi source and /usr/ports/Mk doesn't turn anything up, nor does manually executing some of the commands that Meson seems to be running to work out the Perl LDFLAGS and CFLAGS. I believe it's being introduced as an entry in perl_rpath_flags, but as I'm unfamiliar with Meson, I'm having real issues debugging it.

-David
Comment 16 Matthias Andree freebsd_committer freebsd_triage 2020-11-12 23:08:19 UTC
David, I think the -Werror... comes from meson:

$ pkg info -lq meson  | xargs grep -n unused-command
Binary file /usr/local/lib/python3.7/site-packages/mesonbuild/compilers/mixins/__pycache__/clang.cpython-37.opt-1.pyc matches
Binary file /usr/local/lib/python3.7/site-packages/mesonbuild/compilers/mixins/__pycache__/clang.cpython-37.pyc matches
/usr/local/lib/python3.7/site-packages/mesonbuild/compilers/mixins/clang.py:83:            myargs.extend(['-Werror=unknown-warning-option', '-Werror=unused-command-line-argument'])

I know little about meson and cannot recommend anything on it. It appears to be misguided though because this way meson commits to chasing each and every compiler warning behaviour change.
Comment 17 Matthias Andree freebsd_committer freebsd_triage 2020-11-12 23:49:06 UTC
The quick and dirty workaround for this meson idiosyncrasy is USE_GCC=yes.
Comment 18 Daniel Engberg freebsd_committer freebsd_triage 2020-11-13 00:08:03 UTC
Breakage is caused by Meson 0.56.0 , it works fine with previous version 0.55.3
I'll have a look during the weekend.
Comment 19 Daniel Engberg freebsd_committer freebsd_triage 2020-11-14 17:39:33 UTC
Meson 0.56.0 build failure is being tracked here: https://github.com/irssi/irssi/issues/1235
Comment 20 David O'Rourke 2020-11-14 17:45:57 UTC
Cool, I've subscribed to the Github issue so I can be alerted when upstream decide fixes this issue.

I may also take a look at patching the meson.build or porting specific patches to 1.2.x, but I think at this point I'd rather take the 1.3-dev route as these Meson changes are going to be needed in the future anyway, and you've already taken the time to do the work :)

-David
Comment 21 Daniel Engberg freebsd_committer freebsd_triage 2020-11-14 19:57:45 UTC
Created attachment 219689 [details]
Patch for irssi v4

Update to 1.3 snapshot 20201114
Add fix for meson 0.56.0 an higher

Reference: https://github.com/irssi/irssi/issues/1235

Compile and run-tested FreeBSD 13.0-CURRENT #0 r364979 (AMD64)
Poudriere testport OK 12.2-RELEASE (amd64)
Comment 22 Daniel Engberg freebsd_committer freebsd_triage 2020-11-15 21:04:24 UTC
There's something odd going on with FreeBSD 11.4, both capsicum and openssl fails to link properly. I would appreciate if someone could have a look at it.
Comment 23 Daniel Engberg freebsd_committer freebsd_triage 2020-11-16 01:28:06 UTC
Created attachment 219719 [details]
Patch for irssi v5

Fixes compilation on FreeBSD 11 (11.4 tested)
Force lld linker as bfd breaks compilation

Compile and run-tested FreeBSD 13.0-CURRENT #0 r364979 (amd64)
Run-time tested on 11.4 by CrtxReavr (irc) (amd64)

Poudriere testport OK 12.2-RELEASE (amd64)
Poudriere testport OK 11.4-RELEASE (amd64)
Comment 24 Daniel Engberg freebsd_committer freebsd_triage 2020-11-21 09:59:00 UTC
Friendly ping :-)
Comment 25 Fernando Apesteguía freebsd_committer freebsd_triage 2020-11-22 18:33:25 UTC
Committed,

Thanks!
Comment 26 commit-hook freebsd_committer freebsd_triage 2020-11-22 18:33:33 UTC
A commit references this bug:

Author: fernape
Date: Sun Nov 22 18:33:13 UTC 2020
New revision: 556069
URL: https://svnweb.freebsd.org/changeset/ports/556069

Log:
  irc/irssi: Update to snapshot 1.3 (20201114)

  Includes various bug fixes including ones related to Glib and SSL/TLS

  PR:	249910
  Submitted by:	daniel.engberg.lists@pyret.net
  Approved by:	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/pkg-plist
Comment 27 Yuri Pankov 2020-11-23 22:14:39 UTC
It would be nice to mention (pkg-message?) that you now have to explicitly load the perl module using ~/.irssi/startup according to https://github.com/irssi/irssi/issues/1203#issuecomment-651986498 as it somewhat breaks the POLA.
Comment 28 commit-hook freebsd_committer freebsd_triage 2020-11-24 12:33:46 UTC
A commit references this bug:

Author: fernape
Date: Tue Nov 24 12:33:00 UTC 2020
New revision: 556156
URL: https://svnweb.freebsd.org/changeset/ports/556156

Log:
  irc/irssi: Add pkg-message

  Building with meson and ninja requires to load perl in the configuration file.

  PR:	249910
  Reported by:	yuripv@yuripv.dev

Changes:
  head/irc/irssi/pkg-message
Comment 29 Fernando Apesteguía freebsd_committer freebsd_triage 2020-11-24 12:34:04 UTC
(In reply to Yuri Pankov from comment #27)
Done.

Thanks!
Comment 30 Daniel Engberg freebsd_committer freebsd_triage 2020-11-25 00:19:55 UTC
This is badly phrased as Perl support is optional.
Comment 31 Fernando Apesteguía freebsd_committer freebsd_triage 2020-11-25 11:30:13 UTC
(In reply to daniel.engberg.lists from comment #30)

Well, it seems since the change to use meson, perl is not optional anymore. See bug #251371
Comment 32 Daniel Engberg freebsd_committer freebsd_triage 2022-01-25 12:48:06 UTC
Just a heads up, looks like development has come to a halt in main repo and (main active?) releases are being done in https://github.com/ailin-nemui/irssi

I have a patch if someone wants to give it a go