Re: [RFC PATCH] openssl: make the patches QUILT-friendly
> On 27 Mar 2021, at 00:41, Eneas U de Queiroz wrote: > > On Fri, Mar 26, 2021 at 7:35 PM Kevin 'ldir' Darbyshire-Bryant > wrote: >> >> ... I was also frustrated that there was patch fuzz in the tree on a fairly >> core package - that really shouldn’t be the case. > > My apologies. I work in a clone of the openssl git repo, rebasing the > changes on top of the current version. I always look at the diffs > before sending the patch to openwrt. If they were just line changes, > I wouldn't bother to touch the patch, in order to minimize changes. > I'll revise my approach and change the files no matter what. Thanks for that and I understand your workflow. I’ve a similar thing when I play with dnsmasq updates :-) As a pedantic note, please check your quiltrc settings as per https://openwrt.org/docs/guide-developer/build-system/use-patches-with-buildsystem ‘cos the ‘refresh,update’ output you attached still contains index info which is usually stripped. Thanks for all your work on openssl - I don’t understand it but know it’s important :-) Kevin signature.asc Description: Message signed with OpenPGP ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC PATCH] openssl: make the patches QUILT-friendly
On Fri, Mar 26, 2021 at 7:35 PM Kevin 'ldir' Darbyshire-Bryant wrote: > > ... I was also frustrated that there was patch fuzz in the tree on a fairly > core package - that really shouldn’t be the case. My apologies. I work in a clone of the openssl git repo, rebasing the changes on top of the current version. I always look at the diffs before sending the patch to openwrt. If they were just line changes, I wouldn't bother to touch the patch, in order to minimize changes. I'll revise my approach and change the files no matter what. Cheers, Eneas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC PATCH] openssl: make the patches QUILT-friendly
> On 26 Mar 2021, at 18:55, Eneas U de Queiroz wrote: > > The patches in this package are all made by git format-patches. If one > were to run 'make package/openssl/{refresh,update}', then things will > not work as expected, because quilt QUILT does not deal well with > patches that rename files. For openssl, the problematic patch is > 430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch. > > So, I've generated a new patch with 'git format-patch --no-renames', and > then 'make package/openssl/{refresh,update}'. > > Signed-off-by: Eneas U de Queiroz > --- > > While I really prefer to leave the git-formatted patches as they are, I > know quilt is the preferred way of handling patches in OpenWRT, so I'm > presenting this as RFC, so the core developers can decide. > > ldir has made a similar commit e27ef2da0d, and then reverted it right away > in bbb9c1c2be, and I don't know why. I was trying to do my own 1.1.1k bump which ended badly. I was also frustrated that there was patch fuzz in the tree on a fairly core package - that really shouldn’t be the case. So I resolved to fix that and push it before understanding the full implications of the file rename stuff going on. I reverted on the basis I was in far too deep. signature.asc Description: Message signed with OpenPGP ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [RFC PATCH] openssl: make the patches QUILT-friendly
On Fri, Mar 26, 2021 at 11:56 AM Eneas U de Queiroz wrote: > > The patches in this package are all made by git format-patches. If one > were to run 'make package/openssl/{refresh,update}', then things will > not work as expected, because quilt QUILT does not deal well with > patches that rename files. For openssl, the problematic patch is > 430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch. > > So, I've generated a new patch with 'git format-patch --no-renames', and > then 'make package/openssl/{refresh,update}'. NAK. This just bloats the patches for no good reason. It also makes it harder to deal with upstream changes. I know that you're fairly competent when dealing with this, but think about it from a drive by contributor. Getting a setup to properly refresh patches like these is difficult. > > Signed-off-by: Eneas U de Queiroz > --- > > While I really prefer to leave the git-formatted patches as they are, I > know quilt is the preferred way of handling patches in OpenWRT, so I'm > presenting this as RFC, so the core developers can decide. > > ldir has made a similar commit e27ef2da0d, and then reverted it right away > in bbb9c1c2be, and I don't know why. > > neheb proposed a patch [1] that does the file renaming in Build/Prepare, so > that it is easier to use quilt while refreshing patches after a package > bump. It has an undesirable side-effect of not running the renaming > portion at all when using QUILT, resulting in a build failure. > > Some packages in the packages feed are skipping build steps when running > with QUILT, to speed up automatic refresh of patches, and I've been > fixing them as I stumble upon some of the failures. > > At least to me, being able to quickly build with QUILT=1, without having > to start from scratch and go through dependencies is an immensively > useful feature that I would not trade for having tidier patches. > > For this package, one could rename the files in Build/Configure when > compiling with QUILT without a problem. So, if desired, it could be > done neheb's way instead. > > In my opinion, QUILT is not particularly useful for rebasing large > changes, such as the engine patches here. So even if neheb's proposal > has a nice intention, it is not appropriate for this package. > > If the motivation is just to run make package/openssl/{refresh,update}, > perhaps automatically to keep patches tidy, then this patch will > suffice. > > Cheers, > > Eneas > > [1] > https://patchwork.ozlabs.org/project/openwrt/patch/20210326092548.14019-1-ros...@gmail.com/ > > diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile > index 7ab4c6ccd0..458b064f13 100644 > --- a/package/libs/openssl/Makefile > +++ b/package/libs/openssl/Makefile > @@ -11,7 +11,7 @@ PKG_NAME:=openssl > PKG_BASE:=1.1.1 > PKG_BUGFIX:=k > PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) > -PKG_RELEASE:=1 > +PKG_RELEASE:=2 > PKG_USE_MIPS16:=0 > ENGINES_DIR=engines-1.1 > > diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch > b/package/libs/openssl/patches/100-Configure-afalg-support.patch > index 98944103b5..2ae5938bdc 100644 > --- a/package/libs/openssl/patches/100-Configure-afalg-support.patch > +++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch > @@ -1,4 +1,4 @@ > -From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001 > +From Mon Sep 17 00:00:00 2001 > From: Eneas U de Queiroz > Date: Thu, 27 Sep 2018 08:29:21 -0300 > Subject: Do not use host kernel version to disable AFALG > @@ -8,11 +8,9 @@ version to disable building the AFALG engine on openwrt > targets. > > Signed-off-by: Eneas U de Queiroz > > -diff --git a/Configure b/Configure > -index 5a699836f3..74d057c219 100755 > --- a/Configure > +++ b/Configure > -@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtrace"}) > +@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtra > > unless ($disabled{afalgeng}) { > $config{afalgeng}=""; > diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch > b/package/libs/openssl/patches/110-openwrt_targets.patch > index d0530b4661..50a9ebe2d6 100644 > --- a/package/libs/openssl/patches/110-openwrt_targets.patch > +++ b/package/libs/openssl/patches/110-openwrt_targets.patch > @@ -1,4 +1,4 @@ > -From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001 > +From Mon Sep 17 00:00:00 2001 > From: Eneas U de Queiroz > Date: Thu, 27 Sep 2018 08:30:24 -0300 > Subject: Add openwrt targets > @@ -7,9 +7,6 @@ Targets are named: linux-$(CONFIG_ARCH)-openwrt > > Signed-off-by: Eneas U de Queiroz > > -diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf > -new file mode 100644 > -index 00..86a86d31e4 > --- /dev/null > +++ b/Configurations/25-openwrt.conf > @@ -0,0 +1,48 @@ > diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch >
[RFC PATCH] openssl: make the patches QUILT-friendly
The patches in this package are all made by git format-patches. If one were to run 'make package/openssl/{refresh,update}', then things will not work as expected, because quilt QUILT does not deal well with patches that rename files. For openssl, the problematic patch is 430-e_devcrypto-make-the-dev-crypto-engine-dynamic.patch. So, I've generated a new patch with 'git format-patch --no-renames', and then 'make package/openssl/{refresh,update}'. Signed-off-by: Eneas U de Queiroz --- While I really prefer to leave the git-formatted patches as they are, I know quilt is the preferred way of handling patches in OpenWRT, so I'm presenting this as RFC, so the core developers can decide. ldir has made a similar commit e27ef2da0d, and then reverted it right away in bbb9c1c2be, and I don't know why. neheb proposed a patch [1] that does the file renaming in Build/Prepare, so that it is easier to use quilt while refreshing patches after a package bump. It has an undesirable side-effect of not running the renaming portion at all when using QUILT, resulting in a build failure. Some packages in the packages feed are skipping build steps when running with QUILT, to speed up automatic refresh of patches, and I've been fixing them as I stumble upon some of the failures. At least to me, being able to quickly build with QUILT=1, without having to start from scratch and go through dependencies is an immensively useful feature that I would not trade for having tidier patches. For this package, one could rename the files in Build/Configure when compiling with QUILT without a problem. So, if desired, it could be done neheb's way instead. In my opinion, QUILT is not particularly useful for rebasing large changes, such as the engine patches here. So even if neheb's proposal has a nice intention, it is not appropriate for this package. If the motivation is just to run make package/openssl/{refresh,update}, perhaps automatically to keep patches tidy, then this patch will suffice. Cheers, Eneas [1] https://patchwork.ozlabs.org/project/openwrt/patch/20210326092548.14019-1-ros...@gmail.com/ diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 7ab4c6ccd0..458b064f13 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=openssl PKG_BASE:=1.1.1 PKG_BUGFIX:=k PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_USE_MIPS16:=0 ENGINES_DIR=engines-1.1 diff --git a/package/libs/openssl/patches/100-Configure-afalg-support.patch b/package/libs/openssl/patches/100-Configure-afalg-support.patch index 98944103b5..2ae5938bdc 100644 --- a/package/libs/openssl/patches/100-Configure-afalg-support.patch +++ b/package/libs/openssl/patches/100-Configure-afalg-support.patch @@ -1,4 +1,4 @@ -From 559fbff13af9ce2fbc0b9bc5727a7323e1db6217 Mon Sep 17 00:00:00 2001 +From Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:29:21 -0300 Subject: Do not use host kernel version to disable AFALG @@ -8,11 +8,9 @@ version to disable building the AFALG engine on openwrt targets. Signed-off-by: Eneas U de Queiroz -diff --git a/Configure b/Configure -index 5a699836f3..74d057c219 100755 --- a/Configure +++ b/Configure -@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtrace"}) +@@ -1545,7 +1545,9 @@ unless ($disabled{"crypto-mdebug-backtra unless ($disabled{afalgeng}) { $config{afalgeng}=""; diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch index d0530b4661..50a9ebe2d6 100644 --- a/package/libs/openssl/patches/110-openwrt_targets.patch +++ b/package/libs/openssl/patches/110-openwrt_targets.patch @@ -1,4 +1,4 @@ -From 3d43acc6068f00dbfc0c9a06355e2c8f7d302d0f Mon Sep 17 00:00:00 2001 +From Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:30:24 -0300 Subject: Add openwrt targets @@ -7,9 +7,6 @@ Targets are named: linux-$(CONFIG_ARCH)-openwrt Signed-off-by: Eneas U de Queiroz -diff --git a/Configurations/25-openwrt.conf b/Configurations/25-openwrt.conf -new file mode 100644 -index 00..86a86d31e4 --- /dev/null +++ b/Configurations/25-openwrt.conf @@ -0,0 +1,48 @@ diff --git a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch index 7faec9ab88..90282706d1 100644 --- a/package/libs/openssl/patches/120-strip-cflags-from-binary.patch +++ b/package/libs/openssl/patches/120-strip-cflags-from-binary.patch @@ -1,4 +1,4 @@ -From 4ad8f2fe6bf3b91df7904fcbe960e5fdfca36336 Mon Sep 17 00:00:00 2001 +From Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 27 Sep 2018 08:31:38 -0300 Subject: Avoid exposing build directories @@ -8,11 +8,9 @@ OpenSSL_version(OPENSSL_CFLAGS),