package/ecryptfs-utils: Use echo-dummy gettext script if NLS is not enabled
PATCH 1/1 package/ecryptfs-utils: Use echo-dummy gettext script if NLS is not enabled
From: Vadim Kochan <[email protected]>
gettext is used only as external tool in ecryptfs utils which can easy be replaced by 'echo' if NLS is not required. So changed a bit semantic of Config file - select gettext package only if NLS is enabled, otherwise a dummy-echo script is generated as 'gettext' replacement.
--- package/ecryptfs-utils/Config.in | 2 +- package/ecryptfs-utils/ecryptfs-utils.mk | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
package/ecryptfs-utils/Config.in +1 -1
@@ -12,7 +12,7 @@ config BR2_PACKAGE_ECRYPTFS_UTILS select BR2_PACKAGE_LIBNSS # runtime dependency only, some scripts are using the # 'gettext' program to get translations - select BR2_PACKAGE_GETTEXT + select BR2_PACKAGE_GETTEXT if BR2_SYSTEM_ENABLE_NLS # runtime dependency only select BR2_PACKAGE_GETENT help
package/ecryptfs-utils/ecryptfs-utils.mk +10 -0
@@ -25,4 +25,14 @@ else ECRYPTFS_UTILS_CONF_OPTS += --disable-openssl endif +ifneq ($(BR2_SYSTEM_ENABLE_NLS),y) +define ECRYPTFS_UTILS_GETTEXT_DUMMY_INSTALL + echo '#! /bin/sh' > $(@D)/gettext + echo 'echo $$@' >> $(@D)/gettext + + $(INSTALL) -m 0755 -D $(@D)/gettext $(TARGET_DIR)/usr/bin/gettext +endef +ECRYPTFS_UTILS_POST_INSTALL_TARGET_HOOKS += ECRYPTFS_UTILS_GETTEXT_DUMMY_INSTALL +endif + $(eval $(autotools-package))
Signature · 1 line
2.7.4
PATCH 1/1 package/ecryptfs-utils: Use echo-dummy gettext script if NLS is not enabled
Hello Vadim,
Quoted 31 lines · On Wed, 13 Feb 2019 20:54:15 +0200 Vadim Kochan <[email protected]> wrote:
From: Vadim Kochan <[email protected]>
gettext is used only as external tool in ecryptfs utils which can easy be replaced by 'echo' if NLS is not required. So changed a bit semantic of Config file - select gettext package only if NLS is enabled, otherwise a dummy-echo script is generated as 'gettext' replacement.
Signed-off-by Vadim Kochan <[email protected]>--- package/ecryptfs-utils/Config.in | 2 +- package/ecryptfs-utils/ecryptfs-utils.mk | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)package/ecryptfs-utils/Config.in +1
-1@@ -12,7 +12,7 @@ config BR2_PACKAGE_ECRYPTFS_UTILS select BR2_PACKAGE_LIBNSS # runtime dependency only, some scripts are using the # 'gettext' program to get translations - select BR2_PACKAGE_GETTEXT + select BR2_PACKAGE_GETTEXT if BR2_SYSTEM_ENABLE_NLS # runtime dependency only select BR2_PACKAGE_GETENT helppackage/ecryptfs-utils/ecryptfs-utils.mk +0
-0
package/ecryptfs-utils/ecryptfs-utils.mk else · line 33
Quoted 9 lines
package/ecryptfs-utils/ecryptfs-utils.mk +6
-0@@ -25,4 +25,14 @@ else ECRYPTFS_UTILS_CONF_OPTS += --disable-openssl endif +ifneq ($(BR2_SYSTEM_ENABLE_NLS),y) +define ECRYPTFS_UTILS_GETTEXT_DUMMY_INSTALL + echo '#! /bin/sh' > $(@D)/gettext + echo 'echo $$@' >> $(@D)/gettext + + $(INSTALL) -m 0755 -D $(@D)/gettext $(TARGET_DIR)/usr/bin/gettext
I understand the idea, but I don't think it's good for ecryptfs-utils to install a tool called "gettext". Maybe some gettext-tiny package should provide this dummy target gettext program ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/ecryptfs-utils: Use echo-dummy gettext script if NLS is not enabled
Hi Thomas,
Quoted 39 lines · Thomas Petazzoni
Hello Vadim,
Quoted 34 lines · On Wed, 13 Feb 2019 20:54:15 +0200 Vadim Kochan <[email protected]> wrote:
From: Vadim Kochan <[email protected]>
gettext is used only as external tool in ecryptfs utils which can easy be replaced by 'echo' if NLS is not required. So changed a bit semantic of Config file - select gettext package only if NLS is enabled, otherwise a dummy-echo script is generated as 'gettext' replacement.
Signed-off-by Vadim Kochan <[email protected]>--- package/ecryptfs-utils/Config.in | 2 +- package/ecryptfs-utils/ecryptfs-utils.mk | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)package/ecryptfs-utils/Config.in +1
-1@@ -12,7 +12,7 @@ config BR2_PACKAGE_ECRYPTFS_UTILS select BR2_PACKAGE_LIBNSS # runtime dependency only, some scripts are using the # 'gettext' program to get translations - select BR2_PACKAGE_GETTEXT + select BR2_PACKAGE_GETTEXT if BR2_SYSTEM_ENABLE_NLS # runtime dependency only select BR2_PACKAGE_GETENT helppackage/ecryptfs-utils/ecryptfs-utils.mk +0
-0@@ -25,4 +25,14 @@ else ECRYPTFS_UTILS_CONF_OPTS += --disable-openssl endif
Quoted 11 lines
package/ecryptfs-utils/ecryptfs-utils.mk else · line 33
Quoted 6 lines
package/ecryptfs-utils/ecryptfs-utils.mk +6
-0+ifneq ($(BR2_SYSTEM_ENABLE_NLS),y) +define ECRYPTFS_UTILS_GETTEXT_DUMMY_INSTALL + echo '#! /bin/sh' > $(@D)/gettext + echo 'echo $$@' >> $(@D)/gettext + + $(INSTALL) -m 0755 -D $(@D)/gettext $(TARGET_DIR)/usr/bin/gettextI understand the idea, but I don't think it's good for ecryptfs-utils to install a tool called "gettext". Maybe some gettext-tiny package should provide this dummy target gettext program ?
Yeah, gettext-tiny sounds like a better place for this, in case if gettext-tiny will be not merged then it is better to contribute changes to the ecryptfs-utils project and provide 'gettext' alternative as function, in case the 'gettext' binary does not exist.
Regards,
Vadim Kochan