Message ID | mailman.36507.1556220220.2376.openwrt-devel@lists.openwrt.org |
---|---|
State | Accepted |
Headers | show |
Series | [OpenWrt-Devel] openssl: build kmods only if engines are selected | expand |
On Thu, Apr 25, 2019 at 12:23 PM Eneas U de Queiroz via openwrt-devel <openwrt-devel@lists.openwrt.org> wrote: > > The sender domain has a DMARC Reject/Quarantine policy which disallows > sending mailing list messages using the original "From" header. > > To mitigate this problem, the original message has been wrapped > automatically by the mailing list software. > > > ---------- Forwarded message ---------- > From: Eneas U de Queiroz <cote2004-github@yahoo.com> > To: openwrt-devel@lists.openwrt.org > Cc: Eneas U de Queiroz <cote2004-github@yahoo.com> > Bcc: > Date: Thu, 25 Apr 2019 16:23:27 -0300 > Subject: [PATCH] openssl: build kmods only if engines are selected > Add a conditional to the individual package's for the kmods in DEPENDS. > This avoids the need to compile the kernel modules when the crypto > engine packages are not selected. The final binares are not affected by > this. > > Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> Tested-by: Rosen Penev <rosenp@gmail.com> Tested a few different configurations. No issues found. > --- > This trick takes, for example, $(curdir)/kernel/cryptodev-linux/compile > from the $(curdir)/kernel/cryptodev-linux/compile+= line in > tmp/.packagedeps, and changes it to: > $(if $(CONFIG_PACKAGE_libopenssl-devcrypto),$(curdir)/kernel/cryptodev-linux/compile) > so it will only build kmod-cryptodev (from the cryptodev-linux package) > if the devcrypto engine is actually selected. > The conditionals in tmp/.config-package.in are optimized out, so it does > not change that file, and it will not result in recursive dependencies. > > diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile > index 6f0b0aac5b..b16bf9854f 100644 > --- a/package/libs/openssl/Makefile > +++ b/package/libs/openssl/Makefile > @@ -139,8 +139,8 @@ define Package/libopenssl-afalg > $(call Package/openssl/Default) > SUBMENU:=SSL > TITLE:=AFALG hardware acceleration engine > - DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO @!LINUX_3_18 +kmod-crypto-user \ > - +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN > + DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO @!LINUX_3_18 \ > + +PACKAGE_libopenssl-afalg:kmod-crypto-user +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN > endef > > define Package/libopenssl-afalg/description > @@ -156,7 +156,7 @@ define Package/libopenssl-devcrypto > $(call Package/openssl/Default) > SUBMENU:=SSL > TITLE:=/dev/crypto hardware acceleration engine > - DEPENDS:=libopenssl @OPENSSL_ENGINE +kmod-cryptodev +libopenssl-conf \ > + DEPENDS:=libopenssl @OPENSSL_ENGINE +PACKAGE_libopenssl-devcrypto:kmod-cryptodev +libopenssl-conf \ > @!OPENSSL_ENGINE_BUILTIN > endef > > @@ -173,7 +173,7 @@ define Package/libopenssl-padlock > $(call Package/openssl/Default) > SUBMENU:=SSL > TITLE:=VIA Padlock hardware acceleration engine > - DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +kmod-crypto-hw-padlock \ > + DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \ > +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN > endef > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 6f0b0aac5b..b16bf9854f 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -139,8 +139,8 @@ define Package/libopenssl-afalg $(call Package/openssl/Default) SUBMENU:=SSL TITLE:=AFALG hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO @!LINUX_3_18 +kmod-crypto-user \ - +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN + DEPENDS:=libopenssl @OPENSSL_ENGINE @KERNEL_AIO @!LINUX_3_18 \ + +PACKAGE_libopenssl-afalg:kmod-crypto-user +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN endef define Package/libopenssl-afalg/description @@ -156,7 +156,7 @@ define Package/libopenssl-devcrypto $(call Package/openssl/Default) SUBMENU:=SSL TITLE:=/dev/crypto hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE +kmod-cryptodev +libopenssl-conf \ + DEPENDS:=libopenssl @OPENSSL_ENGINE +PACKAGE_libopenssl-devcrypto:kmod-cryptodev +libopenssl-conf \ @!OPENSSL_ENGINE_BUILTIN endef @@ -173,7 +173,7 @@ define Package/libopenssl-padlock $(call Package/openssl/Default) SUBMENU:=SSL TITLE:=VIA Padlock hardware acceleration engine - DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +kmod-crypto-hw-padlock \ + DEPENDS:=libopenssl @OPENSSL_ENGINE @TARGET_x86 +PACKAGE_libopenssl-padlock:kmod-crypto-hw-padlock \ +libopenssl-conf @!OPENSSL_ENGINE_BUILTIN endef
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. Add a conditional to the individual package's for the kmods in DEPENDS. This avoids the need to compile the kernel modules when the crypto engine packages are not selected. The final binares are not affected by this. Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com> --- This trick takes, for example, $(curdir)/kernel/cryptodev-linux/compile from the $(curdir)/kernel/cryptodev-linux/compile+= line in tmp/.packagedeps, and changes it to: $(if $(CONFIG_PACKAGE_libopenssl-devcrypto),$(curdir)/kernel/cryptodev-linux/compile) so it will only build kmod-cryptodev (from the cryptodev-linux package) if the devcrypto engine is actually selected. The conditionals in tmp/.config-package.in are optimized out, so it does not change that file, and it will not result in recursive dependencies.