Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2 -> sle12 ## BNC# 803358 : "Chef and YaST clash over config files" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2/yast2.changes 2014-01-30 15:05:51.000000000 +0100 +++ /mounts/work_src_done/SLE12/yast2/yast2.changes 2014-02-05 14:15:22.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Feb 5 11:26:09 CET 2014 - jsuchome@suse.cz + +- Check for Chef outside in the yast2 shell script to catch modules + not using CommandLine (bnc#803358) +- 3.1.18 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2 - at least 64 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2 (Old) and /mounts/work_src_done/SLE12/yast2 (BS:build ID:31688 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-3.1.17.tar.bz2 New: ---- yast2-3.1.18.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.0edSFP/_old 2014-02-05 17:47:01.000000000 +0100 +++ /var/tmp/diff_new_pack.0edSFP/_new 2014-02-05 17:47:01.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.17 +Version: 3.1.18 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-3.1.17.tar.bz2 -> yast2-3.1.18.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/library/commandline/src/Makefile.am new/yast2-3.1.18/library/commandline/src/Makefile.am --- old/yast2-3.1.17/library/commandline/src/Makefile.am 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/library/commandline/src/Makefile.am 2014-02-05 14:11:52.000000000 +0100 @@ -3,12 +3,15 @@ module_DATA = \ modules/CommandLine.rb +client_DATA = \ + clients/other_tools_warning.rb + scrconf_DATA = \ scrconf/tty.scr agent_SCRIPTS = \ servers_non_y2/ag_tty -EXTRA_DIST = $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS) +EXTRA_DIST = $(module_DATA) $(scrconf_DATA) $(agent_SCRIPTS) $(client_DATA) -include $(top_srcdir)/Makefile.am.common \ No newline at end of file +include $(top_srcdir)/Makefile.am.common diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/library/commandline/src/clients/other_tools_warning.rb new/yast2-3.1.18/library/commandline/src/clients/other_tools_warning.rb --- old/yast2-3.1.17/library/commandline/src/clients/other_tools_warning.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-3.1.18/library/commandline/src/clients/other_tools_warning.rb 2014-02-05 14:11:52.000000000 +0100 @@ -0,0 +1,55 @@ +# encoding: utf-8 + +# *************************************************************************** +# +# Copyright (c) 2014 SUSE LLC +# All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, contact Novell, Inc. +# +# To contact Novell about this file by physical or electronic mail, +# you may find current contact information at www.novell.com +# +# *************************************************************************** + +#* +# There may be different ways to configure the system than YaST, e.g. Chef. +# It will periodically overwrite files under its control. +# If it is running, now is a good time to tell the user +# and ask if she wants to proceed with YaST anyway. +# We do not try to find out which files these are and ask +# before any interactive YaST module. +# See bnc#803358 + +module Yast + class OtherToolsWarningClient < Client + def main + Yast.import "Popup" + textdomain "base" + + if WFM.Args().include? "chef" + # Translators: a warning message in a continue-cancel question + # Opscode Chef is a different way to configure the system. + message = _( + "Chef Client is running. The changes that you make\n" + + "may be overridden by Chef later.\n" + + "Continue configuration with YaST?" + ) + return Popup.ContinueCancel(message) + end + + end + end +end + +Yast::OtherToolsWarningClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/library/commandline/src/modules/CommandLine.rb new/yast2-3.1.18/library/commandline/src/modules/CommandLine.rb --- old/yast2-3.1.17/library/commandline/src/modules/CommandLine.rb 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/library/commandline/src/modules/CommandLine.rb 2014-02-05 14:11:52.000000000 +0100 @@ -1542,37 +1542,6 @@ ret end - def ChefIsRunning - SCR.Execute(path(".target.bash"), "pgrep -fl chef-client") == 0 - end - - # Chef is a different way to configure the system. - # It will periodically overwrite files under its control. - # If it is running, now is a good time to tell the user - # and ask if she wants to proceed with YaST anyway. - # We do not try to find out which files these are and ask - # before any interactive YaST module. - # bnc#803358 - # @return true if we can go on: chef not running, or if the user - # wants to continue anyway - def IgnoreOtherConfigTools - if ChefIsRunning() - # Translators: a warning message in a continue-cancel question - # Opscode Chef is a different way to configure the system. - message = _( - "Chef Client is running. The changes that you make\n" + - "may be overridden by Chef later.\n" + - "Continue configuration with YaST?" - ) - return Popup.ContinueCancel(message) - end - - # if we want to check other tools (Puppet?) add them here - - # no conflicting tool found - true - end - # Parse the Command Line # # Function to parse the command line, start a GUI or handle interactive and @@ -1613,9 +1582,6 @@ return false end - # A hacky bail-out hook before interactive modules - return false unless IgnoreOtherConfigTools() - if Ops.is(Ops.get(commandline, "guihandler"), "symbol ()") exec = Convert.convert( Ops.get(commandline, "guihandler"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/library/general/test/Makefile.am new/yast2-3.1.18/library/general/test/Makefile.am --- old/yast2-3.1.17/library/general/test/Makefile.am 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/library/general/test/Makefile.am 2014-02-05 14:11:52.000000000 +0100 @@ -1,5 +1,6 @@ TESTS = \ - linuxrc_test.rb + linuxrc_test.rb \ + hooks_test.rb TEST_EXTENSIONS = .rb RB_LOG_COMPILER = rspec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/library/general/test/hooks_test.rb new/yast2-3.1.18/library/general/test/hooks_test.rb --- old/yast2-3.1.17/library/general/test/hooks_test.rb 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/library/general/test/hooks_test.rb 2014-02-05 14:11:52.000000000 +0100 @@ -56,14 +56,14 @@ it "tracks the results of the run hook files" do hook = Hooks.run 'before_hook' expect(Hooks.last.results.size).to eq(2) - failed_hook_file = Hooks.find('before_hook').results.first - expect(failed_hook_file.exit).not_to eq(0) - expect(failed_hook_file.stderr).to match(/failure/) + failed_hook_file = Hooks.find('before_hook').files.first + expect(failed_hook_file.result.exit).not_to eq(0) + expect(failed_hook_file.result.stderr).to match(/failure/) expect(failed_hook_file.output).to match(/failure/) - succeeded_hook_file = Hooks.find('before_hook').results.last - expect(succeeded_hook_file.exit).to eq(0) - expect(succeeded_hook_file.stdout).to match(/success/) + succeeded_hook_file = Hooks.find('before_hook').files.last + expect(succeeded_hook_file.result.exit).to eq(0) + expect(succeeded_hook_file.result.stdout).to match(/success/) expect(succeeded_hook_file.output).to match(/success/) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/package/yast2.changes new/yast2-3.1.18/package/yast2.changes --- old/yast2-3.1.17/package/yast2.changes 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/package/yast2.changes 2014-02-05 14:11:52.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Feb 5 11:26:09 CET 2014 - jsuchome@suse.cz + +- Check for Chef outside in the yast2 shell script to catch modules + not using CommandLine (bnc#803358) +- 3.1.18 + +------------------------------------------------------------------- Thu Jan 30 09:27:43 UTC 2014 - mfilka@suse.com - bnc#861078 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/package/yast2.spec new/yast2-3.1.18/package/yast2.spec --- old/yast2-3.1.17/package/yast2.spec 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/package/yast2.spec 2014-02-05 14:11:52.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.17 +Version: 3.1.18 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.17/scripts/yast2 new/yast2-3.1.18/scripts/yast2 --- old/yast2-3.1.17/scripts/yast2 2014-01-30 13:40:46.000000000 +0100 +++ new/yast2-3.1.18/scripts/yast2 2014-02-05 14:11:52.000000000 +0100 @@ -187,6 +187,41 @@ fi } +chef_is_running () +{ + pgrep -fl chef-client >/dev/null +} + +# ask user if he want to continue despite there is chef-client running +# return 0 if user decided to continue +chef_warning_continue () +{ + $ybindir/y2base other_tools_warning -S "(chef)" "$SELECTED_GUI" $Y2_GEOMETRY $Y2UI_ARGS +} + +# Check if chef-client is running and warn user about it (bnc#803358) +# Returns 0 if user confirmed the conflict and wants to exit before starting YaST. +# (check for other tools (like puppet) may be added here) +other_tools_are_conflicting () +{ + # - no need to check for installation/firstboot, they are started directly with y2base + + if ! chef_is_running; then + return 1 + fi + + # existing arguments for yast module = CLI mode + # continue, but print a warning + if [ -n "$1" ]; then + echo "Warning: Chef Client is running. Your changes may be overridden by Chef later." >&2 + return 1 + fi + + if chef_warning_continue; then + return 1 + fi + return 0 +} TEMP=`/usr/bin/getopt -o hlg:s:Si --long help,list,kcontrol,geometry:,style:,strings,install,update,remove,fullscreen,noborder,qt,gtk,ncurses \ -n 'yast2' -- "$@"` @@ -368,6 +403,8 @@ if [ $module == "menu" -a -x "$y2ccbin" ] ; then $y2ccbin $Y2UI_ARGS "$@" exit_code=$? +elif test $module != "menu" && other_tools_are_conflicting "$@" ; then + exit_code=1 else # In case YaST has to be restarted, create this file # and exit. Script that creates the file should also continue with "q"... Checked in at Wed Feb 5 17:47:17 CET 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org