Skip to contentSkip to conversation

package/atop: bump to version 2.10.0 - Added a new dependency - libglib2 - Remove 0001-atop.h-include-time.h.patch. It was applied upstream (https://github.com/Atoptool/atop/commit/03c5c4dd29bc7590baccb55a36d61e7f4b39c1fe).

PATCH In review Kadambini Nema 2 participants 2 messages Feb 12, 2024 – Aug 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/atop: bump to version 2.10.0 - Added a new dependency - libglib2 - Remove 0001-atop.h-include-time.h.patch. It was applied upstream (https://github.com/Atoptool/atop/commit/03c5c4dd29bc7590baccb55a36d61e7f4b39c1fe).

---
 package/atop/0001-atop.h-include-time.h.patch | 41 -------------------
 package/atop/Config.in                        |  1 +
 package/atop/atop.hash                        |  2 +-
 package/atop/atop.mk                          | 10 +++--
 4 files changed, 8 insertions(+), 46 deletions(-)
 delete mode 100644 package/atop/0001-atop.h-include-time.h.patch
package/atop/0001-atop.h-include-time.h.patch deleted +0 -41
deleted file mode 100644
index 2b8a390e71..0000000000
@@ -1,41 +0,0 @@
-From 03c5c4dd29bc7590baccb55a36d61e7f4b39c1fe Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Sun, 29 Oct 2023 18:56:35 +0100
-Subject: [PATCH] atop.h: include time.h
-
-Include time.h to avoid the following build failure with musl:
-
-atop.h:157:1: error: unknown type name 'time_t'
-  157 | time_t          normalize_epoch(time_t, long);
-      | ^~~~~~
-atop.h:157:1: note: 'time_t' is defined in header '<time.h>'; did you forget to '#include <time.h>'?
-atop.h:157:40: error: expected ')' before 'long'
-  157 | time_t          normalize_epoch(time_t, long);
-      |                                        ^~~~~
-      |                                        )
-
-Fixes:
- - http://autobuild.buildroot.org/results/e7ec8d16f2299320f374a0198c8e9b18a102b037
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-Upstream: https://github.com/Atoptool/atop/pull/280
----
- atop.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/atop.h b/atop.h
-index 9274fc5..3d5fea4 100644
---- a/atop.h
-+++ b/atop.h
-@@ -24,6 +24,8 @@
- #ifndef __ATOP__
- #define __ATOP__
- 
-+#include <time.h>
-+
- #define	EQ		0
- #define SECONDSINDAY	86400
- #define RAWNAMESZ	256
--- 
-2.42.0
-
package/atop/Config.in +1 -0
index b8ee30c306..c00281fc47 100644
@@ -6,6 +6,7 @@ config BR2_PACKAGE_ATOP
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_NCURSES_WCHAR
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBGLIB2
 	help
 	  Atop is an ASCII full-screen performance monitor for Linux
 	  that is capable of reporting the activity of all processes
package/atop/atop.hash +1 -1
index 0b7ee061dd..a6539e6211 100644
@@ -1,5 +1,5 @@
 # Locally computed:
-sha256  8d82f211b712a227000ef254c0a2b53bcb71235bf40d93316acce80b04bff926  atop-2.9.0.tar.gz
+sha256  e7a673cf2c82578e7dd82ecb0dec83fd9ecb30828b2561c28a9fa5aaf75d5f93  atop-2.10.0.tar.gz
 
 # Hash for license file:
 sha256  204d8eff92f95aac4df6c8122bc1505f468f3a901e5a4cc08940e0ede1938994  COPYING
package/atop/atop.mk +6 -4
index 27cd537f64..6c40805eb7 100644
@@ -4,21 +4,23 @@
 #
 ################################################################################
 
-ATOP_VERSION = 2.9.0
+ATOP_VERSION = 2.10.0
 ATOP_SITE = http://www.atoptool.nl/download
 ATOP_LICENSE = GPL-2.0+
 ATOP_LICENSE_FILES = COPYING
 ATOP_CPE_ID_VALID = YES
-ATOP_DEPENDENCIES = ncurses zlib
+ATOP_DEPENDENCIES = ncurses zlib libglib2
 
-ATOP_CFLAGS = $(TARGET_CFLAGS)
+ATOP_CFLAGS = $(TARGET_CFLAGS) -O2 -I. -Wall $(shell $(HOST_DIR)/bin/pkg-config --cflags  glib-2.0)  -Wno-stringop-truncation -Wmissing-prototypes -Wmissing-declarations -Wformat-security
+
+ATOP_LDFLAGS = $(TARGET_LDFLAGS) $(shell $(HOST_DIR)/bin/pkg-config --libs glib-2.0)
 
 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
 ATOP_CFLAGS += -O0
 endif
 
 define ATOP_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ATOP_CFLAGS)" \
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ATOP_CFLAGS)" LDFLAGS="$(ATOP_LDFLAGS)" \
 		-C $(@D)
 endef
 
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 8 lines · On Sun, 11 Feb 2024 19:47:57 -0800 Kadambini Nema <[email protected]>…
---
 package/atop/0001-atop.h-include-time.h.patch | 41 -------------------
 package/atop/Config.in                        |  1 +
 package/atop/atop.hash                        |  2 +-
 package/atop/atop.mk                          | 10 +++--
 4 files changed, 8 insertions(+), 46 deletions(-)
 delete mode 100644 package/atop/0001-atop.h-include-time.h.patch

Thanks, I've applied.

There was an issue in your commit log: the whole message was on one single line, while it should have been split. A proper commit message had a title (reasonably short), then an empty new line, then one or more paragraphs of additional explanation. Check all other commit logs in Buildroot.

Another issue was that you forgot the host-pkgconf dependency, which is needed as atop's Makefile uses pkg-config to find glib.

Finally, the duplication of CFLAGS/LDFLAGS from atop's Makefile into atop.mk wasn't really nice. So instead I cooked a patch, submitted upstream, which allows atop.mk to pass additional CFLAGS/LDFLAGS without overriding them.

You can have a look at the final commit at:

https://gitlab.com/buildroot.org/buildroot/-/commit/beb54d8126e7b0fd2e1090061aa96e6487c4b697

Thanks a lot for your contribution, and sorry for the huge amount of time it took us to look into your patch.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot