Hello community, here is the log from the commit of package cinnamon for openSUSE:Factory checked in at 2020-03-17 13:11:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cinnamon (Old) and /work/SRC/openSUSE:Factory/.cinnamon.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cinnamon" Tue Mar 17 13:11:03 2020 rev:39 rq:785769 version:4.4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/cinnamon/cinnamon.changes 2019-08-07 14:01:03.180853105 +0200 +++ /work/SRC/openSUSE:Factory/.cinnamon.new.3160/cinnamon.changes 2020-03-17 13:11:17.877852070 +0100 @@ -1,0 +2,8 @@ +Mon Mar 16 15:31:14 UTC 2020 - Marguerite Su <i...@marguerite.su> + +- update version 4.4.8 + * details see github commits +- refreshed patch cinnamon-settings-4.4.8-tinycss2.patch + * dropped cinnamon-settings-4.2.3-tinycss2.patch + +------------------------------------------------------------------- Old: ---- cinnamon-4.2.3.tar.gz cinnamon-settings-4.2.3-tinycss2.patch New: ---- cinnamon-4.4.8.tar.gz cinnamon-settings-4.4.8-tinycss2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cinnamon.spec ++++++ --- /var/tmp/diff_new_pack.mIKujw/_old 2020-03-17 13:11:18.497852545 +0100 +++ /var/tmp/diff_new_pack.mIKujw/_new 2020-03-17 13:11:18.501852549 +0100 @@ -1,7 +1,7 @@ # # spec file for package cinnamon # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define _version 4.0.0 Name: cinnamon -Version: 4.2.3 +Version: 4.4.8 Release: 0 Summary: GNU/Linux Desktop featuring a traditional layout License: GPL-2.0-or-later AND LGPL-2.1-only @@ -41,8 +41,8 @@ Patch7: %{name}-fallback-icewm.patch # PATCH-FIX-OPENSUSE cinnamon-fix-typelib-false-positive.patch sor.ale...@meowr.ru -- remove false typelib(Webkit) dependency Patch8: %{name}-fix-typelib-false-positive.patch -# PATCH-FIx-UPSTREAM cinnamon-settings-4.2.3-tinycss2.patch -Patch9: %{name}-settings-4.2.3-tinycss2.patch +# PATCH-FIX-UPSTREAM cinnamon-settings-4.4.8-tinycss2.patch marguer...@opensuse.org - port deprecated tinycss to tinycss2 +Patch9: %{name}-settings-4.4.8-tinycss2.patch BuildRequires: autoconf BuildRequires: autoconf-archive BuildRequires: automake ++++++ cinnamon-4.2.3.tar.gz -> cinnamon-4.4.8.tar.gz ++++++ ++++ 37361 lines of diff (skipped) ++++++ cinnamon-settings-4.2.3-tinycss2.patch -> cinnamon-settings-4.4.8-tinycss2.patch ++++++ --- /work/SRC/openSUSE:Factory/cinnamon/cinnamon-settings-4.2.3-tinycss2.patch 2019-08-07 14:01:02.720853109 +0200 +++ /work/SRC/openSUSE:Factory/.cinnamon.new.3160/cinnamon-settings-4.4.8-tinycss2.patch 2020-03-17 13:11:17.833852036 +0100 @@ -1,7 +1,30 @@ -Index: cinnamon-4.2.3/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py -=================================================================== ---- cinnamon-4.2.3.orig/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py -+++ cinnamon-4.2.3/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py +From 009317e7c324a39f9ca97d731af08645359aa5bc Mon Sep 17 00:00:00 2001 +From: marguerite <i...@marguerite.su> +Date: Tue, 17 Mar 2020 10:53:26 +0800 +Subject: [PATCH] port tinycss to tinycss2 + +--- + debian/control | 2 +- + .../bin/CinnamonGtkSettings.py | 144 +++++++++++++----- + 2 files changed, 103 insertions(+), 43 deletions(-) + +diff --git a/debian/control b/debian/control +index 638885ff94..454fcf1958 100644 +--- a/debian/control ++++ b/debian/control +@@ -96,7 +96,7 @@ Depends: + python3-pil, + python3-pyinotify, + python3-setproctitle, +- python3-tinycss, ++ python3-tinycss2, + python3-tz, + streamer, + wget, +diff --git a/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py b/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py +index 5b2a66418c..555cad6841 100644 +--- a/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py ++++ b/files/usr/share/cinnamon/cinnamon-settings/bin/CinnamonGtkSettings.py @@ -3,8 +3,7 @@ import os.path import signal @@ -12,29 +35,45 @@ import gi gi.require_version("Gtk", "3.0") -@@ -87,13 +86,37 @@ class GtkCssEditor: - self._path = os.path.join(GLib.get_user_config_dir(), +@@ -91,11 +90,10 @@ def __init__(self, selector): "gtk-3.0", "gtk.css") -- + - self.parser = tinycss.make_parser() + self.selector = selector + + self.rule_separator = "/***** %s - cinnamon-settings-generated - do not edit *****/" % self.selector +- self.my_ruleset = None + rules = [] - try: -- self.stylesheet = self.parser.parse_stylesheet_file(self._path) -+ stylesheet = tinycss2.parse_stylesheet_bytes(open(self._path, 'rb').read()) + file = Gio.File.new_for_path(self._path) + +@@ -103,11 +101,16 @@ def __init__(self, selector): + success, content_bytes, tag = file.load_contents(None) + + self._contents = content_bytes.decode() +- self.stylesheet = self.parser.parse_stylesheet(self._contents) ++ stylesheet = tinycss2.parse_stylesheet(self._contents) + for rs in stylesheet[0]: -+ if type(rs) == tinycss2.ast.ParseError: ++ if isinstance(rs, tinycss2.ast.ParseError): + continue + rules.append(rs) + self.stylesheet = rules - except FileNotFoundError: -- self.stylesheet = tinycss.css21.Stylesheet(rules=[], errors=[], encoding="utf-8") -+ self.stylesheet = rules -+ + except GLib.Error as e: + if e.code == Gio.IOErrorEnum.NOT_FOUND: + self._contents = "" +- self.stylesheet = tinycss.css21.Stylesheet(rules=[], errors=[], encoding="utf-8") ++ self.stylesheet = rules + else: + raise PermissionError("Could not load ~/.config/gtk-3.0/gtk.css file, check permissions") + +@@ -142,30 +145,56 @@ def sanitize_contents(self): + + self._contents = "\n".join(out_lines) + + def _serialize_selector(self, rule): + at_css = "" -+ if type(rule) == tinycss2.ast.AtRule: ++ if isinstance(rule, tinycss2.ast.AtRule): + at_css += "@" + rule.at_keyword + at_css += self._serialize_prelude(rule.prelude) + return at_css @@ -42,28 +81,31 @@ + def _serialize_prelude(self, prelude): + at_css = "" + for cv in prelude: -+ if type(cv) == tinycss2.ast.WhitespaceToken: ++ if isinstance(cv, tinycss2.ast.WhitespaceToken): + at_css += " " -+ elif type(cv) == tinycss2.ast.HashToken: ++ elif isinstance(cv, tinycss2.ast.HashToken): + at_css += "#" + cv.value -+ elif type(cv) == tinycss2.ast.FunctionBlock: ++ elif isinstance(cv, tinycss2.ast.FunctionBlock): + next + else: + at_css += cv.value + return at_css.strip() - ++ def get_ruleset(self, selector_css): """ -@@ -101,21 +124,30 @@ class GtkCssEditor: + Gets the current ruleset for selector_css, If it isn't currently defined, returns an empty one. """ - for rs in self.stylesheet.rules: -- if rs.selector.as_css() == selector_css: -- return rs +- try: +- if rs.selector.as_css() == selector_css: +- return rs +- except AttributeError: +- continue + idx = 0 + for rs in self.stylesheet: -+ if type(rs) == tinycss2.ast.AtRule or type(rs) == tinycss2.ast.QualifiedRule: ++ if isinstance(rs, (tinycss2.ast.AtRule, tinycss2.ast.QualifiedRule)): + if self._serialize_selector(rs) == selector_css: + return rs, idx + idx += 1 @@ -88,13 +130,13 @@ - return declaration.value[0].value + decl_value = None + for component_value in declaration.value: -+ if type(component_value) == tinycss2.ast.DimensionToken: ++ if isinstance(component_value, tinycss2.ast.DimensionToken): + decl_value = component_value.value + return decl_value return None -@@ -124,41 +156,67 @@ class GtkCssEditor: +@@ -174,32 +203,68 @@ def set_declaration(self, selector, decl_name, value_as_str): # get modified, they become invalid (or I'm doing something wrong) self.remove_declaration(selector, decl_name) @@ -104,17 +146,23 @@ - - # Make a new declaration, add it to the ruleset - new_decl = tinycss.css21.Declaration(decl_name, value_token, None, None, None) +- +- rs.declarations.append(new_decl) +- +- self.my_ruleset = rs + rs, idx = self.get_ruleset(selector) + # rs.content[0].value: the value of the WhitespaceToken is the actual indent + prefix = "\n\t" -+ if len(rs.content) > 0: ++ if rs.content: + prefix = rs.content[0].value + -+ component_values = tinycss2.parse_component_value_list(prefix + decl_name + ": " + value_as_str + ";") ++ component_values = tinycss2.parse_component_value_list(prefix + decl_name + ++ ": " + value_as_str + ";") + for component_value in component_values: + self.stylesheet[idx].content.append(component_value) + -+ def _remove_declaration_from_content(self, declaration, content): ++ @staticmethod ++ def _remove_declaration_from_content(declaration, content): + idx = 0 + ident_idx = 0 + found_ident = False @@ -122,25 +170,29 @@ + new_content = [] + for component_value in content: + idx += 1 -+ if len(content) != idx and type(content[idx]) == tinycss2.ast.IdentToken and content[idx].value == declaration.name and type(component_value) == tinycss2.ast.WhitespaceToken: ++ if len(content) != idx and isinstance(content[idx], tinycss2.ast.IdentToken) and \ ++ content[idx].value == declaration.name and \ ++ isinstance(component_value, tinycss2.ast.WhitespaceToken): + continue -+ if type(component_value) == tinycss2.ast.IdentToken and component_value.value == declaration.name: ++ if isinstance(component_value, tinycss2.ast.IdentToken) and \ ++ component_value.value == declaration.name: + found_ident = True + continue + if found_ident: -+ if type(component_value) == tinycss2.ast.LiteralToken: -+ if ident_idx == 0 or done == True: ++ if isinstance(component_value, tinycss2.ast.LiteralToken): ++ if ident_idx == 0 or done: + done = False + continue -+ if len(declaration.value) - 1 == ident_idx and component_value == declaration.value[ident_idx]: ++ if len(declaration.value) - 1 == ident_idx and \ ++ component_value == declaration.value[ident_idx]: + done = True + continue -+ if component_value == declaration.value[ident_idx] and content[idx] == declaration.value[ident_idx + 1]: ++ if component_value == declaration.value[ident_idx] and \ ++ content[idx] == declaration.value[ident_idx + 1]: + ident_idx += 1 + continue + new_content.append(component_value) - -- rs.declarations.append(new_decl) ++ + return new_content def remove_declaration(self, selector, decl_name): @@ -150,9 +202,10 @@ if not rs: return -- for declaration in rs.declarations: +- self.my_ruleset = None + declarations = tinycss2.parse_declaration_list(rs.content, True, True) -+ + +- for declaration in rs.declarations: + for declaration in declarations: if decl_name == declaration.name: - rs.declarations.remove(declaration) @@ -160,7 +213,7 @@ - if len(rs.declarations) == 0: - self.stylesheet.rules.remove(rs) -+ if len(new_content) == 0: ++ if not new_content: + self.stylesheet.remove(rs) + break @@ -168,18 +221,25 @@ break def save_stylesheet(self): - out = "" +@@ -213,18 +278,13 @@ def save_stylesheet(self): + + out += line + "\n" + +- if self.my_ruleset: ++ if self.stylesheet: + if line != "": + out += "\n" + + out += self.rule_separator + "\n" - -- for rs in self.stylesheet.rules: -- out += rs.selector.as_css() + " {\n" +- out += self.my_ruleset.selector.as_css() + " {\n" - -- for decl in rs.declarations: +- for decl in self.my_ruleset.declarations: - out += " " + decl.name + ": " + decl.value.as_css() + ";\n" - - out += "}\n" -- -+ for rs in self.stylesheet: -+ out += rs.serialize() - with open(self._path, "w+") as f: - f.write(out) ++ for rs in self.stylesheet: ++ out += rs.serialize() + + self._contents = out ++++++ cinnamon-settings-native.patch ++++++ --- /var/tmp/diff_new_pack.mIKujw/_old 2020-03-17 13:11:18.917852868 +0100 +++ /var/tmp/diff_new_pack.mIKujw/_new 2020-03-17 13:11:18.921852871 +0100 @@ -1,10 +1,12 @@ ---- a/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py -+++ b/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py -@@ -87,6 +87,7 @@ STANDALONE_MODULES = [ +Index: cinnamon-4.4.8/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py +=================================================================== +--- cinnamon-4.4.8.orig/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py ++++ cinnamon-4.4.8/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py +@@ -88,6 +88,7 @@ STANDALONE_MODULES = [ [_("Software Sources"), "pkexec mintsources", "cs-sources", "admin", _("ppa, repository, package, source, download")], [_("Package Management"), "dnfdragora", "cs-sources", "admin", _("update, install, repository, package, source, download")], [_("Package Management"), "yumex-dnf", "cs-sources", "admin", _("update, install, repository, package, source, download")], -+ [_("YaST"), "xdg-su -c /sbin/yast2", "yast", "admin", _("system, admin, yast2, settings")], ++ [_("YaST"), "xdg-su -c /sbin/yast2", "cs-sources", "admin", _("system, manager, yast")], [_("Users and Groups"), "cinnamon-settings-users", "cs-user-accounts", "admin", _("user, users, account, accounts, group, groups, password")], [_("Bluetooth"), "blueberry", "cs-bluetooth", "hardware", _("bluetooth, dongle, transfer, mobile")], - [_("Manage Services and Units"), "systemd-manager-pkexec", "cs-sources", "admin", _("systemd, units, services, systemctl, init")] + [_("Manage Services and Units"), "systemd-manager-pkexec", "cs-sources", "admin", _("systemd, units, services, systemctl, init")],