* [PULL][PATCH 0/1] package.bbclass: fix image_debugfs symlinks @ 2020-10-08 16:59 William Hauser 2020-10-08 16:59 ` [PULL][PATCH 1/1] " William Hauser 0 siblings, 1 reply; 4+ messages in thread From: William Hauser @ 2020-10-08 16:59 UTC (permalink / raw) To: poky; +Cc: William Hauser The debugfs does not contain any symlinks, causing gdb to be unable to locate libraries whose minor versions are abstracted out by using symlinks. i.e. executables link against libpcap.so/libpcap.so.1, not libpcap.so.1.9.1 This is a result a flawed fstat meant to stop broken symlinks from being copied to the debugfs. My suggested change removes this fstat in favor of an earlier check for broken symlinks that is already performed. More details in the commit message. This change was tested by examining libpcap's build artifacts. debugfs/usr/lib/.debug/ contents before: libpcap.so.1.9.1 debugfs/usr/lib/.debug/ contents after: libpcap.so -> libpcap.so.1 libpcap.so.1 -> libpcap.so.1.9.1 libpcap.so.1.9.1 William Hauser (1): package.bbclass: fix image_debugfs symlinks meta/classes/package.bbclass | 8 -------- 1 file changed, 8 deletions(-) -- 2.15.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PULL][PATCH 1/1] package.bbclass: fix image_debugfs symlinks 2020-10-08 16:59 [PULL][PATCH 0/1] package.bbclass: fix image_debugfs symlinks William Hauser @ 2020-10-08 16:59 ` William Hauser 2020-11-04 22:18 ` [poky] " Randy MacLeod 0 siblings, 1 reply; 4+ messages in thread From: William Hauser @ 2020-10-08 16:59 UTC (permalink / raw) To: poky; +Cc: William Hauser, William Hauser Allow symlinks to be made in the debugfs by removing an incorrect check that would always prevent symlinks from being transferred over. The comment in this code indicates that the code is meant to ensure symlinks are only copied to the debugfs if their target has already been copied, but instead checks for the existence of the symlink that has yet to be created. As a result this check always fails. This check is safe to get rid of since we will only attempt to copy a symlink to the debugfs if it's original target exists and is an ELF. It is, however, still possible for a dead symlink to end up in the debugfs if its original target was stripped. Signed-off-by: William Hauser <william.hauser@meraki.com> --- meta/classes/package.bbclass | 8 -------- 1 file changed, 8 deletions(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e6236c0bb2..47f3df2e13 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1258,14 +1258,6 @@ python split_and_strip_files () { src = file[len(dvar):] dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend fpath = dvar + dest - # Skip it if the target doesn't exist - try: - s = os.stat(fpath) - except OSError as e: - (err, strerror) = e.args - if err != errno.ENOENT: - raise - continue ltarget = symlinks[file] lpath = os.path.dirname(ltarget) -- 2.15.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [poky] [PULL][PATCH 1/1] package.bbclass: fix image_debugfs symlinks 2020-10-08 16:59 ` [PULL][PATCH 1/1] " William Hauser @ 2020-11-04 22:18 ` Randy MacLeod 2020-11-04 22:32 ` William Hauser 0 siblings, 1 reply; 4+ messages in thread From: Randy MacLeod @ 2020-11-04 22:18 UTC (permalink / raw) To: william.hauser, poky; +Cc: William Hauser, William Hauser [-- Attachment #1: Type: text/plain, Size: 3461 bytes --] On 2020-10-08 12:59 p.m., William Hauser via lists.yoctoproject.org wrote: > The comment in this code indicates that the code is meant to ensure symlinks > are only copied to the debugfs if their target has already been copied, but > instead checks for the existence of the symlink that has yet to be created. > As a result this check always fails. > > This check is safe to get rid of since we will only attempt to copy a > symlink to the debugfs if it's original target exists and is an ELF. It > is, however, still possible for a dead symlink to end up in the debugfs > if its original target was stripped. > > Signed-off-by: William Hauser <william.hauser@meraki.com> > --- > meta/classes/package.bbclass | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index e6236c0bb2..47f3df2e13 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -1258,14 +1258,6 @@ python split_and_strip_files () { > src = file[len(dvar):] > dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend > fpath = dvar + dest > - # Skip it if the target doesn't exist > - try: > - s = os.stat(fpath) > - except OSError as e: > - (err, strerror) = e.args > - if err != errno.ENOENT: > - raise > - continue > > ltarget = symlinks[file] > lpath = os.path.dirname(ltarget) Hi William, I think this patch/email got lost because it was sent to the wrong list and we've been in the last stretch of the gatesgarth release. Could you please re-send to oe-core if it wasn't merged? See the README.poky below. Thanks, ../Randy Contribution Guidelines ======================= A guide to submitting patches to OpenEmbedded is available at: http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded There is good documentation on how to write/format patches at: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Where to Send Patches ===================== As Poky is an integration repository (built using a tool called combo-layer), patches against the various components should be sent to their respective upstreams: bitbake: Git repository: http://git.openembedded.org/bitbake/ Mailing list: bitbake-devel@lists.openembedded.org documentation: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/ Mailing list: docs@lists.yoctoproject.org meta-poky, meta-yocto-bsp: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto(-bsp) Mailing list: poky@lists.yoctoproject.org Everything else should be sent to the OpenEmbedded Core mailing list. If in doubt, check the oe-core git repository for the content you intend to modify. Before sending, be sure the patches apply cleanly to the current oe-core git repository. Git repository: http://git.openembedded.org/openembedded-core/ Mailing list: openembedded-core@lists.openembedded.org Note: The scripts directory should be treated with extra care as it is a mix of oe-core and poky-specific files from meta-poky. > > > -- # Randy MacLeod # Wind River Linux [-- Attachment #2: Type: text/html, Size: 5841 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [poky] [PULL][PATCH 1/1] package.bbclass: fix image_debugfs symlinks 2020-11-04 22:18 ` [poky] " Randy MacLeod @ 2020-11-04 22:32 ` William Hauser 0 siblings, 0 replies; 4+ messages in thread From: William Hauser @ 2020-11-04 22:32 UTC (permalink / raw) To: Randy MacLeod; +Cc: poky, William Hauser [-- Attachment #1: Type: text/plain, Size: 3719 bytes --] Sent to openembedded-core@lists.openembedded.org. Thanks, Randy. On Wed, Nov 4, 2020 at 2:18 PM Randy MacLeod <randy.macleod@windriver.com> wrote: > On 2020-10-08 12:59 p.m., William Hauser via lists.yoctoproject.org wrote: > > The comment in this code indicates that the code is meant to ensure symlinks > are only copied to the debugfs if their target has already been copied, but > instead checks for the existence of the symlink that has yet to be created. > As a result this check always fails. > > This check is safe to get rid of since we will only attempt to copy a > symlink to the debugfs if it's original target exists and is an ELF. It > is, however, still possible for a dead symlink to end up in the debugfs > if its original target was stripped. > > Signed-off-by: William Hauser <william.hauser@meraki.com> <william.hauser@meraki.com> > --- > meta/classes/package.bbclass | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass > index e6236c0bb2..47f3df2e13 100644 > --- a/meta/classes/package.bbclass > +++ b/meta/classes/package.bbclass > @@ -1258,14 +1258,6 @@ python split_and_strip_files () { > src = file[len(dvar):] > dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend > fpath = dvar + dest > - # Skip it if the target doesn't exist > - try: > - s = os.stat(fpath) > - except OSError as e: > - (err, strerror) = e.args > - if err != errno.ENOENT: > - raise > - continue > > ltarget = symlinks[file] > lpath = os.path.dirname(ltarget) > > > Hi William, > > I think this patch/email got lost because it was sent to the wrong list and > we've been in the last stretch of the gatesgarth release. Could you please > re-send to oe-core if it wasn't merged? > > See the README.poky below. > > Thanks, > > ../Randy > > Contribution Guidelines > ======================= > > A guide to submitting patches to OpenEmbedded is available at: > > http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded > > There is good documentation on how to write/format patches at: > > https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines > > > Where to Send Patches > ===================== > > As Poky is an integration repository (built using a tool called > combo-layer), > patches against the various components should be sent to their respective > upstreams: > > bitbake: > Git repository: http://git.openembedded.org/bitbake/ > Mailing list: bitbake-devel@lists.openembedded.org > > documentation: > Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/ > Mailing list: docs@lists.yoctoproject.org > > meta-poky, meta-yocto-bsp: > Git repository: > http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto(-bsp) > Mailing list: poky@lists.yoctoproject.org > > Everything else should be sent to the OpenEmbedded Core mailing list. If > in > doubt, check the oe-core git repository for the content you intend to > modify. > Before sending, be sure the patches apply cleanly to the current oe-core > git > repository. > > Git repository: http://git.openembedded.org/openembedded-core/ > Mailing list: openembedded-core@lists.openembedded.org > > Note: The scripts directory should be treated with extra care as it is a > mix of > oe-core and poky-specific files from meta-poky. > > > > > > > -- > # Randy MacLeod > # Wind River Linux > > [-- Attachment #2: Type: text/html, Size: 5728 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-04 22:32 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-10-08 16:59 [PULL][PATCH 0/1] package.bbclass: fix image_debugfs symlinks William Hauser 2020-10-08 16:59 ` [PULL][PATCH 1/1] " William Hauser 2020-11-04 22:18 ` [poky] " Randy MacLeod 2020-11-04 22:32 ` William Hauser
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.