Accepting request 632482 from utilities
OBS-URL: https://build.opensuse.org/request/show/632482 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/schily?expand=0&rev=5
This commit is contained in:
commit
27d7c4e074
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:802afdae0db164d384a13d705606860f5f80960217cb59057261c0e24452d95a
|
||||
size 4233820
|
@ -4,11 +4,25 @@ X-Upstream: PATCH-FIX-SUSE
|
||||
|
||||
Some default values for configuration/compilation
|
||||
|
||||
Index: schily-2018-05-25/DEFAULTS/Defaults.linux
|
||||
---
|
||||
DEFAULTS/Defaults.linux | 11 +++++------
|
||||
include/schily/schily.h | 2 +-
|
||||
man/Makefile | 2 +-
|
||||
mt/Makefile | 4 ++--
|
||||
rmt/Makefile | 4 ++--
|
||||
rmt/Makefile.man | 2 +-
|
||||
rmt/rmt.1 | 3 +--
|
||||
rmt/rmt.dfl | 16 +++++++---------
|
||||
star/all.mk | 2 +-
|
||||
star/pax.mk | 2 +-
|
||||
star/star.mk | 7 ++++---
|
||||
11 files changed, 26 insertions(+), 29 deletions(-)
|
||||
|
||||
Index: schily-2018-08-24/DEFAULTS/Defaults.linux
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/DEFAULTS/Defaults.linux
|
||||
+++ schily-2018-05-25/DEFAULTS/Defaults.linux
|
||||
@@ -26,7 +25,7 @@ DEFLINKMODE= static
|
||||
--- schily-2018-08-24.orig/DEFAULTS/Defaults.linux
|
||||
+++ schily-2018-08-24/DEFAULTS/Defaults.linux
|
||||
@@ -26,7 +26,7 @@ DEFLINKMODE= static
|
||||
# If the next line is uncommented, compilation is done with minimal warnings
|
||||
#
|
||||
###########################################################################
|
||||
@ -17,7 +31,7 @@ Index: schily-2018-05-25/DEFAULTS/Defaults.linux
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
@@ -41,9 +40,8 @@ LINUX_SRC_INCLUDE= $(__LINUX_SRC_IN
|
||||
@@ -41,9 +41,8 @@ LINUX_SRC_INCLUDE= $(__LINUX_SRC_IN
|
||||
|
||||
DEFINCDIRS= $(SRCROOT)/include
|
||||
DEFOSINCDIRS=
|
||||
@ -29,7 +43,7 @@ Index: schily-2018-05-25/DEFAULTS/Defaults.linux
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
@@ -57,13 +55,13 @@ OSDEFS += -D_GNU_SOURCE
|
||||
@@ -57,13 +56,13 @@ OSDEFS += -D_GNU_SOURCE
|
||||
# Installation config stuff
|
||||
#
|
||||
###########################################################################
|
||||
@ -45,23 +59,36 @@ Index: schily-2018-05-25/DEFAULTS/Defaults.linux
|
||||
DEFINSMODEX= 755
|
||||
DEFINSUSR= root
|
||||
DEFINSGRP= bin
|
||||
Index: schily-2018-05-25/include/schily/schily.h
|
||||
Index: schily-2018-08-24/include/schily/schily.h
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/include/schily/schily.h
|
||||
+++ schily-2018-05-25/include/schily/schily.h
|
||||
@@ -377,7 +377,7 @@ extern int _comerr __PR((FILE *, int, i
|
||||
#endif
|
||||
--- schily-2018-08-24.orig/include/schily/schily.h
|
||||
+++ schily-2018-08-24/include/schily/schily.h
|
||||
@@ -431,7 +431,7 @@ extern int _comerr __PR((FILE *, int, i
|
||||
#endif /* EOF */
|
||||
|
||||
/*PRINTFLIKE1*/
|
||||
-extern int error __PR((const char *, ...)) __printflike__(1, 2);
|
||||
+extern int error __PR((const char *, ...));
|
||||
#ifdef FOUND_SIZE_T
|
||||
extern char *fillbytes __PR((void *, ssize_t, char));
|
||||
extern char *zerobytes __PR((void *, ssize_t));
|
||||
Index: schily-2018-05-25/mt/Makefile
|
||||
/*PRINTFLIKE1*/
|
||||
extern int gterror __PR((const char *, ...)) __printflike__(1, 2);
|
||||
|
||||
Index: schily-2018-08-24/man/Makefile
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/mt/Makefile
|
||||
+++ schily-2018-05-25/mt/Makefile
|
||||
--- schily-2018-08-24.orig/man/Makefile
|
||||
+++ schily-2018-08-24/man/Makefile
|
||||
@@ -7,7 +7,7 @@ RULESDIR= RULES
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.top
|
||||
###########################################################################
|
||||
|
||||
-DIRS= man4
|
||||
+DIRS= man1
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.dir
|
||||
Index: schily-2018-08-24/mt/Makefile
|
||||
===================================================================
|
||||
--- schily-2018-08-24.orig/mt/Makefile
|
||||
+++ schily-2018-08-24/mt/Makefile
|
||||
@@ -7,7 +7,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
|
||||
INSDIR= bin
|
||||
@ -80,10 +107,38 @@ Index: schily-2018-05-25/mt/Makefile
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.cmd
|
||||
Index: schily-2018-05-25/rmt/rmt.1
|
||||
Index: schily-2018-08-24/rmt/Makefile
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/rmt/rmt.1
|
||||
+++ schily-2018-05-25/rmt/rmt.1
|
||||
--- schily-2018-08-24.orig/rmt/Makefile
|
||||
+++ schily-2018-08-24/rmt/Makefile
|
||||
@@ -5,8 +5,8 @@ RULESDIR= RULES
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.top
|
||||
###########################################################################
|
||||
|
||||
-INSDIR= sbin
|
||||
-TARGET= rmt
|
||||
+INSDIR= bin
|
||||
+TARGET= srmt
|
||||
CPPOPTS += -DUSE_REMOTE
|
||||
CPPOPTS += -DUSE_LARGEFILES
|
||||
CFILES= rmt.c
|
||||
Index: schily-2018-08-24/rmt/Makefile.man
|
||||
===================================================================
|
||||
--- schily-2018-08-24.orig/rmt/Makefile.man
|
||||
+++ schily-2018-08-24/rmt/Makefile.man
|
||||
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
###########################################################################
|
||||
|
||||
MANDIR= man
|
||||
-TARGETMAN= rmt
|
||||
+TARGETMAN= srmt
|
||||
MANSECT= $(MANSECT_CMD)
|
||||
MANSUFFIX= $(MANSUFF_CMD)
|
||||
MANFILE= rmt.1
|
||||
Index: schily-2018-08-24/rmt/rmt.1
|
||||
===================================================================
|
||||
--- schily-2018-08-24.orig/rmt/rmt.1
|
||||
+++ schily-2018-08-24/rmt/rmt.1
|
||||
@@ -17,9 +17,8 @@
|
||||
.SH NAME
|
||||
rmt \- remote magnetic tape protocol server
|
||||
@ -95,10 +150,10 @@ Index: schily-2018-05-25/rmt/rmt.1
|
||||
|
||||
.SH DESCRIPTION
|
||||
.IX "rmt command" "" "\fLrmt\fP \(em remote magnetic tape protocol server"
|
||||
Index: schily-2018-05-25/rmt/rmt.dfl
|
||||
Index: schily-2018-08-24/rmt/rmt.dfl
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/rmt/rmt.dfl
|
||||
+++ schily-2018-05-25/rmt/rmt.dfl
|
||||
--- schily-2018-08-24.orig/rmt/rmt.dfl
|
||||
+++ schily-2018-08-24/rmt/rmt.dfl
|
||||
@@ -18,15 +18,13 @@
|
||||
# Each USER= entry adds the listed user to the users who may run rmt
|
||||
#
|
||||
@ -131,38 +186,10 @@ Index: schily-2018-05-25/rmt/rmt.dfl
|
||||
-ACCESS=* * /dev/zero
|
||||
+#ACCESS=* * /dev/zero
|
||||
#ACCESS=* * *
|
||||
Index: schily-2018-05-25/rmt/Makefile
|
||||
Index: schily-2018-08-24/star/all.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/rmt/Makefile
|
||||
+++ schily-2018-05-25/rmt/Makefile
|
||||
@@ -5,8 +5,8 @@ RULESDIR= RULES
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.top
|
||||
###########################################################################
|
||||
|
||||
-INSDIR= sbin
|
||||
-TARGET= rmt
|
||||
+INSDIR= bin
|
||||
+TARGET= srmt
|
||||
CPPOPTS += -DUSE_REMOTE
|
||||
CPPOPTS += -DUSE_LARGEFILES
|
||||
CFILES= rmt.c
|
||||
Index: schily-2018-05-25/rmt/Makefile.man
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/rmt/Makefile.man
|
||||
+++ schily-2018-05-25/rmt/Makefile.man
|
||||
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
###########################################################################
|
||||
|
||||
MANDIR= man
|
||||
-TARGETMAN= rmt
|
||||
+TARGETMAN= srmt
|
||||
MANSECT= $(MANSECT_CMD)
|
||||
MANSUFFIX= $(MANSUFF_CMD)
|
||||
MANFILE= rmt.1
|
||||
Index: schily-2018-05-25/star/all.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/all.mk
|
||||
+++ schily-2018-05-25/star/all.mk
|
||||
--- schily-2018-08-24.orig/star/all.mk
|
||||
+++ schily-2018-08-24/star/all.mk
|
||||
@@ -12,7 +12,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
# and copy star_fat.mk to Makefile.
|
||||
#
|
||||
@ -172,10 +199,10 @@ Index: schily-2018-05-25/star/all.mk
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.mks
|
||||
Index: schily-2018-05-25/star/pax.mk
|
||||
Index: schily-2018-08-24/star/pax.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/pax.mk
|
||||
+++ schily-2018-05-25/star/pax.mk
|
||||
--- schily-2018-08-24.orig/star/pax.mk
|
||||
+++ schily-2018-08-24/star/pax.mk
|
||||
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
|
||||
INSDIR= bin
|
||||
@ -185,10 +212,10 @@ Index: schily-2018-05-25/star/pax.mk
|
||||
CPPOPTS += -D__STAR__
|
||||
CPPOPTS += -DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
|
||||
#CPPOPTS += -DSET_CTIME -DFIFO -DUSE_MMAP
|
||||
Index: schily-2018-05-25/star/star.mk
|
||||
Index: schily-2018-08-24/star/star.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.mk
|
||||
+++ schily-2018-05-25/star/star.mk
|
||||
--- schily-2018-08-24.orig/star/star.mk
|
||||
+++ schily-2018-08-24/star/star.mk
|
||||
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
|
||||
|
||||
INSDIR= bin
|
||||
@ -217,16 +244,3 @@ Index: schily-2018-05-25/star/star.mk
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.cmd
|
||||
Index: schily-2018-05-25/man/Makefile
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/man/Makefile
|
||||
+++ schily-2018-05-25/man/Makefile
|
||||
@@ -7,7 +7,7 @@ RULESDIR= RULES
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.top
|
||||
###########################################################################
|
||||
|
||||
-DIRS= man4
|
||||
+DIRS= man1
|
||||
|
||||
###########################################################################
|
||||
include $(SRCROOT)/$(RULESDIR)/rules.dir
|
||||
|
@ -1,95 +0,0 @@
|
||||
From: Kristyna Streitova <kstreitova@suse.com>
|
||||
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
||||
References: http://bugzilla.opensuse.org/858660
|
||||
X-Upstream: PATCH-FIX-UPSTREAM
|
||||
|
||||
detect gzip failures
|
||||
|
||||
Index: schily-2018-05-25/star/buffer.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/buffer.c
|
||||
+++ schily-2018-05-25/star/buffer.c
|
||||
@@ -1804,6 +1804,10 @@ checkerrs()
|
||||
errmsgno(EX_BAD, "Problems with restore database.\n");
|
||||
return (TRUE);
|
||||
}
|
||||
+ if (xstats.s_comprerrs > 0) {
|
||||
+ errmsgno(EX_BAD, "Compress program returned error[%d].\n", xstats.s_comprerrs);
|
||||
+ return (TRUE);
|
||||
+ }
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
@@ -1879,6 +1883,16 @@ die(err)
|
||||
excomerrno(err, "Cannot recover from error - exiting.\n");
|
||||
}
|
||||
|
||||
+void sigchld_handler(int sig)
|
||||
+{
|
||||
+ int status;
|
||||
+ pid_t pid;
|
||||
+ while ((pid = wait4(compresspid, &status, 0, NULL)) > 0) {
|
||||
+ if (pid == compresspid)
|
||||
+ xstats.s_comprerrs = WEXITSTATUS(status);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
/*
|
||||
* Quick hack to implement a -z flag. May be changed soon.
|
||||
*/
|
||||
@@ -1894,6 +1908,8 @@ compressopen()
|
||||
int mypid;
|
||||
char *zip_prog = "gzip";
|
||||
|
||||
+ compresspid = 0;
|
||||
+
|
||||
if (compress_prg)
|
||||
zip_prog = compress_prg;
|
||||
else if (bzflag)
|
||||
@@ -1957,6 +1973,7 @@ compressopen()
|
||||
#else
|
||||
if (fpipe(pp) == 0)
|
||||
comerr("Compress pipe failed\n");
|
||||
+ signal(SIGCHLD, sigchld_handler);
|
||||
mypid = fork();
|
||||
if (mypid < 0)
|
||||
comerr("Compress fork failed\n");
|
||||
@@ -1986,7 +2003,10 @@ compressopen()
|
||||
fexecl(zip_prog, tarf, pp[1], null, zip_prog, "-d", (char *)NULL);
|
||||
errmsg("Compress: exec of '%s' failed\n", zip_prog);
|
||||
_exit(-1);
|
||||
+ } else {
|
||||
+ compresspid = mypid;
|
||||
}
|
||||
+
|
||||
fclose(tarf);
|
||||
if (cflag) {
|
||||
tarf = pp[1];
|
||||
Index: schily-2018-05-25/star/star.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.c
|
||||
+++ schily-2018-05-25/star/star.c
|
||||
@@ -117,6 +117,7 @@ char strvers[] = "1.5.4"; /* The pure v
|
||||
char *vers; /* the full version string */
|
||||
|
||||
struct star_stats xstats; /* for printing statistics */
|
||||
+pid_t compresspid = 0;
|
||||
|
||||
extern BOOL havepat; /* Pattern matching in use */
|
||||
|
||||
Index: schily-2018-05-25/star/star.h
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.h
|
||||
+++ schily-2018-05-25/star/star.h
|
||||
@@ -870,9 +870,11 @@ struct star_stats {
|
||||
int s_setxattr; /* set xattr for file failed */
|
||||
#endif
|
||||
int s_restore; /* other incremental restore specific */
|
||||
+ int s_comprerrs; /* errors of compress-subprogram */
|
||||
};
|
||||
|
||||
extern struct star_stats xstats;
|
||||
+extern pid_t compresspid; /* pid of compress-subprogram child */
|
||||
|
||||
|
||||
#include <schily/param.h>
|
@ -1,21 +0,0 @@
|
||||
From: Kristyna Streitova <kstreitova@suse.com>
|
||||
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
||||
X-Upstream: PATCH-FIX-UPSTREAM
|
||||
|
||||
Fix broken star.mk in 1.5.3 (included from all.mk)
|
||||
|
||||
Index: schily-2018-05-25/star/star.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.mk
|
||||
+++ schily-2018-05-25/star/star.mk
|
||||
@@ -37,8 +37,8 @@ CFILES= star.c header.c cpiohdr.c xhead
|
||||
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
|
||||
|
||||
###########################################################################
|
@ -1,20 +0,0 @@
|
||||
From: Kristyna Streitova <kstreitova@suse.com>
|
||||
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
||||
References: http://bugzilla.opensuse.org/97500
|
||||
X-Upstream: PATCH-FIX-SUSE
|
||||
|
||||
do not run FSYNC by default
|
||||
|
||||
Index: schily-2018-05-25/star/star.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.c
|
||||
+++ schily-2018-05-25/star/star.c
|
||||
@@ -193,7 +193,7 @@ int verbose = 0; /* -v has been spec
|
||||
BOOL silent = FALSE; /* -silent no informal msg */
|
||||
BOOL prblockno = FALSE; /* -block-number for all files */
|
||||
BOOL no_xheader = FALSE; /* -no-xheader ignore P.2001 */
|
||||
-BOOL no_fsync = FALSE; /* -no-fsync on extract */
|
||||
+BOOL no_fsync = TRUE; /* -no-fsync on extract */
|
||||
BOOL readnull = FALSE; /* -read0 on with list= */
|
||||
BOOL tpath = FALSE; /* -tpath print path only */
|
||||
BOOL cflag = FALSE; /* -c has been specified */
|
@ -1,230 +0,0 @@
|
||||
From: Kristyna Streitova <kstreitova@suse.com>
|
||||
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
||||
X-Upstream: PATCH-FIX-UPSTREAM
|
||||
|
||||
Implement selinux
|
||||
|
||||
Index: schily-2018-05-25/autoconf/rules.cnf.in
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/autoconf/rules.cnf.in
|
||||
+++ schily-2018-05-25/autoconf/rules.cnf.in
|
||||
@@ -38,6 +38,7 @@ LIB_GEN= @lib_gen@
|
||||
LIB_ELF= @lib_elf@
|
||||
LIB_PTHREAD= @lib_pthread@
|
||||
LIB_RT= @lib_rt@
|
||||
+LIB_SELINUX = @lib_selinux@
|
||||
LIB_DL= @lib_dl@
|
||||
LIB_DIR= @lib_dir@
|
||||
LIB_CAP= @lib_cap@
|
||||
Index: schily-2018-05-25/star/cpio.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/cpio.mk
|
||||
+++ schily-2018-05-25/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 xhead
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
Index: schily-2018-05-25/star/extract.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/extract.c
|
||||
+++ schily-2018-05-25/star/extract.c
|
||||
@@ -261,6 +261,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;
|
||||
Index: schily-2018-05-25/star/gnutar.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/gnutar.mk
|
||||
+++ schily-2018-05-25/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 xhe
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
Index: schily-2018-05-25/star/pax.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/pax.mk
|
||||
+++ schily-2018-05-25/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 xheade
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
Index: schily-2018-05-25/star/star.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star.c
|
||||
+++ schily-2018-05-25/star/star.c
|
||||
@@ -51,6 +51,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));
|
||||
@@ -443,6 +447,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.
|
||||
Index: schily-2018-05-25/star/star_fat.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/star_fat.mk
|
||||
+++ schily-2018-05-25/star/star_fat.mk
|
||||
@@ -33,6 +33,7 @@ CPPOPTS += -DUSE_ICONV # Use iconv() fo
|
||||
CPPOPTS += -DUSE_NLS # Include locale support
|
||||
CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_utils\"
|
||||
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 \
|
||||
@@ -55,7 +56,7 @@ HFILES= star.h starsubs.h dirtime.h xta
|
||||
#
|
||||
# LIB_CAP is needed for Linux capability support in librmt.
|
||||
#
|
||||
-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)
|
||||
#
|
||||
# Wenn -lfind, dann auch $(LIB_INTL)
|
||||
#
|
||||
Index: schily-2018-05-25/star/starsubs.h
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/starsubs.h
|
||||
+++ schily-2018-05-25/star/starsubs.h
|
||||
@@ -322,6 +322,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
|
||||
|
||||
/*
|
||||
Index: schily-2018-05-25/star/suntar.mk
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/suntar.mk
|
||||
+++ schily-2018-05-25/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 xhe
|
||||
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
|
||||
|
||||
###########################################################################
|
||||
Index: schily-2018-05-25/star/xattr.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/star/xattr.c
|
||||
+++ schily-2018-05-25/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_xflags & XF_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 @@
|
||||
From: Kristyna Streitova <kstreitova@suse.com>
|
||||
Date: Wed, 06 Jun 2018 14:51:57 +0000
|
||||
X-Upstream: PATCH-FIX-SUSE
|
||||
|
||||
use ssh as adefault remote access method
|
||||
|
||||
Index: schily-2018-05-25/librmt/remote.c
|
||||
===================================================================
|
||||
--- schily-2018-05-25.orig/librmt/remote.c
|
||||
+++ schily-2018-05-25/librmt/remote.c
|
||||
@@ -1464,7 +1464,7 @@ _rcmdrsh(ahost, inport, locuser, remuser
|
||||
int pid;
|
||||
|
||||
if (rsh == 0)
|
||||
- rsh = "rsh";
|
||||
+ rsh = "ssh";
|
||||
|
||||
/*
|
||||
* Verify that 'locuser' is present on local host.
|
3
schily-2018-08-24.tar.bz2
Normal file
3
schily-2018-08-24.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a294de340bb560d120180fd24408a74fe5d38a1d39a5061575dc78b99878fcda
|
||||
size 4289504
|
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 29 07:57:23 UTC 2018 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 2018.08.24
|
||||
* star: SELinux support has been added.
|
||||
* star: dotdot atacks are now also detected if they are based
|
||||
on DOS filesystem semantics.
|
||||
* star: Added a new check for the exit code of the compress
|
||||
program.
|
||||
* star: A hard EOF on input now results in a non-zero exit code.
|
||||
* star: Now defaults to use "ssh" for the remote tape interface.
|
||||
* star: There is now a way to make -no-fsync the default
|
||||
behavior to avoid slow operation on platforms with slow
|
||||
buffer cache.
|
||||
* librmt: added a way to configure the remote shell and the
|
||||
remote tape server path.
|
||||
* star: support for unlimited file path length.
|
||||
* libschily: a new set of gt*() and fgt*() functions with
|
||||
gettext() support have been added.
|
||||
* Bourne Shell: avoid a core dump with missing HOME.
|
||||
* libfind: added a new primary "-call" that allows to call back
|
||||
into the program instead of calling exec().
|
||||
* libfind: new primaries -newerat, -newermt, -newerct.
|
||||
- Remove schily-2018-05-25_star_detect_gzip_failures.patch,
|
||||
schily-2018-05-25_star_use_ssh_by_default.patch,
|
||||
schily-2018-05-25_star_no_fsync.patch,
|
||||
schily-2018-05-25_star_selinux.patch
|
||||
(merged upstream)
|
||||
- Remove schily-2018-05-25_star_mk.patch (no longer needed)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 29 07:45:44 UTC 2018 - jengelh@inai.de
|
||||
|
||||
- Drop Conflicts against cpio-mt/tar-rmt, since update-alternatives
|
||||
is used as an arbitraring mechanism.
|
||||
- Add Provides: mt, rmt.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 19 06:27:37 UTC 2018 - bwiedemann@suse.com
|
||||
|
||||
|
48
schily.spec
48
schily.spec
@ -17,14 +17,14 @@
|
||||
|
||||
|
||||
# See schily-%rver/AN-%rver for changelog and when subprogram versions might change
|
||||
%global box_version 2018.05.25
|
||||
%global box_version 2018.08.24
|
||||
%global cdr_version 3.02~a10
|
||||
%global smake_version 1.3
|
||||
%global star_version 1.5.4
|
||||
%define rver 2018-05-25
|
||||
%define rver 2018-08-24
|
||||
|
||||
Name: schily
|
||||
Version: 2018.05.25
|
||||
Version: 2018.08.24
|
||||
Release: 0
|
||||
Summary: A collection of command-line utilities maintained by J.Schilling
|
||||
License: CDDL-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND HPND AND ISC
|
||||
@ -36,12 +36,7 @@ Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2
|
||||
Source1: README-FIRST
|
||||
Patch1: iconv-name.diff
|
||||
Patch2: schily-2018-05-25_star_configuration.patch
|
||||
Patch3: schily-2018-05-25_star_no_fsync.patch
|
||||
Patch4: schily-2018-05-25_star_lock.patch
|
||||
Patch5: schily-2018-05-25_star_detect_gzip_failures.patch
|
||||
Patch7: schily-2018-05-25_star_use_ssh_by_default.patch
|
||||
Patch8: schily-2018-05-25_star_mk.patch
|
||||
Patch9: schily-2018-05-25_star_selinux.patch
|
||||
# Honor https://en.opensuse.org/openSUSE:Packaging_Patches_guidelines#Upstream_policy
|
||||
# and submit patches upstream FIRST (cc to the bspkg maintainer perhaps).
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -159,12 +154,12 @@ Group: System/Libraries
|
||||
The library implements a heuristic file type determinator,
|
||||
similar to file/libmagic1.
|
||||
|
||||
%package -n libfind2_0
|
||||
%package -n libfind3_0
|
||||
Summary: A library for /usr/bin/find-like functionality
|
||||
License: CDDL-1.0
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libfind2_0
|
||||
%description -n libfind3_0
|
||||
libfind allows to be used for adding find(1)-like command-line features
|
||||
to programs.
|
||||
|
||||
@ -262,7 +257,7 @@ Requires: libdeflt1_0 = %box_version
|
||||
Requires: libedc_ecc1_0 = %cdr_version
|
||||
Requires: libedc_ecc_dec1_0 = %cdr_version
|
||||
Requires: libfile1_0 = %box_version
|
||||
Requires: libfind2_0 = %box_version
|
||||
Requires: libfind3_0 = %box_version
|
||||
Requires: librmt1_0 = %box_version
|
||||
Requires: libschily1_0 = %box_version
|
||||
Requires: libxtermcap1_0 = %box_version
|
||||
@ -346,8 +341,7 @@ by the remote user.
|
||||
Summary: Magnetic tape control
|
||||
License: CDDL-1.0
|
||||
Group: Productivity/Archiving/Backup
|
||||
Conflicts: cpio-mt
|
||||
Conflicts: mt-st
|
||||
Provides: mt
|
||||
Obsoletes: star-rmt
|
||||
Provides: star-rmt:/usr/bin/smt
|
||||
Requires(post): update-alternatives
|
||||
@ -361,8 +355,7 @@ tape drive.
|
||||
Summary: Remote magnetic tape protocol server
|
||||
License: CDDL-1.0
|
||||
Group: Productivity/Archiving/Backup
|
||||
Conflicts: dump-rmt
|
||||
Conflicts: tar-rmt
|
||||
Provides: rmt
|
||||
Obsoletes: star-rmt
|
||||
Provides: star-rmt:/usr/bin/srmt
|
||||
Requires(post): update-alternatives
|
||||
@ -412,14 +405,7 @@ Features:
|
||||
|
||||
%prep
|
||||
%setup -qn %name-%rver
|
||||
%patch -P 1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch -P 1 -P 2 -P 4 -p1
|
||||
find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+"
|
||||
|
||||
cp %{SOURCE1} .
|
||||
@ -461,7 +447,7 @@ mkdir -p "%_docdir"
|
||||
for i in "$b/%_datadir/doc"/*; do
|
||||
test "$i" != "$b/%_docdir" && mv "$i" "$b/%_docdir/"
|
||||
done
|
||||
install -D -m 644 %{SOURCE1} %{buildroot}%{_docdir}/schily-rmt
|
||||
install -Dm 644 "%_sourcedir/README-FIRST" "$b/%_docdir/schily-rmt"
|
||||
|
||||
# bosh
|
||||
mv -fv "$b/%_bindir/sh" "$b/%_bindir/bosh"
|
||||
@ -496,6 +482,8 @@ rm -fv "$b/%_mandir/man1/suntar.1"
|
||||
|
||||
# mt/rmt
|
||||
rm -fv "$b/%_bindir/mt" # handled up u-a
|
||||
ln -sv smt.1 "$b/%_mandir/man1/mt.1"
|
||||
ln -sv srmt.1 "$b/%_mandir/man1/rmt.1"
|
||||
ls -l "$b/%_mandir"/man*/*mt*
|
||||
|
||||
# get rid of things that upset rpmlint
|
||||
@ -708,8 +696,8 @@ fi
|
||||
%postun -n libedc_ecc_dec1_0 -p /sbin/ldconfig
|
||||
%post -n libfile1_0 -p /sbin/ldconfig
|
||||
%postun -n libfile1_0 -p /sbin/ldconfig
|
||||
%post -n libfind2_0 -p /sbin/ldconfig
|
||||
%postun -n libfind2_0 -p /sbin/ldconfig
|
||||
%post -n libfind3_0 -p /sbin/ldconfig
|
||||
%postun -n libfind3_0 -p /sbin/ldconfig
|
||||
%post -n libparanoia1_0 -p /sbin/ldconfig
|
||||
%postun -n libparanoia1_0 -p /sbin/ldconfig
|
||||
%post -n librmt1_0 -p /sbin/ldconfig
|
||||
@ -738,9 +726,13 @@ fi
|
||||
%license CDDL.Schily.txt
|
||||
%_bindir/bosh
|
||||
%_bindir/jsh
|
||||
%_bindir/obosh
|
||||
%_bindir/pbosh
|
||||
%_bindir/pfsh
|
||||
%_mandir/man1/bosh.1*
|
||||
%_mandir/man1/jsh.1*
|
||||
%_mandir/man1/obosh.1*
|
||||
%_mandir/man1/pbosh.1*
|
||||
%_mandir/man1/pfsh.1*
|
||||
|
||||
%files -n btcflash
|
||||
@ -795,9 +787,9 @@ fi
|
||||
%license libfile/LEGAL.NOTICE
|
||||
%_libdir/libfile.so.1.0
|
||||
|
||||
%files -n libfind2_0
|
||||
%files -n libfind3_0
|
||||
%license CDDL.Schily.txt
|
||||
%_libdir/libfind.so.2.0
|
||||
%_libdir/libfind.so.3.0
|
||||
|
||||
%files -n libparanoia1_0
|
||||
%license libparanoia/LICENSE
|
||||
|
Loading…
Reference in New Issue
Block a user