[OpenWrt-Devel,v2,maintainer-tools] patchwork-apply.sh: try to fix DMARC mangled patches
diff mbox series

Message ID 20191110090447.16563-1-ynezz@true.cz
State Under Review
Delegated to: Petr Štetiar
Headers show
Series
  • [OpenWrt-Devel,v2,maintainer-tools] patchwork-apply.sh: try to fix DMARC mangled patches
Related show

Commit Message

Petr Štetiar Nov. 10, 2019, 9:04 a.m. UTC
In order to 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 | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Etienne Champetier Nov. 11, 2019, 9:06 p.m. UTC | #1
Hi Petr, "mailing list admins",

Le dim. 10 nov. 2019 à 10:05, Petr Štetiar <ynezz@true.cz> a écrit :
>
> In order to avoid DMARC plague in the commit messages:

I saw this some days ago:
http://arc-spec.org/
Haven't had time to look at it, but it's supposed to be a solution to
the DMARC + mailing list mess

Etienne

>
>  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 | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/patchwork-apply.sh b/patchwork-apply.sh
> index 5506adbfe451..1543c7fdaceb 100755
> --- a/patchwork-apply.sh
> +++ b/patchwork-apply.sh
> @@ -140,6 +140,13 @@ echo "$1" | grep -sqE '^[0-9]+$' || {
>         }
>  }
>
> +grep --color --context=3 "DMARC Reject/Quarantine" "$1.patch" && {
> +       if ! yesno "DMARC manled patch detected, attempt to fix it?" "y"; then
> +               exit 4
> +       fi
> +       sed -i '/The sender domain has a DMARC/,/automatically by the mailing list software./d' "$1.patch"
> +}
> +
>  git am "$1.patch" || {
>         echo "Failed to apply patch $1" >&2
>         git am --abort
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler Nov. 13, 2019, 12:23 p.m. UTC | #2
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Petr Štetiar
> Sent: Sonntag, 10. November 2019 10:05
> To: openwrt-devel@lists.openwrt.org
> Cc: Petr Štetiar <ynezz@true.cz>
> Subject: [OpenWrt-Devel] [PATCH v2 maintainer-tools] patchwork-apply.sh: try
> to fix DMARC mangled patches
> 
> In order to 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>

I just want to support Petr, as I also think having just the DMARC comment in the commit message is really a problem and should be addressed.

I think it should be dealt with both in patchwork-apply.sh and as a hook when pushing to git.openwrt.org.

Best

Adrian
Jonas Gorski Nov. 13, 2019, 1:54 p.m. UTC | #3
On Sun, 10 Nov 2019 at 10:05, Petr Štetiar <ynezz@true.cz> wrote:
>
> In order to 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 | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/patchwork-apply.sh b/patchwork-apply.sh
> index 5506adbfe451..1543c7fdaceb 100755
> --- a/patchwork-apply.sh
> +++ b/patchwork-apply.sh
> @@ -140,6 +140,13 @@ echo "$1" | grep -sqE '^[0-9]+$' || {
>         }
>  }
>
> +grep --color --context=3 "DMARC Reject/Quarantine" "$1.patch" && {
> +       if ! yesno "DMARC manled patch detected, attempt to fix it?" "y"; then
> +               exit 4
> +       fi
> +       sed -i '/The sender domain has a DMARC/,/automatically by the mailing list software./d' "$1.patch"
> +}
> +

The patch author itself also needs unmangling. it currently is "foo
bar via openwrt-devel <...>". The original author seems to be
available in a "Reply-To:" header - no idea how stable that is.

After that it looks good IMHO. And yes, having a sanity check as a
commit hook would be good, but is a separate thing from this patch.
Same for a fixed patchwork version, but there has been no release yet
with the fix[1].


Regards
Jonas

[1] https://github.com/getpatchwork/patchwork/commit/8279a84238c10acbcadd075e4e998dffdc39f2e9


>  git am "$1.patch" || {
>         echo "Failed to apply patch $1" >&2
>         git am --abort
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Patch
diff mbox series

diff --git a/patchwork-apply.sh b/patchwork-apply.sh
index 5506adbfe451..1543c7fdaceb 100755
--- a/patchwork-apply.sh
+++ b/patchwork-apply.sh
@@ -140,6 +140,13 @@  echo "$1" | grep -sqE '^[0-9]+$' || {
 	}
 }
 
+grep --color --context=3 "DMARC Reject/Quarantine" "$1.patch" && {
+	if ! yesno "DMARC manled patch detected, attempt to fix it?" "y"; then
+		exit 4
+	fi
+	sed -i '/The sender domain has a DMARC/,/automatically by the mailing list software./d' "$1.patch"
+}
+
 git am "$1.patch" || {
 	echo "Failed to apply patch $1" >&2
 	git am --abort