Support building mixed versions of sepolicy
Now newer system policy and older vendor policy can be built together by setting following variables: - BOARD_SEPOLICY_VERS - BOARD_REQD_MASK_POLICY (copy of older system/sepolicy/reqd_mask) - BOARD_PLAT_VENDOR_POLICY (copy of older system/sepolicy/vendor) - BOARD_(SYSTEM_EXT|PRODUCT)_(PUBLIC|PRIVATE)_PREBUILT_DIRS (copy of older system_ext and product policies) Bug: 168159977 Test: try normal build and mixed build Test: boot and check selinux denials Change-Id: I20e1986cc1c877f5e3a7965e03bd8ade84fd7230
This commit is contained in:
@@ -1360,6 +1360,18 @@ func (c *deviceConfig) BoardMoveRecoveryResourcesToVendorBoot() bool {
|
|||||||
return Bool(c.config.productVariables.BoardMoveRecoveryResourcesToVendorBoot)
|
return Bool(c.config.productVariables.BoardMoveRecoveryResourcesToVendorBoot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *deviceConfig) PlatformSepolicyVersion() string {
|
||||||
|
return String(c.config.productVariables.PlatformSepolicyVersion)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *deviceConfig) BoardSepolicyVers() string {
|
||||||
|
return String(c.config.productVariables.BoardSepolicyVers)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *deviceConfig) BoardReqdMaskPolicy() []string {
|
||||||
|
return c.config.productVariables.BoardReqdMaskPolicy
|
||||||
|
}
|
||||||
|
|
||||||
// The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs.
|
// The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs.
|
||||||
// Such lists are used in the build system for things like bootclasspath jars or system server jars.
|
// Such lists are used in the build system for things like bootclasspath jars or system server jars.
|
||||||
// The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a
|
// The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a
|
||||||
|
@@ -311,10 +311,14 @@ type productVariables struct {
|
|||||||
|
|
||||||
BoardVendorSepolicyDirs []string `json:",omitempty"`
|
BoardVendorSepolicyDirs []string `json:",omitempty"`
|
||||||
BoardOdmSepolicyDirs []string `json:",omitempty"`
|
BoardOdmSepolicyDirs []string `json:",omitempty"`
|
||||||
|
BoardReqdMaskPolicy []string `json:",omitempty"`
|
||||||
SystemExtPublicSepolicyDirs []string `json:",omitempty"`
|
SystemExtPublicSepolicyDirs []string `json:",omitempty"`
|
||||||
SystemExtPrivateSepolicyDirs []string `json:",omitempty"`
|
SystemExtPrivateSepolicyDirs []string `json:",omitempty"`
|
||||||
BoardSepolicyM4Defs []string `json:",omitempty"`
|
BoardSepolicyM4Defs []string `json:",omitempty"`
|
||||||
|
|
||||||
|
BoardSepolicyVers *string `json:",omitempty"`
|
||||||
|
PlatformSepolicyVersion *string `json:",omitempty"`
|
||||||
|
|
||||||
VendorVars map[string]map[string]string `json:",omitempty"`
|
VendorVars map[string]map[string]string `json:",omitempty"`
|
||||||
|
|
||||||
Ndk_abis *bool `json:",omitempty"`
|
Ndk_abis *bool `json:",omitempty"`
|
||||||
|
Reference in New Issue
Block a user