Unverified Commit 55f99acb authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge branch 'sympa-6.2' into issue-1186_rev

parents 663af634 295ec7ce
......@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os:
#- 'macos-latest' # Crypt::OpenSSL::X509 doesn't support openssl@3
- 'macos-latest'
- 'ubuntu-latest'
perl:
- '5.34'
......@@ -73,6 +73,6 @@ jobs:
autoreconf -i
./configure --with-defaultdir=`pwd`/default
cd src; make; cd ..
make check-local TEST_FILES='xt/perltidy.t' || true
#make check-local TEST_FILES='xt/perltidy.t' || true
make check-local
shell: bash
......@@ -18,7 +18,6 @@ Makefile
/po/sympa/POTFILES
/po/web_help/POTFILES
/sympa.conf
/sympa.conf-dist
# make
......@@ -31,7 +30,6 @@ Makefile
*.o
*.po~
/previous_sympa_version
/mk-sympa-dist.pl
/src/bin/*.pl
/src/cgi/*.fcgi
/src/libexec/*.pl
......@@ -42,7 +40,10 @@ Makefile
/po/sympa/stamp-po
/po/web_help/remove-potcdate.sed
/po/web_help/stamp-po
/src/etc/script/sympa
/service/sympa
/service/*.service
/service/*.socket
/service/sympa-tmpfiles.conf
/src/lib/stamp-man3
/src/lib/stamp-man1
/src/lib/Sympa/Constants.pm
......@@ -55,7 +56,6 @@ Makefile
# make install
/data_structure.version
/sympa_wizard.pl.inst
# make dist
......
......@@ -34,7 +34,7 @@ The site for development of Sympa documentation launced:
* [Incubating the new Sympa documentation site](https://github.com/sympa-community/sympa-community.github.io)
This site aims to renovate Sympa documentation. We expect inputs including addition, correction and suggestion from the community. For further details, please see the page "[Contributing for Sympa documentation](https://github.com/sympa-community/sympa-community.github.io/blob/master/CONTRIBUTING.md)".
This site aims to renovate Sympa documentation. We expect inputs including addition, correction and suggestion from the community. For further details, please see the page "[Contributing for Sympa documentation](https://sympa-community.github.io/CONTRIBUTING.html)".
----
[The Sympa Community](https://github.com/sympa-community)
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright (c) 1997, 1998, 1999 Institut Pasteur & Christophe Wolfhugel
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2017, 2018, 2019 The Sympa Community. See the AUTHORS.md file at
# the top-level directory of this distribution and at
# Copyright 2017, 2018, 2019, 2022 The Sympa Community. See the
# AUTHORS.md file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
# This program is free software; you can redistribute it and/or modify
......@@ -23,7 +21,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
SUBDIRS = src default doc po www
SUBDIRS = src default doc po service www
check_SCRIPTS = \
t/01_Conf.t \
......@@ -77,7 +75,8 @@ check_DATA = \
t/samples/signed.eml \
t/samples/unsigned.eml \
t/stub/Sympa/Constants.pm \
xt/perlcriticrc
xt/perlcriticrc \
xt/tidyallrc
noinst_SCRIPTS = \
xt/critic.t \
xt/fixme.t \
......@@ -101,8 +100,7 @@ EXTRA_DIST = \
$(noinst_SCRIPTS) \
$(nobase_modules_DATA)
CLEANFILES = \
sympa.conf-dist
CLEANFILES =
MSGFMT=@MSGFMT@
.po.mo:
......@@ -158,11 +156,6 @@ installconfig: installdir
chown $(USER) $(DESTDIR)$(confdir)/sympa.conf; \
chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf; \
fi
@echo "Installing configuration template ..."
-@echo "installing sympa.conf-dist"; \
$(INSTALL) -m 644 -T sympa.conf-dist $(DESTDIR)$(confdir)/sympa.conf-dist; \
chown $(USER) $(DESTDIR)$(confdir)/sympa.conf-dist; \
chgrp $(GROUP) $(DESTDIR)$(confdir)/sympa.conf-dist
-@if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \
cd $(DESTDIR)$(sysconfdir); \
echo "# automatically created file" >> data_structure.version; \
......@@ -204,13 +197,6 @@ nextstep:
@echo "# * Edit this file to define initial configuration:"
@echo "# $(confdir)/sympa.conf"
@echo "#"
@echo "# ADDITIONAL SETTINGS:"
@echo "# * You will find all available configuration settings in:"
@echo "# $(confdir)/sympa.conf-dist"
@echo "#"
@echo "# * Copy the configuration settings you want in:"
@echo "# $(confdir)/sympa.conf"
@echo "#"
@echo "# UPGRADING"
@echo "# * Run this script to upgrade your data structures:"
@echo "# $(sbindir)/sympa upgrade"
......@@ -218,7 +204,6 @@ nextstep:
uninstall-hook:
cd $(DESTDIR)$(confdir) && rm -f sympa.conf
cd $(DESTDIR)$(confdir) && rm -f sympa.conf-dist
cd $(DESTDIR)$(confdir) && rm -f wwsympa.conf
cd $(DESTDIR)$(sysconfdir) && rm -f data_structure.version
cd $(DESTDIR)$(sysconfdir) && rm -f README
......@@ -233,16 +218,11 @@ distcheck-hook:
-sha256sum $(DIST_ARCHIVES) > $(DIST_ARCHIVES).sha256
-openssl sha512 $(DIST_ARCHIVES) > $(DIST_ARCHIVES).sha512
# tidyall --conf-file doc/dot.tidyallrc --root-dir . --recursive src t xt
# tidyall --conf-file xt/tidyallrc --root-dir . --recursive src t xt
tidyall:
@ ( echo 'exit 1 if grep { $$_->error }'; \
echo 'Code::TidyAll->new_from_conf_file('; \
echo ' "doc/dot.tidyallrc", root_dir => ".", recursive => 1'; \
echo ')->process_paths(qw(src xt t))' \
echo ' "xt/tidyallrc", root_dir => ".", recursive => 1'; \
echo ')->process_paths(qw(src t xt))' \
) | $(PERL) -MCode::TidyAll
all-local: sympa.conf-dist
sympa.conf-dist:
@PERL5LIB=$(srcdir)/src/lib; export PERL5LIB; \
$(PERL) mk-sympa-dist.pl
# configure.ac - Top-level configure.in for Sympa
# $Id$
#
# Sympa - SYsteme de Multi-Postage Automatique
#
......@@ -7,7 +6,7 @@
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2017, 2018, 2019, 2020, 2021 The Sympa Community. See the
# Copyright 2017, 2018, 2019, 2020, 2021, 2022 The Sympa Community. See the
# AUTHORS.md file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
......@@ -658,17 +657,15 @@ AM_CONDITIONAL(SETUID_QUEUE, [test "x$enable_setuid_queue" = "xyes"])
AC_CONFIG_FILES([
Makefile
sympa.conf
mk-sympa-dist.pl
default/Makefile
doc/Makefile
po/Makefile
po/sympa/Makefile.in
po/web_help/Makefile.in
service/Makefile
src/Makefile
src/bin/Makefile
src/cgi/Makefile
src/etc/Makefile
src/etc/script/Makefile
src/lib/Makefile
src/libexec/Makefile
src/sbin/Makefile
......
......@@ -487,7 +487,7 @@
[%|loc%]List name has been lowercased[%END%]
[%~ ELSIF report_entry == 'auto_aliases' ~%]
[%|loc%]Aliases have been installed.[%END%]
[%|loc%]Aliases have been installed.[%END%] ([% report_param.listname %])
[%~ ELSIF report_entry == 'user_notified' ~%]
[%|loc(report_param.notified_user)%]User %1 has been notified[%END%]
......@@ -663,6 +663,15 @@ Warning: this message may already have been sent by one of the list's moderators
[%~ ELSIF report_entry == 'blocklisted_domain' ~%]
[%|loc(report_param.email || report_param.value)%]Address "%1" belongs to a blocklisted domain[%END%]
[%~ ELSIF report_entry == 'email_is_the_list' ~%]
[% IF report_param.role == 'owner' ~%]
[%|loc(report_param.email)%]Address "%1" is the address for the list owners[%END%]
[%~ ELSIF report_param.role == 'editor' ~%]
[%|loc(report_param.email)%]Address "%1" is the address for the list moderators[%END%]
[%~ ELSE ~%]
[%|loc(report_param.email)%]Address "%1" is the address of the list[%END%]
[%~ END %]
[%~ ELSIF report_entry == 'incorrect_passwd' ~%]
[%|loc%]Provided password is incorrect[%END%]
......
......@@ -67,18 +67,28 @@
</em>
</dt>
<dd>
[%|obfuscate(listconf.web_archive_spam_protection) ~%]
[%~ FOREACH r = u.rich.from ~%]
[% IF r.format == 'b' %]<b>[% r.text %]</b>
[%~ ELSIF r.format == 'br' %]<br />
[%~ ELSE%][% r.text %][%END ~%]
[% IF r.format == 'b' ~%]
<b>[% r.text %]</b>
[%~ ELSIF r.format == 'br' ~%]
<br />
[%~ ELSE ~%]
[% r.text %]
[%~ END ~%]
[%END ~%]
<pre>
[%~ FOREACH r = u.rich.body_string ~%]
[% IF r.format == 'b' %]<b>[% r.text %]</b>
[%~ ELSIF r.format == 'br' %]<br />
[%~ ELSE%][% r.text %][%END ~%]
[% IF r.format == 'b' ~%]
<b>[% r.text %]</b>
[%~ ELSIF r.format == 'br' ~%]
<br />
[%~ ELSE ~%]
[% r.text %]
[%~ END ~%]
[%END ~%]
</pre>
[%~ END %]
</dd>
[% END %]
</dl>
......
......@@ -75,7 +75,7 @@
<label for="directories">[%|loc%]Extend search field:[%END%] </label>
<br />
<select name="directories" multiple="multiple" size="4">
<select name="directories" id="directories" multiple="multiple" size="4">
[% FOREACH u = yyyymm %]
[% SET tmp = u.key u = u.value u.NAME = tmp IF u.key.defined %]
<option value="[% u %]">[% u %]</option>
......
......@@ -520,7 +520,7 @@
[%~ END %]
</ul>
[% IF is_listmaster || is_owner %]
<input type="checkbox" name="signal_as_spam"
<input type="checkbox" name="signal_as_spam" id="signal_as_spam"
[% IF signal_as_spam %]checked[% END %] />
<label for="signal_as_spam">
[%|loc%]Report messages as undetected spam[%END%]
......
......@@ -120,7 +120,7 @@
[%|loc(shared_doc.name)%]Rename file %1[%END%]
[% END %]
</label>
<input size="50" maxlength="100" name="new_name" />
<input size="50" maxlength="100" name="new_name" id="new_name" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="path" value="[% shared_doc.paths.join("/") %]" />
......
......@@ -43,7 +43,7 @@
<br />
<h3>[%|loc%]Changing your email address[%END%]</h3>
<h3 id="pref-change-email">[%|loc%]Changing your email address[%END%]</h3>
<p>[%|loc%]You can update your email address for all your list memberships at once. Any list owner or list moderator email addresses will also be updated.[%END%]</p>
<form action="[% path_cgi %]" method="post">
......@@ -59,7 +59,7 @@
<br />
[% UNLESS sso.size %]
<h4>[%|loc%]Changing your password[%END%]</h4>
<h3 id="pref-change-password">[%|loc%]Changing your password[%END%]</h3>
<form action="[% path_cgi %]" method="post">
<fieldset>
......@@ -73,7 +73,7 @@
[% END %]
[% IF session.auth == 'classic' AND conf.allow_account_deletion == 'on' %]
<h4>[%|loc%]Deleting your account[%END%]</h4>
<h3 id="pref-delete-account">[%|loc%]Deleting your account[%END%]</h3>
<p>
[%|loc%]Deleting your account will unsubscribe you from all your lists, remove your ownership of your lists and permanently delete your account.[%END%]
<br />
......
......@@ -386,9 +386,14 @@
END;
END ~%]
[% IF is_writable && is_privileged_owner ~%]
[% IF pS.name == 'owner' ~%]
[% SET defopt = listconf.default_owner_options %]
[%~ ELSIF pS.name == 'editor' ~%]
[% SET defopt = listconf.default_editor_options %]
[%~ END ~%]
<h3>
[% IF pS.name == 'owner' ~%]
[%|loc%]Add owners[%END%]
[%|loc%]Add owners[%END%]
[%~ ELSIF pS.name == 'editor' ~%]
[%|loc%]Add moderators[%END%]
[%~ END %]
......@@ -397,14 +402,23 @@
<div class="row" id="item.[% pS.name %].[% oI %]" role="row">
<div class="small-10 medium-11 columns">
[% IF pS.name == 'owner' ~%]
<div class="columns show-for-medium" role="cell">
<input type="checkbox"
name="single_param.[% pS.name %].[% oI %].profile"
id="param.[% pS.name %].[% oI %].profile"
value="privileged" />
<div class="medium-3 columns show-for-medium" role="cell">
<label for="param.[% pS.name %].[% oI %].profile">
[% 'privileged' | optdesc %]
[% 'profile' | loc %]
</label>
<select name="single_param.[% pS.name %].[% oI %].profile"
id="param.[% pS.name %].[% oI %].profile">
<option value="privileged"
[%~ IF defopt.profile == 'privileged' %] selected[% END %]>
[% 'privileged' | optdesc %]
</option>
<option value="normal"
[%~ IF defopt.profile == 'normal' %] selected[% END %]>
[% 'normal' | optdesc %]
</option>
</select>
</div>
<div class="columns show-for-medium" role="cell">
</div>
[%~ END %]
......@@ -416,23 +430,37 @@
[% UNLESS kS.privilege == 'write' ~%]
&nbsp;
[%~ ELSIF kS.name == 'reception' ~%]
<input type="checkbox"
name="single_param.[% pS.name %].[% oI %].reception"
id="param.[% pS.name %].[% oI %].reception"
value="nomail" />
<label for="param.[% pS.name %].[% oI %].reception">
[% 'nomail' | optdesc %]
[% 'reception mode' | loc %]
</label>
<select name="single_param.[% pS.name %].[% oI %].reception"
id="param.[% pS.name %].[% oI %].reception">
<option value="mail"
[%~ IF defopt.reception == 'mail' %] selected[% END %]>
[% 'mail' | optdesc %]
</option>
<option value="nomail"
[%~ IF defopt.reception == 'nomail' %] selected[% END %]>
[% 'nomail' | optdesc %]
</option>
</select>
[%~ ELSIF kS.name == 'visibility' ~%]
<input type="checkbox"
name="single_param.[% pS.name %].[% oI %].visibility"
id="param.[% pS.name %].[% oI %].visibility"
value="conceal" />
<label for="param.[% pS.name %].[% oI %].visibility">
[% 'conceal' | optdesc %]
[% 'visibility' | loc %]
</label>
<select name="single_param.[% pS.name %].[% oI %].visibility"
id="param.[% pS.name %].[% oI %].visibility">
<option value="conceal"
[%~ IF defopt.visibility == 'conceal' %] selected[% END %]>
[% 'conceal' | optdesc %]
</option>
<option value="noconceal"
[%~ IF defopt.visibility == 'noconceal' %] selected[% END %]>
[% 'noconceal' | optdesc %]
</option>
</select>
[%~ ELSE ~%]
<label for="param.[% pS.name %].[% oI %].[kS.name ]">
<label for="param.[% pS.name %].[% oI %].[% kS.name %]">
[% IF kS.title ~%]
[% kS.title %]
[%~ ELSE ~%]
......
......@@ -24,10 +24,10 @@
<input id="email" type="text" name="email" size="20" value="[% email %]" />
<br />
<label for="remote_addr">[%|loc%]Remote IP address:[%END%] </label>
<input type="text" name="remote_addr" size="16" value="[% remote_addr %]" />
<input type="text" name="remote_addr" id="remote_addr" size="16" value="[% remote_addr %]" />
<br />
<label for="remote_host">[%|loc%]Remote host:[%END%] </label>
<input type="text" name="remote_host" size="16" value="[% remote_host %]" />
<input type="text" name="remote_host" id="remote_host" size="16" value="[% remote_host %]" />
<br />
<label for="auth_method">[%|loc%]Auth method:[%END%] </label>
<select id="auth_method" name="auth_method">
......
......@@ -87,10 +87,6 @@ Command line utility to manage Sympa
Alias database maintenance
=item L<sympa_wizard(1)>
Help Performing Sympa Initial Setup
=back
=head3 Maintenance tools
......
# -*- indent-tabs-mode: nil; -*-
# vim:ft=perl:et:sw=4
# $Id$
# Sympa - SYsteme de Multi-Postage Automatique
#
# Copyright 2019 The Sympa Community. See the AUTHORS.md file at the
# top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use lib 'src/lib/';
use strict;
use warnings;
use English qw(-no_match_vars);
use Pod::Usage;
use Sympa::ConfDef;
use Sympa::Constants;
my $modfail; # any of required modules are not installed.
BEGIN {
$modfail = !eval {
require Conf;
require Sympa::Tools::Text;
};
}
# Set language context if possible.
*gettext = sub { $_[1] ? sprintf('%*s', $_[1], $_[0]) : $_[0] };
if ($modfail) {
no warnings;
eval { require Text::Wrap; };
if ($EVAL_ERROR) {
*Sympa::Tools::Text::wrap_text = sub {"$_[1]$_[0]\n"};
} else {
$Text::Wrap::columns = 78;
*Sympa::Tools::Text::wrap_text =
sub { Text::Wrap::wrap($_[1], $_[2], $_[0]) . "\n"; };
}
}
## sympa dist configuration file
my $dist_conf = 'sympa.conf-dist';
my $umask = umask 037;
my $fh;
unless (open $fh, '>', $dist_conf) {
umask $umask;
die "$0: "
. sprintf(gettext("Unable to open %s : %s"), $dist_conf, $ERRNO)
. "\n";
}
umask $umask;
my $title;
foreach my $param (@Sympa::ConfDef::params) {
next if $param->{obsolete};
unless ($param->{'name'}) {
$title = gettext($param->{'gettext_id'})
if $param->{'gettext_id'};
next;
}
next unless $param->{'file'};
if ($title) {
printf $fh "###\\\\\\\\ %s ////###\n\n", $title;
undef $title;
}
printf $fh "## %s\n", $param->{'name'};
if ($param->{'gettext_id'}) {
print $fh Sympa::Tools::Text::wrap_text(
gettext($param->{'gettext_id'}),
'## ', '## ');
}
print $fh Sympa::Tools::Text::wrap_text(
gettext($param->{'gettext_comment'}),
'## ', '## ')
if $param->{'gettext_comment'};
if (defined $param->{'sample'}) {
printf $fh '## ' . gettext('Example: ') . "%s\t%s\n",
$param->{'name'}, $param->{'sample'};
}
if (defined $param->{'default'}) {
printf $fh "#%s\t%s\n", $param->{'name'}, $param->{'default'};
} elsif ($param->{'optional'}) {
printf $fh "#%s\t\n", $param->{'name'};
} else {
printf $fh "#%s\t%s\n", $param->{'name'},
gettext("(You must define this parameter)");
}
print $fh "\n";
}
close $fh;
print STDERR "$dist_conf file has been created\n";
......@@ -173,87 +173,141 @@ msgid ""
"module? (y/N) "
msgstr ""
#: src/lib/Sympa/CLI.pm:330
#: src/lib/Sympa/CLI.pm:335
msgid "Value \"%s\" invalid for option %s"
msgstr ""
#: src/lib/Sympa/CLI.pm:331
#: src/lib/Sympa/CLI.pm:336
msgid "Insufficient arguments for option %s"
msgstr ""
#: src/lib/Sympa/CLI.pm:332
#: src/lib/Sympa/CLI.pm:337
msgid "Duplicate specification \"%s\" for option \"%s\""
msgstr ""
#: src/lib/Sympa/CLI.pm:333
#: src/lib/Sympa/CLI.pm:338
msgid "Option %s is ambiguous (%s)"
msgstr ""
#: src/lib/Sympa/CLI.pm:334
#: src/lib/Sympa/CLI.pm:339
msgid "Missing option after %s"
msgstr ""
#: src/lib/Sympa/CLI.pm:335
#: src/lib/Sympa/CLI.pm:340
msgid "Unknown option: %s"
msgstr ""
#: src/lib/Sympa/CLI.pm:336
#: src/lib/Sympa/CLI.pm:341
msgid "Option %s does not take an argument"
msgstr ""
#: src/lib/Sympa/CLI.pm:337
#: src/lib/Sympa/CLI.pm:342
msgid "Option %s requires an argument"
msgstr ""
#: src/lib/Sympa/CLI.pm:338
#: src/lib/Sympa/CLI.pm:343
msgid "Option %s, key \"%s\", requires a value"
msgstr ""
#: src/lib/Sympa/CLI.pm:339
#: src/lib/Sympa/CLI.pm:344
msgid "Value \"%s\" invalid for option %s (number expected)"
msgstr ""
#: src/lib/Sympa/CLI.pm:341
#: src/lib/Sympa/CLI.pm:346
msgid "Value \"%s\" invalid for option %s (extended number expected)"
msgstr ""
#: src/lib/Sympa/CLI.pm:343
#: src/lib/Sympa/CLI.pm:348
msgid "Value \"%s\" invalid for option %s (real number expected)"
msgstr ""
#: default/mhonarc_rc.tt2:598 default/web_tt2/copy_template.tt2:26
#: default/web_tt2/copy_template.tt2:67 default/web_tt2/edit_template.tt2:33
#: default/web_tt2/search_user.tt2:15 default/web_tt2/view_template.tt2:36
#: src/lib/Sympa/CLI.pm:369 src/lib/Sympa/CLI.pm:370
#: src/lib/Sympa/ListOpt.pm:44
msgid "list"
msgstr ""
#: src/lib/Sympa/CLI.pm:371
msgid "family"
msgstr ""
#: src/lib/Sympa/CLI.pm:372
msgid "domain"
msgstr ""
#: src/lib/Sympa/CLI.pm:373
msgid "\"*\""
msgstr ""
#: src/lib/Sympa/CLI.pm:374
msgid "command"
msgstr ""
#: src/lib/Sympa/CLI.pm:375 src/lib/Sympa/ListOpt.pm:170
msgid "string"
msgstr ""
#: src/lib/Sympa/CLI.pm:376 src/lib/Sympa/Config/Schema.pm:6152
#: src/lib/Sympa/Config/Schema.pm:6251