Skip to contentSkip to conversation

introduce nwipe package [r2]

PATCH New Charles Duffy 2 participants 2 messages Oct 14, 2015 – Oct 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 introduce nwipe package [r2]

From: Charles Duffy <[email protected]>

---
 package/Config.in                                  |   1 +
 .../nwipe/0001-parted-use-autoconf-module.patch    |  21 +++
 package/nwipe/0002-use-off64t_not_lofft.patch      | 144 +++++++++++++++++++++
 package/nwipe/Config.in                            |  10 ++
 package/nwipe/nwipe.mk                             |  14 ++
 5 files changed, 190 insertions(+)
 create mode 100644 package/nwipe/0001-parted-use-autoconf-module.patch
 create mode 100644 package/nwipe/0002-use-off64t_not_lofft.patch
 create mode 100644 package/nwipe/Config.in
 create mode 100644 package/nwipe/nwipe.mk
package/Config.in +1 -0
index 8e3c64a..32affcc 100644
@@ -1496,6 +1496,7 @@ endif
 	source "package/ncdu/Config.in"
 	source "package/numactl/Config.in"
 	source "package/nut/Config.in"
+	source "package/nwipe/Config.in"
 	source "package/openvmtools/Config.in"
 	source "package/polkit/Config.in"
 	source "package/powerpc-utils/Config.in"
package/nwipe/0001-parted-use-autoconf-module.patch new file +21 -0
new file mode 100644
index 0000000..b78cf95
@@ -0,0 +1,21 @@
+--- nwipe-0.17/configure.ac.orig	2015-10-14 16:03:50.602422801 -0500
++++ nwipe-0.17/configure.ac	2015-10-14 16:04:44.542421602 -0500
+@@ -42,7 +42,9 @@
+ 	)]
+ )
+ 
+-AC_CHECK_LIB([parted], [ped_device_probe_all], ,[AC_MSG_ERROR([parted development library not found])])
++AC_CHECK_LIB([intl], [libintl_dgettext]) # needed to statically link libparted, but not given in its pkgconfig file
++AC_CHECK_LIB([uuid], [uuid_generate])    # needed to statically link libparted, but not given in its pkgconfig file
++PKG_CHECK_MODULES([PARTED], [libparted])
+ AC_CHECK_LIB([pthread], [main], ,[AC_MSG_ERROR([pthread development library not found])])
+ 
+ # Checks for header files.
+--- nwipe-0.17.orig/src/Makefile.am	2014-10-19 14:49:22.000000000 -0500
++++ nwipe-0.17/src/Makefile.am	2015-10-14 16:06:34.763419154 -0500
+@@ -7,3 +7,5 @@
+ # the previous manual Makefile
+ bin_PROGRAMS = nwipe
+ nwipe_SOURCES = context.h isaac_rand.c logging.h options.h prng.h nwipe.c gui.c isaac_rand.h method.h pass.c device.c gui.h isaac_standard.h mt19937ar-cok.c nwipe.h mt19937ar-cok.h pass.h device.h logging.c method.c options.c prng.c version.c version.h
++nwipe_CFLAGS = ${PARTED_CFLAGS}
++nwipe_LDADD = ${PARTED_LIBS}
package/nwipe/0002-use-off64t_not_lofft.patch new file +144 -0

144 lines not on this page · raw message

package/nwipe/Config.in new file +10 -0
new file mode 100644
index 0000000..7c13f30
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_NWIPE
+	bool "nwipe"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_PARTED
+	help
+	  nwipe thoroughly overwrites block devices, forked from a component at
+	  the core of the venerable DBAN.
+	
+	  https://github.com/martijnvanbrummelen/nwipe
package/nwipe/nwipe.mk new file +14 -0
new file mode 100644
index 0000000..58f560f
@@ -0,0 +1,14 @@
+################################################################################
+#
+# nwipe
+#
+################################################################################
+
+NWIPE_VERSION = 0.17
+NWIPE_SITE = $(call github,martijnvanbrummelen,nwipe,$(NWIPE_VERSION))
+NWIPE_DEPENDENCIES = ncurses parted host-pkgconf
+NWIPE_LICENSE = GPLv2
+NWIPE_LICENSE_FILES = COPYING
+NWIPE_AUTORECONF = YES
+
+$(eval $(autotools-package))
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 introduce nwipe package [r2]

Charles,

Quoted 3 lines · Charles Duffy

From: Charles Duffy <[email protected]>

Thanks for this new version. For new version, it is customary to change the title of the patch this way:

	[PATCH v2] ....

To do this, use:

	git format-patch --subject-prefix="PATCH v2"
Quoted 1 line

---

Also, we generally try to put a changelog here, that describes what changed since v1. See also
http://buildroot.org/downloads/manual/manual.html#submitting-patches.

Finally, the title of your commit should ideally be:

nwipe: new package

that's kind of our convention for new packages, and generally our commit titles are always:

<package>: <description>

package/nwipe/0001-parted-use-autoconf-module.patch

Quoted 5 lines
package/nwipe/0001-parted-use-autoconf-module.patch new file +0 -0
new file mode 100644
index 0000000..b78cf95

All patches should have a description + Signed-off-by. See
http://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches.

Quoted 9 lines

+ # Checks for header files.
+--- nwipe-0.17.orig/src/Makefile.am 2014-10-19 14:49:22.000000000 -0500
++++ nwipe-0.17/src/Makefile.am 2015-10-14 16:06:34.763419154 -0500
+@@ -7,3 +7,5 @@
+ # the previous manual Makefile
+ bin_PROGRAMS = nwipe
+ nwipe_SOURCES = context.h isaac_rand.c logging.h options.h prng.h nwipe.c gui.c isaac_rand.h method.h pass.c device.c gui.h isaac_standard.h mt19937ar-cok.c nwipe.h mt19937ar-cok.h pass.h device.h logging.c method.c options.c prng.c version.c version.h ++nwipe_CFLAGS = ${PARTED_CFLAGS}
++nwipe_LDADD = ${PARTED_LIBS}

Using $(...) instead of ${...} is more common in Makefiles.

package/nwipe/0002-use-off64t_not_lofft.patch

Quoted 5 lines
package/nwipe/0002-use-off64t_not_lofft.patch new file +0 -0
new file mode 100644
index 0000000..3c4c7a3

Please also add a description + Signed-off-by here.

Did you get the change to submit those patches to the upstream nwipe project?

package/nwipe/Config.in line 5

Quoted 11 lines
package/nwipe/Config.in new file +5 -0
new file mode 100644
index 0000000..7c13f30
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_NWIPE
+	bool "nwipe"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_PARTED

When you select a package, you need to replicate the dependencies of this package into your package (yes it's silly, but that's how the kconfig stuff works). So since parted depends on wchar support, you need to:

depends on BR2_USE_WCHAR # parted

package/nwipe/Config.in line 10

Quoted 5 lines
package/nwipe/Config.in new file +5 -0
+	help
+	  nwipe thoroughly overwrites block devices, forked from a component at
+	  the core of the venerable DBAN.
+	
+	  https://github.com/martijnvanbrummelen/nwipe

And here add:

comment "nwipe needs a toolchain w/ wchar"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR

Quoted 10 lines
package/nwipe/nwipe.mk new file +4 -0
new file mode 100644
index 0000000..58f560f
@@ -0,0 +1,14 @@
+################################################################################
+#
+# nwipe
+#

package/nwipe/nwipe.mk line 14

Quoted 10 lines
package/nwipe/nwipe.mk new file +10 -0
+################################################################################
+
+NWIPE_VERSION = 0.17
+NWIPE_SITE = $(call github,martijnvanbrummelen,nwipe,$(NWIPE_VERSION))
+NWIPE_DEPENDENCIES = ncurses parted host-pkgconf
+NWIPE_LICENSE = GPLv2
+NWIPE_LICENSE_FILES = COPYING
+NWIPE_AUTORECONF = YES
+
+$(eval $(autotools-package))

This looks good.

Thanks,

Thomas

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