[PATCH] openssl: don't rename a file with quilt

Eneas U de Queiroz cotequeiroz at gmail.com
Fri Mar 26 21:39:27 GMT 2021


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.
> >
> > Alternatively, you can keep your strategy, adding the rename with
> > QUILT in Build/Configure, with the caveat that it will run every time
> > compile is called, so you'll need to ignore an eventual error, and
> > make sure that the original file was not recreated somewhere in the
> > build process by a previous compile run, which would clobber the
> > patched file.
> I haven't seen any issues. Locally I run make package/x/{clean,refresh}
make package/openssl/compile V=sc  QUILT=1
...
make[4]: *** No rule to make target 'engines/e_devcrypto.c', needed by
'engines/e_devcrypto.o'.  Stop.

BTW, I imagine you don't build with QUILT=1 much, do you?

make -j4 package/openssl/compile
make[2]: Entering directory '/home/equeiroz/src/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/equeiroz/src/openwrt/scripts/config'
 make[1] package/openssl/compile
 make[2] -C package/libs/toolchain compile
 make[2] -C package/libs/zlib compile
 make[2] -C package/firmware/prism54-firmware compile
 make[2] -C package/firmware/linux-firmware compile
 make[2] -C package/kernel/linux compile
 make[2] -C package/kernel/cryptodev-linux compile
 make[2] -C package/libs/openssl compile

make -j4 package/openssl/compile QUILT=1
make[2]: Entering directory '/home/equeiroz/src/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/equeiroz/src/openwrt/scripts/config'
 make[1] package/openssl/compile
 make[2] -C package/libs/openssl compile

It does not check dependencies every time you call compile.  Try make
package/seafile-server/compile for some fun.

Cheers,

Eneas



More information about the openwrt-devel mailing list