Hello community,

here is the log from the commit of package jeos-firstboot for openSUSE:Factory 
checked in at 2017-03-12 20:05:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jeos-firstboot (Old)
 and      /work/SRC/openSUSE:Factory/.jeos-firstboot.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jeos-firstboot"

Sun Mar 12 20:05:05 2017 rev:2 rq:478465 version:0.0+git20170310.18283bf

Changes:
--------
--- /work/SRC/openSUSE:Factory/jeos-firstboot/jeos-firstboot.changes    
2017-01-25 23:28:41.358347100 +0100
+++ /work/SRC/openSUSE:Factory/.jeos-firstboot.new/jeos-firstboot.changes       
2017-03-12 20:05:07.880151778 +0100
@@ -1,0 +2,13 @@
+Fri Mar 10 09:46:04 UTC 2017 - fv...@suse.com
+
+- Update to version 0.0+git20170310.18283bf:
+  * Replace jeos-tool with jeos-add-repos script
+  * Move jeos-add-repos to sbin
+
+-------------------------------------------------------------------
+Tue Mar 07 09:25:32 UTC 2017 - fv...@suse.com
+
+- Update to version 0.0+git20170307.f650718:
+  * Add [Install] section to jeos-firstboot.service
+
+-------------------------------------------------------------------

Old:
----
  jeos-firstboot-0.0+git20161130.db63ad6.tar.xz

New:
----
  jeos-firstboot-0.0+git20170310.18283bf.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jeos-firstboot.spec ++++++
--- /var/tmp/diff_new_pack.vUJWso/_old  2017-03-12 20:05:08.488065757 +0100
+++ /var/tmp/diff_new_pack.vUJWso/_new  2017-03-12 20:05:08.488065757 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           jeos-firstboot
-Version:        0.0+git20161130.db63ad6
+Version:        0.0+git20170310.18283bf
 Release:        0
 Summary:        Simple text based JeOS first boot wizard
 License:        MIT
@@ -31,6 +31,10 @@
 Requires:       distribution-release
 Requires:       systemd
 Requires:       udev
+%if 0%{?is_opensuse}
+# Needed by jeos-add-repos
+Requires:       libxslt-tools
+%endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
@@ -45,6 +49,10 @@
 
 %install
 cp -a files/* %{buildroot}
+%if !0%{?is_opensuse}
+       # Not needed on SLE
+       rm %{buildroot}%{_sbindir}/jeos-add-repos
+%endif
 
 %preun
 %service_del_preun jeos-firstboot.service
@@ -65,7 +73,9 @@
 %{_unitdir}
 %{_libexecdir}/jeos-firstboot
 %{_libexecdir}/jeos-firstboot-functions
-%{_bindir}/jeos-tool
+%if 0%{?is_opensuse}
+%{_sbindir}/jeos-add-repos
+%endif
 /lib/kiwi
 
 %changelog

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.vUJWso/_old  2017-03-12 20:05:08.536058966 +0100
+++ /var/tmp/diff_new_pack.vUJWso/_new  2017-03-12 20:05:08.536058966 +0100
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">git://github.com/openSUSE/jeos-firstboot.git</param>
-          <param 
name="changesrevision">7ef5966802525304f0b04c2abeb32dd4fb50f65c</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">c28ca3e33f69c9c3b1f65b96a3edb55b28167944</param></service></servicedata>
\ No newline at end of file

++++++ jeos-firstboot-0.0+git20161130.db63ad6.tar.xz -> 
jeos-firstboot-0.0+git20170310.18283bf.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/lib/kiwi/hooks/preCallInit.sh 
new/jeos-firstboot-0.0+git20170310.18283bf/files/lib/kiwi/hooks/preCallInit.sh
--- 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/lib/kiwi/hooks/preCallInit.sh  
    2016-11-30 11:55:37.000000000 +0100
+++ 
new/jeos-firstboot-0.0+git20170310.18283bf/files/lib/kiwi/hooks/preCallInit.sh  
    2017-03-10 10:44:52.000000000 +0100
@@ -26,7 +26,8 @@
 chattr +C /var/lib/libvirt/images
 
 # Add repositories on opensuse
-if hash jeos-tool 2>/dev/null; then
+# (jeos-add-repos is not installed on SLE)
+if hash jeos-add-repos 2>/dev/null; then
        echo "Adding repositories ..."
-       jeos-tool create_repos
+       jeos-add-repos
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/bin/jeos-tool 
new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/bin/jeos-tool
--- old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/bin/jeos-tool  
2016-11-30 11:55:37.000000000 +0100
+++ new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/bin/jeos-tool  
1970-01-01 01:00:00.000000000 +0100
@@ -1,119 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2016 SUSE LLC
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-from pprint import pprint
-import os, sys, re
-import logging
-import cmdln
-from xml.etree import cElementTree as ET
-from pprint import pformat
-
-ZYPP_REPOS_D = 'etc/zypp/repos.d/'
-CONTROL_XML = 'etc/YaST2/control.xml'
-
-class JeOSTool(cmdln.Cmdln):
-    def __init__(self, *args, **kwargs):
-        cmdln.Cmdln.__init__(self, args, kwargs)
-        self.dryrun = False
-
-    def get_optparser(self):
-        parser = cmdln.CmdlnOptionParser(self)
-        parser.add_option("--dry", action="store_true", help="dry run")
-        parser.add_option("--debug", action="store_true", help="debug output")
-        parser.add_option("--verbose", action="store_true", help="verbose")
-        return parser
-
-    def postoptparse(self):
-        level = None
-        if self.options.debug:
-            level  = logging.DEBUG
-        elif self.options.verbose:
-            level = logging.INFO
-
-        logging.basicConfig(level = level)
-
-        self.logger = logging.getLogger(self.optparser.prog)
-
-        if self.options.dry:
-            self.dryrun = True
-
-    @cmdln.option("-r", "--root", metavar="DIR", default='/',
-                  help="root directory")
-    def do_create_repos(self, subcmd, opts):
-        """${cmd_name}: generate repos from control.xml
-
-        ${cmd_usage}
-        ${cmd_option_list}
-        """
-
-        ns = { 'yast2': 'http://www.suse.com/1.0/yast2ns',
-            'config': 'http://www.suse.com/1.0/configns' }
-
-        fh = open(os.path.join(opts.root, CONTROL_XML), 'r')
-        root = ET.parse(fh).getroot()
-        fh.close()
-        for node in root.findall('.//yast2:extra_url', ns):
-            settings = {
-                    'alias' : None,
-                    'autorefresh' : 0,
-                    'baseurl' : None,
-                    'enabled' : 0,
-                    'keeppackages' : 0,
-                    'name' : None,
-                    'priority' : 99,
-                    'prod_dir' : None,
-                    'type' : 'NONE',
-                    }
-            for i in settings.keys():
-                n = node.find('yast2:%s'%i, ns)
-                if n is None:
-                    continue
-                t = n.get('{http://www.suse.com/1.0/configns}type', None)
-                if t == 'boolean':
-                    settings[i] = 1 if n.text == 'true' else 0
-                else:
-                    settings[i] = "%s"%n.text
-
-            self.logger.debug(pformat(settings))
-
-            repo = """[%(alias)s]
-name=%(name)s
-enabled=%(enabled)s
-autorefresh=%(autorefresh)s
-baseurl=%(baseurl)s
-path=%(prod_dir)s
-keeppackages=0
-priority=%(priority)s
-type=%(type)s
-"""%settings
-            fn = os.path.join(opts.root, ZYPP_REPOS_D, 
settings['alias']+'.repo')
-            self.logger.info('creating %s'%fn)
-            self.logger.debug(repo)
-            if not self.dryrun:
-                fh = open(fn, 'w')
-                fh.write(repo)
-                fh.close()
-
-if __name__ == "__main__":
-    app = JeOSTool()
-    sys.exit( app.main() )
-
-# vim: sw=4 et
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/lib/systemd/system/jeos-firstboot.service
 
new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/lib/systemd/system/jeos-firstboot.service
--- 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/lib/systemd/system/jeos-firstboot.service
      2016-11-30 11:55:37.000000000 +0100
+++ 
new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/lib/systemd/system/jeos-firstboot.service
      2017-03-10 10:44:52.000000000 +0100
@@ -22,3 +22,6 @@
 StandardOutput=tty
 StandardInput=tty
 #StandardError=tty
+
+[Install]
+WantedBy=default.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/sbin/jeos-add-repos 
new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/sbin/jeos-add-repos
--- old/jeos-firstboot-0.0+git20161130.db63ad6/files/usr/sbin/jeos-add-repos    
1970-01-01 01:00:00.000000000 +0100
+++ new/jeos-firstboot-0.0+git20170310.18283bf/files/usr/sbin/jeos-add-repos    
2017-03-10 10:44:52.000000000 +0100
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (c) 2017 SUSE Linux GmbH
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# Process the default YaST2 control.xml with an XSL stylesheet to generate 
zypper commands and run them
+
+cmds=$(xsltproc - /etc/YaST2/control.xml << EOF
+<?xml version='1.0' encoding='utf-8' ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0" 
xmlns:y="http://www.suse.com/1.0/yast2ns";>
+  <xsl:output method="text"/>
+  <xsl:template match="/">
+    <xsl:for-each 
select="y:productDefines/y:software/y:extra_urls/y:extra_url">
+      <xsl:text>zypper addrepo</xsl:text>
+      <xsl:if test="y:enabled != 'true'"> -d </xsl:if>
+      <xsl:if test="y:autorefresh = 'true'"> -f </xsl:if>
+      <xsl:text> -p </xsl:text><xsl:value-of 
select="y:priority"/><xsl:text></xsl:text>
+      <xsl:text> -n "</xsl:text><xsl:value-of 
select="y:name"/><xsl:text>"</xsl:text>
+      <xsl:text> </xsl:text><xsl:value-of select="y:baseurl"/>
+      <xsl:if test="y:prod_dir != '/'"><xsl:value-of 
select="y:prod_dir"/></xsl:if>
+      <xsl:text> </xsl:text><xsl:value-of select="y:alias"/>
+      <xsl:text>;
+</xsl:text>
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>
+EOF
+)
+if [ "$?" -ne 0 ]; then
+       echo "Could not process control.xml" >&2
+else
+       eval "$cmds"
+fi


Reply via email to