Hello community, here is the log from the commit of package yast2-snapper for openSUSE:Factory checked in at 2013-09-13 14:45:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-snapper (Old) and /work/SRC/openSUSE:Factory/.yast2-snapper.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-snapper" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-snapper/yast2-snapper.changes 2013-08-01 11:10:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-snapper.new/yast2-snapper.changes 2013-09-13 14:45:54.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Sep 9 09:58:39 CEST 2013 - jsuch...@suse.cz + +- added API for subvolume handling +- 3.0.1 + +------------------------------------------------------------------- Old: ---- yast2-snapper-3.0.0.tar.bz2 New: ---- yast2-snapper-3.0.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-snapper.spec ++++++ --- /var/tmp/diff_new_pack.toraKe/_old 2013-09-13 14:45:54.000000000 +0200 +++ /var/tmp/diff_new_pack.toraKe/_new 2013-09-13 14:45:54.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package yast2-snapper # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,29 +17,24 @@ Name: yast2-snapper -Version: 3.0.0 +Version: 3.0.1 Release: 0 +Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-snapper-%{version}.tar.bz2 + Requires: yast2 >= 2.21.22 -BuildRequires: doxygen -BuildRequires: gcc-c++ +License: GPL-2.0 +BuildRequires: update-desktop-files yast2 yast2-devtools yast2-testsuite libbtrfs-devel BuildRequires: libsnapper-devel >= 0.0.11 -BuildRequires: libtool -BuildRequires: perl-XML-Writer -BuildRequires: update-desktop-files -BuildRequires: yast2 BuildRequires: yast2-core-devel >= 2.23.1 -BuildRequires: yast2-devtools -BuildRequires: yast2-testsuite +BuildRequires: libtool doxygen gcc-c++ perl-XML-Writer Requires: yast2-ruby-bindings >= 1.0.0 Summary: YaST - file system snapshots review -License: GPL-2.0 -Group: System/YaST %description YaST module for accessing and managing btrfs system snapshots @@ -68,6 +63,7 @@ %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop} done + %clean rm -rf "$RPM_BUILD_ROOT" @@ -81,5 +77,3 @@ /usr/share/YaST2/scrconf/*.scr %{_libdir}/YaST2/plugin/libpy2ag_snapper* %doc %{_prefix}/share/doc/packages/yast2-snapper - -%changelog ++++++ yast2-snapper-3.0.0.tar.bz2 -> yast2-snapper-3.0.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/Makefile.am.common new/yast2-snapper-3.0.1/Makefile.am.common --- old/yast2-snapper-3.0.0/Makefile.am.common 2013-07-31 12:27:03.000000000 +0200 +++ new/yast2-snapper-3.0.1/Makefile.am.common 2013-09-13 10:23:04.000000000 +0200 @@ -15,6 +15,7 @@ CLEANFILES = ${ybcfiles} DISTCLEANFILES = .dep +if HAS_YCP_MODULES # Needs to be outside "." because of cases # where ycpchook contains a symlink to "." # Otherwise "." keeps being newer than .dep and we loop. @@ -26,14 +27,16 @@ ${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP} cat ${NEWDEP} > .dep rm ${NEWDEP} +-include .dep +endif dist-hook: check-syntax CHECK_SYNTAX = true -check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(filter %.ycp,client_DATA)"; then \ +check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpchook) $(ybcfiles) + @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \ if $(CHECK_SYNTAX); then \ - TO_CHECK="$(filter %.ycp,$^)"; \ + TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \ 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"; \ @@ -43,5 +46,18 @@ echo "Syntax check disabled"; \ fi; \ fi + @if test "$(filter %.rb, $^)"; then \ + if $(CHECK_SYNTAX); then \ + TO_CHECK="$(filter %.rb, $^)"; \ + echo "Checking syntax of $${TO_CHECK}"; \ + for f in $${TO_CHECK}; do \ + if ! ruby -c $$f > /dev/null; then \ + echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \ + exit 1; \ + fi; \ + done; \ + else \ + echo "Syntax check disabled"; \ + fi; \ + fi --include .dep diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/Makefile.in new/yast2-snapper-3.0.1/Makefile.in --- old/yast2-snapper-3.0.0/Makefile.in 2013-07-31 12:27:14.000000000 +0200 +++ new/yast2-snapper-3.0.1/Makefile.in 2013-09-13 10:23:11.000000000 +0200 @@ -63,8 +63,8 @@ subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure config.guess config.sub depcomp \ - install-sh ltmain.sh missing + $(top_srcdir)/configure config.guess config.sub install-sh \ + ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \ $(top_srcdir)/ltoptions.m4 $(top_srcdir)/ltsugar.m4 \ @@ -765,7 +765,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) + chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/VERSION new/yast2-snapper-3.0.1/VERSION --- old/yast2-snapper-3.0.0/VERSION 2013-07-30 13:43:12.000000000 +0200 +++ new/yast2-snapper-3.0.1/VERSION 2013-09-13 10:22:44.000000000 +0200 @@ -1 +1 @@ -3.0.0 +3.0.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/aclocal.m4 new/yast2-snapper-3.0.1/aclocal.m4 --- old/yast2-snapper-3.0.0/aclocal.m4 2013-07-31 12:27:12.000000000 +0200 +++ new/yast2-snapper-3.0.1/aclocal.m4 2013-09-13 10:23:09.000000000 +0200 @@ -1076,7 +1076,8 @@ # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -1122,7 +1123,8 @@ pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -1170,9 +1172,9 @@ AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -1206,6 +1208,46 @@ fi[]dnl ])# PKG_CHECK_MODULES + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + m4_include([libtool.m4]) m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/agent-snapper/src/SnapperAgent.cc new/yast2-snapper-3.0.1/agent-snapper/src/SnapperAgent.cc --- old/yast2-snapper-3.0.0/agent-snapper/src/SnapperAgent.cc 2013-06-24 10:53:12.000000000 +0200 +++ new/yast2-snapper-3.0.1/agent-snapper/src/SnapperAgent.cc 2013-09-13 10:22:44.000000000 +0200 @@ -8,8 +8,6 @@ */ #include "SnapperAgent.h" -#include <ctype.h> -#include <boost/algorithm/string.hpp> #define PC(n) (path->component_str(n)) @@ -112,6 +110,38 @@ return should_be_logged(ln[level], component); } +// call ioctl to create or delete specific btrfs subvolume +YCPBoolean btrfs_ioctl_call(string path, int request) +{ + + if (path == "") { + y2error ("'path' attribute missing!"); + return YCPBoolean (false); + } + + // find a directory one level up + // (FIXME check for path ending with /) + int idx = path.rfind('/'); + string updir = path.substr(0, idx); + string name = path.substr(idx + 1); + + int dirfd = open(updir.c_str(), O_RDONLY | O_NOATIME | O_CLOEXEC | O_DIRECTORY); + if (dirfd < 0) + { + y2error("opening directory '%s' failed", updir.c_str()); + return YCPBoolean (false); + } + + struct btrfs_ioctl_vol_args args; + memset(&args, 0, sizeof(args)); + strncpy(args.name, name.c_str(), sizeof(args.name) - 1); + + YCPBoolean ret = YCPBoolean (ioctl(dirfd, request, &args) == 0); + + close(dirfd); + + return ret; +} /** * Constructor @@ -175,7 +205,7 @@ if (!arg.isNull() && arg->isMap()) argmap = arg->asMap(); - if (!snapper_initialized && PC(0) != "error" && PC(0) != "configs") { + if (!snapper_initialized && PC(0) != "error" && PC(0) != "configs" && PC(0) != "is_subvolume") { y2error ("snapper not initialized: use Execute (.snapper) first!"); snapper_error = "not_initialized"; return YCPVoid(); @@ -183,6 +213,34 @@ if (path->length() == 1) { + /** + * Read (.snapper.is_subvolume, "path/to/dir") -> returns true if given directory is a subvolume + */ + if (PC(0) == "is_subvolume") { + + string path = ""; + if (arg->isString()) { + path = arg->asString()->value(); + } + + if (path == "") { + y2error ("path attribute missing!"); + return YCPBoolean (false); + } + + struct stat status; + if (stat(path.c_str(), &status) != 0) { + y2error ("status of '%s' cannot be obtained", path.c_str()); + return YCPBoolean (false); + } + if (!S_ISDIR(status.st_mode)) { + y2error ("'%s' is not a directory", path.c_str()); + return YCPBoolean (false); + } + + // see Btrfs::is_subvolume + return YCPBoolean (status.st_ino == 256); + } if (PC(0) == "configs") { YCPList retlist; @@ -410,12 +468,6 @@ return ret; } - if (!snapper_initialized && PC(0) != "create_config") { - y2error ("snapper not initialized: use Execute (.snapper) first!"); - snapper_error = "not_initialized"; - return YCPVoid(); - } - if (path->length() == 1) { if (PC(0) == "create_config") @@ -437,7 +489,43 @@ return ret; } - else if (PC(0) == "create") { + /** + * Execute(.snapper.delete_config, $[ "config_name" : name $] -> deletes given configuration + */ + if (PC(0) == "delete_config") { + + string name = getValue(argmap, YCPString("config_name"), ""); + + if (name == "") { + y2error ("'config_name' attribute missing!"); + return YCPBoolean (false); + } + + try + { + Snapper::deleteConfig(name); + } + catch (const ConfigNotFoundException& e) + { + y2error("deleting config '%s' failed (%s).", name.c_str(), e.what()); + return YCPBoolean (false); + } + catch (const DeleteConfigFailedException& e) + { + y2error("deleting config '%s' failed (%s).", name.c_str(), e.what()); + return YCPBoolean (false); + } + return ret; + } + + // previous operations do not need initialization + if (!snapper_initialized) { + y2error ("snapper not initialized: use Execute (.snapper) first!"); + snapper_error = "not_initialized"; + return YCPVoid(); + } + + if (PC(0) == "create") { string description = getValue (argmap, YCPString ("description"), ""); string cleanup = getValue (argmap, YCPString ("cleanup"), ""); @@ -563,6 +651,26 @@ } } + else if (path->length() == 2 && PC(0) == "subvolume") { + + // create new subvolume; argument 'path' must be provided + if (PC(1) == "create") + { + return btrfs_ioctl_call( + getValue(argmap, YCPString("path"), ""), + BTRFS_IOC_SUBVOL_CREATE + ); + } + // delete existing subvolume; argument 'path' must be provided + // (delete_config must be called before subvolume.delete) + else if (PC(1) == "delete") { + + return btrfs_ioctl_call( + getValue(argmap, YCPString("path"), ""), + BTRFS_IOC_SNAP_DESTROY + ); + } + } else { y2error("Wrong path '%s' in Execute().", path->toString().c_str()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/agent-snapper/src/SnapperAgent.h new/yast2-snapper-3.0.1/agent-snapper/src/SnapperAgent.h --- old/yast2-snapper-3.0.0/agent-snapper/src/SnapperAgent.h 2013-01-22 12:09:18.000000000 +0100 +++ new/yast2-snapper-3.0.1/agent-snapper/src/SnapperAgent.h 2013-09-13 10:22:44.000000000 +0200 @@ -19,6 +19,14 @@ #include <snapper/File.h> #include <snapper/Logger.h> +#include <ctype.h> +#include <fcntl.h> +#include <sys/ioctl.h> + +#include <boost/algorithm/string.hpp> + +#include <btrfs/ioctl.h> + /** * @short An interface class between YaST2 and Snapper Agent */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/autodocs-ycp.ami new/yast2-snapper-3.0.1/autodocs-ycp.ami --- old/yast2-snapper-3.0.0/autodocs-ycp.ami 2013-07-31 12:27:03.000000000 +0200 +++ new/yast2-snapper-3.0.1/autodocs-ycp.ami 2013-09-13 10:23:04.000000000 +0200 @@ -17,8 +17,11 @@ htmldir = $(docdir)/$(AUTODOCS_SUBDIR)/autodocs +# find all files in Yast/ subdirectory if it exists +YARD_YAST_FILES = $(shell test -d Yast && find Yast -type f) + # use nobase_ prefix to keep the directory structure -nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) $(wildcard js/*) $(wildcard css/*) $(wildcard Yast/*) +nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) $(wildcard js/*) $(wildcard css/*) $(YARD_YAST_FILES) CLEANFILES = $(nobase_html_DATA) pod2htm*.tmp AUTODOCS_YCP ?= $(wildcard $(srcdir)/../../src/*.ycp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/configure new/yast2-snapper-3.0.1/configure --- old/yast2-snapper-3.0.0/configure 2013-07-31 12:27:13.000000000 +0200 +++ new/yast2-snapper-3.0.1/configure 2013-09-13 10:23:10.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-snapper 3.0.0. +# Generated by GNU Autoconf 2.69 for yast2-snapper 3.0.1. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='yast2-snapper' PACKAGE_TARNAME='yast2-snapper' -PACKAGE_VERSION='3.0.0' -PACKAGE_STRING='yast2-snapper 3.0.0' +PACKAGE_VERSION='3.0.1' +PACKAGE_STRING='yast2-snapper 3.0.1' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -689,6 +689,8 @@ CXXFLAGS CXX YDOXYGEN +HAS_YCP_MODULES_FALSE +HAS_YCP_MODULES_TRUE YCPC YCPMAKEDEP YCPDOC @@ -1375,7 +1377,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-snapper 3.0.0 to adapt to many kinds of systems. +\`configure' configures yast2-snapper 3.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-snapper 3.0.0:";; + short | recursive ) echo "Configuration of yast2-snapper 3.0.1:";; esac cat <<\_ACEOF @@ -1564,7 +1566,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-snapper configure 3.0.0 +yast2-snapper configure 3.0.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2017,7 +2019,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-snapper $as_me 3.0.0, which was +It was created by yast2-snapper $as_me 3.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2956,7 +2958,7 @@ # Define the identity of the package. PACKAGE='yast2-snapper' - VERSION='3.0.0' + VERSION='3.0.1' cat >>confdefs.h <<_ACEOF @@ -3079,7 +3081,7 @@ -VERSION="3.0.0" +VERSION="3.0.1" RPMNAME="yast2-snapper" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" @@ -3482,6 +3484,29 @@ fi +# handle .dep files in Makefile.am.common if any YCP module is present +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for YCP modules" >&5 +$as_echo_n "checking for YCP modules... " >&6; } + +# YCP module file name starts with an upper case letter +find . -type f | grep -q "[[:upper:]][^/]*\.ycp$" && has_ycp_modules=1 + if test -n "$has_ycp_modules"; then + HAS_YCP_MODULES_TRUE= + HAS_YCP_MODULES_FALSE='#' +else + HAS_YCP_MODULES_TRUE='#' + HAS_YCP_MODULES_FALSE= +fi + + +if test -n "$has_ycp_modules"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } +fi + # Extract the first word of "ydoxygen", so it can be a program name with args. set dummy ydoxygen; ac_word=$2 @@ -5082,6 +5107,7 @@ + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -5217,6 +5243,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Y2CORE_CFLAGS=`$PKG_CONFIG --cflags "yast2-core" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -5233,6 +5260,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_Y2CORE_LIBS=`$PKG_CONFIG --libs "yast2-core" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -5252,9 +5280,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - Y2CORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "yast2-core" 2>&1` + Y2CORE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "yast2-core" 2>&1` else - Y2CORE_PKG_ERRORS=`$PKG_CONFIG --print-errors "yast2-core" 2>&1` + Y2CORE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "yast2-core" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$Y2CORE_PKG_ERRORS" >&5 @@ -16313,6 +16341,10 @@ as_fn_error $? "conditional \"CREATE_PKGCONFIG_NOARCH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAS_YCP_MODULES_TRUE}" && test -z "${HAS_YCP_MODULES_FALSE}"; then + as_fn_error $? "conditional \"HAS_YCP_MODULES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16722,7 +16754,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-snapper $as_me 3.0.0, which was +This file was extended by yast2-snapper $as_me 3.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16788,7 +16820,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-snapper config.status 3.0.0 +yast2-snapper config.status 3.0.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/configure.ac new/yast2-snapper-3.0.1/configure.ac --- old/yast2-snapper-3.0.0/configure.ac 2013-07-31 12:27:03.000000000 +0200 +++ new/yast2-snapper-3.0.1/configure.ac 2013-09-13 10:23:04.000000000 +0200 @@ -1,9 +1,9 @@ dnl configure.ac for yast2-snapper dnl -dnl -- This file is generated by y2autoconf 2.24.7 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 3.0.4 - DO NOT EDIT! -- dnl (edit configure.ac.in or configure.in.in instead) -AC_INIT(yast2-snapper, 3.0.0, http://bugs.opensuse.org/, yast2-snapper) +AC_INIT(yast2-snapper, 3.0.1, http://bugs.opensuse.org/, yast2-snapper) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="3.0.0" +VERSION="3.0.1" RPMNAME="yast2-snapper" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" @@ -152,6 +152,19 @@ AC_MSG_WARN([yast2-testsuite.rpm is not installed]) ]) +# handle .dep files in Makefile.am.common if any YCP module is present +AC_MSG_CHECKING([for YCP modules]) + +# YCP module file name starts with an upper case letter +[find . -type f | grep -q "[[:upper:]][^/]*\.ycp$" && has_ycp_modules=1] +AM_CONDITIONAL([HAS_YCP_MODULES], [test -n "$has_ycp_modules"]) + +if test -n "$has_ycp_modules"; then + AC_MSG_RESULT([found]) +else + AC_MSG_RESULT([not found]) +fi + AC_PATH_PROG(YDOXYGEN, ydoxygen, false, $PATH:$devtools_ybindir) if test "$YDOXYGEN" = "false"; then diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/doc/autodocs/Makefile.in new/yast2-snapper-3.0.1/doc/autodocs/Makefile.in --- old/yast2-snapper-3.0.0/doc/autodocs/Makefile.in 2013-07-31 12:27:15.000000000 +0200 +++ new/yast2-snapper-3.0.1/doc/autodocs/Makefile.in 2013-09-13 10:23:11.000000000 +0200 @@ -290,8 +290,11 @@ yncludedir = @yncludedir@ ystartupdir = @ystartupdir@ +# find all files in Yast/ subdirectory if it exists +YARD_YAST_FILES = $(shell test -d Yast && find Yast -type f) + # use nobase_ prefix to keep the directory structure -nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) $(wildcard js/*) $(wildcard css/*) $(wildcard Yast/*) +nobase_html_DATA = index.html $(filter-out index.html, $(wildcard *.html)) $(wildcard js/*) $(wildcard css/*) $(YARD_YAST_FILES) CLEANFILES = $(nobase_html_DATA) pod2htm*.tmp all: all-am diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-snapper-3.0.0/src/Makefile.in new/yast2-snapper-3.0.1/src/Makefile.in --- old/yast2-snapper-3.0.0/src/Makefile.in 2013-07-31 12:27:15.000000000 +0200 +++ new/yast2-snapper-3.0.1/src/Makefile.in 2013-09-13 10:23:11.000000000 +0200 @@ -307,7 +307,7 @@ # Needs to be outside "." because of cases # where ycpchook contains a symlink to "." # Otherwise "." keeps being newer than .dep and we loop. -NEWDEP = ${top_builddir}/.dep.new +@HAS_YCP_MODULES_TRUE@NEWDEP = ${top_builddir}/.dep.new CHECK_SYNTAX = true all: all-am @@ -653,16 +653,17 @@ # generate dependencies # two steps not to lose the file if the command fails # hook: create the links before we look for files -.dep: $(wildcard *.ycp) ${ycpchook} - ${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP} - cat ${NEWDEP} > .dep - rm ${NEWDEP} +@HAS_YCP_MODULES_TRUE@.dep: $(wildcard *.ycp) ${ycpchook} +@HAS_YCP_MODULES_TRUE@ ${YCPMAKEDEP} --prefix=${prefix} ${YCPCFLAGS} > ${NEWDEP} +@HAS_YCP_MODULES_TRUE@ cat ${NEWDEP} > .dep +@HAS_YCP_MODULES_TRUE@ rm ${NEWDEP} +@HAS_YCP_MODULES_TRUE@-include .dep dist-hook: check-syntax -check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles) - @if test "$(filter %.ycp,client_DATA)"; then \ +check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpchook) $(ybcfiles) + @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \ if $(CHECK_SYNTAX); then \ - TO_CHECK="$(filter %.ycp,$^)"; \ + TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \ 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"; \ @@ -672,8 +673,20 @@ echo "Syntax check disabled"; \ fi; \ fi - --include .dep + @if test "$(filter %.rb, $^)"; then \ + if $(CHECK_SYNTAX); then \ + TO_CHECK="$(filter %.rb, $^)"; \ + echo "Checking syntax of $${TO_CHECK}"; \ + for f in $${TO_CHECK}; do \ + if ! ruby -c $$f > /dev/null; then \ + echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \ + exit 1; \ + fi; \ + done; \ + else \ + echo "Syntax check disabled"; \ + fi; \ + fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org