Skip to contentSkip to conversation

e2tools: new package

PATCH New Daniel Nyström 3 participants 4 messages Nov 28, 2013 – Apr 20, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e2tools: new package

E2tools is a simple set of GPL'ed utilities to read, write, and manipulate files in an ext2/ext3 filesystem. These utilities access a filesystem directly using the ext2fs library.

---
 package/Config.in          |  1 +
 package/e2tools/Config.in  | 10 ++++++++++
 package/e2tools/e2tools.mk | 16 ++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/e2tools/Config.in
 create mode 100644 package/e2tools/e2tools.mk
package/Config.in +1 -0
index f9e72ad..96e729a 100644
@@ -227,6 +227,7 @@ source "package/cramfs/Config.in"
 source "package/curlftpfs/Config.in"
 source "package/dosfstools/Config.in"
 source "package/e2fsprogs/Config.in"
+source "package/e2tools/Config.in"
 source "package/ecryptfs-utils/Config.in"
 source "package/exfat/Config.in"
 source "package/exfat-utils/Config.in"
package/e2tools/Config.in new file +10 -0
new file mode 100644
index 0000000..14f25ab
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_E2TOOLS
+	bool "e2tools"
+	select BR2_PACKAGE_E2FSPROGS
+	help
+	  E2tools is a simple set of GPL'ed utilities to read, write,
+	  and manipulate files in an ext2/ext3 filesystem.  These
+	  utilities access a filesystem directly using the ext2fs
+	  library.
+
+	  https://github.com/ndim/e2tools
package/e2tools/e2tools.mk new file +16 -0
new file mode 100644
index 0000000..56797bb
@@ -0,0 +1,16 @@
+################################################################################
+#
+# e2tools
+#
+################################################################################
+
+E2TOOLS_VERSION = 3158ef18
+E2TOOLS_SITE = http://github.com/ndim/e2tools/tarball/$(E2TOOLS_VERSION)
+E2TOOLS_AUTORECONF = YES
+E2TOOLS_LICENSE = GPLv2
+E2TOOLS_LICENSE_FILES = COPYING
+E2TOOLS_DEPENDENCIES = e2fsprogs
+E2TOOLS_CONF_ENV = LIBS="-lpthread"
+E2TOOLS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-exec
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 e2tools: new package

Daniel, All,

On 2013-11-28 19:02 +0100, Daniel Nystr?m spake thusly:

Quoted 31 lines

E2tools is a simple set of GPL'ed utilities to read, write, and manipulate files in an ext2/ext3 filesystem. These utilities access a filesystem directly using the ext2fs library.

---
 package/Config.in          |  1 +
 package/e2tools/Config.in  | 10 ++++++++++
 package/e2tools/e2tools.mk | 16 ++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/e2tools/Config.in
 create mode 100644 package/e2tools/e2tools.mk
package/Config.in +1 -0
index f9e72ad..96e729a 100644
@@ -227,6 +227,7 @@ source "package/cramfs/Config.in"
 source "package/curlftpfs/Config.in"
 source "package/dosfstools/Config.in"
 source "package/e2fsprogs/Config.in"
+source "package/e2tools/Config.in"
 source "package/ecryptfs-utils/Config.in"
 source "package/exfat/Config.in"
 source "package/exfat-utils/Config.in"
package/e2tools/Config.in new file +0 -0
new file mode 100644
index 0000000..14f25ab

package/e2tools/Config.in line 2

Quoted 2 lines
package/e2tools/Config.in new file +2 -0
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_E2TOOLS
+	bool "e2tools"

Since it needs threads, you should add:
depends on BR2_TOOLCHAIN_HAS_THREADS

package/e2tools/Config.in line 10

Quoted 8 lines
package/e2tools/Config.in new file +8 -0
+	select BR2_PACKAGE_E2FSPROGS
+	help
+	  E2tools is a simple set of GPL'ed utilities to read, write,
+	  and manipulate files in an ext2/ext3 filesystem.  These
+	  utilities access a filesystem directly using the ext2fs
+	  library.
+
+	  https://github.com/ndim/e2tools

[...] and here add a comment:
comment "e2tools needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS

package/e2tools/e2tools.mk line 7

Quoted 13 lines
package/e2tools/e2tools.mk new file +7 -0
new file mode 100644
index 0000000..56797bb
@@ -0,0 +1,16 @@
+################################################################################
+#
+# e2tools
+#
+################################################################################
+
+E2TOOLS_VERSION = 3158ef18

Please use the full commit hash, not just the shortened hash.

package/e2tools/e2tools.mk line 9

Quoted 2 lines
package/e2tools/e2tools.mk new file +2 -0
+E2TOOLS_SITE = http://github.com/ndim/e2tools/tarball/$(E2TOOLS_VERSION)
+E2TOOLS_AUTORECONF = YES

Explain why it needs to be autoreconfed (eg. ./configure is not provided).

package/e2tools/e2tools.mk line 16

Quoted 7 lines
package/e2tools/e2tools.mk new file +7 -0
+E2TOOLS_LICENSE = GPLv2
+E2TOOLS_LICENSE_FILES = COPYING
+E2TOOLS_DEPENDENCIES = e2fsprogs
+E2TOOLS_CONF_ENV = LIBS="-lpthread"
+E2TOOLS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-exec
+
+$(eval $(autotools-package))

As discussed on IRC, please also make it a host package:

    $(eval $(host-autotools-package))

And add it to package/Config.in.host (look at package/dosfstools for how it is done 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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 e2tools: new package

In reply to Daniel Nyström

Dear Daniel Nystr?m,

Thanks for this contribution!

package/e2tools/Config.in line 3

Quoted 9 lines · Daniel Nystr?m
package/e2tools/Config.in new file +3 -0
new file mode 100644
index 0000000..14f25ab
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_E2TOOLS
+	bool "e2tools"
+	select BR2_PACKAGE_E2FSPROGS

You need to propagate the e2fsprogs dependency here.

package/e2tools/Config.in line 10

Quoted 7 lines
package/e2tools/Config.in new file +7 -0
+	help
+	  E2tools is a simple set of GPL'ed utilities to read, write,
+	  and manipulate files in an ext2/ext3 filesystem.  These
+	  utilities access a filesystem directly using the ext2fs
+	  library.
+
+	  https://github.com/ndim/e2tools

and add a comment here.

Quoted 6 lines
package/e2tools/e2tools.mk new file +0 -0
new file mode 100644
index 0000000..56797bb

package/e2tools/e2tools.mk line 10

Quoted 10 lines
package/e2tools/e2tools.mk new file +10 -0
@@ -0,0 +1,16 @@
+################################################################################
+#
+# e2tools
+#
+################################################################################
+
+E2TOOLS_VERSION = 3158ef18
+E2TOOLS_SITE = http://github.com/ndim/e2tools/tarball/$(E2TOOLS_VERSION)
+E2TOOLS_AUTORECONF = YES
+E2TOOLS_LICENSE = GPLv2

The code isn't really clear as to whether it is GPLv2 or GPLv2+. The COPYING file is the text of GPLv2, but the comment headers in the code don't explicit whether it's GPLv2 only, or GPLv2+. I guess in a case like this, we should assume it's GPLv2, as you did.

package/e2tools/e2tools.mk line 13

Quoted 3 lines
package/e2tools/e2tools.mk new file +3 -0
+E2TOOLS_LICENSE_FILES = COPYING
+E2TOOLS_DEPENDENCIES = e2fsprogs
+E2TOOLS_CONF_ENV = LIBS="-lpthread"

So you need a dependency on BR2_TOOLCHAIN_HAS_THREADS as well.

package/e2tools/e2tools.mk line 14

Quoted 1 line
package/e2tools/e2tools.mk new file +1 -0
+E2TOOLS_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install-exec

I know (from IRC discussion) you used this instead of the default "make install" to not install man pages. But that's not needed: provided BR2_HAVE_DOCUMENTATION is disabled (which is almost always the case since this option is deprecated), then Buildroot automatically removes man pages. So unless using "make install" causes a problem, we'd prefer to not use a specific <pkg>_INSTALL_TARGET_OPT, and let Buildroot remove the man pages.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 e2tools: new package

In reply to Daniel Nyström

Dear Daniel Nystr?m,

Quoted 4 lines · Daniel Nystr?m

E2tools is a simple set of GPL'ed utilities to read, write, and manipulate files in an ext2/ext3 filesystem. These utilities access a filesystem directly using the ext2fs library.

Quoted 8 lines
---
 package/Config.in          |  1 +
 package/e2tools/Config.in  | 10 ++++++++++
 package/e2tools/e2tools.mk | 16 ++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/e2tools/Config.in
 create mode 100644 package/e2tools/e2tools.mk

Thanks, I've applied your patch, after taking into account the comments made during the review: propagation of toolchain dependencies, usage of a full Git hash, usage of the github helper, addition of the host variant.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com