diff mbox

[1/1] dc3dd: new package

Message ID 1488607456-30096-1-git-send-email-benoit.allard@greenbone.net
State Changes Requested
Headers show

Commit Message

Benoît Allard March 4, 2017, 6:04 a.m. UTC
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
---
 DEVELOPERS               |  3 +++
 package/Config.in        |  1 +
 package/dc3dd/Config.in  |  9 +++++++++
 package/dc3dd/dc3dd.hash |  2 ++
 package/dc3dd/dc3dd.mk   | 19 +++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/dc3dd/Config.in
 create mode 100644 package/dc3dd/dc3dd.hash
 create mode 100644 package/dc3dd/dc3dd.mk

Comments

Arnout Vandecappelle March 3, 2017, 10:42 p.m. UTC | #1
Hi Benoit,

 Strange timezone you live in, GMT+32 or something like that? :-)

On 04-03-17 07:04, Benoît Allard wrote:
> Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
[snip]
> diff --git a/package/dc3dd/Config.in b/package/dc3dd/Config.in
> new file mode 100644
> index 0000000..0a2a32e
> --- /dev/null
> +++ b/package/dc3dd/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_DC3DD
> +	bool "dc3dd"
> +	help
> +          dc3dd is a patch to the GNU dd program, this version has several
> +          features intended for forensic acquisition of data. Highlights
> +          include hashing on-the-fly, split output files, pattern writing, a

 Help text should wrap at 72 columns where the tab counts for 8, so this is 4
characters too many...

> +          progress meter, and file verification.
> +
> +          https://sourceforge.net/projects/dc3dd/
> diff --git a/package/dc3dd/dc3dd.hash b/package/dc3dd/dc3dd.hash
> new file mode 100644
> index 0000000..edd75c2
> --- /dev/null
> +++ b/package/dc3dd/dc3dd.hash
> @@ -0,0 +1,2 @@
> +# From https://sourceforge.net/projects/dc3dd/files/dc3dd/7.2.646/dc3dd%207.2.646/
> +sha1 3d3d9ba5f3b18fbf4798e1f3554f2d34d0ce5e2c dc3dd-7.2.646.zip

 If only a weak hash is available upstream, please add a locally calculated sha256.

> diff --git a/package/dc3dd/dc3dd.mk b/package/dc3dd/dc3dd.mk
> new file mode 100644
> index 0000000..5a25bee
> --- /dev/null
> +++ b/package/dc3dd/dc3dd.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# dc3dd
> +#
> +################################################################################
> +
> +DC3DD_VERSION = 7.2.646

 There is a version 7.2.641 which is identical except that it has an older (!)
Changelog, and a different version number...

> +DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip

 and that version has a proper tar.xz.

> +DC3DD_SITE = http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
> +DC3DD_LICENSE = GPLv3

 I didn't do a full fossology but it looks like all files have the 'or later'
clause, so it's GPLv3+

> +DC3DD_LICENSE_FILES = COPYING
> +
> +define DC3DD_EXTRACT_CMDS
> +        $(UNZIP) -d $(@D)/.. $(DL_DIR)/$(DC3DD_SOURCE) || true

 || true? You want to succeed in case of failure?

 Also, we normally extract within $(@D) and then move the result. Cfr. e.g. espeak.

> +        chmod a+x $(@D)/configure
> +        chmod a+x $(@D)/build-aux/install-sh

 The tar.xz has execute permission set on all files. Not sure if that's an
improvement :-)


 Regards,
 Arnout

> +endef
> +
> +$(eval $(autotools-package))
>
Arnout Vandecappelle March 3, 2017, 10:47 p.m. UTC | #2
On 03-03-17 23:42, Arnout Vandecappelle wrote:
>  Hi Benoit,
> 
>  Strange timezone you live in, GMT+32 or something like that? :-)
> 
> On 04-03-17 07:04, Benoît Allard wrote:
>> Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
> [snip]
>> diff --git a/package/dc3dd/Config.in b/package/dc3dd/Config.in
>> new file mode 100644
>> index 0000000..0a2a32e
>> --- /dev/null
>> +++ b/package/dc3dd/Config.in
>> @@ -0,0 +1,9 @@
>> +config BR2_PACKAGE_DC3DD
>> +	bool "dc3dd"

 Also, it fails to build on musl, and uses threads. Use the test-pkg script to
pre-test on the autobuilder toolchains, it just takes an hour or so on an
average speed computer.


 Regards,
 Arnout

>> +	help
>> +          dc3dd is a patch to the GNU dd program, this version has several
>> +          features intended for forensic acquisition of data. Highlights
>> +          include hashing on-the-fly, split output files, pattern writing, a
> 
>  Help text should wrap at 72 columns where the tab counts for 8, so this is 4
> characters too many...
> 
>> +          progress meter, and file verification.
>> +
>> +          https://sourceforge.net/projects/dc3dd/
>> diff --git a/package/dc3dd/dc3dd.hash b/package/dc3dd/dc3dd.hash
>> new file mode 100644
>> index 0000000..edd75c2
>> --- /dev/null
>> +++ b/package/dc3dd/dc3dd.hash
>> @@ -0,0 +1,2 @@
>> +# From https://sourceforge.net/projects/dc3dd/files/dc3dd/7.2.646/dc3dd%207.2.646/
>> +sha1 3d3d9ba5f3b18fbf4798e1f3554f2d34d0ce5e2c dc3dd-7.2.646.zip
> 
>  If only a weak hash is available upstream, please add a locally calculated sha256.
> 
>> diff --git a/package/dc3dd/dc3dd.mk b/package/dc3dd/dc3dd.mk
>> new file mode 100644
>> index 0000000..5a25bee
>> --- /dev/null
>> +++ b/package/dc3dd/dc3dd.mk
>> @@ -0,0 +1,19 @@
>> +################################################################################
>> +#
>> +# dc3dd
>> +#
>> +################################################################################
>> +
>> +DC3DD_VERSION = 7.2.646
> 
>  There is a version 7.2.641 which is identical except that it has an older (!)
> Changelog, and a different version number...
> 
>> +DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip
> 
>  and that version has a proper tar.xz.
> 
>> +DC3DD_SITE = http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
>> +DC3DD_LICENSE = GPLv3
> 
>  I didn't do a full fossology but it looks like all files have the 'or later'
> clause, so it's GPLv3+
> 
>> +DC3DD_LICENSE_FILES = COPYING
>> +
>> +define DC3DD_EXTRACT_CMDS
>> +        $(UNZIP) -d $(@D)/.. $(DL_DIR)/$(DC3DD_SOURCE) || true
> 
>  || true? You want to succeed in case of failure?
> 
>  Also, we normally extract within $(@D) and then move the result. Cfr. e.g. espeak.
> 
>> +        chmod a+x $(@D)/configure
>> +        chmod a+x $(@D)/build-aux/install-sh
> 
>  The tar.xz has execute permission set on all files. Not sure if that's an
> improvement :-)
> 
> 
>  Regards,
>  Arnout
> 
>> +endef
>> +
>> +$(eval $(autotools-package))
>>
>
Benoît Allard March 6, 2017, 3:57 p.m. UTC | #3
On Fri, 3 Mar 2017 23:42:49 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:

>  Hi Benoit,
> 
>  Strange timezone you live in, GMT+32 or something like that? :-)
> 

That's a development virtual-machine. The date in there was somewhat
not synchronized.

> On 04-03-17 07:04, Benoît Allard wrote:
> > Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
> [snip]
> > diff --git a/package/dc3dd/Config.in b/package/dc3dd/Config.in
> > new file mode 100644
> > index 0000000..0a2a32e
> > --- /dev/null
> > +++ b/package/dc3dd/Config.in
> > @@ -0,0 +1,9 @@
> > +config BR2_PACKAGE_DC3DD
> > +	bool "dc3dd"
> > +	help
> > +          dc3dd is a patch to the GNU dd program, this version has
> > several
> > +          features intended for forensic acquisition of data.
> > Highlights
> > +          include hashing on-the-fly, split output files, pattern
> > writing, a
> 
>  Help text should wrap at 72 columns where the tab counts for 8, so
> this is 4 characters too many...
> 

Will do.

> > +          progress meter, and file verification.
> > +
> > +          https://sourceforge.net/projects/dc3dd/
> > diff --git a/package/dc3dd/dc3dd.hash b/package/dc3dd/dc3dd.hash
> > new file mode 100644
> > index 0000000..edd75c2
> > --- /dev/null
> > +++ b/package/dc3dd/dc3dd.hash
> > @@ -0,0 +1,2 @@
> > +# From
> > https://sourceforge.net/projects/dc3dd/files/dc3dd/7.2.646/dc3dd%207.2.646/
> > +sha1 3d3d9ba5f3b18fbf4798e1f3554f2d34d0ce5e2c dc3dd-7.2.646.zip
> 
>  If only a weak hash is available upstream, please add a locally
> calculated sha256.

Sure, will do.

> 
> > diff --git a/package/dc3dd/dc3dd.mk b/package/dc3dd/dc3dd.mk
> > new file mode 100644
> > index 0000000..5a25bee
> > --- /dev/null
> > +++ b/package/dc3dd/dc3dd.mk
> > @@ -0,0 +1,19 @@
> > +################################################################################
> > +#
> > +# dc3dd
> > +#
> > +################################################################################
> > +
> > +DC3DD_VERSION = 7.2.646
> 
>  There is a version 7.2.641 which is identical except that it has an
> older (!) Changelog, and a different version number...
> 
> > +DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip
> 
>  and that version has a proper tar.xz.

Indeed, I will use that older version.

> 
> > +DC3DD_SITE =
> > http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
> > +DC3DD_LICENSE = GPLv3
> 
>  I didn't do a full fossology but it looks like all files have the
> 'or later' clause, so it's GPLv3+

You are correct, most files have indeed the 'or later' mention.

> 
> > +DC3DD_LICENSE_FILES = COPYING
> > +
> > +define DC3DD_EXTRACT_CMDS
> > +        $(UNZIP) -d $(@D)/.. $(DL_DIR)/$(DC3DD_SOURCE) || true
> 
>  || true? You want to succeed in case of failure?

Yeah, the zip was somewhat malformed that we need the '|| true'. As we
test the checksum beforehand that didn't hurt much.

> 
>  Also, we normally extract within $(@D) and then move the result.
> Cfr. e.g. espeak.
> 
> > +        chmod a+x $(@D)/configure
> > +        chmod a+x $(@D)/build-aux/install-sh
> 
>  The tar.xz has execute permission set on all files. Not sure if
> that's an improvement :-)
> 
> 
>  Regards,
>  Arnout
> 
> > +endef
> > +
> > +$(eval $(autotools-package))
> > 
>
Arnout Vandecappelle March 6, 2017, 4:41 p.m. UTC | #4
On 06-03-17 16:57, Benoît Allard wrote:
> On Fri, 3 Mar 2017 23:42:49 +0100
> Arnout Vandecappelle <arnout@mind.be> wrote:
[snip]
>>> +DC3DD_VERSION = 7.2.646
>>
>>  There is a version 7.2.641 which is identical except that it has an
>> older (!) Changelog, and a different version number...
>>
>>> +DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip
>>
>>  and that version has a proper tar.xz.
> 
> Indeed, I will use that older version.

 Please mention in the commit log that they are identical and why we prefer the
"older" one.

>>> +DC3DD_SITE = http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
>>> +DC3DD_LICENSE = GPLv3
>>
>>  I didn't do a full fossology but it looks like all files have the
>> 'or later' clause, so it's GPLv3+
> 
> You are correct, most files have indeed the 'or later' mention.

 Can you please double-check that *all* files mention 'or later'? At least the
ones that do have a copyright header. We don't want to be lying.


 Regards,
 Arnout

[snip]
Benoît Allard March 7, 2017, 8:40 a.m. UTC | #5
On Mon, 6 Mar 2017 17:41:48 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:

> 
> 
> On 06-03-17 16:57, Benoît Allard wrote:
> > On Fri, 3 Mar 2017 23:42:49 +0100
> > Arnout Vandecappelle <arnout@mind.be> wrote:
> [snip]
> >>> +DC3DD_VERSION = 7.2.646
> >>
> >>  There is a version 7.2.641 which is identical except that it has
> >> an older (!) Changelog, and a different version number...
> >>
> >>> +DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip
> >>
> >>  and that version has a proper tar.xz.
> > 
> > Indeed, I will use that older version.
> 
>  Please mention in the commit log that they are identical and why we
> prefer the "older" one.

No problem.

> 
> >>> +DC3DD_SITE =
> >>> http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
> >>> +DC3DD_LICENSE = GPLv3
> >>
> >>  I didn't do a full fossology but it looks like all files have the
> >> 'or later' clause, so it's GPLv3+
> > 
> > You are correct, most files have indeed the 'or later' mention.
> 
>  Can you please double-check that *all* files mention 'or later'? At
> least the ones that do have a copyright header. We don't want to be
> lying.
> 

Oh boy, that's gonna get fun. Fortunately, debian has a nice
"licensecheck" script (from the "devscripts" package in case you're
wondering) that can pretty well extract license information from source
code. Output attached.

Here, the files that have a copyright header and no "or later" stanza:

The following three are "freely distributable":
./src/hdparm/identify.c: UNKNOWN
./src/hdparm/hpa_dco.c: UNKNOWN
./src/hdparm/sgio.c: UNKNOWN

The following files are actually extracted from the GNU C library:
./lib/strcspn.c: GPL
./lib/stpcpy.c: GPL
./lib/strtoull.c: GPL
./lib/putenv.c: GPL
./lib/strtol.c: GPL
./lib/memcmp.c: GPL
./lib/stpncpy.c: GPL
./lib/memchr.c: GPL
./lib/utime.c: GPL
./lib/utimens.c: GPL
./lib/memchr2.c: GPL

Please advise.


> Also, it fails to build on musl, and uses threads. Use the test-pkg
> script to
> pre-test on the autobuilder toolchains, it just takes an hour or so on
> an average speed computer.

I've done that as well, and I had to add a patch to disable the
building of the man page as we don't need it and it failed on some
configurations.

New version incoming.

Regards,
Ben.
Arnout Vandecappelle March 7, 2017, 10:31 a.m. UTC | #6
On 07-03-17 09:40, Benoît Allard wrote:
> Here, the files that have a copyright header and no "or later" stanza:
> 
> The following three are "freely distributable":
> ./src/hdparm/identify.c: UNKNOWN
> ./src/hdparm/hpa_dco.c: UNKNOWN
> ./src/hdparm/sgio.c: UNKNOWN

 These we can ignore.


> The following files are actually extracted from the GNU C library:
> ./lib/strcspn.c: GPL
> ./lib/stpcpy.c: GPL
> ./lib/strtoull.c: GPL
> ./lib/putenv.c: GPL
> ./lib/strtol.c: GPL
> ./lib/memcmp.c: GPL
> ./lib/stpncpy.c: GPL
> ./lib/memchr.c: GPL
> ./lib/utime.c: GPL
> ./lib/utimens.c: GPL
> ./lib/memchr2.c: GPL

 Something wrong with your version of licensecheck, because they clearly state
"version 3 or any later version". My licensecheck (sid, 3.0.29-1) correctly
identifies them as GPLv3+.

 Regards,
 Arnout
Benoît Allard March 7, 2017, 1:59 p.m. UTC | #7
On Tue, 7 Mar 2017 11:31:48 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:

> 
> 
> On 07-03-17 09:40, Benoît Allard wrote:
> 
> > The following files are actually extracted from the GNU C library:
> > ./lib/strcspn.c: GPL
> > ./lib/stpcpy.c: GPL
> > ./lib/strtoull.c: GPL
> > ./lib/putenv.c: GPL
> > ./lib/strtol.c: GPL
> > ./lib/memcmp.c: GPL
> > ./lib/stpncpy.c: GPL
> > ./lib/memchr.c: GPL
> > ./lib/utime.c: GPL
> > ./lib/utimens.c: GPL
> > ./lib/memchr2.c: GPL
> 
>  Something wrong with your version of licensecheck, because they
> clearly state "version 3 or any later version". My licensecheck (sid,
> 3.0.29-1) correctly identifies them as GPLv3+.
> 

Ok, great, thanks for checking ! I indeed used an older version of the
script (jessie). With that cleared, please consider reviewing the v2 of
my patch :)

Regards,
Ben.
diff mbox

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 1bf07c3..6ed713b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -146,6 +146,9 @@  F:	package/taskd/
 N:	Benjamin Kamath <kamath.ben@gmail.com>
 F:	package/lapack/
 
+N:	Benoît Allard <benoit.allard@greenbone.net>
+F:	package/dc3dd/
+
 N:	Bernd Kuhls <bernd.kuhls@t-online.de>
 F:	package/apache/
 F:	package/apr/
diff --git a/package/Config.in b/package/Config.in
index 921a06c..376c573 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1762,6 +1762,7 @@  menu "System tools"
 	source "package/cpuload/Config.in"
 	source "package/dcron/Config.in"
 	source "package/ddrescue/Config.in"
+	source "package/dc3dd/Config.in"
 	source "package/debianutils/Config.in"
 	source "package/docker-containerd/Config.in"
 	source "package/docker-engine/Config.in"
diff --git a/package/dc3dd/Config.in b/package/dc3dd/Config.in
new file mode 100644
index 0000000..0a2a32e
--- /dev/null
+++ b/package/dc3dd/Config.in
@@ -0,0 +1,9 @@ 
+config BR2_PACKAGE_DC3DD
+	bool "dc3dd"
+	help
+          dc3dd is a patch to the GNU dd program, this version has several
+          features intended for forensic acquisition of data. Highlights
+          include hashing on-the-fly, split output files, pattern writing, a
+          progress meter, and file verification.
+
+          https://sourceforge.net/projects/dc3dd/
diff --git a/package/dc3dd/dc3dd.hash b/package/dc3dd/dc3dd.hash
new file mode 100644
index 0000000..edd75c2
--- /dev/null
+++ b/package/dc3dd/dc3dd.hash
@@ -0,0 +1,2 @@ 
+# From https://sourceforge.net/projects/dc3dd/files/dc3dd/7.2.646/dc3dd%207.2.646/
+sha1 3d3d9ba5f3b18fbf4798e1f3554f2d34d0ce5e2c dc3dd-7.2.646.zip
diff --git a/package/dc3dd/dc3dd.mk b/package/dc3dd/dc3dd.mk
new file mode 100644
index 0000000..5a25bee
--- /dev/null
+++ b/package/dc3dd/dc3dd.mk
@@ -0,0 +1,19 @@ 
+################################################################################
+#
+# dc3dd
+#
+################################################################################
+
+DC3DD_VERSION = 7.2.646
+DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).zip
+DC3DD_SITE = http://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION)/dc3dd%20$(DC3DD_VERSION)
+DC3DD_LICENSE = GPLv3
+DC3DD_LICENSE_FILES = COPYING
+
+define DC3DD_EXTRACT_CMDS
+        $(UNZIP) -d $(@D)/.. $(DL_DIR)/$(DC3DD_SOURCE) || true
+        chmod a+x $(@D)/configure
+        chmod a+x $(@D)/build-aux/install-sh
+endef
+
+$(eval $(autotools-package))