new upstream release
- flip to %autosetup - the makefile is not parallel safe now, drop %_smp_mflags - remove unneeded patches - upstream has now built-in support for SELinux Resolves: rhbz#1699965 Version: 1.6-1
This commit is contained in:
parent
d20d1b69e3
commit
e94506113c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/star-1.5.3.tar.bz2
|
||||
/star-*.tar.bz2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
46ef6425082e60966ec9d33f73fd44b0 star-1.5.3.tar.bz2
|
||||
SHA512 (star-1.6.tar.bz2) = 5c66fddb6a01bb023ec8f248728580dbabbe810fdc9f65fd5a3c67fde30847ef6c338ff0567db3f5fd6fe3d64d3816491740b0f7a9e3b1d501357a5293476969
|
||||
|
@ -1,80 +0,0 @@
|
||||
--- star-1.5/star/checkerr.c.orig-segv 2006-10-31 18:06:25.000000000 +0100
|
||||
+++ star-1.5/star/checkerr.c 2007-08-27 11:42:39.000000000 +0200
|
||||
@@ -183,39 +183,45 @@ LOCAL struct eflags {
|
||||
*/
|
||||
LOCAL UInt32_t
|
||||
errflags(eflag, doexit)
|
||||
- char *eflag;
|
||||
- BOOL doexit;
|
||||
+ char *eflag;
|
||||
+ BOOL doexit;
|
||||
{
|
||||
- register char *p = eflag;
|
||||
- char *ef = _endword(eflag);
|
||||
- register struct eflags *ep;
|
||||
- register int slen;
|
||||
- register UInt32_t nflags = 0;
|
||||
-
|
||||
- do {
|
||||
- for (ep = eflags; ep->fname; ep++) {
|
||||
- slen = strlen(ep->fname);
|
||||
- if ((strncmp(ep->fname, p, slen) == 0) &&
|
||||
- (p[slen] == '|' || p[slen] == ' ' ||
|
||||
- p[slen] == '\0')) {
|
||||
- nflags |= ep->fval;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- if (ep->fname == NULL) {
|
||||
- if (doexit)
|
||||
- comerrno(EX_BAD, "Bad flag '%s'\n", p);
|
||||
- return (0);
|
||||
- }
|
||||
- p = strchr(p, '|');
|
||||
- } while (p < ef && p && *p++ == '|');
|
||||
-
|
||||
- if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
|
||||
- if (doexit)
|
||||
- comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
|
||||
- return (0);
|
||||
- }
|
||||
- return (nflags);
|
||||
+ register struct eflags *ep;
|
||||
+ register int slen;
|
||||
+ register UInt32_t nflags = 0;
|
||||
+ char *curflags;
|
||||
+ char *curflag;
|
||||
+
|
||||
+ curflags = strdup (eflag);
|
||||
+ *_endword(curflags) = '\0';
|
||||
+ curflag = strtok (curflags, "|");
|
||||
+
|
||||
+ while (curflag != NULL) {
|
||||
+ for (ep = eflags; ep->fname; ep++) {
|
||||
+ slen = strlen (ep->fname);
|
||||
+ if ((strncmp (ep->fname, curflag, slen)) == 0) {
|
||||
+ nflags |= ep->fval;
|
||||
+ goto next;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (doexit)
|
||||
+ comerrno (EX_BAD, "Bad flag '%s' \n", curflag);
|
||||
+
|
||||
+ free (curflags);
|
||||
+ return (0);
|
||||
+ next:
|
||||
+ curflag = strtok (NULL, "|");
|
||||
+ }
|
||||
+
|
||||
+ free (curflags);
|
||||
+
|
||||
+ if ((nflags & ~(UInt32_t)(E_ABORT|E_WARN)) == 0) {
|
||||
+ if (doexit)
|
||||
+ comerrno(EX_BAD, "Bad error condition '%s'.\n", eflag);
|
||||
+ return (0);
|
||||
+ }
|
||||
+ return (nflags);
|
||||
}
|
||||
|
||||
LOCAL ec_t *
|
@ -1,31 +0,0 @@
|
||||
diff --git a/star/cpiohdr.c b/star/cpiohdr.c
|
||||
index 9c7a774..2785661 100644
|
||||
--- a/star/cpiohdr.c
|
||||
+++ b/star/cpiohdr.c
|
||||
@@ -536,7 +536,9 @@ cpio_checkswab(ptb)
|
||||
}
|
||||
|
||||
/*
|
||||
- * This simple sum is used for the SYSvr4 file content CRC
|
||||
+ * This simple sum is used for the SYSvr4 file content checksum. This is
|
||||
+ * implemented like Sum32 algorithm.
|
||||
+ *
|
||||
* Use Int32_t to implement the same behavior as the AT&T cpio command.
|
||||
*/
|
||||
LOCAL Int32_t
|
||||
diff --git a/star/star.1 b/star/star.1
|
||||
index 95b202c..a931a6f 100644
|
||||
--- a/star/star.1
|
||||
+++ b/star/star.1
|
||||
@@ -913,9 +913,9 @@ archive format because of its limited portability.
|
||||
.B crc
|
||||
This format is similar to the
|
||||
.B asc
|
||||
-cpio format but in addition uses a simple byte based checksum called
|
||||
+cpio format but in addition uses a simple byte based checksum called here as
|
||||
.BR CRC .
|
||||
-Try to avoid the
|
||||
+This algorithm is simple Sum32 -- not a polynomial CRC. Try to avoid the
|
||||
.B crc
|
||||
archive format because of its limited portability.
|
||||
|
@ -1,56 +0,0 @@
|
||||
diff -urNp star-1.5.1-orig/star/spax.1 star-1.5.1/star/spax.1
|
||||
--- star-1.5.1-orig/star/spax.1 2009-04-10 23:51:50.000000000 +0200
|
||||
+++ star-1.5.1/star/spax.1 2010-08-17 13:32:38.246788583 +0200
|
||||
@@ -4043,7 +4043,7 @@ Interfaces volume of IEEE Std 1003.1-200
|
||||
.BR chown (2),
|
||||
.BR creat (2),
|
||||
.BR mkdir (2),
|
||||
-.BR mkfifo (2),
|
||||
+.BR mkfifo (3),
|
||||
.BR stat (2),
|
||||
.BR utime (2),
|
||||
.BR write (2).
|
||||
@@ -4095,7 +4095,7 @@ entry is added to the ENVIRONMENT VARIAB
|
||||
IEEE PASC Interpretation 1003.2 #168 is applied, clarifying that
|
||||
.BR mkdir (2)
|
||||
and
|
||||
-.BR mkfifo (2)
|
||||
+.BR mkfifo (3)
|
||||
calls can ignore an [EEXIST] error when
|
||||
extracting an archive.
|
||||
.PP
|
||||
diff -urNp star-1.5.1-orig/star/star.1 star-1.5.1/star/star.1
|
||||
--- star-1.5.1-orig/star/star.1 2009-06-02 20:49:21.000000000 +0200
|
||||
+++ star-1.5.1/star/star.1 2010-08-17 13:34:50.524789662 +0200
|
||||
@@ -4615,20 +4615,18 @@ cron script).
|
||||
Is used for the intercative user interface.
|
||||
.SH "SEE ALSO"
|
||||
.BR spax (1),
|
||||
-.BR suntar (1),
|
||||
-.BR scpio (1),
|
||||
.BR tar (1),
|
||||
.BR cpio (1),
|
||||
.BR pax (1),
|
||||
.BR rcp (1),
|
||||
.BR mt (1),
|
||||
-.BR rmt (1),
|
||||
+.BR rmt (8),
|
||||
.BR match (1),
|
||||
.BR dd (1),
|
||||
.BR sdd (1),
|
||||
.BR rsh (1),
|
||||
.BR ssh (1),
|
||||
-.BR star (4/5),
|
||||
+.BR star (4),
|
||||
.BR rcmd (3),
|
||||
.BR fssnap (1m)
|
||||
.SH DIAGNOSTICS
|
||||
@@ -4951,7 +4949,7 @@ is installed suid root,
|
||||
.B star
|
||||
is able to make connections to remote archives for non root users.
|
||||
This is done by using the
|
||||
-rcmd(3) interface to get a connection to a rmt(1) server.
|
||||
+rcmd(3) interface to get a connection to a rmt(8) server.
|
||||
.PP
|
||||
.B Star
|
||||
resets its effective uid back to the real user id immediately after setting up
|
@ -1,13 +0,0 @@
|
||||
diff --git a/star/xattr.c b/star/xattr.c
|
||||
index 6493447..4034287 100644
|
||||
--- a/star/xattr.c
|
||||
+++ b/star/xattr.c
|
||||
@@ -202,7 +202,7 @@ setselinux(info)
|
||||
register FINFO *info;
|
||||
{
|
||||
#if defined(USE_XATTR) && defined(HAVE_SETXATTR) && defined(WITH_SELINUX)
|
||||
- if (info->f_xattr) {
|
||||
+ if (info->f_xflags & XF_XATTR) {
|
||||
star_xattr_t *xap;
|
||||
for (xap = info->f_xattr; xap->name != NULL; xap++) {
|
||||
if (strcmp(xap->name, "security.selinux") == 0) {
|
@ -1,63 +0,0 @@
|
||||
From e22e7ddbc90ab817d5304dc4a5f73ed1e9148c16 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Raiskup <praiskup@redhat.com>
|
||||
Date: Wed, 28 Nov 2018 16:15:31 +0100
|
||||
Subject: [PATCH] covscan fixes
|
||||
|
||||
- two resource leaks (fixed upstream)
|
||||
- dropped trailing semicolon which generated several errors (fixed
|
||||
upstream)
|
||||
---
|
||||
libdeflt/default.c | 6 +++---
|
||||
star/hole.c | 1 +
|
||||
star/xheader.c | 3 +--
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libdeflt/default.c b/libdeflt/default.c
|
||||
index 950e590..5ee1ef2 100644
|
||||
--- a/libdeflt/default.c
|
||||
+++ b/libdeflt/default.c
|
||||
@@ -45,12 +45,12 @@ EXPORT int
|
||||
defltopen(name)
|
||||
const char *name;
|
||||
{
|
||||
- if (dfltfile != (FILE *)NULL)
|
||||
+ if (dfltfile != (FILE *)NULL) {
|
||||
fclose(dfltfile);
|
||||
+ dfltfile = NULL;
|
||||
+ }
|
||||
|
||||
if (name == (char *)NULL) {
|
||||
- fclose(dfltfile);
|
||||
- dfltfile = NULL;
|
||||
return (0);
|
||||
}
|
||||
|
||||
diff --git a/star/hole.c b/star/hole.c
|
||||
index c200ec9..6deb38b 100644
|
||||
--- a/star/hole.c
|
||||
+++ b/star/hole.c
|
||||
@@ -1187,6 +1187,7 @@ put_sparse(fp, info)
|
||||
* region of at least TBLOCK size.
|
||||
*/
|
||||
put_file(fp, info);
|
||||
+ free(sparse);
|
||||
return;
|
||||
} else if (!silent) {
|
||||
error("Treating '%s' as sparse\n", info->f_name);
|
||||
diff --git a/star/xheader.c b/star/xheader.c
|
||||
index a619e28..786b473 100644
|
||||
--- a/star/xheader.c
|
||||
+++ b/star/xheader.c
|
||||
@@ -146,8 +146,7 @@ LOCAL Uchar dtab[] = "0123456789";
|
||||
(val) = (val) / (unsigned)10; \
|
||||
} while ((val) > 0)
|
||||
|
||||
-#define scopy(to, from) while ((*(to)++ = *(from)++) != '\0') \
|
||||
- ;
|
||||
+#define scopy(to, from) while ((*(to)++ = *(from)++) != '\0')
|
||||
|
||||
|
||||
LOCAL char *xbuf; /* Space used to prepare I/O from/to extended headers */
|
||||
--
|
||||
2.19.1
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- acl_unix.c 2018-08-01 12:01:04.218237606 +0200
|
||||
+++ star-1.5.3/star/acl_unix.c 2014-03-31 19:44:46.000000000 +0200
|
||||
@@ -505,7 +505,7 @@
|
||||
}
|
||||
|
||||
if (info->f_xflags & XF_ACL_DEFAULT) {
|
||||
- ssize_t len = strlen(info->f_acl_access) + 2;
|
||||
+ ssize_t len = strlen(info->f_acl_default) + 2;
|
||||
|
||||
if (len > aclps.ps_size) {
|
||||
if (aclps.ps_path == acltext) {
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,272 +0,0 @@
|
||||
diff --git a/autoconf/configure.in b/autoconf/configure.in
|
||||
index fc9f880..30383e4 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)
|
||||
LIBS="$ac_save_LIBS"
|
||||
|
||||
+AC_CHECK_HEADERS(selinux/selinux.h)
|
||||
+if test "$ac_cv_header_selinux_selinux_h" = yes; then
|
||||
+ AC_CHECKING(for SELinux support)
|
||||
+ AC_CHECK_LIB(selinux, is_selinux_enabled, lib_selinux="-lselinux -lattr")
|
||||
+ ac_save_LIBS="$LIBS"
|
||||
+ LIBS="$LIBS $lib_selinux"
|
||||
+ AC_CHECK_FUNCS(is_selinux_enabled)
|
||||
+fi
|
||||
+
|
||||
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)
|
||||
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
|
||||
--- a/autoconf/rules.cnf.in
|
||||
+++ b/autoconf/rules.cnf.in
|
||||
@@ -34,6 +34,7 @@ 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
|
||||
--- a/star/cpio.mk
|
||||
+++ b/star/cpio.mk
|
||||
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
|
||||
CPPOPTS += -DUSE_ACL
|
||||
CPPOPTS += -DUSE_XATTR
|
||||
CPPOPTS += -DUSE_FFLAGS
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= cpio.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
@@ -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)
|
||||
XMK_FILE= scpioman.mk
|
||||
|
||||
###########################################################################
|
||||
diff --git a/star/extract.c b/star/extract.c
|
||||
index cf60154..98842e1 100644
|
||||
--- a/star/extract.c
|
||||
+++ b/star/extract.c
|
||||
@@ -256,6 +256,17 @@ extern struct WALK walkstate;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef WITH_SELINUX
|
||||
+ if (!to_stdout && selinux_enabled) {
|
||||
+ if (setselinux(&finfo) == FALSE) {
|
||||
+ errmsgno(EX_BAD,
|
||||
+ "Can not setup security context for '%s'. Not created.\n",
|
||||
+ finfo.f_name);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (finfo.f_flags & F_BAD_META) {
|
||||
if (!void_bad(&finfo))
|
||||
break;
|
||||
diff --git a/star/gnutar.mk b/star/gnutar.mk
|
||||
index 1a296e1..6595aa2 100644
|
||||
--- a/star/gnutar.mk
|
||||
+++ b/star/gnutar.mk
|
||||
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
|
||||
CPPOPTS += -DUSE_ACL
|
||||
CPPOPTS += -DUSE_XATTR
|
||||
CPPOPTS += -DUSE_FFLAGS
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= gnutar.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
@@ -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)
|
||||
XMK_FILE= gnutarman.mk
|
||||
|
||||
###########################################################################
|
||||
diff --git a/star/pax.mk b/star/pax.mk
|
||||
index 73c6bc1..d2a52a9 100644
|
||||
--- a/star/pax.mk
|
||||
+++ b/star/pax.mk
|
||||
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
|
||||
CPPOPTS += -DUSE_ACL
|
||||
CPPOPTS += -DUSE_XATTR
|
||||
CPPOPTS += -DUSE_FFLAGS
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CPPOPTS += -DPAX
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= pax.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
@@ -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)
|
||||
XMK_FILE= spaxman.mk
|
||||
|
||||
###########################################################################
|
||||
diff --git a/star/star.c b/star/star.c
|
||||
index 9dfcef7..464c751 100644
|
||||
--- a/star/star.c
|
||||
+++ b/star/star.c
|
||||
@@ -48,6 +48,10 @@ static UConst char sccsid[] =
|
||||
#include "starsubs.h"
|
||||
#include "checkerr.h"
|
||||
|
||||
+#ifdef WITH_SELINUX
|
||||
+int selinux_enabled=0;
|
||||
+#endif
|
||||
+
|
||||
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)
|
||||
comerr("Panic cannot set back effective uid.\n");
|
||||
}
|
||||
my_uid = geteuid();
|
||||
+
|
||||
+#ifdef WITH_SELINUX
|
||||
+ selinux_enabled=is_selinux_enabled()>0;
|
||||
+#endif
|
||||
/*
|
||||
* WARNING: We now are no more able to open a new remote connection
|
||||
* unless we have been called by root.
|
||||
diff --git a/star/star.mk b/star/star.mk
|
||||
index fdaff9c..7b89f8c 100644
|
||||
--- a/star/star.mk
|
||||
+++ b/star/star.mk
|
||||
@@ -21,6 +21,7 @@ CPPOPTS += -DUSE_XATTR
|
||||
CPPOPTS += -DUSE_FFLAGS
|
||||
CPPOPTS += -DCOPY_LINKS_DELAYED
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CFILES= star.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
remove.c star_unix.c acl_unix.c acltext.c fflags.c \
|
||||
@@ -36,6 +37,7 @@ 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 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)
|
||||
XMK_FILE= Makefile.man starformatman.mk
|
||||
|
||||
###########################################################################
|
||||
diff --git a/star/star_fat.mk b/star/star_fat.mk
|
||||
index 1975c94..507fbee 100644
|
||||
--- a/star/star_fat.mk
|
||||
+++ b/star/star_fat.mk
|
||||
@@ -29,6 +29,7 @@ CPPOPTS += -DUSE_FFLAGS
|
||||
CPPOPTS += -DCOPY_LINKS_DELAYED
|
||||
CPPOPTS += -DSTAR_FAT
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CFILES= star_fat.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
remove.c star_unix.c acl_unix.c acltext.c fflags.c \
|
||||
@@ -48,7 +49,7 @@ HFILES= star.h starsubs.h dirtime.h xtab.h xutimes.h \
|
||||
|
||||
#LIBS= -lunos
|
||||
#LIBS= -lschily -lc /usr/local/lib/gcc-gnulib
|
||||
-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)
|
||||
#
|
||||
# Wenn -lfind, dann auch $(LIB_INTL)
|
||||
#
|
||||
diff --git a/star/starsubs.h b/star/starsubs.h
|
||||
index a914ade..1e2a233 100644
|
||||
--- a/star/starsubs.h
|
||||
+++ b/star/starsubs.h
|
||||
@@ -317,6 +317,11 @@ extern void opt_xattr __PR((void));
|
||||
extern BOOL get_xattr __PR((register FINFO *info));
|
||||
extern BOOL set_xattr __PR((register FINFO *info));
|
||||
extern void free_xattr __PR((star_xattr_t **xattr));
|
||||
+# ifdef WITH_SELINUX
|
||||
+#include <selinux/selinux.h>
|
||||
+extern BOOL setselinux __PR((register FINFO *info));
|
||||
+extern int selinux_enabled;
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/star/suntar.mk b/star/suntar.mk
|
||||
index 9b76a23..1842917 100644
|
||||
--- a/star/suntar.mk
|
||||
+++ b/star/suntar.mk
|
||||
@@ -19,6 +19,7 @@ CPPOPTS += -DUSE_FIND
|
||||
CPPOPTS += -DUSE_ACL
|
||||
CPPOPTS += -DUSE_XATTR
|
||||
CPPOPTS += -DUSE_FFLAGS
|
||||
+CPPOPTS += -DWITH_SELINUX
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= suntar.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
@@ -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)
|
||||
XMK_FILE= suntarman.mk
|
||||
|
||||
###########################################################################
|
||||
diff --git a/star/xattr.c b/star/xattr.c
|
||||
index 2e262ef..08fc42e 100644
|
||||
--- a/star/xattr.c
|
||||
+++ b/star/xattr.c
|
||||
@@ -198,6 +198,27 @@ fail:
|
||||
#endif /* USE_XATTR */
|
||||
}
|
||||
|
||||
+#ifdef WITH_SELINUX
|
||||
+EXPORT BOOL
|
||||
+setselinux(info)
|
||||
+ register FINFO *info;
|
||||
+{
|
||||
+#if defined(USE_XATTR) && defined(HAVE_SETXATTR) && defined(WITH_SELINUX)
|
||||
+ if (info->f_xattr) {
|
||||
+ star_xattr_t *xap;
|
||||
+ for (xap = info->f_xattr; xap->name != NULL; xap++) {
|
||||
+ if (strcmp(xap->name, "security.selinux") == 0) {
|
||||
+ if (setfscreatecon(xap->value)) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* USE_XATTR && WITH_SELINUX */
|
||||
+ return TRUE;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
/* ARGSUSED */
|
||||
EXPORT BOOL
|
||||
set_xattr(info)
|
||||
@@ -211,6 +232,10 @@ set_xattr(info)
|
||||
return (TRUE);
|
||||
|
||||
for (xap = info->f_xattr; xap->name != NULL; xap++) {
|
||||
+#ifdef WITH_SELINUX
|
||||
+ if (selinux_enabled && (strcmp(xap->name, "security.selinux") == 0))
|
||||
+ continue;
|
||||
+#endif
|
||||
if (lsetxattr(info->f_name, xap->name, xap->value,
|
||||
xap->value_len, 0) != 0) {
|
||||
if (!errhidden(E_SETXATTR, info->f_name)) {
|
@ -1,19 +0,0 @@
|
||||
diff --git a/star/star.mk b/star/star.mk
|
||||
index a6f6cff..fdaff9c 100644
|
||||
--- a/star/star.mk
|
||||
+++ b/star/star.mk
|
||||
@@ -31,11 +31,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)
|
||||
+ checkerr.h dumpdate.h bitstring.h pathname.h
|
||||
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_CAP)
|
||||
XMK_FILE= Makefile.man starformatman.mk
|
||||
|
||||
###########################################################################
|
43
star-1.6-manpagereferences.patch
Normal file
43
star-1.6-manpagereferences.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff --git a/star/spax.1 b/star/spax.1
|
||||
index b9a77e0..c462fe3 100644
|
||||
--- a/star/spax.1
|
||||
+++ b/star/spax.1
|
||||
@@ -4047,7 +4047,7 @@ Interfaces volume of IEEE Std 1003.1-2001,
|
||||
.BR chown (2),
|
||||
.BR creat (2),
|
||||
.BR mkdir (2),
|
||||
-.BR mkfifo (2),
|
||||
+.BR mkfifo (3),
|
||||
.BR stat (2),
|
||||
.BR utime (2),
|
||||
.BR write (2).
|
||||
@@ -4099,7 +4099,7 @@ entry is added to the ENVIRONMENT VARIABLES section.
|
||||
IEEE PASC Interpretation 1003.2 #168 is applied, clarifying that
|
||||
.BR mkdir (2)
|
||||
and
|
||||
-.BR mkfifo (2)
|
||||
+.BR mkfifo (3)
|
||||
calls can ignore an [EEXIST] error when
|
||||
extracting an archive.
|
||||
.PP
|
||||
diff --git a/star/star.1 b/star/star.1
|
||||
index caed9f4..a24d619 100644
|
||||
--- a/star/star.1
|
||||
+++ b/star/star.1
|
||||
@@ -5293,7 +5293,6 @@ cron script).
|
||||
Is used for the interactive user interface.
|
||||
.SH "SEE ALSO"
|
||||
.BR spax (1),
|
||||
-.BR suntar (1),
|
||||
.BR scpio (1),
|
||||
.BR tar (1),
|
||||
.BR cpio (1),
|
||||
@@ -5308,7 +5307,7 @@ Is used for the interactive user interface.
|
||||
.BR ssh (1),
|
||||
.BR star_sym (1),
|
||||
.BR tartest (1),
|
||||
-.BR star (4),
|
||||
+.BR star (1),
|
||||
.BR rcmd (3),
|
||||
.BR fssnap (1m)
|
||||
.SH DIAGNOSTICS
|
66
star-1.6-star-mk.patch
Normal file
66
star-1.6-star-mk.patch
Normal file
@ -0,0 +1,66 @@
|
||||
diff --git a/star/Makefile b/star/Makefile
|
||||
index e868c62..c47e81d 100644
|
||||
--- a/star/all.mk
|
||||
+++ b/star/all.mk
|
||||
@@ -12,7 +12,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.top
|
||||
# and copy star_fat.mk to Makefile.
|
||||
#
|
||||
|
||||
-MK_FILES= star.mk pax.mk suntar.mk gnutar.mk cpio.mk
|
||||
+MK_FILES= star.mk pax.mk cpio.mk
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.mks
|
||||
diff --git a/star/cpio.mk b/star/cpio.mk
|
||||
index 37a6dd2..0391239 100644
|
||||
--- a/star/cpio.mk
|
||||
+++ b/star/cpio.mk
|
||||
@@ -22,15 +22,16 @@ CPPOPTS += -DUSE_FFLAGS
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= cpio.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
- remove.c star_unix.c acl_unix.c acltext.c fflags.c \
|
||||
+ remove.c star_unix.c lpath_unix.c \
|
||||
+ acl_unix.c acltext.c fflags.c \
|
||||
buffer.c dirtime.c lhash.c \
|
||||
hole.c longnames.c \
|
||||
movearch.c table.c props.c \
|
||||
unicode.c \
|
||||
subst.c volhdr.c \
|
||||
chdir.c match.c defaults.c dumpdate.c \
|
||||
- fifo.c device.c checkerr.c \
|
||||
- findinfo.c pathname.c
|
||||
+ fifo.c device.c checkerr.c paxopts.c \
|
||||
+ findinfo.c pathname.c version.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
|
||||
diff --git a/star/pax.mk b/star/pax.mk
|
||||
index 73c6bc1..bd71e9b 100644
|
||||
--- a/star/pax.mk
|
||||
+++ b/star/pax.mk
|
||||
@@ -23,18 +23,19 @@ CPPOPTS += -DPAX
|
||||
CPPOPTS += -DSCHILY_PRINT
|
||||
CFILES= pax.c header.c cpiohdr.c xheader.c xattr.c \
|
||||
list.c extract.c create.c append.c diff.c restore.c \
|
||||
- remove.c star_unix.c acl_unix.c acltext.c fflags.c \
|
||||
+ remove.c star_unix.c lpath_unix.c \
|
||||
+ acl_unix.c acltext.c fflags.c \
|
||||
buffer.c dirtime.c lhash.c \
|
||||
hole.c longnames.c \
|
||||
movearch.c table.c props.c \
|
||||
unicode.c \
|
||||
subst.c volhdr.c \
|
||||
chdir.c match.c defaults.c dumpdate.c \
|
||||
- fifo.c device.c checkerr.c \
|
||||
- findinfo.c pathname.c
|
||||
+ fifo.c device.c checkerr.c paxopts.c \
|
||||
+ findinfo.c pathname.c version.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
|
||||
+ 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_CAP)
|
||||
XMK_FILE= spaxman.mk
|
||||
|
72
star.spec
72
star.spec
@ -1,57 +1,32 @@
|
||||
%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
|
||||
%global WITH_SELINUX 1
|
||||
%endif
|
||||
|
||||
%global ALTERNATIVES %{_sbindir}/alternatives
|
||||
|
||||
Summary: An archiving tool with ACL support
|
||||
Name: star
|
||||
Version: 1.5.3
|
||||
Release: 17%{?dist}
|
||||
Version: 1.6
|
||||
Release: 1%{?dist}
|
||||
License: CDDL
|
||||
URL: http://freecode.com/projects/star
|
||||
Source: http://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
|
||||
Source: https://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
|
||||
|
||||
# Fix broken star.mk in 1.5.3 (included from all.mk)
|
||||
Patch1: star-1.5.3-star-mk.patch
|
||||
|
||||
# add SELinux support to star(#)
|
||||
Patch2: star-1.5.3-selinux.patch
|
||||
# Fix broken all.mk
|
||||
Patch1: star-1.6-star-mk.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)
|
||||
Patch2: star-1.5.2-bufferoverflow.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)
|
||||
Patch6: star-1.5.1-selinux-segfault.patch
|
||||
|
||||
# note that the H=crc format uses Sum32 algorithm, not CRC
|
||||
Patch7: star-1.5.1-crc.patch
|
||||
# # Fix some invalid manpage references (#624612)
|
||||
Patch3: star-1.6-manpagereferences.patch
|
||||
|
||||
# Allow rmt to access all files.
|
||||
# ~> downstream
|
||||
# ~> #968980
|
||||
Patch8: star-1.5.2-rmt-rh-access.patch
|
||||
Patch4: star-1.5.2-rmt-rh-access.patch
|
||||
|
||||
# Use ssh rather than rsh by default
|
||||
# ~> downstream
|
||||
# ~> related to #968980
|
||||
Patch9: star-1.5.2-use-ssh-by-default.patch
|
||||
|
||||
# Fix segfault for 'pax -X' (rhbz#1175009)
|
||||
# ~> downstream
|
||||
Patch10: star-1.5.3-pax-X-option.patch
|
||||
|
||||
# Fix segfault on restore default acl (rhbz#1567836)
|
||||
Patch11: star-1.5.3-default-acl.patch
|
||||
|
||||
# Upstream fixed issues detected by covscan
|
||||
Patch12: star-1.5.3-covscan-2018.patch
|
||||
Patch5: star-1.5.2-use-ssh-by-default.patch
|
||||
|
||||
BuildRequires: libattr-devel libacl-devel libtool libselinux-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@ -99,21 +74,7 @@ restoring files from a backup), and tar (an archiving program).
|
||||
%global ALT_SL1_PATH %{_mandir}/man1/spax.1.gz
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .bug-config-1.5.3 %{?_rawbuild}
|
||||
%if %{WITH_SELINUX}
|
||||
%patch2 -p1 -b .selinux
|
||||
%endif
|
||||
%patch3 -p1 -b .changewarnSegv
|
||||
%patch4 -p1 -b .namesoverflow
|
||||
%patch5 -p1 -b .references
|
||||
%patch6 -p1 -b .selinux-segfault
|
||||
%patch7 -p1 -b .crc
|
||||
%patch8 -p1 -b .rmt-access-rules
|
||||
%patch9 -p1 -b .ssh-by-default
|
||||
%patch10 -p1 -b .pax-X
|
||||
%patch11 -p1 -b .default-acl
|
||||
%patch12 -p1 -b .covscan-2018
|
||||
%autosetup -p1
|
||||
|
||||
# disable single "fat" binary
|
||||
cp -a star/all.mk star/Makefile
|
||||
@ -152,7 +113,7 @@ done
|
||||
DEFCCOM=gcc
|
||||
|
||||
# Note: disable optimalisation by COPTX='-g3 -O0' LDOPTX='-g3 -O0'
|
||||
make %{?_smp_mflags} %make_flags
|
||||
make %make_flags
|
||||
|
||||
%install
|
||||
make install -s %make_flags
|
||||
@ -207,6 +168,7 @@ fi
|
||||
%{_bindir}/star
|
||||
%{_bindir}/ustar
|
||||
%{_mandir}/man1/star.1*
|
||||
%{_mandir}/man1/star_sym.1*
|
||||
%{_mandir}/man1/ustar.1*
|
||||
%{_mandir}/man5/star.5*
|
||||
|
||||
@ -235,6 +197,12 @@ fi
|
||||
%{_sysconfdir}/rmt
|
||||
|
||||
%changelog
|
||||
* Mon Sep 23 2019 Pavel Raiskup <praiskup@redhat.com> - 1.6-1
|
||||
- new upstream release
|
||||
- drop WITH_SELINUX knob and selinux patches, there's built-in support now
|
||||
- drop several patches which were incorporated upstream, except for
|
||||
changewarnSegv patch (did not apply, and not needed nowadays)
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.3-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user