Commit Graph

187 Commits

Author SHA1 Message Date
Bill Wilson 4e6a811b44 Add option to ignore net interfaces that match a regex pattern. 2016-06-08 11:44:01 -05:00
Stefan Gehn b58ea9d699 Bump version in win32 specific files
Change all version in win32 resources to 2.3.7 as well.
2016-06-05 18:55:23 +02:00
Bill Wilson ff929058a5 Version 2.3.7 - replace deprecated gdk function / gkrellmd error flush
Use gdk_pixbuf_new_from_data() instead of deprecated
gdk_pixbuf_new_from_inline().  Inline alert_inline[] needed to be --raw.

When gkrellmd refused connections, the socket was not flushed and the error
message might not be sent back to the client.  Also, add a dialog to display
the error message.
2016-06-03 15:18:07 -05:00
Stefan Gehn 83d18ccdf9 Fix possible chart rendering problem for single pixels
Generalize the special case of drawing a single pixel in a chart in
case the two y coordinates happen to be identical.

This should fix https://bugs.gentoo.org/show_bug.cgi?id=438872
2016-02-11 18:33:50 +01:00
Felix Janda d188b31a34 Fix compilation without openssl and gnutls
When HAVE_SSL is false, previously, md5c.o was only compiled when
EXTRAOBJS was unset. But this is never the case since the top level
Makefile exports EXTRAOBJS. Now, append md5c.o to EXTRAOBJS instead.

Bug: https://bugs.gentoo.org/show_bug.cgi?id=560234#c10
2016-02-10 19:10:36 +01:00
Bill Wilson 5e76842961 Merge branch 'master' of ssh://srcbox.net/gkrellm 2016-02-02 17:37:50 -06:00
Bill Wilson 7f9617d817 fix handling of mmcblkN SD disk partition numbers
Partition numbers for mmcblkN disks have partition numbers with
a leading 'p' and a bug caused these partitions to be considered full disks.
2016-02-02 17:35:12 -06:00
Stefan Gehn 4f676e4cfb Always use getaddrinfo() on Linux
Expect the C runtime on Linux to always have getaddrinfo(), glibc 2.1
was released in 1999 so by now every Linux environment should have this
function. This enables use of getaddrinfo() on C libraries other than
glibc, i.e. on musl libc.

This is an alternative approach to the patch posted to the gkrellm
mailinglist by Felix Janda which unfortunately had some drawbacks on
other platforms that need additional includes or libs when using
getaddrinfo(), most notably Solaris and Windows.
2016-01-15 18:00:47 +01:00
Stefan Gehn c53159c3b8 Call pkg-config only once during build
Only evaluate these shell commands once at Makefile startup, otherwise
every single call to the compiler/linker will re-evaluate these lines
again and again. This speeds up the build quite a bit for me.
2016-01-01 13:58:06 +01:00
Bill Wilson eff1865a4b RC2 - fix gkrellmd server to use 64 bit ints for block sizes. 2015-12-23 11:06:10 -06:00
Stefan Gehn 624d667e46 Fix install deps and win32 pkg-config file contents
- Make the gkrellm.pc install target depend on its input file, fixes
  install target with parallel make

- Use a single rule for writing gkrellm.pc. Having a separate rule for
  windows breaks parallel builds, for some reason a parallel build of just
  the install_windows target ends up having unix gkrellm.pc contents.
  Avoid this possible build race by using a single rule with optional
  contents at the end of the file.

- Enforce static linking against libgkrellm.a on win32, otherwise plugin
  sources using autotools/libtool fail to link. libtool tries very hard
  to avoid mixing static and shared libraries so we will have to fall back
  to raw linker flags (libgkrellm.a on win32 is kind of a static
  convenience library)
2015-07-19 16:19:09 +02:00
Bill Wilson 14c4cc4ba0 Make fs_update() handle large disks.
Use gint64 to handle large block sizes for huge multi terabyte disks.
2015-07-15 18:20:10 -05:00
Bill Wilson d4eb792468 pt_BR.po translation update from Vinicius 2015-07-15 12:48:31 -05:00
Bill Wilson 1d41790c9c Merge branch 'master' of ssh://srcbox.net/gkrellm 2015-07-15 12:35:58 -05:00
Bill Wilson 0602b3c15f Change fs usage data from 32 bit to 64 bit
Also stop compiler warnings if compiling md5c.c.
2015-07-15 12:32:48 -05:00
Stefan Gehn 2175249255 Bump Windows file version field to 2.3.6 as well
Overlook when changing version numbers from 2.3.5 to 2.3.6. The
FileVersion field happens to be comma-separated.
2014-11-24 21:16:42 +01:00
Stefan Gehn aef224495d Detect newer Windows versions for system name display
- Handle Windows 6.1 - 6.3 which equals Windows 7, 8 and 8.1 including
  its server variants
- Shorten the client/server differentiation by using a variable
2014-11-23 22:05:40 +01:00
Stefan Gehn d4fe37aef1 Fix crashing system name display on unknown Windows version
The calling GKrellM code always expects a system name that can be split
at the first space character to provide kernel name and kernel version.
Return a string containing a space to avoid a crash on any Windows
version the code does not know about (or in case querying the version
failed).
2014-11-23 22:00:28 +01:00
Stefan Gehn 68a1dfd5f7 Fix always-on-top setting on Windows
Recent Gtk+ versions seem to defer creation of native windows even
further which made setting HWND_TOPMOST a no-op. Replace this lowlevel
hack with the standard Gtk+ way of making a window always-on-top, it
now works as expected.
2014-11-23 16:27:21 +01:00
Stefan Gehn 4263ff1e09 Update German translation
Add some missing translations, mainly for new CPU panel handling and
format changes inside context menu strings.
2014-11-20 21:00:01 +01:00
Bill Wilson 285adc8acd Avoid possible busy loop in read_server_setup()
A patch from Joe Garcia.  A ssh tunnel can be up but possibly not
connected to anything in which case gkrellm_getline() can return 0.
This patch prevents a busy loop by limiting the 0 return retries.
2014-11-05 17:46:37 -06:00
Jindřich Makovička f3f67b7919 fix copy/paste error
This regression was introduced by commit
6365d18ad0
2014-10-26 21:58:55 +01:00
Bill Wilson e15c0d4a02 Fix deprecated allow-shring & allow-grow warnings
Reported by Troy Engel, avoid recent GTK version deprecated warnings
by using gtk_window_set_resizable().
2014-10-21 18:49:41 -05:00
Bill Wilson 52f6abde26 fr.po translation update from Jerome UZEL 2014-10-16 15:22:05 -05:00
Bill Wilson 2846b9a6f2 CPU config
Add one more CPU chart text format string option as
final change before the rc1 tarball release.
2014-10-16 11:57:37 -05:00
Bill Wilson 62c2fe4ad4 Config appearance and one option change
Edit one of the CPU chart text format string options.

Fix gkrellm_category_vbox() so the returned vbox will be expanded like
it should be.  This exposed a clock config box packing needing a change.

The Disk Launch Commands vbox was packed into the wrong box.
2014-10-15 13:50:40 -05:00
Bill Wilson 8b1833342e Update version and dates
Change version to 2.3.6-RC1 for a soon to be release candidate.

Update Copyright dates to 2014 (touches almost all files)
2014-10-14 20:16:43 -05:00
Bill Wilson e89ca2982a For SMP machines add individual CPU chart enables and CPU panel label hiding.
- Replace SMP real CPU group enable with individual real CPU enables.
  I've had requests for this feature from people with 24 - 32 cpu machines
  where there is insufficient vertical space for all cpu charts and they
  want to split the CPU charts into multiple gkrellm stacks with --config.

- Add option to show/hide CPU panel labels so only a krell can be in the
  panels. Not showing CPU panel labels saves vertical space - for systems
  with medium to large numbers of CPUs.  I find it useful with 4+ CPUs.
  To make up for no panel label, added new chart label format string options
  that draw the CPU label on the chart.
  Temp and fan sensors cannot be relocated to CPU panels if labels not shown.
2014-10-14 16:42:38 -05:00
Bill Wilson 42c1825035 pt.po translation update
The pt.po translation that accidentally slipped into the previous commit was
not the latest I had. This is the latest from Ze.
2014-10-11 19:55:16 -05:00
Bill Wilson 60df57eaa6 Cleanups and patches
mail.c: replace deprecated g_mutex_new() with g_mutex_init() and
fix const discarded warnings.

plugins.c: gkrellm_place_plugin() change code that inserts plugins into
monitor_list to avoid compiler warnings.

Patch from Ville Skytta: fix issues flagged by cppcheck:
 - netbsd.c: add some close(fd) calls before returns in gkrellm_sys_battery_init().
 - winops-win32.c: add a free() in gkrellm_winop_place_gkrellm().

Bugfixes:
 - chart.c: flag config modified when changing a chart's Resolution per Grid.
 - fix memory leaks in multiple files: add g_thread_unref() for all GThread
   pointers returned from g_thread_new() calls.
2014-10-11 19:37:47 -05:00
Stefan Gehn 4e31e22787 gkrellmd: Fix IPv6 prefix length error detection
Parsing an IPv6 prefix length has to reset errno prior to calling
strtoul() to reliably detect errors (the return value is not suitable
for detecting errors).

Patch taken straight from Debian BTS #764023. Thanks for Peter Denison
for spotting this and providing a patch.
2014-10-05 13:14:15 +02:00
Stefan Gehn 56bd6fac14 Enable ASLR and DEP on Windows builds
Always enable ASLR and DEP when building GKrellM on Windows. Since
GKrellM also does network communication bugs like buffer overflows and
the like may eventually allow remote code execution. By enabling these
build flags such attacks should be quite a bit more complicated
(although still not impossible).
2014-10-05 12:22:42 +02:00
Stefan Gehn e611393dfa Make windows install target depend on build target
Add a dependency on the windows build target to allow building and
installing GKrellM using a single target. This fixes calling "make
install_windows" without a prior call to "make windows".
2014-10-05 12:22:42 +02:00
Stefan Gehn 1ffcfaca72 Use same cc/pkg-config in make and configure
- Export the CC and PKG_CONFIG variables before calling configure scripts,
especially for cross compilation and modified environments, otherwise
configure might detect libraries that are not usable by the compiler
later on

- Replace the hardcoded pkg-config calls in configure with a variable
  that may be overridden by Makefile
2014-10-05 12:22:42 +02:00
Stefan Gehn c02a7d57e6 Unify logging and use of environment in configure scripts
- Make the server configure script log the environment just like the
  configure script used for the client.

- Honour the CFLAGS env var too since the other configure does the same
2014-10-05 12:22:42 +02:00
Stefan Gehn 5cd8fb8db0 Fix configure script in cross compile environments
Do not try to execute generated executables. Altough this is a nice
idea in theory it breaks on cross compile environments which usually
cannot execute binaries of the target platform.
2014-10-05 12:22:42 +02:00
Stefan Gehn 320055e6c1 Drop configure dependency on Gtk+2
Remove Gtk+2 compile and link flags from all configure tests because:
- no test code depends on Gtk+2
- gkrellmd does not need Gtk+2 at all
- the cflags variable in the src/configure was misspelled and thus did
  not have any effect
2014-10-05 12:22:42 +02:00
Stefan Gehn 45898d3826 Support mxe build environment for windows cross builds
Override all tools with prefixed versions if the CROSS variable has
been set. This is the recommended way to enable cross compilation using
mxe without touching lots of environment variables first.
2014-10-05 12:22:42 +02:00
Stefan Gehn 534ab2dfa9 Remove unused OS_NAME makefile variable
Nothing reads or depends on the OS_NAME variable so just drop it
altogether.
2014-10-05 12:22:42 +02:00
Stefan Gehn b0b6b5d559 Share makefile rules and vars between client/server
Move all make variables and rules duplicated between gkrellm and
gkrellmd makefiles into a common file that can be included. This
avoids duplication and hopefully avoids the two makefiles getting out
of sync too much. This is also a preparation to ease overriding
toolchain binaries (compiler, linker, pkgconfig) as part of windows
cross compiling.

This change also puts the "ar" tool into a variable that can be
overridden if needed.

Please note that this change uses the GNU Make specific include
statement but AFAICS the makefiles already depend on GNU extensions in
other areas (":=" and "ifdef" are non-standard make syntax).
2014-10-05 12:18:35 +02:00
Stefan Gehn 434d79d413 Add option to enable/disable new network interfaces by default
Apply a slightly modified version of a patch provided by Pierre Neyron
that allows to enable/disable new network interfaces by default.

This feature is especially helpful for VM or container setups where many
network interfaces are created.
2014-08-23 17:25:05 +02:00
Stefan Gehn 5f24d60155 Ignore build files in git clones
Ignore all generated files since gkrellm currently has to be built
in-source.
2014-08-23 16:28:22 +02:00
Stefan Gehn 1ea6e7ace5 Mention last change in Changelog 2014-07-16 20:59:05 +02:00
Ville Skyttä 41be05b97e Allow binding to a listen address that doesn't exist yet 2014-07-16 19:34:36 +02:00
Stefan Gehn dbee3dc6cc Really disable building local md5 code if SSL is found
Adding md5c to the build is already handled by src/Makefile but that
one only kicks in if EXTRAOBJS is not set at all.

This fixes accidental build (and inclusion) of the md5 code that is
normally used from OpenSSL or GnuTLS if one of them is detected.
2014-07-12 22:58:17 +02:00
Stefan Gehn eb0a44b64b Spelling fixes
Fix several spelling mistakes in code comments as well as the Changelog.

Thanks to Ville Skyttä for providing the patch.
2014-07-12 22:48:16 +02:00
Stefan Gehn 4ff218d726 Drop GLib 1.x compatibility for gkrellmd
GLib version 1 is very outdated by now and not available in any recent
Linux distribution. Keeping this code around without actually being
able to test it makes little sense so let's get rid of that.
2014-07-12 22:45:33 +02:00
Stefan Gehn 5c40eea518 Fix inconsistent path generation and checks on win32
- Always check the return value of
  g_win32_get_package_installation_directory_of_module, this call may
  fail and return NULL
- g_build_filename is documented as never returning NULL, no need to
  check for that
2014-07-12 22:45:14 +02:00
Stefan Gehn 33133c63ae Remove compatibility code for GLib < 2.32
Since the minimum GLib version is now 2.32 the code paths for older GLib
2 versions can be removed too.
2014-07-12 22:45:14 +02:00
Stefan Gehn 6e3ee7db10 Port to GLib >= 2.32 GThread API
- Use g_thread_new instead of g_thread create
- Drop explicit call of g_thread_init, it is done implicitely by GLib
  since 2.32
- Since this bumps the minimum required GLib version add and extend the
  pkg-config based version checks to error out on older GLib versions
2014-07-12 22:45:08 +02:00