All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] package.bbclass: Add support for specifying a suffix for debug files
@ 2021-12-23 10:36 Peter Kjellerstedt
  2021-12-24  5:53 ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-12-23 10:36 UTC (permalink / raw)
  To: openembedded-core

The suffix is added to the names of all files with debug symbols
produced by split_and_strip_files(). It can be used to make the debug
files produced by one recipe unique to avoid them conflicting with
identically named debug files produced by another recipe. This may be
needed since while the target files may be split in multiple packages,
the debug files for one recipe are all in one package.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes/package.bbclass | 11 +++++++++++
 meta/conf/documentation.conf |  1 +
 2 files changed, 12 insertions(+)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 09cd376f4a..3df1edd4a8 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -62,6 +62,14 @@ PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
 # tools at rootfs build time.
 PACKAGE_WRITE_DEPS ??= ""
 
+# This suffix is added to the names of all files with debug symbols produced by
+# split_and_strip_files(). It can be used to make the debug files produced by
+# one recipe unique to avoid them conflicting with identically named debug files
+# produced by another recipe. This may be needed since while the target files
+# may be split in multiple packages, the debug files for one recipe are all in
+# one package.
+PACKAGE_DEBUG_FILE_SUFFIX ??= ""
+
 def legitimize_package_name(s):
     """
     Make sure package names are legitimate strings
@@ -1117,6 +1125,9 @@ python split_and_strip_files () {
         debugstaticlibdir = ""
         debugsrcdir = "/usr/src/debug"
 
+    debugappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
+    debugstaticappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
+
     #
     # First lets figure out all of the files we may have to process ... do this only once!
     #
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index f63f4b223a..ad49410249 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -311,6 +311,7 @@ PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
 PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given target in order of priority."
 PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES before ${PN} so that the packages can pick up files that would normally be included in the default package."
 PACKAGE_CLASSES[doc] = "This variable specifies the package manager to use when packaging data. It is set in the conf/local.conf file in the Build Directory."
+PACKAGE_DEBUG_FILE_SUFFIX[doc] = "This suffix is added to the names of all files with debug symbols in the dbg package."
 PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a listed package is required, an error is generated."
 PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures compatible with the device CPU. This variable is useful when you build for several different devices that use miscellaneous processors."
 PACKAGE_INSTALL[doc] = "List of the packages to be installed into the image. The variable is generally not user-defined and uses IMAGE_INSTALL as part of the list."


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] package.bbclass: Add support for specifying a suffix for debug files
  2021-12-23 10:36 [PATCH] package.bbclass: Add support for specifying a suffix for debug files Peter Kjellerstedt
@ 2021-12-24  5:53 ` Khem Raj
  2021-12-24 17:18   ` Peter Kjellerstedt
       [not found]   ` <16C3C07CB9211DCE.10157@lists.openembedded.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2021-12-24  5:53 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer

On Thu, Dec 23, 2021 at 2:36 AM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> The suffix is added to the names of all files with debug symbols
> produced by split_and_strip_files(). It can be used to make the debug
> files produced by one recipe unique to avoid them conflicting with
> identically named debug files produced by another recipe. This may be
> needed since while the target files may be split in multiple packages,
> the debug files for one recipe are all in one package.
>

can you point to an example recipe clash ?

> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  meta/classes/package.bbclass | 11 +++++++++++
>  meta/conf/documentation.conf |  1 +
>  2 files changed, 12 insertions(+)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 09cd376f4a..3df1edd4a8 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -62,6 +62,14 @@ PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
>  # tools at rootfs build time.
>  PACKAGE_WRITE_DEPS ??= ""
>
> +# This suffix is added to the names of all files with debug symbols produced by
> +# split_and_strip_files(). It can be used to make the debug files produced by
> +# one recipe unique to avoid them conflicting with identically named debug files
> +# produced by another recipe. This may be needed since while the target files
> +# may be split in multiple packages, the debug files for one recipe are all in
> +# one package.
> +PACKAGE_DEBUG_FILE_SUFFIX ??= ""
> +
>  def legitimize_package_name(s):
>      """
>      Make sure package names are legitimate strings
> @@ -1117,6 +1125,9 @@ python split_and_strip_files () {
>          debugstaticlibdir = ""
>          debugsrcdir = "/usr/src/debug"
>
> +    debugappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> +    debugstaticappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> +
>      #
>      # First lets figure out all of the files we may have to process ... do this only once!
>      #
> diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> index f63f4b223a..ad49410249 100644
> --- a/meta/conf/documentation.conf
> +++ b/meta/conf/documentation.conf
> @@ -311,6 +311,7 @@ PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
>  PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given target in order of priority."
>  PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES before ${PN} so that the packages can pick up files that would normally be included in the default package."
>  PACKAGE_CLASSES[doc] = "This variable specifies the package manager to use when packaging data. It is set in the conf/local.conf file in the Build Directory."
> +PACKAGE_DEBUG_FILE_SUFFIX[doc] = "This suffix is added to the names of all files with debug symbols in the dbg package."
>  PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a listed package is required, an error is generated."
>  PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures compatible with the device CPU. This variable is useful when you build for several different devices that use miscellaneous processors."
>  PACKAGE_INSTALL[doc] = "List of the packages to be installed into the image. The variable is generally not user-defined and uses IMAGE_INSTALL as part of the list."
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#159974): https://lists.openembedded.org/g/openembedded-core/message/159974
> Mute This Topic: https://lists.openembedded.org/mt/87915927/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [OE-core] [PATCH] package.bbclass: Add support for specifying a suffix for debug files
  2021-12-24  5:53 ` [OE-core] " Khem Raj
@ 2021-12-24 17:18   ` Peter Kjellerstedt
       [not found]   ` <16C3C07CB9211DCE.10157@lists.openembedded.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-12-24 17:18 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

> -----Original Message-----
> From: Khem Raj <raj.khem@gmail.com>
> Sent: den 24 december 2021 06:53
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: Patches and discussions about the oe-core layer <openembedded-
> core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH] package.bbclass: Add support for specifying
> a suffix for debug files
> 
> On Thu, Dec 23, 2021 at 2:36 AM Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
> >
> > The suffix is added to the names of all files with debug symbols
> > produced by split_and_strip_files(). It can be used to make the debug
> > files produced by one recipe unique to avoid them conflicting with
> > identically named debug files produced by another recipe. This may be
> > needed since while the target files may be split in multiple packages,
> > the debug files for one recipe are all in one package.
> >
> 
> can you point to an example recipe clash ?

Not in OE-Core or OpenEmbedded. The example that required me to have to find 
a solution was that we have our own implementation of an srtp plugin for 
GStreamer that some of our products use, while some of our products use the 
official version from gstreamer1.0-plugins-bad. Our version is a drop-in 
replacement so it provides the libgstrtsp.so plugin just like the original 
package from gstreamer1.0-plugins-bad does. This is no problem for target as 
the GStreamer plugins are packaged one module per package. However, as the 
debug files are all in one package, the libgstrtsp.so file in our dbg package 
conflicts with the libgstrtsp.so in the gstreamer1.0-plugins-bad-dbg package 
and this becomes a problem for any product that uses both our rtsp plugin 
and some other plugin from gstreamer1.0-plugins-bad.

//Peter

> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> >  meta/classes/package.bbclass | 11 +++++++++++
> >  meta/conf/documentation.conf |  1 +
> >  2 files changed, 12 insertions(+)
> >
> > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> > index 09cd376f4a..3df1edd4a8 100644
> > --- a/meta/classes/package.bbclass
> > +++ b/meta/classes/package.bbclass
> > @@ -62,6 +62,14 @@ PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
> >  # tools at rootfs build time.
> >  PACKAGE_WRITE_DEPS ??= ""
> >
> > +# This suffix is added to the names of all files with debug symbols
> produced by
> > +# split_and_strip_files(). It can be used to make the debug files
> produced by
> > +# one recipe unique to avoid them conflicting with identically named
> debug files
> > +# produced by another recipe. This may be needed since while the target
> files
> > +# may be split in multiple packages, the debug files for one recipe are
> all in
> > +# one package.
> > +PACKAGE_DEBUG_FILE_SUFFIX ??= ""
> > +
> >  def legitimize_package_name(s):
> >      """
> >      Make sure package names are legitimate strings
> > @@ -1117,6 +1125,9 @@ python split_and_strip_files () {
> >          debugstaticlibdir = ""
> >          debugsrcdir = "/usr/src/debug"
> >
> > +    debugappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> > +    debugstaticappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> > +
> >      #
> >      # First lets figure out all of the files we may have to process ...
> do this only once!
> >      #
> > diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> > index f63f4b223a..ad49410249 100644
> > --- a/meta/conf/documentation.conf
> > +++ b/meta/conf/documentation.conf
> > @@ -311,6 +311,7 @@ PACKAGE_ARCH[doc] = "The architecture of the
> resulting package or packages."
> >  PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given
> target in order of priority."
> >  PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES
> before ${PN} so that the packages can pick up files that would normally be
> included in the default package."
> >  PACKAGE_CLASSES[doc] = "This variable specifies the package manager to
> use when packaging data. It is set in the conf/local.conf file in the
> Build Directory."
> > +PACKAGE_DEBUG_FILE_SUFFIX[doc] = "This suffix is added to the names of
> all files with debug symbols in the dbg package."
> >  PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a
> listed package is required, an error is generated."
> >  PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures
> compatible with the device CPU. This variable is useful when you build for
> several different devices that use miscellaneous processors."
> >  PACKAGE_INSTALL[doc] = "List of the packages to be installed into the
> image. The variable is generally not user-defined and uses IMAGE_INSTALL
> as part of the list."
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#159974):
> https://lists.openembedded.org/g/openembedded-core/message/159974
> > Mute This Topic: https://lists.openembedded.org/mt/87915927/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
> [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [OE-core] [PATCH] package.bbclass: Add support for specifying a suffix for debug files
       [not found]   ` <16C3C07CB9211DCE.10157@lists.openembedded.org>
@ 2022-01-10 14:59     ` Peter Kjellerstedt
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2022-01-10 14:59 UTC (permalink / raw)
  To: OE Core (openembedded-core@lists.openembedded.org)

*ping*

//Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 24 december 2021 18:19
> To: Khem Raj <raj.khem@gmail.com>
> Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>
> Subject: Re: [OE-core] [PATCH] package.bbclass: Add support for specifying a suffix for debug files
> 
> > -----Original Message-----
> > From: Khem Raj <raj.khem@gmail.com>
> > Sent: den 24 december 2021 06:53
> > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > Cc: Patches and discussions about the oe-core layer <openembedded-core@lists.openembedded.org>
> > Subject: Re: [OE-core] [PATCH] package.bbclass: Add support for specifying a suffix for debug files
> >
> > On Thu, Dec 23, 2021 at 2:36 AM Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote:
> > >
> > > The suffix is added to the names of all files with debug symbols
> > > produced by split_and_strip_files(). It can be used to make the debug
> > > files produced by one recipe unique to avoid them conflicting with
> > > identically named debug files produced by another recipe. This may be
> > > needed since while the target files may be split in multiple packages,
> > > the debug files for one recipe are all in one package.
> > >
> >
> > can you point to an example recipe clash ?
> 
> Not in OE-Core or OpenEmbedded. The example that required me to have to find
> a solution was that we have our own implementation of an srtp plugin for
> GStreamer that some of our products use, while some of our products use the
> official version from gstreamer1.0-plugins-bad. Our version is a drop-in
> replacement so it provides the libgstrtsp.so plugin just like the original
> package from gstreamer1.0-plugins-bad does. This is no problem for target as
> the GStreamer plugins are packaged one module per package. However, as the
> debug files are all in one package, the libgstrtsp.so file in our dbg package
> conflicts with the libgstrtsp.so in the gstreamer1.0-plugins-bad-dbg package
> and this becomes a problem for any product that uses both our rtsp plugin
> and some other plugin from gstreamer1.0-plugins-bad.
> 
> //Peter
> 
> > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > ---
> > >  meta/classes/package.bbclass | 11 +++++++++++
> > >  meta/conf/documentation.conf |  1 +
> > >  2 files changed, 12 insertions(+)
> > >
> > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> > > index 09cd376f4a..3df1edd4a8 100644
> > > --- a/meta/classes/package.bbclass
> > > +++ b/meta/classes/package.bbclass
> > > @@ -62,6 +62,14 @@ PACKAGE_DEPENDS += "rpm-native dwarfsrcfiles-native"
> > >  # tools at rootfs build time.
> > >  PACKAGE_WRITE_DEPS ??= ""
> > >
> > > +# This suffix is added to the names of all files with debug symbols produced by
> > > +# split_and_strip_files(). It can be used to make the debug files produced by
> > > +# one recipe unique to avoid them conflicting with identically named debug files
> > > +# produced by another recipe. This may be needed since while the target files
> > > +# may be split in multiple packages, the debug files for one recipe are all in
> > > +# one package.
> > > +PACKAGE_DEBUG_FILE_SUFFIX ??= ""
> > > +
> > >  def legitimize_package_name(s):
> > >      """
> > >      Make sure package names are legitimate strings
> > > @@ -1117,6 +1125,9 @@ python split_and_strip_files () {
> > >          debugstaticlibdir = ""
> > >          debugsrcdir = "/usr/src/debug"
> > >
> > > +    debugappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> > > +    debugstaticappend += d.getVar('PACKAGE_DEBUG_FILE_SUFFIX')
> > > +
> > >      #
> > >      # First lets figure out all of the files we may have to process ... do this only once!
> > >      #
> > > diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> > > index f63f4b223a..ad49410249 100644
> > > --- a/meta/conf/documentation.conf
> > > +++ b/meta/conf/documentation.conf
> > > @@ -311,6 +311,7 @@ PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
> > >  PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given target in order of priority."
> > >  PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES before ${PN} so that the packages can pick up files that would normally be included in the default package."
> > >  PACKAGE_CLASSES[doc] = "This variable specifies the package manager to use when packaging data. It is set in the conf/local.conf file in the Build Directory."
> > > +PACKAGE_DEBUG_FILE_SUFFIX[doc] = "This suffix is added to the names of all files with debug symbols in the dbg package."
> > >  PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a listed package is required, an error is generated."
> > >  PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures compatible with the device CPU. This variable is useful when you build for several different devices that use miscellaneous processors."
> > >  PACKAGE_INSTALL[doc] = "List of the packages to be installed into the image. The variable is generally not user-defined and uses IMAGE_INSTALL as part of the list."


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-10 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 10:36 [PATCH] package.bbclass: Add support for specifying a suffix for debug files Peter Kjellerstedt
2021-12-24  5:53 ` [OE-core] " Khem Raj
2021-12-24 17:18   ` Peter Kjellerstedt
     [not found]   ` <16C3C07CB9211DCE.10157@lists.openembedded.org>
2022-01-10 14:59     ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.