* [Buildroot] [PATCH 0/3] Make exim more configurable
@ 2014-07-04 15:56 Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 1/3] exim: allow using a custom configuration file Luca Ceresoli
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-04 15:56 UTC (permalink / raw)
To: buildroot
Hi,
this small patch series makes the exim mail transfer agent more configurable
at build time.
Exim does not use a framework such as the autotools or CMake for its
build-time configuration. Instead it requires to provide a Makefile
(./Local/Makefile) with variables set appropriately. This Makefile is then
included by the main Makefile.
These patches allow to use a custom configuration Makefile provided by the
user and to tweak (in the Buildroot config) the user that will run the exim
processes.
Luca
Luca Ceresoli (3):
exim: allow using a custom configuration file
exim: make EXIM_USER configurable
exim: generate the user with automatic uid
package/exim/Config.in | 34 ++++++++++++++++++++++++++++++++++
package/exim/exim.mk | 28 ++++++++++++++++++++++++++--
2 files changed, 60 insertions(+), 2 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 1/3] exim: allow using a custom configuration file
2014-07-04 15:56 [Buildroot] [PATCH 0/3] Make exim more configurable Luca Ceresoli
@ 2014-07-04 15:56 ` Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 2/3] exim: make EXIM_USER configurable Luca Ceresoli
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-04 15:56 UTC (permalink / raw)
To: buildroot
exim has lots of options configurable before the build process. It's not
useful to have all of them exposed in Buildroot, yet users may need to tweak
them.
Allow the user to pass an entire configuration file to make exim totally
reconfigurable without bloating the Buildroot menus.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/exim/Config.in | 25 +++++++++++++++++++++++++
package/exim/exim.mk | 25 ++++++++++++++++++++++++-
2 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/package/exim/Config.in b/package/exim/Config.in
index a71106b..fb41ccb 100644
--- a/package/exim/Config.in
+++ b/package/exim/Config.in
@@ -8,3 +8,28 @@ config BR2_PACKAGE_EXIM
Cambridge for use on Unix systems connected to the Internet.
http://www.exim.org/
+
+if BR2_PACKAGE_EXIM
+
+config BR2_PACKAGE_EXIM_CUSTOM_CONFIG
+ bool "Use a custom configuration file for exim"
+ help
+ By default Buildroot generates configuration file for exim with
+ reasonable settings.
+ Enable this option if you want to override the configuration file
+ generated by Buildroot with a customized file. Then set the path
+ to your configuration file in BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE.
+
+config BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE
+ string "Custom configuration file for exim"
+ depends on BR2_PACKAGE_EXIM_CUSTOM_CONFIG
+ help
+ Specify a file to use as the exim configuration file.
+
+ This file shall comply with the syntax defined in the exim
+ documentation (http://www.exim.org/docs.html).
+ Buildroot will generate a configuration file composed of the
+ content of the file you provide plus the toolchain-related
+ settings needed for cross-compilation.
+
+endif
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 0f9c6af..2e51a0d 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -30,7 +30,12 @@ define exim-config-add # variable-name, variable-value
echo "$1=$2" >>$(@D)/Local/Makefile
endef
-define EXIM_CONFIGURE_CMDS
+define EXIM_USE_CUSTOM_CONFIG_FILE
+ $(INSTALL) -m 0644 $(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE) \
+ $(@D)/Local/Makefile
+endef
+
+define EXIM_USE_DEFAULT_CONFIG_FILE
$(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile
$(call exim-config-change,BIN_DIRECTORY,/usr/sbin)
$(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure)
@@ -41,6 +46,9 @@ define EXIM_CONFIGURE_CMDS
$(call exim-config-change,PCRE_CONFIG,no)
$(call exim-config-change,HAVE_ICONV,no)
$(call exim-config-unset,EXIM_MONITOR)
+endef
+
+define EXIM_CONFIGURE_TOOLCHAIN
$(call exim-config-add,CC,$(TARGET_CC))
$(call exim-config-add,CFLAGS,$(TARGET_CFLAGS))
$(call exim-config-add,AR,$(TARGET_AR) cq)
@@ -49,6 +57,21 @@ define EXIM_CONFIGURE_CMDS
$(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS))
endef
+ifeq ($(BR2_PACKAGE_EXIM_CUSTOM_CONFIG),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE)),)
+$(error No exim configuration file specified, check your BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE setting)
+endif
+define EXIM_CONFIGURE_CMDS
+ $(EXIM_USE_CUSTOM_CONFIG_FILE)
+ $(EXIM_CONFIGURE_TOOLCHAIN)
+endef
+else # CUSTOM_CONFIG
+define EXIM_CONFIGURE_CMDS
+ $(EXIM_USE_DEFAULT_CONFIG_FILE)
+ $(EXIM_CONFIGURE_TOOLCHAIN)
+endef
+endif # CUSTOM_CONFIG
+
# exim needs a bit of love to build statically
ifeq ($(BR2_PREFER_STATIC_LIB),y)
EXIM_STATIC_FLAGS = LFLAGS="-pthread --static"
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 2/3] exim: make EXIM_USER configurable
2014-07-04 15:56 [Buildroot] [PATCH 0/3] Make exim more configurable Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 1/3] exim: allow using a custom configuration file Luca Ceresoli
@ 2014-07-04 15:56 ` Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 3/3] exim: generate the user with automatic uid Luca Ceresoli
2014-07-15 19:31 ` [Buildroot] [PATCH 0/3] Make exim more configurable Thomas Petazzoni
3 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-04 15:56 UTC (permalink / raw)
To: buildroot
The user that executes normal exim processes is configurable at configure
time and gets hardcoded in the exim binaries. It may be changed using a
custom configuration file, but this is not enough because the user may also
need to be created in /etc/passwd.
Make the user name a configurable kconfig variable, so the same name can be
user to configure the exim build process and to create the user.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/exim/Config.in | 9 +++++++++
package/exim/exim.mk | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/package/exim/Config.in b/package/exim/Config.in
index fb41ccb..e2ed6c4 100644
--- a/package/exim/Config.in
+++ b/package/exim/Config.in
@@ -11,6 +11,15 @@ config BR2_PACKAGE_EXIM
if BR2_PACKAGE_EXIM
+config BR2_PACKAGE_EXIM_USER
+ string "Exim user name"
+ default "exim"
+ help
+ The user and group that is used for Exim processes when they no
+ longer need to be root.
+ A user with this name is created by Buildroot in /etc/passwd in
+ the "mail" group.
+
config BR2_PACKAGE_EXIM_CUSTOM_CONFIG
bool "Use a custom configuration file for exim"
help
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 2e51a0d..163861b 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -33,6 +33,7 @@ endef
define EXIM_USE_CUSTOM_CONFIG_FILE
$(INSTALL) -m 0644 $(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE) \
$(@D)/Local/Makefile
+ $(call exim-config-change,EXIM_USER,ref:$(call qstrip,$(BR2_PACKAGE_EXIM_USER)))
endef
define EXIM_USE_DEFAULT_CONFIG_FILE
@@ -92,7 +93,7 @@ define EXIM_INSTALL_TARGET_CMDS
endef
define EXIM_USERS
-exim 88 mail 8 * - - - exim
+$(call qstrip,$(BR2_PACKAGE_EXIM_USER)) 88 mail 8 * - - - exim
endef
define EXIM_INSTALL_INIT_SYSV
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 3/3] exim: generate the user with automatic uid
2014-07-04 15:56 [Buildroot] [PATCH 0/3] Make exim more configurable Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 1/3] exim: allow using a custom configuration file Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 2/3] exim: make EXIM_USER configurable Luca Ceresoli
@ 2014-07-04 15:56 ` Luca Ceresoli
2014-07-15 19:31 ` [Buildroot] [PATCH 0/3] Make exim more configurable Thomas Petazzoni
3 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-04 15:56 UTC (permalink / raw)
To: buildroot
Now that the exim username is configurable it is more likely that
other packages generate a conflicting user. Switch to automatic uid
generation to avoid any problem.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/exim/exim.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/exim/exim.mk b/package/exim/exim.mk
index 163861b..18745ac 100644
--- a/package/exim/exim.mk
+++ b/package/exim/exim.mk
@@ -93,7 +93,7 @@ define EXIM_INSTALL_TARGET_CMDS
endef
define EXIM_USERS
-$(call qstrip,$(BR2_PACKAGE_EXIM_USER)) 88 mail 8 * - - - exim
+$(call qstrip,$(BR2_PACKAGE_EXIM_USER)) -1 mail 8 * - - - exim
endef
define EXIM_INSTALL_INIT_SYSV
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-04 15:56 [Buildroot] [PATCH 0/3] Make exim more configurable Luca Ceresoli
` (2 preceding siblings ...)
2014-07-04 15:56 ` [Buildroot] [PATCH 3/3] exim: generate the user with automatic uid Luca Ceresoli
@ 2014-07-15 19:31 ` Thomas Petazzoni
2014-07-16 8:18 ` Luca Ceresoli
2014-07-16 8:24 ` Thomas Petazzoni
3 siblings, 2 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2014-07-15 19:31 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Fri, 4 Jul 2014 17:56:23 +0200, Luca Ceresoli wrote:
> Hi,
>
> this small patch series makes the exim mail transfer agent more configurable
> at build time.
>
> Exim does not use a framework such as the autotools or CMake for its
> build-time configuration. Instead it requires to provide a Makefile
> (./Local/Makefile) with variables set appropriately. This Makefile is then
> included by the main Makefile.
>
> These patches allow to use a custom configuration Makefile provided by the
> user and to tweak (in the Buildroot config) the user that will run the exim
> processes.
>
> Luca
>
> Luca Ceresoli (3):
> exim: allow using a custom configuration file
Thanks, I've applied this patch.
> exim: make EXIM_USER configurable
> exim: generate the user with automatic uid
However, I've for now rejected those two patches. The reason is that I
don't think we should add an option to customize the user with which
each and every daemon is started. Buildroot should use a sane default
option, and for additional configuration, leave it to the Buildroot
user to use BR2_ROOTFS_USERS_TABLES to create any additional/custom
user that may be needed.
If you don't agree with this decision, let us know and resubmit patches
with more details on why an exim specific mechanism is needed here.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-15 19:31 ` [Buildroot] [PATCH 0/3] Make exim more configurable Thomas Petazzoni
@ 2014-07-16 8:18 ` Luca Ceresoli
2014-07-16 8:29 ` Thomas Petazzoni
2014-07-16 8:24 ` Thomas Petazzoni
1 sibling, 1 reply; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-16 8:18 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Fri, 4 Jul 2014 17:56:23 +0200, Luca Ceresoli wrote:
>> Hi,
>>
>> this small patch series makes the exim mail transfer agent more configurable
>> at build time.
>>
>> Exim does not use a framework such as the autotools or CMake for its
>> build-time configuration. Instead it requires to provide a Makefile
>> (./Local/Makefile) with variables set appropriately. This Makefile is then
>> included by the main Makefile.
>>
>> These patches allow to use a custom configuration Makefile provided by the
>> user and to tweak (in the Buildroot config) the user that will run the exim
>> processes.
>>
>> Luca
>>
>> Luca Ceresoli (3):
>> exim: allow using a custom configuration file
>
> Thanks, I've applied this patch.
>
>> exim: make EXIM_USER configurable
>> exim: generate the user with automatic uid
>
> However, I've for now rejected those two patches. The reason is that I
> don't think we should add an option to customize the user with which
> each and every daemon is started. Buildroot should use a sane default
> option, and for additional configuration, leave it to the Buildroot
> user to use BR2_ROOTFS_USERS_TABLES to create any additional/custom
> user that may be needed.
I generally agree with you.
The problem with exim is that it does not allow to configure its user
from a runtime configuration file, because it's hard-coded in the
binary. The only way to select a user is to change the build-time
configuration.
So, it's true that one can easily create a new user for exim using
BR2_ROOTFS_USERS_TABLES. But currently the only way to tell exim to use
that user is to supply an entire config file (which is possible thanks
to patch 1 that you've just applied). This would bring out of sync from
changes in the config file coming from upstream (exim as well as
Buildroot).
Patch 2 allows one to keep the Buildroot-provided configuration file,
and Buildroot would take care of tweaking the one line needed to
actually use the new username.
I hope this clarifies the use case.
Bye,
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-15 19:31 ` [Buildroot] [PATCH 0/3] Make exim more configurable Thomas Petazzoni
2014-07-16 8:18 ` Luca Ceresoli
@ 2014-07-16 8:24 ` Thomas Petazzoni
2014-07-16 8:50 ` Luca Ceresoli
1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 8:24 UTC (permalink / raw)
To: buildroot
Luca,
On Tue, 15 Jul 2014 21:31:25 +0200, Thomas Petazzoni wrote:
> > Luca Ceresoli (3):
> > exim: allow using a custom configuration file
>
> Thanks, I've applied this patch.
This patch is causing build issues:
http://autobuild.buildroot.org/results/0db/0db54c555f6c7e635ebf99f86b3f91dc31e441f0/build-end.log.
This happens when randpackageconfig decides to:
BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y
But of course:
BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE=""
Options:
1/ Have a default value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE that
actually works.
2/ Let me know a proper value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE
that the autobuilder scripts would inject into the configuration
when BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y. This requires changing the
autobuilder scripts, and I've no control over the autobuilder
executed by Peter.
3/ Exclude configuration that have BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y in
the autobuilder script. This also requires changing the autobuilder
scripts, with the same drawback as above: there's nothing I can do
for Peter's autobuilder machines.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 8:18 ` Luca Ceresoli
@ 2014-07-16 8:29 ` Thomas Petazzoni
2014-07-16 9:03 ` Luca Ceresoli
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 8:29 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Wed, 16 Jul 2014 10:18:14 +0200, Luca Ceresoli wrote:
> > However, I've for now rejected those two patches. The reason is that I
> > don't think we should add an option to customize the user with which
> > each and every daemon is started. Buildroot should use a sane default
> > option, and for additional configuration, leave it to the Buildroot
> > user to use BR2_ROOTFS_USERS_TABLES to create any additional/custom
> > user that may be needed.
>
> I generally agree with you.
>
> The problem with exim is that it does not allow to configure its user
> from a runtime configuration file, because it's hard-coded in the
> binary. The only way to select a user is to change the build-time
> configuration.
>
> So, it's true that one can easily create a new user for exim using
> BR2_ROOTFS_USERS_TABLES. But currently the only way to tell exim to use
> that user is to supply an entire config file (which is possible thanks
> to patch 1 that you've just applied). This would bring out of sync from
> changes in the config file coming from upstream (exim as well as
> Buildroot).
>
> Patch 2 allows one to keep the Buildroot-provided configuration file,
> and Buildroot would take care of tweaking the one line needed to
> actually use the new username.
Well, I think we generally support two cases in Buildroot:
1) A basic, default, sane configuration. This is what already existed
prior to your patch series, where exim uses a dedicated user
created by the exim package.
2) A way of providing a custom configuration, which is possible thanks
to the BR2_ROOTFS_USERS_TABLES plus the possibility of providing a
custom Exim configuration file.
Of course, it means than if all you want is to change the user with
which Exim is running, you have to go with option (2), even if for all
other options you need to keep the exact same options as the ones
normally used with option (1).
But it's exactly the same as with the kernel: if you can use a
defconfig, it's easy and simple. If you need to use a defconfig + one
more option, then you have no other choice than switching to using your
own kernel configuration file. We won't add Config.in options for each
and every kernel options.
And therefore I don't think we should add Config.in options for each
and every exim configuration option. You might be interested by
changing the user, but the next user will be interested in changing
this other knob, and so on and so on. We clearly don't want to go down
that road, and instead we want to go for option (2) by providing a
general customization solution, which allows to solve the problem, even
if it requires a little bit of effort if your customization is only
related to one or two differences compared to the basic Buildroot
configuration.
Of course, others are very welcome to enter this discussion and give
their opinion.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 8:24 ` Thomas Petazzoni
@ 2014-07-16 8:50 ` Luca Ceresoli
2014-07-16 9:03 ` Thomas Petazzoni
2014-07-16 22:47 ` Arnout Vandecappelle
0 siblings, 2 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-16 8:50 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Thomas Petazzoni wrote:
> Luca,
>
> On Tue, 15 Jul 2014 21:31:25 +0200, Thomas Petazzoni wrote:
>
>>> Luca Ceresoli (3):
>>> exim: allow using a custom configuration file
>>
>> Thanks, I've applied this patch.
>
> This patch is causing build issues:
> http://autobuild.buildroot.org/results/0db/0db54c555f6c7e635ebf99f86b3f91dc31e441f0/build-end.log.
> This happens when randpackageconfig decides to:
>
> BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y
>
> But of course:
>
> BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE=""
Argh! :(
How do the autobuilders handle the same situation for the Linux or
Barebox custom configuration files? E.g.:
# BR2_LINUX_KERNEL_USE_DEFCONFIG is not set
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=""
This would fail in the same way. Obvious enough, since for exim I just
copied the same checks...
Do the autobuilders have a special handling for the kernel and
bootloaders? If that's the case, of course it would not be viable to do
it for each and every package.
>
> Options:
>
> 1/ Have a default value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE that
> actually works.
That would be quite simple. Enough to run a build with
BR2_PACKAGE_EXIM_CUSTOM_CONFIG disabled, pick the config file from
the build dir, remove the toolchain additions and put the file in
packace/exim/default-config.
I can do that, or we can go for option 4 below.
>
> 2/ Let me know a proper value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE
> that the autobuilder scripts would inject into the configuration
> when BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y. This requires changing the
> autobuilder scripts, and I've no control over the autobuilder
> executed by Peter.
>
> 3/ Exclude configuration that have BR2_PACKAGE_EXIM_CUSTOM_CONFIG=y in
> the autobuilder script. This also requires changing the autobuilder
> scripts, with the same drawback as above: there's nothing I can do
> for Peter's autobuilder machines.
I agree options 2 and 3 would be more annoying.
Another option is:
4/ Remove BR2_PACKAGE_EXIM_CUSTOM_CONFIG knob and make exim use the
custom configuration only if
BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE != "". I assume the
autobuilders never set BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE, do
they?
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 8:50 ` Luca Ceresoli
@ 2014-07-16 9:03 ` Thomas Petazzoni
2014-07-16 16:15 ` Luca Ceresoli
2014-07-16 22:47 ` Arnout Vandecappelle
1 sibling, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2014-07-16 9:03 UTC (permalink / raw)
To: buildroot
Dear Luca Ceresoli,
On Wed, 16 Jul 2014 10:50:30 +0200, Luca Ceresoli wrote:
> How do the autobuilders handle the same situation for the Linux or
> Barebox custom configuration files? E.g.:
>
> # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set
> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=""
>
> This would fail in the same way. Obvious enough, since for exim I just
> copied the same checks...
>
> Do the autobuilders have a special handling for the kernel and
> bootloaders? If that's the case, of course it would not be viable to do
> it for each and every package.
Since the Linux kernel and bootloader options do not start with
BR2_PACKAGE_* they are not part of the randpackageconfig randomization,
and therefore the autobuilders never build the Linux kernel or the
bootloaders.
We however have a similar situation with other packages, in which case
the autobuilder script comes to help, see for example
http://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run#n244.
> > Options:
> >
> > 1/ Have a default value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE that
> > actually works.
>
> That would be quite simple. Enough to run a build with
> BR2_PACKAGE_EXIM_CUSTOM_CONFIG disabled, pick the config file from
> the build dir, remove the toolchain additions and put the file in
> packace/exim/default-config.
That is one solution.
> I agree options 2 and 3 would be more annoying.
They are possible, we do this for other packages already.
> Another option is:
>
> 4/ Remove BR2_PACKAGE_EXIM_CUSTOM_CONFIG knob and make exim use the
> custom configuration only if
> BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE != "". I assume the
> autobuilders never set BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE, do
> they?
Indeed, randpackageconfig only takes care of boolean or tristate
options, so BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE would remain empty in
terms of autobuilder testing.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 8:29 ` Thomas Petazzoni
@ 2014-07-16 9:03 ` Luca Ceresoli
2014-07-16 17:14 ` Yann E. MORIN
0 siblings, 1 reply; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-16 9:03 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Wed, 16 Jul 2014 10:18:14 +0200, Luca Ceresoli wrote:
>
>>> However, I've for now rejected those two patches. The reason is that I
>>> don't think we should add an option to customize the user with which
>>> each and every daemon is started. Buildroot should use a sane default
>>> option, and for additional configuration, leave it to the Buildroot
>>> user to use BR2_ROOTFS_USERS_TABLES to create any additional/custom
>>> user that may be needed.
>>
>> I generally agree with you.
>>
>> The problem with exim is that it does not allow to configure its user
>> from a runtime configuration file, because it's hard-coded in the
>> binary. The only way to select a user is to change the build-time
>> configuration.
>>
>> So, it's true that one can easily create a new user for exim using
>> BR2_ROOTFS_USERS_TABLES. But currently the only way to tell exim to use
>> that user is to supply an entire config file (which is possible thanks
>> to patch 1 that you've just applied). This would bring out of sync from
>> changes in the config file coming from upstream (exim as well as
>> Buildroot).
>>
>> Patch 2 allows one to keep the Buildroot-provided configuration file,
>> and Buildroot would take care of tweaking the one line needed to
>> actually use the new username.
>
> Well, I think we generally support two cases in Buildroot:
>
> 1) A basic, default, sane configuration. This is what already existed
> prior to your patch series, where exim uses a dedicated user
> created by the exim package.
>
> 2) A way of providing a custom configuration, which is possible thanks
> to the BR2_ROOTFS_USERS_TABLES plus the possibility of providing a
> custom Exim configuration file.
>
> Of course, it means than if all you want is to change the user with
> which Exim is running, you have to go with option (2), even if for all
> other options you need to keep the exact same options as the ones
> normally used with option (1).
>
> But it's exactly the same as with the kernel: if you can use a
> defconfig, it's easy and simple. If you need to use a defconfig + one
> more option, then you have no other choice than switching to using your
> own kernel configuration file. We won't add Config.in options for each
> and every kernel options.
>
> And therefore I don't think we should add Config.in options for each
> and every exim configuration option. You might be interested by
> changing the user, but the next user will be interested in changing
> this other knob, and so on and so on. We clearly don't want to go down
> that road, and instead we want to go for option (2) by providing a
> general customization solution, which allows to solve the problem, even
> if it requires a little bit of effort if your customization is only
> related to one or two differences compared to the basic Buildroot
> configuration.
Well, yes, that's true... I'm probably biased by the fact that
configuring exim is so uncomfortable, but that's no excuse I guess. :)
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 9:03 ` Thomas Petazzoni
@ 2014-07-16 16:15 ` Luca Ceresoli
0 siblings, 0 replies; 14+ messages in thread
From: Luca Ceresoli @ 2014-07-16 16:15 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Wed, 16 Jul 2014 10:50:30 +0200, Luca Ceresoli wrote:
>
>> How do the autobuilders handle the same situation for the Linux or
>> Barebox custom configuration files? E.g.:
>>
>> # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set
>> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
>> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=""
>>
>> This would fail in the same way. Obvious enough, since for exim I just
>> copied the same checks...
>>
>> Do the autobuilders have a special handling for the kernel and
>> bootloaders? If that's the case, of course it would not be viable to do
>> it for each and every package.
>
> Since the Linux kernel and bootloader options do not start with
> BR2_PACKAGE_* they are not part of the randpackageconfig randomization,
> and therefore the autobuilders never build the Linux kernel or the
> bootloaders.
>
> We however have a similar situation with other packages, in which case
> the autobuilder script comes to help, see for example
> http://git.buildroot.net/buildroot-test/tree/scripts/autobuild-run#n244.
>
>>> Options:
>>>
>>> 1/ Have a default value for BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE that
>>> actually works.
>>
>> That would be quite simple. Enough to run a build with
>> BR2_PACKAGE_EXIM_CUSTOM_CONFIG disabled, pick the config file from
>> the build dir, remove the toolchain additions and put the file in
>> packace/exim/default-config.
>
> That is one solution.
>
>> I agree options 2 and 3 would be more annoying.
>
> They are possible, we do this for other packages already.
>
>> Another option is:
>>
>> 4/ Remove BR2_PACKAGE_EXIM_CUSTOM_CONFIG knob and make exim use the
>> custom configuration only if
>> BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE != "". I assume the
>> autobuilders never set BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE, do
>> they?
>
> Indeed, randpackageconfig only takes care of boolean or tristate
> options, so BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE would remain empty in
> terms of autobuilder testing.
I'm ok with all options except option 2 which seems the most complex:
both add a config file and modify the autobuilders.
However I slightly prefer option 4, which is the one involving less
code. Indeed it removes lines!
So I just sent a patch doing that:
http://patchwork.ozlabs.org/patch/370792/
If discussion leads to another choice, I'll cook another patch.
--
Luca
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 9:03 ` Luca Ceresoli
@ 2014-07-16 17:14 ` Yann E. MORIN
0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-07-16 17:14 UTC (permalink / raw)
To: buildroot
Luca, All,
On 2014-07-16 11:03 +0200, Luca Ceresoli spake thusly:
[--SNIP--]
> Well, yes, that's true... I'm probably biased by the fact that
> configuring exim is so uncomfortable, but that's no excuse I guess. :)
Why do you even need to _customise_ the exim username in the first place?
Can't we just call that user 'exim' once and for all?
We alredy have a 'mail' user. Can't we just use that?
I fail to see how the _name_ of the user has any impact. If the exim's
default username is not what we use, then we should either use exim's
default or, if we do not like the default username and prefer the one we
have inBuildroot, change exim's username to match what we use.
So, what is the point of customising the _username_. All that matters
when dealing with file access are the UID and GID. The username is just
a convenience string, which sole purpose is to be nice to us mere
humans... ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 0/3] Make exim more configurable
2014-07-16 8:50 ` Luca Ceresoli
2014-07-16 9:03 ` Thomas Petazzoni
@ 2014-07-16 22:47 ` Arnout Vandecappelle
1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2014-07-16 22:47 UTC (permalink / raw)
To: buildroot
On 16/07/14 10:50, Luca Ceresoli wrote:
> Another option is:
>
> 4/ Remove BR2_PACKAGE_EXIM_CUSTOM_CONFIG knob and make exim use the
> custom configuration only if
> BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE != "". I assume the
> autobuilders never set BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE, do
> they?
That's the approach I prefer in general, as I also mentioned in a different thread.
Perhaps we should standardize on this approach for new patches?
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-07-16 22:47 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 15:56 [Buildroot] [PATCH 0/3] Make exim more configurable Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 1/3] exim: allow using a custom configuration file Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 2/3] exim: make EXIM_USER configurable Luca Ceresoli
2014-07-04 15:56 ` [Buildroot] [PATCH 3/3] exim: generate the user with automatic uid Luca Ceresoli
2014-07-15 19:31 ` [Buildroot] [PATCH 0/3] Make exim more configurable Thomas Petazzoni
2014-07-16 8:18 ` Luca Ceresoli
2014-07-16 8:29 ` Thomas Petazzoni
2014-07-16 9:03 ` Luca Ceresoli
2014-07-16 17:14 ` Yann E. MORIN
2014-07-16 8:24 ` Thomas Petazzoni
2014-07-16 8:50 ` Luca Ceresoli
2014-07-16 9:03 ` Thomas Petazzoni
2014-07-16 16:15 ` Luca Ceresoli
2014-07-16 22:47 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox