15 Commits

Author SHA1 Message Date
Yi Zhao 2bd48852e2 meta-secure-core: fix wrong operator combination
Operations like XXX:append += "YYY" are almost always wrong and this
is a common mistake made in the metadata. Improve them to use the
standard format.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-11-18 13:58:20 +08:00
Changqing Li c14c00f483 rpm-native: disable audit plugin
enable this plugin will cause undeterministic build. whether to build
audit plugin depends on whether libaudit exists on the host

Signed-off-by: Changqing Li <changqing.li@windriver.com>
2021-11-12 16:53:12 +08:00
Yi Zhao 4042043742 meta-secure-core: Convert to new override syntax
Converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-09 18:51:13 +08:00
Yi Zhao d6ca3fa224 rpm: apply signatures to config files
Since rpm 4.15, the users can control over the installation of
signatures on config files through a variable named
%_ima_sign_config_files. But this is disabled by default. Add a macro
configuration file to enable it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2020-12-08 22:03:59 +08:00
Ovidiu Panait e4e766aa40 rpm-integrity: Use _append for PACKAGECONFIG
Currently, the PACKAGECONFIG assignment in rpm-integrity might overwrite
the previous contents of the variable.

Similar to systemd_%.bbappend and ovmf_%.bbappend, use _append to add
"imaevm" to PACKAGECONFIG when distro feature ima is enabled.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2019-12-13 09:01:39 +08:00
Yi Zhao 06f4d3eece Revert "rpm: always include rpm-integrity.inc for RPM signing"
This reverts commit 0477a93cf9.

Run yocto-check-layer-wrapper to check layer compliance of Yocto will report the signatures error:

rpm-native:do_configure: c2221ee127ea61f99a6062ffadb1fe05ca44b9200e38a91521a5a28d4f13140b ->
d955da8ce20c8dbc0c5bc9b7569dd459484b0e24ba1e4c66828a84e919025eca
bitbake-diffsigs --task rpm-native do_configure --signature
c2221ee127ea61f99a6062ffadb1fe05ca44b9200e38a91521a5a28d4f13140b
d955da8ce20c8dbc0c5bc9b7569dd459484b0e24ba1e4c66828a84e919025eca

Revert the patch to fix it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2019-06-26 13:05:38 +08:00
Chen Qi 1daba563d4 rpm: disable inhibit plugin for rpm-native
We have a bbappend file which enables plugins for rpm. We need to
ensure to also disable the inhibit plugin for rpm-native. Otherwise,
we get the following warning at rootfs time.

   Unable to get systemd shutdown inhibition lock: Socket name too long

The inhibit plugin tries to inhibit shutdown during rpm operation. It
obviously makes no sense for rpm-native, as 1) we may not build on a
systemd based host and 2) the build process does not affect the package
management on host.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-10-17 16:55:13 +08:00
Jia Zhang 139a9b656d Clean up the stuffs for stable branches
The following commits are reverted by the way:

- seloader: Fix building for rocko (bc6bbe2)
- meta-integrity: rpm: Add back in required patches for rocko (5fa9c85)

Because they are only applicable to rocko.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-20 21:21:37 -04:00
Tom Rini 5fa9c850bd meta-integrity: rpm: Add back in required patches for rocko
In 59a9f43b89 ("meta-integrity: Drop RPM patches that are upstream
now") we removed patches to RPM that were not required with a move up to
4.14.0 as they are upstream.  However, rocko ships with an older version
of RPM and still needs these patches.  Add conditional logic to apply
these patches only for rocko.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-31 22:48:35 +08:00
Tom Rini 59a9f43b89 meta-integrity: Drop RPM patches that are upstream now
As of OE-Core rev b4613b6ce07c295c5d6de6861acf19315acaccb2 we are using
rpm-4.14.0 as the base version.  This includes all of the patches we had
been applying.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-02-14 09:13:47 +08:00
Jia Zhang 0477a93cf9 rpm: always include rpm-integrity.inc for RPM signing
rpm-integrity is required for RPM signing which is enabled by default.

Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
2017-10-27 23:25:55 +08:00
Jia Zhang c2b8134dc3 meta-integrity: fix build failure caused by 6aa83f98b
Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com>
2017-10-27 22:04:27 +08:00
Kai 6aa83f98bc rpm: only apply bbappend file when ima in DISTRO_FEATURES (#27)
Rename bbappend file of rpm and only include it when image in
DISTRO_FEATURES. Plugin 'systemd' of rpm-native causes warning during
do rootfs:

| WARNING: wrlinux-image-glibc-std-1.0-r5 do_rootfs: [log_check] wrlinux-image-glibc-std: found 1 warning message in the logfile:
| [log_check] warning: Unable to get systemd shutdown inhibition lock: Socket name too long

Signed-off-by: Kai Kang <kai.kang@windriver.com>
2017-10-27 20:57:45 +08:00
Lans Zhang 50bd7859af rpm: remove PACKAGECONFIG[imaevm]
This setting is already merged to oe-core.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-28 10:14:25 +08:00
Lans Zhang ea2ae90be4 rpm: allow to enable IMA signing
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-18 13:51:07 +08:00