Bug 278400 - japanese/webalizer change language euc-jp to utf-8
Summary: japanese/webalizer change language euc-jp to utf-8
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-16 23:19 UTC by Hiroyuki Seino
Modified: 2024-04-28 22:39 UTC (History)
2 users (show)

See Also:
dinoex: maintainer-feedback+


Attachments
Change the character code of webalizer_lang.japanese to UTF-8 (10.00 KB, application/x-tar)
2024-04-16 23:19 UTC, Hiroyuki Seino
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroyuki Seino 2024-04-16 23:19:28 UTC
Created attachment 250015 [details]
Change the character code of webalizer_lang.japanese to UTF-8

Charset of ja-webalizer is EUC-JP.
Nowadays, UTF-8 is mainstream, so I created a patch.
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2024-04-19 13:01:56 UTC
Thanks I will integrate your patches
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-04-21 11:52:37 UTC
A commit in branch main references this bug:

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

commit 3acf340f369364667094f5fab7db6f5923878cca
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-04-21 11:51:14 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-04-21 11:51:14 +0000

    www/webalizer: use UTF-8 for japanese

    extend sample
    PR: 278400

 www/webalizer/Makefile                             |   2 +-
 www/webalizer/files/patch-sample.conf (new)        |  69 +++++++++
 .../files/patch-webalizer_lang.japanese (new)      | 159 +++++++++++++++++++++
 3 files changed, 229 insertions(+), 1 deletion(-)
Comment 3 Hideaki Miyatake 2024-04-24 11:25:13 UTC
Nice to meet you.

This commit has caused the build of japanese/webalizer to fail.

The reason is that the "ja-webalizer.conf-dist.patch" file, which is added to EXTRA_PATCHES when japanese is set to WEBALIZER_LANG in japanese/webalizer, and the "patch-sample.conf" file, which is added in this commit, are patches for the same "sample.conf" file, and thus fail to apply.

Since I don't think anyone uses EUC-JP nowadays, it would be better to delete the following part of the Makefile in www/webalizer.

.if ${WEBALIZER_LANG} == japanese
EXTRA_PATCHES+=         ${FILESDIR}/ja-webalizer.conf-dist.patch
.endif
f
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-04-24 16:57:43 UTC
A commit in branch main references this bug:

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

commit 9abe6dd39ff763f90e90a03a56e1b74a05cd36e2
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-04-24 16:57:14 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-04-24 16:57:14 +0000

    www/webalizer: fix build for japanese

    mark option WEBALIZER_CONV as broken
    PR: 278400

 www/webalizer/Makefile                             |  6 +-
 .../files/ja-webalizer.conf-dist.patch (gone)      | 69 ----------------------
 2 files changed, 1 insertion(+), 74 deletions(-)
Comment 5 Dirk Meyer freebsd_committer freebsd_triage 2024-04-24 17:01:50 UTC
(In reply to Hideaki Miyatake from comment #3)

Thanks for reporting

The files/webalizer-a-urasim_2.patch would convert from UTF-8 to EUC-JP
I marked it as broken.

Should this option be updated to allow parsing old logs or removed ?
Comment 6 Hideaki Miyatake 2024-04-24 19:58:47 UTC
(In reply to Dirk Meyer from comment #5)

Thank you for your quick response.

The fix was presented by focusing only on the success of the build.

I am wondering if it is up to the policy whether or not to delete that file.

As stated in comment #1, Mr. Hiroyuki Seino is trying to use ja-webalizer (japanese/webalizer) for EUC-JP and webalizer (www/webalizer) for this UTF-8 support.

For EUC-JP support, Mr. Akira URASHIMA, whose URL is listed in the comments, seems to have created two files: webalizer-a-urasim_2.patch and webalizer-a-urasim_2.patch.

Therefore, if we keep ja-webalizer for EUC-JP, the two files webalizer-a-urasim_2.patch and webalizer-a-urasim_2.patch will be necessary, and if we stop supporting EUC-JP in ja-webalizer and If we stop supporting EUC-JP in ja-webalizer and make it UTF-8 compliant, we believe it will be unnecessary.

In any case, the fixes I presented were half-baked. My apologies.

If you want to keep ja-webalizer (japanese/webalizer) for EUC-JP, you need to change the implementation method of UTF-8 support in PR:278400 to prevent build failure.

Because it is necessary to separate the patches to be used in the patching part of sample.conf into cases, and the patch-webalizer_lang.japanese file is only necessary for UTF-8.
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-04-28 09:07:38 UTC
A commit in branch main references this bug:

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

commit de1d4bd375fe512044ef28f23fca25c3f9558f45
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-04-28 09:06:49 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-04-28 09:06:49 +0000

    www/webalizer: support japanese EUC-JP and japanese UTF-8 encodings

    PR: 278400

 www/webalizer/Makefile                             | 22 +++++++++++++++++-----
 ...japanese => patch-webalizer_lang.japanese-utf8} |  4 ++--
 2 files changed, 19 insertions(+), 7 deletions(-)
Comment 8 Dirk Meyer freebsd_committer freebsd_triage 2024-04-28 09:28:43 UTC
Summary:

the port japanese/webalizer uses EUC-JP encoding

www/webalizer can now build with UTF-8 encoding
by setting japanese-utf8

There is no package for japanese-utf8 encoding in the official repo

Please drop me a note if an extra port "japanese/webalizer-utf8" will be useful.
Comment 9 Hideaki Miyatake 2024-04-28 22:39:53 UTC
(In reply to Dirk Meyer from comment #8)

Thanks for the update.

From now on, www/webalizer should be used.