Skip to contentSkip to conversation

bcache-tools: Adding package.

PATCH Superseded Jean-Christophe DUBOIS 3 participants 10 messages Jul 31, 2014 – Aug 5, 2014

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

This patch adds the bcache-tools package to buildroot.

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---
Changes v1 to v2
* remove 'support' word from comment statement in Config.in.
* use github helper to get the project site instead of hardcoded URL.

---
 package/Config.in                    |  1 +
 package/bcache-tools/Config.in       | 11 +++++++++++
 package/bcache-tools/bcache-tools.mk | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 package/bcache-tools/Config.in
 create mode 100644 package/bcache-tools/bcache-tools.mk
package/Config.in +1 -0
index 29b8e6b..7468b28 100644
@@ -279,6 +279,7 @@ endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
 	source "package/avrdude/Config.in"
+	source "package/bcache-tools/Config.in"
 	source "package/cdrkit/Config.in"
 	source "package/cryptsetup/Config.in"
 	source "package/cwiid/Config.in"
package/bcache-tools/Config.in new file +11 -0
new file mode 100644
index 0000000..fbe4158
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.
+
+comment "bcache-tools needs udev /dev management"
+        depends on !BR2_PACKAGE_HAS_UDEV
package/bcache-tools/bcache-tools.mk new file +34 -0
new file mode 100644
index 0000000..8b0b061
@@ -0,0 +1,34 @@
+################################################################################
+#
+# bcache-tools
+#
+################################################################################
+
+BCACHE_TOOLS_VERSION = 1.0.7
+BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
+BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
+BCACHE_TOOLS_LICENSE = GPLv2
+BCACHE_TOOLS_LICENSE_FILES = COPYING
+BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev
+BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
+
+define BCACHE_TOOLS_EXTRACT_CMDS
+	unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
+endef
+
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef
+
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Sorry to bother you guys, but how do I know the patch is accepted (or not) ?

Thanks.

JC

Le 07/31/2014 10:40 PM, Jean-Christophe DUBOIS a ?crit :

Quoted 87 lines

This patch adds the bcache-tools package to buildroot.

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---
Changes v1 to v2
* remove 'support' word from comment statement in Config.in.
* use github helper to get the project site instead of hardcoded URL.

---
  package/Config.in                    |  1 +
  package/bcache-tools/Config.in       | 11 +++++++++++
  package/bcache-tools/bcache-tools.mk | 34 ++++++++++++++++++++++++++++++++++
  3 files changed, 46 insertions(+)

create mode 100644 package/bcache-tools/Config.in create mode 100644 package/bcache-tools/bcache-tools.mk

package/Config.in +1 -0
index 29b8e6b..7468b28 100644
@@ -279,6 +279,7 @@ endmenu
  	source "package/a10disp/Config.in"
  	source "package/acpid/Config.in"
  	source "package/avrdude/Config.in"
+	source "package/bcache-tools/Config.in"
  	source "package/cdrkit/Config.in"
  	source "package/cryptsetup/Config.in"
  	source "package/cwiid/Config.in"
package/bcache-tools/Config.in new file +11 -0
new file mode 100644
index 0000000..fbe4158
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.
+
+comment "bcache-tools needs udev /dev management"
+        depends on !BR2_PACKAGE_HAS_UDEV
package/bcache-tools/bcache-tools.mk new file +34 -0
new file mode 100644
index 0000000..8b0b061
@@ -0,0 +1,34 @@
+################################################################################
+#
+# bcache-tools
+#
+################################################################################
+
+BCACHE_TOOLS_VERSION = 1.0.7
+BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
+BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
+BCACHE_TOOLS_LICENSE = GPLv2
+BCACHE_TOOLS_LICENSE_FILES = COPYING
+BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev
+BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
+
+define BCACHE_TOOLS_EXTRACT_CMDS
+	unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
+endef
+
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef
+
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))
#2 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Jean-Christophe, All,

On 2014-08-02 22:55 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 1 line

Sorry to bother you guys, but how do I know the patch is accepted (or not) ?

You'll get a mail that it is applied. It can take a few days, or even a week before someone gets to review a patch.

I'm interested in bcache-tools, so I've queued it for review.

Don't worry, your patch is not forgotten. Sorry it takes long, but reviewing is not a simple task...

In the meantime, we have a lot of patches to review and test:
http://patchwork.ozlabs.org/project/buildroot/list/

A bit of help in testing them is always welcome! ;-)

Regards,
Yann E. MORIN.

Quoted 93 lines

Le 07/31/2014 10:40 PM, Jean-Christophe DUBOIS a ?crit :

Quoted 77 lines

This patch adds the bcache-tools package to buildroot.

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---
Changes v1 to v2
* remove 'support' word from comment statement in Config.in.
* use github helper to get the project site instead of hardcoded URL.

---
 package/Config.in                    |  1 +
 package/bcache-tools/Config.in       | 11 +++++++++++
 package/bcache-tools/bcache-tools.mk | 34 ++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 package/bcache-tools/Config.in
 create mode 100644 package/bcache-tools/bcache-tools.mk
package/Config.in +1 -0
index 29b8e6b..7468b28 100644
@@ -279,6 +279,7 @@ endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
 	source "package/avrdude/Config.in"
+	source "package/bcache-tools/Config.in"
 	source "package/cdrkit/Config.in"
 	source "package/cryptsetup/Config.in"
 	source "package/cwiid/Config.in"
package/bcache-tools/Config.in new file +11 -0
new file mode 100644
index 0000000..fbe4158
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.
+
+comment "bcache-tools needs udev /dev management"
+        depends on !BR2_PACKAGE_HAS_UDEV
package/bcache-tools/bcache-tools.mk new file +24 -0
new file mode 100644
index 0000000..8b0b061
@@ -0,0 +1,34 @@
+################################################################################
+#
+# bcache-tools
+#
+################################################################################
+
+BCACHE_TOOLS_VERSION = 1.0.7
+BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
+BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
+BCACHE_TOOLS_LICENSE = GPLv2
+BCACHE_TOOLS_LICENSE_FILES = COPYING
+BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev
+BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
+
+define BCACHE_TOOLS_EXTRACT_CMDS
+	unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
+endef
+
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef
+
+define BCACHE_TOOLS_BUILD_CMDS

package/bcache-tools/bcache-tools.mk line 34

Quoted 10 lines
package/bcache-tools/bcache-tools.mk new file +10 -0
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

In reply to Jean-Christophe DUBOIS

Jean-Christophe, All,

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 1 line

This patch adds the bcache-tools package to buildroot.

This line above is not needed: it is obvious this is adding the package to Buildroot! ;-)

Quoted 11 lines

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---

package/bcache-tools/Config.in new file +0 -0
new file mode 100644
index 0000000..fbe4158

package/bcache-tools/Config.in line 5

Quoted 5 lines
package/bcache-tools/Config.in new file +5 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID

Since you select sub-options of util-linux, you must also select the package itself:
select BR2_PACKAGE_UTIL_LINUX

But you must also inherit its dependencies:
depends on BR2_LARGEFILE # util-linux
depends on BR2_USE_WCHAR # util-linux

But you must also inherit from the sub-options' dependencies, too:
depends on BR2_USE_MMU # util-linux (libblkid)

package/bcache-tools/Config.in line 11

Quoted 6 lines
package/bcache-tools/Config.in new file +6 -0
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.
+
+comment "bcache-tools needs udev /dev management"
+        depends on !BR2_PACKAGE_HAS_UDEV

And you must adapt the comment to the dependencies above, like:
bcache needs udev /dev management and a toolchain w/ largefile, wchar

Quoted 18 lines
package/bcache-tools/bcache-tools.mk new file +12 -0
new file mode 100644
index 0000000..8b0b061
@@ -0,0 +1,34 @@
+################################################################################
+#
+# bcache-tools
+#
+################################################################################
+
+BCACHE_TOOLS_VERSION = 1.0.7
+BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
+BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
+BCACHE_TOOLS_LICENSE = GPLv2
+BCACHE_TOOLS_LICENSE_FILES = COPYING
+BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev

package/bcache-tools/bcache-tools.mk line 22

Quoted 10 lines
package/bcache-tools/bcache-tools.mk new file +10 -0
+BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
+
+define BCACHE_TOOLS_EXTRACT_CMDS
+	unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
+endef
+
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef

This should probably be a post-extract hook. See:
http://buildroot.net/downloads/manual/manual.html#hooks

package/bcache-tools/bcache-tools.mk line 26

Quoted 3 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

package/bcache-tools/bcache-tools.mk line 31

Quoted 5 lines
package/bcache-tools/bcache-tools.mk new file +5 -0
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install

Ditto:

    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
        DESTDIR=$(TARGET_DIR) install

Regards,
Yann E. MORIN.

Quoted 10 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Hello Yann,

Thanks for the feedback/review.

Few questions below.

JC

Le 08/03/2014 08:53 PM, Yann E. MORIN a ?crit :

Quoted 6 lines

Jean-Christophe, All,

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 1 line

This patch adds the bcache-tools package to buildroot.

This line above is not needed: it is obvious this is adding the package to Buildroot! ;-)

OK

Quoted 20 lines
Quoted 11 lines

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---

package/bcache-tools/Config.in new file +0 -0
new file mode 100644
index 0000000..fbe4158

package/bcache-tools/Config.in line 5

Quoted 5 lines
package/bcache-tools/Config.in new file +5 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID

Since you select sub-options of util-linux, you must also select the package itself:
select BR2_PACKAGE_UTIL_LINUX

Quoted 6 lines

But you must also inherit its dependencies:
depends on BR2_LARGEFILE # util-linux
depends on BR2_USE_WCHAR # util-linux

But you must also inherit from the sub-options' dependencies, too:
depends on BR2_USE_MMU # util-linux (libblkid)

Sorry I am new to buildroot, but wouldn't be expected that selecting LIBUUID and LIBBLKID would automatically select the LIBUUID and LIBBLKID dependencies and therefore it does not have to be explicitly selected by all packages depending on these features ?

If one day the util-linux dependency is changing, will it be expected to change the dependency of all package using linux-util?

Quoted 31 lines

package/bcache-tools/Config.in line 11

Quoted 6 lines
package/bcache-tools/Config.in new file +6 -0
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.
+
+comment "bcache-tools needs udev /dev management"
+        depends on !BR2_PACKAGE_HAS_UDEV

And you must adapt the comment to the dependencies above, like:
bcache needs udev /dev management and a toolchain w/ largefile, wchar

Quoted 22 lines
package/bcache-tools/bcache-tools.mk new file +16 -0
new file mode 100644
index 0000000..8b0b061
@@ -0,0 +1,34 @@
+################################################################################
+#
+# bcache-tools
+#
+################################################################################
+
+BCACHE_TOOLS_VERSION = 1.0.7
+BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,v$(BCACHE_TOOLS_VERSION))
+BCACHE_TOOLS_SOURCE = v$(BCACHE_TOOLS_VERSION).zip
+BCACHE_TOOLS_LICENSE = GPLv2
+BCACHE_TOOLS_LICENSE_FILES = COPYING
+BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux eudev
+BCACHE_TOOLS_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)"
+
+define BCACHE_TOOLS_EXTRACT_CMDS
+	unzip -d $(BUILD_DIR) $(DL_DIR)/$(BCACHE_TOOLS_SOURCE)
Quoted 8 lines

package/bcache-tools/bcache-tools.mk line 22

Quoted 6 lines
package/bcache-tools/bcache-tools.mk new file +6 -0
+endef
+
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef

This should probably be a post-extract hook. See:
http://buildroot.net/downloads/manual/manual.html#hooks

I'll look into this. I copied this from the dnsmasq package.

Quoted 10 lines

package/bcache-tools/bcache-tools.mk line 26

Quoted 3 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

OK, this is also coming from dnsmasq package.

Quoted 23 lines

package/bcache-tools/bcache-tools.mk line 31

Quoted 6 lines
package/bcache-tools/bcache-tools.mk new file +5 -0
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install

Ditto:

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
         DESTDIR=$(TARGET_DIR) install

Regards,
Yann E. MORIN.

Quoted 10 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#5 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Jean-Christophe, All,

On 2014-08-04 17:28 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 21 lines

Le 08/03/2014 08:53 PM, Yann E. MORIN a ?crit :

Quoted 20 lines

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

package/bcache-tools/Config.in line 5

Quoted 11 lines
package/bcache-tools/Config.in new file +5 -0
new file mode 100644
index 0000000..fbe4158
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID

Since you select sub-options of util-linux, you must also select the package itself:
select BR2_PACKAGE_UTIL_LINUX

But you must also inherit its dependencies:
depends on BR2_LARGEFILE # util-linux
depends on BR2_USE_WCHAR # util-linux

Quoted 7 lines
Quoted 2 lines

But you must also inherit from the sub-options' dependencies, too:
depends on BR2_USE_MMU # util-linux (libblkid)

Sorry I am new to buildroot, but wouldn't be expected that selecting LIBUUID and LIBBLKID would automatically select the LIBUUID and LIBBLKID dependencies and therefore it does not have to be explicitly selected by all packages depending on these features ?

No. That's a limitation of the kconfig language. 'select' does not propagate the 'depends on'. See:
http://buildroot.net/downloads/manual/manual.html#_literal_config_in_literal_file

---8<---
Note. The current problem with the kconfig language is that these two dependency semantics are not internally linked. Therefore, it may be possible to select a package, whom one of its dependencies/ requirement is not met.
---8<---

Quoted 2 lines

If one day the util-linux dependency is changing, will it be expected to change the dependency of all package using linux-util?

Yes, but that would be the responsibility to the user bumping util-linux to propagate the new dependencies or remove the old ones.

Quoted 8 lines
Quoted 6 lines

package/bcache-tools/Config.in line 9

Quoted 4 lines
package/bcache-tools/Config.in new file +4 -0
+define BCACHE_TOOLS_FIX_PKGCONFIG
+	$(SED) 's^`pkg-config^`$(PKG_CONFIG_HOST_BINARY)^' \
+		$(BCACHE_TOOLS_DIR)/Makefile
+endef

This should probably be a post-extract hook. See:
http://buildroot.net/downloads/manual/manual.html#hooks

I'll look into this. I copied this from the dnsmasq package.

Hmmm... Indeed. But that part was added 2.5 years ago, and we have better infrastructure now. dnsmasq would be in need of a bit of love, it looks like! ;-)

Quoted 11 lines
Quoted 10 lines

package/bcache-tools/Config.in

Quoted 3 lines
package/bcache-tools/Config.in new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

OK, this is also coming from dnsmasq package.

OK, I saw you further replied on this matter. I'll read your other mail and reply there.

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.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

In reply to Yann E. MORIN

A little question:

Le 08/03/2014 08:53 PM, Yann E. MORIN a ?crit :

Quoted 7 lines

Jean-Christophe, All,

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

package/bcache-tools/bcache-tools.mk line 26

Quoted 3 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

Quoted 6 lines
     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

When I do as you propose then various compilation variables $(TARGET_CONFIGURE_OPTS) are passed as $(MAKE) arguments.

Therefore these variables cannot be overridden/changed in the Makefile (which might the the desired behavior) unless explicitly allowed with the "override" directive.

Unfortunately the bcache-tools Makefile needs (for now) to be able to override the CFLAGS variable.

So I can certainly "patch" the bcache-tools Makefile (in the post extract hook for example) to allow "overriding" on the CFLAGS variable.

Another solution is to pass $(TARGET_CONFIGURE_OPTS) as environment variables to $(MAKE) in which case the various variables can still be modified by the Makefile.

Which of these 2 solutions is the preferred solution?

Is there another (more correct?) solution that would allow to change the CFLAGS variable contained in $(TARGET_CONFIGURE_OPTS)?

Thanks for your help.

JC

Quoted 23 lines

package/bcache-tools/bcache-tools.mk line 31

Quoted 6 lines
package/bcache-tools/bcache-tools.mk new file +5 -0
+endef
+
+define BCACHE_TOOLS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install

Ditto:

     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
         DESTDIR=$(TARGET_DIR) install

Regards,
Yann E. MORIN.

Quoted 10 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#7 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Jean-Christophe, All,

On 2014-08-04 21:53 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 25 lines

Le 08/03/2014 08:53 PM, Yann E. MORIN a ?crit :

Quoted 7 lines

Jean-Christophe, All,

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

package/bcache-tools/bcache-tools.mk line 26

Quoted 3 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

Quoted 6 lines
    $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

When I do as you propose then various compilation variables $(TARGET_CONFIGURE_OPTS) are passed as $(MAKE) arguments.

Therefore these variables cannot be overridden/changed in the Makefile (which might the the desired behavior) unless explicitly allowed with the "override" directive.

Unfortunately the bcache-tools Makefile needs (for now) to be able to override the CFLAGS variable.

Quoted 8 lines

So I can certainly "patch" the bcache-tools Makefile (in the post extract hook for example) to allow "overriding" on the CFLAGS variable.

Another solution is to pass $(TARGET_CONFIGURE_OPTS) as environment variables to $(MAKE) in which case the various variables can still be modified by the Makefile.

Which of these 2 solutions is the preferred solution?

Hmmm. I'd say to pass them in the env (your second solution.) But I can't vouch for the other developpers. Thomas P.?

Oh, BTW, I forgot one more point in my earlier review: please add the URL to the homepage for the package:
http://bcache.evilpiepirate.org/

And as requested by Thomas DS, change the help text to just replicate the headlines of the homepage:

help
Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives.

http://bcache.evilpiepirate.org/

Quoted 2 lines

Is there another (more correct?) solution that would allow to change the CFLAGS variable contained in $(TARGET_CONFIGURE_OPTS)?

Make it a proper autotools package and submit it upstream? Just kidding ;-)

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.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

Le 08/04/2014 11:00 PM, Yann E. MORIN a ?crit :

Quoted 30 lines

Jean-Christophe, All,

On 2014-08-04 21:53 +0200, Jean-Christophe DUBOIS spake thusly:

Quoted 27 lines

Le 08/03/2014 08:53 PM, Yann E. MORIN a ?crit :

Quoted 7 lines

Jean-Christophe, All,

On 2014-07-31 22:40 +0200, Jean-Christophe DUBOIS spake thusly:

package/bcache-tools/bcache-tools.mk line 26

Quoted 3 lines
package/bcache-tools/bcache-tools.mk new file +3 -0
+define BCACHE_TOOLS_BUILD_CMDS
+	$(BCACHE_TOOLS_FIX_PKGCONFIG)
+	$(BCACHE_TOOLS_MAKE_ENV) $(MAKE) -C $(@D)

This should probably be:

Quoted 6 lines
     $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)

TARGET_CONFIGURE_OPTS contains the CC= assignment.

Thus, the BCACHE_TOOLS_MAKE_ENV no longer makes sense, so you can remove it.

When I do as you propose then various compilation variables $(TARGET_CONFIGURE_OPTS) are passed as $(MAKE) arguments.

Therefore these variables cannot be overridden/changed in the Makefile (which might the the desired behavior) unless explicitly allowed with the "override" directive.

Unfortunately the bcache-tools Makefile needs (for now) to be able to override the CFLAGS variable.

So I can certainly "patch" the bcache-tools Makefile (in the post extract hook for example) to allow "overriding" on the CFLAGS variable.

Quoted 7 lines
Quoted 5 lines

Another solution is to pass $(TARGET_CONFIGURE_OPTS) as environment variables to $(MAKE) in which case the various variables can still be modified by the Makefile.

Which of these 2 solutions is the preferred solution?

Hmmm. I'd say to pass them in the env (your second solution.) But I can't vouch for the other developpers. Thomas P.?

OK, I'll use env variables.

Quoted 4 lines

Oh, BTW, I forgot one more point in my earlier review: please add the URL to the homepage for the package:
http://bcache.evilpiepirate.org/

OK, I'll do.

Quoted 10 lines

And as requested by Thomas DS, change the help text to just replicate the headlines of the homepage:

help
Bcache is a Linux kernel block layer cache. It allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives.

http://bcache.evilpiepirate.org/

OK, I'll do.

Quoted 5 lines
Quoted 3 lines

Is there another (more correct?) solution that would allow to change the CFLAGS variable contained in $(TARGET_CONFIGURE_OPTS)?

Make it a proper autotools package and submit it upstream? Just kidding ;-)

I was expecting there was a way to alter the CFLAGS variable in $(TARGET_CONFIGURE_OPTS) on a package base.

For now, I'll go with the env variable solution.

Quoted 4 lines

Regards,
Yann E. MORIN.

#9 lore raw

PATCH v2 1/1 bcache-tools: Adding package.

In reply to Jean-Christophe DUBOIS

Jean-Christophe DUBOIS <[email protected]> schreef:

Quoted 36 lines

This patch adds the bcache-tools package to buildroot.

This is the bcache tools, required to setup the linux bcache feature of the Linux kernel.

---
Changes v1 to v2
* remove 'support' word from comment statement in Config.in.
* use github helper to get the project site instead of hardcoded URL.
---

package/Config.in                    |  1 +
package/bcache-tools/Config.in       | 11 +++++++++++
package/bcache-tools/bcache-tools.mk | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+)

create mode 100644 package/bcache-tools/Config.in create mode 100644 package/bcache-tools/bcache-tools.mk

package/Config.in +1 -0
index 29b8e6b..7468b28 100644
@@ -279,6 +279,7 @@ endmenu
 	source "package/a10disp/Config.in"
 	source "package/acpid/Config.in"
 	source "package/avrdude/Config.in"
+	source "package/bcache-tools/Config.in"
 	source "package/cdrkit/Config.in"
 	source "package/cryptsetup/Config.in"
 	source "package/cwiid/Config.in"
package/bcache-tools/Config.in new file +0 -0
new file mode 100644
index 0000000..fbe4158

package/bcache-tools/Config.in line 8

Quoted 8 lines
package/bcache-tools/Config.in new file +8 -0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_BCACHE_TOOLS
+	bool "bcache tools"
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	help
+	  This is the bcache tools, required to setup the linux bcache
+	  feature of the Linux kernel.

I think a brief explanation of what this bcache feature is could be helpful for users that use the Buildroot menuconfig to detect useful packages.