Compare commits

...

11 Commits

Author SHA1 Message Date
oxmc 813f25ccc8 Use proper ids 2025-03-23 04:25:24 -07:00
oxmc 0e70d496a0 Patch for missing cpu model from /proc/cpuinfo 2025-03-23 04:02:19 -07:00
Jeremy Bícha 38af7300a0 releasing package libgtop2 version 2.41.3-1 2024-02-16 13:16:40 -05:00
Jeremy Bícha e91ac6e7ff Adjust debian/*.info to keep dh_missing happy 2024-02-16 13:15:22 -05:00
Jeremy Bícha 805b37c49c Update pkg-config binary name 2024-02-16 13:13:03 -05:00
Jeremy Bícha 87abb9c0a6 New upstream release 2024-02-16 13:10:52 -05:00
Jeremy Bícha 3d8a834700 Update upstream source from tag 'upstream/2.41.3'
Update to upstream version '2.41.3'
with Debian dir 690cd6361d
2024-02-16 13:10:52 -05:00
Jeremy Bícha 77697aca67 New upstream version 2.41.3 2024-02-16 13:10:43 -05:00
Robert Roth 526a516981 Prepared release 2.41.3 2024-02-16 19:49:25 +02:00
Addison Crump 35972c6a3d fix some bounds checks 2024-02-02 11:43:11 +01:00
Sabri Ünal e07a0a005d Update Turkish translation 2023-10-25 13:40:19 +00:00
20 changed files with 108 additions and 48 deletions
+1 -2
View File
@@ -203,8 +203,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(srcdir)/libgtop-2.0.pc.in $(srcdir)/libgtop.spec.in \ $(srcdir)/libgtop-2.0.pc.in $(srcdir)/libgtop.spec.in \
$(srcdir)/libgtopconfig.h.in ABOUT-NLS AUTHORS COPYING \ $(srcdir)/libgtopconfig.h.in ABOUT-NLS AUTHORS COPYING \
ChangeLog INSTALL NEWS README compile config.guess \ ChangeLog INSTALL NEWS README compile config.guess \
config.rpath config.sub depcomp install-sh ltconfig ltmain.sh \ config.rpath config.sub install-sh ltconfig ltmain.sh missing
missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
+6
View File
@@ -1,3 +1,9 @@
16 February 2024: Overview of changes in 2.41.3
================================================
* Fixed daemon buffer overflow #72
* Updated translations
15 October 2023: Overview of changes in 2.41.2 15 October 2023: Overview of changes in 2.41.2
================================================ ================================================
Vendored
+15 -15
View File
@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for libgtop 2.41.2. # Generated by GNU Autoconf 2.71 for libgtop 2.41.3.
# #
# Report bugs to <https://gitlab.gnome.org/GNOME/libgtop/-/issues/>. # Report bugs to <https://gitlab.gnome.org/GNOME/libgtop/-/issues/>.
# #
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libgtop' PACKAGE_NAME='libgtop'
PACKAGE_TARNAME='libgtop' PACKAGE_TARNAME='libgtop'
PACKAGE_VERSION='2.41.2' PACKAGE_VERSION='2.41.3'
PACKAGE_STRING='libgtop 2.41.2' PACKAGE_STRING='libgtop 2.41.3'
PACKAGE_BUGREPORT='https://gitlab.gnome.org/GNOME/libgtop/-/issues/' PACKAGE_BUGREPORT='https://gitlab.gnome.org/GNOME/libgtop/-/issues/'
PACKAGE_URL='' PACKAGE_URL=''
@@ -1478,7 +1478,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libgtop 2.41.2 to adapt to many kinds of systems. \`configure' configures libgtop 2.41.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1553,7 +1553,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libgtop 2.41.2:";; short | recursive ) echo "Configuration of libgtop 2.41.3:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -1694,7 +1694,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libgtop configure 2.41.2 libgtop configure 2.41.3
generated by GNU Autoconf 2.71 generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc. Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2110,7 +2110,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libgtop $as_me 2.41.2, which was It was created by libgtop $as_me 2.41.3, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw $ $0$ac_configure_args_raw
@@ -3462,7 +3462,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libgtop' PACKAGE='libgtop'
VERSION='2.41.2' VERSION='2.41.3'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3958,13 +3958,13 @@ LIBGTOP_MAJOR_VERSION=2
LIBGTOP_MINOR_VERSION=41 LIBGTOP_MINOR_VERSION=41
LIBGTOP_MICRO_VERSION=2 LIBGTOP_MICRO_VERSION=3
LIBGTOP_SERVER_VERSION=5 LIBGTOP_SERVER_VERSION=5
LIBGTOP_VERSION=2.41.2 LIBGTOP_VERSION=2.41.3
LIBGTOP_VERSION_CODE=2041002 LIBGTOP_VERSION_CODE=2041003
# libtool versioning # libtool versioning
@@ -21878,13 +21878,13 @@ AM_CPPFLAGS="-I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysde
printf "%s\n" "#define _IN_LIBGTOP 1" >>confdefs.h printf "%s\n" "#define _IN_LIBGTOP 1" >>confdefs.h
printf "%s\n" "#define LIBGTOP_VERSION \"2.41.2\"" >>confdefs.h printf "%s\n" "#define LIBGTOP_VERSION \"2.41.3\"" >>confdefs.h
printf "%s\n" "#define LIBGTOP_SERVER_VERSION \"5\"" >>confdefs.h printf "%s\n" "#define LIBGTOP_SERVER_VERSION \"5\"" >>confdefs.h
printf "%s\n" "#define LIBGTOP_VERSION_CODE 2041002" >>confdefs.h printf "%s\n" "#define LIBGTOP_VERSION_CODE 2041003" >>confdefs.h
printf "%s\n" "#define LIBGTOP_SERVER \"$LIBGTOP_SERVER\"" >>confdefs.h printf "%s\n" "#define LIBGTOP_SERVER \"$LIBGTOP_SERVER\"" >>confdefs.h
@@ -22886,7 +22886,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by libgtop $as_me 2.41.2, which was This file was extended by libgtop $as_me 2.41.3, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -22954,7 +22954,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped' ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\ ac_cs_version="\\
libgtop config.status 2.41.2 libgtop config.status 2.41.3
configured by $0, generated by GNU Autoconf 2.71, configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"
+1 -1
View File
@@ -4,7 +4,7 @@ dnl
m4_define([libgtop_major_version], [2]) m4_define([libgtop_major_version], [2])
m4_define([libgtop_minor_version], [41]) m4_define([libgtop_minor_version], [41])
m4_define([libgtop_micro_version], [2]) m4_define([libgtop_micro_version], [3])
m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version]) m4_define([libgtop_version], [libgtop_major_version.libgtop_minor_version.libgtop_micro_version])
dnl increment if the interface has additions, changes, removals. dnl increment if the interface has additions, changes, removals.
+6
View File
@@ -1,3 +1,9 @@
libgtop2 (2.41.3-1) unstable; urgency=medium
* New upstream release
-- Jeremy Bícha <jbicha@ubuntu.com> Fri, 16 Feb 2024 13:16:32 -0500
libgtop2 (2.41.2-1) unstable; urgency=medium libgtop2 (2.41.2-1) unstable; urgency=medium
[ Jeremy Bícha ] [ Jeremy Bícha ]
+1 -1
View File
@@ -13,7 +13,7 @@ Build-Depends: debhelper-compat (= 13),
libglib2.0-dev (>= 2.6.0), libglib2.0-dev (>= 2.6.0),
libxau-dev, libxau-dev,
libxt-dev, libxt-dev,
pkg-config, pkgconf,
texinfo texinfo
Standards-Version: 4.6.2 Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/gnome-team/libgtop Vcs-Browser: https://salsa.debian.org/gnome-team/libgtop
+1 -1
View File
@@ -1 +1 @@
doc/libgtop2.info usr/share/info/libgtop2.info
+1 -1
View File
@@ -8,7 +8,7 @@ START-INFO-DIR-ENTRY
processes processes
END-INFO-DIR-ENTRY END-INFO-DIR-ENTRY
This is the LibGTop Reference Manual version 2.41.2 (last modified 27 This is the LibGTop Reference Manual version 2.41.3 (last modified 27
November 2016). November 2016).
Copyright 1999 Free Software Foundation, Inc. Copyright 1999 Free Software Foundation, Inc.
+1 -1
View File
@@ -33,7 +33,7 @@
  </p></div></div>   </p></div></div>
</div> </div>
</div></div> </div></div>
<div><p class="releaseinfo">for libgtop <span class="phrase">2.41.2</span></p></div> <div><p class="releaseinfo">for libgtop <span class="phrase">2.41.3</span></p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id-1.1.4"></a><p>Permission is granted to copy, distribute and/or modify <a name="id-1.1.4"></a><p>Permission is granted to copy, distribute and/or modify
this document under the terms of the <em class="citetitle">GNU Free this document under the terms of the <em class="citetitle">GNU Free
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" standalone="no"?> <?xml version="1.0" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<phrase>2.41.2</phrase> <phrase>2.41.3</phrase>
+2 -2
View File
@@ -1,4 +1,4 @@
@set UPDATED 27 November 2016 @set UPDATED 27 November 2016
@set UPDATED-MONTH November 2016 @set UPDATED-MONTH November 2016
@set EDITION 2.41.2 @set EDITION 2.41.3
@set VERSION 2.41.2 @set VERSION 2.41.3
+2 -2
View File
@@ -1,4 +1,4 @@
@set UPDATED 27 November 2016 @set UPDATED 27 November 2016
@set UPDATED-MONTH November 2016 @set UPDATED-MONTH November 2016
@set EDITION 2.41.2 @set EDITION 2.41.3
@set VERSION 2.41.2 @set VERSION 2.41.3
+2
View File
@@ -53,6 +53,8 @@ struct _glibtop_sysinfo
glibtop_entry cpuinfo [GLIBTOP_NCPU]; glibtop_entry cpuinfo [GLIBTOP_NCPU];
}; };
const char *decode_cpu_part(unsigned int part);
#define glibtop_get_sysinfo_r glibtop_get_sysinfo_s #define glibtop_get_sysinfo_r glibtop_get_sysinfo_s
const glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server); const glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
+1 -1
View File
@@ -1,5 +1,5 @@
# Note that this is NOT a relocatable package # Note that this is NOT a relocatable package
%define ver 2.41.2 %define ver 2.41.3
%define RELEASE SNAP %define RELEASE SNAP
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
%define prefix /usr %define prefix /usr
+1 -1
View File
@@ -3,6 +3,6 @@
#define LIBGTOP_MAJOR_VERSION 2 #define LIBGTOP_MAJOR_VERSION 2
#define LIBGTOP_MINOR_VERSION 41 #define LIBGTOP_MINOR_VERSION 41
#define LIBGTOP_MICRO_VERSION 2 #define LIBGTOP_MICRO_VERSION 3
#endif /* LIBGTOPCONFIG_H */ #endif /* LIBGTOPCONFIG_H */
BIN
View File
Binary file not shown.
+5 -5
View File
@@ -12,16 +12,16 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: libgtop\n" "Project-Id-Version: libgtop\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgtop/issues\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libgtop/issues\n"
"POT-Creation-Date: 2023-01-25 20:47+0000\n" "POT-Creation-Date: 2023-08-08 10:47+0000\n"
"PO-Revision-Date: 2017-09-05 07:33+0300\n" "PO-Revision-Date: 2023-10-24 02:11+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n" "Last-Translator: Sabri Ünal <libreajans@gmail.com>\n"
"Language-Team: Türkçe <takim@gnome.org.tr>\n" "Language-Team: Türkçe <takim@gnome.org.tr>\n"
"Language: tr\n" "Language: tr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Gtranslator 2.91.7\n" "X-Generator: Poedit 3.4\n"
#: lib/read.c:49 #: lib/read.c:49
#, c-format #, c-format
@@ -106,7 +106,7 @@ msgstr "Öldür"
#: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36 #: sysdeps/osf1/siglist.c:36 sysdeps/sun4/siglist.c:36
msgid "Bus error" msgid "Bus error"
msgstr "Veriyolu hatası" msgstr "Veri yolu hatası"
#: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37 #: sysdeps/osf1/siglist.c:37 sysdeps/sun4/siglist.c:37
msgid "Segmentation violation" msgid "Segmentation violation"
+14 -8
View File
@@ -61,25 +61,31 @@ handle_parent_connection (int s)
"Parent (%d) received command %lu from client.", "Parent (%d) received command %lu from client.",
getpid (), cmnd->command); getpid (), cmnd->command);
if (cmnd->data_size >= BUFSIZ) {
syslog_message (LOG_WARNING,
"Client sent %lu bytes, but buffer is %lu",
cmnd->data_size, (unsigned long)BUFSIZ);
return;
}
memset (resp, 0, sizeof (glibtop_response)); memset (resp, 0, sizeof (glibtop_response));
memset (parameter, 0, sizeof (parameter)); memset (parameter, 0, sizeof (parameter));
if (cmnd->data_size) { if (cmnd->data_size) {
if (cmnd->data_size >= BUFSIZ) {
syslog_message (LOG_WARNING,
"Client sent %lu bytes, but buffer is %lu",
cmnd->data_size, (unsigned long)BUFSIZ);
return;
}
if (enable_debug) if (enable_debug)
syslog_message (LOG_DEBUG, "Client has %lu bytes of data.", syslog_message (LOG_DEBUG, "Client has %lu bytes of data.",
cmnd->data_size); cmnd->data_size);
do_read (s, parameter, cmnd->data_size); do_read (s, parameter, cmnd->data_size);
} else if (cmnd->size) { } else if (cmnd->size) {
if (cmnd->size >= BUFSIZ) {
syslog_message (LOG_WARNING,
"Client sent %lu bytes, but buffer is %lu",
cmnd->size, (unsigned long)BUFSIZ);
return;
}
memcpy (parameter, cmnd->parameter, cmnd->size); memcpy (parameter, cmnd->parameter, cmnd->size);
} }
+10 -6
View File
@@ -44,22 +44,26 @@ handle_slave_connection (int input, int output)
glibtop_debug ("Slave %d received command " glibtop_debug ("Slave %d received command "
"%lu from client.", getpid (), cmnd->command); "%lu from client.", getpid (), cmnd->command);
if (cmnd->data_size >= BUFSIZ)
glibtop_error ("Client sent %lu bytes, "
"but buffer is %lu",
cmnd->size, (unsigned long)BUFSIZ);
memset (resp, 0, sizeof (glibtop_response)); memset (resp, 0, sizeof (glibtop_response));
memset (parameter, 0, sizeof (parameter)); memset (parameter, 0, sizeof (parameter));
if (cmnd->data_size) { if (cmnd->data_size) {
if (cmnd->data_size >= BUFSIZ)
glibtop_error ("Client sent %lu bytes, "
"but buffer is %lu",
cmnd->data_size, (unsigned long)BUFSIZ);
glibtop_debug ("Client has %lu bytes of data.", glibtop_debug ("Client has %lu bytes of data.",
cmnd->data_size); cmnd->data_size);
do_read (input, parameter, cmnd->data_size); do_read (input, parameter, cmnd->data_size);
} else if (cmnd->size) { } else if (cmnd->size) {
if (cmnd->size >= BUFSIZ)
glibtop_error ("Client sent %lu bytes, "
"but buffer is %lu",
cmnd->size, (unsigned long)BUFSIZ);
memcpy (parameter, cmnd->parameter, cmnd->size); memcpy (parameter, cmnd->parameter, cmnd->size);
} }
+37
View File
@@ -33,6 +33,27 @@ static const unsigned long _glibtop_sysdeps_sysinfo =
static glibtop_sysinfo sysinfo = { .flags = 0 }; static glibtop_sysinfo sysinfo = { .flags = 0 };
/* Lookup table for CPU part decoding */
static const struct {
unsigned int part;
const char *model;
} cpu_part_lookup[] = {
{ 0xd03, "Cortex-A53" }, // Raspberry Pi 3 (BCM2837)
{ 0xd08, "Cortex-A72" }, // Raspberry Pi 4 (BCM2711)
{ 0xd0b, "Cortex-A76" }, // Raspberry Pi 5 (BCM2712)
{ 0x0000, "Unknown" } // Default fallback
};
/* Function to decode CPU part */
const char *decode_cpu_part(unsigned int part) {
for (int i = 0; cpu_part_lookup[i].part != 0x0000; i++) {
if (cpu_part_lookup[i].part == part) {
return cpu_part_lookup[i].model;
}
}
return "Unknown";
}
static void static void
init_sysinfo (glibtop *server) init_sysinfo (glibtop *server)
{ {
@@ -77,6 +98,9 @@ init_sysinfo (glibtop *server)
/* "<key> : <value>" */ /* "<key> : <value>" */
parts = g_strsplit_set(*this_proc, ":\n", 0); parts = g_strsplit_set(*this_proc, ":\n", 0);
unsigned int cpu_part = 0;
gboolean has_model = FALSE;
for(p = parts; *p && *(p+1); p += 2) { for(p = parts; *p && *(p+1); p += 2) {
/* stole the allocated memory */ /* stole the allocated memory */
@@ -85,8 +109,21 @@ init_sysinfo (glibtop *server)
g_ptr_array_add(cpuinfo->labels, key); g_ptr_array_add(cpuinfo->labels, key);
g_hash_table_insert(cpuinfo->values, key, value); g_hash_table_insert(cpuinfo->values, key, value);
/* Extract CPU part */
if (g_strcmp0(key, "CPU part") == 0) {
cpu_part = strtoul(value, NULL, 16);
}
if (g_strcmp0(key, "model name") == 0) {
has_model = TRUE;
}
} }
/* If model name is missing, add it */
if (!has_model && cpu_part != 0) {
const char *decoded_model = decode_cpu_part(cpu_part);
g_hash_table_insert(cpuinfo->values, g_strdup("model name"), g_strdup(decoded_model));
}
/* the last key has no value and has not been added */ /* the last key has no value and has not been added */
if(*p) g_free(*p); if(*p) g_free(*p);