Hello community, here is the log from the commit of package syslinux for openSUSE:Factory checked in at 2018-01-20 11:20:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/syslinux (Old) and /work/SRC/openSUSE:Factory/.syslinux.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "syslinux" Sat Jan 20 11:20:04 2018 rev:63 rq:567413 version:4.04 Changes: -------- --- /work/SRC/openSUSE:Factory/syslinux/syslinux.changes 2017-09-13 21:35:17.364370232 +0200 +++ /work/SRC/openSUSE:Factory/.syslinux.new/syslinux.changes 2018-01-20 11:20:06.734887441 +0100 @@ -1,0 +2,5 @@ +Thu Jan 18 12:57:04 CET 2018 - [email protected] + +- syslinux-4.04-python3.diff: switch to python3 (bsc#1075769) + +------------------------------------------------------------------- New: ---- syslinux-4.04-python3.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ syslinux.spec ++++++ --- /var/tmp/diff_new_pack.RhKA1H/_old 2018-01-20 11:20:08.678796563 +0100 +++ /var/tmp/diff_new_pack.RhKA1H/_new 2018-01-20 11:20:08.682796376 +0100 @@ -1,7 +1,7 @@ # # spec file for package syslinux # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,7 +23,7 @@ BuildRequires: libuuid-devel BuildRequires: nasm BuildRequires: netpbm -BuildRequires: python +BuildRequires: python3 BuildRequires: xz # lots of assembler here that would need to be changed :( #!BuildIgnore: gcc-PIE @@ -58,6 +58,7 @@ Patch18: %{name}-%{version}-align.diff # PATCH-FIX-UPSTREAM -- make package build reproducible Patch19: syslinux-4.04-reproducible.patch +Patch20: %{name}-%{version}-python3.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -93,6 +94,7 @@ %patch17 %patch18 %patch19 -p1 +%patch20 -p0 %build cp %{SOURCE2} . ++++++ syslinux-4.04-python3.diff ++++++ --- com32/cmenu/Makefile +++ com32/cmenu/Makefile @@ -37,7 +37,7 @@ .PRECIOUS: %.c %.c: %.menu adv_menu.tpl - python menugen.py --input=$< --output=$@ --template=adv_menu.tpl + python3 menugen.py --input=$< --output=$@ --template=adv_menu.tpl all: menus --- com32/cmenu/menugen.py +++ com32/cmenu/menugen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys, re, getopt @@ -100,27 +100,27 @@ if not self.entry["info"]: self.entry["info"] = self.entry["data"] if not self.menus: - print "Error before line %d" % self.lineno - print "REASON: menu must be declared before a menu item is declared" + print("Error before line %d" % self.lineno) + print("REASON: menu must be declared before a menu item is declared") sys.exit(1) self.menus[-1][1].append(self.entry) self.init_entry() def set_item(self,name,value): - if not self.entry.has_key(name): + if not name in self.entry: msg = ["Unknown attribute %s in line %d" % (name,self.lineno)] msg.append("REASON: Attribute must be one of %s" % self.vattrs) return "\n".join(msg) - if name=="type" and not self.types.has_key(value): + if name=="type" and not value in self.types: msg = [ "Unrecognized type %s in line %d" % (value,self.lineno)] msg.append("REASON: Valid types are %s" % self.vtypes) return "\n".join(msg) if name=="shortcut": - if (value <> "-1") and not re.match("^[A-Za-z0-9]$",value): + if (value != "-1") and not re.match("^[A-Za-z0-9]$",value): msg = [ "Invalid shortcut char '%s' in line %d" % (value,self.lineno) ] msg.append("REASON: Valid values are [A-Za-z0-9]") return "\n".join(msg) - elif value <> "-1": value = "'%s'" % value + elif value != "-1": value = "'%s'" % value elif name in ["state","helpid","ipappend"]: try: value = int(value) @@ -131,14 +131,14 @@ return "" def set_menu(self,name,value): - if not self.menu.has_key(name): + if not name in self.menu: return "Error: Unknown keyword %s" % name self.menu[name] = value self.menu["_updated"] = 1 return "" def set_system(self,name,value): - if not self.system.has_key(name): + if not name in self.system: return "Error: Unknown keyword %s" % name if name == "skipcondn": try: # is skipcondn a number? @@ -169,7 +169,7 @@ if not err: return # all errors so return item's error message - print err + print(err) sys.exit(1) def print_entry(self,entry,fd): @@ -211,9 +211,9 @@ missing = None for x in self.reqd_templates: - if not self.templates.has_key(x): missing = x + if not x in self.templates: missing = x if missing: - print "Template %s required but not defined in %s" % (missing,self.code_template_filename) + print("Template %s required but not defined in %s" % (missing,self.code_template_filename)) if filename == "-": fd = sys.stdout @@ -227,8 +227,8 @@ fd.write(self.templates["footer"]) fd.close() if not self.foundmain: - print "main menu not found" - print self.menus + print("main menu not found") + print(self.menus) sys.exit(1) def input(self,filename): @@ -259,26 +259,26 @@ # add property of current entry pos = line.find("=") # find the first = in string if pos < 0: - print "Syntax error in line %d" % self.lineno - print "REASON: non-section lines must be of the form ATTRIBUTE=VALUE" + print("Syntax error in line %d" % self.lineno) + print("REASON: non-section lines must be of the form ATTRIBUTE=VALUE") sys.exit(1) attr = line[:pos].strip().lower() value = line[pos+1:].strip() self.set(attr,value) except: - print "Error while parsing line %d: %s" % (self.lineno,line) + print("Error while parsing line %d: %s" % (self.lineno,line)) raise fd.close() self.add_item() def usage(): - print sys.argv[0]," [options]" - print "--input=<file> is the name of the .menu file declaring the menu structure" - print "--output=<file> is the name of generated C source" - print "--template=<file> is the name of template to be used" - print - print "input and output default to - (stdin and stdout respectively)" - print "template defaults to adv_menu.tpl" + print(sys.argv[0]," [options]") + print("--input=<file> is the name of the .menu file declaring the menu structure") + print("--output=<file> is the name of generated C source") + print("--template=<file> is the name of template to be used") + print() + print("input and output default to - (stdin and stdout respectively)") + print("template defaults to adv_menu.tpl") sys.exit(1) def main(): @@ -287,7 +287,7 @@ ofile = "-" opts,args = getopt.getopt(sys.argv[1:], "hi:o:t:",["input=","output=","template=","help"]) if args: - print "Unknown options %s" % args + print("Unknown options %s" % args) usage() for o,a in opts: if o in ["-i","--input"]:
