Accepting request 906705 from home:dspinella:branches:Archiving

- Update to 0.4b47:
  * Fix missing lzo return (Alexey Svistunov).
  * Fix building with OpenSSL 1.1 (Daniel Molkentin).
  * Fix bashisms in examples (Oleksandr Chumachenko).
  * Use xattrs funcs from the C library (Vaclav Dolezal).
  * Fix date mangling in man pages (Mike Frysinger).
  * Force -fcommon when building (Mike Frysinger).
  * Add error checking to SSL init transformation (Mike Frysinger).
  * Fix restore -C calls with ftruncate (Alexander Zangerl).
  * Restore symlink timestamps (Alexander Zangerl).
- Remove upstreamed patches:
  * dump-0.4b43-fix-bashisms.patch
  * dump-0.4b46-lzo-no-return.patch
  * dump-0.4b46-openssl-1.1.patch
- Run spec-cleaner

OBS-URL: https://build.opensuse.org/request/show/906705
OBS-URL: https://build.opensuse.org/package/show/Archiving/dump?expand=0&rev=26
This commit is contained in:
Marcus Meissner 2021-07-19 09:20:19 +00:00 committed by Git OBS Bridge
parent ac70c346b5
commit 2d414dde6d
7 changed files with 31 additions and 163 deletions

View File

@ -1,33 +0,0 @@
diff -Ndur dump-0.4b43/examples/dump_on_cd_3/dump_disk dump-0.4b43-fix-bashisms/examples/dump_on_cd_3/dump_disk
--- dump-0.4b43/examples/dump_on_cd_3/dump_disk 2005-01-13 14:13:56.000000000 +0200
+++ dump-0.4b43-fix-bashisms/examples/dump_on_cd_3/dump_disk 2014-11-17 00:22:03.323002531 +0200
@@ -55,14 +55,14 @@
while [ "$ANSWER" != "y" ] ; do
echo -n "Is the disk ready? (y/n) "
read </dev/tty ANSWER
- if [ "$ANSWER" == "y" ] ; then
+ if [ "$ANSWER" = "y" ] ; then
(${RECORD_BIN}${1}) &
return 0
- elif [ "$ANSWER" == "n" ] ; then
+ elif [ "$ANSWER" = "n" ] ; then
EXIT=""
echo -n "Do you really want to exit? (y/n) "
read </dev/tty EXIT
- if [ "$EXIT" == "y" ] ; then
+ if [ "$EXIT" = "y" ] ; then
return 1
fi
fi
diff -Ndur dump-0.4b43/examples/remote_backup_ssh/backitup dump-0.4b43-fix-bashisms/examples/remote_backup_ssh/backitup
--- dump-0.4b43/examples/remote_backup_ssh/backitup 2001-11-11 01:56:07.000000000 +0200
+++ dump-0.4b43-fix-bashisms/examples/remote_backup_ssh/backitup 2014-11-17 00:22:30.163000715 +0200
@@ -41,7 +41,7 @@
# backup FILESYSTEMS to the TAPEDEV on TAPEHOST with DUMP as OPERATOR using RSH
export RMT RSH
-mkdir -p $LOGDIR &> /dev/null
+mkdir -p $LOGDIR > /dev/null 2>&1
ssh-add ~/.ssh/id_dsa
echo "Rewinding tape..."

View File

@ -1,17 +0,0 @@
From: Alexey Svistunov <svalx@svalx.net>
Date: 2017-03-15 15:48:22 +0300
Subject: Fixing rpmlint no-return-in-nonvoid-function error in dump
References: https://sourceforge.net/u/svalx1/dump/ci/7b36fa5f01cfb42e6dc9af83b444524ca1d2d4e9/
Upstream: merged
Index: dump-0.4b46/common/transformation_lzo.c
===================================================================
--- dump-0.4b46.orig/common/transformation_lzo.c
+++ dump-0.4b46/common/transformation_lzo.c
@@ -13,6 +13,7 @@
static int
lzo_initialize(Transformation *xform, int enc)
{
+ return 0;
}
/*

View File

@ -1,91 +0,0 @@
Index: dump-0.4b46/common/transformation_ssl.c
===================================================================
--- dump-0.4b46.orig/common/transformation_ssl.c
+++ dump-0.4b46/common/transformation_ssl.c
@@ -215,7 +215,10 @@ generateIV(Transformation *xform, unsign
/* to be exposed to any attacker anyway. */
*saltlen = 16;
if (xform->enc == 1) {
- RAND_pseudo_bytes(salt, *saltlen);
+ if (!RAND_bytes(salt, *saltlen) != 1) {
+ /* PRNG not sufficiently seeded */
+ return -1;
+ }
}
memcpy(ivbuffer, salt, 16);
@@ -274,7 +277,7 @@ ssl_compress(Transformation *xform, stru
digestlen = sizeof(digest);
/* generate salt, put it in header */
- generateIV(xform, salt, &saltlen, iv, &ivlen);
+ generateIV(xform, salt, &saltlen, iv, &ivlen); /* TODO: check return value */
memcpy(tpbin->buf, salt, saltlen);
/* compress the buffer first - increase the entropy */
@@ -351,7 +354,7 @@ ssl_decompress(Transformation *xform, st
// how to know salt length?
memcpy(salt, src, saltlen);
- generateIV(xform, salt, &saltlen, iv, &ivlen);
+ generateIV(xform, salt, &saltlen, iv, &ivlen); /* TODO: check return value */
EVP_DecryptInit_ex(xform->state.ssl.dataCtx, xform->state.ssl.cipher, xform->state.ssl.engine, NULL, NULL);
//EVP_CIPHER_CTX_set_key_length(&ctx, 8);
@@ -515,7 +518,7 @@ Transformation
//EVP_CIPHER_CTX_rand_key(ctx, t->state.ssl.key);
//EVP_CIPHER_CTX_cleanup(ctx);
//EVP_CIPHER_CTX_free(ctx);
- RAND_bytes(t->state.ssl.key, t->state.ssl.cipher->key_len);
+ RAND_bytes(t->state.ssl.key, EVP_CIPHER_key_length(t->state.ssl.cipher));
} else {
// how do we get keys?
}
Index: dump-0.4b46/rmt/cipher.c
===================================================================
--- dump-0.4b46.orig/rmt/cipher.c
+++ dump-0.4b46/rmt/cipher.c
@@ -23,7 +23,7 @@
char *
cipher(char *buf, int buflen, int do_encrypt)
{
- static EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
static char *out = NULL; /* return value, grown as necessary */
static int outlen = 0;
static int init = 0, which, blocksize;
@@ -71,13 +71,13 @@ cipher(char *buf, int buflen, int do_enc
}
EVP_BytesToKey(cipher, EVP_md5(), NULL,
buf, strlen(buf), 1, key, iv);
- EVP_CIPHER_CTX_init(&ctx);
- EVP_CipherInit_ex(&ctx, cipher, NULL, key, iv, do_encrypt);
- EVP_CIPHER_CTX_set_padding(&ctx, 0); // -nopad
+ EVP_CIPHER_CTX_init(ctx);
+ EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, do_encrypt);
+ EVP_CIPHER_CTX_set_padding(ctx, 0); // -nopad
OPENSSL_cleanse(buf, sizeof buf);
OPENSSL_cleanse(key, sizeof key);
OPENSSL_cleanse(iv, sizeof iv);
- blocksize = EVP_CIPHER_CTX_block_size(&ctx);
+ blocksize = EVP_CIPHER_CTX_block_size(ctx);
which = do_encrypt;
init = 1;
}
@@ -95,7 +95,7 @@ cipher(char *buf, int buflen, int do_enc
outlen = (buflen+blocksize) * 2;
out = realloc(out, outlen);
}
- if (!EVP_CipherUpdate(&ctx, out, &n, buf, buflen)) {
+ if (!EVP_CipherUpdate(ctx, out, &n, buf, buflen)) {
syslog(LOG_ERR, "EVP_CipherUpdate failed");
errno = EINVAL;
return NULL;
@@ -106,6 +106,7 @@ cipher(char *buf, int buflen, int do_enc
return NULL;
}
// assert(ctx->buf_len == 0);
+ EVP_CIPHER_CTX_free(ctx);
return out;
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8061d927dd1ae98e0a1bd70406cde5ecbced154507460629be174c55822f2f97
size 578200

3
dump-0.4b47.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d021acde4fbbed3d93ebad981422f671f48d66b29ec88d7de83642ecfbff4fd0
size 583380

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Jul 16 15:28:17 UTC 2021 - Danilo Spinella <danilo.spinella@suse.com>
- Update to 0.4b47:
* Fix missing lzo return (Alexey Svistunov).
* Fix building with OpenSSL 1.1 (Daniel Molkentin).
* Fix bashisms in examples (Oleksandr Chumachenko).
* Use xattrs funcs from the C library (Vaclav Dolezal).
* Fix date mangling in man pages (Mike Frysinger).
* Force -fcommon when building (Mike Frysinger).
* Add error checking to SSL init transformation (Mike Frysinger).
* Fix restore -C calls with ftruncate (Alexander Zangerl).
* Restore symlink timestamps (Alexander Zangerl).
- Remove upstreamed patches:
* dump-0.4b43-fix-bashisms.patch
* dump-0.4b46-lzo-no-return.patch
* dump-0.4b46-openssl-1.1.patch
- Run spec-cleaner
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Mar 29 21:05:53 UTC 2020 - Kristyna Streitova <kstreitova@suse.com> Sun Mar 29 21:05:53 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package dump # spec file for package dump
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: dump Name: dump
Version: 0.4b46 Version: 0.4b47
Release: 0 Release: 0
Summary: Programs for backing up and restoring ext2/3/4 filesystems Summary: Programs for backing up and restoring ext2/3/4 filesystems
License: BSD-3-Clause License: BSD-3-Clause
@ -32,12 +32,6 @@ Patch0: %{name}-0.4b46-pathnames.patch
# ermt build, change its locations to _bindir # ermt build, change its locations to _bindir
Patch1: %{name}-0.4b46-rmt-ermt.patch Patch1: %{name}-0.4b46-rmt-ermt.patch
Patch3: %{name}-0.4b43-include.patch Patch3: %{name}-0.4b43-include.patch
Patch4: %{name}-0.4b43-fix-bashisms.patch
# PATCH-FIX-UPSTREAM dump-0.4b46-lzo-no-return.patch svalx@svalx.net -- fixing rpmlint
# no-return-in-nonvoid-function error in dump
Patch5: %{name}-0.4b46-lzo-no-return.patch
# PATCH-FIX-SUSE dump-0.4b46-pathnames.patch daniel.molkentin@suse.com -- openssl 1.1 support
Patch6: %{name}-0.4b46-openssl-1.1.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: e2fsprogs-devel BuildRequires: e2fsprogs-devel
@ -63,7 +57,7 @@ restore a full backup of a file system.
Summary: Provides certain programs with access to remote tape devices Summary: Provides certain programs with access to remote tape devices
Group: Productivity/Archiving/Backup Group: Productivity/Archiving/Backup
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun): update-alternatives Requires(postun):update-alternatives
Provides: rmt Provides: rmt
%description rmt %description rmt
@ -77,9 +71,6 @@ cp %{SOURCE1} rmt/
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch3 %patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build %build
autoreconf -fiv autoreconf -fiv
@ -90,7 +81,7 @@ export CFLAGS="%{optflags} -fcommon"
--enable-ermt \ --enable-ermt \
--enable-rmt=no \ --enable-rmt=no \
--with-rmtpath=%{_bindir} --with-rmtpath=%{_bindir}
make %{?_smp_mflags} %make_build
%install %install
%make_install %make_install
@ -111,20 +102,19 @@ if [ ! -f %{_bindir}/ermt ] ; then
fi fi
%files %files
%defattr(-, root, root)
%{_sbindir}/dump %{_sbindir}/dump
%{_sbindir}/restore %{_sbindir}/restore
%{_mandir}/man8/dump.8%{ext_man} %{_mandir}/man8/dump.8%{?ext_man}
%{_mandir}/man8/restore.8%{ext_man} %{_mandir}/man8/restore.8%{?ext_man}
%doc NEWS COPYING KNOWNBUGS MAINTAINERS README REPORTING-BUGS %license COPYING
%doc NEWS KNOWNBUGS MAINTAINERS README REPORTING-BUGS
%doc AUTHORS TODO dump.lsm examples %doc AUTHORS TODO dump.lsm examples
%files rmt %files rmt
%defattr(-,root,root)
%ghost %{_bindir}/rmt %ghost %{_bindir}/rmt
%{_bindir}/ermt %{_bindir}/ermt
%ghost %{_mandir}/man1/rmt.1%{ext_man} %ghost %{_mandir}/man1/rmt.1%{ext_man}
%{_mandir}/man1/ermt.1%{ext_man} %{_mandir}/man1/ermt.1%{?ext_man}
%ghost %{_sysconfdir}/alternatives/rmt %ghost %{_sysconfdir}/alternatives/rmt
%ghost %{_sysconfdir}/alternatives/rmt.1%{ext_man} %ghost %{_sysconfdir}/alternatives/rmt.1%{ext_man}
%doc encrypted_rmt/README %doc encrypted_rmt/README