Compare commits

..

1 Commits
master ... f19

Author SHA1 Message Date
Pavel Raiskup a3b8c87cee star: use ssh for remote access by default
(cherry pick from fc20)

Version: 1.5.2-6
Resolves: #976414
2013-06-20 16:20:07 +02:00
12 changed files with 4027 additions and 254 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
/star-1.5.3.tar.bz2
/star-1.5.2.tar.bz2

View File

@ -1 +1 @@
46ef6425082e60966ec9d33f73fd44b0 star-1.5.3.tar.bz2
5c15cedb52e26b02b95c82de08c5fcc1 star-1.5.2.tar.bz2

42
star-1.5-newMake.patch Normal file
View File

@ -0,0 +1,42 @@
--- star-1.5/DEFAULTS/Defaults.linux.fix 2007-08-23 13:35:54.000000000 +0200
+++ star-1.5/DEFAULTS/Defaults.linux 2007-08-23 13:51:33.000000000 +0200
@@ -8,8 +8,8 @@
# Compiler stuff
#
###########################################################################
-DEFCCOM= cc
-#DEFCCOM= gcc
+#DEFCCOM= cc
+DEFCCOM= gcc
###########################################################################
#
@@ -40,22 +40,21 @@ __LINUX_SRC_INCLUDE= $(_LINUX_SRC_INCLUD
LINUX_SRC_INCLUDE= $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
DEFINCDIRS= $(SRCROOT)/include
-LDPATH= -L/opt/schily/lib
-#RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
-RUNPATH= -R$(INS_BASE)/lib -R/opt/schily/lib
+LDPATH=
+RUNPATH=
###########################################################################
#
# Installation config stuff
#
###########################################################################
-INS_BASE= /opt/schily
-INS_KBASE= /
-INS_RBASE= /
+INS_BASE= $(RPM_INSTALLDIR)/usr/
+INS_KBASE= $(RPM_INSTALLDIR)/
+INS_RBASE= $(RPM_INSTALLDIR)/
#
DEFUMASK= 002
#
DEFINSMODEF= 444
DEFINSMODEX= 755
DEFINSUSR= root
-DEFINSGRP= bin
+DEFINSGRP= root

View File

@ -0,0 +1,92 @@
diff -urNp star-1.5.1-orig/include/schily/schily.h star-1.5.1/include/schily/schily.h
--- star-1.5.1-orig/include/schily/schily.h 2009-10-22 23:18:55.000000000 +0200
+++ star-1.5.1/include/schily/schily.h 2010-01-13 13:17:10.000000000 +0100
@@ -174,7 +174,7 @@ extern int fexecle __PR((const char *, F
/* 6th arg not const, fexecv forces av[ac] = NULL */
extern int fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
char **));
-extern int fexecve __PR((const char *, FILE *, FILE *, FILE *,
+extern int sch_fexecve __PR((const char *, FILE *, FILE *, FILE *,
char * const *, char * const *));
extern int fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
extern int fspawnl __PR((FILE *, FILE *, FILE *, const char *, ...));
@@ -311,7 +311,7 @@ extern char *findbytes __PR((const void
extern char *findinpath __PR((char *__name, int __mode, BOOL __plain_file));
extern int findline __PR((const char *, char, const char *,
int, char **, int));
-extern int getline __PR((char *, int));
+extern int sch_getline __PR((char *, int));
extern int getstr __PR((char *, int));
extern int breakline __PR((char *, char, char **, int));
extern int getallargs __PR((int *, char * const**, const char *, ...));
diff -urNp star-1.5.1-orig/lib/fexec.c star-1.5.1/lib/fexec.c
--- star-1.5.1-orig/lib/fexec.c 2009-11-15 15:14:28.000000000 +0100
+++ star-1.5.1/lib/fexec.c 2010-01-13 13:17:10.000000000 +0100
@@ -198,7 +198,7 @@ const char **pav;
} while (p != NULL);
va_end(args);
- ret = fexecve(name, in, out, err, av, env);
+ ret = sch_fexecve(name, in, out, err, av, env);
if (av != xav)
free(av);
return (ret);
@@ -212,11 +212,11 @@ fexecv(name, in, out, err, ac, av)
char *av[];
{
av[ac] = NULL; /* force list to be null terminated */
- return (fexecve(name, in, out, err, av, environ));
+ return (sch_fexecve(name, in, out, err, av, environ));
}
EXPORT int
-fexecve(name, in, out, err, av, env)
+sch_fexecve(name, in, out, err, av, env)
const char *name;
FILE *in, *out, *err;
char * const av[], * const env[];
diff -urNp star-1.5.1-orig/lib/libschily-mapvers star-1.5.1/lib/libschily-mapvers
--- star-1.5.1-orig/lib/libschily-mapvers 2007-10-06 15:21:55.000000000 +0200
+++ star-1.5.1/lib/libschily-mapvers 2010-01-13 13:17:10.000000000 +0100
@@ -77,7 +77,7 @@ global:
fexecl;
fexecle;
fexecv;
- fexecve;
+ sch_fexecve;
ffileread;
ffilewrite;
fgetline;
@@ -123,7 +123,7 @@ global:
geterrno;
getfiles;
getfp;
- getline;
+ sch_getline;
getmainfp;
#getstr;
#handlecond;
diff -urNp star-1.5.1-orig/lib/stdio/fgetline.c star-1.5.1/lib/stdio/fgetline.c
--- star-1.5.1-orig/lib/stdio/fgetline.c 2004-09-25 14:23:36.000000000 +0200
+++ star-1.5.1/lib/stdio/fgetline.c 2010-01-13 13:17:10.000000000 +0100
@@ -61,7 +61,7 @@ fgetline(f, buf, len)
}
EXPORT int
-getline(buf, len)
+sch_getline(buf, len)
char *buf;
int len;
{
diff -urNp star-1.5.1-orig/libfind/find.c star-1.5.1/libfind/find.c
--- star-1.5.1-orig/libfind/find.c 2009-11-15 16:25:02.000000000 +0100
+++ star-1.5.1/libfind/find.c 2010-01-13 13:17:10.000000000 +0100
@@ -1747,7 +1747,7 @@ doexec(f, ac, av, state)
#endif
av[ac] = NULL; /* -exec {} \; is not NULL terminated */
- fexecve(av[0], state->std[0], state->std[1], state->std[2],
+ sch_fexecve(av[0], state->std[0], state->std[1], state->std[2],
av, state->env);
err = geterrno();
#ifdef PLUS_DEBUG

View File

@ -0,0 +1,12 @@
diff -urNp star-1.5.1-orig/star/buffer.c star-1.5.1/star/buffer.c
--- star-1.5.1-orig/star/buffer.c 2009-07-13 21:05:02.000000000 +0200
+++ star-1.5.1/star/buffer.c 2011-01-04 13:50:25.452138625 +0100
@@ -799,7 +799,7 @@ initbuf(nblocks)
bigptr = bigbuf = ___malloc((size_t) bufsize+10+pagesize,
"buffer");
- bigptr = bigbuf = (char *)roundup((Intptr_t)bigptr, pagesize);
+ bigptr = bigbuf = (char *)roundup((UIntptr_t)bigptr, pagesize);
fillbytes(bigbuf, bufsize, '\0');
fillbytes(&bigbuf[bufsize], 10, 'U');

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,96 @@
diff --git a/star/pax.c b/star/pax.c
index 8130109..9a2fb18 100644
--- a/star/pax.c
+++ b/star/pax.c
@@ -266,9 +266,11 @@ usage(ret)
error("\t-c\t\tinvert matching rules\n");
error("\t-d\t\tdo not descend directories\n");
error("\t-f nm\t\tuse 'nm' as tape instead of stdin/stdout\n");
+ error("\t-H\t\tsame as -L but follow only symlinks passed on the command line\n");
error("\t-i\t\tdo interactive creation/extraction/renaming\n");
error("\t-k\t\tkeep existing files\n");
error("\t-l\t\tlink files rather than copying them\n");
+ error("\t-L\t\tfollow symlinks, archive and dump the files they point to\n");
error("\t-n\t\tone match per pattern only\n");
error("\t-o\t\toptions (none specified with SUSv2 / UNIX-98)\n");
error("\t-p string\tset privileges\n");
diff --git a/star/spax.1 b/star/spax.1
index 79e2b99..b17dc05 100644
--- a/star/spax.1
+++ b/star/spax.1
@@ -282,6 +282,9 @@ except that the order of presentation of the
and
.B \-s
options is significant.
+
+See also the "OTHER OPTIONS" section.
+
.PP
The following options shall be supported:
.TP
@@ -3246,7 +3249,7 @@ existing files). As stated, it prevents any overwriting, even if
the target file is older than the source. This version adds more
granularity of options to solve this problem by introducing the
.BI "\-o invalid=" option
-\-specifically the UTF-8 action. (Note that an
+\- specifically the UTF-8 action. (Note that an
existing file that is named with a UTF-8 encoding is still subject
to overwriting in this case. The
.B \-k
@@ -4206,10 +4209,16 @@ field.
End of quoted text from the POSIX.1-2001 standard.
. \" .SH RETURNS
. \" .SH ERRORS
-.SH OPTIONS
+.SH OTHER OPTIONS
The following
.I "other options
-are implemented as extension to the POSIX standard:
+are implemented as extension to the POSIX standard. Note that some other
+non-POSIX options are mentioned in \fI\-help\fR and \fI-xhelp\fR output
+- these are also supported in
+.BR spax (1)
+and are well described in
+.BR star (1)
+manual page.
.TP
.B \-help
Prints a summary of the most important options for
@@ -4225,6 +4234,11 @@ and exits.
Prints the
.B spax
version number string and exists.
+.TP
+.B \-do-statistics
+Print statistic messages at the end of a
+.BR spax (1)
+run.
.SH EXAMPLES
.SH ENVIRONMENT
diff --git a/star/star.1 b/star/star.1
index 3ccd35d..0c88793 100644
--- a/star/star.1
+++ b/star/star.1
@@ -3025,7 +3025,7 @@ The bug in old
versions that cause a reversal of a space and a NULL byte
in the checksum field is not repeated.
If you want to have signed checksums you have to specify the
-.I \-singed\-checksum
+.I \-signed\-checksum
option too.
If you want directories not to be archived in order to be compatible
to very old historic tar archives, you need to specify the
diff --git a/star/star.c b/star/star.c
index fe9d984..e895898 100644
--- a/star/star.c
+++ b/star/star.c
@@ -1132,7 +1132,7 @@ xusage(ret)
error("\t-no-xheader\tdo not read or write extended headers regardless of format\n");
error("\t-meta\t\tuse inode metadata only (omit file content)\n");
error("\t-xmeta\t\textract meta files\n");
- error("\t-dupmeta\tuse inode metadata in dump mode if only ctime is newer\n");
+ error("\t-dumpmeta\tuse inode metadata in dump mode if only ctime is newer\n");
error("\t-keep-old-files,-k\tkeep existing files\n");
error("\t-refresh-old-files\trefresh existing files, don't create new files\n");
error("\t-refresh\trefresh existing files, don't create new files\n");

View File

@ -1,18 +0,0 @@
diff --git a/rmt/rmt.dfl b/rmt/rmt.dfl
index 7b8ca8b..e0576e8 100644
--- a/rmt/rmt.dfl
+++ b/rmt/rmt.dfl
@@ -44,7 +44,9 @@ USER=*
# name name
#
#ACCESS=rtape sparky /dev/rmt/*
-ACCESS=* * /dev/rmt/*
-ACCESS=* * /dev/null
-ACCESS=* * /dev/zero
-#ACCESS=* * *
+#ACCESS=* * /dev/rmt/*
+#ACCESS=* * /dev/null
+#ACCESS=* * /dev/zero
+
+# Historically, Red Hat rmt was not so ^^ restrictive.
+ACCESS=* * *

View File

@ -1,9 +1,9 @@
diff --git a/autoconf/configure.in b/autoconf/configure.in
index fc9f880..30383e4 100644
index 1465ce1..3046a62 100644
--- a/autoconf/configure.in
+++ b/autoconf/configure.in
@@ -906,6 +906,15 @@ LIBS="$LIBS $lib_cap"
AC_CHECK_FUNCS(cap_get_proc cap_set_proc cap_set_flag cap_clear_flag)
@@ -817,6 +817,15 @@ AC_CHECK_FUNCS(sched_yield)
AC_CHECK_FUNCS(nanosleep)
LIBS="$ac_save_LIBS"
+AC_CHECK_HEADERS(selinux/selinux.h)
@ -18,28 +18,27 @@ index fc9f880..30383e4 100644
dnl Misc OS checks.
AC_CHECK_FILES(/dev/tty /dev/null /dev/zero)
AC_CHECK_FILES(/dev/stdin /dev/stdout /dev/stderr)
@@ -992,6 +1001,7 @@ AC_SUBST(lib_secdb)
@@ -894,6 +903,7 @@ AC_SUBST(lib_secdb)
AC_SUBST(lib_gen)
AC_SUBST(lib_pthread)
AC_SUBST(lib_rt)
+AC_SUBST(lib_selinux)
AC_SUBST(lib_dl)
AC_SUBST(lib_dir)
AC_SUBST(lib_cap)
diff --git a/autoconf/rules.cnf.in b/autoconf/rules.cnf.in
index affcb5c..2b7bff2 100644
index 6de994c..31b1575 100644
--- a/autoconf/rules.cnf.in
+++ b/autoconf/rules.cnf.in
@@ -34,6 +34,7 @@ LIB_SECDB = @lib_secdb@
@@ -30,5 +30,6 @@ LIB_SECDB = @lib_secdb@
LIB_GEN = @lib_gen@
LIB_PTHREAD = @lib_pthread@
LIB_RT = @lib_rt@
+LIB_SELINUX = @lib_selinux@
LIB_DL= @lib_dl@
LIB_DIR= @lib_dir@
LIB_CAP= @lib_cap@
diff --git a/star/cpio.mk b/star/cpio.mk
index 37a6dd2..8bfc3bd 100644
index ec48a95..8a2c7a0 100644
--- a/star/cpio.mk
+++ b/star/cpio.mk
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
@ -53,17 +52,17 @@ index 37a6dd2..8bfc3bd 100644
@@ -34,7 +35,7 @@ CFILES= cpio.c header.c cpiohdr.c xheader.c xattr.c \
HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
movearch.h table.h props.h fifo.h diff.h \
checkerr.h dumpdate.h bitstring.h pathname.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) $(LIB_SELINUX)
checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
XMK_FILE= scpioman.mk
###########################################################################
diff --git a/star/extract.c b/star/extract.c
index cf60154..98842e1 100644
index 9a83bf4..3d68c43 100644
--- a/star/extract.c
+++ b/star/extract.c
@@ -256,6 +256,17 @@ extern struct WALK walkstate;
@@ -253,6 +253,17 @@ extern struct WALK walkstate;
continue;
}
#endif
@ -82,7 +81,7 @@ index cf60154..98842e1 100644
if (!void_bad(&finfo))
break;
diff --git a/star/gnutar.mk b/star/gnutar.mk
index 1a296e1..6595aa2 100644
index d0da54b..9c5de30 100644
--- a/star/gnutar.mk
+++ b/star/gnutar.mk
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
@ -96,14 +95,14 @@ index 1a296e1..6595aa2 100644
@@ -34,7 +35,7 @@ CFILES= gnutar.c header.c cpiohdr.c xheader.c xattr.c \
HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
movearch.h table.h props.h fifo.h diff.h \
checkerr.h dumpdate.h bitstring.h pathname.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) $(LIB_SELINUX)
checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
XMK_FILE= gnutarman.mk
###########################################################################
diff --git a/star/pax.mk b/star/pax.mk
index 73c6bc1..d2a52a9 100644
index 0254e77..15c8ea0 100644
--- a/star/pax.mk
+++ b/star/pax.mk
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
@ -117,17 +116,17 @@ index 73c6bc1..d2a52a9 100644
@@ -35,7 +36,7 @@ CFILES= pax.c header.c cpiohdr.c xheader.c xattr.c \
HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
movearch.h table.h props.h fifo.h diff.h \
checkerr.h dumpdate.h bitstring.h pathname.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) $(LIB_SELINUX)
checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
XMK_FILE= spaxman.mk
###########################################################################
diff --git a/star/star.c b/star/star.c
index 9dfcef7..464c751 100644
index 7b58964..fe9d984 100644
--- a/star/star.c
+++ b/star/star.c
@@ -48,6 +48,10 @@ static UConst char sccsid[] =
@@ -46,6 +46,10 @@ static UConst char sccsid[] =
#include "starsubs.h"
#include "checkerr.h"
@ -138,7 +137,7 @@ index 9dfcef7..464c751 100644
EXPORT int main __PR((int ac, char **av));
LOCAL void star_create __PR((int ac, char *const *av));
LOCAL void checkdumptype __PR((GINFO *gp));
@@ -402,6 +406,10 @@ main(ac, av)
@@ -399,6 +403,10 @@ main(ac, av)
comerr("Panic cannot set back effective uid.\n");
}
my_uid = geteuid();
@ -208,7 +207,7 @@ index a914ade..1e2a233 100644
/*
diff --git a/star/suntar.mk b/star/suntar.mk
index 9b76a23..1842917 100644
index 5690c9f..f781f63 100644
--- a/star/suntar.mk
+++ b/star/suntar.mk
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
@ -222,17 +221,17 @@ index 9b76a23..1842917 100644
@@ -34,7 +35,7 @@ CFILES= suntar.c header.c cpiohdr.c xheader.c xattr.c \
HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
movearch.h table.h props.h fifo.h diff.h \
checkerr.h dumpdate.h bitstring.h pathname.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP) $(LIB_SELINUX)
checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
XMK_FILE= suntarman.mk
###########################################################################
diff --git a/star/xattr.c b/star/xattr.c
index 2e262ef..08fc42e 100644
index 1462950..6493447 100644
--- a/star/xattr.c
+++ b/star/xattr.c
@@ -198,6 +198,27 @@ fail:
@@ -196,6 +196,27 @@ fail:
#endif /* USE_XATTR */
}
@ -260,7 +259,7 @@ index 2e262ef..08fc42e 100644
/* ARGSUSED */
EXPORT BOOL
set_xattr(info)
@@ -211,6 +232,10 @@ set_xattr(info)
@@ -209,6 +230,10 @@ set_xattr(info)
return (TRUE);
for (xap = info->f_xattr; xap->name != NULL; xap++) {

View File

@ -1,26 +0,0 @@
From 68f6e16d7d2c8a6c91cd430b12a1a0c7b15672b4 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Wed, 17 Dec 2014 12:57:37 +0100
Subject: [PATCH] pax: don't segfault with -X option
Pass a valid address of nomount variable into getallargs().
---
star/pax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/star/pax.c b/star/pax.c
index 9abe3f8..c627a46 100644
--- a/star/pax.c
+++ b/star/pax.c
@@ -166,7 +166,7 @@ gargs(ac, av)
gethdr, &chdrtype, /* -x */
gethdr, &chdrtype, /* artype= */
#endif /* __old__lint */
- nomount) < 0) {
+ &nomount) < 0) {
errmsgno(EX_BAD, "Bad Option: %s.\n", av[0]);
susage(EX_BAD);
}
--
2.1.0

View File

@ -1,19 +0,0 @@
diff --git a/star/star.mk b/star/star.mk
index 68d3482..4961a29 100644
--- a/star/star.mk
+++ b/star/star.mk
@@ -32,11 +32,11 @@ CFILES= star.c header.c cpiohdr.c xheader.c xattr.c \
subst.c volhdr.c \
chdir.c match.c defaults.c dumpdate.c \
fifo.c device.c checkerr.c \
- findinfo.c
+ findinfo.c pathname.c
HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
movearch.h table.h props.h fifo.h diff.h restore.h \
- checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
+ checkerr.h dumpdate.h bitstring.h pathname.h
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX) $(LIB_CAP)
XMK_FILE= Makefile.man starformatman.mk
###########################################################################

241
star.spec
View File

@ -6,67 +6,77 @@
Summary: An archiving tool with ACL support
Name: star
Version: 1.5.3
Release: 12%{?dist}
License: CDDL
Group: Applications/Archiving
URL: http://freecode.com/projects/star
Source: http://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
# add SELinux support to star(#)
Patch1: star-1.5.3-selinux.patch
# do not segfault with data-change-warn option (#255261)
Patch2: star-1.5-changewarnSegv.patch
# Prevent buffer overflow for filenames with length of 100 characters (#556664)
Patch3: star-1.5.2-bufferoverflow.patch
# Fix some invalid manpage references (#624612)
Patch4: star-1.5.1-manpagereferences.patch
Version: 1.5.2
Release: 6%{?dist}
URL: http://cdrecord.berlios.de/old/private/star.html
Source: ftp://ftp.berlios.de/pub/star/%{name}-%{version}.tar.bz2
#use gcc for compilation, change defaults for Linux
Patch1: star-1.5-newMake.patch
#add SELinux support to star(#)
Patch2: star-1.5.2-selinux.patch
#do not segfault with data-change-warn option (#255261)
Patch3: star-1.5-changewarnSegv.patch
#Prevent buffer overflow for filenames with length of 100 characters (#556664)
Patch4: star-1.5.2-bufferoverflow.patch
#Fix some invalid manpage references (#624612)
Patch5: star-1.5.1-manpagereferences.patch
# do not crash when xattrs are not set on all files (#861848)
Patch5: star-1.5.1-selinux-segfault.patch
Patch6: star-1.5.1-selinux-segfault.patch
# note that the H=crc format uses Sum32 algorithm, not CRC
Patch6: star-1.5.1-crc.patch
Patch7: star-1.5.1-crc.patch
# Allow rmt to access all files.
# fix man-page-day objections
# ~> proposed upstream:
# https://lists.berlios.de/pipermail/star-developers/2013-April/000027.html
# ~> #948866
Patch8: star-1.5.2-man-page-day.patch
# fix the build for aarch64 by actualization of the config.guess/config.sub
# files with the most up2date version from git://git.savannah.gnu.org/config.git
# ~> downstream
# ~> #968980
Patch8: star-1.5.2-rmt-rh-access.patch
# ~> #926571
Patch9: star-1.5.2-aarch64-config.patch
# Use ssh rather than rsh by default
# ~> downstream
# ~> related to #968980
Patch9: star-1.5.2-use-ssh-by-default.patch
Patch10: star-1.5.2-use-ssh-by-default.patch
# Fix broken star.mk in 1.5.3 (included from all.mk)
Patch10: star-1.5.3-star-mk.patch
# Fix segfault for 'pax -X' (rhbz#1175009)
# ~> downstream
Patch11: star-1.5.3-pax-X-option.patch
Requires(post): %{ALTERNATIVES}
Requires(preun): %{ALTERNATIVES}
License: CDDL
Group: Applications/Archiving
BuildRequires: libattr-devel libacl-devel libtool libselinux-devel
BuildRequires: e2fsprogs-devel
# Historically, star installed /usr/bin/spax binary also so we don't want to
# break the compatibility. We don't care about scpio because scpio binary was
# not installed.
Requires: spax
%description
Star saves many files together into a single tape or disk archive,
and can restore individual files from the archive. Star supports ACL.
%package -n spax
# Temporary! Remove once no problem may occur. We really need to force update
# of older star and pax, when any of them is installed. Its file list
# collisions with 'spax'.
Conflicts: star < 1.5.2-5
Conflicts: pax < 3.4-16
Summary: Portable archive exchange
Group: Applications/Archiving
Requires(post): %{ALTERNATIVES}
Requires(preun): %{ALTERNATIVES}
%description -n spax
The pax utility shall read and write archives, write lists of the members of
archive files and copy directory hierarchies as is defined in IEEE Std 1003.1.
%package -n scpio
# Temporary! Remove once _no problem_ may occur. We really need to force
# update of older star if it installed — its files overlaps with scpio.
Conflicts: star < 1.5.2-5
Summary: Copy file archives in and out (LEGACY)
Group: Applications/Archiving
@ -75,17 +85,6 @@ The scpio utility, depending on the options used: copies files to an archive
file, extracts files from an archive file, lists files from an archive file or
copies files from one directory tree to another.
%package -n rmt
Summary: Provides certain programs with access to remote tape devices
Group: Applications/Archiving
# we need to be greater than the version from 'dump' package
Epoch: 2
%description -n rmt
The rmt utility provides remote access to tape devices for programs
like dump (a filesystem backup program), restore (a program for
restoring files from a backup), and tar (an archiving program).
# "desired" alternative constants
%global ALT_NAME pax
%global ALT_LINK %{_bindir}/pax
@ -98,20 +97,19 @@ restoring files from a backup), and tar (an archiving program).
%prep
%setup -q
%patch1 -p1 -b .newMake
%if %{WITH_SELINUX}
%patch1 -p1 -b .selinux
%patch2 -p1 -b .selinux
%endif
%patch2 -p1 -b .changewarnSegv
%patch3 -p1 -b .namesoverflow
%patch4 -p1 -b .references
%patch5 -p1 -b .selinux-segfault
%patch6 -p1 -b .crc
%patch8 -p1 -b .rmt-access-rules
%patch9 -p1 -b .ssh-by-default
%patch10 -p1 -b .bug-config-1.5.3
%patch11 -p1 -b .pax-X
%patch3 -p1 -b .changewarnSegv
%patch4 -p1 -b .namesoverflow
%patch5 -p1 -b .references
%patch6 -p1 -b .selinux-segfault
%patch7 -p1 -b .crc
%patch8 -p1 -b .man-page-day
%patch9 -p1 -b .aarch64
%patch10 -p1 -b .ssh-by-default
# disable single "fat" binary
cp -a star/all.mk star/Makefile
star_recode()
@ -124,7 +122,9 @@ star_recode()
star_recode AN-1.5 AN-1.5.2 star/star.4
for PLAT in %{arm} %{power64} aarch64 %{mips} x86_64 s390 s390x sh3 sh4 sh4a sparcv9; do
cp -a READMEs/README.linux .
for PLAT in %{arm} x86_64 ppc64 s390 s390x sh3 sh4 sh4a sparcv9; do
for AFILE in gcc cc; do
[ ! -e RULES/${PLAT}-linux-${AFILE}.rul ] \
&& ln -s i586-linux-${AFILE}.rul RULES/${PLAT}-linux-${AFILE}.rul
@ -132,36 +132,33 @@ for PLAT in %{arm} %{power64} aarch64 %{mips} x86_64 s390 s390x sh3 sh4 sh4a spa
done
%build
# This is config/work-around for atypical build system. Variables used are
# docummented makefiles.5. GMAKE_NOWARN silences irritating warnings in
# GNU/Linux ecosystem.
%global make_flags GMAKE_NOWARN=true \\\
RUNPATH= \\\
LDPATH= \\\
PARCH=%{_target_cpu} \\\
K_ARCH=%{_target_cpu} \\\
INS_BASE=$RPM_BUILD_ROOT%{_prefix} \\\
INS_RBASE=$RPM_BUILD_ROOT \\\
INSTALL='sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)' \\\
COPTX="$RPM_OPT_FLAGS -DTRY_EXT2_FS" \\\
LDOPTX="$RPM_LD_FLAGS" \\\
DEFCCOM=gcc
export MAKEPROG=gmake
# Autoconfiscate
(cd autoconf; AC_MACRODIR=. AWK=gawk ./autoconf)
# Note: disable optimalisation by COPTX='-g3 -O0' LDOPTX='-g3 -O0'
make %{?_smp_mflags} %make_flags
#make %%{?_smp_mflags} PARCH=%%{_target_cpu} CPPOPTX="-DNO_FSYNC" \
# ~~> enable debug by COPTX='-g3 -O0' LDOPTX='-g3 -O0'
make %{?_smp_mflags} PARCH=%{_target_cpu} \
COPTX="$RPM_OPT_FLAGS -DTRY_EXT2_FS" CC="%{__cc}" \
K_ARCH=%{_target_cpu} \
CONFFLAGS="%{_target_platform} --prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \
--sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} --includedir=%{_includedir} \
--libdir=%{_libdir} --libexec=%{_libexecdir} \
--localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} --infodir=%{_infodir}" < /dev/null
%install
make install -s %make_flags
export MAKEPROG=gmake
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man4
%makeinstall RPM_INSTALLDIR=${RPM_BUILD_ROOT} PARCH=%{_target_cpu} K_ARCH=%{_target_cpu} < /dev/null
rm -rf ${RPM_BUILD_ROOT}/usr/share/doc/rmt
ln -s star.1.gz ${RPM_BUILD_ROOT}%{_mandir}/man1/ustar.1
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}
mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir}
ln -s %{_sbindir}/rmt ${RPM_BUILD_ROOT}%{_sysconfdir}/rmt
install -p -m 644 COPYING star/README CDDL.Schily.txt AN-* \
${RPM_BUILD_ROOT}%{_pkgdocdir}
# XXX Nuke unpackaged files.
( cd ${RPM_BUILD_ROOT}
rm -f .%{_sysconfdir}/default/rmt
rm -f .%{_bindir}/mt
rm -f .%{_bindir}/smt
rm -f .%{_bindir}/tartest
@ -170,24 +167,18 @@ install -p -m 644 COPYING star/README CDDL.Schily.txt AN-* \
rm -f .%{_bindir}/star_fat
rm -f .%{_bindir}/star_sym
rm -f .%{_bindir}/suntar
rm -f .%{_sysconfdir}/default/star
rm -rf .%{_prefix}%{_sysconfdir}
rm -rf .%{_prefix}/include
rm -rf .%{_prefix}/lib # hard-wired intently
rm -rf .%{_mandir}/man3
rm -rf .%{_mandir}/man5/{makefiles,makerules}.5*
rm -rf .%{_mandir}/man1/{tartest,gnutar,smt,mt,suntar,match}.1*
rm -rf .%{_docdir}/star/testscripts
rm -rf .%{_docdir}/star/TODO
rm -rf .%{_docdir}/rmt
rm -rf .%{_mandir}/man1/{tartest,rmt,gnutar,smt,mt,suntar,match}.1*
rm -rf .%{_sbindir}
)
%clean
%global general_docs \
%dir %{_pkgdocdir} \
%doc %{_pkgdocdir}/COPYING \
%doc %{_pkgdocdir}/CDDL.Schily.txt \
%global general_docs README AN* COPYING CDDL.Schily.txt TODO README.linux
%post -n spax
%{ALTERNATIVES} \
@ -201,7 +192,7 @@ if [ $1 -eq 0 ]; then
fi
%files
%doc %{_pkgdocdir}
%doc %{general_docs}
%{_bindir}/star
%{_bindir}/ustar
%{_mandir}/man1/star.1*
@ -209,85 +200,21 @@ fi
%{_mandir}/man5/star.5*
%files -n scpio
%general_docs
%doc %{general_docs}
%doc %{_mandir}/man1/scpio.1*
%{_bindir}/scpio
%files -n spax
%general_docs
%doc %{general_docs}
%doc %{_mandir}/man1/spax.1*
%{_bindir}/spax
%ghost %verify(not md5 size mode mtime) %{ALT_LINK}
%ghost %verify(not md5 size mode mtime) %{ALT_SL1_LINK}
%files -n rmt
%general_docs
%{_sbindir}/rmt
%{_mandir}/man1/rmt.1*
%config %{_sysconfdir}/default/rmt
# This symlink is used by cpio, star, spax, scpio, .. thus it is needed. Even
# if the cpio may be configured to use /sbin/rmt rather than /etc/rmt, star (and
# thus spax, ..) has the lookup path hardcoded to '/etc/rmt' (it means that even
# non rpm based systems will try to look for /etc/rmt). And - the conclusion is
# - it does not make sense to fight against /etc/rmt symlink ATM (year 2013).
%{_sysconfdir}/rmt
%changelog
* Mon Apr 09 2018 Rafael Santos <rdossant@redhat.com> - 1.5.3-12
- Use standard Fedora linker flags (bug #1548670)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Aug 12 2016 Michal Toman <mtoman@fedoraproject.org> - 1.5.3-7
- Build properly on MIPS
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Dec 17 2014 Pavel Raiskup <praiskup@redhat.com> - 1.5.3-4
- fix segfault for pax -X (#1175009)
* Tue Sep 16 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.3-3
- Re-enable profiling on aarch64
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jun 27 2014 Pavel Raiskup <praiskup@redhat.com> - 1.5.3-1
- rebase to 1.5.3
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Jan 17 2014 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-10
- enable build for ppc64le (#1054401)
* Mon Jan 13 2014 Peter Robinson <pbrobinson@fedoraproject.org> 1.5.2-9
- Temporarily disable profiling on aarch64
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jun 20 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-7
- we should provide /etc/rmt symlink for a while (related to #968980)
* Thu Jun 20 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-6
- use the ssh as the default remote access method
* Thu May 30 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-6
- subpackage also 'rmt' (#968980)
* Fri May 24 2013 Pavel Raiskup <praiskup@redhat.com> - 1.5.2-5
- add missing ghost files (#960007)
- fix the upgrade path, sorry for the noise (#959917, #960007)