Date: Mon, 09 Feb 2026 12:24:19 +0000 From: Wolfram Schneider <wosch@FreeBSD.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org Subject: git: 8ec1468c3f - main - ports.cgi: expand FreeBSD mailing list aliases to full name Message-ID: <6989d1f3.32c0b.6219e94a@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/doc/commit/?id=8ec1468c3f4f32c5d5e50cbfa423c9d7c2d9deb7 commit 8ec1468c3f4f32c5d5e50cbfa423c9d7c2d9deb7 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2026-02-09 12:23:44 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2026-02-09 12:23:44 +0000 ports.cgi: expand FreeBSD mailing list aliases to full name To make it clear that the maintainer is not a person and any response will be public. e.g 'office' => 'freebsd-office' or 'ports' => 'freebsd-ports' --- website/content/en/cgi/ports.cgi | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/website/content/en/cgi/ports.cgi b/website/content/en/cgi/ports.cgi index 40570635a4..90c15c592e 100755 --- a/website/content/en/cgi/ports.cgi +++ b/website/content/en/cgi/ports.cgi @@ -115,6 +115,9 @@ my $debug = 1; # feature flags my $enable_packages_link = 1; +my $enable_check_freebsd_mailing_list = 1; + +my %lists; sub init_variables { $localPrefix = '/usr/ports'; # ports prefix @@ -327,6 +330,7 @@ sub out { $path =~ s/^$localPrefix/$remotePrefixFtp/o; $descfile =~ s/^$localPrefix/$remotePrefixFtp/o; $version = &encode_url($version); + $email = &check_freebsd_mailing_list($email) if $enable_check_freebsd_mailing_list; #$version =~ s/[\+,]/X/g; @@ -437,7 +441,10 @@ sub package_links { . $perl->{"origin"} . qq[">] . $perl->{"origin"} . qq[</a><br/>\n]; - print qq[maintainer: ], $perl->{"maintainer"}, "<br/>\n"; + + my $maintainer = $perl->{"maintainer"}; + $maintainer = &check_freebsd_mailing_list($maintainer) if $enable_check_freebsd_mailing_list; + print qq[maintainer: $maintainer<br/>\n]; print qq[<h3>Description</h3>\n]; print "<pre>", escapeHTML( $perl->{"desc"} ), "</pre>\n"; @@ -774,6 +781,21 @@ sub footer_links { EOF } +# expand FreeBSD mailing list aliases to full name, +# e.g 'office' => 'freebsd-office' +sub check_freebsd_mailing_list { + my $email = shift; + + my ($user, $hostname) = split('@', $email); + + # email is a ports section, not a real user + if ($lists{$user}) { + $user = 'freebsd-' . $user; + } + + return $user . '@' . $hostname; +} + # # Main # @@ -816,9 +838,12 @@ if ( !$query && $query_string =~ /^([^=&]+)$/ ) { $query = $1; } -# automatically read collections, need only 0.2 sec on a pentium +# get all categories @sec = &readcoll; +# mailing list aliases +%lists = map { $_ => 1 } qw/apache chromium desktop elastic emulation enlightenment erlang fortran gecko gnome go haskell java multimedia office perl pkg ports python ruby tcltk tex uboot x11 xfce zope/; + $query = &check_query( $query, $sourceid ); # no search menu for packages linkshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6989d1f3.32c0b.6219e94a>
