diff mbox series

[OpenWrt-Devel,maintainer-tools] patchwork-apply.sh: help spotting DMARC mangled patches

Message ID 20191109125521.11981-1-ynezz@true.cz
State Superseded
Headers show
Series [OpenWrt-Devel,maintainer-tools] patchwork-apply.sh: help spotting DMARC mangled patches | expand

Commit Message

Petr Štetiar Nov. 9, 2019, 12:55 p.m. UTC
Avoid DMARC plague in the commit messages:

 87f9292300cf hostapd: add IEEE 802.11k support
 450d44a8ead2 openssl: change defaults: ENGINE:on, NPN:off, misc
 eabc1ddc4541 build: Honour NO_COLOR in include/scan.mk
 3fb45576ac16 cryptodev-linux: move from packages feed
 a73283dc10f7 kernel: nf-nathelper-extra depends on ipt-raw
 0317fc3658eb libpcap: patch to add limits.h to pcap-usb-linux.c
 26dbf79f4905 libevent2: Don't build tests and samples
 d59126040701 brcm63xx: initial support for Sky SR102 router
 094d49cddf93 kernel: bump 4.14 to 4.14.51
 247055cbfbf1 igmpproxy: bump to 0.2.1
 c451434b963d cake: bump to 20180504 bake
 080fb7a3fbb6 iproute2: import latest cake
 ad5af37ca793 iproute2: backport json_print-fix-hidden-64-bit-type-promotion
 78f4305933b9 iftop: bump to latest
 7783f31359cb base-files: nand: use CI_KERNPART whenever the kernel volume is needed

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 patchwork-apply.sh | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jonas Gorski Nov. 9, 2019, 5:43 p.m. UTC | #1
On Sat, 9 Nov 2019 at 13:55, Petr Štetiar <ynezz@true.cz> wrote:
>
> Avoid DMARC plague in the commit messages:
>
>  87f9292300cf hostapd: add IEEE 802.11k support
>  450d44a8ead2 openssl: change defaults: ENGINE:on, NPN:off, misc
>  eabc1ddc4541 build: Honour NO_COLOR in include/scan.mk
>  3fb45576ac16 cryptodev-linux: move from packages feed
>  a73283dc10f7 kernel: nf-nathelper-extra depends on ipt-raw
>  0317fc3658eb libpcap: patch to add limits.h to pcap-usb-linux.c
>  26dbf79f4905 libevent2: Don't build tests and samples
>  d59126040701 brcm63xx: initial support for Sky SR102 router
>  094d49cddf93 kernel: bump 4.14 to 4.14.51
>  247055cbfbf1 igmpproxy: bump to 0.2.1
>  c451434b963d cake: bump to 20180504 bake
>  080fb7a3fbb6 iproute2: import latest cake
>  ad5af37ca793 iproute2: backport json_print-fix-hidden-64-bit-type-promotion
>  78f4305933b9 iftop: bump to latest
>  7783f31359cb base-files: nand: use CI_KERNPART whenever the kernel volume is needed
>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
>  patchwork-apply.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/patchwork-apply.sh b/patchwork-apply.sh
> index 5506adbfe451..506a09fd4fd5 100755
> --- a/patchwork-apply.sh
> +++ b/patchwork-apply.sh
> @@ -140,6 +140,12 @@ echo "$1" | grep -sqE '^[0-9]+$' || {
>         }
>  }
>
> +grep --color --context=3 "DMARC Reject/Quarantine" "$1.patch" && {
> +       if yesno "Beware DMARC text detected! Set to 'Changes Requested'?" "y"; then
> +               pwclient update -s "Changes Requested" "$1"

This DMARC thing is nothing the submitter can fix unless they run
their own mail server. At best a sed script fixing up the patch would
work here, if this can be sufficiently expressed.

A better place would be a git hook on our server rejecting any commits
with it (like we already have for missing SOB).


Regards
Jonas
Petr Štetiar Nov. 10, 2019, 9:03 a.m. UTC | #2
Jonas Gorski <jonas.gorski@gmail.com> [2019-11-09 18:43:04]:

Hi,

> This DMARC thing is nothing the submitter can fix unless they run
> their own mail server. 

I think, that there are some working free email alternatives, one can go pull
request route...

> A better place would be a git hook on our server rejecting any commits
> with it (like we already have for missing SOB).

Indeed, that was my initial idea, but I couldn't find the source code for that
part, so decided to spark some discussion with this patch first.

-- ynezz
diff mbox series

Patch

diff --git a/patchwork-apply.sh b/patchwork-apply.sh
index 5506adbfe451..506a09fd4fd5 100755
--- a/patchwork-apply.sh
+++ b/patchwork-apply.sh
@@ -140,6 +140,12 @@  echo "$1" | grep -sqE '^[0-9]+$' || {
 	}
 }
 
+grep --color --context=3 "DMARC Reject/Quarantine" "$1.patch" && {
+	if yesno "Beware DMARC text detected! Set to 'Changes Requested'?" "y"; then
+		pwclient update -s "Changes Requested" "$1"
+	fi
+}
+
 git am "$1.patch" || {
 	echo "Failed to apply patch $1" >&2
 	git am --abort