--- rpms/xtables-addons-kmod/contribs10/xtables-addons-kmod.spec 2020/06/25 16:44:52 1.1 +++ rpms/xtables-addons-kmod/contribs10/xtables-addons-kmod.spec 2020/08/17 17:30:30 1.3 @@ -4,9 +4,7 @@ # queuing that build enable the macro again for subsequent builds; that way # a new akmod package will only get build when a new one is actually needed -%global buildforkernels newest -#%global buildforkernels current -#%global buildforkernels akmod +%global buildforkernels current #FIXME xtables-kmod doesn't use the appropriate cflags %global debug_package %{nil} @@ -14,7 +12,7 @@ %define name xtables-addons-kmod %define name_src xtables-addons %define version 2.14 -%define release 01 +%define release 02 Summary: %{name} is a set of additional extensions for the Xtables packet filter (modules kmod ONLY). Name: %{name} Version: %{version} @@ -26,7 +24,6 @@ Source: %{name_src}-%{version}.tar.xz URL: http://xtables-addons.sourceforge.net Patch0: %{name_src}-2.14-init.patch Packager: Michel Begue -#BuildRoot: %RPM_BUILD_ROOT Requires: smeserver-release >= 10.0 Requires: xtables-addons >= 2.14 @@ -47,6 +44,9 @@ Requires(postun): /sbin/weak-modules It is just a "kernel update" release. %changelog +* Tue Jul 21 2020 Michel Begue 2.14-02.sme +- change in install workaround. copy /usr/lib to /lib + * Wed Apr 15 2020 Michel Begue 2.14-01.sme - initial release 2.14 for sme10 - changes for using GeoIP2 databases (download and build (-g2) + fetch) @@ -59,6 +59,7 @@ It is just a "kernel update" release. %prep # error out if there was something wrong with kmodtool %{?kmodtool_check} + # print kmodtool output for debugging purposes: kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null @@ -70,24 +71,20 @@ for kernel_version in %{?kernel_versions done %build -#ls -l /usr/src/kernels/2.6.32-754.el6.x86_64/include/config/auto.conf >&2 for kernel_version in %{?kernel_versions} ; do - if ! grep -q 'XT_TARGET_TEE=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then - sed -i 's/build_TEE=/build_TEE=m/' _kmod_build_${kernel_version%%___*}/mconfig - fi - if ! grep -q 'XT_TARGET_CHECKSUM=m' %{_usrsrc}/kernels/${kernel_version%%___*}/.config; then - sed -i 's/build_CHECKSUM=/build_CHECKSUM=m/' _kmod_build_${kernel_version%%___*}/mconfig - fi export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions modules done %install +%{__rm} -rf %{buildroot} + for kernel_version in %{?kernel_versions} ; do export XA_ABSTOPSRCDIR=${PWD}/_kmod_build_${kernel_version%%___*} make %{?_smp_mflags} V=1 -C "${kernel_version##*___}" M=${PWD}/_kmod_build_${kernel_version%%___*}/extensions _emodinst_ INSTALL_MOD_PATH=%{buildroot}%{_prefix} ext-mod-dir=%{kmodinstdir_postfix} # workaround to avoid error at file stage, it seems that we are installing it in /usr/lib and files script is waiting it in /lib... - mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib + #mv %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib + cp -R %{buildroot}%{_prefix}/lib %{buildroot}%{_prefix}/../lib done %{?akmod_install}