equal
deleted
inserted
replaced
5 |
5 |
6 use IO::File; |
6 use IO::File; |
7 use IPC::Run qw(run); |
7 use IPC::Run qw(run); |
8 use Mail::Sendmail; |
8 use Mail::Sendmail; |
9 use Sys::Hostname::Long; |
9 use Sys::Hostname::Long; |
10 |
|
11 =head1 Name |
|
12 |
|
13 rpi - a wrapper around B<reprepro processincoming> |
|
14 |
|
15 =head1 Description |
|
16 |
|
17 Until B<reprepro> supports a better mechanism for sending notifications for |
|
18 rejected packages we just execute B<reprepro processincoming> and parse its |
|
19 stdout and its stderr. Everything matching C<$important> patterns will be sent |
|
20 to either the signer of the changes file, the changer (from the B<Changed-By> |
|
21 field if present) or the maintainer (from the B<Maintainer> field). Depending |
|
22 on the type of message suggestions for problem resolution may be added. To |
|
23 enable us to determine which message relates to which .changes file we need a |
|
24 patched B<reprepro>: L<https://keller.schlittermann.de/hg/ius/diffs/raw-file/8d32753c0599/reprepro/3.5.2/changes-file-process-messages.patch>. |
|
25 |
|
26 To avoid possibly bothering random people we can limit possible recipients with |
|
27 a regular expression in C<$valid_receivers>. Any output matching the |
|
28 C<$unimportant> regular expression will not be sent to anyone. If we cant |
|
29 determine anyone to send the notification to we will try to send it to the |
|
30 C<$fallback> address. Anything matching none of the defined patterns will be |
|
31 sent to the C<$fallback> address too. Everything will be printed to stdout. |
|
32 |
|
33 =cut |
|
34 |
10 |
35 my $hostname = hostname_long; |
11 my $hostname = hostname_long; |
36 for (*STDERR, *STDOUT) { select $_; $|=1; } |
12 for (*STDERR, *STDOUT) { select $_; $|=1; } |
37 |
13 |
38 # see man reprepro |
14 # see man reprepro |
382 } |
358 } |
383 |
359 |
384 sub END { |
360 sub END { |
385 print "[$0]: Finished at ", scalar localtime, "\n"; |
361 print "[$0]: Finished at ", scalar localtime, "\n"; |
386 } |
362 } |
|
363 |
|
364 __END__ |
|
365 |
|
366 =head1 Name |
|
367 |
|
368 rpi - a wrapper around B<reprepro processincoming> |
|
369 |
|
370 =head1 Description |
|
371 |
|
372 Until B<reprepro> supports a better mechanism for sending notifications for |
|
373 rejected packages we just execute B<reprepro processincoming> and parse its |
|
374 stdout and its stderr. Everything matching C<$important> patterns will be sent |
|
375 to either the signer of the changes file, the changer (from the B<Changed-By> |
|
376 field if present) or the maintainer (from the B<Maintainer> field). Depending |
|
377 on the type of message suggestions for problem resolution may be added. To |
|
378 enable us to determine which message relates to which .changes file we need a |
|
379 patched B<reprepro>: L<https://keller.schlittermann.de/hg/ius/diffs/raw-file/8d32753c0599/reprepro/3.5.2/changes-file-process-messages.patch>. |
|
380 |
|
381 To avoid possibly bothering random people we can limit possible recipients with |
|
382 a regular expression in C<$valid_receivers>. Any output matching the |
|
383 C<$unimportant> regular expression will not be sent to anyone. If we cant |
|
384 determine anyone to send the notification to we will try to send it to the |
|
385 C<$fallback> address. Anything matching none of the defined patterns will be |
|
386 sent to the C<$fallback> address too. Everything will be printed to stdout. |
|
387 |
|
388 =cut |