1

I've enabled the SELinux by doing the below changes,

  1. Added meta-selinux path to BUILDDIR/conf/bblayers.conf file.
  2. Set DISTRO_FEATURES_append=" pam selinux" in in BUILDDIR/conf/local.conf file.

I've executed the below command to generate a default se-Linux image,

$ bitbake core-image-selinux

And getting an error from RPM Package,

**../../rpm-5.4.15/rpmio/macro.c: In function 'expandMacro':
../../rpm-5.4.15/rpmio/macro.c:2309:15: error: '_globalI' undeclared (first use in this function)
   rpmsm sm = (_globalI ? NULL
               ^~~~~~~~**

for the time being, I override the error by removing the inherit with-selinux from selinux/recipes-devtools/rpm/rpm_selinux.inc.

Couldn't find a similar issue in google or issue reported. Could you please someone explain to me, how to debug this issue?

jww
  • 97,681
  • 90
  • 411
  • 885
nullbyte91
  • 161
  • 2
  • 9
  • Maybe you can post the relevant output from `grep -IR -B 1 -A 1 _global`? If you are lucky you will find a `#define _globalI ...` and the proceeding line will be the guard. – jww Aug 13 '18 at 11:31
  • Configure rpm using --without-sepol --without-semanage is the first thing to try. – Jeff Johnson Aug 13 '18 at 14:04
  • @jww No _globalI macro definition in the source code. I already started digging into source code and env variables to understand from where this definition is coming at compilation time. – nullbyte91 Aug 13 '18 at 15:09
  • @JeffJohnson Yes.RPM package is configured --with-sepol --with-semanage at configuration time. So, let me try --without-sepol --without-semanage. Thank You mate. – nullbyte91 Aug 13 '18 at 15:14
  • _globalI would hold a "global interpreter" for an embedded application, and is used by two unfinished embedded wrappers onto additional functionality provided by SELinux. Only --with-libselinux is needed for RPM+SELINUX functionality. Note that SELinux has moved to loadable modules in RPM4. – Jeff Johnson Aug 13 '18 at 20:12

0 Answers0