[Ocfs2-commits] smushran commits r2918 - branches/ocfs2-1.2/vendor/rhel4

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Thu Jun 22 20:45:31 CDT 2006


Author: smushran
Signed-off-by: jlbec
Date: 2006-06-22 20:45:30 -0500 (Thu, 22 Jun 2006)
New Revision: 2918

Modified:
   branches/ocfs2-1.2/vendor/rhel4/Vendor.make
   branches/ocfs2-1.2/vendor/rhel4/kernel.guess
   branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in
Log:
largesmp support added
Signed-off-by: jlbec

Modified: branches/ocfs2-1.2/vendor/rhel4/Vendor.make
===================================================================
--- branches/ocfs2-1.2/vendor/rhel4/Vendor.make	2006-06-12 18:07:56 UTC (rev 2917)
+++ branches/ocfs2-1.2/vendor/rhel4/Vendor.make	2006-06-23 01:45:30 UTC (rev 2918)
@@ -9,7 +9,15 @@
 	SPECVER="$@"; \
 		SPECVER="$${SPECVER#*ocfs2-}"; \
 		SPECVER="$${SPECVER%.spec}"; \
-		sed -e 's/@@KVER@@/'$${SPECVER}'/' -e 's/@@PKG_VERSION@@/'$(PKG_VERSION)'/' < $< > $@
+		LARGEVER="$${SPECVER#2.6.9-}"; \
+		LARGEVER="$${LARGEVER%%.*}"; \
+		if [ "$${LARGEVER}" -lt 34 ]; \
+		then \
+			LARGESMP=0; \
+		else \
+			LARGESMP=1; \
+		fi; \
+		sed -e 's/@@KVER@@/'$${SPECVER}'/' -e 's/@@PKG_VERSION@@/'$(PKG_VERSION)'/' -e 's/@@LARGESMP@@/'$${LARGESMP}'/' < $< > $@
 
 rhel4_%_srpm: dist $(TOPDIR)/vendor/rhel4/ocfs2-%.spec
 	rpmbuild -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/rhel4/ocfs2-$(patsubst rhel4_%_srpm,%,$@).spec

Modified: branches/ocfs2-1.2/vendor/rhel4/kernel.guess
===================================================================
--- branches/ocfs2-1.2/vendor/rhel4/kernel.guess	2006-06-12 18:07:56 UTC (rev 2917)
+++ branches/ocfs2-1.2/vendor/rhel4/kernel.guess	2006-06-23 01:45:30 UTC (rev 2918)
@@ -13,14 +13,19 @@
 # Unique to redhat, empty types (the 'default' kernel) are allowed.
 # Be careful parsing this!
 #
+# Red Hat throws us another loop.  2.6.9-34.EL+ have a new "largesmp"
+# type.  So, we have TYPES and OLD TYPES.
+#
 RHEL4_KERNEL_TYPES="
     i686:,smp,hugemem
-    x86_64:,smp
-    ia64:
-    ppc64:
+    x86_64:,smp,largesmp
+    ia64:,largesmp
+    ppc64:,largesmp
+    s390x:
 "
 
 
+
 guess_rhel4_arch()
 {
     # This appears to DTRT (i686 on x86, ppc64 on pSeries).
@@ -30,14 +35,14 @@
 guess_rhel4_type()
 {
     case "$1" in
-    *smp)
-        echo "smp"
+    *largesmp)
+        echo "largesmp"
         ;;
     *hugemem)
         echo "hugemem"
         ;;
-    *hugeproc)
-        echo "hugeproc"
+    *smp)
+        echo "smp"
         ;;
     *)
         echo ""
@@ -158,6 +163,15 @@
     ARCH="$2"
     TYPELIST="$3"
 
+    # Red Hat introduced the "largesmp" type in 34.EL.  Anything older
+    # can ignore it.
+    LARGESMP="${KVER#2.6.9-}"
+    LARGESMP="${LARGESMP%%.*}"
+    if [ "$LARGESMP" -lt 34 ]
+    then
+        TYPELIST="${TYPELIST%,largesmp}"
+    fi
+
     typelist="${TYPELIST#$ARCH:}"
     while :
     do

Modified: branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in
===================================================================
--- branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in	2006-06-12 18:07:56 UTC (rev 2917)
+++ branches/ocfs2-1.2/vendor/rhel4/ocfs2.spec-generic.in	2006-06-23 01:45:30 UTC (rev 2918)
@@ -12,6 +12,7 @@
 %define buildup		1
 %define buildsmp	0
 %define buildhugemem	0
+%define buildlargesmp	0
 
 %ifarch i686
 %define karch		i686
@@ -22,14 +23,17 @@
 %ifarch x86_64
 %define karch		x86_64
 %define buildsmp	1
+%define buildlargesmp	@@LARGESMP@@
 %endif
 
 %ifarch ia64
 %define karch		ia64
+%define buildlargesmp	@@LARGESMP@@
 %endif
 
 %ifarch ppc64
 %define karch		ppc64
+%define buildlargesmp	@@LARGESMP@@
 %endif
 
 %ifarch s390x
@@ -101,7 +105,22 @@
 %prep
 %setup -n ocfs2-%{version}
 
+%if %{buildlargesmp}
+%package -n ocfs2-%{kver}largesmp
+Summary: The Oracle Cluster File System 2 for large smp systems.
+Group: System Environment/Kernel
+Provides: ocfs2 = %{version}
+Requires: kernel-largesmp = %{kver}
+Requires: ocfs2-tools >= %{tools_ver}
+BuildRequires: kernel-largesmp-devel = %{kver}
+AutoReqProv: no
 
+%description -n ocfs2-%{kver}largesmp
+OCFS2 is the Oracle Cluster Filesystem 2.  This package is compiled for
+large symmetric multiprocessor kernels.
+%endif
+
+
 %build
 
 local_configure()
@@ -184,7 +203,27 @@
 make clean
 %endif
 
+%if %{buildlargesmp}
+local_configure "%{kver}largesmp"
 
+make V=0
+make DESTDIR="$RPM_BUILD_ROOT" INSTALL_MOD_PATH='$(DESTDIR)' install 
+
+# 2.6 kbuild can't do this install nicely
+EXTRA_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}largesmp/extra"
+INST_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}largesmp/kernel"
+mkdir -p "${INST_MODLIB}/fs/ocfs2"
+mv "${EXTRA_MODLIB}"/ocfs2*.ko "${INST_MODLIB}/fs/ocfs2/"
+mkdir -p "${INST_MODLIB}/fs/configfs"
+mv "${EXTRA_MODLIB}"/configfs.ko "${INST_MODLIB}/fs/configfs/"
+mkdir -p "${INST_MODLIB}/fs/debugfs"
+mv "${EXTRA_MODLIB}"/debugfs.ko "${INST_MODLIB}/fs/debugfs/"
+rm "${EXTRA_MODLIB}"/*.ko
+
+make clean
+%endif
+
+
 %clean
 rm -rf "$RPM_BUILD_ROOT"
 
@@ -217,7 +256,18 @@
 /lib/modules/%{kver}hugemem/kernel/fs
 %endif
 
+%if %{buildlargesmp}
+%post -n ocfs2-%{kver}largesmp
+depmod -a
 
+%files -n ocfs2-%{kver}largesmp
+%defattr(-,root,root)
+/lib/modules/%{kver}largesmp/kernel/fs
+%endif
+
 %changelog
+* Thu Jun 22 2006 Sunil Mushran <sunil.mushran at oracle.com>
+- Add largesmp
+
 * Mon Jan 24 2004 Manish Singh <manish.singh at oracle.com>
 - Initial rpm spec file




More information about the Ocfs2-commits mailing list