From df8e58de8c422d81954cce1b99877fb9e778428e79f47a35ca1246500b47cf9c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 8 May 2018 14:49:22 +0000 Subject: [PATCH 01/21] - Add spax and star subpackages OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=11 --- schily.changes | 5 ++ schily.spec | 123 ++++++++++++++++++++++++------------------------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/schily.changes b/schily.changes index d9cda4d..8fc3dd7 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/schily.spec b/schily.spec index 7b88202..ef47724 100644 --- a/schily.spec +++ b/schily.spec @@ -346,7 +346,8 @@ License: CDDL-1.0 Group: Productivity/Archiving/Backup Conflicts: dump-rmt Conflicts: tar-rmt -Conflicts: star-rmt +Obsoletes: star-rmt +Provides: star-rmt %description -n schily-rmt rmt is a program that can be used by e.g. star and ufsdump @@ -356,6 +357,36 @@ 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 +Requires: 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 + +%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 @@ -369,7 +400,7 @@ 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 @@ -421,13 +452,16 @@ 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" + # 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 +473,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 +499,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 +519,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 +598,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 +616,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 @@ -922,4 +896,25 @@ true %_sbindir/rmt %_mandir/man1/rmt.1* +%files -n spax +%license CDDL.Schily.txt +%_bindir/pax +%_bindir/spax +%_mandir/man1/spax.1* + +%files -n star +%license CDDL.Schily.txt +%config %_sysconfdir/default/star +%_bindir/star +%_bindir/star_sym +%_bindir/suntar +%_bindir/tartest +%_bindir/ustar +%_docdir/star/ +%_mandir/man1/star.1* +%_mandir/man1/star_sym.1* +%_mandir/man1/suntar.1* +%_mandir/man1/ustar.1* +%_mandir/man5/star.5* + %changelog From 5b4149872bdf74089c63e6e5a49f506f48b5fbe8f47c241c7491b7bf63328af7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 8 May 2018 15:54:18 +0000 Subject: [PATCH 02/21] - Add update-alternatives handling for (s)rmt and (s)mt OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=12 --- schily.changes | 5 +++++ schily.spec | 54 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/schily.changes b/schily.changes index 8fc3dd7..c2e758b 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 diff --git a/schily.spec b/schily.spec index ef47724..2c7b26d 100644 --- a/schily.spec +++ b/schily.spec @@ -328,28 +328,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 Obsoletes: star-rmt -Provides: star-rmt +Provides: star-rmt:/usr/sbin/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. @@ -458,6 +463,10 @@ rm -Rfv "$b/%_datadir/lib/siconv" # spax/star ln -sfv spax "$b/%_bindir/pax" rm -fv "$b/%_bindir/tar" "$b/%_bindir/gnutar" +rm -fv "$b/%_bindir/mt" # handled up u-a +mv "$b/%_mandir/man1/mt.1" "$b/%_mandir/man1/smt.1" +mv "$b/%_sbindir/rmt" "$b/%_sbindir/srmt" # make room for u-a +mv "$b/%_mandir/man1/rmt.1" "$b/%_mandir/man1/srmt.1" # deal with this another time rm -Rf "$b/usr/ccs" "$b/usr/xpg4" "$b/%_bindir/sccs" @@ -636,6 +645,26 @@ true %set_permissions %_bindir/readcd true +%post mt +%_sbindir/update-alternatives --force \ + --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 ! -f %_bindir/srmt; then + %_sbindir/update-alternatives --remove mt %_bindir/smt +fi + +%post rmt +%_sbindir/update-alternatives --force \ + --install %_sbindir/rmt rmt %_sbindir/srmt 30 \ + --slave %_mandir/man1/rmt.1%ext_man rmt.1%ext_man %_mandir/man1/srmt.1%ext_man + +%postun rmt +if test ! -f %_sbindir/srmt; then + %_sbindir/update-alternatives --remove rmt %_sbindir/srmt +fi + %post -n libcdrdeflt1_0 -p /sbin/ldconfig %postun -n libcdrdeflt1_0 -p /sbin/ldconfig %post -n libdeflt1_0 -p /sbin/ldconfig @@ -884,17 +913,22 @@ 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/rmt/ -%_sbindir/rmt -%_mandir/man1/rmt.1* +%_sbindir/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 From 0e8814127ab1da2c821d5dc3980aeed981a12f4b4cb975e8adfc7c699481e530 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 8 May 2018 15:58:42 +0000 Subject: [PATCH 03/21] OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=13 --- schily.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schily.spec b/schily.spec index 2c7b26d..825f21b 100644 --- a/schily.spec +++ b/schily.spec @@ -366,7 +366,7 @@ connection, and through that, have the rmt program executed. Summary: Portable Archive Exchange License: CDDL-1.0 Group: Productivity/Archiving/Backup -Requires: star = %version +Requires: star = %box_version Provides: pax = 3.5 Obsoletes: pax < 3.5 From 05d931e0f02e4b0f334e811cfcb289dbeeb0b8a6244dbc13fd65f247d7a3d5ea Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 14 May 2018 09:28:47 +0000 Subject: [PATCH 04/21] - Add extra BuildRequires OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=14 --- schily.changes | 5 +++++ schily.spec | 2 ++ 2 files changed, 7 insertions(+) diff --git a/schily.changes b/schily.changes index c2e758b..052d966 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 14 09:28:34 UTC 2018 - jengelh@inai.de + +- Add extra BuildRequires + ------------------------------------------------------------------- Tue May 8 15:53:47 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 825f21b..0dc7a1e 100644 --- a/schily.spec +++ b/schily.spec @@ -36,9 +36,11 @@ Patch3: iconv-name.diff # 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: libcap-devel +BuildRequires: m4 BuildRequires: makedepend Conflicts: cdrkit-cdrtools-compat From 14326decbf168beb163583fe239266c639f85a925f05891245a4ee6e9bc83e11 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 16 May 2018 14:03:54 +0000 Subject: [PATCH 05/21] - Add gccwarns.diff to address some undefined behavior. OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=15 --- gccwarns.diff | 35 +++++++++++++++++++++++++++++++++++ schily.changes | 5 +++++ schily.spec | 3 ++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gccwarns.diff diff --git a/gccwarns.diff b/gccwarns.diff new file mode 100644 index 0000000..3d35c98 --- /dev/null +++ b/gccwarns.diff @@ -0,0 +1,35 @@ + +[ 191s] searchinpath.c: In function 'searchonefile': +[ 191s] searchinpath.c:221:5: warning: implicit declaration of function 'eaccess'; did you mean 'access'? [-Wimplicit-function-declaration] +[ 191s] (eaccess(nbuf, mode) >= 0)) { +[ 836s] create.c: In function 'flush_link': +[ 836s] create.c:1099:16: warning: 'finfo.f_flags' is used uninitialized in this function [-Wuninitialized] +[ 836s] finfo.f_flags &= ~F_TCB_BUF; + +--- + libschily/searchinpath.c | 1 + + star/create.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +Index: schily-2018-03-16/libschily/searchinpath.c +=================================================================== +--- schily-2018-03-16.orig/libschily/searchinpath.c ++++ schily-2018-03-16/libschily/searchinpath.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE 1 /* eaccess */ + /* @(#)searchinpath.c 1.6 18/02/04 Copyright 1999-2018 J. Schilling */ + #include + #ifndef lint +Index: schily-2018-03-16/star/create.c +=================================================================== +--- schily-2018-03-16.orig/star/create.c ++++ schily-2018-03-16/star/create.c +@@ -1090,7 +1090,7 @@ flush_link(lp) + { + TCB tb; + TCB *ptb; +- FINFO finfo; ++ FINFO finfo = {}; + register LNAME *ln; + int fd = 1; + BOOL did_stat; diff --git a/schily.changes b/schily.changes index 052d966..6ea619d 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 16 13:50:57 UTC 2018 - jengelh@inai.de + +- Add gccwarns.diff to address some undefined behavior. + ------------------------------------------------------------------- Mon May 14 09:28:34 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 0dc7a1e..496ed8c 100644 --- a/schily.spec +++ b/schily.spec @@ -33,6 +33,7 @@ Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2 Patch1: gcc48wa.diff Patch2: mkisofs-j-crash.diff Patch3: iconv-name.diff +Patch4: gccwarns.diff # 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 @@ -396,7 +397,7 @@ Features: %prep %setup -qn %name-%rver -%patch -P 1 -P 2 -P 3 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -p1 find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+" %build From 9011892775a5f93fa738d08584fc9376cd93f7481b042e301a9a0c522ff8a237 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 16 May 2018 17:04:40 +0000 Subject: [PATCH 06/21] - Update to new upstream release 2018.05.02 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=16 --- mkisofs-j-crash.diff | 50 --------------------------------------- schily-2018-03-16.tar.bz2 | 3 --- schily-2018-05-02.tar.bz2 | 3 +++ schily.changes | 13 +++++++++- schily.spec | 27 ++++++++++----------- 5 files changed, 28 insertions(+), 68 deletions(-) delete mode 100644 mkisofs-j-crash.diff delete mode 100644 schily-2018-03-16.tar.bz2 create mode 100644 schily-2018-05-02.tar.bz2 diff --git a/mkisofs-j-crash.diff b/mkisofs-j-crash.diff deleted file mode 100644 index 378b139..0000000 --- a/mkisofs-j-crash.diff +++ /dev/null @@ -1,50 +0,0 @@ -From: Joerg Schilling -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 -Date: Wed, 4 Apr 2018 14:08:35 +0200 (CEST) -Message-ID: - -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. - */ diff --git a/schily-2018-03-16.tar.bz2 b/schily-2018-03-16.tar.bz2 deleted file mode 100644 index b9e5ba3..0000000 --- a/schily-2018-03-16.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b92bfe7aa587514aaea28e063564433ecd68df051b9acd9fa3e4d5c52d4794a -size 4210963 diff --git a/schily-2018-05-02.tar.bz2 b/schily-2018-05-02.tar.bz2 new file mode 100644 index 0000000..f1b4050 --- /dev/null +++ b/schily-2018-05-02.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d7de8c7bdadc91bee15e64a3c707d1b87c354adadce8779744c79daf590b061 +size 4218317 diff --git a/schily.changes b/schily.changes index 6ea619d..0129d96 100644 --- a/schily.changes +++ b/schily.changes @@ -1,6 +1,17 @@ ------------------------------------------------------------------- -Wed May 16 13:50:57 UTC 2018 - jengelh@inai.de +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. ------------------------------------------------------------------- diff --git a/schily.spec b/schily.spec index 496ed8c..2b3b82c 100644 --- a/schily.spec +++ b/schily.spec @@ -16,12 +16,12 @@ # -%global box_version 2018.03.16 +%global box_version 2018.05.02 %global cdr_version 3.02~a09 -%define rver 2018-03-16 +%define rver 2018-05-02 Name: schily -Version: 2018.03.16 +Version: 2018.05.02 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 @@ -31,9 +31,8 @@ Url: http://cdrtools.sourceforge.net/private/cdrecord.html Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2 Patch1: gcc48wa.diff -Patch2: mkisofs-j-crash.diff -Patch3: iconv-name.diff -Patch4: gccwarns.diff +Patch2: iconv-name.diff +Patch3: gccwarns.diff # 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 @@ -148,12 +147,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. @@ -251,7 +250,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 @@ -397,7 +396,7 @@ Features: %prep %setup -qn %name-%rver -%patch -P 1 -P 2 -P 3 -P 4 -p1 +%patch -P 1 -P 2 -P 3 -p1 find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+" %build @@ -678,8 +677,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 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 @@ -765,9 +764,9 @@ fi %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 From c5a043e86b581a2028b983a9a2690c9830e90b3a94f8c451ab109ceef0fc971f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 16 May 2018 22:13:16 +0000 Subject: [PATCH 07/21] - Add _FILE_OFFSET_BITS=64 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=17 --- schily.changes | 5 +++++ schily.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/schily.changes b/schily.changes index 0129d96..6838a2d 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 16 22:12:34 UTC 2018 - jengelh@inai.de + +- Add _FILE_OFFSET_BITS=64 for the psmake build procedure. + ------------------------------------------------------------------- Wed May 16 16:38:42 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 2b3b82c..043f63b 100644 --- a/schily.spec +++ b/schily.spec @@ -410,6 +410,10 @@ rm -fv libshedit/shlshedit.mk # Static link libsiconv. It forwards to glibc iconv for supported charsets. rm -fv libsiconv/shlsiconv.mk +pushd psmake/ +CFLAGS="%optflags -D_FILE_OFFSET_BITS=64" sh MAKE-sh +popd + # (this is a noninteractive build; nobody will read the warnings # or care about the pause, so use GMAKE_NOWARN.) # @@ -422,7 +426,7 @@ rm -fv libsiconv/shlsiconv.mk # 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" \ + COPTOPT="%optflags -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" \ LDOPTX="" RUNPATH="" %install From 860beda65e3644059f40d4a39001edeb0cca52a03c1dd5803af013346a285e97 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 16 May 2018 22:48:12 +0000 Subject: [PATCH 08/21] - Build cdrecord/cdda2wav/readcd with PIE link mode. OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=18 --- schily.changes | 1 + schily.spec | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/schily.changes b/schily.changes index 6838a2d..df24bd9 100644 --- a/schily.changes +++ b/schily.changes @@ -2,6 +2,7 @@ Wed May 16 22:12:34 UTC 2018 - jengelh@inai.de - Add _FILE_OFFSET_BITS=64 for the psmake build procedure. +- Build cdrecord/cdda2wav/readcd with PIE link mode. ------------------------------------------------------------------- Wed May 16 16:38:42 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 043f63b..2206959 100644 --- a/schily.spec +++ b/schily.spec @@ -419,15 +419,12 @@ popd # # 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 -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" \ - LDOPTX="" RUNPATH="" +mycf="%optflags -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" +gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX="" +rm -fv cdrecord/OBJ/*/cdrecord cdda2wav/OBJ/*/cdda2wav readcd/OBJ/*/readcd +gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf -fPIE" LDOPTX=-pie %install b="%buildroot" From 51fe21929faf0d5cd031325e6197e41a319edcad89b43e4d15cd0a9bf4291e29 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 May 2018 13:22:49 +0000 Subject: [PATCH 09/21] remove testfiles; rework u-a scriptlets OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=19 --- schily.spec | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/schily.spec b/schily.spec index 2206959..263bc68 100644 --- a/schily.spec +++ b/schily.spec @@ -471,6 +471,9 @@ mv "$b/%_mandir/man1/mt.1" "$b/%_mandir/man1/smt.1" mv "$b/%_sbindir/rmt" "$b/%_sbindir/srmt" # make room for u-a mv "$b/%_mandir/man1/rmt.1" "$b/%_mandir/man1/srmt.1" +# 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 \ @@ -649,23 +652,23 @@ true true %post mt -%_sbindir/update-alternatives --force \ - --install %_bindir/mt mt %_bindir/smt 10 \ - --slave %_mandir/man1/mt.1%ext_man mt.1%ext_man %_mandir/man1/smt.1%ext_man +"%_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 ! -f %_bindir/srmt; then - %_sbindir/update-alternatives --remove mt %_bindir/smt +%preun mt +if test "$1" = 0; then + "%_sbindir/update-alternatives" --remove mt "%_bindir/smt" fi %post rmt -%_sbindir/update-alternatives --force \ - --install %_sbindir/rmt rmt %_sbindir/srmt 30 \ - --slave %_mandir/man1/rmt.1%ext_man rmt.1%ext_man %_mandir/man1/srmt.1%ext_man +"%_sbindir/update-alternatives" \ + --install "%_sbindir/rmt" rmt "%_sbindir/srmt" 10 \ + --slave "%_mandir/man8/rmt.1%ext_man" "rmt.1%ext_man" "%_mandir/man8/srmt.1%ext_man" -%postun rmt -if test ! -f %_sbindir/srmt; then - %_sbindir/update-alternatives --remove rmt %_sbindir/srmt +%preun rmt +if test "$1" = 0; then + "%_sbindir/update-alternatives" --remove rmt "%_sbindir/srmt" fi %post -n libcdrdeflt1_0 -p /sbin/ldconfig From 24dab9d7c5dd53a15cd7536e00894d41c644096df2edaafcd97381acbad99ce3 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 May 2018 14:42:47 +0000 Subject: [PATCH 10/21] - Update to new upstream release 2018.05.17 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=20 --- psmake-time.diff | 22 ++++++++++++++++++++++ schily-2018-05-02.tar.bz2 | 3 --- schily-2018-05-17.tar.bz2 | 3 +++ schily.changes | 21 +++++++++++++++++++++ schily.spec | 30 ++++++++++++++++++++---------- 5 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 psmake-time.diff delete mode 100644 schily-2018-05-02.tar.bz2 create mode 100644 schily-2018-05-17.tar.bz2 diff --git a/psmake-time.diff b/psmake-time.diff new file mode 100644 index 0000000..19917e9 --- /dev/null +++ b/psmake-time.diff @@ -0,0 +1,22 @@ +Fix a build error when psmake is bootstrapped via MAKE-sh: + ++ gcc -o smake make.o readfile.o parse.o update.o rules.o archconf.o job.o memory.o astoi.o astoll.o comerr.o error.o eaccess.o format.o getexecpath.o jsprintf.o jssnprintf.o saveargs.o seterrno.o strcatl.o strlcpy.o strncpy.o streql.o getargs.o geterrno.o movebytes.o fillbytes.o raisecond.o rename.o searchinpath.o uname.o file_raise.o fileopen.o fcons.o cvmod.o flag.o flush.o dat.o filewrite.o fileread.o fileseek.o niread.o niwrite.o +[ 85s] make.o: In function `gcurtime': +[ 85s] make.c:(.text+0x100f): undefined reference to `getnstimeofday' +[ 85s] collect2: error: ld returned 1 exit status + +--- + psmake/MAKE-sh | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: schily-2018-05-17/psmake/MAKE-sh +=================================================================== +--- schily-2018-05-17.orig/psmake/MAKE-sh ++++ schily-2018-05-17/psmake/MAKE-sh +@@ -259,4 +259,5 @@ $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINE + $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES fileseek.c + $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niread.c + $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niwrite.c +-$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o ++$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES ../libschily/getnstimeofday.c ++$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o getnstimeofday.$o diff --git a/schily-2018-05-02.tar.bz2 b/schily-2018-05-02.tar.bz2 deleted file mode 100644 index f1b4050..0000000 --- a/schily-2018-05-02.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d7de8c7bdadc91bee15e64a3c707d1b87c354adadce8779744c79daf590b061 -size 4218317 diff --git a/schily-2018-05-17.tar.bz2 b/schily-2018-05-17.tar.bz2 new file mode 100644 index 0000000..d4d4ab5 --- /dev/null +++ b/schily-2018-05-17.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e3bebf2cf1b5dce385496bf5140edb4450cf086c9bfb4cff6f832a7bd0e94a3 +size 4225066 diff --git a/schily.changes b/schily.changes index df24bd9..ba9b1a5 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +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. +- Add psmake-time.diff + ------------------------------------------------------------------- Wed May 16 22:12:34 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 263bc68..08a78e5 100644 --- a/schily.spec +++ b/schily.spec @@ -16,12 +16,14 @@ # -%global box_version 2018.05.02 -%global cdr_version 3.02~a09 -%define rver 2018-05-02 +%global box_version 2018.05.17 +%global cdr_version 3.02~a10 +%global smake_version 1.3 +%global star_version 1.5.4 +%define rver 2018-05-17 Name: schily -Version: 2018.05.02 +Version: 2018.05.17 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 @@ -33,6 +35,7 @@ Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2 Patch1: gcc48wa.diff Patch2: iconv-name.diff Patch3: gccwarns.diff +Patch4: psmake-time.diff # 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 @@ -368,7 +371,9 @@ connection, and through that, have the rmt program executed. Summary: Portable Archive Exchange License: CDDL-1.0 Group: Productivity/Archiving/Backup -Requires: star = %box_version +Version: %star_version +Release: 0 +Requires: star = %star_version Provides: pax = 3.5 Obsoletes: pax < 3.5 @@ -380,6 +385,8 @@ basically tar, but with additional extended attributes. 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). @@ -396,7 +403,7 @@ Features: %prep %setup -qn %name-%rver -%patch -P 1 -P 2 -P 3 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -p1 find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+" %build @@ -410,9 +417,9 @@ rm -fv libshedit/shlshedit.mk # Static link libsiconv. It forwards to glibc iconv for supported charsets. rm -fv libsiconv/shlsiconv.mk -pushd psmake/ -CFLAGS="%optflags -D_FILE_OFFSET_BITS=64" sh MAKE-sh -popd +#pushd psmake/ +#CFLAGS="%optflags" sh MAKE-sh +#popd # (this is a noninteractive build; nobody will read the warnings # or care about the pause, so use GMAKE_NOWARN.) @@ -421,7 +428,7 @@ popd # # Not fully parallel safe, so stick to default. # -mycf="%optflags -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" +mycf="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX="" rm -fv cdrecord/OBJ/*/cdrecord cdda2wav/OBJ/*/cdda2wav readcd/OBJ/*/readcd gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf -fPIE" LDOPTX=-pie @@ -466,7 +473,10 @@ rm -Rfv "$b/%_datadir/lib/siconv" # spax/star ln -sfv spax "$b/%_bindir/pax" rm -fv "$b/%_bindir/tar" "$b/%_bindir/gnutar" + +# mt/rmt rm -fv "$b/%_bindir/mt" # handled up u-a +ls -l "$b/%_mandir"/man*/*mt* mv "$b/%_mandir/man1/mt.1" "$b/%_mandir/man1/smt.1" mv "$b/%_sbindir/rmt" "$b/%_sbindir/srmt" # make room for u-a mv "$b/%_mandir/man1/rmt.1" "$b/%_mandir/man1/srmt.1" From c21ed668ac0f6679b664d8c3ae52378741279694718008a949d1d2a09195b5e5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 May 2018 15:33:45 +0000 Subject: [PATCH 11/21] upstream new tarball OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=21 --- psmake-time.diff | 22 ---------------------- schily-2018-05-17.tar.bz2 | 4 ++-- schily.changes | 1 - schily.spec | 20 +++++++++----------- 4 files changed, 11 insertions(+), 36 deletions(-) delete mode 100644 psmake-time.diff diff --git a/psmake-time.diff b/psmake-time.diff deleted file mode 100644 index 19917e9..0000000 --- a/psmake-time.diff +++ /dev/null @@ -1,22 +0,0 @@ -Fix a build error when psmake is bootstrapped via MAKE-sh: - -+ gcc -o smake make.o readfile.o parse.o update.o rules.o archconf.o job.o memory.o astoi.o astoll.o comerr.o error.o eaccess.o format.o getexecpath.o jsprintf.o jssnprintf.o saveargs.o seterrno.o strcatl.o strlcpy.o strncpy.o streql.o getargs.o geterrno.o movebytes.o fillbytes.o raisecond.o rename.o searchinpath.o uname.o file_raise.o fileopen.o fcons.o cvmod.o flag.o flush.o dat.o filewrite.o fileread.o fileseek.o niread.o niwrite.o -[ 85s] make.o: In function `gcurtime': -[ 85s] make.c:(.text+0x100f): undefined reference to `getnstimeofday' -[ 85s] collect2: error: ld returned 1 exit status - ---- - psmake/MAKE-sh | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: schily-2018-05-17/psmake/MAKE-sh -=================================================================== ---- schily-2018-05-17.orig/psmake/MAKE-sh -+++ schily-2018-05-17/psmake/MAKE-sh -@@ -259,4 +259,5 @@ $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINE - $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES fileseek.c - $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niread.c - $CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES niwrite.c --$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o -+$CC $OPT $CF $CFLAGS -c $INCLUDE $DEFINES ../libschily/getnstimeofday.c -+$CC $LF $LDFLAGS -o smake make.$o readfile.$o parse.$o update.$o rules.$o archconf.$o job.$o memory.$o astoi.$o astoll.$o comerr.$o error.$o eaccess.$o format.$o getexecpath.$o jsprintf.$o jssnprintf.$o saveargs.$o seterrno.$o strcatl.$o strlcpy.$o strncpy.$o streql.$o getargs.$o geterrno.$o movebytes.$o fillbytes.$o raisecond.$o rename.$o searchinpath.$o uname.$o file_raise.$o fileopen.$o fcons.$o cvmod.$o flag.$o flush.$o dat.$o filewrite.$o fileread.$o fileseek.$o niread.$o niwrite.$o getnstimeofday.$o diff --git a/schily-2018-05-17.tar.bz2 b/schily-2018-05-17.tar.bz2 index d4d4ab5..a2a1d93 100644 --- a/schily-2018-05-17.tar.bz2 +++ b/schily-2018-05-17.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e3bebf2cf1b5dce385496bf5140edb4450cf086c9bfb4cff6f832a7bd0e94a3 -size 4225066 +oid sha256:08d9fa3c83417aaceb227d57fbcb8cb9bc1202f382072d9ca4c348d44be9a60f +size 4225794 diff --git a/schily.changes b/schily.changes index ba9b1a5..ebfc31b 100644 --- a/schily.changes +++ b/schily.changes @@ -17,7 +17,6 @@ Thu May 17 14:06:18 UTC 2018 - jengelh@inai.de * 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. -- Add psmake-time.diff ------------------------------------------------------------------- Wed May 16 22:12:34 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 08a78e5..b4b1c82 100644 --- a/schily.spec +++ b/schily.spec @@ -35,7 +35,6 @@ Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2 Patch1: gcc48wa.diff Patch2: iconv-name.diff Patch3: gccwarns.diff -Patch4: psmake-time.diff # 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 @@ -403,7 +402,7 @@ Features: %prep %setup -qn %name-%rver -%patch -P 1 -P 2 -P 3 -P 4 -p1 +%patch -P 1 -P 2 -P 3 -p1 find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+" %build @@ -417,20 +416,16 @@ rm -fv libshedit/shlshedit.mk # Static link libsiconv. It forwards to glibc iconv for supported charsets. rm -fv libsiconv/shlsiconv.mk -#pushd psmake/ -#CFLAGS="%optflags" sh MAKE-sh -#popd +find . -type f -exec touch {} + -# (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. +# - Not fully parallel safe, so stick to default. # mycf="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX="" rm -fv cdrecord/OBJ/*/cdrecord cdda2wav/OBJ/*/cdda2wav readcd/OBJ/*/readcd +# At this point, only the three programs should be relinked. +# But on Leap 42.3, a bunch of .c files get rebuilt if we don't touch (see above). gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf -fPIE" LDOPTX=-pie %install @@ -438,6 +433,9 @@ 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/" From b9cbabd60d3ef612cb7407b2d1e367ad8e404155e42d5cca0506ba65c1b6b7da Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 May 2018 16:20:49 +0000 Subject: [PATCH 12/21] PIE is implicit in Factory OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=22 --- schily.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/schily.spec b/schily.spec index b4b1c82..0687277 100644 --- a/schily.spec +++ b/schily.spec @@ -416,17 +416,11 @@ rm -fv libshedit/shlshedit.mk # Static link libsiconv. It forwards to glibc iconv for supported charsets. rm -fv libsiconv/shlsiconv.mk -find . -type f -exec touch {} + - # - To enable verbosity, use with CC=cc LDCC=cc DYNLD=cc. # - Not fully parallel safe, so stick to default. # mycf="%optflags -fno-strict-aliasing -fno-omit-frame-pointer -fPIC -finput-charset=ISO-8859-1" gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf" LDOPTX="" -rm -fv cdrecord/OBJ/*/cdrecord cdda2wav/OBJ/*/cdda2wav readcd/OBJ/*/readcd -# At this point, only the three programs should be relinked. -# But on Leap 42.3, a bunch of .c files get rebuilt if we don't touch (see above). -gmake RUNPATH="" LINKMODE=dynamic COPTOPT="$mycf -fPIE" LDOPTX=-pie %install b="%buildroot" From e48515a62af6ff20fa23195ba7b45bb80e45774359b573a2e2b7929867e6cff9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 17 May 2018 20:38:15 +0000 Subject: [PATCH 13/21] drop changelog for changes already redacted OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=23 --- schily.changes | 11 ----------- schily.spec | 2 -- 2 files changed, 13 deletions(-) diff --git a/schily.changes b/schily.changes index ebfc31b..527cd7d 100644 --- a/schily.changes +++ b/schily.changes @@ -18,12 +18,6 @@ Thu May 17 14:06:18 UTC 2018 - jengelh@inai.de "pax", but it always includes a POSIX.1-2001 extended header with timestamps with nanosecond resolution. -------------------------------------------------------------------- -Wed May 16 22:12:34 UTC 2018 - jengelh@inai.de - -- Add _FILE_OFFSET_BITS=64 for the psmake build procedure. -- Build cdrecord/cdda2wav/readcd with PIE link mode. - ------------------------------------------------------------------- Wed May 16 16:38:42 UTC 2018 - jengelh@inai.de @@ -40,11 +34,6 @@ Wed May 16 16:38:42 UTC 2018 - jengelh@inai.de - Drop mkisofs-j-crash.diff (fixed upstream) - Add gccwarns.diff to address some undefined behavior. -------------------------------------------------------------------- -Mon May 14 09:28:34 UTC 2018 - jengelh@inai.de - -- Add extra BuildRequires - ------------------------------------------------------------------- Tue May 8 15:53:47 UTC 2018 - jengelh@inai.de diff --git a/schily.spec b/schily.spec index 0687277..325e27b 100644 --- a/schily.spec +++ b/schily.spec @@ -38,11 +38,9 @@ Patch3: gccwarns.diff # 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: libcap-devel -BuildRequires: m4 BuildRequires: makedepend Conflicts: cdrkit-cdrtools-compat From 7327d9ab668dd46d421f05529040f5efcebb98057b57a03ec9763114a6c750c5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 18 May 2018 12:10:46 +0000 Subject: [PATCH 14/21] follow unzip.spec for how to do u-a OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=24 --- schily.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schily.spec b/schily.spec index 325e27b..27f1001 100644 --- a/schily.spec +++ b/schily.spec @@ -656,7 +656,7 @@ true --install "%_bindir/mt" mt "%_bindir/smt" 10 \ --slave "%_mandir/man1/mt.1%ext_man" "mt.1%ext_man" "%_mandir/man1/smt.1%ext_man" -%preun mt +%postun mt if test "$1" = 0; then "%_sbindir/update-alternatives" --remove mt "%_bindir/smt" fi @@ -666,7 +666,7 @@ fi --install "%_sbindir/rmt" rmt "%_sbindir/srmt" 10 \ --slave "%_mandir/man8/rmt.1%ext_man" "rmt.1%ext_man" "%_mandir/man8/srmt.1%ext_man" -%preun rmt +%postun rmt if test "$1" = 0; then "%_sbindir/update-alternatives" --remove rmt "%_sbindir/srmt" fi From 488a2613c5e5a9716f81e8aeebf8f620b4dfd15e21cb4ad86fa47e0a76100029 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 18 May 2018 12:32:46 +0000 Subject: [PATCH 15/21] OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=25 --- gccwarns.diff | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gccwarns.diff b/gccwarns.diff index 3d35c98..0fdb244 100644 --- a/gccwarns.diff +++ b/gccwarns.diff @@ -1,3 +1,7 @@ +From: Jan Engelhardt +Date: 2018-05-17 22:26:23.600238551 +0200 + +Repair some cases of UB that might be responsible for gcc8 failures. [ 191s] searchinpath.c: In function 'searchonefile': [ 191s] searchinpath.c:221:5: warning: implicit declaration of function 'eaccess'; did you mean 'access'? [-Wimplicit-function-declaration] From e9f8b939ddb56df49b0ae2fad05b44ffea1b2c41fc4915596b9b0c176881eeb8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 28 May 2018 13:32:56 +0000 Subject: [PATCH 16/21] - Update to new upstream release 2018.05.25 - Remove gccwarns.diff (fixed upstream), gcc48wa.diff (we no longer have gcc-4.8) OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=26 --- gcc48wa.diff | 87 --------------------------------------- gccwarns.diff | 39 ------------------ schily-2018-05-17.tar.bz2 | 3 -- schily-2018-05-25.tar.bz2 | 3 ++ schily.changes | 11 +++++ schily.spec | 13 +++--- 6 files changed, 20 insertions(+), 136 deletions(-) delete mode 100644 gcc48wa.diff delete mode 100644 gccwarns.diff delete mode 100644 schily-2018-05-17.tar.bz2 create mode 100644 schily-2018-05-25.tar.bz2 diff --git a/gcc48wa.diff b/gcc48wa.diff deleted file mode 100644 index edd1a07..0000000 --- a/gcc48wa.diff +++ /dev/null @@ -1,87 +0,0 @@ -From: Jan Engelhardt -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)); - } diff --git a/gccwarns.diff b/gccwarns.diff deleted file mode 100644 index 0fdb244..0000000 --- a/gccwarns.diff +++ /dev/null @@ -1,39 +0,0 @@ -From: Jan Engelhardt -Date: 2018-05-17 22:26:23.600238551 +0200 - -Repair some cases of UB that might be responsible for gcc8 failures. - -[ 191s] searchinpath.c: In function 'searchonefile': -[ 191s] searchinpath.c:221:5: warning: implicit declaration of function 'eaccess'; did you mean 'access'? [-Wimplicit-function-declaration] -[ 191s] (eaccess(nbuf, mode) >= 0)) { -[ 836s] create.c: In function 'flush_link': -[ 836s] create.c:1099:16: warning: 'finfo.f_flags' is used uninitialized in this function [-Wuninitialized] -[ 836s] finfo.f_flags &= ~F_TCB_BUF; - ---- - libschily/searchinpath.c | 1 + - star/create.c | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -Index: schily-2018-03-16/libschily/searchinpath.c -=================================================================== ---- schily-2018-03-16.orig/libschily/searchinpath.c -+++ schily-2018-03-16/libschily/searchinpath.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE 1 /* eaccess */ - /* @(#)searchinpath.c 1.6 18/02/04 Copyright 1999-2018 J. Schilling */ - #include - #ifndef lint -Index: schily-2018-03-16/star/create.c -=================================================================== ---- schily-2018-03-16.orig/star/create.c -+++ schily-2018-03-16/star/create.c -@@ -1090,7 +1090,7 @@ flush_link(lp) - { - TCB tb; - TCB *ptb; -- FINFO finfo; -+ FINFO finfo = {}; - register LNAME *ln; - int fd = 1; - BOOL did_stat; diff --git a/schily-2018-05-17.tar.bz2 b/schily-2018-05-17.tar.bz2 deleted file mode 100644 index a2a1d93..0000000 --- a/schily-2018-05-17.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08d9fa3c83417aaceb227d57fbcb8cb9bc1202f382072d9ca4c348d44be9a60f -size 4225794 diff --git a/schily-2018-05-25.tar.bz2 b/schily-2018-05-25.tar.bz2 new file mode 100644 index 0000000..3ddb30d --- /dev/null +++ b/schily-2018-05-25.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:802afdae0db164d384a13d705606860f5f80960217cb59057261c0e24452d95a +size 4233820 diff --git a/schily.changes b/schily.changes index 527cd7d..ce65ac5 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 diff --git a/schily.spec b/schily.spec index 27f1001..926c648 100644 --- a/schily.spec +++ b/schily.spec @@ -16,14 +16,15 @@ # -%global box_version 2018.05.17 +# 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-17 +%define rver 2018-05-25 Name: schily -Version: 2018.05.17 +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 @@ -32,9 +33,7 @@ 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: iconv-name.diff -Patch3: gccwarns.diff +Patch1: iconv-name.diff # 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 @@ -400,7 +399,7 @@ Features: %prep %setup -qn %name-%rver -%patch -P 1 -P 2 -P 3 -p1 +%patch -P 1 -p1 find . "(" -type d -o -type f ")" -exec chmod u+w "{}" "+" %build From 214927d25baf9d3b8d193248aadeac623d11fcc867a3865ffbea6fc31353523c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 6 Jun 2018 14:57:44 +0000 Subject: [PATCH 17/21] Accepting request 614590 from home:kstreitova:branches:utilities - 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_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 OBS-URL: https://build.opensuse.org/request/show/614590 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=27 --- README-FIRST | 15 ++ schily-2018-05-25_star_bufferoverflow.patch | 22 ++ schily-2018-05-25_star_configuration.patch | 226 ++++++++++++++++++ ...2018-05-25_star_detect_gzip_failures.patch | 88 +++++++ schily-2018-05-25_star_lock.patch | 48 ++++ schily-2018-05-25_star_mk.patch | 15 ++ schily-2018-05-25_star_no_fsync.patch | 13 + schily-2018-05-25_star_selinux.patch | 224 +++++++++++++++++ ...y-2018-05-25_star_use_ssh_by_default.patch | 13 + schily.changes | 23 ++ schily.spec | 61 ++++- 11 files changed, 735 insertions(+), 13 deletions(-) create mode 100644 README-FIRST create mode 100644 schily-2018-05-25_star_bufferoverflow.patch create mode 100644 schily-2018-05-25_star_configuration.patch create mode 100644 schily-2018-05-25_star_detect_gzip_failures.patch create mode 100644 schily-2018-05-25_star_lock.patch create mode 100644 schily-2018-05-25_star_mk.patch create mode 100644 schily-2018-05-25_star_no_fsync.patch create mode 100644 schily-2018-05-25_star_selinux.patch create mode 100644 schily-2018-05-25_star_use_ssh_by_default.patch diff --git a/README-FIRST b/README-FIRST new file mode 100644 index 0000000..81899c4 --- /dev/null +++ b/README-FIRST @@ -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. diff --git a/schily-2018-05-25_star_bufferoverflow.patch b/schily-2018-05-25_star_bufferoverflow.patch new file mode 100644 index 0000000..ca81aa5 --- /dev/null +++ b/schily-2018-05-25_star_bufferoverflow.patch @@ -0,0 +1,22 @@ +Index: schily-2018-05-25/star/longnames.c +=================================================================== +--- schily-2018-05-25.orig/star/longnames.c ++++ schily-2018-05-25/star/longnames.c +@@ -167,7 +167,7 @@ name_to_tcb(info, ptb) + if (add) + strcatl(ptb->ndbuf.t_name, name, "/", (char *)NULL); + else +- strcpy(ptb->ndbuf.t_name, name); ++ strncpy(ptb->ndbuf.t_name, name, props.pr_maxsname); + return (TRUE); + } + +@@ -210,7 +210,7 @@ name_to_tcb(info, ptb) + if (add) + strcatl(ptb->ndbuf.t_name, &np[1], "/", (char *)NULL); + else +- strcpy(ptb->ndbuf.t_name, &np[1]); ++ strncpy(ptb->ndbuf.t_name, &np[1], props.pr_maxsname); + strncpy(ptb->dbuf.t_prefix, name, np - name); + info->f_flags |= F_SPLIT_NAME; + return (TRUE); diff --git a/schily-2018-05-25_star_configuration.patch b/schily-2018-05-25_star_configuration.patch new file mode 100644 index 0000000..c67cb06 --- /dev/null +++ b/schily-2018-05-25_star_configuration.patch @@ -0,0 +1,226 @@ +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 diff --git a/schily-2018-05-25_star_detect_gzip_failures.patch b/schily-2018-05-25_star_detect_gzip_failures.patch new file mode 100644 index 0000000..86fd15c --- /dev/null +++ b/schily-2018-05-25_star_detect_gzip_failures.patch @@ -0,0 +1,88 @@ +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 diff --git a/schily-2018-05-25_star_lock.patch b/schily-2018-05-25_star_lock.patch new file mode 100644 index 0000000..24f21d6 --- /dev/null +++ b/schily-2018-05-25_star_lock.patch @@ -0,0 +1,48 @@ +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 diff --git a/schily-2018-05-25_star_mk.patch b/schily-2018-05-25_star_mk.patch new file mode 100644 index 0000000..6ed61de --- /dev/null +++ b/schily-2018-05-25_star_mk.patch @@ -0,0 +1,15 @@ +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 + + ########################################################################### diff --git a/schily-2018-05-25_star_no_fsync.patch b/schily-2018-05-25_star_no_fsync.patch new file mode 100644 index 0000000..cf4b138 --- /dev/null +++ b/schily-2018-05-25_star_no_fsync.patch @@ -0,0 +1,13 @@ +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 */ diff --git a/schily-2018-05-25_star_selinux.patch b/schily-2018-05-25_star_selinux.patch new file mode 100644 index 0000000..d17584a --- /dev/null +++ b/schily-2018-05-25_star_selinux.patch @@ -0,0 +1,224 @@ +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 ++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)) { diff --git a/schily-2018-05-25_star_use_ssh_by_default.patch b/schily-2018-05-25_star_use_ssh_by_default.patch new file mode 100644 index 0000000..087778d --- /dev/null +++ b/schily-2018-05-25_star_use_ssh_by_default.patch @@ -0,0 +1,13 @@ +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. diff --git a/schily.changes b/schily.changes index ce65ac5..324198b 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +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_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 diff --git a/schily.spec b/schily.spec index 926c648..e6825c8 100644 --- a/schily.spec +++ b/schily.spec @@ -33,13 +33,35 @@ 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 +Source1: README-FIRST Patch1: iconv-name.diff +# PATCH-FIX-SUSE: some default values for configuration/compilation +Patch2: schily-2018-05-25_star_configuration.patch +# PATCH-FIX-SUSE: [bnc#97500] do not run FSYNC by default +Patch3: schily-2018-05-25_star_no_fsync.patch +# PATCH-FIX-SUSE: [bnc#414251] set read lock before using the semaphore wait on a pipe fd to avoid deadlock +Patch4: schily-2018-05-25_star_lock.patch +# PATCH-FIX-UPSTREAM: [bnc#858660] detect gzip failures +Patch5: schily-2018-05-25_star_detect_gzip_failures.patch +# PATCH-FIX-UPSTREAM: [bnc#625527] fix bufferoverflow +Patch6: schily-2018-05-25_star_bufferoverflow.patch +# PATCH-FIX-SUSE: use ssh as adefault remote access method +Patch7: schily-2018-05-25_star_use_ssh_by_default.patch +# PATCH-FIX-UPSTREAM: Fix broken star.mk in 1.5.3 (included from all.mk) +Patch8: schily-2018-05-25_star_mk.patch +# PATCH-FIX-UPSTREAM: Implement selinux +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 @@ -351,7 +373,7 @@ Group: Productivity/Archiving/Backup Conflicts: dump-rmt Conflicts: tar-rmt Obsoletes: star-rmt -Provides: star-rmt:/usr/sbin/srmt +Provides: star-rmt:/usr/bin/srmt Requires(post): update-alternatives Requires(postun): update-alternatives @@ -400,8 +422,18 @@ Features: %prep %setup -qn %name-%rver %patch -P 1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -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. @@ -433,10 +465,13 @@ if test "%_lib" != lib; then 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" @@ -463,12 +498,15 @@ rm -Rfv "$b/%_datadir/lib/siconv" 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* -mv "$b/%_mandir/man1/mt.1" "$b/%_mandir/man1/smt.1" -mv "$b/%_sbindir/rmt" "$b/%_sbindir/srmt" # make room for u-a -mv "$b/%_mandir/man1/rmt.1" "$b/%_mandir/man1/srmt.1" # get rid of things that upset rpmlint find "$b/usr/share/doc" -type f -name "*big*" -print -delete @@ -662,12 +700,12 @@ fi %post rmt "%_sbindir/update-alternatives" \ - --install "%_sbindir/rmt" rmt "%_sbindir/srmt" 10 \ + --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 "%_sbindir/srmt" + "%_sbindir/update-alternatives" --remove rmt "%_bindir/srmt" fi %post -n libcdrdeflt1_0 -p /sbin/ldconfig @@ -927,9 +965,10 @@ fi %files -n schily-rmt %license CDDL.Schily.txt -%config %_sysconfdir/default/rmt +%{_docdir}/schily-rmt +%config(noreplace) %_sysconfdir/default/rmt %_docdir/rmt/ -%_sbindir/srmt +%_bindir/srmt %_mandir/man1/srmt.1* %ghost %_sysconfdir/alternatives/rmt %ghost %_sysconfdir/alternatives/rmt.1%ext_man @@ -943,16 +982,12 @@ fi %files -n star %license CDDL.Schily.txt -%config %_sysconfdir/default/star +%config(noreplace) %_sysconfdir/default/star %_bindir/star -%_bindir/star_sym -%_bindir/suntar %_bindir/tartest %_bindir/ustar %_docdir/star/ %_mandir/man1/star.1* -%_mandir/man1/star_sym.1* -%_mandir/man1/suntar.1* %_mandir/man1/ustar.1* %_mandir/man5/star.5* From 2588b7d48a215bfb1f3acdd8353b2fcb2c0a46f8c453059f025670c8cc7f13f2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 6 Jun 2018 15:05:07 +0000 Subject: [PATCH 18/21] move patch formulae to in-patch descriptions OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=28 --- schily-2018-05-25_star_bufferoverflow.patch | 7 +++++++ schily-2018-05-25_star_configuration.patch | 6 ++++++ schily-2018-05-25_star_detect_gzip_failures.patch | 7 +++++++ schily-2018-05-25_star_lock.patch | 7 +++++++ schily-2018-05-25_star_mk.patch | 6 ++++++ schily-2018-05-25_star_no_fsync.patch | 7 +++++++ schily-2018-05-25_star_selinux.patch | 6 ++++++ schily-2018-05-25_star_use_ssh_by_default.patch | 6 ++++++ schily.spec | 8 -------- 9 files changed, 52 insertions(+), 8 deletions(-) diff --git a/schily-2018-05-25_star_bufferoverflow.patch b/schily-2018-05-25_star_bufferoverflow.patch index ca81aa5..5c8d8ba 100644 --- a/schily-2018-05-25_star_bufferoverflow.patch +++ b/schily-2018-05-25_star_bufferoverflow.patch @@ -1,3 +1,10 @@ +From: Kristyna Streitova +Date: Wed, 06 Jun 2018 14:51:57 +0000 +References: http://bugzilla.opensuse.org/625527 +X-Upstream: PATCH-FIX-UPSTREAM + +fix bufferoverflow + Index: schily-2018-05-25/star/longnames.c =================================================================== --- schily-2018-05-25.orig/star/longnames.c diff --git a/schily-2018-05-25_star_configuration.patch b/schily-2018-05-25_star_configuration.patch index c67cb06..7cc65a1 100644 --- a/schily-2018-05-25_star_configuration.patch +++ b/schily-2018-05-25_star_configuration.patch @@ -1,3 +1,9 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_detect_gzip_failures.patch b/schily-2018-05-25_star_detect_gzip_failures.patch index 86fd15c..f23605c 100644 --- a/schily-2018-05-25_star_detect_gzip_failures.patch +++ b/schily-2018-05-25_star_detect_gzip_failures.patch @@ -1,3 +1,10 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_lock.patch b/schily-2018-05-25_star_lock.patch index 24f21d6..7bd8f0e 100644 --- a/schily-2018-05-25_star_lock.patch +++ b/schily-2018-05-25_star_lock.patch @@ -1,3 +1,10 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_mk.patch b/schily-2018-05-25_star_mk.patch index 6ed61de..0b4ae61 100644 --- a/schily-2018-05-25_star_mk.patch +++ b/schily-2018-05-25_star_mk.patch @@ -1,3 +1,9 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_no_fsync.patch b/schily-2018-05-25_star_no_fsync.patch index cf4b138..2f7ef8d 100644 --- a/schily-2018-05-25_star_no_fsync.patch +++ b/schily-2018-05-25_star_no_fsync.patch @@ -1,3 +1,10 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_selinux.patch b/schily-2018-05-25_star_selinux.patch index d17584a..a3f9ee1 100644 --- a/schily-2018-05-25_star_selinux.patch +++ b/schily-2018-05-25_star_selinux.patch @@ -1,3 +1,9 @@ +From: Kristyna Streitova +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 diff --git a/schily-2018-05-25_star_use_ssh_by_default.patch b/schily-2018-05-25_star_use_ssh_by_default.patch index 087778d..8d1168d 100644 --- a/schily-2018-05-25_star_use_ssh_by_default.patch +++ b/schily-2018-05-25_star_use_ssh_by_default.patch @@ -1,3 +1,9 @@ +From: Kristyna Streitova +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 diff --git a/schily.spec b/schily.spec index e6825c8..5cad1fd 100644 --- a/schily.spec +++ b/schily.spec @@ -35,21 +35,13 @@ Url: http://cdrtools.sourceforge.net/private/cdrecord.html Source: https://downloads.sf.net/schilytools/%name-%rver.tar.bz2 Source1: README-FIRST Patch1: iconv-name.diff -# PATCH-FIX-SUSE: some default values for configuration/compilation Patch2: schily-2018-05-25_star_configuration.patch -# PATCH-FIX-SUSE: [bnc#97500] do not run FSYNC by default Patch3: schily-2018-05-25_star_no_fsync.patch -# PATCH-FIX-SUSE: [bnc#414251] set read lock before using the semaphore wait on a pipe fd to avoid deadlock Patch4: schily-2018-05-25_star_lock.patch -# PATCH-FIX-UPSTREAM: [bnc#858660] detect gzip failures Patch5: schily-2018-05-25_star_detect_gzip_failures.patch -# PATCH-FIX-UPSTREAM: [bnc#625527] fix bufferoverflow Patch6: schily-2018-05-25_star_bufferoverflow.patch -# PATCH-FIX-SUSE: use ssh as adefault remote access method Patch7: schily-2018-05-25_star_use_ssh_by_default.patch -# PATCH-FIX-UPSTREAM: Fix broken star.mk in 1.5.3 (included from all.mk) Patch8: schily-2018-05-25_star_mk.patch -# PATCH-FIX-UPSTREAM: Implement selinux 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). From f58706bf1ebfb8f92fb863efa9003bca2a895c5e488893f30a67014e6d0f16f6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 6 Jun 2018 15:14:32 +0000 Subject: [PATCH 19/21] Expand description for iconv-name.diff OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=29 --- iconv-name.diff | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/iconv-name.diff b/iconv-name.diff index a6019f2..a959a8b 100644 --- a/iconv-name.diff +++ b/iconv-name.diff @@ -1,8 +1,16 @@ From: Jan Engelhardt 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 ++-- From 2eb2ee2e19f3b6ef216c52971ff5057468001d4c3e110fd27d0bcd2e8b941cd8 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Thu, 7 Jun 2018 07:42:05 +0000 Subject: [PATCH 20/21] Accepting request 614734 from home:jengelh:branches:utilities - Remove schily-2018-05-25_star_bufferoverflow.patch (the bug is long gone, the patch has no effect) OBS-URL: https://build.opensuse.org/request/show/614734 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=30 --- schily-2018-05-25_star_bufferoverflow.patch | 29 --------------------- schily.changes | 6 +++++ schily.spec | 2 -- 3 files changed, 6 insertions(+), 31 deletions(-) delete mode 100644 schily-2018-05-25_star_bufferoverflow.patch diff --git a/schily-2018-05-25_star_bufferoverflow.patch b/schily-2018-05-25_star_bufferoverflow.patch deleted file mode 100644 index 5c8d8ba..0000000 --- a/schily-2018-05-25_star_bufferoverflow.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Kristyna Streitova -Date: Wed, 06 Jun 2018 14:51:57 +0000 -References: http://bugzilla.opensuse.org/625527 -X-Upstream: PATCH-FIX-UPSTREAM - -fix bufferoverflow - -Index: schily-2018-05-25/star/longnames.c -=================================================================== ---- schily-2018-05-25.orig/star/longnames.c -+++ schily-2018-05-25/star/longnames.c -@@ -167,7 +167,7 @@ name_to_tcb(info, ptb) - if (add) - strcatl(ptb->ndbuf.t_name, name, "/", (char *)NULL); - else -- strcpy(ptb->ndbuf.t_name, name); -+ strncpy(ptb->ndbuf.t_name, name, props.pr_maxsname); - return (TRUE); - } - -@@ -210,7 +210,7 @@ name_to_tcb(info, ptb) - if (add) - strcatl(ptb->ndbuf.t_name, &np[1], "/", (char *)NULL); - else -- strcpy(ptb->ndbuf.t_name, &np[1]); -+ strncpy(ptb->ndbuf.t_name, &np[1], props.pr_maxsname); - strncpy(ptb->dbuf.t_prefix, name, np - name); - info->f_flags |= F_SPLIT_NAME; - return (TRUE); diff --git a/schily.changes b/schily.changes index 324198b..d9b9a4e 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/schily.spec b/schily.spec index 5cad1fd..cec6e51 100644 --- a/schily.spec +++ b/schily.spec @@ -39,7 +39,6 @@ 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 -Patch6: schily-2018-05-25_star_bufferoverflow.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 @@ -418,7 +417,6 @@ Features: %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 From 6650507fe6d09417316016128bbe0f4e1b453941fd7cd13f3e43a7f7a2c80b26 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Thu, 7 Jun 2018 07:50:36 +0000 Subject: [PATCH 21/21] OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=31 --- schily.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/schily.changes b/schily.changes index d9b9a4e..018ee53 100644 --- a/schily.changes +++ b/schily.changes @@ -14,6 +14,7 @@ Tue Jun 5 08:21:16 UTC 2018 - kstreitova@suse.com * 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)