Hello community, here is the log from the commit of package update-checker for openSUSE:Factory checked in at 2018-12-10 12:30:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/update-checker (Old) and /work/SRC/openSUSE:Factory/.update-checker.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "update-checker" Mon Dec 10 12:30:26 2018 rev:6 rq:656784 version:1.0+git20181210.70430e2 Changes: -------- --- /work/SRC/openSUSE:Factory/update-checker/update-checker.changes 2018-12-06 12:17:36.153501399 +0100 +++ /work/SRC/openSUSE:Factory/.update-checker.new.19453/update-checker.changes 2018-12-10 12:30:34.614392685 +0100 @@ -1,0 +2,18 @@ +Mon Dec 10 11:20:08 CET 2018 - kukuk@suse.de + +- update-checker.conf-CaaSP.patch: change systemd profile default + output to salt. + +------------------------------------------------------------------- +Mon Dec 10 09:48:19 UTC 2018 - kukuk@suse.de + +- Update to version 1.0+git20181210.70430e2: + * Fix fallback to global section, if special section does not exist. + * Use systemd profile in configuration file for systemd services. + * Document --profile option + * Implement --profile option + * Fix typo + * Use rubygem-inifiles to read configuration file +- Add rubygem-inifile requirement for update-checker-migration + +------------------------------------------------------------------- Old: ---- update-checker-1.0+git20181205.79dad1e.tar.xz New: ---- update-checker-1.0+git20181210.70430e2.tar.xz update-checker.conf-CaaSP.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ update-checker.spec ++++++ --- /var/tmp/diff_new_pack.5OImb8/_old 2018-12-10 12:30:37.390389908 +0100 +++ /var/tmp/diff_new_pack.5OImb8/_new 2018-12-10 12:30:37.398389900 +0100 @@ -23,13 +23,14 @@ %endif Name: update-checker -Version: 1.0+git20181205.79dad1e +Version: 1.0+git20181210.70430e2 Release: 0 Summary: Scripts to check for new updates and migration targets License: GPL-2.0-or-later Group: Development/Tools/Other Url: https://github.com/thkukuk/update-checker Source: update-checker-%{version}.tar.xz +Patch: update-checker.conf-CaaSP.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: docbook-xsl-stylesheets @@ -40,6 +41,7 @@ Requires: perl-Config-IniFiles Requires: perl-XML-Twig %if !0%{?is_opensuse} +Requires: rubygem(inifile) >= 3.0.0 Requires: rubygem(suse-connect) >= 0.3.11 %endif BuildArch: noarch @@ -51,6 +53,9 @@ %prep %setup -q +%if 0%{?is_susecaasp} +%patch -p0 +%endif %build ./autogen.sh ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.5OImb8/_old 2018-12-10 12:30:37.490389808 +0100 +++ /var/tmp/diff_new_pack.5OImb8/_new 2018-12-10 12:30:37.490389808 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/thkukuk/update-checker.git</param> - <param name="changesrevision">79dad1e24c63e79dc4000a3d5eff835344e3178d</param> + <param name="changesrevision">70430e23086735e8b0cf0623db882d2954cb0a0a</param> </service> </servicedata> \ No newline at end of file ++++++ update-checker-1.0+git20181205.79dad1e.tar.xz -> update-checker-1.0+git20181210.70430e2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/etc/update-checker.conf new/update-checker-1.0+git20181210.70430e2/etc/update-checker.conf --- old/update-checker-1.0+git20181205.79dad1e/etc/update-checker.conf 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/etc/update-checker.conf 2018-12-10 10:44:00.000000000 +0100 @@ -1,7 +1,7 @@ [global] output=stdout -[globel-systemd] +[global-systemd] output=issue [update] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/man/update-checker-migration.8.xml new/update-checker-1.0+git20181210.70430e2/man/update-checker-migration.8.xml --- old/update-checker-1.0+git20181205.79dad1e/man/update-checker-migration.8.xml 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/man/update-checker-migration.8.xml 2018-12-10 10:44:00.000000000 +0100 @@ -89,6 +89,16 @@ <option>salt</option> option is for SUSE CaaS Plattform only.</para> </listitem> </varlistentry> + <varlistentry> + <term><option>--profile, -p</option> <replaceable>string</replaceable></term> + <listitem> + <para> + When reading the configuration file, the section + <option>[global-<replaceable>string</replaceable>]</option> is + preferred over the section <option>[global]</option>. + </para> + </listitem> + </varlistentry> <varlistentry> <term><option>--verbose, -v</option></term> <listitem> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/man/update-checker.8.xml new/update-checker-1.0+git20181210.70430e2/man/update-checker.8.xml --- old/update-checker-1.0+git20181205.79dad1e/man/update-checker.8.xml 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/man/update-checker.8.xml 2018-12-10 10:44:00.000000000 +0100 @@ -70,53 +70,63 @@ <varlistentry> <term><option>--config, -c</option> <replaceable>FILE</replaceable></term> <listitem> - <para>Specify an alternate config file.</para> - </listitem> - </varlistentry> + <para>Specify an alternate config file.</para> + </listitem> + </varlistentry> <varlistentry> <term><option>--output, -o</option> <replaceable>string</replaceable></term> <listitem> - <para>Specify a backend for the output. If this option is set, the - <replaceable>output</replaceable> option in the configuration file is - ignored. Valid options are <option>stdout</option>, - <option>issue</option> and <option>salt</option>. <option>stdout</option> - writes the result to stdout. <option>issue</option> writes the result to - <filename>/etc/issue</filename> via - <citerefentry project='issue-generator'><refentrytitle>issue-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The - <option>salt</option> option is for SUSE CaaS Plattform only.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>--update</option></term> - <listitem> - <para>Check for available updates via <command>zypper up</command></para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>--patch</option></term> - <listitem> - <para>Check for available patches via <command>zypper patch</command></para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>--dup</option></term> - <listitem> - <para>Check distribution updates via <command>zypper dup</command></para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>--verbose, -v</option></term> - <listitem> - <para>Increase verbosity.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><option>--help, -h</option></term> - <listitem> - <para>Display help and exit</para> - </listitem> - </varlistentry> -</variablelist> + <para>Specify a backend for the output. If this option is set, the + <replaceable>output</replaceable> option in the configuration file is + ignored. Valid options are <option>stdout</option>, + <option>issue</option> and <option>salt</option>. <option>stdout</option> + writes the result to stdout. <option>issue</option> writes the result to + <filename>/etc/issue</filename> via + <citerefentry project='issue-generator'><refentrytitle>issue-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The + <option>salt</option> option is for SUSE CaaS Plattform only.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--profile</option> <replaceable>string</replaceable></term> + <listitem> + <para> + When reading the configuration file, the section + <option>[global-<replaceable>string</replaceable>]</option> is + preferred over the section <option>[global]</option>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--update</option></term> + <listitem> + <para>Check for available updates via <command>zypper up</command></para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--patch</option></term> + <listitem> + <para>Check for available patches via <command>zypper patch</command></para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--dup</option></term> + <listitem> + <para>Check distribution updates via <command>zypper dup</command></para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--verbose, -v</option></term> + <listitem> + <para>Increase verbosity.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><option>--help, -h</option></term> + <listitem> + <para>Display help and exit</para> + </listitem> + </varlistentry> + </variablelist> </refsect1> <refsect1 id='see_also'><title>SEE ALSO</title> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/sbin/update-checker-migration new/update-checker-1.0+git20181210.70430e2/sbin/update-checker-migration --- old/update-checker-1.0+git20181205.79dad1e/sbin/update-checker-migration 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/sbin/update-checker-migration 2018-12-10 10:44:00.000000000 +0100 @@ -18,6 +18,7 @@ require 'fileutils' require 'tempfile' require "suse/connect" +require "inifile" def release_notes_url(product, version) myproduct = product @@ -106,6 +107,7 @@ options = { :config => "/etc/update-checker.conf", + :profile => nil, :output => nil, :verbose => false, :root => nil @@ -126,6 +128,10 @@ options[:output] = o end + opts.on("-p", "--profile string", "Use entry from different profile from the configuration file") do |p| + options[:profile] = p + end + opts.on("-v", "--[no-]verbose", "Increase verbosity") do |v| options[:verbose] = v end @@ -137,6 +143,80 @@ end.parse! +# Set output variable +output_stdout=false +output_issue=false +# for salt we assume, that there is at max. one migration target. +# Else we try to find the one with the highest version number. +output_salt=false +tx_update_migration_available=false +tx_update_migration_mirror_synced=true +tx_update_migration_newversion=nil +tx_update_migration_notes=nil + +# Read config file if necessary +if options[:output] + # don't read output from config file, use specified one + argument=options[:output].delete(" \t\r\n") + argument.split(',').each do |arg| + case arg + when "stdout" + output_stdout=true + when "issue" + output_issue=true + when "salt" + if !File.directory?("/etc/salt") + $stderr.puts "ERROR: no salt installed! Ignoring salt output.\n" + else + output_salt=true + end + else + $stderr.puts "ERROR: unknown output value: #{arg}\n" + end + end +else + begin + # read output variable from config file + config_file = IniFile.load(options[:config]) + if config_file + if options[:profile] + profile="global-#{options[:profile]}" + if !config_file.has_section?(profile) + profile="global" + end + else + profile="global" + end + data = config_file[profile] + argument = data["output"] + if argument + argument = argument.delete(" \t\r\n") + argument.split(',').each do |arg| + case arg + when "stdout" + output_stdout=true + when "issue" + output_issue=true + when "salt" + if !File.directory?("/etc/salt") + $stderr.puts "ERROR: no salt installed! Ignoring salt output.\n" + else + output_salt=true + end + else + $stderr.puts "ERROR: unknown output value: #{arg}\n" + end + end + end + end + end +end + +if output_stdout == false && output_issue == false && output_salt == false + output_stdout=true +end + + if !File.file?((options[:root] ? "#{options[:root]}" : "") + "/etc/zypp/credentials.d/SCCcredentials") print "System not registered\n" exit 0 @@ -212,73 +292,6 @@ end end -output_stdout=false -output_issue=false -# for salt we assume, that there is at max. one migration target. -# Else we try to find the one with the highest version number. -output_salt=false -tx_update_migration_available=false -tx_update_migration_mirror_synced=true -tx_update_migration_newversion=nil -tx_update_migration_notes=nil - -if options[:output] - # don't read output from config file, use specified one - argument=options[:output].delete(" \t\r\n") - argument.split(',').each do |arg| - case arg - when "stdout" - output_stdout=true - when "issue" - output_issue=true - when "salt" - if !File.directory?("/etc/salt") - $stderr.puts "ERROR: no salt installed! Ignoring salt output.\n" - else - output_salt=true - end - else - $stderr.puts "ERROR: unknown output value: #{arg}\n" - end - end -else - begin - open options[:config] do |config_file| - config_file.each_line do |line| - unless line.chomp.empty? || line =~ /^#/ - option, argument = line.split("=", 2) - option=option.delete(" \t\r\n") - if option == "output" - argument=argument.delete(" \t\r\n") - argument.split(',').each do |arg| - case arg - when "stdout" - output_stdout=true - when "issue" - output_issue=true - when "salt" - if !File.directory?("/etc/salt") - $stderr.puts "ERROR: no salt installed! Ignoring salt output.\n" - else - output_salt=true - end - else - $stderr.puts "ERROR: unknown output value: #{arg}\n" - end - end - end - end - end - end - rescue => e - $stderr.puts "Caught the exception: #{e}" - end -end - -if output_stdout == false && output_issue == false && output_salt == false - output_stdout=true -end - if migrations_unavailable.length > 0 print "Unavailable migrations (product is not mirrored):\n\n" if options[:verbose]; migrations_unavailable.each do |migration| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/systemd/update-checker-migration.service new/update-checker-1.0+git20181210.70430e2/systemd/update-checker-migration.service --- old/update-checker-1.0+git20181205.79dad1e/systemd/update-checker-migration.service 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/systemd/update-checker-migration.service 2018-12-10 10:44:00.000000000 +0100 @@ -7,6 +7,6 @@ [Service] Type=oneshot -ExecStart=/usr/sbin/update-checker-migration +ExecStart=/usr/sbin/update-checker-migration --profile systemd IOSchedulingClass=best-effort IOSchedulingPriority=7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update-checker-1.0+git20181205.79dad1e/systemd/update-checker.service new/update-checker-1.0+git20181210.70430e2/systemd/update-checker.service --- old/update-checker-1.0+git20181205.79dad1e/systemd/update-checker.service 2018-12-05 11:37:42.000000000 +0100 +++ new/update-checker-1.0+git20181210.70430e2/systemd/update-checker.service 2018-12-10 10:44:00.000000000 +0100 @@ -7,6 +7,6 @@ [Service] Type=oneshot -ExecStart=/usr/sbin/update-checker +ExecStart=/usr/sbin/update-checker --profile systemd IOSchedulingClass=best-effort IOSchedulingPriority=7 ++++++ update-checker.conf-CaaSP.patch ++++++ --- etc/update-checker.conf +++ etc/update-checker.conf 2018/12/10 09:49:15 @@ -2,7 +2,7 @@ output=stdout [global-systemd] -output=issue +output=salt [update] variant=up