Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit upsm for openSUSE:Factory
Hello community,

here is the log from the commit of package upsm for openSUSE:Factory checked in
at 2019-04-26 22:54:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/upsm (Old)
and /work/SRC/openSUSE:Factory/.upsm.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "upsm"

Fri Apr 26 22:54:31 2019 rev:3 rq:697805 version:2.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/upsm/upsm.changes 2018-08-20
16:19:38.812841625 +0200
+++ /work/SRC/openSUSE:Factory/.upsm.new.5536/upsm.changes 2019-04-26
22:54:31.845312018 +0200
@@ -1,0 +2,16 @@
+Thu Apr 25 08:06:59 UTC 2019 - Martin Hauke <mardnh@xxxxxx>
+
+- Update to version 2.2.0
+ * Window hides form taskbar when minimized (was: optional)
+ * Documentation updated
+ * Close button now closes the app, minimize button minimizes
+ (more logical approach)
+ * build files cleanup
+
+-------------------------------------------------------------------
+Sat Aug 18 18:24:47 UTC 2018 - mardnh@xxxxxx
+
+- Update to version 2.1.1
+ * meson/ninja support
+
+-------------------------------------------------------------------

Old:
----
upsm-2.0.2.tar.gz

New:
----
upsm-2.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ upsm.spec ++++++
--- /var/tmp/diff_new_pack.lOp1ve/_old 2019-04-26 22:54:32.453311626 +0200
+++ /var/tmp/diff_new_pack.lOp1ve/_new 2019-04-26 22:54:32.453311626 +0200
@@ -1,7 +1,7 @@
#
# spec file for package upsm
#
-# 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,12 +12,12 @@
# 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/
#


Name: upsm
-Version: 2.0.2
+Version: 2.2.0
Release: 0
Summary: Qt-based ups monitor (front-end for upsc from Network UPS
Tools)
License: SUSE-Public-Domain
@@ -25,6 +25,7 @@
URL: https://github.com/psemiletov/upsm
Source:
https://github.com/psemiletov/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: ImageMagick
+BuildRequires: binutils-gold
BuildRequires: cmake
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig

++++++ upsm-2.0.2.tar.gz -> upsm-2.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/CMakeLists.txt
new/upsm-2.2.0/CMakeLists.txt
--- old/upsm-2.0.2/CMakeLists.txt 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/CMakeLists.txt 2019-04-24 12:28:31.000000000 +0200
@@ -5,10 +5,7 @@
add_definitions(${Qt5Widgets_DEFINITIONS})

set(PROJECT "upsm")
-project ($PROJECT VERSION 2.0.1)
-
-#set (upsm_VERSION_MAJOR 1)
-#set (upsm_VERSION_MINOR 3)
+project ($PROJECT VERSION 2.2.0)


set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -26,8 +23,18 @@

qt5_add_resources(QT_RESOURCES upsm.qrc)

+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -fuse-ld=gold")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")

+
+if (UNIX AND NOT APPLE)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE ld_version)
+ if ("${ld_version}" MATCHES "GNU gold")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold
-Wl,--disable-new-dtags")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold
-Wl,--disable-new-dtags")
+ endif()
+endif()
+
# Populate a CMake variable with the sources
set(upsm_SRCS
mainwindow.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/ChangeLog new/upsm-2.2.0/ChangeLog
--- old/upsm-2.0.2/ChangeLog 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/ChangeLog 2019-04-24 12:28:31.000000000 +0200
@@ -1,10 +1,18 @@
+2.2.0
+* Window hides form taskbar when minimized (was: optional)
+* Documentation updated
+* Close button now closes the app, minimize button minimizes (more logical
approach)
+* build files cleanup
+
+2.1.0
++ meson/ninja support
+
2.0.0
+ cmake support, code cleanup

1.3.3
* desktop stuff fixes

-
1.3.1
+ Run minimized option

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/README new/upsm-2.2.0/README
--- old/upsm-2.0.2/README 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/README 2019-04-24 12:28:31.000000000 +0200
@@ -19,6 +19,23 @@
make
make install

+or
+
+mkdir b
+cd b
+cmake -GNinja ..
+ninja
+ninja install
+
+or
+
+mkdir b
+meson b
+cd b
+ninja
+ninja install
+
+
P.S. Use "minimize" button to minimize upsm to the tray. "Close" button just
closes the program.

Peter Semiletov
@@ -40,6 +57,22 @@
make
make install

+или:
+
+mkdir b
+cd b
+cmake -GNinja ..
+ninja
+ninja install
+
+или же:
+
+makdir b
+meson b
+cd b
+ninja
+ninja install
+

П.С. Кнопка "закрыть" завершает работу программы, а "свернуть" - сворачивает в
область уведомлений.

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/mainwindow.cpp
new/upsm-2.2.0/mainwindow.cpp
--- old/upsm-2.0.2/mainwindow.cpp 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/mainwindow.cpp 2019-04-24 12:28:31.000000000 +0200
@@ -19,6 +19,8 @@
#include <QDateTime>
#include <QPainter>

+#include <iostream>
+
#include "mainwindow.h"


@@ -89,6 +91,14 @@
}


+void MainWindow::changeEvent (QEvent *event)
+{
+ if (event->type() == QEvent::WindowStateChange)
+ if (isMinimized())
+ hide();
+}
+
+
MainWindow::MainWindow (QWidget *parent): QMainWindow (parent)
{
qtTranslator.load (QString ("qt_%1").arg (QLocale::system().name()),
@@ -111,7 +121,6 @@

tray_icon.setVisible (true);

-
resize (800, 400);
show_at_center();

@@ -162,14 +171,6 @@
led_logsize->setText (settings->value ("logsize", "1024").toString());
la_settings->addLayout (la_logsize);

- cb_hide_from_taskbar = new QCheckBox (tr ("Hide from taskbar"));
- cb_hide_from_taskbar->setTristate (false);
-
- if (settings->value ("hide_from_taskbar", "0").toBool())
- cb_hide_from_taskbar->setChecked (true);
-
- la_settings->addWidget (cb_hide_from_taskbar);
-
cb_run_minimized = new QCheckBox (tr ("Run minimized"));
cb_run_minimized->setTristate (false);

@@ -217,14 +218,6 @@
update_stats();

timer->start (polltime);
-
- if (settings->value ("hide_from_taskbar", "0").toBool())
- {
- setWindowFlags (Qt::Tool);
- setAttribute (Qt::WA_QuitOnClose);
- }
- else
- setWindowFlags (Qt::Window);
}


@@ -240,15 +233,7 @@

settings->setValue ("run_minimized", cb_run_minimized->isChecked());
settings->setValue ("hide_from_taskbar", cb_hide_from_taskbar->isChecked());
-
- if (settings->value ("hide_from_taskbar", "0").toBool())
- {
- setWindowFlags (Qt::Tool);
- setAttribute (Qt::WA_QuitOnClose);
- }
- else
- setWindowFlags (Qt::Window);
-
+
timer->stop();
timer->start (polltime);
}
@@ -341,10 +326,10 @@

pnt.setFont (fnt);
pnt.setPen (Qt::cyan);
- pnt.drawText(QRect (1, 1, 64, 32), Qt::AlignLeft, input_v.left
(input_v.indexOf (".")));
+ pnt.drawText (QRect (1, 1, 64, 32), Qt::AlignLeft, input_v.left
(input_v.indexOf (".")));

pnt.setPen (Qt::white);
- pnt.drawText(QRect (1, 32, 64, 32), Qt::AlignLeft, output_v.left
(input_v.indexOf (".")));
+ pnt.drawText (QRect (1, 32, 64, 32), Qt::AlignLeft, output_v.left
(input_v.indexOf (".")));

QPixmap pm = QPixmap::fromImage (*paint_rect);
tray_icon.setIcon (QIcon (pm));
@@ -356,7 +341,6 @@
switch (reason)
{
case QSystemTrayIcon::Trigger:
- // case QSystemTrayIcon::DoubleClick:

if (! isVisible())
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/mainwindow.h new/upsm-2.2.0/mainwindow.h
--- old/upsm-2.0.2/mainwindow.h 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/mainwindow.h 2019-04-24 12:28:31.000000000 +0200
@@ -75,6 +75,7 @@
protected:

void closeEvent (QCloseEvent *event);
+ void changeEvent(QEvent *event);
};

#endif // MAINWINDOW_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/manuals/en new/upsm-2.2.0/manuals/en
--- old/upsm-2.0.2/manuals/en 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/manuals/en 2019-04-24 12:28:31.000000000 +0200
@@ -15,7 +15,7 @@

2. Copy, if not exists, file "some_number-nut-usbups.rules" from
/lib/udev/rules.d to /etc/udev/rules.d.

-3. Edit file /etc/nut/ups.conf, and put there to the end something like this:
+3. Edit file /etc/ups/ups.conf, and put there to the end something like this:

[myups]
driver = usbhid-ups
@@ -28,19 +28,40 @@
pollfreq - the device polling frequency, in milliseconds.
The bus is better to leave undefined, because the bus number can be changed
after reboot,

-4. Run the driver:
+ 4. Copy systemd service files (nut-driver.service, nut-monitor.service,
nut-server.service) from nut source (/scripts/systemd), if not installed with
the package, to /etc/systemd/system. To ensure that nut-server will run after
the possible failure, add to nut-server.service file at the [Unit] section lines

-upsdrvctl start
+Restart=on-failure
+RestartSec=360s
+
+ 5. Run
+
+ systemctl enable nut-server
+
+ ...to enable autostart nut-driver and nut-driver after the next boot.
+
+ 6. Run

-5. Run the server:
+ systemctl start nut-server

+ ...to start it now.
+
+ /* Under the hood, for non-systemd systems:
+
+First you need to run the driver:
+upsdrvctl start
+Then run the server:
upsd
+*/

-6. Read the data from UPS:
+7. Read the data from UPS:

upsc myups

-7. Put this command to the "Command" parameter at upsm "Settings" panel.
+or, in the case of the nut built from the source:
+
+/usr/local/ups/bin/upsc myups@localhost
+
+8. Put this command to the "Command" parameter at upsm "Settings" panel.


Peter Semiletov <peter.semiletov@xxxxxxxxx>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/manuals/ru new/upsm-2.2.0/manuals/ru
--- old/upsm-2.0.2/manuals/ru 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/manuals/ru 2019-04-24 12:28:31.000000000 +0200
@@ -18,7 +18,7 @@

2. Из /lib/udev/rules.d копируем файл с "именем число-nut-usbups.rules" в
каталог /etc/udev/rules.d, если такового файла там еще нет.

-3. Правим файл /etc/nut/ups.conf, добавляя в конец примерно такое:
+3. Правим файл /etc/ups/ups.conf, добавляя в конец примерно такое:
[myups]
driver = usbhid-ups
port = auto
@@ -28,19 +28,37 @@

В vendorid прописываем полученный из lsusb вендор ид. pollfreq = частота
опроса устройства, в секундах. Можно написать еще bus, где указать полученный
номер шины, однако в Linux номера шины иногда меняются после перезагрузки.

-4. Для пробы запускаем драйвер:
-
+4. До принятия линуксами всея Руси и мира штуки под названием systemd, запуск
NUT-сервера зафуговывали в какой-то скрипт автозапуска, а именно, вначале
запускали драйвер:
upsdrvctl start
+Потом сам сервер:
+upsd

-5. Запускаем сервер:
+ А нонича всё инаково! Если вы установили NUT из исходника, а не из пакета
(пакет сам все файлы куда надо раскидает), скопируйте вручную файлы,
относящиеся к systemd, из исходника nut. Они лежат в подкаталоге
/scripts/systemd, а "они" это nut-driver.service, nut-monitor.service,
nut-server.service.
+ Копируем их в /etc/systemd/system.
+ Далее, в раздел [Unit] файла nut-server.service добавляем строки

-upsd
+Restart=on-failure
+RestartSec=360s
+
+ Это чтобы если nut при запуске сразу не раздуплится с ИБП, то сделал это
чуть позже.
+
+ 5. Теперь, чтобы nut запускался автоматически каждый раз при загрузке, даем
под рутом команду
+
+ systemctl enable nut-server
+
+ И команду
+
+ systemctl start nut-server
+
+ ...чтобы запустить сервер сейчас.

6. Пробуем прочитать данные с ИБП:

upsc myups
+или, обычно при установке из исходника:
+/usr/local/ups/bin/upsc myups@localhost

-7. Прописываем эту строку в качестве команды опроса в настройках upsm.
+7. Прописываем эту строку в качестве команды опроса в Настройках upsm.


Петр Семилетов <peter.semiletov@xxxxxxxxx>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/meson.build new/upsm-2.2.0/meson.build
--- old/upsm-2.0.2/meson.build 1970-01-01 01:00:00.000000000 +0100
+++ new/upsm-2.2.0/meson.build 2019-04-24 12:28:31.000000000 +0200
@@ -0,0 +1,31 @@
+project('upsm', 'cpp',
+ default_options : ['cpp_std=c++11'],
+ version : '2.2.0',
+ license : 'GPLv3')
+
+
+qt5_dep = dependency('qt5', modules : ['Core', 'Gui', 'Widgets'])
+qt5 = import('qt5')
+
+
+processed = qt5.preprocess(
+ moc_headers : 'mainwindow.h',
+ qresources : 'upsm.qrc',
+)
+
+q5exe = executable('upsm',
+ sources : ['main.cpp', 'mainwindow.cpp',
+ processed], install : true,
+ dependencies: qt5_dep,
+ cpp_args : '-std=c++11'
+ )
+
+install_data(['icons/upsm.png'],
+ install_dir : 'share/icons/hicolor/128x128/apps')
+
+install_data(['icons/upsm.svg'],
+ install_dir : 'share/icons/hicolor/scalable/apps')
+
+install_data(['desktop/upsm.desktop'],
+ install_dir : 'share/applications')
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/upsm-2.0.2/upsm.pro new/upsm-2.2.0/upsm.pro
--- old/upsm-2.0.2/upsm.pro 2018-07-13 16:13:24.000000000 +0200
+++ new/upsm-2.2.0/upsm.pro 2019-04-24 12:28:31.000000000 +0200
@@ -1,22 +1,14 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2017-06-30T11:27:20
-#
-#-------------------------------------------------
-
-VERSION=2.0.1
+VERSION=2.2.0
QT += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

RESOURCES += upsm.qrc

-
isEmpty(PREFIX) {
PREFIX = /usr/local
}

-
TARGET = bin/upsm
target.path = $$PREFIX/bin
desktop.path=$$PREFIX/share/applications


< Previous Next >
This Thread
  • No further messages