Hello community, here is the log from the commit of package yast2-restore checked in at Thu Dec 7 20:01:44 CET 2006. -------- --- yast2-restore/yast2-restore.changes 2006-10-10 12:13:39.000000000 +0200 +++ /mounts/work_src_done/NOARCH/yast2-restore/yast2-restore.changes 2006-12-04 09:12:36.000000000 +0100 @@ -1,0 +2,7 @@ +Mon Dec 4 09:10:02 CET 2006 - locilka@suse.cz + +- Fixed restoration of archives containing files with quotes, + spaces, backslashes or other special characters (#220172). +- 2.15.0 + +------------------------------------------------------------------- Old: ---- yast2-restore-2.14.0.tar.bz2 New: ---- yast2-restore-2.15.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-restore.spec ++++++ --- /var/tmp/diff_new_pack.EoPqR5/_old 2006-12-07 20:01:23.000000000 +0100 +++ /var/tmp/diff_new_pack.EoPqR5/_new 2006-12-07 20:01:23.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-restore (Version 2.14.0) +# spec file for package yast2-restore (Version 2.15.0) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -11,12 +11,12 @@ # norootforbuild Name: yast2-restore -Version: 2.14.0 +Version: 2.15.0 Release: 1 -License: GPL +License: GNU General Public License (GPL) Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-restore-2.14.0.tar.bz2 +Source0: yast2-restore-2.15.0.tar.bz2 prefix: /usr BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-bootloader yast2-devtools yast2-testsuite Requires: yast2 yast2-core bzip2 gzip tar yast2-installation yast2-bootloader aaa_base @@ -34,7 +34,7 @@ Ladislav Slezak <lslezak@suse.cz> %prep -%setup -n yast2-restore-2.14.0 +%setup -n yast2-restore-2.15.0 %build %{prefix}/bin/y2tool y2autoconf @@ -70,6 +70,10 @@ %doc %{prefix}/share/doc/packages/yast2-restore %changelog -n yast2-restore +* Mon Dec 04 2006 - locilka@suse.cz +- Fixed restoration of archives containing files with quotes, + spaces, backslashes or other special characters (#220172). +- 2.15.0 * Tue Oct 10 2006 - locilka@suse.cz - New version for maintenance - 2.14.0 ++++++ yast2-restore-2.14.0.tar.bz2 -> yast2-restore-2.15.0.tar.bz2 ++++++ ++++ 5176 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/Makefile.am new/yast2-restore-2.15.0/Makefile.am --- old/yast2-restore-2.14.0/Makefile.am 2006-10-10 12:14:26.000000000 +0200 +++ new/yast2-restore-2.15.0/Makefile.am 2006-12-05 13:41:17.000000000 +0100 @@ -7,8 +7,7 @@ # #where devtools are -PREFIX := $(shell pkg-config --print-errors --variable=prefix yast2-devtools) -Y2TOOL = $(PREFIX)/bin/y2tool +Y2TOOL = $(Y2DEVTOOLS_PREFIX)/bin/y2tool VERSION = $(shell cat $(srcdir)/VERSION) RPMNAME = $(shell cat $(srcdir)/RPMNAME) @@ -20,7 +19,7 @@ # do we do Makefile.am for devtools? It is a little special... IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME)) -DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(PREFIX)/share/YaST2/data/devtools) +DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir)/devtools,$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools) ALL_PACKAGES = $(DEVTOOLS_DIR)/admin/all-packages LEGALESE_DIR = $(if $(HAS_YAST_LICENSE),$(DEVTOOLS_DIR)/admin/copyright/yast,$(DEVTOOLS_DIR)/admin/copyright/gpl) @@ -34,7 +33,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 # where devtools instal m4 snippets # argh, executed literally -#ACLOCAL_AMFLAGS = -I $(PREFIX)/share/aclocal +#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal ACLOCAL_AMFLAGS = -I `if test -d ./devtools/admin; then echo ./devtools/admin; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal Makefile.am.common: $(DEVTOOLS_DIR)/admin/Makefile.am.common diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/Makefile.am.common new/yast2-restore-2.15.0/Makefile.am.common --- old/yast2-restore-2.14.0/Makefile.am.common 2006-10-10 12:14:26.000000000 +0200 +++ new/yast2-restore-2.15.0/Makefile.am.common 2006-12-05 13:41:17.000000000 +0100 @@ -29,7 +29,19 @@ dist-hook: check-syntax +CHECK_SYNTAX = true check-syntax: $(client_DATA) $(ycpchook) - if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi + @if test "$(client_DATA)"; then \ + if $(CHECK_SYNTAX); then \ + TO_CHECK="$(filter %.ycp,$^)"; \ + echo "Checking syntax of $${TO_CHECK}"; \ + if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \ + echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \ + exit 1; \ + fi; \ + else \ + echo "Syntax check disabled"; \ + fi; \ + fi -include .dep diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/VERSION new/yast2-restore-2.15.0/VERSION --- old/yast2-restore-2.14.0/VERSION 2006-10-10 12:13:01.000000000 +0200 +++ new/yast2-restore-2.15.0/VERSION 2006-12-04 09:06:46.000000000 +0100 @@ -1 +1 @@ -2.14.0 +2.15.0 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/configure.in new/yast2-restore-2.15.0/configure.in --- old/yast2-restore-2.14.0/configure.in 2006-10-10 12:14:25.000000000 +0200 +++ new/yast2-restore-2.15.0/configure.in 2006-12-05 13:41:17.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for yast2-restore dnl -dnl -- This file is generated by y2autoconf 2.13.19 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-restore, 2.14.0, http://bugs.opensuse.org/, yast2-restore) +AC_INIT(yast2-restore, 2.15.0, http://bugs.opensuse.org/, yast2-restore) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -17,7 +17,7 @@ AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs dnl Important YaST2 variables -VERSION="2.14.0" +VERSION="2.15.0" RPMNAME="yast2-restore" MAINTAINER="Lukas Ocilka <locilka@suse.cz>" @@ -110,6 +110,8 @@ AC_MSG_ERROR(xgettext is missing; please install gettext-devel.) fi +Y2DEVTOOLS_PREFIX=`pkg-config --print-errors --variable=prefix yast2-devtools` +AC_SUBST(Y2DEVTOOLS_PREFIX) devtools_ybindir=`pkg-config --print-errors --variable=ybindir yast2-devtools` devtools_yast2dir=`pkg-config --print-errors --variable=yast2dir yast2-devtools` @@ -142,6 +144,9 @@ if test "$YCPC" = "false"; then AC_MSG_ERROR([ycpc is not installed]) fi +AC_CHECK_FILE($devtools_yast2dir/data/testsuite/Makefile.testsuite, [], [ + AC_MSG_WARN([yast2-testsuite.rpm is not installed]) +]) AC_CONFIG_FILES(Makefile agents/Makefile diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/src/Restore.ycp new/yast2-restore-2.15.0/src/Restore.ycp --- old/yast2-restore-2.14.0/src/Restore.ycp 2006-10-09 15:50:13.000000000 +0200 +++ new/yast2-restore-2.15.0/src/Restore.ycp 2006-12-04 09:13:11.000000000 +0100 @@ -11,7 +11,7 @@ * Authors: * Ladislav Slezak <lslezak@suse.cz> * - * $Id: Restore.ycp 24002 2005-07-12 10:10:31Z locilka $ + * $Id: Restore.ycp 34708 2006-12-04 08:13:08Z locilka $ * Representation of the configuration of restore. * Input and output routines. @@ -33,6 +33,7 @@ import "Popup"; import "URL"; import "Message"; + import "String"; textdomain "restore"; @@ -1562,14 +1563,20 @@ if (sel_type == "P") { // strip leading '/' - foreach(string f, info["sel_file"]:[], ``{ - if (size(f) > 1 && substring(f, 0, 1) == "/") - { - unpackfiles = unpackfiles + " " + substring(f, 1); + foreach (string f, info["sel_file"]:[], ``{ + if (size(f) > 1) { + // remove a leading slash + if (substring (f, 0, 1) == "/") f = substring (f, 1); + // every single entry must be quoted + unpackfiles = unpackfiles + " '" + String::Quote (f) + "'"; } } ); } + + // FIXME: use list of files + // for star: list=filename + // for tar: --files-from=filename // create (s)tar command string tarcommand = (star == false) ? ("export LC_ALL=C; /bin/tar -C " + targetdir + " " diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-restore-2.14.0/src/restore_parse_pkginfo.pl new/yast2-restore-2.15.0/src/restore_parse_pkginfo.pl --- old/yast2-restore-2.14.0/src/restore_parse_pkginfo.pl 2006-10-09 15:50:13.000000000 +0200 +++ new/yast2-restore-2.15.0/src/restore_parse_pkginfo.pl 2006-12-01 11:17:53.000000000 +0100 @@ -11,10 +11,23 @@ print "\$[\n"; +# quoting all >"< and >\< characters +# bugzilla #220172 +sub Quote ($) { + my $string = shift; + + # backslashes are already escaped in the packages_info file + # $string =~ s/\\/\\\\/g; + $string =~ s/\"/\\\"/g; + + return $string; +} + while (my $line = <>) { chomp($line); + # nopackage if (substr($line, 0, length($packagestring)) eq $packagestring || $line eq $nopackagestring) { if ($line ne $nopackagestring) @@ -37,6 +50,7 @@ $prefix = ""; } + # package elsif (substr($line, 0, length($prefixstring)) eq $prefixstring) { $prefix = substr($line, length($prefixstring)); @@ -53,12 +67,17 @@ $first = 0; - print "\"$actualpkg\" : \$[ \"vers\" : \"$actualversion\", \"prefix\" : \"$prefix\", \"sel_type\" : \" \", \"files\" : [\n"; + print "\"". Quote($actualpkg) ."\" : \$[ ". + "\"vers\" : \"". Quote($actualversion) ."\", ". + "\"prefix\" : \"". Quote($prefix) ."\", ". + "\"sel_type\" : \" \", ". + "\"files\" : [\n"; } + # file in a package elsif (substr($line, 0, 1) eq "/") { - print "\"$line\",\n"; + print "\"". Quote($line). "\",\n"; } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de