Merge master into staging-next
This commit is contained in:
+51
@@ -0,0 +1,51 @@
|
||||
From 47469af384a6d4a0877c76d3c52013b40ab61f04 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Simons <simons@cryp.to>
|
||||
Date: Mon, 26 Aug 2019 16:10:04 +0200
|
||||
Subject: [PATCH] Find external tools via $PATH rather than hard-coding
|
||||
/usr/bin.
|
||||
|
||||
---
|
||||
src/mailman/config/mhonarc.cfg | 2 +-
|
||||
src/mailman/config/postfix.cfg | 2 +-
|
||||
src/mailman/config/schema.cfg | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/mailman/config/mhonarc.cfg b/src/mailman/config/mhonarc.cfg
|
||||
index b00f93aea..096e9521b 100644
|
||||
--- a/src/mailman/config/mhonarc.cfg
|
||||
+++ b/src/mailman/config/mhonarc.cfg
|
||||
@@ -24,4 +24,4 @@ base_url: http://$hostname/archives/$fqdn_listname
|
||||
|
||||
# If the archiver works by calling a command on the local machine, this is the
|
||||
# command to call.
|
||||
-command: /usr/bin/mhonarc -outdir /path/to/archive/$listname -add
|
||||
+command: mhonarc -outdir /path/to/archive/$listname -add
|
||||
diff --git a/src/mailman/config/postfix.cfg b/src/mailman/config/postfix.cfg
|
||||
index cddda220a..934c9a977 100644
|
||||
--- a/src/mailman/config/postfix.cfg
|
||||
+++ b/src/mailman/config/postfix.cfg
|
||||
@@ -5,7 +5,7 @@
|
||||
# db file, from the associated plain text files. The file being updated will
|
||||
# be appended to this string (with a separating space), so it must be
|
||||
# appropriate for os.system().
|
||||
-postmap_command: /usr/sbin/postmap
|
||||
+postmap_command: postmap
|
||||
|
||||
# This variable describes the type of transport maps that will be generated by
|
||||
# mailman to be used with postfix for LMTP transport. By default, it is set to
|
||||
diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg
|
||||
index fa06ccced..406999e13 100644
|
||||
--- a/src/mailman/config/schema.cfg
|
||||
+++ b/src/mailman/config/schema.cfg
|
||||
@@ -65,7 +65,7 @@ filtered_messages_are_preservable: no
|
||||
# where the substitution variable $filename is filled in by Mailman, and
|
||||
# contains the path to the temporary file that the command should read from.
|
||||
# The command should print the converted text to stdout.
|
||||
-html_to_plain_text_command: /usr/bin/lynx -dump $filename
|
||||
+html_to_plain_text_command: lynx -dump $filename
|
||||
|
||||
# Specify what characters are allowed in list names. Characters outside of
|
||||
# the class [-_.+=!$*{}~0-9a-z] matched case insensitively are never allowed,
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi, alembic, aiosmtpd, dnspython
|
||||
, flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib
|
||||
, requests, zope_configuration, click, falcon, importlib-resources
|
||||
, zope_component
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mailman";
|
||||
version = "3.2.2";
|
||||
|
||||
patches = [ ./0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch ];
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "09s9p5pb8gff6zblwidyq830yfgcvv50p5drdaxj1qpy8w46lvc6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
alembic aiosmtpd click dnspython falcon flufl_bounce flufl_i18n flufl_lock
|
||||
importlib-resources lazr_config passlib requests zope_configuration
|
||||
zope_component
|
||||
];
|
||||
|
||||
# Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
|
||||
# them in shell code breaks this assumption. The proper way to use mailman is
|
||||
# to create a specialized python interpreter:
|
||||
#
|
||||
# python37.withPackages (ps: [ps.mailman])
|
||||
#
|
||||
# This gives a properly wrapped 'mailman' command plus an interpreter that
|
||||
# has all the necessary search paths to execute unwrapped 'master' and
|
||||
# 'runner' scripts. The setup is a little tricky, but fortunately NixOS is
|
||||
# about to get a OS module that takes care of those details.
|
||||
dontWrapPythonPrograms = true;
|
||||
|
||||
meta = {
|
||||
homepage = https://www.gnu.org/software/mailman/;
|
||||
description = "Free software for managing electronic mail discussion and newsletter lists";
|
||||
license = stdenv.lib.licenses.gpl3Plus;
|
||||
maintainers = with stdenv.lib.maintainers; [ peti ];
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
diff -ubr mailman-2.1.16-orig/contrib/redhat_fhs.patch mailman-2.1.16/contrib/redhat_fhs.patch
|
||||
--- mailman-2.1.16-orig/contrib/redhat_fhs.patch 2013-10-21 14:55:48.797631434 +0200
|
||||
+++ mailman-2.1.16/contrib/redhat_fhs.patch 2013-10-21 14:56:42.534310378 +0200
|
||||
@@ -197,7 +197,7 @@
|
||||
+ else true; \
|
||||
+ fi; \
|
||||
+ done
|
||||
- chmod o-r $(DESTDIR)$(var_prefix)/archives/private
|
||||
+ chmod o-r $(prefix)$(var_prefix)/archives/private
|
||||
@for d in $(ARCH_INDEP_DIRS); \
|
||||
do \
|
||||
Only in mailman-2.1.5.FHS: Makefile.in~
|
||||
diff -ubr mailman-2.1.16-orig/Makefile.in mailman-2.1.16/Makefile.in
|
||||
--- mailman-2.1.16-orig/Makefile.in 2013-10-21 14:55:48.798631519 +0200
|
||||
+++ mailman-2.1.16/Makefile.in 2013-10-21 14:56:42.562313220 +0200
|
||||
@@ -87,7 +87,7 @@
|
||||
@echo "Creating architecture independent directories..."
|
||||
@for d in $(VAR_DIRS); \
|
||||
do \
|
||||
- dir=$(DESTDIR)$(var_prefix)/$$d; \
|
||||
+ dir=$(prefix)$(var_prefix)/$$d; \
|
||||
if test ! -d $$dir; then \
|
||||
echo "Creating directory hierarchy $$dir"; \
|
||||
$(srcdir)/mkinstalldirs $$dir; \
|
||||
@@ -96,7 +96,7 @@
|
||||
else true; \
|
||||
fi; \
|
||||
done
|
||||
- chmod o-r $(DESTDIR)$(var_prefix)/archives/private
|
||||
+ chmod o-r $(prefix)$(var_prefix)/archives/private
|
||||
@for d in $(ARCH_INDEP_DIRS); \
|
||||
do \
|
||||
dir=$(DESTDIR)$(prefix)/$$d; \
|
||||
@@ -0,0 +1,28 @@
|
||||
{ stdenv, buildPythonPackage, fetchPypi, beautifulsoup4, vcrpy, mock
|
||||
, django-mailman3, mailmanclient
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "postorius";
|
||||
version = "1.2.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1722lnscxfl8wdigf5d80d1qmd5gblr439wa989jxlww0wkjg9fl";
|
||||
};
|
||||
|
||||
buildInputs = [ beautifulsoup4 vcrpy mock ];
|
||||
propagatedBuildInputs = [ django-mailman3 ];
|
||||
|
||||
checkPhase = ''
|
||||
cd $NIX_BUILD_TOP/$sourceRoot
|
||||
PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test --settings=test_settings postorius
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://www.gnu.org/software/mailman/;
|
||||
description = "Web-based user interface for managing GNU Mailman";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
maintainers = with stdenv.lib.maintainers; [ globin peti ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user