Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 909204

Summary: net-misc/openssh (9.3_p1-r1) does not merge with USE="static"
Product: Gentoo Linux Reporter: Gerold Schellstede <gentoo>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED NEEDINFO    
Severity: major    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gerold Schellstede 2023-06-26 19:53:23 UTC
If one activates the "static"-flag an error occurs, beacause one cannot emerge openssh with "static"- and "pie"-flag enabled simultaneously.  

Unfortunately the "pie"-flag cannot be disabled. This is (IMO), because the ebuild has an IUSE=+pie and not an IUSE=pie entry. (As a result, an "emerge -av openssh" shows the (pie)-flag with round brackets around the "pie".)



Reproducible: Always

Steps to Reproduce:
# "USE=static" emerge -av openssh. 
--> emerge explains that one should disable the pie-flag.

# "USE=static -pie" emerge -av openssh. 
--> emerge explains again that one should disable the pie-flag.
Actual Results:  
Cannot emerge openssh with static-flag .

Expected Results:  
Emerge openssh with static-flag enabled.

I need openssh with "static"-flag for my Initramfs, because lvm2 and cryptsetup (both with USE="static static-libs") pull it in.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 19:58:19 UTC
(In reply to Gerold Schellstede from comment #0)
> If one activates the "static"-flag an error occurs, beacause one cannot
> emerge openssh with "static"- and "pie"-flag enabled simultaneously.  
> 
> Unfortunately the "pie"-flag cannot be disabled. This is (IMO), because the
> ebuild has an IUSE=+pie and not an IUSE=pie entry. (As a result, an "emerge
> -av openssh" shows the (pie)-flag with round brackets around the "pie".)
> 

No, it's because it's forced on in profiles.

> 
> I need openssh with "static"-flag for my Initramfs, because lvm2 and
> cryptsetup (both with USE="static static-libs") pull it in.

Neither lvm2 nor cryptsetup depend on openssh at all, let alone openssh[static]. Are you setting USE=static in make.conf instead of package.use for specific packages...?
Comment 2 Greg Kubaryk 2023-06-26 20:07:14 UTC
having IUSE=+pie just means that it defaults on, not that it cannot be disabled, and round brackets mean a masked flag, which is not appropriate in this situation

# USE="static -pie" emerge -pv openssh
  The following REQUIRED_USE flag constraints are unsatisfied:
    static? ( !pam )

setting -pam shows that it wants static-libs on several packages, which then works; if there is a problem we're not seeing, can you show full output?