[packages/prewikka] - up to 5.1.1

baggins baggins at pld-linux.org
Mon Jun 1 10:56:16 CEST 2020


commit 5a0ca7279474d330b7f684c7fe14b4ebfd901511
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Jun 1 10:56:02 2020 +0200

    - up to 5.1.1

 locale.patch           | 46 +++++++++++++++++++++++++++++++++++++++++++
 prewikka-install.patch | 53 +++++++++++++++++++++++++++++++++++++-------------
 prewikka.spec          | 14 ++++++++-----
 3 files changed, 95 insertions(+), 18 deletions(-)
---
diff --git a/prewikka.spec b/prewikka.spec
index b500bac..448818b 100644
--- a/prewikka.spec
+++ b/prewikka.spec
@@ -2,27 +2,29 @@
 Summary:	Prelude IDS web application
 Summary(pl.UTF-8):	Aplikacja WWW dla Prelude IDS
 Name:		prewikka
-Version:	4.1.5
+Version:	5.1.1
 Release:	1
 License:	GPL v2+
 Group:		Applications/Networking
 #Source0Download: https://www.prelude-siem.org/projects/prelude/files
-Source0:	https://www.prelude-siem.org/attachments/download/837/%{name}-%{version}.tar.gz
-# Source0-md5:	f58d4c3069692cdd9eb3a82ceb997a2c
+Source0:	https://www.prelude-siem.org/attachments/download/1182/%{name}-%{version}.tar.gz
+# Source0-md5:	aa5f3621ec027211f8e4bb4474821562
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Patch0:		%{name}-localedir.patch
 Patch1:		%{name}-install.patch
+Patch2:		locale.patch
 URL:		https://www.prelude-siem.org/
 BuildRequires:	python >= 1:2.6
+BuildRequires:	python-lesscpy
 BuildRequires:	python-setuptools
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 Requires:	python-Mako
 Requires:	python-PyYAML
 Requires:	python-babel
-Requires:	python-libprelude >= 4.1.0
-Requires:	python-libpreludedb >= 4.1.0
+Requires:	python-libprelude >= 5.1.0
+Requires:	python-libpreludedb >= 5.1.0
 Requires:	python-modules >= 1:2.6
 Requires:	python-pytz
 Requires:	python-werkzeug
@@ -65,6 +67,7 @@ na porcie dostępnym dla użytkownika (>= 1024, domyślnie 8000).
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %py_build
@@ -127,6 +130,7 @@ fi
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING.* NEWS README
+%attr(755,root,root) %{_bindir}/prewikka-cli
 %attr(755,root,root) %{_bindir}/prewikka-crontab
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/prewikka.conf
diff --git a/locale.patch b/locale.patch
new file mode 100644
index 0000000..91b4612
--- /dev/null
+++ b/locale.patch
@@ -0,0 +1,46 @@
+--- prewikka-5.1.1/prewikka/locale/es/LC_MESSAGES/prewikka.po~	2019-10-27 00:24:42.000000000 +0200
++++ prewikka-5.1.1/prewikka/locale/es/LC_MESSAGES/prewikka.po	2020-06-01 10:39:54.068466316 +0200
+@@ -2134,7 +2134,7 @@
+ #: prewikka/views/messagesummary/messagesummary.py:830
+ #, fuzzy, python-format
+ msgid "Target file %s"
+-msgstr "Destino"
++msgstr "Destino %s"
+ 
+ #: prewikka/views/messagesummary/messagesummary.py:830
+ msgid "category"
+--- prewikka-5.1.1/prewikka/locale/pl/LC_MESSAGES/prewikka.po~	2019-10-27 00:24:42.000000000 +0200
++++ prewikka-5.1.1/prewikka/locale/pl/LC_MESSAGES/prewikka.po	2020-06-01 10:41:12.101925267 +0200
+@@ -1899,7 +1899,7 @@
+ #: prewikka/views/messagesummary/messagesummary.py:365
+ #, fuzzy, python-format
+ msgid "(agent local time: %s)"
+-msgstr "sondy"
++msgstr "(czas lokalny agenta %s)"
+ 
+ #: prewikka/views/messagesummary/messagesummary.py:372
+ #: prewikka/views/messagesummary/messagesummary.py:835
+--- prewikka-5.1.1/prewikka/locale/pt_BR/LC_MESSAGES/prewikka.po~	2019-10-27 00:24:42.000000000 +0200
++++ prewikka-5.1.1/prewikka/locale/pt_BR/LC_MESSAGES/prewikka.po	2020-06-01 10:41:41.815410744 +0200
+@@ -2140,7 +2140,7 @@
+ #: prewikka/views/messagesummary/messagesummary.py:830
+ #, fuzzy, python-format
+ msgid "Target file %s"
+-msgstr "Alvo"
++msgstr "Alvo %s"
+ 
+ #: prewikka/views/messagesummary/messagesummary.py:830
+ msgid "category"
+--- prewikka-5.1.1/prewikka/locale/ru/LC_MESSAGES/prewikka.po~	2019-10-27 00:24:42.000000000 +0200
++++ prewikka-5.1.1/prewikka/locale/ru/LC_MESSAGES/prewikka.po	2020-06-01 10:42:39.012350869 +0200
+@@ -163,8 +163,8 @@
+ "No database branch migration script found for module %(module)s, branch "
+ "transition %(current)s -> %(required)s"
+ msgstr ""
+-"Не найдет скрипт установки базы данных для модуля %(module)s, version "
+-"%(version)s"
++"Не найдет скрипт установки базы данных для модуля %(module)s, branch "
++"transition %(current)s -> %(required)s"
+ 
+ #: prewikka/database.py:424
+ #, python-format
diff --git a/prewikka-install.patch b/prewikka-install.patch
index 397ee5b..db0e5ba 100644
--- a/prewikka-install.patch
+++ b/prewikka-install.patch
@@ -1,20 +1,47 @@
---- prewikka-4.1.5/setup.py.orig	2017-12-06 01:34:12.000000000 +0100
-+++ prewikka-4.1.5/setup.py	2018-08-30 19:47:24.172882783 +0200
-@@ -58,7 +58,7 @@
+--- prewikka-5.1.1/setup.py.orig	2020-06-01 10:35:38.298198370 +0200
++++ prewikka-5.1.1/setup.py	2020-06-01 10:38:08.975032903 +0200
+@@ -39,7 +39,7 @@
+ LIBPRELUDEDB_REQUIRED_VERSION = "5.1.0"
+ 
+ 
+-def init_siteconfig(conf_prefix, data_prefix):
++def init_siteconfig(conf_prefix, data_prefix, build_lib):
+     """
+     Initialize configuration file (prewikka/siteconfig.py).
+ 
+@@ -54,7 +54,7 @@
+         ('libpreludedb_required_version', LIBPRELUDEDB_REQUIRED_VERSION),
+     )
+ 
+-    with open('prewikka/siteconfig.py', 'w') as config_file:
++    with open(os.path.join(build_lib, 'prewikka/siteconfig.py'), 'w') as config_file:
+         for option, value in configuration:
+             config_file.write("%s = '%s'\n" % (option, value))
+ 
+@@ -74,7 +74,7 @@
  class my_install(install):
      def finalize_options(self):
-         ### if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise
+         # if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise
 -        if self.prefix:
 +        if self.prefix and self.prefix != '/usr':
              self.conf_prefix = self.prefix + "/etc/prewikka"
              self.data_prefix = self.prefix + "/var/lib/prewikka"
          else:
-@@ -83,7 +83,7 @@
-         self.mkpath((self.root or "") + self.data_prefix)
- 
-     def init_siteconfig(self):
--        config = open("prewikka/siteconfig.py", "w")
-+        config = open(os.path.join(self.build_lib, "prewikka/siteconfig.py"), "w")
-         config.write("tmp_dir = '%s'\n" % (os.path.join(tempfile.gettempdir(), "prewikka")))
-         config.write("conf_dir = '%s'\n" % (os.path.abspath(self.conf_prefix)))
-         config.write("data_dir = '%s'\n" % (os.path.abspath(self.data_prefix)))
+@@ -110,7 +110,7 @@
+         self.install_conf()
+         self.install_wsgi()
+         self.create_datadir()
+-        init_siteconfig(self.conf_prefix, self.data_prefix)
++        init_siteconfig(self.conf_prefix, self.data_prefix, self.build_lib)
+         install.run(self)
+ 
+         os.chmod((self.root or "") + self.conf_prefix, 0o755)
+@@ -180,7 +180,7 @@
+         self.test_suite = True
+ 
+     def run_tests(self):
+-        init_siteconfig('conf', 'tests/downloads')
++        init_siteconfig('conf', 'tests/downloads', '')
+ 
+         import pytest  # import here, cause outside the eggs aren't loaded
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/prewikka.git/commitdiff/5a0ca7279474d330b7f684c7fe14b4ebfd901511



More information about the pld-cvs-commit mailing list