Skip to contentSkip to conversation

package/watchdogd: version bump and major Config.in rewrite

PATCH Superseded Joachim Wiberg 2 participants 12 messages Jan 15, 2024 – Feb 5, 2024

lore
Share & tools
lore
#0 lore raw

cover package/watchdogd: version bump and major Config.in rewrite

Hi,

this patch set upgrades watchdogd to the latest version, a major upgrade with lots of fixes and new features:

https://github.com/troglobit/watchdogd/releases/tag/4.0

One such change is how the configure script used to be --with-plugin=SEC and now is just --with-plugin. This is handled in a separate patch of Config.in, with the legacy migration support from int -> bool.

The split in separate patches for bump and Config.in changes are mostly for clarity, but works because the SEC poll argument was always ignored by the upstream configure script, and the same is true now. (The poll interval has always been set in the /etc/watchdogd.conf file.)

A couple of new optional system monitor plugins were added too, these were added as a separate patch.

Best regards
/Joachim

Joachim Wiberg (3):
package/watchdogd: bump to version 4.0 package/watchdogd: convert Config.in options, int -> bool package/watchdogd: add menuconfig support for new system monitors

 package/watchdogd/Config.in      | 46 ++++++++++++++++++--------------
 package/watchdogd/watchdogd.hash |  4 +--
 package/watchdogd/watchdogd.mk   | 30 ++++++++++++++-------
 3 files changed, 49 insertions(+), 31 deletions(-)

--
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

PATCH 1/3 package/watchdogd: bump to version 4.0

- Major feature upgrade, command line and .conf files compatible
- LICENSE hash update due to update in copyright years

For details, see https://github.com/troglobit/watchdogd/releases/tag/4.0

---
 package/watchdogd/watchdogd.hash | 4 ++--
 package/watchdogd/watchdogd.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
package/watchdogd/watchdogd.hash +2 -2
index 4ff1a3485b..0c228666bd 100644
@@ -1,5 +1,5 @@
 # Upstream .sha256 from GitHub
-sha256  33ec4edc8cb4ada7a4d8324a27d897d33aae5e83257ed64d3d37508825c11237  watchdogd-3.5.tar.gz
+sha256  7f38bc691353a51fc6feb2ccab60417c0284dd3f4d55c50d8b1781fda70d8101  watchdogd-4.0.tar.gz
 
 # Locally calculated
-sha256  fd685e20931174308c45a26418a7ce34d66704c4e4b92ab1d8299deb255cd676  LICENSE
+sha256  e233c56d807c74c67f2eff47ad03c216144cdd374d8d7578b996c28c260eadda  LICENSE
package/watchdogd/watchdogd.mk +1 -1
index ea033b4e71..d140039540 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WATCHDOGD_VERSION = 3.5
+WATCHDOGD_VERSION = 4.0
 WATCHDOGD_SITE = https://github.com/troglobit/watchdogd/releases/download/$(WATCHDOGD_VERSION)
 WATCHDOGD_LICENSE = ISC
 WATCHDOGD_LICENSE_FILES = LICENSE
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 2/3 package/watchdogd: convert Config.in options, int -> bool

In reply to Joachim Wiberg

Enabling the optional system monitor plugins have changed syntax upstream. The --with-foo=SECONDS is now --with-foo.

This patch converts the menuconfig options from int to bool by renaming the config options and adding legacy option conversion support.

---
 package/watchdogd/Config.in    | 36 +++++++++++++++-------------------
 package/watchdogd/watchdogd.mk | 17 ++++++++--------
 2 files changed, 25 insertions(+), 28 deletions(-)
package/watchdogd/Config.in +16 -20
index ca5933848d..db1bee94c2 100644
@@ -27,32 +27,28 @@ config BR2_PACKAGE_WATCHDOGD_TEST_SUITE
 	  They can be used to verify correct operation of watchdogd and
 	  the kernel watchdog driver.
 
-config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
-	int "Generic script monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_GENERIC
+	bool "Generic script monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL != 0 # legacy
 	help
-	  Poll interval for generic script monitor, in seconds.  A value
-	  of zero (0) disables the monitor.
+	  Enable generic script monitor.
 
-config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL
-	int "CPU load average monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_LOADAVG
+	bool "CPU load average monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL != 0 # legacy
 	help
-	  Poll interval for CPU load average monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable CPU load average monitor.
 
-config BR2_PACKAGE_WATCHDOGD_FILENR_POLL
-	int "File descriptor leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_FILENR
+	bool "File descriptor leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_FILENR_POLL != 0 # legacy
 	help
-	  Poll interval for file descriptor leak monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable file descriptor leak monitor.
 
-config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL
-	int "Memory leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_MEMINFO
+	bool "Memory leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL != 0 # legacy
 	help
-	  Poll interval for memory leak monitor, in seconds.  A value of
-	  zero (0) disables the monitor.
+	  Enable memory leak monitor.
 
 endif
package/watchdogd/watchdogd.mk +9 -8
index d140039540..9af71dbfaa 100644
@@ -20,28 +20,29 @@ else
 WATCHDOGD_CONF_OPTS += --enable-builtin-tests
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC),y)
 WATCHDOGD_CONF_OPTS += --without-generic
 else
-WATCHDOGD_CONF_OPTS += --with-generic=$(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL)
+WATCHDOGD_CONF_OPTS += --with-generic
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG),y)
 WATCHDOGD_CONF_OPTS += --without-loadavg
 else
-WATCHDOGD_CONF_OPTS += --with-loadavg=$(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL)
+WATCHDOGD_CONF_OPTS += --with-loadavg
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR),y)
 WATCHDOGD_CONF_OPTS += --without-filenr
 else
-WATCHDOGD_CONF_OPTS += --with-filenr=$(BR2_PACKAGE_WATCHDOGD_FILENR_POLL)
+WATCHDOGD_CONF_OPTS += --with-filenr
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO),y)
 WATCHDOGD_CONF_OPTS += --without-meminfo
 else
-WATCHDOGD_CONF_OPTS += --with-meminfo=$(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL)
+WATCHDOGD_CONF_OPTS += --with-meminfo
+endif
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 2/3] package/watchdogd: convert Config.in options, int -> bool

On 2024-01-15 08:41 +0100, Joachim Wiberg spake thusly:

Quoted 5 lines

Enabling the optional system monitor plugins have changed syntax upstream. The --with-foo=SECONDS is now --with-foo.

This patch converts the menuconfig options from int to bool by renaming the config options and adding legacy option conversion support.

This change should be done as part of the version bump. Indeed, if the version bump was applied but not this path (see below why), the .mk would not set the proper options at build time.

So this really belongs to the version bump, and I was about to merge the two together, when...

    $ make check-package
    package/watchdogd/Config.in:32: BR2_PACKAGE_WATCHDOGD_GENERIC_POLL referenced but not defined
    package/watchdogd/Config.in:38: BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL referenced but not defined
    package/watchdogd/Config.in:44: BR2_PACKAGE_WATCHDOGD_FILENR_POLL referenced but not defined
    package/watchdogd/Config.in:50: BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL referenced but not defined

...

Quoted 11 lines
---
 package/watchdogd/Config.in    | 36 +++++++++++++++-------------------
 package/watchdogd/watchdogd.mk | 17 ++++++++--------
 2 files changed, 25 insertions(+), 28 deletions(-)
package/watchdogd/Config.in +0 -0
index ca5933848d..db1bee94c2 100644

package/watchdogd/Config.in config BR2_PACKAGE_WATCHDOGD_TEST_SUITE · line 32

Quoted 9 lines
package/watchdogd/Config.in +3 -3
@@ -27,32 +27,28 @@ config BR2_PACKAGE_WATCHDOGD_TEST_SUITE
 	  They can be used to verify correct operation of watchdogd and
 	  the kernel watchdog driver.
 
-config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
-	int "Generic script monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_GENERIC
+	bool "Generic script monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL != 0 # legacy

... Indeed BR2_PACKAGE_WATCHDOGD_GENERIC_POLL is the old config option name. but it is now defined nowhere.

When we want to handle legacy symbols, we add the old symbols to the top-level Config.in.legacy file. For boolweans, it is trivial, but for int (or strings) we need a little trick, like (adapt the help text as appropriate, I'm mostly making the reason up):

Config.in.legacy:

config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
int
default 0
help
The BR2_PACKAGE_WATCHDOGD_GENERIC_POLL value is now runtime configurable, and only the generic feature is configurable with BR2_PACKAGE_WATCHDOGD_GENERIC.

config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL_WRAP
bool
default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL != 0 select BR2_LEGACY

And then in the package Config.in, what you did is OK.

Care to fix up, squash patches 1 and 2, and respin, please?

Regards,
Yann E. MORIN.

Quoted 88 lines
package/watchdogd/Config.in +13 -17
 	help
-	  Poll interval for generic script monitor, in seconds.  A value
-	  of zero (0) disables the monitor.
+	  Enable generic script monitor.
 
-config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL
-	int "CPU load average monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_LOADAVG
+	bool "CPU load average monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL != 0 # legacy
 	help
-	  Poll interval for CPU load average monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable CPU load average monitor.
 
-config BR2_PACKAGE_WATCHDOGD_FILENR_POLL
-	int "File descriptor leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_FILENR
+	bool "File descriptor leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_FILENR_POLL != 0 # legacy
 	help
-	  Poll interval for file descriptor leak monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable file descriptor leak monitor.
 
-config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL
-	int "Memory leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_MEMINFO
+	bool "Memory leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL != 0 # legacy
 	help
-	  Poll interval for memory leak monitor, in seconds.  A value of
-	  zero (0) disables the monitor.
+	  Enable memory leak monitor.
 
 endif
package/watchdogd/watchdogd.mk +9 -8
index d140039540..9af71dbfaa 100644
@@ -20,28 +20,29 @@ else
 WATCHDOGD_CONF_OPTS += --enable-builtin-tests
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC),y)
 WATCHDOGD_CONF_OPTS += --without-generic
 else
-WATCHDOGD_CONF_OPTS += --with-generic=$(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL)
+WATCHDOGD_CONF_OPTS += --with-generic
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG),y)
 WATCHDOGD_CONF_OPTS += --without-loadavg
 else
-WATCHDOGD_CONF_OPTS += --with-loadavg=$(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL)
+WATCHDOGD_CONF_OPTS += --with-loadavg
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR),y)
 WATCHDOGD_CONF_OPTS += --without-filenr
 else
-WATCHDOGD_CONF_OPTS += --with-filenr=$(BR2_PACKAGE_WATCHDOGD_FILENR_POLL)
+WATCHDOGD_CONF_OPTS += --with-filenr
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL),0)
+ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO),y)
 WATCHDOGD_CONF_OPTS += --without-meminfo
 else
-WATCHDOGD_CONF_OPTS += --with-meminfo=$(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL)
+WATCHDOGD_CONF_OPTS += --with-meminfo
+endif
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 2/3] package/watchdogd: convert Config.in options, int -> bool

Yann,

thank you for taking the time to review my patch! I'll do a respin and send to the list later today.

Quoted 22 lines · Yann E. MORIN

On 2024-01-15 08:41 +0100, Joachim Wiberg spake thusly:

Quoted 4 lines

[snip]
This patch converts the menuconfig options from int to bool by renaming the config options and adding legacy option conversion support.

This change should be done as part of the version bump. Indeed, if the version bump was applied but not this path (see below why), the .mk would not set the proper options at build time.

So this really belongs to the version bump, and I was about to merge the two together, when...

    $ make check-package
    package/watchdogd/Config.in:32:
BR2_PACKAGE_WATCHDOGD_GENERIC_POLL referenced but not defined
    package/watchdogd/Config.in:38:
BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL referenced but not defined
    package/watchdogd/Config.in:44: BR2_PACKAGE_WATCHDOGD_FILENR_POLL
referenced but not defined
    package/watchdogd/Config.in:50:
BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL referenced but not defined
Quoted 3 lines

[snip]
... Indeed BR2_PACKAGE_WATCHDOGD_GENERIC_POLL is the old config option name. but it is now defined nowhere.

Ouch, didn't think of that, thanks!

Quoted 15 lines

When we want to handle legacy symbols, we add the old symbols to the top-level Config.in.legacy file. For boolweans, it is trivial, but for int (or strings) we need a little trick, like (adapt the help text as appropriate, I'm mostly making the reason up):

    Config.in.legacy:

    config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
        int
        default 0
        help
          The BR2_PACKAGE_WATCHDOGD_GENERIC_POLL value is now runtime configurable, and only the generic feature is configurable with BR2_PACKAGE_WATCHDOGD_GENERIC.

Quoted 4 lines

    config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL_WRAP bool
        default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL != 0 select BR2_LEGACY

Ahaaa, yeah I was hoping to get some guidance on that part. Great!

Quoted 1 line

Care to fix up, squash patches 1 and 2, and respin, please?

Absolutely, v2 coming up!

/J

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw

v2 cover package/watchdogd: slightly messy bump to v4.0

In reply to Yann E. MORIN

Second take,

this patch set upgrades watchdogd to the latest version, a major upgrade with lots of fixes and new features:

https://github.com/troglobit/watchdogd/releases/tag/4.0

One messy change is the configure script change from --with-plugin=SEC to just --with-plugin. I almost got it right in v1 of this series and with the help from Yann's review, this migration is now handled in the same patch as the version bump, to gracefully migrate legacy options.

A couple of new optional system monitor plugins were introduce in the new release, Config.in support for these are in a separate patch.

Best regards
/Joachim

 Config.in.legacy                 | 58 ++++++++++++++++++++++++++++++++
 package/watchdogd/Config.in      | 46 ++++++++++++++-----------
 package/watchdogd/watchdogd.hash |  4 +--
 package/watchdogd/watchdogd.mk   | 30 ++++++++++++-----
 4 files changed, 107 insertions(+), 31 deletions(-)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

PATCH v2 1/2 package/watchdogd: bump to version 4.0

For details, see https://github.com/troglobit/watchdogd/releases/tag/4.0

- Major feature upgrade, command line and .conf files compatible
- LICENSE hash update due to update in copyright years
- Enabling system monitor plugins have changed syntax upstream. The --with-foo=SECONDS is now just --with-foo

This last upstream change require converting affected Config.in options from int -> bool. Legacy _WRAP:ers have been added to Config.legacy.in, modeled on BR2_TARGET_ROOTFS_EXT2_BLOCKS.

---
 Config.in.legacy                 | 58 ++++++++++++++++++++++++++++++++
 package/watchdogd/Config.in      | 36 +++++++++-----------
 package/watchdogd/watchdogd.hash |  4 +--
 package/watchdogd/watchdogd.mk   | 19 ++++++-----
 4 files changed, 86 insertions(+), 31 deletions(-)
Config.in.legacy +58 -0
index 82387338d9..b6e72d0f24 100644
@@ -202,6 +202,64 @@ config BR2_KERNEL_HEADERS_6_5
 	  Version 6.5.x of the Linux kernel headers are no longer
 	  maintained upstream and are now removed.
 
+config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
+	int "watchdogd generic poll has been replaced"
+	default 0
+	help
+	  The generic script poll interval has been replaced upstream
+	  with a boolean on/off.  Your configuration has been migrated.
+
+	  Set this legacy option to 0 here to remove the warning.
+
+config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL_WRAP
+	bool
+	default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL != 0
+	select BR2_LEGACY
+
+config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL
+	int "watchdogd loadavg poll has been replaced"
+	default 0
+	help
+	  The CPU load average poll interval has been replaced upstream
+	  with a boolean on/off.  Your configuration has been migrated.
+
+	  Set this legacy option to 0 here to remove the warning.
+
+config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL_WRAP
+	bool
+	default y if BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL != 0
+	select BR2_LEGACY
+
+config BR2_PACKAGE_WATCHDOGD_FILENR_POLL
+	int "watchdogd filenr poll has been replaced"
+	default 0
+	help
+	  The file descriptor leak poll has been replaced upstream with
+	  a boolean on/off.  Your configuration has been migrated.
+
+	  Set this legacy option to 0 here to remove the warning.
+
+config BR2_PACKAGE_WATCHDOGD_FILENR_POLL_WRAP
+	bool
+	default y if BR2_PACKAGE_WATCHDOGD_FILENR_POLL != 0
+	select BR2_LEGACY
+
+config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL
+	int "watchdogd meminfo poll has been replaced"
+	default 0
+	help
+	  The memleak detector poll interval has been replaced upstream
+	  with a boolean on/off.  Your configuration has been migrated.
+
+	  Set this legacy option to 0 here to remove the warning.
+
+config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL_WRAP
+	bool
+	default y if BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL != 0
+	select BR2_LEGACY
+
+# Note: BR2_PACKAGE_WATCHDOGD_*_POLL still referenced in package/watchdogd/Config.in
+
 comment "Legacy options removed in 2023.11"
 
 config BR2_PACKAGE_PYTHON_PYXB
package/watchdogd/Config.in +16 -20
index ca5933848d..0b0480ea27 100644
@@ -27,32 +27,28 @@ config BR2_PACKAGE_WATCHDOGD_TEST_SUITE
 	  They can be used to verify correct operation of watchdogd and
 	  the kernel watchdog driver.
 
-config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
-	int "Generic script monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_GENERIC
+	bool "Generic script monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for generic script monitor, in seconds.  A value
-	  of zero (0) disables the monitor.
+	  Enable generic script monitor.
 
-config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL
-	int "CPU load average monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_LOADAVG
+	bool "CPU load average monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for CPU load average monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable CPU load average monitor.
 
-config BR2_PACKAGE_WATCHDOGD_FILENR_POLL
-	int "File descriptor leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_FILENR
+	bool "File descriptor leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_FILENR_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for file descriptor leak monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable file descriptor leak monitor.
 
-config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL
-	int "Memory leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_MEMINFO
+	bool "Memory leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for memory leak monitor, in seconds.  A value of
-	  zero (0) disables the monitor.
+	  Enable memory leak monitor.
 
 endif
package/watchdogd/watchdogd.hash +2 -2
index 4ff1a3485b..0c228666bd 100644
@@ -1,5 +1,5 @@
 # Upstream .sha256 from GitHub
-sha256  33ec4edc8cb4ada7a4d8324a27d897d33aae5e83257ed64d3d37508825c11237  watchdogd-3.5.tar.gz
+sha256  7f38bc691353a51fc6feb2ccab60417c0284dd3f4d55c50d8b1781fda70d8101  watchdogd-4.0.tar.gz
 
 # Locally calculated
-sha256  fd685e20931174308c45a26418a7ce34d66704c4e4b92ab1d8299deb255cd676  LICENSE
+sha256  e233c56d807c74c67f2eff47ad03c216144cdd374d8d7578b996c28c260eadda  LICENSE
package/watchdogd/watchdogd.mk +10 -9
index ea033b4e71..2e67c2847e 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WATCHDOGD_VERSION = 3.5
+WATCHDOGD_VERSION = 4.0
 WATCHDOGD_SITE = https://github.com/troglobit/watchdogd/releases/download/$(WATCHDOGD_VERSION)
 WATCHDOGD_LICENSE = ISC
 WATCHDOGD_LICENSE_FILES = LICENSE
@@ -20,28 +20,29 @@ else
 WATCHDOGD_CONF_OPTS += --enable-builtin-tests
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_GENERIC),y)
 WATCHDOGD_CONF_OPTS += --without-generic
 else
-WATCHDOGD_CONF_OPTS += --with-generic=$(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL)
+WATCHDOGD_CONF_OPTS += --with-generic
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG),y)
 WATCHDOGD_CONF_OPTS += --without-loadavg
 else
-WATCHDOGD_CONF_OPTS += --with-loadavg=$(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL)
+WATCHDOGD_CONF_OPTS += --with-loadavg
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_FILENR),y)
 WATCHDOGD_CONF_OPTS += --without-filenr
 else
-WATCHDOGD_CONF_OPTS += --with-filenr=$(BR2_PACKAGE_WATCHDOGD_FILENR_POLL)
+WATCHDOGD_CONF_OPTS += --with-filenr
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO),y)
 WATCHDOGD_CONF_OPTS += --without-meminfo
 else
-WATCHDOGD_CONF_OPTS += --with-meminfo=$(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL)
+WATCHDOGD_CONF_OPTS += --with-meminfo
+endif
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw

Re: [Buildroot] [PATCH v2 1/2] package/watchdogd: bump to version 4.0

Joachim, All,

On 2024-01-30 22:56 +0100, Joachim Wiberg spake thusly:

Quoted 7 lines

For details, see https://github.com/troglobit/watchdogd/releases/tag/4.0

- Major feature upgrade, command line and .conf files compatible
- LICENSE hash update due to update in copyright years
- Enabling system monitor plugins have changed syntax upstream. The --with-foo=SECONDS is now just --with-foo

Quoted 6 lines

This last upstream change require converting affected Config.in options from int -> bool. Legacy _WRAP:ers have been added to Config.legacy.in, modeled on BR2_TARGET_ROOTFS_EXT2_BLOCKS.

---

[--SNIP--]

Quoted 6 lines
Config.in.legacy +0 -0
index 82387338d9..b6e72d0f24 100644
@@ -202,6 +202,64 @@ config BR2_KERNEL_HEADERS_6_5
 	  Version 6.5.x of the Linux kernel headers are no longer

Config.in.legacy config BR2_KERNEL_HEADERS_6_5 · line 212

Quoted 10 lines
Config.in.legacy +8 -0
 	  maintained upstream and are now removed.
 
+config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
+	int "watchdogd generic poll has been replaced"
+	default 0
+	help
+	  The generic script poll interval has been replaced upstream
+	  with a boolean on/off.  Your configuration has been migrated.
+
+	  Set this legacy option to 0 here to remove the warning.

[--SNIP--]

Config.in.legacy config BR2_KERNEL_HEADERS_6_5 · line 261

Quoted 1 line
Config.in.legacy +1 -0
+# Note: BR2_PACKAGE_WATCHDOGD_*_POLL still referenced in package/watchdogd/Config.in

This comment is wrong: it's the _WRAP options that are referenced. So I changed it. I also duplicated right above each such option so it's easier to spot rather than a lone comment way below (I know you did like the existing ext legacy, but that does not prevent improving! ;-) ).

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 126 lines
Config.in.legacy +0 -0
 comment "Legacy options removed in 2023.11"
 
 config BR2_PACKAGE_PYTHON_PYXB
package/watchdogd/Config.in +16 -20
index ca5933848d..0b0480ea27 100644
@@ -27,32 +27,28 @@ config BR2_PACKAGE_WATCHDOGD_TEST_SUITE
 	  They can be used to verify correct operation of watchdogd and
 	  the kernel watchdog driver.
 
-config BR2_PACKAGE_WATCHDOGD_GENERIC_POLL
-	int "Generic script monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_GENERIC
+	bool "Generic script monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_GENERIC_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for generic script monitor, in seconds.  A value
-	  of zero (0) disables the monitor.
+	  Enable generic script monitor.
 
-config BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL
-	int "CPU load average monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_LOADAVG
+	bool "CPU load average monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for CPU load average monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable CPU load average monitor.
 
-config BR2_PACKAGE_WATCHDOGD_FILENR_POLL
-	int "File descriptor leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_FILENR
+	bool "File descriptor leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_FILENR_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for file descriptor leak monitor, in seconds.  A
-	  value of zero (0) disables the monitor.
+	  Enable file descriptor leak monitor.
 
-config BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL
-	int "Memory leak monitor poll interval (sec)"
-	default "300"
+config BR2_PACKAGE_WATCHDOGD_MEMINFO
+	bool "Memory leak monitor"
+	default y if BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL_WRAP # legacy 2024.02
 	help
-	  Poll interval for memory leak monitor, in seconds.  A value of
-	  zero (0) disables the monitor.
+	  Enable memory leak monitor.
 
 endif
package/watchdogd/watchdogd.hash +2 -2
index 4ff1a3485b..0c228666bd 100644
@@ -1,5 +1,5 @@
 # Upstream .sha256 from GitHub
-sha256  33ec4edc8cb4ada7a4d8324a27d897d33aae5e83257ed64d3d37508825c11237  watchdogd-3.5.tar.gz
+sha256  7f38bc691353a51fc6feb2ccab60417c0284dd3f4d55c50d8b1781fda70d8101  watchdogd-4.0.tar.gz
 
 # Locally calculated
-sha256  fd685e20931174308c45a26418a7ce34d66704c4e4b92ab1d8299deb255cd676  LICENSE
+sha256  e233c56d807c74c67f2eff47ad03c216144cdd374d8d7578b996c28c260eadda  LICENSE
package/watchdogd/watchdogd.mk +10 -9
index ea033b4e71..2e67c2847e 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WATCHDOGD_VERSION = 3.5
+WATCHDOGD_VERSION = 4.0
 WATCHDOGD_SITE = https://github.com/troglobit/watchdogd/releases/download/$(WATCHDOGD_VERSION)
 WATCHDOGD_LICENSE = ISC
 WATCHDOGD_LICENSE_FILES = LICENSE
@@ -20,28 +20,29 @@ else
 WATCHDOGD_CONF_OPTS += --enable-builtin-tests
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_GENERIC),y)
 WATCHDOGD_CONF_OPTS += --without-generic
 else
-WATCHDOGD_CONF_OPTS += --with-generic=$(BR2_PACKAGE_WATCHDOGD_GENERIC_POLL)
+WATCHDOGD_CONF_OPTS += --with-generic
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_LOADAVG),y)
 WATCHDOGD_CONF_OPTS += --without-loadavg
 else
-WATCHDOGD_CONF_OPTS += --with-loadavg=$(BR2_PACKAGE_WATCHDOGD_LOADAVG_POLL)
+WATCHDOGD_CONF_OPTS += --with-loadavg
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_FILENR_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_FILENR),y)
 WATCHDOGD_CONF_OPTS += --without-filenr
 else
-WATCHDOGD_CONF_OPTS += --with-filenr=$(BR2_PACKAGE_WATCHDOGD_FILENR_POLL)
+WATCHDOGD_CONF_OPTS += --with-filenr
 endif
 
-ifeq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL),0)
+ifneq ($(BR2_PACKAGE_WATCHDOGD_MEMINFO),y)
 WATCHDOGD_CONF_OPTS += --without-meminfo
 else
-WATCHDOGD_CONF_OPTS += --with-meminfo=$(BR2_PACKAGE_WATCHDOGD_MEMINFO_POLL)
+WATCHDOGD_CONF_OPTS += --with-meminfo
+endif
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#8 lore raw

Re: [Buildroot] [PATCH v2 1/2] package/watchdogd: bump to version 4.0

In reply to Joachim Wiberg

Joachim, All,

On 2024-01-30 22:56 +0100, Joachim Wiberg spake thusly:

Quoted 7 lines

For details, see https://github.com/troglobit/watchdogd/releases/tag/4.0

- Major feature upgrade, command line and .conf files compatible
- LICENSE hash update due to update in copyright years
- Enabling system monitor plugins have changed syntax upstream. The --with-foo=SECONDS is now just --with-foo

Quoted 6 lines

This last upstream change require converting affected Config.in options from int -> bool. Legacy _WRAP:ers have been added to Config.legacy.in, modeled on BR2_TARGET_ROOTFS_EXT2_BLOCKS.

---

[--SNIP--]

Quoted 14 lines
package/watchdogd/watchdogd.mk +1 -1
index ea033b4e71..2e67c2847e 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WATCHDOGD_VERSION = 3.5
+WATCHDOGD_VERSION = 4.0
 WATCHDOGD_SITE = https://github.com/troglobit/watchdogd/releases/download/$(WATCHDOGD_VERSION)
 WATCHDOGD_LICENSE = ISC
 WATCHDOGD_LICENSE_FILES = LICENSE

package/watchdogd/watchdogd.mk else · line 21

Quoted 2 lines
package/watchdogd/watchdogd.mk +0 -0
@@ -20,28 +20,29 @@ else
 WATCHDOGD_CONF_OPTS += --enable-builtin-tests
 endif

I also added explicit --without-XXX options for the new monitors, by the way.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#9 lore raw

PATCH v2 2/2 package/watchdogd: add menuconfig support for new system monitors

In reply to Joachim Wiberg
---
 package/watchdogd/Config.in    | 10 ++++++++++
 package/watchdogd/watchdogd.mk | 11 +++++++++++
 2 files changed, 21 insertions(+)
package/watchdogd/Config.in +10 -0
index 0b0480ea27..0aeaad165f 100644
@@ -51,4 +51,14 @@ config BR2_PACKAGE_WATCHDOGD_MEMINFO
 	help
 	  Enable memory leak monitor.
 
+config BR2_PACKAGE_WATCHDOGD_FSMON
+	bool "File system monitor"
+	help
+	  Enable file system monitor.
+
+config BR2_PACKAGE_WATCHDOGD_TEMPMON
+	bool "Temperature monitor"
+	help
+	  Enable temperature monitor.
+
 endif
package/watchdogd/watchdogd.mk +11 -0
index 2e67c2847e..9d06b04bd3 100644
@@ -43,6 +43,17 @@ WATCHDOGD_CONF_OPTS += --without-meminfo
 else
 WATCHDOGD_CONF_OPTS += --with-meminfo
 endif
+
+ifneq ($(BR2_PACKAGE_WATCHDOGD_FSMON),y)
+WATCHDOGD_CONF_OPTS += --without-fsmon
+else
+WATCHDOGD_CONF_OPTS += --with-fsmon
+endif
+
+ifneq ($(BR2_PACKAGE_WATCHDOGD_TEMPMON),y)
+WATCHDOGD_CONF_OPTS += --without-tempmon
+else
+WATCHDOGD_CONF_OPTS += --with-tempmon
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

Re: [Buildroot] [PATCH v2 2/2] package/watchdogd: add menuconfig support for new system monitors

Joachim, All,

On 2024-01-30 22:56 +0100, Joachim Wiberg spake thusly:

Quoted 1 line

Applied to master after dropping the explicit --without-XX I introduced in the previous patch, thanks. (please check I did not bork anything!)

Regards,
Yann E. MORIN.

Quoted 53 lines
---
 package/watchdogd/Config.in    | 10 ++++++++++
 package/watchdogd/watchdogd.mk | 11 +++++++++++
 2 files changed, 21 insertions(+)
package/watchdogd/Config.in +10 -0
index 0b0480ea27..0aeaad165f 100644
@@ -51,4 +51,14 @@ config BR2_PACKAGE_WATCHDOGD_MEMINFO
 	help
 	  Enable memory leak monitor.
 
+config BR2_PACKAGE_WATCHDOGD_FSMON
+	bool "File system monitor"
+	help
+	  Enable file system monitor.
+
+config BR2_PACKAGE_WATCHDOGD_TEMPMON
+	bool "Temperature monitor"
+	help
+	  Enable temperature monitor.
+
 endif
package/watchdogd/watchdogd.mk +11 -0
index 2e67c2847e..9d06b04bd3 100644
@@ -43,6 +43,17 @@ WATCHDOGD_CONF_OPTS += --without-meminfo
 else
 WATCHDOGD_CONF_OPTS += --with-meminfo
 endif
+
+ifneq ($(BR2_PACKAGE_WATCHDOGD_FSMON),y)
+WATCHDOGD_CONF_OPTS += --without-fsmon
+else
+WATCHDOGD_CONF_OPTS += --with-fsmon
+endif
+
+ifneq ($(BR2_PACKAGE_WATCHDOGD_TEMPMON),y)
+WATCHDOGD_CONF_OPTS += --without-tempmon
+else
+WATCHDOGD_CONF_OPTS += --with-tempmon
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#11 lore raw

PATCH 3/3 package/watchdogd: add menuconfig support for new system monitors

In reply to Joachim Wiberg
---
 package/watchdogd/Config.in    | 10 ++++++++++
 package/watchdogd/watchdogd.mk | 11 +++++++++++
 2 files changed, 21 insertions(+)
package/watchdogd/Config.in +10 -0
index db1bee94c2..2cac60971f 100644
@@ -51,4 +51,14 @@ config BR2_PACKAGE_WATCHDOGD_MEMINFO
 	help
 	  Enable memory leak monitor.
 
+config BR2_PACKAGE_WATCHDOGD_FSMON
+	bool "File system monitor"
+	help
+	  Enable file system monitor.
+
+config BR2_PACKAGE_WATCHDOGD_TEMPMON
+	bool "Temperature monitor"
+	help
+	  Enable temperature monitor.
+
 endif
package/watchdogd/watchdogd.mk +11 -0
index 9af71dbfaa..4c94926280 100644
@@ -43,6 +43,17 @@ WATCHDOGD_CONF_OPTS += --without-meminfo
 else
 WATCHDOGD_CONF_OPTS += --with-meminfo
 endif
+
+ifeq ($(BR2_PACKAGE_WATCHDOGD_FSMON),y)
+WATCHDOGD_CONF_OPTS += --without-fsmon
+else
+WATCHDOGD_CONF_OPTS += --with-fsmon
+endif
+
+ifeq ($(BR2_PACKAGE_WATCHDOGD_TEMPMON),y)
+WATCHDOGD_CONF_OPTS += --without-tempmon
+else
+WATCHDOGD_CONF_OPTS += --with-tempmon
 endif
 
 define WATCHDOGD_INSTALL_INIT_SYSV
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot