Compare commits

...

No commits in common. "c8s" and "c9s" have entirely different histories.
c8s ... c9s

9 changed files with 306 additions and 22 deletions

View File

@ -1 +1 @@
f689ac9ead0d853dc6d8a6359e4c7ce7fd39df95 SOURCES/dump-0.4b46.tar.gz
16f1c6c69e920b640f25acf24dbb2a875018e06a dump-0.4b47.tar.gz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/dump-0.4b46.tar.gz
/dump-0.4b47.tar.gz

35
dump-apath.patch Normal file
View File

@ -0,0 +1,35 @@
diff --git a/common/legacy_indexer.c b/common/legacy_indexer.c
index c60830c..e4aa16d 100644
--- a/common/legacy_indexer.c
+++ b/common/legacy_indexer.c
@@ -41,8 +41,7 @@ extern int tapeno;
extern int Afile; /* archive file descriptor */
static int AfileActive = 1;/* Afile flag */
-//extern char *Apath;
-char *Apath;
+extern char *Apath;
#ifdef USE_QFA
static int GetTapePos (long long *);
diff --git a/dump/main.c b/dump/main.c
index 98c2333..a42182f 100644
--- a/dump/main.c
+++ b/dump/main.c
@@ -104,6 +104,7 @@ char *dumpdates; /* name of the file containing dump date information*/
char lastlevel[NUM_STR_SIZE];/* dump level of previous dump */
char level[NUM_STR_SIZE];/* dump level of this dump */
int zipflag; /* which compression method */
+char *Apath; /* archive file name */
int Afile = -1; /* archive file descriptor */
int uflag; /* update flag */
int mflag; /* dump metadata only if possible */
@@ -211,7 +212,7 @@ main(int argc, char *argv[])
#endif
time_t tnow;
char *diskparam;
- char *Apath = NULL;
+ Apath = NULL;
spcl.c_label[0] = '\0';
spcl.c_date = time(NULL);

133
dump-glibc_xattr.patch Normal file
View File

@ -0,0 +1,133 @@
From 996ac7b862d598ab77436bdff750718d00c714a9 Mon Sep 17 00:00:00 2001
From: Vaclav Dolezal <vdolezal@redhat.com>
Date: Wed, 6 Mar 2019 11:37:50 +0100
Subject: [PATCH] Use xattr functions from libc
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
---
restore/xattr.c | 95 +------------------------------------------------
1 file changed, 1 insertion(+), 94 deletions(-)
diff --git a/restore/xattr.c b/restore/xattr.c
index 0c1b547..9f80da6 100644
--- a/restore/xattr.c
+++ b/restore/xattr.c
@@ -30,6 +30,7 @@
#include <config.h>
#include <compaterr.h>
#include <sys/types.h>
+#include <sys/xattr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -118,82 +119,6 @@ struct ext2_xattr_entry {
(entry)->e_value_offs + sizeof(struct ext3_xattr_ibody_header) : \
(entry)->e_value_offs))
-/*
- * xattr syscalls do not exist yet in libc, get our own copy here,
- * taken from libattr.
- */
-#if defined (__i386__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 227
-# define __NR_lgetxattr 230
-# define __NR_llistxattr 233
-#elif defined (__sparc__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 170
-# define __NR_lgetxattr 173
-# define __NR_llistxattr 179
-#elif defined (__ia64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 1218
-# define __NR_lgetxattr 1221
-# define __NR_llistxattr 1224
-#elif defined (__powerpc__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 210
-# define __NR_lgetxattr 213
-# define __NR_llistxattr 216
-#elif defined (__x86_64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 189
-# define __NR_lgetxattr 192
-# define __NR_llistxattr 195
-#elif defined (__s390__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 225
-# define __NR_lgetxattr 228
-# define __NR_llistxattr 231
-#elif defined (__arm__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_SYSCALL_BASE 0x900000
-# define __NR_lsetxattr (__NR_SYSCALL_BASE+227)
-# define __NR_lgetxattr (__NR_SYSCALL_BASE+230)
-# define __NR_llistxattr (__NR_SYSCALL_BASE+233)
-#elif defined (__mips64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_Linux 5000
-# define __NR_lsetxattr (__NR_Linux + 218)
-# define __NR_lgetxattr (__NR_Linux + 221)
-# define __NR_llistxattr (__NR_Linux + 224)
-#elif defined (__mips__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_Linux 4000
-# define __NR_lsetxattr (__NR_Linux + 225)
-# define __NR_lgetxattr (__NR_Linux + 228)
-# define __NR_llistxattr (__NR_Linux + 231)
-#elif defined (__alpha__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 383
-# define __NR_lgetxattr 386
-# define __NR_llistxattr 389
-#elif defined (__mc68000__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr 224
-# define __NR_lgetxattr 227
-# define __NR_llistxattr 230
-#else
-# warning "Extended attribute syscalls undefined for this architecture"
-# define HAVE_XATTR_SYSCALLS 0
-#endif
-
-#if HAVE_XATTR_SYSCALLS
-# define SYSCALL(args...) syscall(args)
-#else
-# define SYSCALL(args...) ( errno = ENOSYS, -1 )
-#endif
-
-static int lsetxattr (const char *, const char *, void *, size_t, int);
-static ssize_t lgetxattr (const char *, const char *, void *, size_t);
-static ssize_t llistxattr (const char *, char *, size_t);
static int xattr_cb_list (char *, char *, int, int, void *);
static int xattr_cb_set (char *, char *, int, int, void *);
static int xattr_cb_compare (char *, char *, int, int, void *);
@@ -201,24 +126,6 @@ static int xattr_verify (char *);
static int xattr_count (char *, int *);
static int xattr_walk (char *, int (*)(char *, char *, int, int, void *), void *);
-static int
-lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
-{
- return SYSCALL(__NR_lsetxattr, path, name, value, size, flags);
-}
-
-static ssize_t
-lgetxattr(const char *path, const char *name, void *value, size_t size)
-{
- return SYSCALL(__NR_lgetxattr, path, name, value, size);
-}
-
-static ssize_t
-llistxattr(const char *path, char *list, size_t size)
-{
- return SYSCALL(__NR_llistxattr, path, list, size);
-}
-
#define POSIX_ACL_XATTR_VERSION 0x0002
#define ACL_UNDEFINED_ID (-1)
--
2.20.1

51
dump-replacement.patch Normal file
View File

@ -0,0 +1,51 @@
diff -urNp a/common/dumprmt.c b/common/dumprmt.c
--- a/common/dumprmt.c 2021-02-08 13:23:33.366826516 +0100
+++ b/common/dumprmt.c 2021-02-08 13:26:13.725243819 +0100
@@ -83,7 +83,6 @@
#endif
#include <pathnames.h>
-#include "dump.h" /* for X_STARTUP, X_ABORT etc */
#define TS_CLOSED 0
#define TS_OPEN 1
@@ -150,7 +149,7 @@ rmtconnaborted(UNUSED(int signo))
}
}
if (abortifconnerr)
- exit(X_ABORT);
+ exit(3);
}
static int
@@ -196,7 +195,7 @@ rmtgetconn(void)
*cp = '\0';
if (!okname(tuser)) {
if (abortifconnerr) {
- exit(X_STARTUP);
+ exit(1);
} else {
return 0;
}
diff -urNp a/configure.ac b/configure.ac
--- a/configure.ac 2021-02-08 13:23:33.353826407 +0100
+++ b/configure.ac 2021-02-08 14:44:18.373749348 +0100
@@ -479,7 +479,6 @@ AC_CONFIG_FILES(m4_flatten([
Makefile
common/Makefile
compat/lib/Makefile
- dump/Makefile
restore/Makefile
rmt/Makefile
]))
diff -urNp a/Makefile.am b/Makefile.am
--- a/Makefile.am 2021-02-08 13:23:33.355826423 +0100
+++ b/Makefile.am 2021-02-08 13:45:19.619244125 +0100
@@ -1,6 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = compat/lib common dump restore
+SUBDIRS = compat/lib common restore
if BUILD_RMT
SUBDIRS += rmt
endif

View File

@ -1,18 +1,23 @@
%define PREVER b46
%define PREVER b47
%define DUMP_VERSION 0.4%{PREVER}
%define _legacy_common_support 1
%if 0%{?rhel}
Summary: Program for restoring ext2/ext3 filesystems
Name: restore
%else
Summary: Programs for backing up and restoring ext2/ext3/ext4 filesystems
Name: dump
%endif
Epoch: 1
Version: 0.4
Release: 0.36.%{PREVER}%{?dist}
Release: 0.48.%{PREVER}%{?dist}
License: BSD
Group: Applications/Archiving
URL: http://dump.sourceforge.net/
URL: https://sourceforge.net/projects/dump/
Source: http://downloads.sourceforge.net/dump/dump-%{DUMP_VERSION}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: e2fsprogs-devel >= 1.18, readline-devel >= 4.2
BuildRequires: zlib-devel, bzip2-devel, automake
BuildRequires: zlib-devel, bzip2-devel, automake, make
BuildRequires: device-mapper-devel, libselinux-devel
BuildRequires: lzo-minilzo
BuildRequires: lzo-devel, libtool
@ -20,12 +25,28 @@ BuildRequires: lzo-devel, libtool
# group is created before installation (#60461)
Requires: setup
Requires: rmt
Obsoletes: dump-static
%if 0%{?fedora}
Obsoletes: dump-static <= 0.4
Provides: dump-static
%endif
Patch0: dump-buildfix.patch
Patch1: dump-remove-lzo.patch
Patch2: dump-apath.patch
%if 0%{?rhel}
# No dump package in RHEL (restore remains)
Patch101: dump-replacement.patch
%description
The restore command performs the inverse function of dump; it can
restore a full backup of a filesystem. Subsequent incremental backups
can then be layered on top of the full backup. Single files and
directory subtrees may also be restored from full or partial backups.
Install restore if you need restoring filesystems after backups
made by dump.
%else
%description
The dump package contains both dump and restore. Dump examines files
in a filesystem, determines which ones need to be backed up, and
@ -37,18 +58,19 @@ directory subtrees may also be restored from full or partial backups.
Install dump if you need a system for both backing up filesystems and
restoring filesystems after backups.
%endif
%prep
%setup -q -n dump-%{DUMP_VERSION}
%patch0 -p1 -b .buildfix
%patch1 -p1 -b .remove-lzo
%patch2 -p1 -b .apath
for i in MAINTAINERS COPYING ChangeLog; do
iconv -f iso-8859-1 -t utf-8 $i -o $i.new
touch -r $i $i.new
mv $i.new $i
done
%if 0%{?rhel}
rm -rf dump
%patch101 -p1
%endif
%build
autoreconf -fiv
@ -68,14 +90,14 @@ export CFLAGS="$RPM_OPT_FLAGS -Wall -Wpointer-arith -Wstrict-prototypes \
--with-mangrp=root \
--with-manmode=0644
make %{?_smp_mflags}
%make_build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_mandir}/man8
%makeinstall INSTALL="install -p" \
%make_install \
SBINDIR=%{buildroot}%{_sbindir} \
BINDIR=%{buildroot}%{_sbindir} \
MANDIR=%{buildroot}%{_mandir}/man8 \
@ -85,30 +107,72 @@ mkdir -p %{buildroot}%{_mandir}/man8
MANGRP=$(id -gn)
pushd %{buildroot}
%if 0%{?fedora}
ln -sf dump .%{_sbindir}/rdump
%endif
ln -sf restore .%{_sbindir}/rrestore
mkdir -p .%{_sysconfdir}
> .%{_sysconfdir}/dumpdates
popd
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL KNOWNBUGS MAINTAINERS NEWS README REPORTING-BUGS TODO
%doc dump.lsm
%attr(0664,root,disk) %config(noreplace) %{_sysconfdir}/dumpdates
%if 0%{?fedora}
%{_sbindir}/dump
%{_sbindir}/rdump
%{_sbindir}/restore
%{_sbindir}/rrestore
%{_mandir}/man8/dump.8*
%{_mandir}/man8/rdump.8*
%endif
%{_sbindir}/restore
%{_sbindir}/rrestore
%{_mandir}/man8/restore.8*
%{_mandir}/man8/rrestore.8*
%changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1:0.4-0.48.b47
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 10 2021 Josef Ridky <jridky@redhat.com> - 1:0.4-0.47.b47
- remove dump from RHEL environment
* Mon Feb 08 2021 Jeff Makey <jeff@makey.net> - 1:0.4-0.46.b47
- New upstream release 0.4b47
- Update main URL.
- Drop dump-glibc_xattr patch, now applied upstream.
- Drop documentation conversion from ISO-8859-1 to UTF-8, now applied upstream.
- Print correct name of archive table of contents file (#1727392).
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.45.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
- Add make to BuildRequires.
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.44.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- Use standard make_build and make_install macros in spec file.
* Wed Feb 12 2020 Václav Doležal <vdolezal@redhat.com> - 1:0.4-0.43.b46
- Use library functions for manipulating xattrs (#1795953)
* Tue Feb 04 2020 Václav Doležal <vdolezal@redhat.com> - 1:0.4-0.42.b46
- Fix FTBFS by enabling '-fcommon'
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.41.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.40.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1:0.4-0.39.b46
- Rebuild for readline 8.0
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.38.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.37.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4-0.36.b46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (dump-0.4b47.tar.gz) = e9c567fe2ffad196b9657c551d83f7607758f3704cad6cb407514bbe2bc765c16968997dc3a5bc92b9eb5900fa5bd6e7cebc92c81afff53339fca92891a5259d