Whamcloud - gitweb
Revert "LU-8383 build: Spec file cleanup after LU-5614" 77/21877/2
authorOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Aug 2016 06:18:57 +0000 (06:18 +0000)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 11 Aug 2016 06:19:29 +0000 (06:19 +0000)
This patch appears to break SLES builds with:
error: Failed build dependencies:
kernel-syms is needed by lustre-2.8.56_23_ge8273a3-1.x86_64
make: *** [srpm] Error 1

This reverts commit 55836cd0e55eb1912911c6f195412c99852115aa.

Change-Id: I612e02431a7aafa4bb3daa7b3fb14a31e08175e3
Reviewed-on: http://review.whamcloud.com/21877
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/lbuild/lbuild-sles
contrib/lbuild/lbuild-sles11
contrib/lbuild/lbuild-sles12
lustre.spec.in

index 6a9bebd..435e88b 100644 (file)
@@ -58,13 +58,6 @@ prepare_and_build_srpm() {
         fatal 1 "Failed to build kernel source RPM"
     fi
 
         fatal 1 "Failed to build kernel source RPM"
     fi
 
-    # for SLES, we also need to build the kernel-syms rpm
-    if ! rpmbuild $rpmbuildopt $targets \
-                   --define "_topdir $TOPDIR" \
-                   $TOPDIR/SOURCES/kernel-syms.spec 2>&1; then
-        fatal 1 "Failed to build kernel syms RPM"
-    fi
-
 }
 
 devel_kernel_name() {
 }
 
 devel_kernel_name() {
index 8514f96..97521bd 100644 (file)
@@ -23,7 +23,7 @@ edit_specs() {
     # edit the SPECs with our changes
     local spec
     (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
     # edit the SPECs with our changes
     local spec
     (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
-    for spec in $RPMSMPTYPE source syms; do
+    for spec in $RPMSMPTYPE source; do
         #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
         sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
                -e '/^%setup /a\
         #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
         sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
                -e '/^%setup /a\
index 1a02945..cce4e56 100644 (file)
@@ -23,7 +23,7 @@ edit_specs() {
     # edit the SPECs with our changes
     local spec
     (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
     # edit the SPECs with our changes
     local spec
     (cd $TOPDIR/SOURCES; ./mkspec --release ${lnxrel})
-    for spec in $RPMSMPTYPE source syms; do
+    for spec in $RPMSMPTYPE source; do
         #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
         sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
                -e '/^%setup /a\
         #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
         sed -i -e "s/^\(Release: *\).*$/\1${lnxrel}_${buildid}/" \
                -e '/^%setup /a\
index e078822..70ff7fc 100644 (file)
 
 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
        %global requires_kmod_name kmod-%{lustre_name}
 
 %if %{_vendor}=="redhat" || %{_vendor}=="fedora"
        %global requires_kmod_name kmod-%{lustre_name}
-       %global requires_kmod_tests_name kmod-%{lustre_name}-tests
        %global requires_kmod_version %{version}
 %else  #for Suse
        %global requires_kmod_name %{lustre_name}-kmp
        %global requires_kmod_version %{version}
 %else  #for Suse
        %global requires_kmod_name %{lustre_name}-kmp
-       %global requires_kmod_tests_name %{lustre_name}-tests-kmp
        %define krequires %(echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/[-.]ppc64$//' -e 's/\.aarch64$//' -e 's/-default$//')
        %if 0%{?suse_version} >= 1200
                %global requires_kmod_version %{version}_k%(echo %{krequires} | sed -r 'y/-/_/; s/^(2\.6\.[0-9]+)_/\\1.0_/;')
        %define krequires %(echo %{kversion} | sed -e 's/\.x86_64$//' -e 's/\.i[3456]86$//' -e 's/-smp$//' -e 's/-bigsmp$//' -e 's/[-.]ppc64$//' -e 's/\.aarch64$//' -e 's/-default$//')
        %if 0%{?suse_version} >= 1200
                %global requires_kmod_version %{version}_k%(echo %{krequires} | sed -r 'y/-/_/; s/^(2\.6\.[0-9]+)_/\\1.0_/;')
@@ -125,7 +123,6 @@ BuildRequires: libselinux-devel
 Requires: libselinux
 %endif
 %if %{with lustre_modules}
 Requires: libselinux
 %endif
 %if %{with lustre_modules}
-BuildRequires: %kernel_module_package_buildreqs
 %if %{_vendor}=="redhat"
 BuildRequires: redhat-rpm-config
 %endif
 %if %{_vendor}=="redhat"
 BuildRequires: redhat-rpm-config
 %endif
@@ -135,6 +132,9 @@ BuildRequires: redhat-rpm-config
 Userspace tools and files for the Lustre file system.
 
 %if %{with lustre_modules}
 Userspace tools and files for the Lustre file system.
 
 %if %{with lustre_modules}
+%kernel_module_package_buildreqs
+
+# Lustre modules
 %kernel_module_package -n %{name} -p %SOURCE1 -f %SOURCE2 default
 
 %if %{with ldiskfs}
 %kernel_module_package -n %{name} -p %SOURCE1 -f %SOURCE2 default
 
 %if %{with ldiskfs}
@@ -171,9 +171,7 @@ ZFS hooks for mount/mkfs into a dynamic library.
 Summary: Lustre testing framework
 Group: Development/Kernel
 Provides: %{name}-tests = %{version}
 Summary: Lustre testing framework
 Group: Development/Kernel
 Provides: %{name}-tests = %{version}
-Requires: %{name} = %{version}, lustre-iokit
-Requires: %{requires_kmod_name} = %{requires_kmod_version}
-Requires: %{requires_kmod_tests_name} = %{requires_kmod_version}
+Requires: %{name} = %{version}, %{requires_kmod_name} = %{requires_kmod_version}, lustre-iokit
 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
 
 %description tests
 Requires: attr, rsync, perl, lsof, /usr/bin/getconf
 
 %description tests
@@ -181,7 +179,7 @@ This package contains a set of test binaries and scripts that are intended
 to be used by the Lustre testing framework.
 
 %if %{with lustre_modules}
 to be used by the Lustre testing framework.
 
 %if %{with lustre_modules}
-%kernel_module_package -n %{name}-tests -f %SOURCE7 default
+%kernel_module_package -n %{name}-tests -f %SOURCE7  default
 %endif
 
 %if %{with lustre_iokit}
 %endif
 
 %if %{with lustre_iokit}