Skip to content

Commit fd75eb0

Browse files
committed
Merge branch 'dev'
2 parents 97d9bea + 29961c2 commit fd75eb0

File tree

13 files changed

+37
-15
lines changed

13 files changed

+37
-15
lines changed

.github/workflows/mamonsu-tests-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
8181
id: zabbix_address
8282
- name: Edit Zabbix address in agent.conf
83-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf
83+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
8484

8585
- name: Copy test scripts to container
8686
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

.github/workflows/mamonsu-tests-master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
echo "zabbix_address=$(hostname -I | awk '{print $1}')" >> $GITHUB_OUTPUT
9292
id: zabbix_address
9393
- name: Edit Zabbix address in agent.conf
94-
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.8.conf
94+
run: sed -i "s/\(address *= *\).*/\1 ${{ steps.zabbix_address.outputs.zabbix_address }}/" ${{ env.MAMONSU_PATH }}/github-actions-tests/sources/agent_3.5.9.conf
9595

9696
- name: Copy test scripts to container
9797
run: docker exec $( echo "${{ matrix.docker_os }}" | sed 's/://' | sed 's/\.//' ) mkdir -p -m 755 /mamonsu/

github-actions-tests/mamonsu_build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [ "${OS%:*}" = "centos" ]; then
4141
python3 setup.py build && python3 setup.py install
4242
make rpm
4343
sudo rpm -i ./mamonsu*.rpm
44-
cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf
44+
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
4545
systemctl daemon-reload
4646
systemctl restart mamonsu
4747
sleep 5
@@ -64,7 +64,7 @@ elif [ "${OS%:*}" = "ubuntu" ]; then
6464
python3 setup.py build && python3 setup.py install
6565
make deb
6666
sudo dpkg -i ./mamonsu*.deb
67-
cat /mamonsu/github-actions-tests/sources/agent_3.5.8.conf > /etc/mamonsu/agent.conf
67+
cat /mamonsu/github-actions-tests/sources/agent_3.5.9.conf > /etc/mamonsu/agent.conf
6868
service mamonsu restart
6969
sleep 5
7070
echo && echo && echo "mamonsu version:"

github-actions-tests/tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ REPO
6969
eval "${PACKAGE_MANAGER_INSTALL} wget"
7070
eval "${PACKAGE_MANAGER_INSTALL} bc"
7171
eval "${PACKAGE_MANAGER_INSTALL} unzip"
72-
eval "${PACKAGE_MANAGER_INSTALL} https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
72+
eval "${PACKAGE_MANAGER_INSTALL} https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm"
7373
REPO=${PACKAGE_MANAGER_INSTALL}" https://download.postgresql.org/pub/repos/yum/reporpms/EL-"$(echo ${OS} | sed -r 's/^[^0-9]*([0-9]+).*/\1/')"-x86_64/pgdg-redhat-repo-latest.noarch.rpm"\
7474

7575
# run tests

mamonsu/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__author__ = 'Dmitry Vasilyev'
22
__author_email__ = 'info@postgrespro.ru'
33
__description__ = 'Monitoring agent for PostgreSQL'
4-
__version__ = '3.5.8'
4+
__version__ = '3.5.9'
55
__licence__ = 'BSD'
66

77
__url__ = 'https://github.com/postgrespro/mamonsu'

mamonsu/plugins/pgsql/driver/pg8000/core.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
from collections import defaultdict, deque
33
from datetime import datetime as Datetime
44
from decimal import Decimal
5-
from pkg_resources import packaging
65
from hashlib import md5
76
from itertools import count, islice
87
from struct import Struct
98
from warnings import warn
109

10+
try:
11+
from pkg_resources import packaging
12+
except ImportError:
13+
import packaging.version
14+
1115
from mamonsu.plugins.pgsql.driver.pg8000 import converters
1216
from .exceptions import (
1317
ArrayContentNotSupportedError, DatabaseError, Error, IntegrityError,

mamonsu/plugins/pgsql/driver/pool.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
from pkg_resources import packaging
21
from .connection import Connection, ConnectionInfo
32

3+
try:
4+
from pkg_resources import packaging
5+
except ImportError:
6+
import packaging.version
47

58
class Pool(object):
69
ExcludeDBs = ["template0", "template1"]

mamonsu/plugins/pgsql/memory_leak_diagnostic.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
import os
55
from .pool import Pooler
66
import re
7-
from pkg_resources import packaging
87
import mamonsu.lib.platform as platform
98
import posix
109

10+
try:
11+
from pkg_resources import packaging
12+
except ImportError:
13+
import packaging.version
1114

1215
class MemoryLeakDiagnostic(Plugin):
1316
DEFAULT_CONFIG = {

mamonsu/plugins/pgsql/replication.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# -*- coding: utf-8 -*-
22

33
from mamonsu.plugins.pgsql.plugin import PgsqlPlugin as Plugin
4-
from pkg_resources import packaging
54
from .pool import Pooler
65
from mamonsu.lib.zbx_template import ZbxTemplate
76

7+
try:
8+
from pkg_resources import packaging
9+
except ImportError:
10+
import packaging.version
11+
812
NUMBER_NON_ACTIVE_SLOTS = 0
913

1014

packaging/debian/changelog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
mamonsu (3.5.9-1) stable; urgency=low
2+
* Run on systems with latest setuptools installed (>67.7.2);
3+
* Drop using dotted user:group specification in RPM pre-install stage;
4+
15
mamonsu (3.5.8-1) stable; urgency=low
26
* Prepare for python 3.12: remove deprecated distutils imports;
37

packaging/rpm/SPECS/mamonsu.spec

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: mamonsu
2-
Version: 3.5.8
2+
Version: 3.5.9
33
Release: 1%{?dist}
44
Summary: Monitoring agent for PostgreSQL
55
Group: Applications/Internet
@@ -57,22 +57,26 @@ getent passwd mamonsu > /dev/null || \
5757
-c "mamonsu monitoring user" mamonsu
5858

5959
mkdir -p /var/run/mamonsu
60-
chown -R mamonsu.mamonsu /var/run/mamonsu
60+
chown -R mamonsu:mamonsu /var/run/mamonsu
6161

6262
mkdir -p /etc/mamonsu/plugins
6363
touch /etc/mamonsu/plugins/__init__.py
6464

6565
mkdir -p /var/log/mamonsu
66-
chown -R mamonsu.mamonsu /var/log/mamonsu
66+
chown -R mamonsu:mamonsu /var/log/mamonsu
6767

6868
%preun
6969
/sbin/service mamonsu stop >/dev/null 2>&1
7070
/sbin/chkconfig --del mamonsu
7171

7272
%post
73-
chown -R mamonsu.mamonsu /etc/mamonsu
73+
chown -R mamonsu:mamonsu /etc/mamonsu
7474

7575
%changelog
76+
* Mon Aug 19 2024 Maxim Styushin <m.styushin@postgrespro.ru> - 3.5.9-1
77+
- Run on systems with latest setuptools installed (>67.7.2);
78+
- Drop using dotted user:group specification in RPM pre-install stage;
79+
7680
* Thu Apr 18 2024 Maxim Styushin <m.styushin@postgrespro.ru> - 3.5.8-1
7781
- Prepare for python 3.12: remove deprecated distutils imports;
7882

packaging/win/mamonsu.def.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
!define NAME Mamonsu
2-
!define VERSION 3.5.8
2+
!define VERSION 3.5.9
33
!define MAMONSU_REG_PATH "Software\PostgresPro\Mamonsu"
44
!define MAMONSU_REG_UNINSTALLER_PATH "Software\Microsoft\Windows\CurrentVersion\Uninstall"
55
!define EDB_REG "SOFTWARE\Postgresql"

0 commit comments

Comments
 (0)