[PATCH] openssl: don't rename a file with quilt
Rosen Penev
rosenp at gmail.com
Fri Mar 26 23:54:11 GMT 2021
On Fri, Mar 26, 2021 at 2:57 PM Felix Fietkau <nbd at nbd.name> wrote:
>
>
> On 2021-03-26 22:39, Eneas U de Queiroz wrote:
> > On Fri, Mar 26, 2021 at 4:28 PM Rosen Penev <rosenp at gmail.com> wrote:
> >>
> >> On Fri, Mar 26, 2021 at 5:55 AM Eneas U de Queiroz
> >> <cotequeiroz at gmail.com> wrote:
> >> >
> >> > On Fri, Mar 26, 2021 at 6:26 AM Rosen Penev <rosenp at gmail.com> wrote:
> >> > > +ifeq ($(QUILT),)
> >> > > + mv $(PKG_BUILD_DIR)/crypto/engine/eng_devcrypto.c $(PKG_BUILD_DIR)/engines/e_devcrypto.c
> >> > > +endif
> >> >
> >> > This will break compilation with QUILT, as the rename will never
> >> > happen then. You're using this strategy with other packages, so I
> >> > won't mention them individually, but this applies to all.
> >> > I would handle it at the patch level by removing the old file and
> >> > creating the new one.
> >> It doesn't break quilt as the rename happens separately. Note that the
> >> patches were modified to refer to the old name.
> > It breaks 'make package/openssl/compile QUILT=1', because the 'mv'
> > command will never run when QUILT is not empty. You can't run the
> > 'mv' line with quilt because the patches are not applied in
> > Build/Prepare. However, you must ensure it is run later, or the
> > package will not compile with QUILT=1. I can point you to
> > openwrt/packages#14894 to see why you can't just skip running stuff
> > when QUILT is defined.
> I fully agree with Eneas here (though I don't like his patch for this
> issue either). Here's a way to fix this:
>
> include/package-defaults.mk has this:
>
> define Build/Prepare/Default
> $(PKG_UNPACK)
> [ ! -d ./src/ ] || $(CP) ./src/. $(PKG_BUILD_DIR)
> $(Build/Patch)
> endef
>
> You can adjust it to define this in the package Makefile:
>
> define Build/Prepare
> $(PKG_UNPACK)
> [ ! -d ./src/ ] || $(CP) ./src/. $(PKG_BUILD_DIR)
> mv $(PKG_BUILD_DIR)/crypto/engine/eng_devcrypto.c $(PKG_BUILD_DIR)/engines/e_devcrypto.c
> $(Build/Patch)
> endef
https://github.com/openwrt/openwrt/pull/4030 is the full patchset.
Makefile hackery was NAKed so I manually "fixed" the patches.
>
> - Felix
More information about the openwrt-devel
mailing list