...
 
Commits (2)
<!--- Provide a general summary of the issue in the Title above -->
<!--- You could delete sections and/or questions irrelevant to your report --->
##### Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
##### Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
##### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
##### Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
##### Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
##### System Information
<!--- Include as many relevant details about the system you experienced the bug in -->
* Distribution & Version:
* Kernel:
* Qt Version:
* libqtxdg Version:
* lxde-build-tools Version:
* Package version:
Upstream Authors:
LXQt team: http://lxqt.org
LXQt team: https://lxqt.org
Razor team: http://razor-qt.org
Kuzma Shapran <kuzma.shapran@gmail.com>
Copyright:
Copyright (c) 2012 Razor team
Copyright (c) 2012-2017 LXQt team
Copyright (c) 2012-2018 LXQt team
License: LGPL-2.1+
The full text of the licenses can be found in the 'COPYING' file.
libsysstat-0.4.0 / 2017-09-23
libsysstat-0.4.1 / 2018-05-21
=============================
* Bump patch version to 1
* CMake: Prevent in-source builds
* Fixed year and https
* Fixes some lxde mentions
* Bump LXQTBT_MINIMUM_VERSION to 0.4.1
* Drop Qt foreach.
* Handle CMake CMP0024
* Don't export github templates
0.4.0 / 2017-09-23
==================
* Release 0.4.0: Update changelog
* correct spelling mistake
* bump version and needed version of lxqt-build-tools
* liblxqt make no sense here
......
......@@ -4,11 +4,11 @@ project(libsysstat)
set(MAJOR_VERSION 0)
set(MINOR_VERSION 4)
set(PATCH_VERSION 0)
set(PATCH_VERSION 1)
set(SYSSTAT_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
set(LXQTBT_MINIMUM_VERSION "0.4.0")
set(QT_MINIMUM_VERSION "5.4.2")
set(LXQTBT_MINIMUM_VERSION "0.5.0")
set(QT_MINIMUM_VERSION "5.7.1")
# additional cmake files
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
......@@ -19,6 +19,7 @@ message(STATUS "Building ${PROJECT_NAME} with Qt ${Qt5Core_VERSION}")
include(CMakePackageConfigHelpers)
include(GNUInstallDirs) # Standard directories for installation
include(LXQtPreventInSourceBuilds)
include(LXQtCreatePkgConfigFile)
include(LXQtCreatePortableHeaders)
include(LXQtCompilerSettings NO_POLICY_SCOPE)
......@@ -93,6 +94,7 @@ target_compile_definitions(${SYSSTAT_LIBRARY_NAME}
"MINOR_VERSION=${MINOR_VERSION}"
"PATCH_VERSION=${PATCH_VERSION}"
"SYSSTAT_LIBRARY"
"QT_NO_FOREACH"
)
target_include_directories(${SYSSTAT_LIBRARY_NAME}
......
......@@ -2,23 +2,37 @@
## Overview
libsysstat is a library to query system information like CPU and memory usage or network traffic. Conceptually it's roughly similar to [libstatgrab](https://www.i-scream.org/libstatgrab), a third-party library used by LXQt as well.
libsysstat is a library to query system information like CPU and memory usage or
network traffic. Conceptually it's roughly similar to
[libstatgrab](https://www.i-scream.org/libstatgrab), a third-party library used
by LXQt as well.
It is maintained by the LXQt project but can be used independently from this desktop environment, too. As for LXQt libsysstat is used by plugin-sysstat of lxqt-panel and hence an optional dependency of the latter.
It is maintained by the LXQt project but can be used independently from this
desktop environment, too. As for LXQt libsysstat is used by plugin-sysstat of
lxqt-panel and hence an optional dependency of the latter.
Note replacing both libsysstat and libstatgrab in LXQt by KDE Frameworks components is being considered but a final decision hasn't been made yet, see https://github.com/lxde/lxqt/issues/704.
Note replacing both libsysstat and libstatgrab in LXQt by KDE Frameworks components
is being considered but a final decision hasn't been made yet, see
https://github.com/lxqt/lxqt/issues/704.
## Installation
### Sources
The only runtime dependency is qtbase. To build CMake and [lxqt-build-tools](https://github.com/lxde/lxqt-build-tools) are needed in addition, as well as optionally Git to pull latest VCS checkouts.
The only runtime dependency is qtbase. To build CMake and
[lxqt-build-tools](https://github.com/lxqt/lxqt-build-tools) are needed in
addition, as well as optionally Git to pull latest VCS checkouts.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` will normally have to be set to `/usr`, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX`
will normally have to be set to `/usr`, depending on the way library paths are
dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be
set as well.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
To build run `make`, to install `make install` which accepts variable `DESTDIR`
as usual.
### Binary packages
The library is provided by all major Linux distributions like Arch Linux, Debian, Fedora and openSUSE.
Just use the distributions' package managers to search for string `libsysstat`.
The library is provided by all major Linux distributions like Arch Linux,
Debian, Fedora and openSUSE. Just use the distributions' package managers to
search for string `libsysstat`.
......@@ -15,8 +15,9 @@ set(SYSSTAT_VERSION @SYSSTAT_VERSION@)
include(CMakeFindDependencyMacro)
find_dependency(Qt5Core @QT_MINIMUM_VERSION@)
if (CMAKE_VERSION VERSION_GREATER 2.8.12)
cmake_policy(SET CMP0024 OLD)
if (NOT TARGET @SYSSTAT_LIBRARY_NAME@)
if (POLICY CMP0024)
cmake_policy(SET CMP0024 NEW)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@SYSSTAT_LIBRARY_NAME@-targets.cmake")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/@SYSSTAT_LIBRARY_NAME@-targets.cmake")
......@@ -62,7 +62,8 @@ void CpuStatPrivate::updateSources()
{
mSources.clear();
foreach (const QString &row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts))
const QStringList rows = readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts);
for (const QString &row : rows)
{
QStringList tokens = row.split(QChar(' '), QString::SkipEmptyParts);
if( (tokens.size() < 5)
......@@ -76,7 +77,8 @@ void CpuStatPrivate::updateSources()
bool ok;
foreach (const QString &range, readAllFile("/sys/devices/system/cpu/online").split(QChar(','), QString::SkipEmptyParts))
const QStringList ranges = readAllFile("/sys/devices/system/cpu/online").split(QChar(','), QString::SkipEmptyParts);
for (const QString &range : ranges)
{
int dash = range.indexOf('-');
if (dash != -1)
......@@ -128,7 +130,8 @@ void CpuStatPrivate::timeout()
if ( (mMonitoring == CpuStat::LoadOnly)
|| (mMonitoring == CpuStat::LoadAndFrequency) )
{
foreach (const QString &row, readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts))
const QStringList rows = readAllFile("/proc/stat").split(QChar('\n'), QString::SkipEmptyParts);
for (const QString &row : rows)
{
if (!row.startsWith("cpu"))
continue;
......
libsysstat (0.4.1-1) unstable; urgency=medium
* Cherry-picking new upstream release 0.4.1.
* Fixed watchfile url to lxqt
-- Alf Gaida <agaida@siduction.org> Wed, 23 May 2018 02:18:52 +0200
libsysstat (0.4.0-4) unstable; urgency=medium
* Bumped Standards to 4.1.4, no changes needed
......@@ -47,7 +54,7 @@ libsysstat (0.3.3-1) unstable; urgency=medium
* Removed --parallel from debian/rules, standard compat 10
* Set CMAKE_BUILD_TYPE=RelWithDebInfo
* Set LC_ALL=C.UTF-8
-- Alf Gaida <agaida@siduction.org> Sun, 11 Dec 2016 23:14:23 +0100
libsysstat (0.3.2-1) unstable; urgency=medium
......@@ -84,7 +91,7 @@ libsysstat (0.3.0+20150806-1) unstable; urgency=medium
* Initial release (Closes: #761270)
* Initial debian files
* symbols file added - tested for amd64 and i386
* Added .gitignore
* Added .gitignore
* Cherry-picking upstream version 0.3.0+201500806
* Fixed copyright to LGPL2.1+ only
* Added linker flags to rules
......
......@@ -6,7 +6,7 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
Section: libs
Priority: optional
Build-Depends: debhelper (>= 11~),
lxqt-build-tools (>= 0.4.0)
lxqt-build-tools (>= 0.4.0),
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/lxqt-team/libsysstat
Vcs-Git: https://salsa.debian.org/lxqt-team/libsysstat.git
......
version=4
opts="pgpsigurlmangle=s/$/.asc/" \
https://github.com/lxde/libsysstat/releases .*/libsysstat-([\d\.]+).tar.xz
https://github.com/lxqt/libsysstat/releases .*/libsysstat-([\d\.]+).tar.xz
......@@ -53,7 +53,8 @@ void MemStatPrivate::timeout()
qulonglong swapTotal = 0;
qulonglong swapFree = 0;
foreach (const QString &row, readAllFile("/proc/meminfo").split(QChar('\n'), QString::SkipEmptyParts))
const QStringList rows = readAllFile("/proc/meminfo").split(QChar('\n'), QString::SkipEmptyParts);
for (const QString &row : rows)
{
QStringList tokens = row.split(QChar(' '), QString::SkipEmptyParts);
if (tokens.size() != 3)
......
......@@ -42,7 +42,7 @@ NetStatPrivate::NetStatPrivate(NetStat *parent)
rows.erase(rows.begin(), rows.begin() + 2);
foreach (const QString &row, rows)
for (const QString &row : qAsConst(rows))
{
QStringList tokens = row.split(QChar(':'), QString::SkipEmptyParts);
if (tokens.size() != 2)
......@@ -74,7 +74,7 @@ void NetStatPrivate::timeout()
rows.erase(rows.begin(), rows.begin() + 2);
foreach (const QString &row, rows)
for (const QString &row : qAsConst(rows))
{
QStringList tokens = row.split(QChar(':'), QString::SkipEmptyParts);
if (tokens.size() != 2)
......