Attachment 'mailman-FHS.patch'
Download 1 === modified file 'Mailman/Defaults.py.in'
2 --- Mailman/Defaults.py.in 2020-06-10 22:04:26 +0000
3 +++ Mailman/Defaults.py.in 2020-09-16 19:24:46 +0000
4 @@ -1751,9 +1751,11 @@
5
6 # Useful directories
7 LIST_DATA_DIR = os.path.join(VAR_PREFIX, 'lists')
8 -LOG_DIR = os.path.join(VAR_PREFIX, 'logs')
9 -LOCK_DIR = os.path.join(VAR_PREFIX, 'locks')
10 +LOG_DIR = '@LOG_DIR@'
11 +LOCK_DIR = '@LOCK_DIR@'
12 +CONFIG_DIR = '@CONFIG_DIR@'
13 DATA_DIR = os.path.join(VAR_PREFIX, 'data')
14 +PID_DIR = '@PID_DIR@'
15 SPAM_DIR = os.path.join(VAR_PREFIX, 'spam')
16 WRAPPER_DIR = os.path.join(EXEC_PREFIX, 'mail')
17 BIN_DIR = os.path.join(PREFIX, 'bin')
18 @@ -1764,7 +1766,7 @@
19 PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private')
20
21 # Directories used by the qrunner subsystem
22 -QUEUE_DIR = os.path.join(VAR_PREFIX, 'qfiles')
23 +QUEUE_DIR = '@QUEUE_DIR@'
24 INQUEUE_DIR = os.path.join(QUEUE_DIR, 'in')
25 OUTQUEUE_DIR = os.path.join(QUEUE_DIR, 'out')
26 CMDQUEUE_DIR = os.path.join(QUEUE_DIR, 'commands')
27 @@ -1778,9 +1780,9 @@
28 MAILDIR_DIR = os.path.join(QUEUE_DIR, 'maildir')
29
30 # Other useful files
31 -PIDFILE = os.path.join(DATA_DIR, 'master-qrunner.pid')
32 -SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw')
33 -LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw')
34 +PIDFILE = os.path.join(PID_DIR, 'master-qrunner.pid')
35 +SITE_PW_FILE = os.path.join(CONFIG_DIR, 'adm.pw')
36 +LISTCREATOR_PW_FILE = os.path.join(CONFIG_DIR, 'creator.pw')
37
38 # Import a bunch of version numbers
39 from Version import *
40
41 === modified file 'Mailman/MTA/Postfix.py'
42 --- Mailman/MTA/Postfix.py 2019-06-05 23:43:30 +0000
43 +++ Mailman/MTA/Postfix.py 2020-09-16 19:31:08 +0000
44 @@ -33,8 +33,8 @@
45 from Mailman.Logging.Syslog import syslog
46
47 LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, 'creator')
48 -ALIASFILE = os.path.join(mm_cfg.DATA_DIR, 'aliases')
49 -VIRTFILE = os.path.join(mm_cfg.DATA_DIR, 'virtual-mailman')
50 +ALIASFILE = os.path.join(mm_cfg.CONFIG_DIR, 'aliases')
51 +VIRTFILE = os.path.join(mm_cfg.CONFIG_DIR, 'virtual-mailman')
52 # Desired mode for aliases(.db) and virtual-mailman(.db) for both creation
53 # and check_perms.
54 targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
55
56 === modified file 'Makefile.in'
57 --- Makefile.in 2018-06-17 23:47:34 +0000
58 +++ Makefile.in 2020-09-16 19:24:46 +0000
59 @@ -28,6 +28,11 @@
60 prefix= @prefix@
61 exec_prefix= @exec_prefix@
62 var_prefix= @VAR_PREFIX@
63 +configdir= @CONFIG_DIR@
64 +lockdir= @LOCK_DIR@
65 +logdir= @LOG_DIR@
66 +piddir= @PID_DIR@
67 +queuedir= @QUEUE_DIR@
68 DESTDIR=
69
70 CC= @CC@
71 @@ -41,8 +46,12 @@
72 OPT= @OPT@
73 CFLAGS= @CFLAGS@ $(OPT) $(DEFS)
74
75 +FHS_DIRS= \
76 + ${configdir} ${lockdir} ${logdir} ${piddir} ${queuedir}
77 +
78 +
79 VAR_DIRS= \
80 - logs archives lists locks data spam qfiles \
81 + archives lists data spam \
82 archives/private archives/public
83
84 ARCH_INDEP_DIRS= \
85 @@ -96,6 +105,15 @@
86 else true; \
87 fi; \
88 done
89 + @for d in $(FHS_DIRS); \
90 + do \
91 + dir=$(DESTDIR)/$$d; \
92 + if test ! -d $$dir; then \
93 + echo "Creating directory $$dir"; \
94 + $(INSTALL) -d -m $(DIRMODE) $$dir; \
95 + else true; \
96 + fi; \
97 + done
98 chmod o-r $(DESTDIR)$(var_prefix)/archives/private
99 @for d in $(ARCH_INDEP_DIRS); \
100 do \
101
102 === modified file 'bin/check_perms'
103 --- bin/check_perms 2018-06-17 23:47:34 +0000
104 +++ bin/check_perms 2020-09-16 19:24:46 +0000
105 @@ -183,7 +183,8 @@
106 print C_('checking mode for %(prefix)s')
107 dirs = {}
108 for d in (mm_cfg.PREFIX, mm_cfg.EXEC_PREFIX, mm_cfg.VAR_PREFIX,
109 - mm_cfg.LOG_DIR):
110 + mm_cfg.CONFIG_DIR, mm_cfg.DATA_DIR, mm_cfg.LOCK_DIR,
111 + mm_cfg.LOG_DIR, mm_cfg.QUEUE_DIR, mm_cfg.PID_DIR):
112 dirs[d] = True
113 for d in dirs.keys():
114 try:
115
116 === modified file 'configure'
117 --- configure 2020-09-13 14:21:30 +0000
118 +++ configure 2020-09-16 19:27:19 +0000
119 @@ -634,6 +634,11 @@
120 MAIL_GROUP
121 MAILMAN_GROUP
122 MAILMAN_USER
123 +QUEUE_DIR
124 +PID_DIR
125 +LOG_DIR
126 +LOCK_DIR
127 +CONFIG_DIR
128 VAR_PREFIX
129 OPT
130 OBJEXT
131 @@ -702,6 +707,11 @@
132 with_gcc
133 with_var_prefix
134 with_permcheck
135 +with_config_dir
136 +with_lock_dir
137 +with_log_dir
138 +with_pid_dir
139 +with_queue_dir
140 with_username
141 with_groupname
142 with_mail_gid
143 @@ -1338,8 +1348,13 @@
144 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
145 --with-python specify path to Python interpreter
146 --without-gcc never use gcc
147 - --with-var-prefix directory for mutable data /var/mailman
148 + --with-var-prefix directory for mutable data /var/mailman
149 --without-permcheck skip the check for target directory permissions
150 + --with-config-dir specify directory for configuration data other than VAR_PREFIX/data
151 + --with-lock-dir specify directory for lock files other than VAR_PREFIX/locks
152 + --with-log-dir specify directory for log files other than VAR_PREFIX/logs
153 + --with-pid-dir specify directory for the pid file other than VAR_PREFIX/data
154 + --with-queue-dir specify directory for queue files other than VAR_PREFIX/qfiles
155 --with-username specify a user name other than \"mailman\"
156 --with-groupname specify a group name other than \"mailman\"
157 --with-mail-gid group name mail programs run as
158 @@ -3549,6 +3564,91 @@
159 prefixcheck=$VAR_PREFIX
160 fi
161
162 +# Get the configuration file directory
163 +
164 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-config-dir" >&5
165 +$as_echo_n "checking for --with-config-dir... " >&6; }
166 +
167 +# Check whether --with-config-dir was given.
168 +if test "${with_config_dir+set}" = set; then :
169 + withval=$with_config_dir;
170 +fi
171 +
172 +case "$with_config_dir" in
173 + yes|no|"") CONFIG_DIR="$VAR_PREFIX/data";;
174 + *) CONFIG_DIR=$with_config_dir;;
175 +esac
176 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_DIR" >&5
177 +$as_echo "$CONFIG_DIR" >&6; }
178 +
179 +# Get the lock directory
180 +
181 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lock-dir" >&5
182 +$as_echo_n "checking for --with-lock-dir... " >&6; }
183 +
184 +# Check whether --with-lock-dir was given.
185 +if test "${with_lock_dir+set}" = set; then :
186 + withval=$with_lock_dir;
187 +fi
188 +
189 +case "$with_lock_dir" in
190 + yes|no|"") LOCK_DIR="$VAR_PREFIX/locks";;
191 + *) LOCK_DIR=$with_lock_dir;;
192 +esac
193 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOCK_DIR" >&5
194 +$as_echo "$LOCK_DIR" >&6; }
195 +
196 +# Get the log directory
197 +
198 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-log-dir" >&5
199 +$as_echo_n "checking for --with-log-dir... " >&6; }
200 +
201 +# Check whether --with-log-dir was given.
202 +if test "${with_log_dir+set}" = set; then :
203 + withval=$with_log_dir;
204 +fi
205 +
206 +case "$with_log_dir" in
207 + yes|no|"") LOG_DIR="$VAR_PREFIX/logs";;
208 + *) LOG_DIR=$with_log_dir;;
209 +esac
210 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOG_DIR" >&5
211 +$as_echo "$LOG_DIR" >&6; }
212 +
213 +# Get the pid directory
214 +
215 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pid-dir" >&5
216 +$as_echo_n "checking for --with-pid-dir... " >&6; }
217 +
218 +# Check whether --with-pid-dir was given.
219 +if test "${with_pid_dir+set}" = set; then :
220 + withval=$with_pid_dir;
221 +fi
222 +
223 +case "$with_pid_dir" in
224 + yes|no|"") PID_DIR="$VAR_PREFIX/data";;
225 + *) PID_DIR=$with_pid_dir;;
226 +esac
227 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PID_DIR" >&5
228 +$as_echo "$PID_DIR" >&6; }
229 +
230 +# Get the queue directory
231 +
232 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-queue-dir" >&5
233 +$as_echo_n "checking for --with-queue-dir... " >&6; }
234 +
235 +# Check whether --with-queue-dir was given.
236 +if test "${with_queue_dir+set}" = set; then :
237 + withval=$with_queue_dir;
238 +fi
239 +
240 +case "$with_queue_dir" in
241 + yes|no|"") QUEUE_DIR="$VAR_PREFIX/qfiles";;
242 + *) QUEUE_DIR=$with_queue_dir;;
243 +esac
244 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QUEUE_DIR" >&5
245 +$as_echo "$QUEUE_DIR" >&6; }
246 +
247 # new macro for finding group names
248
249
250
251 === modified file 'configure.in'
252 --- configure.in 2020-09-13 14:21:30 +0000
253 +++ configure.in 2020-09-16 19:24:46 +0000
254 @@ -322,7 +322,7 @@
255 AC_SUBST(VAR_PREFIX)
256 AC_MSG_CHECKING(for --with-var-prefix)
257 AC_ARG_WITH(var-prefix, dnl
258 -[ --with-var-prefix directory for mutable data [/var/mailman]])
259 +[ --with-var-prefix directory for mutable data [/var/mailman]])
260 case "$with_var_prefix" in
261 yes) VAR_PREFIX="$default_var_prefix"; ans=$VAR_PREFIX;;
262 ""|no) VAR_PREFIX="$prefix"; ans="no";;
263 @@ -349,6 +349,61 @@
264 prefixcheck=$VAR_PREFIX
265 fi
266
267 +# Get the configuration file directory
268 +AC_SUBST(CONFIG_DIR)
269 +AC_MSG_CHECKING(for --with-config-dir)
270 +AC_ARG_WITH(config-dir, dnl
271 +[ --with-config-dir specify directory for configuration data other than [VAR_]PREFIX/data])
272 +case "$with_config_dir" in
273 + yes|no|"") CONFIG_DIR="$VAR_PREFIX/data";;
274 + *) CONFIG_DIR=$with_config_dir;;
275 +esac
276 +AC_MSG_RESULT($CONFIG_DIR)
277 +
278 +# Get the lock directory
279 +AC_SUBST(LOCK_DIR)
280 +AC_MSG_CHECKING(for --with-lock-dir)
281 +AC_ARG_WITH(lock-dir, dnl
282 +[ --with-lock-dir specify directory for lock files other than [VAR_]PREFIX/locks])
283 +case "$with_lock_dir" in
284 + yes|no|"") LOCK_DIR="$VAR_PREFIX/locks";;
285 + *) LOCK_DIR=$with_lock_dir;;
286 +esac
287 +AC_MSG_RESULT($LOCK_DIR)
288 +
289 +# Get the log directory
290 +AC_SUBST(LOG_DIR)
291 +AC_MSG_CHECKING(for --with-log-dir)
292 +AC_ARG_WITH(log-dir, dnl
293 +[ --with-log-dir specify directory for log files other than [VAR_]PREFIX/logs])
294 +case "$with_log_dir" in
295 + yes|no|"") LOG_DIR="$VAR_PREFIX/logs";;
296 + *) LOG_DIR=$with_log_dir;;
297 +esac
298 +AC_MSG_RESULT($LOG_DIR)
299 +
300 +# Get the pid directory
301 +AC_SUBST(PID_DIR)
302 +AC_MSG_CHECKING(for --with-pid-dir)
303 +AC_ARG_WITH(pid-dir, dnl
304 +[ --with-pid-dir specify directory for the pid file other than [VAR_]PREFIX/data])
305 +case "$with_pid_dir" in
306 + yes|no|"") PID_DIR="$VAR_PREFIX/data";;
307 + *) PID_DIR=$with_pid_dir;;
308 +esac
309 +AC_MSG_RESULT($PID_DIR)
310 +
311 +# Get the queue directory
312 +AC_SUBST(QUEUE_DIR)
313 +AC_MSG_CHECKING(for --with-queue-dir)
314 +AC_ARG_WITH(queue-dir, dnl
315 +[ --with-queue-dir specify directory for queue files other than [VAR_]PREFIX/qfiles])
316 +case "$with_queue_dir" in
317 + yes|no|"") QUEUE_DIR="$VAR_PREFIX/qfiles";;
318 + *) QUEUE_DIR=$with_queue_dir;;
319 +esac
320 +AC_MSG_RESULT($QUEUE_DIR)
321 +
322 # new macro for finding group names
323 AC_DEFUN([MM_FIND_GROUP_NAME], [
324 # $1 == variable name
325 @@ -767,7 +822,7 @@
326 templates/Makefile cron/Makefile scripts/Makefile messages/Makefile
327 cron/crontab.in misc/mailman Makefile
328 tests/Makefile tests/bounces/Makefile tests/msgs/Makefile
329 - $SCRIPTS],
330 + $SCRIPTS ],
331 echo "configuration completed at" `date`)
332
333 # Make sure all the build scripts are executable.
334
335 === modified file 'misc/Makefile.in'
336 --- misc/Makefile.in 2018-06-17 23:47:34 +0000
337 +++ misc/Makefile.in 2020-09-16 19:24:46 +0000
338 @@ -27,6 +27,12 @@
339 prefix= @prefix@
340 exec_prefix= @exec_prefix@
341 var_prefix= @VAR_PREFIX@
342 +configdir= @CONFIG_DIR@
343 +lockdir= @LOCK_DIR@
344 +logdir= @LOG_DIR@
345 +piddir= @PID_DIR@
346 +queuedir= @QUEUE_DIR@
347 +MAILMAN_GROUP= @MAILMAN_GROUP@
348 DESTDIR=
349
350 CC= @CC@
351 @@ -88,7 +94,7 @@
352 $(INSTALL) -m $(FILEMODE) paths.py $$dir; \
353 done
354 $(INSTALL) -m $(EXEMODE) mailman $(DESTDIR)$(SCRIPTSDIR)
355 - $(INSTALL) -m $(FILEMODE) sitelist.cfg $(DESTDIR)$(DATADIR)
356 + $(INSTALL) -m $(FILEMODE) sitelist.cfg $(DESTDIR)$(configdir)
357
358 install-packages:
359 if [ -z "$(EMAILPKG)" -a -d $(DESTDIR)$(PYTHONLIBDIR)/email ] ; \
360
361 === modified file 'misc/mailman.in'
362 --- misc/mailman.in 2018-06-17 23:47:34 +0000
363 +++ misc/mailman.in 2020-09-16 19:36:23 +0000
364 @@ -25,13 +25,13 @@
365 # On Debian, type "update-rc.d mailman defaults"
366 # On RedHat, and derivatives, install with "chkconfig --add mailman"
367 #
368 -# chkconfig: 2345 98 12
369 +# chkconfig: - 98 12
370 # description: Mailman is the GNU Mailing List Manager, a program that \
371 # manages electronic mail discussion groups. For more \
372 # on GNU Mailman see http://www.list.org
373 # processname: mailmanctl
374 # config: @prefix@/Mailman/mm_cfg.py
375 -# pidfile: @VAR_PREFIX@/data/master-qrunner.pid
376 +# pidfile: @PID_DIR@/data/master-qrunner.pid
377 #
378 ### BEGIN INIT INFO
379 # Provides: mailman
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.