Hi,
According to
https://fedoraproject.org/wiki/SELinux_Policy_Modules_Packaging
_Draft
in the "Building the Policy Modules" section the example approach to
build a SELinux policy is:
%build
...
cd SELinux
for selinuxvariant in %{selinux_variants}
do
make NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile
mv mymodule.pp mymodule.pp.${selinuxvariant}
make NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile clean
done
So for https://bugzilla.redhat.com/show_bug.cgi?id=1209166, in
palo.spec in the %build section, I now looking to use:
#Use cmake to build
%cmake ../%{name}-%{version}/
make %{?_smp_mflags}
cd -
#Build the SELinux policy
cd SELinux
for selinuxvariant in %{selinux_variants}
do
make NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile
mv %{name}.pp %{name}.pp.${selinuxvariant}
make NAME=${selinuxvariant} -f
/usr/share/selinux/devel/Makefile clean
done
But, when running fedora-review, I get the error message:
[!]: Uses parallel make %{?_smp_mflags} macro.
I tried to include %{?_smp_mflags} in the SELinux's Makefile make call,
but this always resulted in an error during rpmbuild.
Since the %{?_smp_mflags} is useful, either 'make' needs to accept -j
against the SELinux Makefile (and the SELinux Packaging page updated),
or fedora-review needs to exclude SELinux Makefile lines when testing
for the %{?_smp_mflags}.
As I don't know what would involved in either approach, would like some
guidance on whether filing a bug report against fedora-review is the
most appropriate next step.
Kind regards,
Michael
On Sat, 07 Nov 2015 11:39:59 +0800, myk wrote:
But, when running fedora-review, I get the error message:
[!]: Uses parallel make %{?_smp_mflags} macro.
That is okay, because fedora-review cannot know where running parallel Make would be a benefit actually. For example, when building only a single Makefile target, there is nothing to parallelize via multiple jobs. On the contrary, if it were dozens to hundreds of object files to make, doing that in parallel before linking the final executable could be beneficial.
fedora-review is trying to be helpful. It's not trying to tell you how exactly you have to package something. It's not overriding the packaging guidelines either. You're reading too much into its output.
I tried to include %{?_smp_mflags} in the SELinux's Makefile make call,
but this always resulted in an error during rpmbuild.
You've not quoted the error.
Since the %{?_smp_mflags} is useful,
Not always.
either 'make' needs to accept -j against the SELinux Makefile (and the SELinux Packaging page updated), or fedora-review needs to exclude SELinux Makefile lines when testing for the %{?_smp_mflags}.
As I don't know what would involved in either approach, would like some guidance on whether filing a bug report against fedora-review is the most appropriate next step.
Just note that there are other scenarios where spec files run "make" without %_smp_mflags. You've only found a single case where fedora-review *could* try to recognise the familiar invocation and ignore it. However, if it were changed in the future, fedora-review would need to be updated, too, and would still complain about other cases of running Make without %_smp_mflags.
packaging@lists.fedoraproject.org