diff mbox series

[2/2] package/sysprof: update to version 46.0

Message ID 20240627220223.6687-3-aperez@igalia.com
State Accepted
Headers show
Series Update Sysprof to the latest release | expand

Commit Message

Adrian Perez de Castro June 27, 2024, 10:02 p.m. UTC
Bring Sysprof twelve years into the future by updating it to the most
recent release. The GUI now uses GTK4, for which there is not yet a
package, so for now the option is removed.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 .../sysprof/0001-define-NT_GNU_BUILD_ID.patch | 22 -----------
 package/sysprof/Config.in                     | 37 ++++++++-----------
 package/sysprof/sysprof.hash                  |  8 ++--
 package/sysprof/sysprof.mk                    | 26 +++++++++----
 4 files changed, 40 insertions(+), 53 deletions(-)
 delete mode 100644 package/sysprof/0001-define-NT_GNU_BUILD_ID.patch

Comments

Thomas Petazzoni July 12, 2024, 3:37 p.m. UTC | #1
Hello Adrian,

On Fri, 28 Jun 2024 01:02:19 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> Bring Sysprof twelve years into the future by updating it to the most
> recent release. The GUI now uses GTK4, for which there is not yet a
> package, so for now the option is removed.
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>

Would you want to be added in the DEVELOPERS file for this package? You
just did a big bump, it would make sense if you helped fixing the build
failures that might results for this bump :-)

> diff --git a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
> deleted file mode 100644
> index dcc2cbe67cc..00000000000
> --- a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
> +++ /dev/null

Dropping this patch required an updated in .checkpackageignore.


> diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in
> index 3913274be4f..4ea1d3ebf1d 100644
> --- a/package/sysprof/Config.in
> +++ b/package/sysprof/Config.in
> @@ -1,31 +1,26 @@
>  config BR2_PACKAGE_SYSPROF
>  	bool "sysprof"
> -	depends on BR2_USE_WCHAR # glib2
> -	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
> -	depends on BR2_USE_MMU # glib2
> -	# In its util.h file, sysprof contains architecture-specific
> -	# code
> -	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
> +	depends on BR2_USE_WCHAR # glib2, libdex, json-glib
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, libdex, json-glib, polkit
> +	depends on BR2_USE_MMU # glib2, libdex, json-glib
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # libunwind, polkit
> +	depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
> +	depends on !BR2_STATIC_LIBS # polkit

Also because of libunwind.

> +	depends on !BR2_OPTIMIZE_FAST # polkit
> +	select BR2_PACKAGE_JSON_GLIB
> +	select BR2_PACKAGE_LIBDEX
>  	select BR2_PACKAGE_LIBGLIB2
> +	select BR2_PACKAGE_LIBUNWIND
> +	select BR2_PACKAGE_POLKIT
>  	help
>  	  Sysprof is a statistical, system-wide profiler that can
>  	  profile user and kernel code using the perf API.
>  
>  	  http://sysprof.com
>  
> -if BR2_PACKAGE_SYSPROF
> -
> -config BR2_PACKAGE_SYSPROF_GUI
> -	bool "sysprof GUI"
> -	depends on BR2_PACKAGE_LIBGTK2
> -	select BR2_PACKAGE_LIBGLADE
> -	select BR2_PACKAGE_GDK_PIXBUF
> -	help
> -	  GUI for the sysprof system-wide statistical profiler.
> -
> -endif
> -
> -comment "sysprof needs a toolchain w/ wchar, threads"
> +comment "sysprof needs a toolchain w/ dynamic libraray, wchar, threads, gcc >= 7"
>  	depends on BR2_USE_MMU
> -	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
> -	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> +		!BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS || \

BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS is an architecture dependency, so
it should have been handled like BR2_USE_MMU.

> +		BR2_STATIC_LIBS || BR2_OPTIMIZE_FAST

I changed the handling of BR2_OPTIMIZE_FAST to be like what polkit does:

comment "sysprof can't be built with Optimize for fast"
	depends on BR2_OPTIMIZE_FAST

not amazing, but at least consistent with polkit.

BTW, pretty mind-blowing that sysprof absolutely requires polkit...


> -SYSPROF_VERSION = 1.2.0
> -SYSPROF_SITE = http://sysprof.com
> -SYSPROF_DEPENDENCIES = libglib2
> -SYSPROF_LICENSE = GPL-2.0+
> +SYSPROF_VERSION_MAJOR = 46
> +SYSPROF_VERSION = $(SYSPROF_VERSION_MAJOR).0
> +SYSPROF_SOURCE = sysprof-$(SYSPROF_VERSION).tar.xz
> +SYSPROF_SITE = https://download.gnome.org/sources/sysprof/$(SYSPROF_VERSION_MAJOR)
> +SYSPROF_LICENSE = GPL-3.0+
>  SYSPROF_LICENSE_FILES = COPYING
> +SYSPROF_DEPENDENCIES = libglib2 libdex libunwind json-glib polkit
> +SYSPROF_CONF_OPTS += \

= instead of +=

Applied with those changes. Thanks!

Thomas
Adrian Perez de Castro Aug. 5, 2024, 1:24 p.m. UTC | #2
On Fri, 12 Jul 2024 17:37:34 +0200 Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:
> Hello Adrian,
> 
> On Fri, 28 Jun 2024 01:02:19 +0300
> Adrian Perez de Castro <aperez@igalia.com> wrote:
> 
> > Bring Sysprof twelve years into the future by updating it to the most
> > recent release. The GUI now uses GTK4, for which there is not yet a
> > package, so for now the option is removed.
> > 
> > Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
> 
> Would you want to be added in the DEVELOPERS file for this package? You
> just did a big bump, it would make sense if you helped fixing the build
> failures that might results for this bump :-)

I suppose it makes sense, I will send a patch adding myself as maintainer
for the package later :-)
 
> > diff --git a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
> > deleted file mode 100644
> > index dcc2cbe67cc..00000000000
> > --- a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
> > +++ /dev/null
> 
> Dropping this patch required an updated in .checkpackageignore.
 
Oh, I see, thanks for handling it.
 
> > diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in
> > index 3913274be4f..4ea1d3ebf1d 100644
> > --- a/package/sysprof/Config.in
> > +++ b/package/sysprof/Config.in
> > @@ -1,31 +1,26 @@
> >  config BR2_PACKAGE_SYSPROF
> >  	bool "sysprof"
> > -	depends on BR2_USE_WCHAR # glib2
> > -	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
> > -	depends on BR2_USE_MMU # glib2
> > -	# In its util.h file, sysprof contains architecture-specific
> > -	# code
> > -	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
> > +	depends on BR2_USE_WCHAR # glib2, libdex, json-glib
> > +	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, libdex, json-glib, polkit
> > +	depends on BR2_USE_MMU # glib2, libdex, json-glib
> > +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # libunwind, polkit
> > +	depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
> > +	depends on !BR2_STATIC_LIBS # polkit
> 
> Also because of libunwind.
> 
> > +	depends on !BR2_OPTIMIZE_FAST # polkit
> > +	select BR2_PACKAGE_JSON_GLIB
> > +	select BR2_PACKAGE_LIBDEX
> >  	select BR2_PACKAGE_LIBGLIB2
> > +	select BR2_PACKAGE_LIBUNWIND
> > +	select BR2_PACKAGE_POLKIT
> >  	help
> >  	  Sysprof is a statistical, system-wide profiler that can
> >  	  profile user and kernel code using the perf API.
> >  
> >  	  http://sysprof.com
> >  
> > -if BR2_PACKAGE_SYSPROF
> > -
> > -config BR2_PACKAGE_SYSPROF_GUI
> > -	bool "sysprof GUI"
> > -	depends on BR2_PACKAGE_LIBGTK2
> > -	select BR2_PACKAGE_LIBGLADE
> > -	select BR2_PACKAGE_GDK_PIXBUF
> > -	help
> > -	  GUI for the sysprof system-wide statistical profiler.
> > -
> > -endif
> > -
> > -comment "sysprof needs a toolchain w/ wchar, threads"
> > +comment "sysprof needs a toolchain w/ dynamic libraray, wchar, threads, gcc >= 7"
> >  	depends on BR2_USE_MMU
> > -	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
> > -	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> > +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> > +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
> > +		!BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS || \
> 
> BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS is an architecture dependency, so
> it should have been handled like BR2_USE_MMU.
> 
> > +		BR2_STATIC_LIBS || BR2_OPTIMIZE_FAST
> 
> I changed the handling of BR2_OPTIMIZE_FAST to be like what polkit does:
> 
> comment "sysprof can't be built with Optimize for fast"
> 	depends on BR2_OPTIMIZE_FAST
> 
> not amazing, but at least consistent with polkit.
> 
> BTW, pretty mind-blowing that sysprof absolutely requires polkit...

Yeah, I was hoping that there would be a way of configuring the build to
disable the polkit dependency, but not at the moment. We're in contact with
Christian Hergert (the current sysprof maintainer) and he is open to have a
patch upstreamed to make polkit optional at build time. I don't have an ETA
but I might be able to work on that in the coming weeks. Once we have that
done, I plan to bring the patch into Buildroot =)
 
> > -SYSPROF_VERSION = 1.2.0
> > -SYSPROF_SITE = http://sysprof.com
> > -SYSPROF_DEPENDENCIES = libglib2
> > -SYSPROF_LICENSE = GPL-2.0+
> > +SYSPROF_VERSION_MAJOR = 46
> > +SYSPROF_VERSION = $(SYSPROF_VERSION_MAJOR).0
> > +SYSPROF_SOURCE = sysprof-$(SYSPROF_VERSION).tar.xz
> > +SYSPROF_SITE = https://download.gnome.org/sources/sysprof/$(SYSPROF_VERSION_MAJOR)
> > +SYSPROF_LICENSE = GPL-3.0+
> >  SYSPROF_LICENSE_FILES = COPYING
> > +SYSPROF_DEPENDENCIES = libglib2 libdex libunwind json-glib polkit
> > +SYSPROF_CONF_OPTS += \
> 
> = instead of +=

Ah, first assignment, right. /me facepalms
 
> Applied with those changes. Thanks!

\o/

Cheers,
—Adrián
Thomas Petazzoni Aug. 5, 2024, 1:46 p.m. UTC | #3
Hello Adrian,

On Mon, 5 Aug 2024 16:24:39 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> > Would you want to be added in the DEVELOPERS file for this package? You
> > just did a big bump, it would make sense if you helped fixing the build
> > failures that might results for this bump :-)  
> 
> I suppose it makes sense, I will send a patch adding myself as maintainer
> for the package later :-)

Perfect!

> > BTW, pretty mind-blowing that sysprof absolutely requires polkit...  
> 
> Yeah, I was hoping that there would be a way of configuring the build to
> disable the polkit dependency, but not at the moment. We're in contact with
> Christian Hergert (the current sysprof maintainer) and he is open to have a
> patch upstreamed to make polkit optional at build time. I don't have an ETA
> but I might be able to work on that in the coming weeks. Once we have that
> done, I plan to bring the patch into Buildroot =)

Nice, looking forward to it, thanks!

Thomas
diff mbox series

Patch

diff --git a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
deleted file mode 100644
index dcc2cbe67cc..00000000000
--- a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch
+++ /dev/null
@@ -1,22 +0,0 @@ 
-On uclibc elf.h does not have GNU extentions but we need this define
-so we define it locally if its not getting it from elf.h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: git/elfparser.h
-===================================================================
---- git.orig/elfparser.h	2011-07-16 18:57:41.000000000 -0700
-+++ git/elfparser.h	2011-07-16 20:28:54.733829895 -0700
-@@ -17,6 +17,10 @@
-  */
- #include <glib.h>
- 
-+#ifndef NT_GNU_BUILD_ID
-+#define NT_GNU_BUILD_ID 3
-+#endif
-+
- typedef struct ElfSym ElfSym;
- typedef struct ElfParser ElfParser;
- 
diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in
index 3913274be4f..4ea1d3ebf1d 100644
--- a/package/sysprof/Config.in
+++ b/package/sysprof/Config.in
@@ -1,31 +1,26 @@ 
 config BR2_PACKAGE_SYSPROF
 	bool "sysprof"
-	depends on BR2_USE_WCHAR # glib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
-	depends on BR2_USE_MMU # glib2
-	# In its util.h file, sysprof contains architecture-specific
-	# code
-	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
+	depends on BR2_USE_WCHAR # glib2, libdex, json-glib
+	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, libdex, json-glib, polkit
+	depends on BR2_USE_MMU # glib2, libdex, json-glib
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # libunwind, polkit
+	depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS
+	depends on !BR2_STATIC_LIBS # polkit
+	depends on !BR2_OPTIMIZE_FAST # polkit
+	select BR2_PACKAGE_JSON_GLIB
+	select BR2_PACKAGE_LIBDEX
 	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_LIBUNWIND
+	select BR2_PACKAGE_POLKIT
 	help
 	  Sysprof is a statistical, system-wide profiler that can
 	  profile user and kernel code using the perf API.
 
 	  http://sysprof.com
 
-if BR2_PACKAGE_SYSPROF
-
-config BR2_PACKAGE_SYSPROF_GUI
-	bool "sysprof GUI"
-	depends on BR2_PACKAGE_LIBGTK2
-	select BR2_PACKAGE_LIBGLADE
-	select BR2_PACKAGE_GDK_PIXBUF
-	help
-	  GUI for the sysprof system-wide statistical profiler.
-
-endif
-
-comment "sysprof needs a toolchain w/ wchar, threads"
+comment "sysprof needs a toolchain w/ dynamic libraray, wchar, threads, gcc >= 7"
 	depends on BR2_USE_MMU
-	depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS || \
+		BR2_STATIC_LIBS || BR2_OPTIMIZE_FAST
diff --git a/package/sysprof/sysprof.hash b/package/sysprof/sysprof.hash
index 4ce206be0bd..f21e7621e14 100644
--- a/package/sysprof/sysprof.hash
+++ b/package/sysprof/sysprof.hash
@@ -1,3 +1,5 @@ 
-# Locally calculated
-sha256  baf03c6fc01a845c705873e6fc7927aa89539dcda6963f9ec4c8eb4c086a64f1  sysprof-1.2.0.tar.gz
-sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
+# From https://download.gnome.org/sources/sysprof/46/sysprof-46.0.sha256sum
+sha256  73aa7e75ebab3e4e0946a05a723df7e6ee4249e3b9e884dba35500aba2a1d176  sysprof-46.0.tar.xz
+
+# License files
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
diff --git a/package/sysprof/sysprof.mk b/package/sysprof/sysprof.mk
index 9823416e3fd..4df2f38a8b9 100644
--- a/package/sysprof/sysprof.mk
+++ b/package/sysprof/sysprof.mk
@@ -4,14 +4,26 @@ 
 #
 ################################################################################
 
-SYSPROF_VERSION = 1.2.0
-SYSPROF_SITE = http://sysprof.com
-SYSPROF_DEPENDENCIES = libglib2
-SYSPROF_LICENSE = GPL-2.0+
+SYSPROF_VERSION_MAJOR = 46
+SYSPROF_VERSION = $(SYSPROF_VERSION_MAJOR).0
+SYSPROF_SOURCE = sysprof-$(SYSPROF_VERSION).tar.xz
+SYSPROF_SITE = https://download.gnome.org/sources/sysprof/$(SYSPROF_VERSION_MAJOR)
+SYSPROF_LICENSE = GPL-3.0+
 SYSPROF_LICENSE_FILES = COPYING
+SYSPROF_DEPENDENCIES = libglib2 libdex libunwind json-glib polkit
+SYSPROF_CONF_OPTS += \
+	-Ddevelopment=false \
+	-Dexamples=false \
+	-Dgtk=false \
+	-Dhelp=false \
+	-Dinstall-static=false \
+	-Dlibsysprof=true \
+	-Dtests=false \
+	-Dtools=true \
+	-Dsystemdunitdir=/usr/lib/systemd/system
 
-ifeq ($(BR2_PACKAGE_SYSPROF_GUI),y)
-SYSPROF_DEPENDENCIES += libgtk2 libglade gdk-pixbuf
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+SYSPROF_DEPENDENCIES += systemd
 endif
 
-$(eval $(autotools-package))
+$(eval $(meson-package))