From 2d414dde6d250be52f2591d92c5c69c2f22e55226f428cd17c8328b9b6a68cb7 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 19 Jul 2021 09:20:19 +0000 Subject: [PATCH] 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 --- dump-0.4b43-fix-bashisms.patch | 33 ------------ dump-0.4b46-lzo-no-return.patch | 17 ------ dump-0.4b46-openssl-1.1.patch | 91 --------------------------------- dump-0.4b46.tar.gz | 3 -- dump-0.4b47.tar.gz | 3 ++ dump.changes | 19 +++++++ dump.spec | 28 ++++------ 7 files changed, 31 insertions(+), 163 deletions(-) delete mode 100644 dump-0.4b43-fix-bashisms.patch delete mode 100644 dump-0.4b46-lzo-no-return.patch delete mode 100644 dump-0.4b46-openssl-1.1.patch delete mode 100644 dump-0.4b46.tar.gz create mode 100644 dump-0.4b47.tar.gz diff --git a/dump-0.4b43-fix-bashisms.patch b/dump-0.4b43-fix-bashisms.patch deleted file mode 100644 index 06600fd..0000000 --- a/dump-0.4b43-fix-bashisms.patch +++ /dev/null @@ -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/null -+mkdir -p $LOGDIR > /dev/null 2>&1 - ssh-add ~/.ssh/id_dsa - - echo "Rewinding tape..." diff --git a/dump-0.4b46-lzo-no-return.patch b/dump-0.4b46-lzo-no-return.patch deleted file mode 100644 index f87c5b6..0000000 --- a/dump-0.4b46-lzo-no-return.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Alexey Svistunov -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; - } - - /* diff --git a/dump-0.4b46-openssl-1.1.patch b/dump-0.4b46-openssl-1.1.patch deleted file mode 100644 index bffc1c1..0000000 --- a/dump-0.4b46-openssl-1.1.patch +++ /dev/null @@ -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; - } - diff --git a/dump-0.4b46.tar.gz b/dump-0.4b46.tar.gz deleted file mode 100644 index 29d02e0..0000000 --- a/dump-0.4b46.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8061d927dd1ae98e0a1bd70406cde5ecbced154507460629be174c55822f2f97 -size 578200 diff --git a/dump-0.4b47.tar.gz b/dump-0.4b47.tar.gz new file mode 100644 index 0000000..63b6231 --- /dev/null +++ b/dump-0.4b47.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d021acde4fbbed3d93ebad981422f671f48d66b29ec88d7de83642ecfbff4fd0 +size 583380 diff --git a/dump.changes b/dump.changes index d64fc66..cc31052 100644 --- a/dump.changes +++ b/dump.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Fri Jul 16 15:28:17 UTC 2021 - Danilo Spinella + +- 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 diff --git a/dump.spec b/dump.spec index 5a44d5f..759aa7e 100644 --- a/dump.spec +++ b/dump.spec @@ -1,7 +1,7 @@ # # 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 # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: dump -Version: 0.4b46 +Version: 0.4b47 Release: 0 Summary: Programs for backing up and restoring ext2/3/4 filesystems License: BSD-3-Clause @@ -32,12 +32,6 @@ Patch0: %{name}-0.4b46-pathnames.patch # ermt build, change its locations to _bindir Patch1: %{name}-0.4b46-rmt-ermt.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: automake 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 Group: Productivity/Archiving/Backup Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives Provides: rmt %description rmt @@ -77,9 +71,6 @@ cp %{SOURCE1} rmt/ %patch0 -p1 %patch1 -p1 %patch3 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %build autoreconf -fiv @@ -90,7 +81,7 @@ export CFLAGS="%{optflags} -fcommon" --enable-ermt \ --enable-rmt=no \ --with-rmtpath=%{_bindir} -make %{?_smp_mflags} +%make_build %install %make_install @@ -111,20 +102,19 @@ if [ ! -f %{_bindir}/ermt ] ; then fi %files -%defattr(-, root, root) %{_sbindir}/dump %{_sbindir}/restore -%{_mandir}/man8/dump.8%{ext_man} -%{_mandir}/man8/restore.8%{ext_man} -%doc NEWS COPYING KNOWNBUGS MAINTAINERS README REPORTING-BUGS +%{_mandir}/man8/dump.8%{?ext_man} +%{_mandir}/man8/restore.8%{?ext_man} +%license COPYING +%doc NEWS KNOWNBUGS MAINTAINERS README REPORTING-BUGS %doc AUTHORS TODO dump.lsm examples %files rmt -%defattr(-,root,root) %ghost %{_bindir}/rmt %{_bindir}/ermt %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.1%{ext_man} %doc encrypted_rmt/README