Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2022-12-23 10:20:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "autoyast2" Fri Dec 23 10:20:48 2022 rev:331 rq:1044092 version:4.5.12 Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2022-12-03 10:03:16.499119759 +0100 +++ /work/SRC/openSUSE:Factory/.autoyast2.new.1563/autoyast2.changes 2022-12-23 10:20:52.347264611 +0100 @@ -1,0 +2,9 @@ +Wed Dec 21 14:19:22 UTC 2022 - Ladislav Slez��k <lslezak@suse.com> + +- Added XSLT transformation for easy conversion of the data types in the + AutoYaST XML profiles between the old and the new format. This allows to + convert a new profile to the format accepted in SLE15-SP2 or older + (bsc#1206597) +- 4.5.12 + +------------------------------------------------------------------- Old: ---- autoyast2-4.5.11.tar.bz2 New: ---- autoyast2-4.5.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.8EIXwZ/_old 2022-12-23 10:20:52.911267834 +0100 +++ /var/tmp/diff_new_pack.8EIXwZ/_new 2022-12-23 10:20:52.919267879 +0100 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.5.11 +Version: 4.5.12 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only @@ -208,6 +208,9 @@ %dir %{yast_moduledir} %{yast_moduledir}/AutoinstClass.rb +%dir %{_datadir}/autoinstall/xslt +%{_datadir}/autoinstall/xslt/*_types.xslt + %{yast_icondir} # additional files ++++++ autoyast2-4.5.11.tar.bz2 -> autoyast2-4.5.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.5.11/doc/profile_conversions.md new/autoyast2-4.5.12/doc/profile_conversions.md --- old/autoyast2-4.5.11/doc/profile_conversions.md 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.5.12/doc/profile_conversions.md 2022-12-21 16:04:08.000000000 +0100 @@ -0,0 +1,45 @@ +# Profile Conversions + +Although AutoYaST keeps backward compatibility so the old profiles should work +in new product releases in some cases it might be useful to do some conversions. + +## :warning: Warning + +*The automatic conversions using XSLT might not produce exact 1:1 results, +there might be minor differences in formatting, also the CDATA sections are +converted to regular data.* + +*Always check the conversion result and adjust it manually if needed.* + +## Converting from the Old Data Types to the New Ones + +Since SLE15-SP3 AutoYaST simplified the data type definitions in the XML +profiles. + +Instead of `config:type="boolean"` you can use a shorter form `t="boolean"`, +for example: + +```xml +<confirm t="boolean">true</confirm> +``` + +To convert the data types automatically you can use the [`new_types.xslt`]( +../xslt/new_types.xslt) file. + +```shell +xsltproc -o profile_new.xml /usr/share/autoinstall/xslt/new_types.xslt profile.xml +``` + +## Converting from the New Data Types to the Old Ones + +This is the opposite process to the previous conversion, it converts the new +data types to the old ones. This is useful if you want to use a new profile +in an old system (SLE15-SP2 and older). The old AutoYaST cannot read the new +data types and it would fail. + +The [`old_types.xslt`](../xslt/old_types.xslt) file converts the short +attributes `t="boolean"` to long attributes `config:type="boolean"`. + +```shell +xsltproc -o profile_old.xml /usr/share/autoinstall/xslt/old_types.xslt profile.xml +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.5.11/package/autoyast2.changes new/autoyast2-4.5.12/package/autoyast2.changes --- old/autoyast2-4.5.11/package/autoyast2.changes 2022-12-01 12:46:53.000000000 +0100 +++ new/autoyast2-4.5.12/package/autoyast2.changes 2022-12-21 16:04:08.000000000 +0100 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Wed Dec 21 14:19:22 UTC 2022 - Ladislav Slez��k <lslezak@suse.com> + +- Added XSLT transformation for easy conversion of the data types in the + AutoYaST XML profiles between the old and the new format. This allows to + convert a new profile to the format accepted in SLE15-SP2 or older + (bsc#1206597) +- 4.5.12 + +------------------------------------------------------------------- Thu Dec 1 09:36:51 UTC 2022 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com> - Avoid a potential crash when autoinst.ycp file is empty or diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.5.11/package/autoyast2.spec new/autoyast2-4.5.12/package/autoyast2.spec --- old/autoyast2-4.5.11/package/autoyast2.spec 2022-12-01 12:46:53.000000000 +0100 +++ new/autoyast2-4.5.12/package/autoyast2.spec 2022-12-21 16:04:08.000000000 +0100 @@ -22,7 +22,7 @@ %endif Name: autoyast2 -Version: 4.5.11 +Version: 4.5.12 Release: 0 Summary: YaST2 - Automated Installation License: GPL-2.0-only @@ -208,6 +208,9 @@ %dir %{yast_moduledir} %{yast_moduledir}/AutoinstClass.rb +%dir %{_datadir}/autoinstall/xslt +%{_datadir}/autoinstall/xslt/*_types.xslt + %{yast_icondir} # additional files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.5.11/xslt/new_types.xslt new/autoyast2-4.5.12/xslt/new_types.xslt --- old/autoyast2-4.5.11/xslt/new_types.xslt 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.5.12/xslt/new_types.xslt 2022-12-21 16:04:08.000000000 +0100 @@ -0,0 +1,31 @@ +<xsl:stylesheet version="1.0" + xmlns:n="http://www.suse.com/1.0/yast2ns" + xmlns:config="http://www.suse.com/1.0/configns" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns="http://www.suse.com/1.0/yast2ns" exclude-result-prefixes="n"> + +<!-- +Convert the AutoYaST scheme with the old type specification to the new format. +It simply replaces all "config:type" attributes with simple "t" attribute. + +NOTE: The new format is supported in SLES15-SP3 and newer, if you need to use +the profile in older systems you need to use the old "config:type" attributes! + +See the old_types.xslt file for the opposite conversion. +--> + + <xsl:output method="xml" indent="yes"/> + + <xsl:template match="node()|@*"> + <xsl:copy> + <xsl:apply-templates select="node()|@*"/> + </xsl:copy> + </xsl:template> + + <xsl:template match="@config:type"> + <xsl:attribute name="t"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:template> + +</xsl:stylesheet> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-4.5.11/xslt/old_types.xslt new/autoyast2-4.5.12/xslt/old_types.xslt --- old/autoyast2-4.5.11/xslt/old_types.xslt 1970-01-01 01:00:00.000000000 +0100 +++ new/autoyast2-4.5.12/xslt/old_types.xslt 2022-12-21 16:04:08.000000000 +0100 @@ -0,0 +1,31 @@ +<xsl:stylesheet version="1.0" + xmlns:n="http://www.suse.com/1.0/yast2ns" + xmlns:config="http://www.suse.com/1.0/configns" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns="http://www.suse.com/1.0/yast2ns" exclude-result-prefixes="n"> + +<!-- +Convert the AutoYaST scheme with the new type specification to the old format. +It simply replaces all "t" attributes with "config:type" attribute. + +NOTE: The new format is supported in SLES15-SP3 and newer, if you need to use +a profile in older systems this XSL file will make the profile work there. + +See the new_types.xslt file for the opposite conversion. +--> + + <xsl:output method="xml" indent="yes"/> + + <xsl:template match="node()|@*"> + <xsl:copy> + <xsl:apply-templates select="node()|@*"/> + </xsl:copy> + </xsl:template> + + <xsl:template match="@t"> + <xsl:attribute name="config:type"> + <xsl:value-of select="."/> + </xsl:attribute> + </xsl:template> + +</xsl:stylesheet>