Bug 268087 - security/maia: Update to patch upstream code for UTF-8 and other local patch cleanup.
Summary: security/maia: Update to patch upstream code for UTF-8 and other local patch ...
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: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-30 19:05 UTC by ek
Modified: 2022-12-02 00:00 UTC (History)
1 user (show)

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


Attachments
security/maia patch diff for version 1.0.4_11 (14.73 KB, patch)
2022-11-30 19:05 UTC, ek
no flags Details | Diff
security/maia patch to remove upstream code that breaks non-UTF scans. (956 bytes, patch)
2022-12-01 19:45 UTC, ek
ek: maintainer-approval+
Details | Diff
security/maia Upstream code change and WEBHOST copy/symlink fix. (1.41 KB, patch)
2022-12-01 21:16 UTC, ek
ek: maintainer-approval+
Details | Diff
security/maia Upstream code change and WEBHOST Smarty symlink fix. (1.81 KB, patch)
2022-12-01 23:14 UTC, ek
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ek 2022-11-30 19:05:42 UTC
Created attachment 238459 [details]
security/maia patch diff for version 1.0.4_11

This update includes a patch to fix upstream code that breaks UTF-8 identification and/or conversion. Also, there is previous patch cleanup that should clear up a lot of path issues for FBSD installations.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-01 19:02:44 UTC
Hello,

files/* include hard paths like /usr/local/etc, /usr/local/share, etc.
Should this paths be replaced by global vars, PREFIX, ETCDIR, etc and be preprocessed in Makefile to adapt to other systems that not share same paths?
Comment 2 ek 2022-12-01 19:45:26 UTC
Created attachment 238476 [details]
security/maia patch to remove upstream code that breaks non-UTF scans.

Oh, my goodness. Yes! Thank you for pointing that out. This is actually what is already being done (from the Makefile) so I was wondering why the patch looked so strange. I keep forgetting "make patch" runs files/* and Makefile patches. DOH! Uploaded a replacement patch that looks MUCH more like I expected it to. Thanks again!
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-01 20:48:33 UTC
---
====> Running Q/A tests (stage-qa)
Warning: Symlink '/usr/local/www/maia/libs/Smarty' pointing to '/usr/local/share/smarty3-' which does not exist in the stage directory or in localbase
---

This is caused by:
---
do-install:
        ${LN} -s ${PREFIX}/share/smarty3-${PHP_FLAVOR} ${STAGEDIR}${WWWDIR}/libs/Smarty
---
because WEBHOST option (that uses php) is off by default.

Should this be a problem since we have a broken link with no php?
Comment 4 ek 2022-12-01 21:16:03 UTC
Created attachment 238477 [details]
security/maia Upstream code change and WEBHOST copy/symlink fix.

Thank you for pointing that out as I hadn't noticed that. It would not cause any problems as the webhost option wasn't selected so the Smarty symlink wouldn't be needed anyway. However, I don't like warnings (or to ignore them) so I've updated the do-install in the Makefile to include an if-endif for those web files that would only be needed if the webhost option is selected. I've attached a new patch to (hopefully) take care of this correctly.
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-01 21:32:42 UTC
(In reply to ek from comment #4)

In this case we will need a plist adjustment for %%WWWDIR%% list maybe by using %%WEBHOST%%%%WWWDIR%%?

Error: Missing: @dir %%WWWDIR%%/...
Comment 6 ek 2022-12-01 23:14:13 UTC
Created attachment 238482 [details]
security/maia Upstream code change and WEBHOST Smarty symlink fix.
Comment 7 ek 2022-12-01 23:15:57 UTC
(In reply to Nuno Teixeira from comment #5)

You're correct. I've uploaded a new patch to only skip the symlinking if the WEBHOST option is not selected and also edited the pkg-plist to include the %%WEBHOST%% prefix for the Smarty symlink listed. I've just tested with both WEBHOST selected and not selected and I no longer see any warnings or errors.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-01 23:42:25 UTC
(In reply to ek from comment #7)

Fixed. Thanks
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-12-01 23:50:35 UTC
A commit in branch main references this bug:

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

commit 8aa12b7bb4ba0282b310958b9897d95bc1c3e5db
Author:     EK <ek@purplehat.org>
AuthorDate: 2022-12-01 23:44:43 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-01 23:49:08 +0000

    security/maia: Update to patch upstream code for UTF-8

     - This update includes a patch to fix upstream code that breaks UTF-8
       identification and/or conversion.
     - Fix WEBHOST option symlink.

    PR:             268087
    MFH:            2022Q4 (bug fixes)

 security/maia/Makefile                |  4 +++-
 security/maia/files/patch-maiad (new) | 12 ++++++++++++
 security/maia/pkg-plist               |  2 +-
 3 files changed, 16 insertions(+), 2 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-12-01 23:58:38 UTC
A commit in branch 2022Q4 references this bug:

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

commit 5c49b434dbdbf0e5546334f7f806e499f8c33195
Author:     EK <ek@purplehat.org>
AuthorDate: 2022-12-01 23:44:43 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-01 23:52:44 +0000

    security/maia: Update to patch upstream code for UTF-8

     - This update includes a patch to fix upstream code that breaks UTF-8
       identification and/or conversion.
     - Fix WEBHOST option symlink.

    PR:             268087
    MFH:            2022Q4 (bug fixes)
    (cherry picked from commit 8aa12b7bb4ba0282b310958b9897d95bc1c3e5db)

 security/maia/Makefile                |  4 +++-
 security/maia/files/patch-maiad (new) | 12 ++++++++++++
 security/maia/pkg-plist               |  2 +-
 3 files changed, 16 insertions(+), 2 deletions(-)
Comment 11 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-02 00:00:16 UTC
Committed, thanks!