SHA256
1
0
forked from pool/schily

Accepting request 614856 from utilities

- Remove schily-2018-05-25_star_bufferoverflow.patch
  (the bug is long gone, the patch has no effect)
- add patches from the star package
  * schily-2018-05-25_star_configuration.patch
  * schily-2018-05-25_star_no_fsync.patch
  * schily-2018-05-25_star_lock.patch
  * schily-2018-05-25_star_detect_gzip_failures.patch
  * schily-2018-05-25_star_bufferoverflow.patch
  * schily-2018-05-25_star_use_ssh_by_default.patch
  * schily-2018-05-25_star_mk.patch
  * schily-2018-05-25_star_selinux.patch
- add missing BuildRequires for star:
  * autoconf (because of selinux patch)
  * libacl-devel
  * libattr-devel
  * libselinux-devel
  * libtool
- install README-FIRST (as schily-rmt) documentation
- add noreplace for %_sysconfdir/default/rmt and
  %_sysconfdir/default/star
- move srmt from sbindir to bindir
- do not ship star_sym and suntar
- Update to new upstream release 2018.05.25
  * star: user name, group name, path and linkpath are now
    automatically added to the POSIX.1-2001 extended header in
    case that they include non-ASCII characters (outside the
    7-bit range).
- Remove gccwarns.diff (fixed upstream), gcc48wa.diff (we no
  longer have gcc-4.8)
- Update to new upstream release 2018.05.17
  * smake: Now using TYPE_MAXVAL(time_t) in gnewtime() instead of
    the method from 1996, to work around a problem with gcc-8.1
    and clang-6.0.
  * mkisofs: The link count computation did incorrectly count all
    directory entries for large (multi extent) files. This
    resulted in a link count that was "real number" + (sizeof
    file / 2GB)
  * mkisofs: File meta data for UDF directories that refer to a
    Rock Ridge relocated directory had been emitted as all
    zeroes.
  * star: nanosecond timestamp support
  * libfind: nanosecond timestamp support
  * star: Added a new archive format "epax". This is the same as
    "pax", but it always includes a POSIX.1-2001 extended header
    with timestamps with nanosecond resolution.
- Update to new upstream release 2018.05.02
  * bsh: fixed a NULL deref when the file content was "#!"
  * bsh: Avoid a coredump from expressions like
    "$2222222222222222222" that cause an integer overflow while
    converting the number.
  * mkisofs: fixed crash during Joliet info creation
  * Better support for Address Sanitizer
  * (s)patch: CVE-2018-1000156 was fixed
  * star: star -diff is now able to compare nanoseconds in
    timestamps.
- Drop mkisofs-j-crash.diff (fixed upstream)
- Add gccwarns.diff to address some undefined behavior.
- Add update-alternatives handling for (s)rmt and (s)mt
- Add spax and star subpackages

OBS-URL: https://build.opensuse.org/request/show/614856
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/schily?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2018-06-08 21:09:03 +00:00 committed by Git OBS Bridge
commit 6467154f5a
15 changed files with 948 additions and 244 deletions

15
README-FIRST Normal file
View File

@ -0,0 +1,15 @@
If you want to use rmt from this package, you have to edit /etc/default/rmt
to configure it. By default, nobody is allowed to run mt (entry USER) and
the only visible target (entry ACCESS) is the null device.
If you would like to have an account to directly access rmt, you will have
to create one yourself, setting the default shell to /usr/sbin/rmt. Please
don't forget to add entries to .rhosts in the home directory of said account
for all remote users that are allowed to use this account.
The creation of this account may be done either via YaST2 or via useradd.
An example for using useradd would be:
useradd -c "Remote TAPE" -G bin -s /usr/sbin/rmt rtape
After creating this account, you have to add this user to /etc/default/rmt.

View File

@ -1,87 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-11-14 02:36:58.866260522 +0100
References: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59125
build: workaround a gcc-4.8 bug
Add memset to clear the entire buffer beforehand. Then, use memcpy,
which is equally good given that the size of all strings is known.
---
cdrecord/scsi_cdr.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
Index: cdrtools-3.01/cdrecord/scsi_cdr.c
===================================================================
--- cdrtools-3.01.orig/cdrecord/scsi_cdr.c
+++ cdrtools-3.01/cdrecord/scsi_cdr.c
@@ -2282,14 +2282,13 @@ getdev(scgp, print)
printf("\n");
}
+ memset(vendor_info, '\0', sizeof(vendor_info));
+ memset(prod_ident, '\0', sizeof(prod_ident));
+ memset(prod_revision, '\0', sizeof(prod_revision));
strncpy(vendor_info, inq->inq_vendor_info, sizeof (inq->inq_vendor_info));
strncpy(prod_ident, inq->inq_prod_ident, sizeof (inq->inq_prod_ident));
strncpy(prod_revision, inq->inq_prod_revision, sizeof (inq->inq_prod_revision));
- vendor_info[sizeof (inq->inq_vendor_info)] = '\0';
- prod_ident[sizeof (inq->inq_prod_ident)] = '\0';
- prod_revision[sizeof (inq->inq_prod_revision)] = '\0';
-
switch (inq->type) {
case INQ_DASD:
@@ -2316,29 +2315,29 @@ getdev(scgp, print)
if (inq->add_len == 0) {
if (scgp->dev == DEV_UNKNOWN && got_inquiry) {
scgp->dev = DEV_ACB5500;
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"ADAPTEC ACB-5500 FAKE",
sizeof (inq->inq_info_space));
} else switch (scgp->dev) {
case DEV_ACB40X0:
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"ADAPTEC ACB-40X0 FAKE",
sizeof (inq->inq_info_space));
break;
case DEV_ACB4000:
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"ADAPTEC ACB-4000 FAKE",
sizeof (inq->inq_info_space));
break;
case DEV_ACB4010:
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"ADAPTEC ACB-4010 FAKE",
sizeof (inq->inq_info_space));
break;
case DEV_ACB4070:
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"ADAPTEC ACB-4070 FAKE",
sizeof (inq->inq_info_space));
break;
@@ -2370,14 +2369,14 @@ getdev(scgp, print)
case INQ_SEQD:
if (scgp->dev == DEV_SC4000) {
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"SYSGEN SC4000 FAKE",
sizeof (inq->inq_info_space));
} else if (inq->add_len == 0 &&
inq->removable &&
inq->ansi_version == 1) {
scgp->dev = DEV_MT02;
- strncpy(inq->inq_info_space,
+ memcpy(inq->inq_info_space,
"EMULEX MT02 FAKE",
sizeof (inq->inq_info_space));
}

View File

@ -1,8 +1,16 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2018-04-11 20:00:58.584068848 +0200
References: https://sourceware.org/bugzilla/show_bug.cgi?id=23048
libsiconv can/will use libc iconv if it knows about a particular
character set (or pair thereof), and will fall back to its own
implementation and tables otherwise. glibc fails to offer the
"cp10000" identifier, but it does have the desired table under a
different name.
Change the name in .c so we do not need to install the cp10000 siconv
table.
Workaround a shortcoming in glibc which lacks cp1XXX identifiers
without having to install any siconv tables.
---
mkisofs/mkisofs.8 | 13 ++++++-------
mkisofs/mkisofs.c | 4 ++--

View File

@ -1,50 +0,0 @@
From: Joerg Schilling <Joerg.Schilling@fokus.fraunhofer.de>
Date: Wed, 4 Apr 2018 14:23:49 +0200
Message-Id: <5ac4c3d5.KoDNJ6KE385qa01k%Joerg.Schilling@fokus.fraunhofer.de>
--- /tmp/sccs.qiaqyV 2018-01-25 20:32:44.873172000 +0100
+++ joliet.c 2018-04-04 14:17:50.101534000 +0200
From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 4 Apr 2018 14:08:35 +0200 (CEST)
Message-ID: <alpine.LSU.2.20.1804041403120.2913@n3.vanv.qr>
Can't call strlen(source) when source==NULL.
Shouldn't call strlen(source) before checking source==NULL.
---
mkisofs/joliet.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: schily-2018-03-16/mkisofs/joliet.c
===================================================================
--- schily-2018-03-16.orig/mkisofs/joliet.c
+++ schily-2018-03-16/mkisofs/joliet.c
@@ -258,13 +258,6 @@ convert_to_unicode(buffer, size, source,
int jsize;
/*
- * joliet_strlen() behaves the same way: Stop at the first nul byte.
- * Note: we cannot have 16 bit character representations in the source
- * encoding, if we like strlen() to work correctly.
- */
- jsize = strlen(source);
-
- /*
* If we get a NULL pointer for the source, it means we have an
* inplace copy, and we need to make a temporary working copy first.
*/
@@ -276,6 +269,13 @@ convert_to_unicode(buffer, size, source,
}
/*
+ * joliet_strlen() behaves the same way: Stop at the first nul byte.
+ * Note: we cannot have 16 bit character representations in the source
+ * encoding, if we like strlen() to work correctly.
+ */
+ jsize = strlen(tmpbuf);
+
+ /*
* Now start copying characters. If the size was specified to be 0,
* then assume the input was 0 terminated.
*/

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b92bfe7aa587514aaea28e063564433ecd68df051b9acd9fa3e4d5c52d4794a
size 4210963

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:802afdae0db164d384a13d705606860f5f80960217cb59057261c0e24452d95a
size 4233820

View File

@ -0,0 +1,232 @@
From: Kristyna Streitova <kstreitova@suse.com>
Date: Wed, 06 Jun 2018 14:51:57 +0000
X-Upstream: PATCH-FIX-SUSE
Some default values for configuration/compilation
Index: schily-2018-05-25/DEFAULTS/Defaults.linux
===================================================================
--- schily-2018-05-25.orig/DEFAULTS/Defaults.linux
+++ schily-2018-05-25/DEFAULTS/Defaults.linux
@@ -26,7 +25,7 @@ DEFLINKMODE= static
# If the next line is uncommented, compilation is done with minimal warnings
#
###########################################################################
-CWARNOPTS=
+#CWARNOPTS=
###########################################################################
#
@@ -41,9 +40,8 @@ LINUX_SRC_INCLUDE= $(__LINUX_SRC_IN
DEFINCDIRS= $(SRCROOT)/include
DEFOSINCDIRS=
-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= -L/usr/lib
+RUNPATH=
###########################################################################
#
@@ -57,13 +55,13 @@ OSDEFS += -D_GNU_SOURCE
# Installation config stuff
#
###########################################################################
-INS_BASE= /opt/schily
+INS_BASE= /usr
INS_KBASE= /
INS_RBASE= /
#
DEFUMASK= 002
#
-DEFINSMODEF= 444
+DEFINSMODEF= 644
DEFINSMODEX= 755
DEFINSUSR= root
DEFINSGRP= bin
Index: schily-2018-05-25/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
/*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
===================================================================
--- schily-2018-05-25.orig/mt/Makefile
+++ schily-2018-05-25/mt/Makefile
@@ -7,7 +7,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
INSDIR= bin
TARGET= smt
-SYMLINKS= mt
+#SYMLINKS= mt
CPPOPTS += -DUSE_REMOTE
CPPOPTS += -DSCHILY_PRINT
@@ -17,7 +17,7 @@ CFILES= mt.c
# LIB_CAP is needed for Linux capability support in librmt.
#
LIBS= -lrmt -lschily $(LIB_SOCKET) $(LIB_CAP)
-XMK_FILE= Makefile.man mt.mk1
+XMK_FILE= Makefile.man
###########################################################################
include $(SRCROOT)/$(RULESDIR)/rules.cmd
Index: schily-2018-05-25/rmt/rmt.1
===================================================================
--- schily-2018-05-25.orig/rmt/rmt.1
+++ schily-2018-05-25/rmt/rmt.1
@@ -17,9 +17,8 @@
.SH NAME
rmt \- remote magnetic tape protocol server
.SH SYNOPSIS
-.B /opt/schily/sbin/rmt
.br
-.B /etc/rmt
+.B /usr/bin/rmt
.SH DESCRIPTION
.IX "rmt command" "" "\fLrmt\fP \(em remote magnetic tape protocol server"
Index: schily-2018-05-25/rmt/rmt.dfl
===================================================================
--- schily-2018-05-25.orig/rmt/rmt.dfl
+++ schily-2018-05-25/rmt/rmt.dfl
@@ -18,15 +18,13 @@
# Each USER= entry adds the listed user to the users who may run rmt
#
# A typical passwd entry looks like this:
-# rtape:x:1999:1000:Remote TAPE:/export/home/rtape:/opt/schily/sbin/rmt
+# rtape:x:1999:1000:Remote TAPE:/home/tape:/usr/sbin/rmt
#
-# Add entries for all valid remote users to /export/home/rtape/.rhosts
+# Add entries for all valid remote users to:
+# /home/tape/.rhosts
#
#USER=rtape
-#USER=joerg
-# Default to old SunOS behavior. If you like to be more restrictive, comment
-# out the entry below and enable the explicit USER= entries above.
-USER=*
+#USER=*
#
# Each ACCESS= entry adds a target or group of targets to the list of visible
@@ -43,8 +41,8 @@ USER=*
# user host file
# name name
#
-#ACCESS=rtape sparky /dev/rmt/*
-ACCESS=* * /dev/rmt/*
+#ACCESS=rtape sparky /dev/st0
+#ACCESS=* * /dev/nst*
ACCESS=* * /dev/null
-ACCESS=* * /dev/zero
+#ACCESS=* * /dev/zero
#ACCESS=* * *
Index: schily-2018-05-25/rmt/Makefile
===================================================================
--- 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
@@ -12,7 +12,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
# 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 Makefile.dfl
###########################################################################
include $(SRCROOT)/$(RULESDIR)/rules.mks
Index: schily-2018-05-25/star/pax.mk
===================================================================
--- schily-2018-05-25.orig/star/pax.mk
+++ schily-2018-05-25/star/pax.mk
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
INSDIR= bin
TARGET= spax
-#SYMLINKS= ustar tar
+SYMLINKS= pax
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
===================================================================
--- schily-2018-05-25.orig/star/star.mk
+++ schily-2018-05-25/star/star.mk
@@ -8,7 +8,7 @@ include $(SRCROOT)/$(RULESDIR)/rules.to
INSDIR= bin
TARGET= star
-SYMLINKS= ustar tar
+SYMLINKS= ustar
CPPOPTS += -D__STAR__
CPPOPTS += -DSET_CTIME -DFIFO -DUSE_MMAP -DUSE_REMOTE -DUSE_RCMD_RSH
#CPPOPTS += -DSET_CTIME -DFIFO -DUSE_MMAP
@@ -23,6 +23,7 @@ CPPOPTS += -DCOPY_LINKS_DELAYED
CPPOPTS += -DUSE_NLS
CPPOPTS += -DTEXT_DOMAIN=\"SCHILY_utils\"
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 \
@@ -37,8 +38,8 @@ CFILES= star.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 restore.h \
checkerr.h dumpdate.h bitstring.h
-LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL)
-XMK_FILE= Makefile.man starformatman.mk
+LIBS= -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) $(LIB_SOCKET) $(LIB_INTL) $(LIB_SELINUX)
+XMK_FILE= Makefile.man
###########################################################################
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

View File

@ -0,0 +1,95 @@
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>

View File

@ -0,0 +1,55 @@
From: Kristyna Streitova <kstreitova@suse.com>
Date: Wed, 06 Jun 2018 14:51:57 +0000
References: http://bugzilla.opensuse.org/414251
X-Upstream: PATCH-FIX-SUSE
Set read lock before using the semaphore wait on a pipe fd to avoid deadlock
Index: schily-2018-05-25/star/fifo.c
===================================================================
--- schily-2018-05-25.orig/star/fifo.c
+++ schily-2018-05-25/star/fifo.c
@@ -487,13 +487,42 @@ LOCAL int
swait(f)
int f;
{
- int ret;
+ int ret, err;
unsigned char c;
+ struct flock lock;
+ useconds_t wait;
+
+ wait = 500000;
+ lock.l_type = F_RDLCK;
+ lock.l_whence = SEEK_CUR;
+ lock.l_start = 0;
+ lock.l_len = 0;
+ do {
+ err = fcntl(f, F_SETLK, &lock);
+ if (err < 0) {
+ err = geterrno();
+ if (err == EINTR)
+ continue;
+ if ((err == EACCES || err == EAGAIN) && (wait > 0)) {
+ usleep(10000);
+ wait -= 10000;
+ continue;
+ }
+ errmsg("Can not get lock on semaphore wait for file descriptor\n");
+ exprstats(-1);
+ }
+ } while (0);
seterrno(0);
do {
ret = read(f, &c, 1);
} while (ret < 0 && geterrno() == EINTR);
+
+ lock.l_type = F_UNLCK;
+ do {
+ err = fcntl(f, F_SETLK, &lock);
+ } while (err < 0 && geterrno() == EINTR);
+
if (ret < 0 || (ret == 0 && pid)) {
/*
* If pid != 0, this is the foreground process

View File

@ -0,0 +1,21 @@
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
###########################################################################

View File

@ -0,0 +1,20 @@
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 */

View File

@ -0,0 +1,230 @@
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)) {

View File

@ -0,0 +1,19 @@
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.

View File

@ -1,3 +1,90 @@
-------------------------------------------------------------------
Wed Jun 6 20:23:02 UTC 2018 - jengelh@inai.de
- Remove schily-2018-05-25_star_bufferoverflow.patch
(the bug is long gone, the patch has no effect)
-------------------------------------------------------------------
Tue Jun 5 08:21:16 UTC 2018 - kstreitova@suse.com
- add patches from the star package
* schily-2018-05-25_star_configuration.patch
* schily-2018-05-25_star_no_fsync.patch
* schily-2018-05-25_star_lock.patch
* schily-2018-05-25_star_detect_gzip_failures.patch
* schily-2018-05-25_star_bufferoverflow.patch
* schily-2018-05-25_star_use_ssh_by_default.patch
* schily-2018-05-25_star_mk.patch
* schily-2018-05-25_star_selinux.patch
- add missing BuildRequires for star:
* autoconf (because of selinux patch)
* libacl-devel
* libattr-devel
* libselinux-devel
* libtool
- install README-FIRST (as schily-rmt) documentation
- add noreplace for %_sysconfdir/default/rmt and
%_sysconfdir/default/star
- move srmt from sbindir to bindir
- do not ship star_sym and suntar
-------------------------------------------------------------------
Mon May 28 12:20:09 UTC 2018 - jengelh@inai.de
- Update to new upstream release 2018.05.25
* star: user name, group name, path and linkpath are now
automatically added to the POSIX.1-2001 extended header in
case that they include non-ASCII characters (outside the
7-bit range).
- Remove gccwarns.diff (fixed upstream), gcc48wa.diff (we no
longer have gcc-4.8)
-------------------------------------------------------------------
Thu May 17 14:06:18 UTC 2018 - jengelh@inai.de
- Update to new upstream release 2018.05.17
* smake: Now using TYPE_MAXVAL(time_t) in gnewtime() instead of
the method from 1996, to work around a problem with gcc-8.1
and clang-6.0.
* mkisofs: The link count computation did incorrectly count all
directory entries for large (multi extent) files. This
resulted in a link count that was "real number" + (sizeof
file / 2GB)
* mkisofs: File meta data for UDF directories that refer to a
Rock Ridge relocated directory had been emitted as all
zeroes.
* star: nanosecond timestamp support
* libfind: nanosecond timestamp support
* star: Added a new archive format "epax". This is the same as
"pax", but it always includes a POSIX.1-2001 extended header
with timestamps with nanosecond resolution.
-------------------------------------------------------------------
Wed May 16 16:38:42 UTC 2018 - jengelh@inai.de
- Update to new upstream release 2018.05.02
* bsh: fixed a NULL deref when the file content was "#!"
* bsh: Avoid a coredump from expressions like
"$2222222222222222222" that cause an integer overflow while
converting the number.
* mkisofs: fixed crash during Joliet info creation
* Better support for Address Sanitizer
* (s)patch: CVE-2018-1000156 was fixed
* star: star -diff is now able to compare nanoseconds in
timestamps.
- Drop mkisofs-j-crash.diff (fixed upstream)
- Add gccwarns.diff to address some undefined behavior.
-------------------------------------------------------------------
Tue May 8 15:53:47 UTC 2018 - jengelh@inai.de
- Add update-alternatives handling for (s)rmt and (s)mt
-------------------------------------------------------------------
Tue May 8 14:48:48 UTC 2018 - jengelh@inai.de
- Add spax and star subpackages
-------------------------------------------------------------------
Wed Apr 11 19:03:52 UTC 2018 - jengelh@inai.de

View File

@ -16,12 +16,15 @@
#
%global box_version 2018.03.16
%global cdr_version 3.02~a09
%define rver 2018-03-16
# See schily-%rver/AN-%rver for changelog and when subprogram versions might change
%global box_version 2018.05.25
%global cdr_version 3.02~a10
%global smake_version 1.3
%global star_version 1.5.4
%define rver 2018-05-25
Name: schily
Version: 2018.03.16
Version: 2018.05.25
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
@ -30,15 +33,26 @@ Url: http://cdrtools.sourceforge.net/private/cdrecord.html
#Freshcode-Url: http://freshcode.club/projects/schily
Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2
Patch1: gcc48wa.diff
Patch2: mkisofs-j-crash.diff
Patch3: iconv-name.diff
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
BuildRequires: autoconf
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libcap-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
BuildRequires: makedepend
Conflicts: cdrkit-cdrtools-compat
@ -145,12 +159,12 @@ Group: System/Libraries
The library implements a heuristic file type determinator,
similar to file/libmagic1.
%package -n libfind1_0
%package -n libfind2_0
Summary: A library for /usr/bin/find-like functionality
License: CDDL-1.0
Group: System/Libraries
%description -n libfind1_0
%description -n libfind2_0
libfind allows to be used for adding find(1)-like command-line features
to programs.
@ -248,7 +262,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: libfind1_0 = %box_version
Requires: libfind2_0 = %box_version
Requires: librmt1_0 = %box_version
Requires: libschily1_0 = %box_version
Requires: libxtermcap1_0 = %box_version
@ -328,27 +342,33 @@ started up with an rexec(3) or rcmd(3) call but it may also be
connected via an internal pipe to an ssh(1) session that was set up
by the remote user.
%package -n schily-mt
%package mt
Summary: Magnetic tape control
License: CDDL-1.0
Group: Productivity/Archiving/Backup
Conflicts: cpio-mt
Conflicts: mt-st
Conflicts: star-rmt
Obsoletes: star-rmt
Provides: star-rmt:/usr/bin/smt
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description -n schily-mt
%description mt
The mt/smt program sends commands to a local or a remote magnetic
tape drive.
%package -n schily-rmt
%package rmt
Summary: Remote magnetic tape protocol server
License: CDDL-1.0
Group: Productivity/Archiving/Backup
Conflicts: dump-rmt
Conflicts: tar-rmt
Conflicts: star-rmt
Obsoletes: star-rmt
Provides: star-rmt:/usr/bin/srmt
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description -n schily-rmt
%description rmt
rmt is a program that can be used by e.g. star and ufsdump
for accessing remote magnetic tape drives and files through an
interprocess communication connection.
@ -356,11 +376,54 @@ interprocess communication connection.
A tape client would launch something like ssh for the actual
connection, and through that, have the rmt program executed.
%package -n spax
Summary: Portable Archive Exchange
License: CDDL-1.0
Group: Productivity/Archiving/Backup
Version: %star_version
Release: 0
Requires: star = %star_version
Provides: pax = 3.5
Obsoletes: pax < 3.5
%description -n spax
pax is an archiving utility specified by POSIX.1-2001. The format is
basically tar, but with additional extended attributes.
%package -n star
Summary: tar implementation compliant to POSIX.1-2001
License: CDDL-1.0
Group: Productivity/Archiving/Backup
Version: %star_version
Release: 0
%description -n star
Star is a tar-like archiver (tar standing for Tape ARchiver).
Features:
* FIFO to keep the tape streaming
* Remote tape support
* Accurate sparse files
* Pattern matcher to archive and extract a subset of files
* User tailorable interface for comparing tar archives against file trees
* Path names up to 1024 bytes may be archived
* Stores and restores all 3 file times (even creation time). With POSIX.1-2001,
the times are in nanosecond granularity.
%prep
%setup -qn %name-%rver
%patch -P 1 -P 2 -P 3 -p1
%patch -P 1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+"
cp %{SOURCE1} .
%build
perl -i -pe 's{\@echo}{echo}' RULES/cc-*
# Static link libhfs, only used by mkisofs.
@ -369,39 +432,36 @@ rm -fv libhfs_iso/shlhfs.mk
rm -fv libmdigest/shlmdigest.mk
# Static link libshedit, used only by bosh.
rm -fv libshedit/shlshedit.mk
# Static link libsiconv. On glibc, it forwards to iconv anyway.
# Static link libsiconv. It forwards to glibc iconv for supported charsets.
rm -fv libsiconv/shlsiconv.mk
# (this is a noninteractive build; nobody will read the warnings
# or care about the pause, so use GMAKE_NOWARN.)
# - To enable verbosity, use with CC=cc LDCC=cc DYNLD=cc.
# - Not fully parallel safe, so stick to default.
#
# To enable verbosity, use with CC=cc LDCC=cc DYNLD=cc.
#
# Note that specifying -fPIE/-pie here conflicts with the generation
# of shared objects, which is why we build those separately
# in schily-libs.spec instead.
#
# Not fully parallel safe, so stick to default.
#
gmake GMAKE_NOWARN=true RUNPATH="" LINKMODE=dynamic \
COPTOPT="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" \
LDOPTX="" RUNPATH=""
mycf="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1"
gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX=""
%install
b="%buildroot"
# D'oh… not parallel safe
gmake GMAKE_NOWARN=true RUNPATH="" LINKMODE=dynamic \
DESTDIR="$b" INS_BASE="%_prefix" install -j1
# Fix permissions again.
find "$b" "(" -type d -o -type f ")" -exec chmod u+w "{}" "+"
if test "%_lib" != lib; then
mkdir -p "$b/%_libdir"
mv "$b/%_prefix/lib"/* "$b/%_libdir/"
fi
find "$b/%_libdir" -type f -name "*.a" -delete
find "$b/%_libdir" -type f -name "*.so.*" -exec chmod a+x "{}" "+"
# Install documentation
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
# bosh
mv -fv "$b/%_bindir/sh" "$b/%_bindir/bosh"
@ -421,13 +481,29 @@ perl -pi -e 's#/usr/local/bin/perl#%_bindir/perl#g' "$b/%_bindir/tracknames.pl"
# Rename in order to not conflict with mkisofs/README in rpm doc section
#mv mkisofs/diag/README mkisofs/diag/README.diag
# libsiconv. uses libc's iconv here, so does not need its own tables.
# libsiconv. tries to use libc's iconv first before trying its own tables.
rm -Rfv "$b/%_datadir/lib/siconv"
# spax/star
ln -sfv spax "$b/%_bindir/pax"
rm -fv "$b/%_bindir/tar" "$b/%_bindir/gnutar"
# Do not ship star_sym and suntar
rm -fv "$b/%_bindir/star_sym"
rm -fv "$b/%_bindir/suntar"
rm -fv "$b/%_mandir/man1/star_sym.1"
rm -fv "$b/%_mandir/man1/suntar.1"
# mt/rmt
rm -fv "$b/%_bindir/mt" # handled up u-a
ls -l "$b/%_mandir"/man*/*mt*
# get rid of things that upset rpmlint
find "$b/usr/share/doc" -type f -name "*big*" -print -delete
# deal with this another time
rm -Rf "$b/usr/ccs" "$b/usr/xpg4" "$b/%_bindir/sccs"
rm -f \
$b/etc/default/star \
$b/etc/sformat.dat \
$b/usr/bin/Cstyle \
$b/usr/bin/bsh \
@ -439,7 +515,6 @@ rm -f \
$b/usr/bin/count \
$b/usr/bin/cstyle.js \
$b/usr/bin/dmake \
$b/usr/bin/gnutar \
$b/usr/bin/hdump \
$b/usr/bin/label \
$b/usr/bin/lndir \
@ -466,17 +541,10 @@ rm -f \
$b/usr/bin/smake \
$b/usr/bin/spaste \
$b/usr/bin/spatch \
$b/usr/bin/spax \
$b/usr/bin/star \
$b/usr/bin/star_sym \
$b/usr/bin/strar \
$b/usr/bin/suntar \
$b/usr/bin/tar \
$b/usr/bin/tartest \
$b/usr/bin/termcap \
$b/usr/bin/translit \
$b/usr/bin/udiff \
$b/usr/bin/ustar \
$b/usr/bin/ved \
$b/usr/bin/ved-e \
$b/usr/bin/ved-w \
@ -493,52 +561,6 @@ rm -f \
$b/usr/share/doc/packages/libparanoia/README.interface \
$b/usr/share/doc/packages/libparanoia/README.paranoia \
$b/usr/share/doc/packages/schilyutils/dotfiles.tar.bz2 \
$b/usr/share/doc/packages/star/README \
$b/usr/share/doc/packages/star/README.ACL \
$b/usr/share/doc/packages/star/README.crash \
$b/usr/share/doc/packages/star/README.largefiles \
$b/usr/share/doc/packages/star/README.mtio \
$b/usr/share/doc/packages/star/README.otherbugs \
$b/usr/share/doc/packages/star/README.pattern \
$b/usr/share/doc/packages/star/README.posix-2001 \
$b/usr/share/doc/packages/star/STARvsGNUTAR \
$b/usr/share/doc/packages/star/testscripts/00INDEX \
$b/usr/share/doc/packages/star/testscripts/100char_longlink.tar \
$b/usr/share/doc/packages/star/testscripts/100char_longlink.tar-non-compliant \
$b/usr/share/doc/packages/star/testscripts/README.GNUtar-multivol.fail \
$b/usr/share/doc/packages/star/testscripts/README.create-and-remove \
$b/usr/share/doc/packages/star/testscripts/README.gtarfail \
$b/usr/share/doc/packages/star/testscripts/README.largefiles \
$b/usr/share/doc/packages/star/testscripts/README.longnames \
$b/usr/share/doc/packages/star/testscripts/README.paxbug \
$b/usr/share/doc/packages/star/testscripts/README.quicktest \
$b/usr/share/doc/packages/star/testscripts/create-and-remove.tar \
$b/usr/share/doc/packages/star/testscripts/dirloop.tar \
$b/usr/share/doc/packages/star/testscripts/g-hdr.pax.gz \
$b/usr/share/doc/packages/star/testscripts/gnu-multi-fail-volume1.gtar \
$b/usr/share/doc/packages/star/testscripts/gnu-multi-fail-volume2.gtar \
$b/usr/share/doc/packages/star/testscripts/gtarfail.tar \
$b/usr/share/doc/packages/star/testscripts/gtarfail2.tar \
$b/usr/share/doc/packages/star/testscripts/long.ustar.gz \
$b/usr/share/doc/packages/star/testscripts/mk \
$b/usr/share/doc/packages/star/testscripts/mk2 \
$b/usr/share/doc/packages/star/testscripts/not_a_tar_file \
$b/usr/share/doc/packages/star/testscripts/not_a_tar_file2 \
$b/usr/share/doc/packages/star/testscripts/old-file.tar \
$b/usr/share/doc/packages/star/testscripts/pax-big-10g.tar.bz2 \
$b/usr/share/doc/packages/star/testscripts/quicktest.filelist \
$b/usr/share/doc/packages/star/testscripts/remove.tar \
$b/usr/share/doc/packages/star/testscripts/tartest-quicktest.out \
$b/usr/share/doc/packages/star/testscripts/types-star-oldsparse.tar.gz \
$b/usr/share/doc/packages/star/testscripts/typescript \
$b/usr/share/doc/packages/star/testscripts/ustar-all-filetypes.tar \
$b/usr/share/doc/packages/star/testscripts/ustar-all-quicktest-past-contig.tar \
$b/usr/share/doc/packages/star/testscripts/ustar-all-quicktest.tar \
$b/usr/share/doc/packages/star/testscripts/ustar-all-quicktest.tar-without-cont-file \
$b/usr/share/doc/packages/star/testscripts/ustar-bad-filetypes.tar \
$b/usr/share/doc/packages/star/testscripts/ustar-bad-signedsum.tar \
$b/usr/share/doc/packages/star/testscripts/ustar-big-2g.tar.bz2 \
$b/usr/share/doc/packages/star/testscripts/ustar-big-8g.tar.bz2 \
$b/usr/share/doc/packages/ved/dotfiles.tar.bz2 \
$b/usr/share/doc/packages/ved/vedsheet.ps \
$b/usr/share/doc/packages/ved/vedsheet.tr \
@ -618,18 +640,13 @@ rm -f \
$b/usr/share/man/man1/smake.1 \
$b/usr/share/man/man1/spaste.1 \
$b/usr/share/man/man1/spatch.1 \
$b/usr/share/man/man1/spax.1 \
$b/usr/share/man/man1/star.1 \
$b/usr/share/man/man1/star_sym.1 \
$b/usr/share/man/man1/strar.1 \
$b/usr/share/man/man1/suntar.1 \
$b/usr/share/man/man1/sysV-make.1 \
$b/usr/share/man/man1/tartest.1 \
$b/usr/share/man/man1/termcap.1 \
$b/usr/share/man/man1/translit.1 \
$b/usr/share/man/man1/udiff.1 \
$b/usr/share/man/man1/unget.1 \
$b/usr/share/man/man1/ustar.1 \
$b/usr/share/man/man1/val.1 \
$b/usr/share/man/man1/vc.1 \
$b/usr/share/man/man1/ved-e.1 \
@ -641,7 +658,6 @@ rm -f \
$b/usr/share/man/man5/makerules.5 \
$b/usr/share/man/man5/sccschangeset.5 \
$b/usr/share/man/man5/sccsfile.5 \
$b/usr/share/man/man5/star.5 \
$b/usr/share/man/man5/streamarchive.5 \
$b/usr/share/man/man8/sformat.8
@ -662,6 +678,26 @@ true
%set_permissions %_bindir/readcd
true
%post mt
"%_sbindir/update-alternatives" \
--install "%_bindir/mt" mt "%_bindir/smt" 10 \
--slave "%_mandir/man1/mt.1%ext_man" "mt.1%ext_man" "%_mandir/man1/smt.1%ext_man"
%postun mt
if test "$1" = 0; then
"%_sbindir/update-alternatives" --remove mt "%_bindir/smt"
fi
%post rmt
"%_sbindir/update-alternatives" \
--install "%_bindir/rmt" rmt "%_bindir/srmt" 10 \
--slave "%_mandir/man8/rmt.1%ext_man" "rmt.1%ext_man" "%_mandir/man8/srmt.1%ext_man"
%postun rmt
if test "$1" = 0; then
"%_sbindir/update-alternatives" --remove rmt "%_bindir/srmt"
fi
%post -n libcdrdeflt1_0 -p /sbin/ldconfig
%postun -n libcdrdeflt1_0 -p /sbin/ldconfig
%post -n libdeflt1_0 -p /sbin/ldconfig
@ -672,8 +708,8 @@ true
%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 libfind1_0 -p /sbin/ldconfig
%postun -n libfind1_0 -p /sbin/ldconfig
%post -n libfind2_0 -p /sbin/ldconfig
%postun -n libfind2_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
@ -759,9 +795,9 @@ true
%license libfile/LEGAL.NOTICE
%_libdir/libfile.so.1.0
%files -n libfind1_0
%files -n libfind2_0
%license CDDL.Schily.txt
%_libdir/libfind.so.1.0
%_libdir/libfind.so.2.0
%files -n libparanoia1_0
%license libparanoia/LICENSE
@ -910,16 +946,39 @@ true
%_mandir/man1/rscsi.1*
%files -n schily-mt
%_bindir/mt
%license CDDL.Schily.txt
%_bindir/smt
%_mandir/man1/mt.1*
%_mandir/man1/smt.1*
%ghost %_sysconfdir/alternatives/mt
%ghost %_sysconfdir/alternatives/mt.1%ext_man
%ghost %_mandir/man1/mt.1%ext_man
%files -n schily-rmt
%license CDDL.Schily.txt
%config %_sysconfdir/default/rmt
%{_docdir}/schily-rmt
%config(noreplace) %_sysconfdir/default/rmt
%_docdir/rmt/
%_sbindir/rmt
%_mandir/man1/rmt.1*
%_bindir/srmt
%_mandir/man1/srmt.1*
%ghost %_sysconfdir/alternatives/rmt
%ghost %_sysconfdir/alternatives/rmt.1%ext_man
%ghost %_mandir/man1/rmt.1%ext_man
%files -n spax
%license CDDL.Schily.txt
%_bindir/pax
%_bindir/spax
%_mandir/man1/spax.1*
%files -n star
%license CDDL.Schily.txt
%config(noreplace) %_sysconfdir/default/star
%_bindir/star
%_bindir/tartest
%_bindir/ustar
%_docdir/star/
%_mandir/man1/star.1*
%_mandir/man1/ustar.1*
%_mandir/man5/star.5*
%changelog