Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm SPEC file issue w/ SELINUX on AL2 image #12

Open
sheperdsonbrown opened this issue Mar 22, 2022 · 0 comments
Open

rpm SPEC file issue w/ SELINUX on AL2 image #12

sheperdsonbrown opened this issue Mar 22, 2022 · 0 comments

Comments

@sheperdsonbrown
Copy link

Hello,

I have run into a "macro" issue when building the rpm on a 5.10+ kernel AL2 image.

make[3]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/src'
make[2]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/src'
Making all in init
make[2]: Entering directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/init'
file -C -m ../init/fapolicyd-magic
make[2]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/init'
Making all in doc
make[2]: Entering directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/doc'
Making all in rules.d
make[2]: Entering directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/rules.d'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/rules.d'
make[2]: Entering directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1'
make[2]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1'
make[1]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1'
+ pushd fapolicyd-selinux-0.4
~/rpmbuild/BUILD/fapolicyd-1.1/fapolicyd-selinux-0.4 ~/rpmbuild/BUILD/fapolicyd-1.1
+ make
make -f /usr/share/selinux/devel/Makefile fapolicyd.pp
make[1]: Entering directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/fapolicyd-selinux-0.4'
Compiling targeted fapolicyd module
/usr/bin/checkmodule:  loading policy configuration from tmp/fapolicyd.tmp
fapolicyd.te:45:ERROR 'syntax error' at token 'mmap_read_files_pattern' on line 4068:
mmap_read_files_pattern(fapolicyd_t, fapolicyd_var_lib_t, fapolicyd_var_lib_t)

/usr/bin/checkmodule:  error(s) encountered while parsing configuration
make[1]: *** [tmp/fapolicyd.mod] Error 1
make[1]: Leaving directory `/home/fapolicyd/rpmbuild/BUILD/fapolicyd-1.1/fapolicyd-selinux-0.4'
make: *** [fapolicyd.pp] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.8KWkNL (%prep)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.8KWkNL (%prep)

I've been told what I may need to do for the fix is "It means that the macro definition cannot be found in your system's selinux-policy. It is either old or not Red Hat based. You can find the definition and copy it to the beginning of .te file but there can be other missing macros. @radosroka "

Currently in my rpmbuild/SOURCES/fapolicyd-selinux-0.4 via wget Source code (tar.gz)

I am not sure how to proceed or where to look for starting to make the fix. I would be happy to find the solution and provide it back to the community upon success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant