Bump version 5.1.0
- Remove patchs: - prewikka-fix_python3.patch - Add patchs: - prewikka-fix_shebang.patch - Remove python2 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/prewikka?expand=0&rev=16
This commit is contained in:
parent
05a8192b1c
commit
b580b5cb62
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9346b9c3d0ea0cfaba4d1685b6bfa28075e26d558b0eaa20c4d8647994f657e5
|
||||
size 1365985
|
3
prewikka-5.1.0.tar.gz
Normal file
3
prewikka-5.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b7587e4a949df92855aecfa0b9a26771aaf0c3a32c0f953f643f778c83a6e80
|
||||
size 1661849
|
@ -1,116 +0,0 @@
|
||||
From: Thomas Andrejak <thomas.andrejak@gmail.com>
|
||||
Date: 2017-10-04 23:25:00 +0100
|
||||
References: no
|
||||
Upstream: no
|
||||
Subject: Python 3 compatibility
|
||||
|
||||
--- prewikka/dataprovider/__init__.py 2017-07-18 13:45:57.000000000 +0200
|
||||
+++ prewikka/dataprovider/__init__.py 2017-10-07 17:10:09.140721871 +0200
|
||||
@@ -22,12 +22,15 @@
|
||||
import copy
|
||||
import time
|
||||
import types
|
||||
+import sys
|
||||
from datetime import datetime
|
||||
|
||||
from prewikka import error, hookmanager, pluginmanager
|
||||
from prewikka.utils import AttrObj, CachingIterator, compat, json
|
||||
from prewikka.utils.timeutil import parser
|
||||
|
||||
+if sys.version_info >= (3, 0):
|
||||
+ long = int
|
||||
|
||||
def _str_to_datetime(date):
|
||||
if date.isdigit():
|
||||
--- prewikka/session/session.py 2017-07-18 13:45:57.000000000 +0200
|
||||
+++ prewikka/session/session.py 2017-10-07 17:13:02.224865916 +0200
|
||||
@@ -23,6 +23,7 @@
|
||||
import os
|
||||
import struct
|
||||
import time
|
||||
+import sys
|
||||
|
||||
from prewikka import database, hookmanager, log, pluginmanager, usergroup, utils
|
||||
from prewikka.error import PrewikkaUserError, RedirectionError
|
||||
@@ -137,7 +138,11 @@
|
||||
t = time.time()
|
||||
|
||||
self._db.delete_expired_sessions(t - self._expiration)
|
||||
- sessionid = text_type(binascii.hexlify(os.urandom(16) + struct.pack(b">d", t)))
|
||||
+ sessionid = binascii.hexlify(os.urandom(16) + struct.pack(b">d", t))
|
||||
+ if sys.version_info >= (3, 0):
|
||||
+ sessionid = sessionid.decode('ascii')
|
||||
+
|
||||
+ sessionid = text_type(sessionid)
|
||||
|
||||
self._db.create_session(sessionid, user, int(t))
|
||||
self.__set_session(request, sessionid)
|
||||
--- prewikka/utils/json.py 2017-07-18 13:45:57.000000000 +0200
|
||||
+++ prewikka/utils/json.py 2017-10-07 17:14:59.718248149 +0200
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
import datetime
|
||||
import json
|
||||
+from six import with_metaclass
|
||||
|
||||
from prewikka.utils import html
|
||||
|
||||
@@ -36,8 +37,7 @@
|
||||
return nclass
|
||||
|
||||
|
||||
-class JSONObject(object):
|
||||
- __metaclass__ = _JSONMetaClass
|
||||
+class JSONObject(with_metaclass(_JSONMetaClass, object)):
|
||||
|
||||
def __jsonobj__(self):
|
||||
return { "__prewikka_class__": (self.__class__.__name__, self.__json__()) }
|
||||
--- prewikka/utils/url.py 2017-07-18 13:45:57.000000000 +0200
|
||||
+++ prewikka/utils/url.py 2017-10-07 17:16:41.927970738 +0200
|
||||
@@ -56,7 +56,11 @@
|
||||
else:
|
||||
authority = tpl[0].encode('idna') + ":%s" % tpl[1]
|
||||
|
||||
- return urlunsplit((scheme.encode(encoding), authority,
|
||||
+ sc = scheme.encode(encoding)
|
||||
+ if sys.version_info >= (3, 0):
|
||||
+ sc = quote(sc, safe)
|
||||
+
|
||||
+ return urlunsplit((sc, authority,
|
||||
quote(path.encode(encoding), safe),
|
||||
quote(query.encode(encoding), safe),
|
||||
quote(frag.encode(encoding), safe)))
|
||||
--- prewikka/web/request.py 2017-07-18 13:45:57.000000000 +0200
|
||||
+++ prewikka/web/request.py 2017-10-07 17:21:21.645737400 +0200
|
||||
@@ -40,7 +40,11 @@
|
||||
self._buffersize = buffersize
|
||||
|
||||
def flush(self):
|
||||
- self._wcb(''.join(self._dlist))
|
||||
+ if sys.version_info >= (3, 0):
|
||||
+ self._wcb(''.join((x.decode('utf-8') for x in self._dlist)).encode('utf-8'))
|
||||
+ else:
|
||||
+ self._wcb(''.join(self._dlist))
|
||||
+
|
||||
self._dlist = []
|
||||
self._len = 0
|
||||
|
||||
@@ -97,10 +101,16 @@
|
||||
# Join is used in place of concatenation / formatting, because we
|
||||
# prefer performance over readability in this place
|
||||
if event:
|
||||
- self._buffer.write("".join(["event: ", event.encode("utf8"), "\n"]))
|
||||
+ if sys.version_info >= (3, 0):
|
||||
+ self._buffer.write("".join(["event: ", text_type(event), "\n"]).encode("utf8"))
|
||||
+ else:
|
||||
+ self._buffer.write("".join(["event: ", event.encode('utf-8'), "\n"]))
|
||||
|
||||
if data:
|
||||
- self._buffer.write("".join(["data: ", data.encode("utf8"), "\n\n"]))
|
||||
+ if sys.version_info >= (3, 0):
|
||||
+ self._buffer.write("".join(["data: ", text_type(data), "\n\n"]).encode("utf8"))
|
||||
+ else:
|
||||
+ self._buffer.write("".join(["data: ", data.encode('utf-8'), "\n\n"]))
|
||||
|
||||
if sync:
|
||||
self._buffer.flush()
|
14
prewikka-fix_shebang.patch
Normal file
14
prewikka-fix_shebang.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- ./prewikka/compat/jquery_unparam.py 2019-09-16 00:13:48.000000000 +0200
|
||||
+++ ./prewikka/compat/jquery_unparam.py 2019-10-27 00:21:24.497389236 +0200
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import functools
|
||||
--- ./prewikka/compat/gevent.py 2019-09-16 00:13:40.000000000 +0200
|
||||
+++ ./prewikka/compat/gevent.py 2019-10-27 00:21:04.161389236 +0200
|
||||
@@ -1,4 +1,3 @@
|
||||
-#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Re-add sslwrap to Python 2.7.5
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 07:00:00 UTC 2019 - thomas.andrejak@gmail.com
|
||||
|
||||
Bump version 5.1.0
|
||||
|
||||
- Remove patchs:
|
||||
- prewikka-fix_python3.patch
|
||||
|
||||
- Add patchs:
|
||||
- prewikka-fix_shebang.patch
|
||||
|
||||
- Remove python2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 10 07:00:00 UTC 2018 - thomas.andrejak@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package prewikka
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 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
|
||||
@ -12,39 +12,35 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
|
||||
Name: prewikka
|
||||
Version: 4.0.0
|
||||
Version: 5.1.0
|
||||
Release: 0
|
||||
Summary: Graphical front-end analysis console for the Prelude Framework
|
||||
License: GPL-2.0+
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Networking/Web/Frontends
|
||||
Url: https://www.prelude-siem.org
|
||||
Source0: https://www.prelude-siem.org/pkg/src/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: prewikka-fix_python3.patch
|
||||
BuildRequires: %{python_module Babel}
|
||||
BuildRequires: %{python_module lesscpy}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
Patch0: prewikka-fix_shebang.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gettext
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Babel
|
||||
BuildRequires: python3-devel
|
||||
Requires: prewikka-core >= %{version}
|
||||
BuildRequires: python3-lesscpy
|
||||
BuildRequires: python3-rpm-macros
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: prewikka-lang >= %{version}
|
||||
Requires: python-Babel
|
||||
Requires: python-Mako
|
||||
Requires: python-PyYAML
|
||||
Requires: python-Werkzeug
|
||||
Requires: python-libprelude
|
||||
Requires: python-libpreludedb
|
||||
Requires: python-python-dateutil
|
||||
Requires: python-pytz
|
||||
Requires: python3-Babel
|
||||
Requires: python3-Mako
|
||||
Requires: python3-PyYAML
|
||||
Requires: python3-Werkzeug
|
||||
Requires: python3-libprelude
|
||||
Requires: python3-libpreludedb
|
||||
Requires: python3-python-dateutil
|
||||
Requires: python3-pytz
|
||||
Requires: xorg-x11-fonts
|
||||
BuildArch: noarch
|
||||
|
||||
@ -56,13 +52,6 @@ Universal SIM. Prewikka provides alert aggregation and sensor and
|
||||
hearbeat views, and has user management and configurable filters, as
|
||||
well as access to external tools such as whois and traceroute.
|
||||
|
||||
%package core
|
||||
Summary: Prewikka core files
|
||||
Group: Productivity/Networking/Web/Frontends
|
||||
|
||||
%description core
|
||||
Core files for prewikka.
|
||||
|
||||
%package lang
|
||||
Summary: Prewikka lang files
|
||||
Group: Productivity/Networking/Web/Frontends
|
||||
@ -77,42 +66,33 @@ Lang files for prewikka.
|
||||
%build
|
||||
|
||||
%install
|
||||
install -d -m 0755 %{buildroot}%{_sbindir}
|
||||
|
||||
%{python_expand $python setup.py install -O1 --force --root %{buildroot}
|
||||
mv %{buildroot}%{_bindir}/%{name}-httpd %{buildroot}%{_sbindir}/%{name}-httpd-%{$python_bin_suffix}
|
||||
%fdupes %{buildroot}%{$python_sitelib}/prewikka
|
||||
}
|
||||
|
||||
ln -s ./%{name}-httpd-%{python3_bin_suffix} %{buildroot}%{_sbindir}/%{name}-httpd
|
||||
python3 setup.py install -O1 --force --root %{buildroot}
|
||||
%fdupes %{buildroot}%{$python3_sitelib}/prewikka
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_datadir}/locale
|
||||
cp -r %{buildroot}%{python2_sitelib}/%{name}/locale/* %{buildroot}%{_datadir}/locale/
|
||||
rm -rf %{buildroot}%{python2_sitelib}/%{name}/locale
|
||||
cp -r %{buildroot}%{python3_sitelib}/%{name}/locale/* %{buildroot}%{_datadir}/locale/
|
||||
rm -rf %{buildroot}%{python3_sitelib}/%{name}/locale
|
||||
ln -s %{_datadir}/locale %{buildroot}%{python2_sitelib}/%{name}/locale
|
||||
ln -s %{_datadir}/locale %{buildroot}%{python3_sitelib}/%{name}/locale
|
||||
|
||||
rm %{buildroot}%{_sysconfdir}/%{name}/*-dist
|
||||
|
||||
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
|
||||
|
||||
find %{buildroot} -name __pycache__ -exec rm -rfv {} +
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%files -n %{name}-core
|
||||
%files -n python3-%{name}
|
||||
%defattr(-, root, root, -)
|
||||
%attr(0750, -,-) %dir %{_sysconfdir}/%{name}/
|
||||
%config(noreplace) %attr(0640, -,-) %{_sysconfdir}/%{name}/%{name}.conf
|
||||
%config(noreplace) %attr(0640, -,-) %{_sysconfdir}/%{name}/menu.yml
|
||||
%{_datadir}/%{name}
|
||||
%doc COPYING* AUTHORS README NEWS HACKING.README
|
||||
%{python3_sitelib}/prewikka/
|
||||
%{python3_sitelib}/prewikka*.egg-info
|
||||
%{_bindir}/prewikka-httpd
|
||||
%{_bindir}/prewikka-cli
|
||||
%{_bindir}/prewikka-crontab
|
||||
|
||||
%files -n %{name}-lang -f %{name}.lang
|
||||
|
||||
%files %python_files
|
||||
%{python_sitelib}/prewikka/
|
||||
%{python_sitelib}/prewikka*.egg-info
|
||||
%{_sbindir}/prewikka-httpd-%{python_bin_suffix}
|
||||
%python3_only %{_sbindir}/prewikka-httpd
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user