Pull request for branch yem/host-packages
From: "Yann E. MORIN" <[email protected]>
Hello All!
This series adds parted as a host package. This will allow (eg.) post-image scripts to use parted.
Regards,
Yann E. MORIN.
The following changes since commit edce303b8da95a9b19939ab7a4199a39c0483c6f:
libtasn1: fix botched makeinfo/missing logic (2013-12-02 13:33:02 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem/host-packages
for you to fetch changes up to 1891fdbc7ad11ce084f2be315871eb10573953b7:
package/parted: add a host variant (2013-12-02 23:27:45 +0100)
----------------------------------------------------------------
Yann E. MORIN (3):
package/lvm2: remove uninstall commands
package/lvm2: add a host variant
package/parted: add a host variant
package/Config.in.host | 1 + package/lvm2/lvm2.mk | 13 ++++--------- package/parted/Config.in.host | 6 ++++++ package/parted/parted.mk | 4 ++++ 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 package/parted/Config.in.host
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 package/lvm2: remove uninstall commands
From: "Yann E. MORIN" <[email protected]>
We do not properly support uninstalling packages, so just remove the uninstall commands.
--- package/lvm2/lvm2.mk | 10 ---------- 1 file changed, 10 deletions(-)
package/lvm2/lvm2.mk +0 -10
@@ -50,14 +50,4 @@ else LVM2_CONF_OPT += --disable-applib endif -define LVM2_UNINSTALL_STAGING_CMDS - rm -f $(addprefix $(STAGING_DIR)/usr/sbin/,$(LVM2_BINS)) - rm -f $(addprefix $(STAGING_DIR)/usr/lib/,libdevmapper.so*) -endef - -define LVM2_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(LVM2_BINS)) - rm -f $(addprefix $(TARGET_DIR)/usr/lib/,libdevmapper.so*) -endef - $(eval $(autotools-package))
Signature · 1 line
1.8.1.2
PATCH 1/3 package/lvm2: remove uninstall commands
Dear Yann E. MORIN,
Quoted 9 lines · Yann E. MORIN
From: "Yann E. MORIN" <[email protected]>
We do not properly support uninstalling packages, so just remove the uninstall commands.
Signed-off-by "Yann E. MORIN" <[email protected]>--- package/lvm2/lvm2.mk | 10 ---------- 1 file changed, 10 deletions(-)
I've marked this patch as superseded in patchwork, since all uninstall commands have been deleted by Thomas DS patch, including the lvm2 one.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/3 package/lvm2: remove uninstall commands
Thomas, All,
On 2013-12-06 10:38 +0100, Thomas Petazzoni spake thusly:
Quoted 6 lines · Yann E. MORIN
Quoted 5 lines
From: "Yann E. MORIN" <[email protected]>
We do not properly support uninstalling packages, so just remove the uninstall commands.
Quoted 7 lines
Quoted 4 lines
Signed-off-by "Yann E. MORIN" <[email protected]>--- package/lvm2/lvm2.mk | 10 ---------- 1 file changed, 10 deletions(-)I've marked this patch as superseded in patchwork, since all uninstall commands have been deleted by Thomas DS patch, including the lvm2 one.
Yes, thank you! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 2/3 package/lvm2: add a host variant
In reply to Yann E. MORINFrom: "Yann E. MORIN" <[email protected]>
Will be needed later for host-parted.
We need to force --with-confdir and --with-default-system-dir, otherwise lvm2 tries to install /etc/lvm/profile which we can't do, and don't want to do.
--- package/lvm2/lvm2.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/lvm2/lvm2.mk +5 -0
@@ -50,4 +50,9 @@ else LVM2_CONF_OPT += --disable-applib endif +HOST_LVM2_CONF_OPT += \ + --with-confdir=$(HOST_DIR)/etc \ + --with-default-system-dir=$(HOST_DIR)/etc/lvm + $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.8.1.2
PATCH 3/3 package/parted: add a host variant
In reply to Yann E. MORINFrom: "Yann E. MORIN" <[email protected]>
Usefull for for-build scripts to call parted, eg. to generate partition tables and such automatically.
Since the primary gaool is to use parted within scripts, we do not need readline, so it is forcibly disabled.
--- package/Config.in.host | 1 + package/parted/Config.in.host | 6 ++++++ package/parted/parted.mk | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 package/parted/Config.in.host
package/Config.in.host +1 -0
@@ -10,6 +10,7 @@ source "package/lpc3250loader/Config.in.host" source "package/mtools/Config.in.host" source "package/omap-u-boot-utils/Config.in.host" source "package/openocd/Config.in.host" +source "package/parted/Config.in.host" source "package/sam-ba/Config.in.host" source "package/sunxi-tools/Config.in.host" source "package/uboot-tools/Config.in.host"
package/parted/Config.in.host new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_PARTED + bool "host parted" + help + parted, the GNU partition resizing program + + http://www.gnu.org/software/parted/
package/parted/parted.mk +4 -0
@@ -8,8 +8,12 @@ PARTED_VERSION = 3.1 PARTED_SOURCE = parted-$(PARTED_VERSION).tar.xz PARTED_SITE = $(BR2_GNU_MIRROR)/parted PARTED_DEPENDENCIES = readline util-linux lvm2 +HOST_PARTED_DEPENDENCIES = host-util-linux host-lvm2 PARTED_INSTALL_STAGING = YES PARTED_LICENSE = GPLv3+ PARTED_LICENSE_FILES = COPYING +HOST_PARTED_CONF_OPT += --without-readline + $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
1.8.1.2
PATCH 3/3 package/parted: add a host variant
Dear Yann E. MORIN,
Quoted 3 lines · Yann E. MORIN
From: "Yann E. MORIN" <[email protected]>
Usefull for for-build scripts to call parted, eg. to generate
Useful. See http://en.wiktionary.org/wiki/usefull.
Quoted 3 lines
partition tables and such automatically.
Since the primary gaool is to use parted within scripts, we
goal
Quoted 5 lines
do not need readline, so it is forcibly disabled.
PARTED_DEPENDENCIES= readline util-linux lvm2
+HOST_PARTED_DEPENDENCIES = host-util-linux host-lvm2
Do we really want the lvm2 dependency? It can be avoided by passing --disable-device-mapper.
package/parted/parted.mk PARTED_VERSION = 3.1 · line 19
Quoted 8 lines
PARTED_INSTALL_STAGING= YES
PARTED_LICENSE= GPLv3+
PARTED_LICENSE_FILES= COPYINGpackage/parted/parted.mk +3
-0+HOST_PARTED_CONF_OPT += --without-readline + $(eval $(autotools-package)) +$(eval $(host-autotools-package))
So maybe something like:
PARTED_DEPENDENCIES = util-linux
ifeq ($(BR2_PACKAGE_READLINE),y)PARTED_DEPENDENCIES += readlinePARTED_CONF_OPT += --with-readline
elsePARTED_CONF_OPT += --without-readline
endif
ifeq ($(BR2_PACKAGE_LVM2),y)PARTED_DEPENDENCIES += lvm2PARTED_CONF_OPT += --enable-device-mapper
elsePARTED_CONF_OPT += --disable-device-mapper
endif
HOST_PARTED_DEPENDENCIES = host-util-linux
HOST_PARTED_CONF_OPT = \ --without-readline \ --disable-device-mapper
In the host variant of parted, lvm2 support is never enabled, as I believe it's pretty unlikely that lvm2 support will be needed to generate disk images. This would make PATCH 2/3 of your series unnecessary, of course.
In the target variant, we automatically enable lvm2 and readline support when available, which allows to build parted without lvm2 support when not needed.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/3 package/parted: add a host variant
Thomas, All,
On 2013-12-06 10:48 +0100, Thomas Petazzoni spake thusly:
Quoted 13 lines · Yann E. MORIN
Quoted 3 lines
From: "Yann E. MORIN" <[email protected]>
Usefull for for-build scripts to call parted, eg. to generate
Useful. See http://en.wiktionary.org/wiki/usefull.
Quoted 3 lines
partition tables and such automatically.
Since the primary gaool is to use parted within scripts, we
goal
Quoted 8 lines
Quoted 5 lines
do not need readline, so it is forcibly disabled.
PARTED_DEPENDENCIES= readline util-linux lvm2
+HOST_PARTED_DEPENDENCIES = host-util-linux host-lvm2Do we really want the lvm2 dependency? It can be avoided by passing --disable-device-mapper.
I think we want the same dependency the target parted has. If the target parted can handle lvm2 volumes, then we may have to generate them in the first place.
So, what about:
# If target-parted can handle lvm volumes, then host-parted
# should be, too, so as to be able to generate them. # If target-parted can't handle lvm volumes, there is no reason # for host-aprted to handle them. ifeq ($(BR2_PACKAGE_LVM2),y) PARTED_DEPENDENCIES += lvm2 HOST_PARTED_DEPENDENCIES += lvm2 PARTED_CONF_OPT += --enable-device-mapper HOST_PARTED_CONF_OPT += --enable-device-mapper else PARTED_CONF_OPT += --disable-device-mapper HOST_PARTED_CONF_OPT += --disable-device-mapper endif
But see further thoughts below...
Quoted 28 lines
package/parted/parted.mk PARTED_VERSION = 3.1 · line 19
Quoted 8 lines
PARTED_INSTALL_STAGING= YES
PARTED_LICENSE= GPLv3+
PARTED_LICENSE_FILES= COPYINGpackage/parted/parted.mk +3
-0+HOST_PARTED_CONF_OPT += --without-readline + $(eval $(autotools-package)) +$(eval $(host-autotools-package))So maybe something like:
PARTED_DEPENDENCIES= util-linuxifeq ($(BR2_PACKAGE_READLINE),y)
PARTED_DEPENDENCIES+= readlinePARTED_CONF_OPT+= --with-readline
elsePARTED_CONF_OPT+= --without-readline
endififeq ($(BR2_PACKAGE_LVM2),y)
PARTED_DEPENDENCIES+= lvm2PARTED_CONF_OPT+= --enable-device-mapper
elsePARTED_CONF_OPT+= --disable-device-mapper
endif
HOST_PARTED_DEPENDENCIES= host-util-linux
Quoted 8 lines
HOST_PARTED_CONF_OPT = \ --without-readline \ --disable-device-mapperIn the host variant of parted, lvm2 support is never enabled, as I believe it's pretty unlikely that lvm2 support will be needed to generate disk images. This would make PATCH 2/3 of your series unnecessary, of course.
I don't think we should not be able to generate lvm volumes. I can see at least a few cases where it would be needed.
Of course, we may just add host-parted without lvm support right now, and add it later when the need really arises.
Thanks for the review; v2 on its way later tonight.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 3/3 package/parted: add a host variant
Dear Yann E. MORIN,
Quoted 3 lines · Yann E. MORIN
I think we want the same dependency the target parted has. If the target parted can handle lvm2 volumes, then we may have to generate them in the first place.
Yes, we may. But that seems unlikely. I believe the most common usage of LVM on embedded platforms is for NAS/storage type devices, and for those systems, the root filesystem image is generally not on the LVM/RAID storage I believe, no?
Quoted 15 lines
So, what about:
# If target-parted can handle lvm volumes, then host-parted
# should be, too, so as to be able to generate them. # If target-parted can't handle lvm volumes, there is no reason # for host-aprted to handle them. ifeq ($(BR2_PACKAGE_LVM2),y) PARTED_DEPENDENCIES += lvm2 HOST_PARTED_DEPENDENCIES += lvm2 PARTED_CONF_OPT += --enable-device-mapper HOST_PARTED_CONF_OPT += --enable-device-mapper else PARTED_CONF_OPT += --disable-device-mapper HOST_PARTED_CONF_OPT += --disable-device-mapper endif
While I do understand the logic behind what you're proposing, I'm not really comfortable with having the configuration of tools built for the host changed depending on the target configuration. It seems to be creating a bad precedent.
Quoted 10 lines
Quoted 4 lines
In the host variant of parted, lvm2 support is never enabled, as I believe it's pretty unlikely that lvm2 support will be needed to generate disk images. This would make PATCH 2/3 of your series unnecessary, of course.
I don't think we should not be able to generate lvm volumes. I can see at least a few cases where it would be needed.
Of course, we may just add host-parted without lvm support right now, and add it later when the need really arises.
Yes, that would be my proposal.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/3 package/parted: add a host variant
Quoted 4 lines · Thomas Petazzoni
Dear Yann E. MORIN,
On Fri, 6 Dec 2013 17:56:14 +0100, Yann E. MORIN wrote:
Quoted 8 lines
Quoted 3 lines
I think we want the same dependency the target parted has. If the target parted can handle lvm2 volumes, then we may have to generate them in the first place.
Yes, we may. But that seems unlikely. I believe the most common usage of LVM on embedded platforms is for NAS/storage type devices, and for those systems, the root filesystem image is generally not on the LVM/RAID storage I believe, no?
It's also used for encrypted volumes, no?
Quoted 17 lines
Quoted 4 lines
So, what about:
# If target-parted can handle lvm volumes, then host-parted
Quoted 12 lines
# should be, too, so as to be able to generate them. # If target-parted can't handle lvm volumes, there is no reason # for host-aprted to handle them. ifeq ($(BR2_PACKAGE_LVM2),y) PARTED_DEPENDENCIES += lvm2 HOST_PARTED_DEPENDENCIES += lvm2 PARTED_CONF_OPT += --enable-device-mapper HOST_PARTED_CONF_OPT += --enable-device-mapper else PARTED_CONF_OPT += --disable-device-mapper HOST_PARTED_CONF_OPT += --disable-device-mapper endif
Quoted 4 lines
While I do understand the logic behind what you're proposing, I'm not really comfortable with having the configuration of tools built for the host changed depending on the target configuration. It seems to be creating a bad precedent.
We already have a precedent: libxml2.
What is so bad about one package's configuration depending on another
package configuration?
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
In the host variant of parted, lvm2 support is never enabled, as I believe it's pretty unlikely that lvm2 support will be needed to generate disk images. This would make PATCH 2/3 of your series unnecessary, of course.
Quoted 7 lines
Quoted 5 lines
I don't think we should not be able to generate lvm volumes. I can see at least a few cases where it would be needed.
Of course, we may just add host-parted without lvm support right now, and add it later when the need really arises.
Yes, that would be my proposal.
That's of course also fine - only implement it when it's actually used.
Regards,
Arnout
Signature · 6 lines
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
PATCH 3/3 package/parted: add a host variant
Dear Arnout Vandecappelle,
Quoted 14 lines · Arnout Vandecappelle
Quoted 14 lines
Quoted 13 lines
# If target-parted can handle lvm volumes, then host-parted
# should be, too, so as to be able to generate them. # If target-parted can't handle lvm volumes, there is no reason # for host-aprted to handle them. ifeq ($(BR2_PACKAGE_LVM2),y) PARTED_DEPENDENCIES += lvm2 HOST_PARTED_DEPENDENCIES += lvm2 PARTED_CONF_OPT += --enable-device-mapper HOST_PARTED_CONF_OPT += --enable-device-mapper else PARTED_CONF_OPT += --disable-device-mapper HOST_PARTED_CONF_OPT += --disable-device-mapper endif
Quoted 6 lines
Quoted 4 lines
While I do understand the logic behind what you're proposing, I'm not really comfortable with having the configuration of tools built for the host changed depending on the target configuration. It seems to be creating a bad precedent.
We already have a precedent: libxml2.
No, libxml2 is not the same case. libxml2 host configuration is adjusted according to the hidden BR2_PACKAGE_HOST_LIBXML2_PYTHON configuration option, which can be selected by another package.
Therefore, it is not directly the fact of changing the selection of target packages that modifies the configuration of host-libxml2.
Quoted 2 lines
What is so bad about one package's configuration depending on another
package configuration?
What I found bad here is that we're trying the configuration of the host package to the configuration of the corresponding target package, even though there is no real connection between the two things. But maybe I'm over-zealous I don't know.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/3 package/parted: add a host variant
Quoted 23 lines · Thomas Petazzoni
Dear Arnout Vandecappelle,
Quoted 19 lines · Arnout Vandecappelle
Quoted 18 lines
Quoted 13 lines
# If target-parted can handle lvm volumes, then host-parted
# should be, too, so as to be able to generate them. # If target-parted can't handle lvm volumes, there is no reason # for host-aprted to handle them. ifeq ($(BR2_PACKAGE_LVM2),y) PARTED_DEPENDENCIES += lvm2 HOST_PARTED_DEPENDENCIES += lvm2 PARTED_CONF_OPT += --enable-device-mapper HOST_PARTED_CONF_OPT += --enable-device-mapper else PARTED_CONF_OPT += --disable-device-mapper HOST_PARTED_CONF_OPT += --disable-device-mapper endifWhile I do understand the logic behind what you're proposing, I'm not really comfortable with having the configuration of tools built for the host changed depending on the target configuration. It seems to be creating a bad precedent.
Quoted 5 lines
Quoted 1 line
We already have a precedent: libxml2.
No, libxml2 is not the same case. libxml2 host configuration is adjusted according to the hidden
BR2_PACKAGE_HOST_LIBXML2_PYTHONconfiguration option, which can be selected by another package.
Yes, it is selected by the _target_ package mesa3d.
Quoted 10 lines
Therefore, it is not directly the fact of changing the selection of target packages that modifies the configuration of host-libxml2.
Quoted 2 lines
What is so bad about one package's configuration depending on another
package configuration?What I found bad here is that we're trying the configuration of the host package to the configuration of the corresponding target package, even though there is no real connection between the two things. But
There you have a point: it's really an assumed connection, and one can
probably construct scenarios where you would want the lvm support on the host but not on the target or vice versa.
Well, let's solve that problem when it is relevant, i.e. there's an
actual use case.
Regards,
Arnout
Quoted 6 lines
maybe I'm over-zealous I don't know.
Best regards,
Thomas
Signature · 6 lines
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