Hello community, here is the log from the commit of package python-mailman for openSUSE:Factory checked in at 2020-10-08 13:11:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-mailman (Old) and /work/SRC/openSUSE:Factory/.python-mailman.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mailman" Thu Oct 8 13:11:59 2020 rev:6 rq:840224 version:3.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-mailman/python-mailman.changes 2020-05-26 17:23:49.512555889 +0200 +++ /work/SRC/openSUSE:Factory/.python-mailman.new.4249/python-mailman.changes 2020-10-08 13:12:43.275201607 +0200 @@ -1,0 +2,19 @@ +Wed Oct 7 05:46:29 UTC 2020 - Andreas Schneider <[email protected]> + +- Remove suid bit from /var/lib/mailman/data + +------------------------------------------------------------------- +Wed Sep 30 07:18:40 UTC 2020 - [email protected] + +- remove systemd (build)requires + +------------------------------------------------------------------- +Sat Sep 26 10:38:00 UTC 2020 - Andreas Schneider <[email protected]> + +- Create mailman user and group +- Create directories for mailman and use FHS directory layout +- Create initial /etc/mailman.cfg +- Create /etc/mailman.d/ directory for extensions +- Add systemd files + +------------------------------------------------------------------- New: ---- README.SUSE.md mailman-digests.service mailman-digests.timer mailman-tmpfiles.conf mailman.cfg mailman.logrotate mailman.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-mailman.spec ++++++ --- /var/tmp/diff_new_pack.I8guWU/_old 2020-10-08 13:12:44.831203016 +0200 +++ /var/tmp/diff_new_pack.I8guWU/_new 2020-10-08 13:12:44.835203020 +0200 @@ -16,6 +16,16 @@ # +%define mailman_user mailman +%define mailman_group mailman +%define mailman_name mailman +%define mailman_homedir %{_localstatedir}/lib/%{mailman_name} +%define mailman_logdir %{_localstatedir}/log/%{mailman_name} +%define mailman_spooldir %{_localstatedir}/spool/%{mailman_name} + +%define mailman_rundir %{_rundir}/%{mailman_name} +%define mailman_lockdir %{_rundir}/lock/%{mailman_name} + %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -32,7 +42,18 @@ Summary: Mailman -- the GNU mailing list manager License: GPL-3.0-only URL: https://www.list.org -Source: https://files.pythonhosted.org/packages/source/m/mailman/mailman-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/m/mailman/mailman-%{version}.tar.gz +# +Source10: mailman.cfg +Source11: mailman.service +Source12: mailman-tmpfiles.conf +Source13: mailman.logrotate +# +Source20: mailman-digests.service +Source21: mailman-digests.timer +# +Source30: README.SUSE.md +# Source100: https://gitlab.com/mailman/mailman/-/raw/master/src/mailman/testing/ssl_test_cert.crt Source101: https://gitlab.com/mailman/mailman/-/raw/master/src/mailman/testing/ssl_test_key.key # whitespace fix @@ -108,6 +129,7 @@ # https://gitlab.com/mailman/mailman/-/issues/704 cp %{SOURCE100} src/mailman/testing/ cp %{SOURCE101} src/mailman/testing/ +cp %{SOURCE30} . %build sed -i 's:/sbin:%{_prefix}/bin:' src/mailman/config/mailman.cfg @@ -130,6 +152,29 @@ %python_clone -a %{buildroot}%{_bindir}/mailman %python_clone -a %{buildroot}%{_bindir}/runner %python_expand %fdupes %{buildroot}%{$python_sitelib} + +install -d -m 0755 \ + %{buildroot}%{_sysconfdir} \ + %{buildroot}%{_sysconfdir}/logrotate.d \ + %{buildroot}%{_sysconfdir}/%{mailman_name}.d \ + %{buildroot}%{_tmpfilesdir} \ + %{buildroot}%{_unitdir} \ + %{buildroot}%{mailman_homedir} \ + %{buildroot}%{mailman_homedir}/data \ + %{buildroot}%{mailman_rundir} \ + %{buildroot}%{mailman_lockdir} \ + %{buildroot}%{mailman_logdir} \ + %{buildroot}%{mailman_spooldir} + +install -m 0640 %{SOURCE10} %{buildroot}%{_sysconfdir}/%{mailman_name}.cfg +install -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/%{mailman_name}.service +install -m 0644 %{SOURCE12} %{buildroot}%{_tmpfilesdir}/%{mailman_name}.conf +install -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/logrotate.d/%{mailman_name} +sed -i 's,@LOGDIR@,%{mailman_logdir},g;s,@BINDIR@,%{_bindir},g' \ + %{buildroot}%{_sysconfdir}/logrotate.d/%{mailman_name} + +install -m 0644 %{SOURCE20} %{buildroot}%{_unitdir}/%{mailman_name}-digests.service +install -m 0644 %{SOURCE21} %{buildroot}%{_unitdir}/%{mailman_name}-digests.timer %endif %check @@ -157,23 +202,56 @@ %endif %if !%{with test} +%pre +getent group %{mailman_group} >/dev/null || \ + %{_sbindir}/groupadd -r %{mailman_group} +getent passwd %{mailman_user} >/dev/null || \ + %{_sbindir}/useradd -r -g %{mailman_group} -s /sbin/nologin \ + -c "mailman daemon user" -d %{mailman_homedir} %{mailman_user} +%{_sbindir}/usermod -g %{mailman_group} %{mailman_user} >/dev/null +%service_add_pre %{mailman_name}.service + %post %python_install_alternative master %python_install_alternative mailman %python_install_alternative runner +%tmpfiles_create %{_tmpfilesdir}/%{mailman_name}.conf +%service_add_post %{mailman_name}.service + +%preun +%service_del_preun %{mailman_name}.service %postun +%service_del_postun %{mailman_name}.service %python_uninstall_alternative master %python_uninstall_alternative mailman %python_uninstall_alternative runner %files %{python_files} -%doc README.rst +%doc README.rst README.SUSE.md %license COPYING %python_alternative %{_bindir}/runner %python_alternative %{_bindir}/mailman %python_alternative %{_bindir}/master %{python_sitelib}/* + +%{_unitdir}/%{mailman_name}.service +%{_unitdir}/%{mailman_name}-digests.service +%{_unitdir}/%{mailman_name}-digests.timer +%{_tmpfilesdir}/%{mailman_name}.conf + +%config(noreplace) %attr(640,root,mailman) %{_sysconfdir}/mailman.cfg +%config(noreplace) %{_sysconfdir}/logrotate.d/%{mailman_name} + +%dir %attr(750,root,mailman) %{_sysconfdir}/%{mailman_name}.d + +%dir %attr(750,mailman,mailman) %{mailman_homedir} +%dir %attr(750,mailman,mailman) %{mailman_homedir}/data +%dir %attr(750,mailman,mailman) %{mailman_spooldir} +%dir %attr(750,mailman,mailman) %{mailman_logdir} +%ghost %dir %{mailman_rundir} +%ghost %dir %{_rundir}/lock +%ghost %dir %{mailman_lockdir} %endif %changelog ++++++ README.SUSE.md ++++++ Mailman on SUSE =============== To run the mailman command use: sudo -u mailman mailman info ## Configuration The main config file can be found at `/etc/mailman.cfg`. It is important to add new sections only below the [path.fhs] section! ## Plugins The directory for mailman plugins is `/etc/mailman.d`. ++++++ mailman-digests.service ++++++ [Unit] Description=Sends Mailman digests [Service] Type=oneshot ExecStart=/usr/bin/mailman digests --send User=mailman Group=mailman ++++++ mailman-digests.timer ++++++ [Unit] Description=Run mailman-digests.service every day [Timer] OnCalendar=*-*-* 04:00:00 RandomizedDelaySec=3600 Persistent=true [Install] WantedBy=basic.target ++++++ mailman-tmpfiles.conf ++++++ d /run/lock/mailman 0755 mailman mailman d /run/mailman 0755 mailman mailman ++++++ mailman.cfg ++++++ # This is the absolute bare minimum base configuration file. User supplied # configurations are pushed onto this. [mailman] # This address is the "site owner" address. Certain messages which must be # delivered to a human, but which can't be delivered to a list owner (e.g. a # bounce from a list owner), will be sent to this address. It should point to # a human. site_owner: root@localhost # Set the paths to be fhs compliant layout: fhs [paths.fhs] ext_dir: /etc/mailman.d bin_dir: /usr/bin var_dir: /var/lib/mailman queue_dir: /var/spool/mailman log_dir: /var/log/mailman lock_dir: /run/lock/mailman pid_file: /run/mailman/master.pid ### ADD NEW SECTIONS AFTER THIS LINE ### # [webservice] # admin_user: restadmin # admin_pass: secret ++++++ mailman.logrotate ++++++ @LOGDIR@/*.log { missingok sharedscripts su mailman mailman postrotate /bin/kill -HUP $(</run/mailman/master.pid) 2>/dev/null || true @BINDIR@/mailman reopen >/dev/null 2>&1 || true endscript } ++++++ mailman.service ++++++ # It's not recommended to modify this file in-place, because it will be # overwritten during package upgrades. If you want to customize, the # best way is to create a file "/etc/systemd/system/mailman3.service", # containing # .include /usr/lib/systemd/system/mailman3.service # ...make your changes here... # For more info about custom unit files, see # http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F [Unit] Description=GNU Mailing List Manager After=syslog.target network.target [Service] Type=forking PIDFile=/run/mailman/master.pid User=mailman Group=mailman ExecStart=/usr/bin/mailman start --force ExecReload=/usr/bin/mailman restart ExecStop=/usr/bin/mailman stop [Install] WantedBy=multi-user.target
