Overview

Request 2904 (accepted)

Fix TypeError in logger


pykolab.spec Changed
x
 
1
@@ -34,7 +34,7 @@
2
 Summary:            Kolab Groupware Solution
3
 Name:               pykolab
4
 Version:            0.8.20
5
-Release:            1%{?dist}
6
+Release:            2%{?dist}
7
 License:            GPLv3+
8
 Group:              Applications/System
9
 URL:                http://kolab.org/
10
@@ -42,6 +42,8 @@
11
 Source0:            pykolab-%{version}.tar.gz
12
 Source1:            pykolab.logrotate
13
 
14
+Patch0:             0001-Python-3-Use-0o-prefix-for-octal-numbers.patch
15
+
16
 BuildRoot:          %{_tmppath}/%{name}-%{version}-%{release}-root
17
 BuildArch:          noarch
18
 
19
@@ -231,6 +233,7 @@
20
 
21
 %prep
22
 %setup -q
23
+%patch0 -p1
24
 
25
 %build
26
 autoreconf -v || automake --add-missing && autoreconf -v
27
@@ -567,6 +570,9 @@
28
 %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace
29
 
30
 %changelog
31
+* Thu Feb  3 2022 Christoph Erhardt <kolab@sicherha.de> - 0.8.20-2
32
+- Fix TypeError in logger
33
+
34
 * Thu Feb  3 2022 Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> - 0.8.20-1
35
 - Release of version 0.8.20
36
 
37
0001-Python-3-Use-0o-prefix-for-octal-numbers.patch Added
123
 
1
@@ -0,0 +1,121 @@
2
+From 7750671314e6da19f65aaa95bb1095963fdc175a Mon Sep 17 00:00:00 2001
3
+Message-Id: <7750671314e6da19f65aaa95bb1095963fdc175a.1643911242.git.kolab@sicherha.de>
4
+From: Christoph Erhardt <kolab@sicherha.de>
5
+Date: Fri, 4 Jun 2021 16:16:55 +0200
6
+Subject: [PATCH] [Python 3] Use 0o prefix for octal numbers
7
+
8
+Summary:
9
+The new 0o prefix was introduced in Python 2.6; the old 0 prefix was
10
+deprecated in Python 3.0.
11
+
12
+Reviewers: machniak, mollekopf
13
+
14
+Reviewed By: mollekopf
15
+
16
+Subscribers: mollekopf
17
+
18
+Differential Revision: https://git.kolab.org/D3226
19
+---
20
+ pykolab/auth/ldap/syncrepl.py    | 2 +-
21
+ pykolab/logger.py                | 2 +-
22
+ pykolab/setup/setup_mta.py       | 2 +-
23
+ pykolab/setup/setup_mysql.py     | 2 +-
24
+ pykolab/setup/setup_roundcube.py | 2 +-
25
+ pykolab/setup/setup_syncroton.py | 2 +-
26
+ saslauthd/__init__.py            | 2 +-
27
+ 7 files changed, 7 insertions(+), 7 deletions(-)
28
+
29
+diff --git a/pykolab/auth/ldap/syncrepl.py b/pykolab/auth/ldap/syncrepl.py
30
+index 03ab5ae..72f5f37 100644
31
+--- a/pykolab/auth/ldap/syncrepl.py
32
++++ b/pykolab/auth/ldap/syncrepl.py
33
+@@ -22,7 +22,7 @@ class DNSync(ldap.ldapobject.LDAPObject,ldap.syncrepl.SyncreplConsumer):
34
+             del kwargs['callback']
35
+ 
36
+         ldap.ldapobject.LDAPObject.__init__(self, *args, **kwargs)
37
+-        self.__db = anydbm.open(filename, 'c', 0640)
38
++        self.__db = anydbm.open(filename, 'c', 0o640)
39
+         self.__presentUUIDs = {}
40
+ 
41
+     def syncrepl_set_cookie(self,cookie):
42
+diff --git a/pykolab/logger.py b/pykolab/logger.py
43
+index c2237cb..8e9c9b6 100644
44
+--- a/pykolab/logger.py
45
++++ b/pykolab/logger.py
46
+@@ -213,7 +213,7 @@ class Logger(logging.Logger):
47
+                                 group_gid
48
+                             )
49
+ 
50
+-                            os.chmod(self.logfile, '0660')
51
++                            os.chmod(self.logfile, 0o660)
52
+ 
53
+                     except Exception as errmsg:
54
+                         self.error(
55
+diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
56
+index c3c4154..903acd7 100644
57
+--- a/pykolab/setup/setup_mta.py
58
++++ b/pykolab/setup/setup_mta.py
59
+@@ -243,7 +243,7 @@ result_format = "shared+%%s"
60
+                 )
61
+ 
62
+     if not os.path.isdir('/etc/postfix/ldap'):
63
+-        os.mkdir('/etc/postfix/ldap/', 0770)
64
++        os.mkdir('/etc/postfix/ldap/', 0o770)
65
+ 
66
+     for filename in files.keys():
67
+         fp = open(filename, 'w')
68
+diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
69
+index 08b7b7c..73c2245 100644
70
+--- a/pykolab/setup/setup_mysql.py
71
++++ b/pykolab/setup/setup_mysql.py
72
+@@ -256,7 +256,7 @@ host=%s
73
+ 
74
+ 
75
+     fp = open('/tmp/kolab-setup-my.cnf', 'w')
76
+-    os.chmod('/tmp/kolab-setup-my.cnf', 0600)
77
++    os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
78
+     fp.write(data)
79
+     fp.close()
80
+ 
81
+diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
82
+index 47ac8fc..869533f 100644
83
+--- a/pykolab/setup/setup_roundcube.py
84
++++ b/pykolab/setup/setup_roundcube.py
85
+@@ -259,7 +259,7 @@ host=%s
86
+ """ % (mysql_root_password, conf.mysqlhost)
87
+ 
88
+         fp = open('/tmp/kolab-setup-my.cnf', 'w')
89
+-        os.chmod('/tmp/kolab-setup-my.cnf', 0600)
90
++        os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
91
+         fp.write(data)
92
+         fp.close()
93
+ 
94
+diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
95
+index c7c03ce..1cccd0e 100644
96
+--- a/pykolab/setup/setup_syncroton.py
97
++++ b/pykolab/setup/setup_syncroton.py
98
+@@ -109,7 +109,7 @@ host=%s
99
+ """ % (mysql_root_password, conf.mysqlhost)
100
+ 
101
+         fp = open('/tmp/kolab-setup-my.cnf', 'w')
102
+-        os.chmod('/tmp/kolab-setup-my.cnf', 0600)
103
++        os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
104
+         fp.write(data)
105
+         fp.close()
106
+ 
107
+diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
108
+index 30e8189..e11296b 100644
109
+--- a/saslauthd/__init__.py
110
++++ b/saslauthd/__init__.py
111
+@@ -204,7 +204,7 @@ class SASLAuthDaemon(object):
112
+             pass
113
+ 
114
+         s.bind(conf.socketfile)
115
+-        os.chmod(conf.socketfile, 0777)
116
++        os.chmod(conf.socketfile, 0o777)
117
+ 
118
+         s.listen(5)
119
+ 
120
+-- 
121
+2.34.1
122
+
123
debian.changelog Changed
11
 
1
@@ -1,3 +1,9 @@
2
+pykolab (0.8.20-0~kolab2) unstable; urgency=low
3
+
4
+  * Fix TypeError in logger
5
+
6
+ -- Christoph Erhardt <kolab@sicherha.de>  Thu, 03 Feb 2022 19:07:22 +0100
7
+
8
 pykolab (0.8.20-0~kolab1) unstable; urgency=low
9
 
10
   * Release of version 0.8.20
11
debian.control Changed
9
 
1
@@ -9,7 +9,6 @@
2
                 gawk,
3
                 gettext,
4
                 intltool,
5
-                libcroco3,
6
                 libexpat1,
7
                 libglib2.0-0,
8
                 libglib2.0-dev,
9
debian.series Changed
4
 
1
@@ -1,1 +1,2 @@
2
 cyrus-imapd.conf-cert-paths.patch -p1
3
+0001-Python-3-Use-0o-prefix-for-octal-numbers.patch -p1
4
pykolab.dsc Changed
18
 
1
@@ -2,7 +2,7 @@
2
 Source: pykolab
3
 Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace
4
 Architecture: all
5
-Version: 0.8.20-0~kolab1
6
+Version: 0.8.20-0~kolab2
7
 Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
8
 Uploaders: Paul Klos <kolab@klos2day.nl>
9
 Homepage: http://www.kolab.org
10
@@ -14,7 +14,6 @@
11
                 gawk,
12
                 gettext,
13
                 intltool,
14
-                libcroco3,
15
                 libexpat1,
16
                 libglib2.0-0,
17
                 libglib2.0-dev,
18
Refresh
Refresh
Request History
Christoph Erhardt's avatar

sicherha created request about 3 years ago

Fix TypeError in logger


Christoph Erhardt's avatar

sicherha accepted request about 3 years ago