Skip to contentSkip to conversation

aufs: new package

PATCH New Atul Singh 3 participants 4 messages Apr 29, 2016 – Jul 17, 2016

lore
Share & tools
lore

Atul Singh

author
#0 lore raw

PATCH v2 1/3 aufs: new package

From: Christian Stewart <[email protected]>

aufs is a dummy package that downloads the correct aufs-standalone sources for patching the kernel with the aufs filesystem. The package is not selectable because it does nothing but download the sources on default. It is a dependency of the Aufs kernel extension.

[Atul:
- Removed the duplicate conditional block.
- Updated the license to GPLv2.
- Removed the visibilty of package from menuconfig.
- Removed dependencies.
- Removed the comment.
- Changed the name of variable from BR2_PACKAGE_AUFS_STANDALONE_VERSION to BR2_LINUX_KERNEL_EXT_AUFS_VERSION.
- Removed the AUFS_INSTALL_STAGING and AUFS_INSTALL_TARGET variables.
- Removed the BR2_PACKAGE_AUFS_3X and BR2_PACKAGE_AUFS_4X variables.
]

---
 package/Config.in      |  1 +
 package/aufs/Config.in |  2 ++
 package/aufs/aufs.mk   | 24 ++++++++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/aufs/Config.in
 create mode 100644 package/aufs/aufs.mk
package/Config.in +1 -0
index 27db639..54166b1 100644
@@ -160,6 +160,7 @@ endif
 endmenu
 
 menu "Filesystem and flash utilities"
+	source "package/aufs/Config.in"
 	source "package/autofs/Config.in"
 	source "package/btrfs-progs/Config.in"
 	source "package/cifs-utils/Config.in"
package/aufs/Config.in new file +2 -0
new file mode 100644
index 0000000..3ff4691
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_AUFS
+	bool
package/aufs/aufs.mk new file +24 -0
new file mode 100644
index 0000000..a139547
@@ -0,0 +1,24 @@
+################################################################################
+#
+# aufs
+#
+# patches for the linux kernel, used by the extension.
+#
+################################################################################
+
+AUFS_VERSION = aufs$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))
+AUFS_VERSION_MAJOR = $(firstword $(subst .,$(space),$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))))
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+AUFS_LICENSE = GPLv2
+AUFS_LICENSE_FILES = COPYING
+
+ifeq ($(AUFS_VERSION_MAJOR),3)
+AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
+AUFS_SITE_METHOD = git
+else ifeq ($(AUFS_VERSION_MAJOR),4)
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+else
+$(error Unknown aufs major version)
+endif
+
+$(eval $(generic-package))
Signature · 1 line
2.5.0
#1 lore raw

PATCH v2 1/3 aufs: new package

Atul,

Quoted 1 line · Atul Singh

- Changed the name of variable from BR2_PACKAGE_AUFS_STANDALONE_VERSION to

BR2_LINUX_KERNEL_EXT_AUFS_VERSION.
Trying to compile Buildroot without Aufs selected whatsoever gives me:

Unknown aufs major version. Stop.
This is because you're checking BR2_LINUX_KERNEL_EXT_AUFS_VERSION for the major version, but it's not set. However, I don't think this should have any effect if the package isn't selected in the first place.
You might consider instead setting something like AUFS_VERSION_MAJOR_INVALID=yes and erroring out at aufs configuration time, not makefile variable interpret time.
Thanks!
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160501/106bee22/attachment.html>

#2 lore raw

PATCH v2 1/3 aufs: new package

In reply to Atul Singh

Aul, Christian, All,

On 2016-04-29 19:01 +0530, Atul Singh spake thusly:

Quoted 19 lines

From: Christian Stewart <[email protected]>

aufs is a dummy package that downloads the correct aufs-standalone sources for patching the kernel with the aufs filesystem. The package is not selectable because it does nothing but download the sources on default. It is a dependency of the Aufs kernel extension.

[Atul:
- Removed the duplicate conditional block.
- Updated the license to GPLv2.
- Removed the visibilty of package from menuconfig.
- Removed dependencies.
- Removed the comment.
- Changed the name of variable from BR2_PACKAGE_AUFS_STANDALONE_VERSION to BR2_LINUX_KERNEL_EXT_AUFS_VERSION.
- Removed the AUFS_INSTALL_STAGING and AUFS_INSTALL_TARGET variables.
- Removed the BR2_PACKAGE_AUFS_3X and BR2_PACKAGE_AUFS_4X variables.
]

Quoted 2 lines

---

[--SNIP--]

Please add a .hash file too:
http://nightly.buildroot.org/#adding-packages-hash

Although it is "downloaded from a version control system (git, subversion, etc?)", it is provided by the github download helper, which in fact will download a tarball and will not do a git-clone. Github now generates reproducible archives in our experience, so we can/must add a .hash file.

package/aufs/aufs.mk line 5

Quoted 11 lines
package/aufs/aufs.mk new file +5 -0
new file mode 100644
index 0000000..a139547
@@ -0,0 +1,24 @@
+################################################################################
+#
+# aufs
+#
+# patches for the linux kernel, used by the extension.

Just the package name in the header, please.

package/aufs/aufs.mk line 9

Quoted 4 lines
package/aufs/aufs.mk new file +4 -0
+#
+################################################################################
+
+AUFS_VERSION = aufs$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))

The BR2_LINUX_KERNEL_EXT_AUFS_VERSION does not exist in this patch, it is only provided with the next patch.

So you can't use it here.

The only way is to squash the two patches into one: they are in fact a single change, they can't be logically split.

package/aufs/aufs.mk line 22

Quoted 13 lines
package/aufs/aufs.mk new file +13 -0
+AUFS_VERSION_MAJOR = $(firstword $(subst .,$(space),$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))))
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+AUFS_LICENSE = GPLv2
+AUFS_LICENSE_FILES = COPYING
+
+ifeq ($(AUFS_VERSION_MAJOR),3)
+AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
+AUFS_SITE_METHOD = git
+else ifeq ($(AUFS_VERSION_MAJOR),4)
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+else
+$(error Unknown aufs major version)
+endif

As noticed by Christian, this won't work when the aufs extension is not enabled. You must enclose such checks inside a more stringent test:

ifeq ($(BR2_PACKAGE_AUFS),y)
# Do the checks here
endif # BR_BUILDING

However, I'm not too fan of this after-the-fact checking. But we can't seriously have a 30+ choice to select the appropriate version, nor can we even derive the version from that of the kernel... So I guess we'll have to live with that check... :-/

Regards,
Yann E. MORIN.

Quoted 8 lines
package/aufs/aufs.mk new file +1 -0
+$(eval $(generic-package))
Signature · 6 lines
2.5.0

_______________________________________________
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/3 aufs: new package

In reply to Atul Singh

Atul, Christian, All,

On 2016-04-29 19:01 +0530, Atul Singh spake thusly:

Quoted 5 lines

aufs is a dummy package that downloads the correct aufs-standalone sources for patching the kernel with the aufs filesystem. The package is not selectable because it does nothing but download the sources on default. It is a dependency of the Aufs kernel extension.

I've sent an updated series that adds support for aufs:

    https://patchwork.ozlabs.org/patch/649251/
    https://patchwork.ozlabs.org/patch/649252/
    https://patchwork.ozlabs.org/patch/649253/

So, I've marked your these patches as superseded in ourPatchwork.

Thnaks for the initial work! :-)

Regards,
Yann E. MORIN.

Quoted 77 lines

[Atul:
- Removed the duplicate conditional block.
- Updated the license to GPLv2.
- Removed the visibilty of package from menuconfig.
- Removed dependencies.
- Removed the comment.
- Changed the name of variable from BR2_PACKAGE_AUFS_STANDALONE_VERSION to BR2_LINUX_KERNEL_EXT_AUFS_VERSION.
- Removed the AUFS_INSTALL_STAGING and AUFS_INSTALL_TARGET variables.
- Removed the BR2_PACKAGE_AUFS_3X and BR2_PACKAGE_AUFS_4X variables.
]

---
 package/Config.in      |  1 +
 package/aufs/Config.in |  2 ++
 package/aufs/aufs.mk   | 24 ++++++++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/aufs/Config.in
 create mode 100644 package/aufs/aufs.mk
package/Config.in +1 -0
index 27db639..54166b1 100644
@@ -160,6 +160,7 @@ endif
 endmenu
 
 menu "Filesystem and flash utilities"
+	source "package/aufs/Config.in"
 	source "package/autofs/Config.in"
 	source "package/btrfs-progs/Config.in"
 	source "package/cifs-utils/Config.in"
package/aufs/Config.in new file +2 -0
new file mode 100644
index 0000000..3ff4691
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_AUFS
+	bool
package/aufs/aufs.mk new file +24 -0
new file mode 100644
index 0000000..a139547
@@ -0,0 +1,24 @@
+################################################################################
+#
+# aufs
+#
+# patches for the linux kernel, used by the extension.
+#
+################################################################################
+
+AUFS_VERSION = aufs$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))
+AUFS_VERSION_MAJOR = $(firstword $(subst .,$(space),$(call qstrip,$(BR2_LINUX_KERNEL_EXT_AUFS_VERSION))))
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+AUFS_LICENSE = GPLv2
+AUFS_LICENSE_FILES = COPYING
+
+ifeq ($(AUFS_VERSION_MAJOR),3)
+AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
+AUFS_SITE_METHOD = git
+else ifeq ($(AUFS_VERSION_MAJOR),4)
+AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
+else
+$(error Unknown aufs major version)
+endif
+
+$(eval $(generic-package))
Signature · 6 lines
2.5.0

_______________________________________________
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.  |
'------------------------------^-------^------------------^--------------------'