Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 930982 - app-containers/podman: app-crypt/gpgme should be in DEPEND
Summary: app-containers/podman: app-crypt/gpgme should be in DEPEND
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-04-30 15:17 UTC by jewe37
Modified: 2024-05-26 23:31 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jewe37 2024-04-30 15:17:03 UTC
During compilation, pkg-config is invoked by the podman build on gpgme. If it is missing, building will fail. Per the definition of BDEPEND, while gpgme is not executed during the build, it is required to exist on CBUILD for the build to succeed.

Reproducible: Always

Steps to Reproduce:
1. emerge --onlydeps app-containers/podman
2. emerge --C app-crypt/gpgme
3. emerge app-containers/podman
Actual Results:  
Build dies with
```
# github.com/proglottis/gpgme
# [x86_64-pc-linux-gnu-pkg-config --cflags  -- gpgme]
Package gpgme was not found in the pkg-config search path.
Perhaps you should add the directory containing `gpgme.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gpgme' not found
```

Expected Results:  
Build succeeds.
Comment 1 jewe37 2024-04-30 15:19:00 UTC
(In reply to jewe37 from comment #0)
> During compilation, pkg-config is invoked by the podman build on gpgme. If
> it is missing, building will fail. Per the definition of BDEPEND, while
> gpgme is not executed during the build, it is required to exist on CBUILD
> for the build to succeed.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. emerge --onlydeps app-containers/podman
> 2. emerge --C app-crypt/gpgme
> 3. emerge app-containers/podman
> Actual Results:  
> Build dies with
> ```
> # github.com/proglottis/gpgme
> # [x86_64-pc-linux-gnu-pkg-config --cflags  -- gpgme]
> Package gpgme was not found in the pkg-config search path.
> Perhaps you should add the directory containing `gpgme.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'gpgme' not found
> ```
> 
> Expected Results:  
> Build succeeds.

Minor error in reproduction steps, fixed:
1. emerge --onlydeps app-containers/podman
2. emerge -C app-crypt/gpgme
3. emerge --nodeps app-containers/podman
Comment 2 Mike Gilbert gentoo-dev 2024-05-01 02:44:35 UTC
github.com/proglottis/gpgme uses gpgme.h (and probably a related library), so the dependency belongs in DEPEND, not BDEPEND.
Comment 3 jewe37 2024-05-01 09:23:17 UTC
(In reply to Mike Gilbert from comment #2)
> github.com/proglottis/gpgme uses gpgme.h (and probably a related library),
> so the dependency belongs in DEPEND, not BDEPEND.

True, the phrasing in the docs had me confused, I misunderstood the meaning of the "built system".
Comment 4 Krzesimir Nowak 2024-05-24 11:44:37 UTC
app-crypt/gpgme already is in DEPEND, as DEPEND includes RDEPEND, where app-crypt/gpgme is specified.

I think that the issue here pops up during cross-compilation only. We don't override PKG_CONFIG environment variable, so cgo will use pkg-config instead of <whatever-triplet>-pkg-config.

In flatcar we fixed it with:

	if tc-is-cross-compiler; then
		tc-export PKG_CONFIG
	fi

Will file a PR on github.
Comment 5 Larry the Git Cow gentoo-dev 2024-05-26 23:31:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1728e374db8721b71bad2ad4ac1e76e949849a5f

commit 1728e374db8721b71bad2ad4ac1e76e949849a5f
Author:     Krzesimir Nowak <knowak@microsoft.com>
AuthorDate: 2024-05-24 11:50:50 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-05-26 23:31:11 +0000

    app-containers/podman: Fix cross-compilation issues with gpgme
    
    Need to tell cgo to use proper pkg-config with the PKG_CONFIG
    environment variable.
    
    Bug: https://bugs.gentoo.org/930982
    Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
    Closes: https://github.com/gentoo/gentoo/pull/36805
    Closes: https://bugs.gentoo.org/930982
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/podman-4.9.4.ebuild | 8 +++++++-
 app-containers/podman/podman-5.0.2.ebuild | 8 +++++++-
 app-containers/podman/podman-5.0.3.ebuild | 8 +++++++-
 app-containers/podman/podman-9999.ebuild  | 8 +++++++-
 4 files changed, 28 insertions(+), 4 deletions(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1728e374db8721b71bad2ad4ac1e76e949849a5f

commit 1728e374db8721b71bad2ad4ac1e76e949849a5f
Author:     Krzesimir Nowak <knowak@microsoft.com>
AuthorDate: 2024-05-24 11:50:50 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-05-26 23:31:11 +0000

    app-containers/podman: Fix cross-compilation issues with gpgme
    
    Need to tell cgo to use proper pkg-config with the PKG_CONFIG
    environment variable.
    
    Bug: https://bugs.gentoo.org/930982
    Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
    Closes: https://github.com/gentoo/gentoo/pull/36805
    Closes: https://bugs.gentoo.org/930982
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 app-containers/podman/podman-4.9.4.ebuild | 8 +++++++-
 app-containers/podman/podman-5.0.2.ebuild | 8 +++++++-
 app-containers/podman/podman-5.0.3.ebuild | 8 +++++++-
 app-containers/podman/podman-9999.ebuild  | 8 +++++++-
 4 files changed, 28 insertions(+), 4 deletions(-)