Initial Commit
- initial default booting image
This commit is contained in:
15
package/dc3dd/0001-no_man.patch
Normal file
15
package/dc3dd/0001-no_man.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
Remove the man directory to the subdirs to prevent building the man pages
|
||||
|
||||
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
||||
|
||||
--- a/Makefile.am 2017-03-27 09:53:19.988820588 +0200
|
||||
+++ b/Makefile.am 2017-03-27 09:54:14.325817466 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-SUBDIRS = lib src man po
|
||||
+SUBDIRS = lib src po
|
||||
EXTRA_DIST = cfg.mk maint.mk \
|
||||
.prev-version THANKS-to-translators THANKStt.in \
|
||||
.version \
|
||||
32
package/dc3dd/0002-fix-autoreconf.patch
Normal file
32
package/dc3dd/0002-fix-autoreconf.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
Remove use of AM_C_PROTOTYPES to fix autoreconf
|
||||
|
||||
The AM_C_PROTOTYPES macro no longer exists since automake 1.12. It
|
||||
existed to support de-ANSI-fication of code using ansi2knr. It was
|
||||
simply removed from coreutils m4/jm-macros.m4 in commit
|
||||
88873501cff9ed937edf969cedd693517ab0a293, but this change was not
|
||||
propagated to dc3dd, causing an autoreconf failure:
|
||||
|
||||
configure.ac:45: error: automatic de-ANSI-fication support has been removed
|
||||
/home/peko/autobuild/instance-0/output/host/usr/share/aclocal-1.15/obsolete.m4:26: AM_C_PROTOTYPES is expanded from...
|
||||
m4/jm-macros.m4:124: gl_CHECK_ALL_TYPES is expanded from...
|
||||
m4/jm-macros.m4:22: coreutils_MACROS is expanded from...
|
||||
configure.ac:45: the top level
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/m4/jm-macros.m4
|
||||
===================================================================
|
||||
--- a/m4/jm-macros.m4
|
||||
+++ b/m4/jm-macros.m4
|
||||
@@ -128,11 +128,6 @@
|
||||
dnl whether functions and headers are available, whether they work, etc.
|
||||
AC_REQUIRE([AC_SYS_LARGEFILE])
|
||||
|
||||
- dnl This test must precede tests of compiler characteristics like
|
||||
- dnl that for the inline keyword, since it may change the degree to
|
||||
- dnl which the compiler supports such features.
|
||||
- AC_REQUIRE([AM_C_PROTOTYPES])
|
||||
-
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_REQUIRE([AC_C_BIGENDIAN])
|
||||
AC_REQUIRE([AC_C_VOLATILE])
|
||||
87
package/dc3dd/0003-fix-for-glibc-2.28.patch
Normal file
87
package/dc3dd/0003-fix-for-glibc-2.28.patch
Normal file
@@ -0,0 +1,87 @@
|
||||
Fix build with glibc 2.28
|
||||
|
||||
glibc 2.28 hides a number of internal macros that used to be visible. gnulib
|
||||
relied on these macros. Add a patch based on upstream gnulib commit
|
||||
4af4a4a71827c0 (fflush: adjust to glibc 2.28 libio.h removal) to fix the
|
||||
build.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status: gnulib commit 4af4a4a7182
|
||||
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/freadahead.c dc3dd-7.2.641/lib/freadahead.c
|
||||
--- dc3dd-7.2.641.orig/lib/freadahead.c 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/freadahead.c 2018-10-26 08:46:36.612492230 +0300
|
||||
@@ -24,7 +24,7 @@
|
||||
size_t
|
||||
freadahead (FILE *fp)
|
||||
{
|
||||
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base)
|
||||
return 0;
|
||||
return (fp->_IO_read_end - fp->_IO_read_ptr)
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/freadptr.c dc3dd-7.2.641/lib/freadptr.c
|
||||
--- dc3dd-7.2.641.orig/lib/freadptr.c 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/freadptr.c 2018-10-26 08:36:53.965310494 +0300
|
||||
@@ -29,7 +29,7 @@
|
||||
size_t size;
|
||||
|
||||
/* Keep this code in sync with freadahead! */
|
||||
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
if (fp->_IO_write_ptr > fp->_IO_write_base)
|
||||
return NULL;
|
||||
size = fp->_IO_read_end - fp->_IO_read_ptr;
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/freadseek.c dc3dd-7.2.641/lib/freadseek.c
|
||||
--- dc3dd-7.2.641.orig/lib/freadseek.c 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/freadseek.c 2018-10-26 08:49:35.387912087 +0300
|
||||
@@ -34,7 +34,7 @@
|
||||
freadptrinc (FILE *fp, size_t increment)
|
||||
{
|
||||
/* Keep this code in sync with freadptr! */
|
||||
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
fp->_IO_read_ptr += increment;
|
||||
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
|
||||
fp_->_p += increment;
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/fseeko.c dc3dd-7.2.641/lib/fseeko.c
|
||||
--- dc3dd-7.2.641.orig/lib/fseeko.c 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/fseeko.c 2018-10-26 08:51:02.841583936 +0300
|
||||
@@ -44,7 +44,7 @@
|
||||
#endif
|
||||
|
||||
/* These tests are based on fpurge.c. */
|
||||
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
if (fp->_IO_read_end == fp->_IO_read_ptr
|
||||
&& fp->_IO_write_ptr == fp->_IO_write_base
|
||||
&& fp->_IO_save_base == NULL)
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/fseterr.c dc3dd-7.2.641/lib/fseterr.c
|
||||
--- dc3dd-7.2.641.orig/lib/fseterr.c 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/fseterr.c 2018-10-26 08:47:51.209919605 +0300
|
||||
@@ -29,7 +29,7 @@
|
||||
/* Most systems provide FILE as a struct and the necessary bitmask in
|
||||
<stdio.h>, because they need it for implementing getc() and putc() as
|
||||
fast macros. */
|
||||
-#if defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
+#if defined _IO_EOF_SEEN || defined _IO_ferror_unlocked || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
|
||||
fp->_flags |= _IO_ERR_SEEN;
|
||||
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
|
||||
fp_->_flags |= __SERR;
|
||||
diff -Nuar dc3dd-7.2.641.orig/lib/stdio-impl.h dc3dd-7.2.641/lib/stdio-impl.h
|
||||
--- dc3dd-7.2.641.orig/lib/stdio-impl.h 2012-11-06 23:42:58.000000000 +0200
|
||||
+++ dc3dd-7.2.641/lib/stdio-impl.h 2018-10-26 08:46:26.136291709 +0300
|
||||
@@ -18,6 +18,12 @@
|
||||
the same implementation of stdio extension API, except that some fields
|
||||
have different naming conventions, or their access requires some casts. */
|
||||
|
||||
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
|
||||
+ problem by defining it ourselves. FIXME: Do not rely on glibc
|
||||
+ internals. */
|
||||
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
|
||||
+# define _IO_IN_BACKUP 0x100
|
||||
+#endif
|
||||
|
||||
/* BSD stdio derived implementations. */
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
From: Bruno Haible <bruno@clisp.org>
|
||||
Date: Thu, 17 Sep 2009 22:42:33 +0200
|
||||
Subject: Make getdate.y compile on QNX and NetBSD 5 / i386.
|
||||
|
||||
Forwarded: https://sourceforge.net/p/dc3dd/bugs/23/
|
||||
Origin: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a68c9ab3cfc8ac7cf2a709b0c1aa93229f8635e6
|
||||
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
||||
Upstream: https://sources.debian.org/patches/dc3dd/7.3.1-3/Make-getdate.y-compile-on-QNX-and-NetBSD-5-i386.patch/
|
||||
---
|
||||
lib/getdate.y | 33 ++++++++++++++++++++++-----------
|
||||
m4/getdate.m4 | 14 ++++++++++++++
|
||||
2 files changed, 36 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/lib/getdate.y b/lib/getdate.y
|
||||
index 1deec51..d2c23f2 100644
|
||||
--- a/lib/getdate.y
|
||||
+++ b/lib/getdate.y
|
||||
@@ -108,12 +108,21 @@
|
||||
|
||||
#define HOUR(x) ((x) * 60)
|
||||
|
||||
-/* Lots of this code assumes time_t and time_t-like values fit into
|
||||
- long int. It also assumes that signed integer overflow silently
|
||||
- wraps around, but there's no portable way to check for that at
|
||||
- compile-time. */
|
||||
+/* long_time_t is a signed integer type that contains all time_t values. */
|
||||
verify (TYPE_IS_INTEGER (time_t));
|
||||
-verify (LONG_MIN <= TYPE_MINIMUM (time_t) && TYPE_MAXIMUM (time_t) <= LONG_MAX);
|
||||
+#if TIME_T_FITS_IN_LONG_INT
|
||||
+typedef long int long_time_t;
|
||||
+#else
|
||||
+typedef time_t long_time_t;
|
||||
+#endif
|
||||
+
|
||||
+/* Lots of this code assumes time_t and time_t-like values fit into
|
||||
+ long_time_t. */
|
||||
+verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t)
|
||||
+ && TYPE_MAXIMUM (time_t) <= TYPE_MAXIMUM (long_time_t));
|
||||
+
|
||||
+/* FIXME: It also assumes that signed integer overflow silently wraps around,
|
||||
+ but this is not true any more with recent versions of GCC 4. */
|
||||
|
||||
/* An integer value, and the number of digits in its textual
|
||||
representation. */
|
||||
@@ -146,7 +155,7 @@ typedef struct
|
||||
long int day;
|
||||
long int hour;
|
||||
long int minutes;
|
||||
- long int seconds;
|
||||
+ long_time_t seconds;
|
||||
long int ns;
|
||||
} relative_time;
|
||||
|
||||
@@ -1492,20 +1501,22 @@ get_date (struct timespec *result, char const *p, struct timespec const *now)
|
||||
time_t t1 = t0 + d1;
|
||||
long int d2 = 60 * pc.rel.minutes;
|
||||
time_t t2 = t1 + d2;
|
||||
- long int d3 = pc.rel.seconds;
|
||||
- time_t t3 = t2 + d3;
|
||||
+ long_time_t d3 = pc.rel.seconds;
|
||||
+ long_time_t t3 = t2 + d3;
|
||||
long int d4 = (sum_ns - normalized_ns) / BILLION;
|
||||
- time_t t4 = t3 + d4;
|
||||
+ long_time_t t4 = t3 + d4;
|
||||
+ time_t t5 = t4;
|
||||
|
||||
if ((d1 / (60 * 60) ^ pc.rel.hour)
|
||||
| (d2 / 60 ^ pc.rel.minutes)
|
||||
| ((t1 < t0) ^ (d1 < 0))
|
||||
| ((t2 < t1) ^ (d2 < 0))
|
||||
| ((t3 < t2) ^ (d3 < 0))
|
||||
- | ((t4 < t3) ^ (d4 < 0)))
|
||||
+ | ((t4 < t3) ^ (d4 < 0))
|
||||
+ | (t5 != t4))
|
||||
goto fail;
|
||||
|
||||
- result->tv_sec = t4;
|
||||
+ result->tv_sec = t5;
|
||||
result->tv_nsec = normalized_ns;
|
||||
}
|
||||
}
|
||||
diff --git a/m4/getdate.m4 b/m4/getdate.m4
|
||||
index d160329..cfbb86f 100644
|
||||
--- a/m4/getdate.m4
|
||||
+++ b/m4/getdate.m4
|
||||
@@ -30,4 +30,18 @@ AC_DEFUN([gl_GETDATE],
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_REQUIRE([gl_CLOCK_TIME])
|
||||
AC_REQUIRE([gl_TM_GMTOFF])
|
||||
+ AC_COMPILE_IFELSE(
|
||||
+ [AC_LANG_SOURCE([[
|
||||
+#include <time.h> /* for time_t */
|
||||
+#include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
|
||||
+#define TYPE_MINIMUM(t) \
|
||||
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
|
||||
+#define TYPE_MAXIMUM(t) \
|
||||
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
|
||||
+typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
|
||||
+typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
|
||||
+ ]])],
|
||||
+ [AC_DEFINE([TIME_T_FITS_IN_LONG_INT], [1],
|
||||
+ [Define to 1 if all 'time_t' values fit in a 'long int'.])
|
||||
+ ])
|
||||
])
|
||||
39
package/dc3dd/0005-gcc15.patch
Normal file
39
package/dc3dd/0005-gcc15.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
Description: Fix FTBFS with GCC-15
|
||||
Origin: backport, https://build.opensuse.org/projects/security:forensics/packages/dc3dd/files/dc3dd-gcc15.patch
|
||||
Bug: https://sourceforge.net/p/dc3dd/bugs/24/
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096508
|
||||
Forwarded: not-needed
|
||||
Reviewed-by: Sven Geuer <sge@debian.org>
|
||||
Last-Update: 2025-09-25
|
||||
|
||||
Upstream: https://sourceforge.net/p/dc3dd/bugs/24/
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
Index: dc3dd-7.3.1/lib/posixtm.c
|
||||
===================================================================
|
||||
--- dc3dd-7.3.1.orig/lib/posixtm.c
|
||||
+++ dc3dd-7.3.1/lib/posixtm.c
|
||||
@@ -41,7 +41,7 @@
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
|
||||
|
||||
-time_t mktime ();
|
||||
+time_t mktime (struct tm *tm);
|
||||
|
||||
/*
|
||||
POSIX requires:
|
||||
Index: dc3dd-7.3.1/m4/jm-macros.m4
|
||||
===================================================================
|
||||
--- dc3dd-7.3.1.orig/m4/jm-macros.m4
|
||||
+++ dc3dd-7.3.1/m4/jm-macros.m4
|
||||
@@ -38,7 +38,7 @@ AC_DEFUN([coreutils_MACROS],
|
||||
# By default, argmatch should fail calling usage (1).
|
||||
AC_DEFINE(ARGMATCH_DIE, [usage (1)],
|
||||
[Define to the function xargmatch calls on failures.])
|
||||
- AC_DEFINE(ARGMATCH_DIE_DECL, [void usage ()],
|
||||
+ AC_DEFINE(ARGMATCH_DIE_DECL, [void usage (int)],
|
||||
[Define to the declaration of the xargmatch failure function.])
|
||||
|
||||
# used by ls
|
||||
21
package/dc3dd/Config.in
Normal file
21
package/dc3dd/Config.in
Normal file
@@ -0,0 +1,21 @@
|
||||
config BR2_PACKAGE_DC3DD
|
||||
bool "dc3dd"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on !BR2_RISCV_32
|
||||
depends on !BR2_arc
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_TOOLCHAIN_USES_MUSL
|
||||
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/
|
||||
|
||||
comment "dc3dd needs a glibc or uClibc toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_RISCV_32
|
||||
depends on !BR2_arc
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_TOOLCHAIN_USES_MUSL
|
||||
5
package/dc3dd/dc3dd.hash
Normal file
5
package/dc3dd/dc3dd.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# From https://sourceforge.net/projects/dc3dd/files/dc3dd/7.2/
|
||||
sha1 1bfe81a921a8473a6ecb46f328ecaab761afb55d dc3dd-7.2.641.tar.xz
|
||||
# Locally computed
|
||||
sha256 7f50aadc38649845ab11014d11013928411c9d2128c941e9630939d4c28cae6d dc3dd-7.2.641.tar.xz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
|
||||
21
package/dc3dd/dc3dd.mk
Normal file
21
package/dc3dd/dc3dd.mk
Normal file
@@ -0,0 +1,21 @@
|
||||
################################################################################
|
||||
#
|
||||
# dc3dd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DC3DD_VERSION_MAJOR = 7.2
|
||||
DC3DD_VERSION = $(DC3DD_VERSION_MAJOR).641
|
||||
DC3DD_SOURCE = dc3dd-$(DC3DD_VERSION).tar.xz
|
||||
DC3DD_SITE = https://downloads.sourceforge.net/project/dc3dd/dc3dd/$(DC3DD_VERSION_MAJOR)
|
||||
DC3DD_LICENSE = GPL-3.0+
|
||||
DC3DD_LICENSE_FILES = COPYING
|
||||
DC3DD_DEPENDENCIES = host-bison
|
||||
# We are patching Makefile.am, so we need to autoreconf. We also need to
|
||||
# enable autopoint as dc3dd comes with an old gettext infra.
|
||||
DC3DD_AUTORECONF = YES
|
||||
DC3DD_AUTOPOINT = YES
|
||||
|
||||
DC3DD_CONF_ENV = ac_cv_func_working_mktime=yes
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user