Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Michal Ambroz
97b70fdff3 add patch from Archlinux to fix FTBFS 2019-10-20 15:26:22 +02:00
2 changed files with 120 additions and 12 deletions

View file

@ -0,0 +1,100 @@
Description: fix a FTBFS with glibc 2.28
Author: mschlenker
Origin: https://aur.archlinux.org/packages/dc3dd/
Bug-Debian: https://bugs.debian.org/915431
Forwarded: https://sourceforge.net/p/dc3dd/bugs/19/
Reviewed-By: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2018-10-17
--- dc3dd-7.2.646.orig/lib/fpurge.c
+++ dc3dd-7.2.646/lib/fpurge.c
@@ -61,7 +61,7 @@ fpurge (FILE *fp)
/* 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 || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
fp->_IO_read_end = fp->_IO_read_ptr;
fp->_IO_write_ptr = fp->_IO_write_base;
/* Avoid memory leak when there is an active ungetc buffer. */
--- dc3dd-7.2.646.orig/lib/freadahead.c
+++ dc3dd-7.2.646/lib/freadahead.c
@@ -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 || __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)
--- dc3dd-7.2.646.orig/lib/freading.c
+++ dc3dd-7.2.646/lib/freading.c
@@ -31,7 +31,7 @@ freading (FILE *fp)
/* 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 || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Linux libc5 */
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
--- dc3dd-7.2.646.orig/lib/freadptr.c
+++ dc3dd-7.2.646/lib/freadptr.c
@@ -29,7 +29,7 @@ freadptr (FILE *fp, size_t *sizep)
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 || __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;
--- dc3dd-7.2.646.orig/lib/freadseek.c
+++ dc3dd-7.2.646/lib/freadseek.c
@@ -34,7 +34,7 @@ static inline void
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 || __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;
--- dc3dd-7.2.646.orig/lib/fseeko.c
+++ dc3dd-7.2.646/lib/fseeko.c
@@ -44,7 +44,7 @@ rpl_fseeko (FILE *fp, off_t offset, int
#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 || __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)
--- dc3dd-7.2.646.orig/lib/fseterr.c
+++ dc3dd-7.2.646/lib/fseterr.c
@@ -29,7 +29,7 @@ fseterr (FILE *fp)
/* 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 || __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;
--- dc3dd-7.2.646.orig/lib/stdio-impl.h
+++ dc3dd-7.2.646/lib/stdio-impl.h
@@ -18,6 +18,13 @@
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. */

View file

@ -1,6 +1,6 @@
Name: dc3dd
Version: 7.2.646
Release: 7%{?dist}
Release: 8%{?dist}
Summary: Patched version of GNU dd for use in computer forensics
License: GPLv2+ and GPLv3+
@ -11,6 +11,11 @@ Source0: http://downloads.sourceforge.net/dc3dd/%{name}-%{version}.7z
#Removing the check for AM_C_PROTOTYPES
Patch0: dc3dd-automake.patch
# Original Archlinux patch to fix build wiht recent libtools version
# Author: mschlenker
Patch1: dc3dd-30_fix-FTBFS-with-glibc-2.28.patch
BuildRequires: gcc
BuildRequires: git
BuildRequires: gettext
@ -25,30 +30,30 @@ dc3dd is a patched version of GNU dd to include a number of features useful
for computer forensics. Many of these features were inspired by dcfldd, but
were rewritten for dc3dd.
* Pattern writes. The program can write a single hexadecimal value or a
* Pattern writes. The program can write a single hexadecimal value or a
text string to the output device for wiping purposes.
* Piecewise and overall hashing with multiple algorithms and variable
* Piecewise and overall hashing with multiple algorithms and variable
size windows. Supports MD5, SHA-1, SHA-256, and SHA-512. Hashes can be
computed before or after conversions are made.
* Progress meter with automatic input/output file size probing
* Combined log for hashes and errors
* Error grouping. Produces one error message for identical sequential
* Progress meter with automatic input/output file size probing
* Combined log for hashes and errors
* Error grouping. Produces one error message for identical sequential
errors
* Verify mode. Able to repeat any transformations done to the input
* Verify mode. Able to repeat any transformations done to the input
file and compare it to an output.
* Ability to split the output into chunks with numerical or alphabetic
* Ability to split the output into chunks with numerical or alphabetic
extensions
%prep
%autosetup -S git
# Update the embedded gnulib library files
gnulib-tool --update
#Missing x flag in version 7.2.646 makes the build fail
chmod +x build-aux/git-version-gen configure
# ChangeLog having wrong ends of lines
sed -i -e 's|\r||g' ChangeLog
%build
autoreconf -vif #BZ925238 - support aarch64
@ -68,11 +73,14 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_mandir}/man1/%{name}.*
%changelog
* Sun Oct 20 2019 Michal Ambroz <rebus [AT] seznam.cz> - 7.2.646-8
- use Archlinux patch to fix FTBFS, do not update gnulib embedded library files
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.646-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 28 2018 Michal Ambroz <rebus [AT] seznam.cz> - 7.2.646-6
- fix FTBS, update gnulib embedded library files
- fix FTBFS, update gnulib embedded library files
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.646-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild