#4 update to 0.27
Closed 2 years ago by spot. Opened 3 years ago by atim.
rpms/ atim/pyxdg rawhide  into  rawhide

file modified
+1
@@ -1,2 +1,3 @@ 

  /pyxdg-0.25.tar.gz

  /pyxdg-0.26.tar.gz

+ /pyxdg-0.27.tar.gz

@@ -1,48 +0,0 @@ 

- diff -up pyxdg-0.25/xdg/BaseDirectory.py.CVE-2014-1624 pyxdg-0.25/xdg/BaseDirectory.py

- --- pyxdg-0.25/xdg/BaseDirectory.py.CVE-2014-1624	2014-12-04 11:49:53.681654931 -0500

- +++ pyxdg-0.25/xdg/BaseDirectory.py	2014-12-04 11:52:45.831522703 -0500

- @@ -25,7 +25,7 @@ Typical usage:

-  Note: see the rox.Options module for a higher-level API for managing options.

-  """

-  

- -import os

- +import os, stat

-  

-  _home = os.path.expanduser('~')

-  xdg_data_home = os.environ.get('XDG_DATA_HOME') or \

- @@ -131,15 +131,29 @@ def get_runtime_dir(strict=True):

-          

-          import getpass

-          fallback = '/tmp/pyxdg-runtime-dir-fallback-' + getpass.getuser()

- +        create = False

-          try:

- -            os.mkdir(fallback, 0o700)

- +            # This must be a real directory, not a symlink, so attackers can't

- +            # point it elsewhere. So we use lstat to check it.

- +            st = os.lstat(fallback)

-          except OSError as e:

-              import errno

- -            if e.errno == errno.EEXIST:

- -                # Already exists - set 700 permissions again.

- -                import stat

- -                os.chmod(fallback, stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR)

- -            else: # pragma: no cover

- +            if e.errno == errno.ENOENT:

- +                create = True

- +            else:

-                  raise

- +        else:

- +            # The fallback must be a directory

- +            if not stat.S_ISDIR(st.st_mode):

- +                os.unlink(fallback)

- +                create = True

- +            # Must be owned by the user and not accessible by anyone else

- +            elif (st.st_uid != os.getuid()) \

- +              or (st.st_mode & (stat.S_IRWXG | stat.S_IRWXO)):

- +                os.rmdir(fallback)

- +                create = True

- +

- +        if create:

- +            os.mkdir(fallback, 0o700)

-          

-          return fallback

@@ -1,13 +0,0 @@ 

- diff -up pyxdg-0.25/xdg/Mime.py.BAD pyxdg-0.25/xdg/Mime.py

- --- pyxdg-0.25/xdg/Mime.py.BAD	2013-03-05 10:19:10.750845664 -0500

- +++ pyxdg-0.25/xdg/Mime.py	2013-03-05 10:19:14.771845520 -0500

- @@ -360,7 +360,8 @@ def _cache_database():

-              if pattern.startswith('*.'):

-                  rest = pattern[2:]

-                  if not ('*' in rest or '[' in rest or '?' in rest):

- -                    exts[rest] = mtype

- +                    if rest not in exts:

- +                        exts[rest] = mtype

-                      continue

-              if '*' in pattern or '[' in pattern or '?' in pattern:

-                  globs.append((pattern, mtype))

@@ -1,18 +0,0 @@ 

- diff -up pyxdg-0.26/xdg/Menu.py.fixOnlyShowIn pyxdg-0.26/xdg/Menu.py

- --- pyxdg-0.26/xdg/Menu.py.fixOnlyShowIn	2018-11-01 11:34:26.222123436 -0400

- +++ pyxdg-0.26/xdg/Menu.py	2018-11-01 11:36:39.459203908 -0400

- @@ -298,11 +298,11 @@ class Menu:

-                      entry.Show = NO_EXEC

-                      self.Visible -= 1

-                  elif xdg.Config.windowmanager:

- -                    if (entry.DesktopEntry.OnlyShowIn != [] and (

- -                            xdg.Config.windowmanager not in entry.DesktopEntry.OnlyShowIn

- +                    if (entry.DesktopEntry.getOnlyShowIn() != [] and (

- +                            xdg.Config.windowmanager not in entry.DesktopEntry.getOnlyShowIn()

-                          )

-                      ) or (

- -                        xdg.Config.windowmanager in entry.DesktopEntry.NotShowIn

- +                        xdg.Config.windowmanager in entry.DesktopEntry.getNotShowIn()

-                      ):

-                          entry.Show = NOT_SHOW_IN

-                          self.Visible -= 1

@@ -1,14 +0,0 @@ 

- diff -up pyxdg-0.26/xdg/Menu.py.getTypefix pyxdg-0.26/xdg/Menu.py

- --- pyxdg-0.26/xdg/Menu.py.getTypefix	2018-11-01 11:37:50.561645188 -0400

- +++ pyxdg-0.26/xdg/Menu.py	2018-11-30 11:33:10.728729275 -0500

- @@ -994,8 +994,8 @@ class XMLMenuBuilder(object):

-                      menuentry = MenuEntry(directory, dir)

-                      if not menu.Directory:

-                          menu.Directory = menuentry

- -                    elif menuentry.Type == MenuEntry.TYPE_SYSTEM:

- -                        if menu.Directory.Type == MenuEntry.TYPE_USER:

- +                    elif menuentry.getType() == MenuEntry.TYPE_SYSTEM:

- +                        if menu.Directory.getType() == MenuEntry.TYPE_USER:

-                              menu.Directory.Original = menuentry

-              if menu.Directory:

-                  break

file modified
+7 -9
@@ -1,15 +1,12 @@ 

  %bcond_without tests

  

  Name:           pyxdg

- Version:        0.26

- Release:        12%{?dist}

+ Version:        0.27

+ Release:        1%{?dist}

  Summary:        Python library to access freedesktop.org standards

  License:        LGPLv2

  URL:            http://freedesktop.org/Software/pyxdg

- Source0:        https://pypi.python.org/packages/source/r/PyXDG/%{name}-%{version}.tar.gz

- # https://gitlab.freedesktop.org/xdg/pyxdg/merge_requests/2

- Patch0:         pyxdg-0.26-fix-OnlyShowIn.patch

- Patch1:         pyxdg-0.26-getType-fix.patch

+ Source0:        %{pypi_source}

  BuildArch:      noarch

  # These are needed for the nose tests.

  BuildRequires:	hicolor-icon-theme
@@ -33,8 +30,6 @@ 

  

  %prep

  %setup -q

- %patch0 -p1 -b .fixOnlyShowIn

- %patch1 -p1 -b .getType

  

  %build

  %py3_build
@@ -52,10 +47,13 @@ 

  %files -n python%{python3_pkgversion}-pyxdg

  %license COPYING

  %doc AUTHORS ChangeLog README TODO

- %{python3_sitelib}/xdg

+ %{python3_sitelib}/xdg/

  %{python3_sitelib}/pyxdg-*.egg-info

  

  %changelog

+ * Sat Apr 10 2021 Artem Polishchuk <ego.cordatus@gmail.com> - 0.27-1

+ - update to 0.27

+ 

  * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-12

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (pyxdg-0.26.tar.gz) = f5306e6e15af07df2599017500fc8ad83e722e5d5c6e4fda014aab1d77df92a3c3199a5be7a889faaecab72861e9910be9d80142d29856eb7a11f6ab9a923bd2

+ SHA512 (pyxdg-0.27.tar.gz) = acb24153a4e3e0d8333f1c965c024b15d44f623497b561fc0e9be60d4411441af1dc61f11dcfb22587a510451237a341440bf7ff77a6ab6446dceb83b3c380e2

Need for new GWE update. Please update and build for Rawhide and f34.

I did this manually because I wanted to do it a bit differently, but thank you for the nudge.

Pull-Request has been closed by spot

2 years ago