commit xosview for openSUSE:Factory
Hello community, here is the log from the commit of package xosview for openSUSE:Factory checked in at 2018-09-26 14:23:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xosview (Old) and /work/SRC/openSUSE:Factory/.xosview.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "xosview" Wed Sep 26 14:23:38 2018 rev:44 rq:638232 version:1.20 Changes: -------- --- /work/SRC/openSUSE:Factory/xosview/xosview.changes 2017-03-24 02:22:57.620978968 +0100 +++ /work/SRC/openSUSE:Factory/.xosview.new/xosview.changes 2018-09-26 14:23:46.173888596 +0200 @@ -1,0 +2,8 @@ +Tue Sep 18 14:43:05 UTC 2018 - Dr. Werner Fink <werner@suse.de> + +- Update to version 1.20 + * Small changes in inux/diskmeter.cc + * As well as in linux/netmeter.cc + * New 32x32 icon + +------------------------------------------------------------------- Old: ---- xosview-1.19.tar.gz New: ---- xosview-1.20.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xosview.spec ++++++ --- /var/tmp/diff_new_pack.7ShJd2/_old 2018-09-26 14:23:46.897887445 +0200 +++ /var/tmp/diff_new_pack.7ShJd2/_new 2018-09-26 14:23:46.897887445 +0200 @@ -1,7 +1,7 @@ # # spec file for package xosview # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -18,13 +18,23 @@ %define _appdefdir %{_datadir}/X11/app-defaults Name: xosview -Version: 1.19 +BuildRequires: autoconf +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xpm) +# NOTE: We don't want this dependency and desktop-data-SuSE is in all +# desktop selections. +#Requires: desktop-data-SuSE +# /usr/bin/xrdb +Requires: xrdb +Version: 1.20 Release: 0 Summary: System Load Information -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Monitoring -Url: https://github.com/hills/xosview -Source: http://www.pogo.org.uk/~mark/xosview/releases/xosview-%{version}.tar.gz +Url: https://github.com/hills/%{name} +Source: https://github.com/hills/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: rc.config.xosview Source2: xosview.png Source3: xosview.desktop @@ -33,11 +43,6 @@ Patch0: xosview-1.19.dif Patch10: xosview-1.19-appdef.patch Patch11: xosview-1.16-diskstat.patch -BuildRequires: autoconf -BuildRequires: gcc-c++ -BuildRequires: pkgconfig -BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(xpm) # NOTE: We don't want this dependency and desktop-data-SuSE is in all # desktop selections. #Requires: desktop-data-SuSE @@ -95,6 +100,10 @@ %files %defattr(-,root,root) %{_datadir}/pixmaps/xosview.png +%dir %{_datadir}/icons/hicolor/ +%dir %{_datadir}/icons/hicolor/32x32/ +%dir %{_datadir}/icons/hicolor/32x32/apps/ +%{_datadir}/icons/hicolor/32x32/apps/xosview.png %{_datadir}/applications/xosview.desktop %{_bindir}/xosview %{_bindir}/xosview.bin ++++++ xosview-1.19.tar.gz -> xosview-1.20.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xosview-1.19/Makefile new/xosview-1.20/Makefile --- old/xosview-1.19/Makefile 2016-12-03 15:11:12.000000000 +0100 +++ new/xosview-1.20/Makefile 2017-11-04 16:05:59.000000000 +0100 @@ -10,6 +10,8 @@ BINDIR ?= $(PREFIX)/bin MANDIR ?= $(PREFIX)/share/man +XDGAPPSDIR ?= $(PREFIX)/share/applications +ICONDIR ?= $(PREFIX)/share/icons/hicolor # Optional build arguments; user may wish to override @@ -140,8 +142,12 @@ install: xosview $(INSTALL) -d $(DESTDIR)$(BINDIR) $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1 + $(INSTALL) -d $(DESTDIR)$(XDGAPPSDIR) + $(INSTALL) -d $(DESTDIR)$(ICONDIR)/32x32/apps $(INSTALL) -m 755 xosview $(DESTDIR)$(BINDIR)/xosview $(INSTALL) -m 644 xosview.1 $(DESTDIR)$(MANDIR)/man1/xosview.1 + $(INSTALL) -m 644 xosview.desktop $(DESTDIR)$(XDGAPPSDIR) + $(INSTALL) -m 644 xosview.png $(DESTDIR)$(ICONDIR)/32x32/apps clean: rm -f xosview $(OBJS) $(DEPS) defaultstring.cc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xosview-1.19/linux/netmeter.cc new/xosview-1.20/linux/netmeter.cc --- old/xosview-1.19/linux/netmeter.cc 2016-12-03 15:11:12.000000000 +0100 +++ new/xosview-1.20/linux/netmeter.cc 2017-11-04 16:05:59.000000000 +0100 @@ -20,6 +20,33 @@ static const char PROCNETDEV[] = "/proc/net/dev"; static const char SYSCLASSNET[] = "/sys/class/net"; +/* + * Parse the integer count from the given filename + * + * This is quite relaxed about error conditions because the file may + * have been removed before it was opened, or truncated, in which case + * the count is zero. + * + * Return: 0 if not not avilable, otherwise count (which may be zero) + */ + +static unsigned long long getCount( const char *filename ){ + unsigned long long n, count = 0; + FILE *f; + + f = fopen(filename, "r"); + if (!f) + return 0; + + if (fscanf(f, "%llu", &n) == 1) + count = n; + + if (fclose(f) != 0) + abort(); + + return count; +} + NetMeter::NetMeter( XOSView *parent, float max ) : FieldMeterGraph( parent, 3, "NET", "IN/OUT/IDLE" ){ @@ -94,7 +121,6 @@ struct dirent *ent; char filename[128]; std::ifstream ifs; - unsigned long long value; if ( !(dir = opendir(SYSCLASSNET)) ) { std::cerr << "Can not open directory : " << SYSCLASSNET << std::endl; @@ -112,28 +138,10 @@ continue; snprintf(filename, 128, "%s/%s/statistics/rx_bytes", SYSCLASSNET, ent->d_name); - ifs.open(filename); - if ( !ifs.good() ) { - std::cerr << "Can not open file : " << filename << std::endl; - parent_->done(1); - return; - } - ifs >> value; - ifs.close(); - totin += value; - XOSDEBUG("%s: %llu bytes received", ent->d_name, value); + totin += getCount(filename); snprintf(filename, 128, "%s/%s/statistics/tx_bytes", SYSCLASSNET, ent->d_name); - ifs.open(filename); - if ( !ifs.good() ) { - std::cerr << "Can not open file : " << filename << std::endl; - parent_->done(1); - return; - } - ifs >> value; - ifs.close(); - totout += value; - XOSDEBUG(", %llu bytes sent.\n", value); + totout += getCount(filename); } closedir(dir); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xosview-1.19/xosview.desktop new/xosview-1.20/xosview.desktop --- old/xosview-1.19/xosview.desktop 2016-12-03 15:11:12.000000000 +0100 +++ new/xosview-1.20/xosview.desktop 2017-11-04 16:05:59.000000000 +0100 @@ -4,6 +4,6 @@ Exec=xosview Terminal=false Type=Application -Icon=xosview.xpm -Categories=Application;System; +Icon=xosview +Categories=System;Monitor; Keywords=System;Utility;System Monitor Binary files old/xosview-1.19/xosview.png and new/xosview-1.20/xosview.png differ
participants (1)
-
root