Hello community,

here is the log from the commit of package star.3556 for openSUSE:13.1:Update 
checked in at 2015-03-01 13:27:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/star.3556 (Old)
 and      /work/SRC/openSUSE:13.1:Update/.star.3556.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "star.3556"

Changes:
--------
New Changes file:

--- /dev/null   2015-02-28 12:43:00.252025756 +0100
+++ /work/SRC/openSUSE:13.1:Update/.star.3556.new/star.changes  2015-03-01 
13:27:11.000000000 +0100
@@ -0,0 +1,321 @@
+-------------------------------------------------------------------
+Thu Feb 19 15:55:09 UTC 2015 - kstreit...@suse.com
+
+- add patch star-1.5-content_to_stderr.patch to fix situation when
+  star outputs contents of an archive to stderr instead of stdout
+  (bnc#918021). 
+
+-------------------------------------------------------------------
+Fri Jun 13 13:08:58 UTC 2014 - vdziewie...@suse.com
+
+-fix bnc#858660 - star does not detect gzip failures:
+       bnc#858660_detect_gzip_failures.patch
+-The return code of gzip was lost in the way star calls gzip.
+star returned zero regardless of errors reported during the gzip
+operation.
+
+-------------------------------------------------------------------
+Sun Jun 16 23:59:28 UTC 2013 - jeng...@inai.de
+
+- Explicitly list libattr-devel as BuildRequires
+- Remove redundant %clean section.
+
+-------------------------------------------------------------------
+Wed Mar 20 10:49:11 UTC 2013 - sch...@suse.de
+
+- Port baroque configuration system to aarch64
+
+-------------------------------------------------------------------
+Tue Jun 19 14:29:48 UTC 2012 - cfarr...@suse.com
+
+- license update: CDDL-1.0
+  SPDX format
+
+-------------------------------------------------------------------
+Wed Jan  4 15:47:36 CET 2012 - meiss...@suse.de
+
+- for ppc64, we need to do the stuff that suse_update_config did.
+
+-------------------------------------------------------------------
+Wed Dec 21 13:40:32 UTC 2011 - co...@suse.com
+
+- add autoconf as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Wed Dec 21 10:31:49 UTC 2011 - co...@suse.com
+
+- remove call to suse_update_config (very old work around)
+
+-------------------------------------------------------------------
+Fri Sep 30 14:11:20 UTC 2011 - ag...@novell.com
+
+- fix build on armv7
+
+-------------------------------------------------------------------
+Wed Jul 28 14:39:29 UTC 2010 - pu...@novell.com
+
+- star-1.5.1-bufferoverflow.patch (bnc#625527) 
+
+-------------------------------------------------------------------
+Mon Jun  8 00:16:00 CEST 2009 - r...@suse.de
+
+- rename getline to my_getline to avoid collision with function
+  from glibc 
+- rename fexecve to my_fexecve to avoid collision with function
+  from glibc 
+
+-------------------------------------------------------------------
+Tue Mar 10 17:34:47 CET 2009 - wer...@suse.de
+
+- Set read lock before using the semaphore wait on a pipe fd
+  to avoid deadlock (bnc#414251)
+
+-------------------------------------------------------------------
+Wed Aug 20 15:20:06 CEST 2008 - mkoe...@suse.de
+
+- enable SELinux support [fate#303662] 
+
+-------------------------------------------------------------------
+Tue Apr 29 15:23:56 CEST 2008 - mkoe...@suse.de
+
+- set version to 1.5final to avoid update problem with previous
+  version number 1.5a70.
+
+-------------------------------------------------------------------
+Mon Apr 28 16:17:51 CEST 2008 - s...@suse.de
+
+- update to version 1.5 final (see Changelog in package documentation
+  for all changes)
+- remove patch star-CVE-2007-4134.patch (is upstream now)
+- don't build with -D_GNU_SOURCE
+
+-------------------------------------------------------------------
+Fri Aug 31 14:59:09 CEST 2007 - mkoe...@suse.de
+
+- fix directory traversal vulnerability CVE-2007-4134 [#302489]
+
+-------------------------------------------------------------------
+Mon Sep 11 12:37:53 CEST 2006 - j...@suse.de
+
+- remove unused GPL code. Fixing #134113
+
+-------------------------------------------------------------------
+Wed May 10 19:52:36 CEST 2006 - m...@suse.de
+
+- compile with RPM_OPT_FLAGS [#170464]
+
+-------------------------------------------------------------------
+Wed Jan 25 21:41:49 CET 2006 - m...@suse.de
+
+- converted neededforbuild to BuildRequires
+
+-------------------------------------------------------------------
+Tue Dec 20 17:06:13 CET 2005 - m...@suse.de
+
+- update to 1.5a70
+  o null.diff is upstream
+
+-------------------------------------------------------------------
+Fri Dec  9 10:00:33 CET 2005 - r...@suse.de
+
+- disable selinux 
+
+-------------------------------------------------------------------
+Tue Nov 22 13:01:50 CET 2005 - m...@suse.de
+
+- ustar should link to star [#134107]
+
+-------------------------------------------------------------------
+Tue Nov 15 16:07:43 CET 2005 - u...@suse.de
+
+- link armv4l build rules to armv5tel (aka QEMU)
+
+-------------------------------------------------------------------
+Mon Jul 25 16:42:07 CEST 2005 - nadvor...@suse.cz
+
+- install symlink /etc/rmt -> /sbin/rmt
+- provide rmt
+
+-------------------------------------------------------------------
+Thu Jul 21 12:56:39 CEST 2005 - m...@suse.de
+
+- Disable fsync again [#97500]
+- Enable null.diff
+
+-------------------------------------------------------------------
+Wed Jul 20 11:56:08 CEST 2005 - m...@suse.de
+
+- Move rmt to /sbin [#97266]
+
+-------------------------------------------------------------------
+Tue Jun 28 12:13:53 CEST 2005 - agr...@suse.de
+
+- null.diff: Add -null option to star (patch from Bj�rn Jacke).
+
+-------------------------------------------------------------------
+Fri Feb 18 18:13:50 CET 2005 - agr...@suse.de
+
+- The new version also needs e2fsprogs-devel for some defines.
+
+-------------------------------------------------------------------
+Wed Feb 16 22:28:27 CET 2005 - agr...@suse.de
+
+- star-acl-fix.diff: Drop this patch: it contains a bug (#50874)
+  and nothing else that would be useful.
+
+-------------------------------------------------------------------
+Wed Feb 16 18:24:17 CET 2005 - agr...@suse.de
+
+- Update to version 1.5a58-pre2.
+
+-------------------------------------------------------------------
+Wed Feb 16 11:00:51 CET 2005 - agr...@suse.de
+
+- Add support for the ext3 'j' flag (per-file data journaling).
+
+-------------------------------------------------------------------
+Wed Aug 11 12:55:45 CEST 2004 - m...@suse.de
+
+- Update to star-1.5a44
+
+-------------------------------------------------------------------
+Fri Jul  9 14:03:07 CEST 2004 - m...@suse.de
+
+- Update to star-1.5a41 and move stuff from %prep to %build
+
+-------------------------------------------------------------------
+Mon Mar 15 16:46:10 CET 2004 - ku...@suse.de
+
+- Add SELinux support
+
+-------------------------------------------------------------------
+Fri Mar  5 11:46:58 CET 2004 - m...@suse.de
+
+- Fix testsuite
+
+-------------------------------------------------------------------
+Thu Mar  4 20:04:50 CET 2004 - m...@suse.de
++++ 124 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.star.3556.new/star.changes

New:
----
  README-FIRST
  bnc#858660_detect_gzip_failures.patch
  rmt-move.diff
  star-1.5-content_to_stderr.patch
  star-1.5.1-bufferoverflow.patch
  star-1.5.tar.bz2
  star-configuration.diff
  star-fexecve.diff
  star-getline.diff
  star-lock.diff
  star-no_fsync.diff
  star-selinux.patch
  star.changes
  star.spec
  tests.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ star.spec ++++++
#
# spec file for package star
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           star
Version:        1.5final
Release:        0
%define upver 1.5
Summary:        POSIX.1-2001-Compliant Tar Implementation
License:        CDDL-1.0
Group:          Productivity/Archiving/Backup
Url:            http://cdrecord.berlios.de/old/private/star.html

Source:         ftp://ftp.berlios.de/pub/star/alpha/star-%{upver}.tar.bz2
Source1:        README-FIRST
Source2:        tests.tar.bz2
Patch0:         star-configuration.diff
Patch2:         star-no_fsync.diff
Patch5:         rmt-move.diff
Patch6:         star-selinux.patch
Patch7:         star-lock.diff
Patch8:         star-getline.diff
Patch9:         star-fexecve.diff
Patch10:        star-1.5.1-bufferoverflow.patch
#PATCH_FIX_OPENSUSE_BNC#858660
Patch11:        bnc#858660_detect_gzip_failures.patch
# PATCH-FIX-UPSTREAM bnc#918021 kstreit...@suse.com -- fix a wrong outputting 
of an archive content to stderr instead of stdout 
Patch12:        star-1.5-content_to_stderr.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  e2fsprogs-devel
BuildRequires:  libacl-devel
BuildRequires:  libattr-devel
BuildRequires:  libselinux-devel
%ifarch aarch64 ppc64
BuildRequires:  libtool
%endif
Provides:       rmt

%description
Star is a tar like archiver. TAR stands for Tape ARchiver. Star is the
fastest known implementation of a tar archiver.

Features:

- FIFO to keep the tape streaming.

- remote tape support.

- accurate sparse files (if the OS supports it).

- 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.



Authors:
--------
    Joerg Schilling <schill...@fokus.gmd.de>

%prep
#%setup -b 2 -n tests
#%setup -b 0 -n star-1.5
%setup -q -T -b 2 -n tests -b 0 -n star-1.5
%patch0 -p1
%patch2 -p1
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
%patch10 -p1
%patch11 -p1
%patch12 -p1

%build
# bugzilla#134113: incompatible license and unused: SKH: removed
# upstream
# rm include/unls.h
# Autoconf does not handle inline comments correctly: Split comments and
# variables into separate lines.
mv conf/xconfig.h.in conf/xconfig.h.in.orig
sed -e 's|\(#.*\)\(/\*.*\*/\)|\2\n\1|g' \
        conf/xconfig.h.in.orig >conf/xconfig.h.in
#ln -sf i586-linux-gcc.rul RULES/i586-linux-cc.rul
#ln -s i586-linux-cc.rul RULES/x86_64-linux-cc.rul
ln -s i586-linux-cc.rul RULES/s390x-linux-cc.rul
ln -s i586-linux-cc.rul RULES/ppc64-linux-cc.rul
#ln -s i586-linux-gcc.rul RULES/x86_64-linux-gcc.rul
ln -s i586-linux-gcc.rul RULES/s390x-linux-gcc.rul
ln -s i586-linux-gcc.rul RULES/ppc64-linux-gcc.rul
ln -s armv4l-linux-gcc.rul RULES/armv5tel-linux-gcc.rul
ln -s armv4l-linux-gcc.rul RULES/armv7l-linux-gcc.rul
ln -s i586-linux-gcc.rul RULES/aarch64-linux-gcc.rul
cd conf
%ifarch aarch64 ppc64
cp /usr/share/libtool/config/config.* .
%endif
autoconf
%define star_cflags $RPM_OPT_FLAGS -g -W -Wall -Wpointer-arith -Wformat-security
cp %{SOURCE1} .
make all MAKEPROG=gmake MANDIR=share/man COPTX="%{star_cflags}" 
CPPOPTX="-DNO_FSYNC"

%install
make install MAKEPROG=gmake INS_BASE=$RPM_BUILD_ROOT/usr MANDIR=share/man \
                COPTX="%{star_cflags}" CPPOPTX="-DNO_FSYNC"
mkdir -p $RPM_BUILD_ROOT/etc/default
mkdir $RPM_BUILD_ROOT/sbin
install -m 644 rmt/rmt.dfl $RPM_BUILD_ROOT/etc/default/rmt
mv $RPM_BUILD_ROOT/usr/etc/default/{rmt,star} $RPM_BUILD_ROOT/etc/default
#mv $RPM_BUILD_ROOT/usr/bin/star_fat $RPM_BUILD_ROOT/usr/bin/star
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/{star,rmt}
mv $RPM_BUILD_ROOT/usr/share/doc/star/* $RPM_BUILD_ROOT/%{_docdir}/star
mv $RPM_BUILD_ROOT/usr/share/doc/rmt/* $RPM_BUILD_ROOT/%{_docdir}/rmt
# if we put these as files-to-install in %doc in the filelist, docdir is 
# deleted and recreated. it's either all in %install or all in %files
install AN* BUILD COMPILE INSTALL PORTING README Changelog CDDL.Schily.txt 
CDDL.Sun.txt README.* TODO $RPM_BUILD_ROOT/%{_docdir}/star/
rm -f $RPM_BUILD_ROOT/usr/bin/ustar
rm -f $RPM_BUILD_ROOT/usr/bin/tar
ln -sf ./star $RPM_BUILD_ROOT/usr/bin/ustar
rm -rf $RPM_BUILD_ROOT/%{_prefix}/{lib,include,bin/mt} \
       $RPM_BUILD_ROOT%{_mandir}/man[35] \
       $RPM_BUILD_ROOT%{_mandir}/man1/{gnutar,scpio,smt,spax,suntar}.1 \
       $RPM_BUILD_ROOT/usr/bin/{spax,gnutar,scpio,suntar,star_sym}
# Run test suite?
(
   [ -r /proc/config.gz ] \
   && eval "$(zcat /proc/config.gz \
        | sed -e 's/^# \(.*\) is not set/\1=n/')"
    if [ "$CONFIG_EXT2_FS" == y -a \
         "$CONFIG_EXT2_FS_POSIX_ACL"  == y -a \
         "$CONFIG_EXT2_FS_XATTR_USER" == y ] ; then
        cd %_builddir/tests
        export PATH=$RPM_BUILD_ROOT/usr/bin:$PATH
        make
    else
        echo "Test suite skipped: requires a kernel with the " \
             "CONFIG_EXT2_FS_POSIX_ACL and CONFIG_EXT2_FS_XATTR_USER features."
    fi
)
mv $RPM_BUILD_ROOT/usr/sbin/rmt $RPM_BUILD_ROOT/sbin
ln -sf ../sbin/rmt $RPM_BUILD_ROOT/etc/rmt

%files
%defattr(-, root, root)
%dir %{_docdir}/star
%docdir %{_docdir}/star
%attr(644,root,root) %{_docdir}/star/*
%dir %{_docdir}/rmt
%docdir %{_docdir}/rmt
%attr(644,root,root) %{_docdir}/rmt/*
%config(noreplace) %attr(644, root, root) /etc/default/rmt
%config(noreplace) %attr(644, root, root) /etc/default/star
/usr/bin/smt
/usr/bin/star
/usr/bin/ustar
/usr/bin/tartest
/sbin/rmt
/etc/rmt
/usr/share/man/man1/match.1.gz
/usr/share/man/man1/rmt.1.gz
/usr/share/man/man1/star.1.gz
/usr/share/man/man1/tartest.1.gz

%changelog
++++++ README-FIRST ++++++
For an english version see below.

Wenn sie das Programm rmt aus diesem Paket benutzen wollen, m�ssen Sie die
Konfiguration in /etc/default/rmt anpassen. Standardm�ssig ist niemandem die
Benutzung von rmt gestattet (Eintrag USER) und das einzig Ger�t, auf welches
zugegriffen werden kann ist /dev/null (Eintrag ACCESS).

Es empfiehlt sich, einen Benutzer anzulegen, der direkt rmt startet. Setzen
Sie f�r diesen Benutzer die Shell auf /usr/sbin/rmt. Ausserdem sollten Sie
alle Benutzer, die �ber das Netz auf diesen Account zugreifen d�rfen, in die
die Datei .rhosts im Homeverzeichnis des obigen Benutzers eintragen.

Diesen Benutzer k�nnen Sie entweder �ber YaST2 oder mittels useradd anlegen.
Ein Beispiel f�r die verwendung von useradd w�re:

   useradd -c "Remote TAPE" -G bin -s /usr/sbin/rmt rtape

Nachdem Sie diesen Benutzer angelegt haben, sollten Sie ihn in
/etc/default/rmt eintragen.


---------------------------------------------------------------------------

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.
++++++ bnc#858660_detect_gzip_failures.patch ++++++
Index: star-1.5/star/buffer.c
===================================================================
--- star-1.5.orig/star/buffer.c
+++ star-1.5/star/buffer.c
@@ -37,6 +37,8 @@ static        char sccsid[] =
 #endif
 
 #include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include <schily/stdlib.h>
 #include <schily/unistd.h>
 #include <schily/libport.h>    /* getpagesize() */
@@ -1731,6 +1733,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);
 }
 
@@ -1806,6 +1812,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.
  */
@@ -1821,6 +1837,8 @@ compressopen()
        int     mypid;
        char    *zip_prog = "gzip";
 
+       compresspid = 0;
+
        if (compress_prg)
                zip_prog = compress_prg;
        else if (bzflag)
@@ -1880,6 +1898,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");
@@ -1909,7 +1928,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: star-1.5/star/star.c
===================================================================
--- star-1.5.orig/star/star.c
+++ star-1.5/star/star.c
@@ -112,6 +112,7 @@ char        strvers[] = "1.5";              /* The pure ver
 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: star-1.5/star/star.h
===================================================================
--- star-1.5.orig/star/star.h
+++ star-1.5/star/star.h
@@ -823,9 +823,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>
++++++ rmt-move.diff ++++++
diff -Naur star-1.5.orig/rmt/rmt.1 star-1.5/rmt/rmt.1
--- star-1.5.orig/rmt/rmt.1     2008-04-28 15:53:41.000000000 +0200
+++ star-1.5/rmt/rmt.1  2008-04-28 15:55:03.000000000 +0200
@@ -20,7 +20,7 @@
 .B /opt/schily/sbin/rmt
 .br
 .B /etc/rmt
-.B /usr/sbin/rmt
+.B /sbin/rmt
 
 .SH DESCRIPTION
 .IX  "rmt command"  ""  "\fLrmt\fP \(em remote magnetic tape protocol server"
++++++ star-1.5-content_to_stderr.patch ++++++
Index: star-1.5/star/star_unix.c
===================================================================
--- star-1.5.orig/star/star_unix.c
+++ star-1.5/star/star_unix.c
@@ -548,6 +548,7 @@ samefile(fp1, fp2)
                return (FALSE);
 
        if (fstat(fdown(fp1), &stbuf1) < 0)
+               return (FALSE);
 
        if (fstat(fdown(fp2), &stbuf2) < 0)
                return (FALSE);
++++++ star-1.5.1-bufferoverflow.patch ++++++
diff -urNp star-1.5.1-orig/star/longnames.c star-1.5.1/star/longnames.c
--- star-1.5.1-orig/star/longnames.c    2009-10-16 00:38:55.000000000 +0200
+++ star-1.5.1/star/longnames.c 2010-02-03 13:36:03.000000000 +0100
@@ -155,7 +155,7 @@ name_to_tcb(info, ptb)
                if (add)
                        strcatl(ptb->dbuf.t_name, name, "/", (char *)NULL);
                else
-                       strcpy(ptb->dbuf.t_name, name);
+                       strncpy(ptb->dbuf.t_name, name, props.pr_maxsname);
                return (TRUE);
        }
 
++++++ star-configuration.diff ++++++
diff -Naur star-1.5.orig/conf/configure.in star-1.5/conf/configure.in
--- star-1.5.orig/conf/configure.in     2008-03-27 19:58:16.000000000 +0100
+++ star-1.5/conf/configure.in  2008-04-28 13:54:36.000000000 +0200
@@ -6,6 +6,8 @@
 AC_CONFIG_HEADER(xconfig.h)
 AC_CANONICAL_HOST
 
+AC_DEFINE(_GNU_SOURCE,,[Use GNU extensions on systems that provide them])
+
 dnl Checks for programs.
 AC_SHELL_BASH
 dnl CC=${CC-cc}
diff -Naur star-1.5.orig/DEFAULTS/Defaults.linux 
star-1.5/DEFAULTS/Defaults.linux
--- star-1.5.orig/DEFAULTS/Defaults.linux       2007-05-08 16:56:55.000000000 
+0200
+++ star-1.5/DEFAULTS/Defaults.linux    2008-04-28 13:54:36.000000000 +0200
@@ -8,8 +8,7 @@
 # Compiler stuff
 #
 ###########################################################################
-DEFCCOM=       cc
-#DEFCCOM=      gcc
+DEFCCOM=       gcc
 
 ###########################################################################
 #
@@ -26,7 +25,7 @@
 # If the next line is uncommented, compilation is done with minimal warnings
 #
 ###########################################################################
-CWARNOPTS=
+#CWARNOPTS=
 
 ###########################################################################
 #
@@ -40,20 +39,20 @@
 LINUX_SRC_INCLUDE=      $(__LINUX_SRC_INCLUDE:$(_UNIQ)no%=%)
 
 DEFINCDIRS=    $(SRCROOT)/include
-LDPATH=                -L/opt/schily/lib
-RUNPATH=       -R$(INS_BASE)/lib -R/opt/schily/lib -R$(OLIBSDIR)
+LDPATH=                -L/usr/lib
+RUNPATH=
 
 ###########################################################################
 #
 # Installation config stuff
 #
 ###########################################################################
-INS_BASE=      /opt/schily
+INS_BASE=      /usr
 INS_KBASE=     /
 #
 DEFUMASK=      002
 #
-DEFINSMODEF=   444
+DEFINSMODEF=   644
 DEFINSMODEX=   755
 DEFINSUSR=     bin
 DEFINSGRP=     bin
diff -Naur star-1.5.orig/include/schily/schily.h 
star-1.5/include/schily/schily.h
--- star-1.5.orig/include/schily/schily.h       2008-02-16 16:32:01.000000000 
+0100
+++ star-1.5/include/schily/schily.h    2008-04-28 14:13:10.000000000 +0200
@@ -238,7 +238,7 @@
 #endif
 
 /*PRINTFLIKE1*/
-extern int     error __PR((const char *, ...)) __printflike__(1, 2);
+extern int     error __PR((const char *, ...));
 extern char    *fillbytes __PR((void *, int, char));
 extern char    *findbytes __PR((const void *, int, char));
 extern int     findline __PR((const char *, char, const char *,
diff -Naur star-1.5.orig/lib/fexec.c star-1.5/lib/fexec.c
--- star-1.5.orig/lib/fexec.c   2007-07-01 12:04:35.000000000 +0200
+++ star-1.5/lib/fexec.c        2008-04-28 14:07:35.000000000 +0200
@@ -40,7 +40,6 @@
  */
 #if    defined(HAVE_DUP) && (defined(HAVE_DUP2) || defined(F_DUPFD))
 
-
 #define        MAX_F_ARGS      16
 
 #if    defined(IS_MACOS_X) && defined(HAVE_CRT_EXTERNS_H)
diff -Naur star-1.5.orig/mt/Makefile star-1.5/mt/Makefile
--- star-1.5.orig/mt/Makefile   2007-02-04 02:18:40.000000000 +0100
+++ star-1.5/mt/Makefile        2008-04-28 13:54:36.000000000 +0200
@@ -7,7 +7,7 @@
 
 INSDIR=                bin
 TARGET=                smt
-SYMLINKS=      mt
+#SYMLINKS=     mt
 CPPOPTS +=     -DUSE_REMOTE
 CPPOPTS +=     -DSCHILY_PRINT
 
diff -Naur star-1.5.orig/rmt/rmt.1 star-1.5/rmt/rmt.1
--- star-1.5.orig/rmt/rmt.1     2008-03-24 01:06:54.000000000 +0100
+++ star-1.5/rmt/rmt.1  2008-04-28 13:54:36.000000000 +0200
@@ -20,6 +20,7 @@
 .B /opt/schily/sbin/rmt
 .br
 .B /etc/rmt
+.B /usr/sbin/rmt
 
 .SH DESCRIPTION
 .IX  "rmt command"  ""  "\fLrmt\fP \(em remote magnetic tape protocol server"
diff -Naur star-1.5.orig/rmt/rmt.dfl star-1.5/rmt/rmt.dfl
--- star-1.5.orig/rmt/rmt.dfl   2005-08-09 15:20:37.000000000 +0200
+++ star-1.5/rmt/rmt.dfl        2008-04-28 13:54:36.000000000 +0200
@@ -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
+# See /usr/share/doc/packages/star/README.SuSE
 #
 #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
@@ -44,7 +42,7 @@
 #      name    name
 #
 #ACCESS=rtape  sparky  /dev/rmt/*
-ACCESS=*       *       /dev/rmt/*
+#ACCESS=*      *       /dev/rmt/*
 ACCESS=*       *       /dev/null
-ACCESS=*       *       /dev/zero
+#ACCESS=*      *       /dev/zero
 #ACCESS=*      *       *
diff -Naur star-1.5.orig/RULES/cc-gcc64.rul star-1.5/RULES/cc-gcc64.rul
--- star-1.5.orig/RULES/cc-gcc64.rul    2007-05-09 14:25:30.000000000 +0200
+++ star-1.5/RULES/cc-gcc64.rul 2008-04-28 13:54:36.000000000 +0200
@@ -26,9 +26,7 @@
 CPPOPTS=       -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) 
$(OSDEFS)
 COPTS=         -m64
 #              -Wtraditional now causes more pain than it helps 
-CWOPTS=                -Wall -Wtraditional
-CWOPTS=                -Wall -Wno-unknown-pragmas \
-               -Wshadow -Wmissing-prototypes -Wstrict-prototypes
+CWOPTS=                -Wall -Wstrict-prototypes -Wpointer-arith
 COPTOPT=       -O
 COPTDYN=       -fpic
 COPTGPROF=     -pg
diff -Naur star-1.5.orig/RULES/cc-gcc.rul star-1.5/RULES/cc-gcc.rul
--- star-1.5.orig/RULES/cc-gcc.rul      2007-05-09 14:25:30.000000000 +0200
+++ star-1.5/RULES/cc-gcc.rul   2008-04-28 13:54:36.000000000 +0200
@@ -26,9 +26,7 @@
 CPPOPTS=       -I$(ARCHDIR) -I$(OINCSDIR) $(INCDIRS:%=-I%) $(INCDIRSX:%=-I%) 
$(OSDEFS)
 COPTS=
 #              -Wtraditional now causes more pain than it helps 
-CWOPTS=                -Wall -Wtraditional
-CWOPTS=                -Wall -Wno-unknown-pragmas \
-               -Wshadow -Wmissing-prototypes -Wstrict-prototypes
+CWOPTS=                -Wall -Wstrict-prototypes -Wpointer-arith
 COPTOPT=       -O
 COPTDYN=       -fpic
 COPTGPROF=     -pg
diff -Naur star-1.5.orig/RULES/rules.inc star-1.5/RULES/rules.inc
--- star-1.5.orig/RULES/rules.inc       2007-05-06 14:50:26.000000000 +0200
+++ star-1.5/RULES/rules.inc    2008-04-28 14:01:23.000000000 +0200
@@ -44,7 +44,7 @@
                $(LDCC) $(_LD_OUTPUT_OPTION) $(POFILES) $(LDFLAGS) $(LDLIBS)
 
 $(PTARGET):    $(OINCSDIR) $(PTARGETCX)
-               @echo " ==> GENERATING include file \"$@\""; 
$(PTARGETC)$(_XEXEEXT) > $@
+               @echo " ==> GENERATING include file \"$@\""; $(PTARGETC) > $@
 
 ###########################################################################
 include                $(SRCROOT)/$(RULESDIR)/sub.htm
diff -Naur star-1.5.orig/RULES/rules.prg star-1.5/RULES/rules.prg
--- star-1.5.orig/RULES/rules.prg       2006-07-07 11:42:38.000000000 +0200
+++ star-1.5/RULES/rules.prg    2008-04-28 13:54:36.000000000 +0200
@@ -89,7 +89,7 @@
 #LEX=          @echo " ==> LEXING \"$@\""; lex
 #AWK=          @echo " ==> AWKING \"$@\""; awk
 RANLIB=                @echo " ==> RANDOMIZING ARCHIVE \"$@\""; true
-MKDEP=         @echo " ==> MAKING DEPENDENCIES \"$@\""; makedepend
+MKDEP=         @echo " ==> MAKING DEPENDENCIES \"$@\""; gccmakedep
 MKDEP_OUT=     -f -
 MKDIR=         @echo " ==> MAKING DIRECTORY \"$@\""; $(UMASK); mkdir
 MKDIR_SH=      @echo " ==> MAKING DIRECTORY \"$@\""; $(UMASK); sh 
$(SRCROOT)/conf/mkdir-sh
++++++ star-fexecve.diff ++++++
--- include/schily/schily.h
+++ include/schily/schily.h
@@ -113,7 +113,7 @@
                /* 6th arg not const, fexecv forces av[ac] = NULL */
 extern int     fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
                                                        char **));
-extern int     fexecve __PR((const char *, FILE *, FILE *, FILE *,
+extern int     my_fexecve __PR((const char *, FILE *, FILE *, FILE *,
                                        char * const *, char * const *));
 extern int     fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
 extern int     fspawnl __PR((FILE *, FILE *, FILE *,
--- lib/fexec.c
+++ lib/fexec.c
@@ -164,7 +164,7 @@
        } while (p != NULL);
        va_end(args);
 
-       ret = fexecve(name, in, out, err, av, env);
+       ret = my_fexecve(name, in, out, err, av, env);
        if (av != xav)
                free(av);
        return (ret);
@@ -178,11 +178,11 @@
        char *av[];
 {
        av[ac] = NULL;                  /*  force list to be null terminated */
-       return (fexecve(name, in, out, err, av, environ));
+       return (my_fexecve(name, in, out, err, av, environ));
 }
 
 EXPORT int
-fexecve(name, in, out, err, av, env)
+my_fexecve(name, in, out, err, av, env)
        const char *name;
        FILE *in, *out, *err;
        char * const av[], * const env[];
--- lib/libschily-mapvers
+++ lib/libschily-mapvers
@@ -77,7 +77,7 @@
        fexecl;
        fexecle;
        fexecv;
-       fexecve;
+       my_fexecve;
        ffileread;
        ffilewrite;
        fgetline;
--- libfind/find.c
+++ libfind/find.c
@@ -1730,7 +1730,7 @@
 #endif
                av[ac] = NULL;  /* -exec {} \; is not NULL terminated */
 
-               fexecve(av[0], state->std[0], state->std[1], state->std[2],
+               my_fexecve(av[0], state->std[0], state->std[1], state->std[2],
                                                        av, state->env);
 #ifdef PLUS_DEBUG
                error("argsize %d\n",
++++++ star-getline.diff ++++++
--- include/schily/schily.h
+++ include/schily/schily.h
@@ -243,7 +243,7 @@
 extern char    *findbytes __PR((const void *, int, char));
 extern int     findline __PR((const char *, char, const char *,
                                                        int, char **, int));
-extern int     getline __PR((char *, int));
+extern int     my_getline __PR((char *, int));
 extern int     getstr __PR((char *, int));
 extern int     breakline __PR((char *, char, char **, int));
 extern int     getallargs __PR((int *, char * const**, const char *, ...));
--- lib/libschily-mapvers
+++ lib/libschily-mapvers
@@ -123,7 +123,7 @@
        geterrno;
        getfiles;
        getfp;
-       getline;
+       my_getline;
        getmainfp;
        #getstr;
        #handlecond;
--- lib/stdio/fgetline.c
+++ lib/stdio/fgetline.c
@@ -61,7 +61,7 @@
 }
 
 EXPORT int
-getline(buf, len)
+my_getline(buf, len)
        char    *buf;
        int     len;
 {
++++++ star-lock.diff ++++++
--- star/fifo.c
+++ star/fifo.c 2009-03-10 17:52:09.292002187 +0100
@@ -477,13 +477,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
++++++ star-no_fsync.diff ++++++
--- star-1.5/star/star.c
+++ star-1.5/star/star.c
@@ -182,7 +182,7 @@
 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        */
++++++ star-selinux.patch ++++++
--- conf/configure.in
+++ conf/configure.in
@@ -530,6 +530,15 @@
 
 AC_SUBST(may_linux_src_include)
 
+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
+
 AC_SUBST(largefile_cc_opt)
 
 AC_SUBST(lib_crypt)
@@ -545,5 +554,6 @@
 AC_SUBST(lib_gen)
 AC_SUBST(lib_pthread)
 AC_SUBST(lib_rt)
+AC_SUBST(lib_selinux)
 
 AC_OUTPUT(rules.cnf)
--- conf/rules.cnf.in
+++ conf/rules.cnf.in
@@ -17,6 +17,7 @@
 LIB_ACL= @lib_acl@             # Full (test/set) ACL users like star
 LIB_ACL_TEST= @lib_acl_test@   # Test only ACL users like libfind
 LIB_ATTR = @lib_attr@
+LIB_SELINUX = @lib_selinux@
 LIB_SECDB = @lib_secdb@
 LIB_GEN = @lib_gen@
 LIB_PTHREAD = @lib_pthread@
--- star/Makefile
+++ star/Makefile
@@ -25,6 +25,7 @@
 CPPOPTS +=     -DUSE_FIND
 CPPOPTS +=     -DUSE_ACL
 CPPOPTS +=     -DUSE_XATTR
+CPPOPTS +=     -DWITH_SELINUX
 CPPOPTS +=     -DUSE_FFLAGS
 CPPOPTS +=     -DCOPY_LINKS_DELAYED
 CPPOPTS +=     -DSTAR_FAT
@@ -48,7 +49,7 @@
 
 #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_SELINUX) $(LIB_SOCKET) $(LIB_INTL)
 #
 #      Wenn -lfind, dann auch  $(LIB_INTL)
 #
--- star/extract.c
+++ star/extract.c
@@ -238,6 +238,16 @@
                if (prblockno)
                        (void) tblocks();               /* set curblockno */
 
+#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 (is_volhdr(&finfo)) {
                        if (!get_volhdr(&finfo, vhname)) {
                                excomerrno(EX_BAD,
--- star/pax.mk
+++ star/pax.mk
@@ -18,6 +18,7 @@
 CPPOPTS +=     -DUSE_FIND
 CPPOPTS +=     -DUSE_ACL
 CPPOPTS +=     -DUSE_XATTR
+CPPOPTS +=     -DWITH_SELINUX
 CPPOPTS +=     -DUSE_FFLAGS
 CPPOPTS +=     -DPAX
 CPPOPTS +=     -DSCHILY_PRINT
@@ -35,7 +36,7 @@
 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
-LIBS=          -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) 
$(LIB_SOCKET) $(LIB_INTL)
+LIBS=          -ldeflt -lrmt -lfind -lschily $(LIB_ACL) $(LIB_ATTR) 
$(LIB_SELINUX) $(LIB_SOCKET) $(LIB_INTL)
 XMK_FILE=      spaxman.mk
 
 ###########################################################################
--- star/star.c
+++ star/star.c
@@ -39,6 +39,11 @@
 #include <schily/idcache.h>
 #include "fifo.h"      /* Needed for #undef FIFO */
 #include "dumpdate.h"
+
+#ifdef WITH_SELINUX
+int selinux_enabled=0;
+#endif
+
 #ifdef USE_FIND
 #include <schily/walk.h>
 #include <schily/find.h>
@@ -387,6 +392,11 @@
 #endif
                        comerr("Panic cannot set back effective uid.\n");
        }
+
+#ifdef WITH_SELINUX
+       selinux_enabled = is_selinux_enabled() > 0;
+#endif
+
        my_uid = geteuid();
        /*
         * WARNING: We now are no more able to open a new remote connection
--- star/starsubs.h
+++ star/starsubs.h
@@ -304,6 +304,11 @@
 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
 
 /*
--- star/xattr.c
+++ star/xattr.c
@@ -196,6 +196,27 @@
 #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)
@@ -209,6 +230,10 @@
                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)) {
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to