* [Buildroot] [PATCH 1/3] mdadm: convert to generic-package
@ 2018-10-14 20:00 Thomas Petazzoni
2018-10-14 20:00 ` [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin Thomas Petazzoni
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-14 20:00 UTC (permalink / raw)
To: buildroot
There is absolutely no reason for mdadm.mk to use autotools-package:
this package does not have any configure script at all, and its
Makefile is not generated using automake.
Therefore, convert it to use the generic-package
infrastructure. Compared to the previous code, we are now using
$(TARGET_CONFIGURE_OPTS), which passes our CPPFLAGS. This overrides
the CPPFLAGS from mdadm's Makefile, so we repeat the only CPPFLAGS
flag passed in the Makefile, -DBINDIR.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/mdadm/mdadm.mk | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk
index 207b0be60d..6efade981d 100644
--- a/package/mdadm/mdadm.mk
+++ b/package/mdadm/mdadm.mk
@@ -10,14 +10,19 @@ MDADM_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/raid/mdadm
MDADM_LICENSE = GPL-2.0+
MDADM_LICENSE_FILES = COPYING
-MDADM_MAKE_OPTS = \
- CFLAGS="$(TARGET_CFLAGS) -DNO_COROSYNC -DNO_DLM" CC="$(TARGET_CC)" CHECK_RUN_DIR=0 -C $(MDADM_DIR) mdadm
-
-MDADM_INSTALL_TARGET_OPTS = \
- DESTDIR=$(TARGET_DIR)/usr -C $(MDADM_DIR) install-mdadm
+define MDADM_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -DNO_COROSYNC -DNO_DLM" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -DBINDIR=\\\"/usr/sbin\\\"" \
+ CHECK_RUN_DIR=0 \
+ mdadm
+endef
-define MDADM_CONFIGURE_CMDS
- # Do nothing
+define MDADM_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
+ DESTDIR=$(TARGET_DIR)/usr \
+ install-mdadm
endef
-$(eval $(autotools-package))
+$(eval $(generic-package))
--
2.14.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin
2018-10-14 20:00 [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Thomas Petazzoni
@ 2018-10-14 20:00 ` Thomas Petazzoni
2018-10-15 5:21 ` Peter Korsgaard
2018-10-14 20:00 ` [Buildroot] [PATCH 3/3] mdadm: also install mdmon Thomas Petazzoni
2018-10-15 5:21 ` [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Peter Korsgaard
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-14 20:00 UTC (permalink / raw)
To: buildroot
The upstream Makefile by default installs to /sbin but we override
that to install it in /usr/sbin. Since mdadm is a pretty core utility
for the boot process, it makes sense to comply with upstream's default
behavior, so we change mdadm.mk to install mdadm in /sbin. This also
removes the somewhat non-standard DESTDIR value.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/mdadm/mdadm.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk
index 6efade981d..bdf77fcd56 100644
--- a/package/mdadm/mdadm.mk
+++ b/package/mdadm/mdadm.mk
@@ -14,14 +14,14 @@ define MDADM_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS) -DNO_COROSYNC -DNO_DLM" \
- CPPFLAGS="$(TARGET_CPPFLAGS) -DBINDIR=\\\"/usr/sbin\\\"" \
+ CPPFLAGS="$(TARGET_CPPFLAGS) -DBINDIR=\\\"/sbin\\\"" \
CHECK_RUN_DIR=0 \
mdadm
endef
define MDADM_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
- DESTDIR=$(TARGET_DIR)/usr \
+ DESTDIR=$(TARGET_DIR) \
install-mdadm
endef
--
2.14.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] mdadm: also install mdmon
2018-10-14 20:00 [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Thomas Petazzoni
2018-10-14 20:00 ` [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin Thomas Petazzoni
@ 2018-10-14 20:00 ` Thomas Petazzoni
2018-10-15 5:21 ` Peter Korsgaard
2018-10-15 5:21 ` [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Peter Korsgaard
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-10-14 20:00 UTC (permalink / raw)
To: buildroot
This commit adjusts the mdadm package to also install the mdmon
utility, which is used to "monitor MD external metadata arrays". It
adds ~250 KB to the installed size:
-rwxr-xr-x 1 thomas thomas 446064 Oct 14 21:55 mdadm
-rwxr-xr-x 1 thomas thomas 244672 Oct 14 21:55 mdmon
Fixes bug #11376.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/mdadm/mdadm.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk
index bdf77fcd56..3ee4ddd059 100644
--- a/package/mdadm/mdadm.mk
+++ b/package/mdadm/mdadm.mk
@@ -16,13 +16,13 @@ define MDADM_BUILD_CMDS
CFLAGS="$(TARGET_CFLAGS) -DNO_COROSYNC -DNO_DLM" \
CPPFLAGS="$(TARGET_CPPFLAGS) -DBINDIR=\\\"/sbin\\\"" \
CHECK_RUN_DIR=0 \
- mdadm
+ mdadm mdmon
endef
define MDADM_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
DESTDIR=$(TARGET_DIR) \
- install-mdadm
+ install-mdadm install-mdmon
endef
$(eval $(generic-package))
--
2.14.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/3] mdadm: convert to generic-package
2018-10-14 20:00 [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Thomas Petazzoni
2018-10-14 20:00 ` [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin Thomas Petazzoni
2018-10-14 20:00 ` [Buildroot] [PATCH 3/3] mdadm: also install mdmon Thomas Petazzoni
@ 2018-10-15 5:21 ` Peter Korsgaard
2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-15 5:21 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> There is absolutely no reason for mdadm.mk to use autotools-package:
> this package does not have any configure script at all, and its
> Makefile is not generated using automake.
> Therefore, convert it to use the generic-package
> infrastructure. Compared to the previous code, we are now using
> $(TARGET_CONFIGURE_OPTS), which passes our CPPFLAGS. This overrides
> the CPPFLAGS from mdadm's Makefile, so we repeat the only CPPFLAGS
> flag passed in the Makefile, -DBINDIR.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3/3] mdadm: also install mdmon
2018-10-14 20:00 ` [Buildroot] [PATCH 3/3] mdadm: also install mdmon Thomas Petazzoni
@ 2018-10-15 5:21 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-15 5:21 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> This commit adjusts the mdadm package to also install the mdmon
> utility, which is used to "monitor MD external metadata arrays". It
> adds ~250 KB to the installed size:
> -rwxr-xr-x 1 thomas thomas 446064 Oct 14 21:55 mdadm
> -rwxr-xr-x 1 thomas thomas 244672 Oct 14 21:55 mdmon
> Fixes bug #11376.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin
2018-10-14 20:00 ` [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin Thomas Petazzoni
@ 2018-10-15 5:21 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2018-10-15 5:21 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> The upstream Makefile by default installs to /sbin but we override
> that to install it in /usr/sbin. Since mdadm is a pretty core utility
> for the boot process, it makes sense to comply with upstream's default
> behavior, so we change mdadm.mk to install mdadm in /sbin. This also
> removes the somewhat non-standard DESTDIR value.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-15 5:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-14 20:00 [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Thomas Petazzoni
2018-10-14 20:00 ` [Buildroot] [PATCH 2/3] mdadm: move from /usr/sbin to /sbin Thomas Petazzoni
2018-10-15 5:21 ` Peter Korsgaard
2018-10-14 20:00 ` [Buildroot] [PATCH 3/3] mdadm: also install mdmon Thomas Petazzoni
2018-10-15 5:21 ` Peter Korsgaard
2018-10-15 5:21 ` [Buildroot] [PATCH 1/3] mdadm: convert to generic-package Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.