On Fri, 2009-01-30 at 09:13 +0900, Ian Kent wrote:
> > 
> > 
> > Am i doing some step incorrectly or missing something here ? Or ( as
> > Dave Miller suggested) , we need a new patch release for RHEL 5.2
> > ( 2.6.18-92.el5 ) , as Dave was sure Redhat has released a new kernel
> > after Erez gave that last patch for RHEL
> > (unionfs-2.4_for_2.6.18-RHEL5.
> > diff) ?
> 
> That process sounds ok but if it wasn't, such as you didn't add the
> patch to the spec file before the build, then you shouldn't have ended
> up with a module at all. I'll check the patch applies, maybe build a
> kernel and see. Having time to do this is a problem so you'll need to
> wait a while.

I've done a quick check.

The patch applies cleanly to rev 92.
That's a good sign but not an absolute guarantee.

Then try this.

I haven't tested it, other than to get to the point of starting the
build so there may be other things I've missed.

1) Remove the kernel and modules of previous attempts so you don't get
confusing errors not related to this kernel build. Please make sure you
don't remove your actual rev 92 kernel and only remove stuff you've
built and installed (rpm -e perhaps) or copied!!!!

2) Copy the uncompressed (maybe you don't need to uncompress it, I don't
know) unionfs-2.4_for_2.6.18-RHEL5.diff to the rpm build tree SOURCES
directory.

2) Update the kernel configuration used for the rpm build (I'm just
updating the i686 arch configs here but you would need to do similar for
other arch, such as x86_64 or if you want to enable other options) using
something like what is contained in the attached
unionfs-rhel-srpm-config.patch.

3) Set the buildid and add the patch to the kernel build spec file with
something like what is contained in the attached
unionfs-rhel-kernel-srpm-spec.patch.

4) Use "rpmbuild -bb kernel-2.6.spec" to build the kernel-headers
package (but maybe you don't really need this, your chioce). Not sure if
this will actually be needed if your doing this for x86_64, all the
packages might get built on x86_64 with this alone.

5) Use "rpmbuild -bb --target=i686 kernel-2.6.spec" to build the kernel
rpms (or other target as needed).

Then hope that the build completes without error and install as needed!
Note that you should use the "-i" for install not the "-U" for update as
rpm will happily replace your current kernel with one that might not
work if you tell it to update instead of install.

Ian
--- SOURCES/kernel-2.6.18-i686-PAE.config.orig	2008-04-30 01:08:18.000000000 +0800
+++ SOURCES/kernel-2.6.18-i686-PAE.config	2009-01-30 10:36:55.000000000 +0900
@@ -2465,6 +2465,13 @@
 CONFIG_DEBUG_FS=y
 
 #
+# Layered filesystems
+#
+CONFIG_UNION_FS=m
+# CONFIG_UNION_FS_XATTR is not set
+# CONFIG_UNION_FS_DEBUG is not set
+
+#
 # Miscellaneous filesystems
 #
 # CONFIG_ADFS_FS is not seta
--- SOURCES/kernel-2.6.18-i686-debug.config.orig	2008-04-30 01:08:18.000000000 +0800
+++ SOURCES/kernel-2.6.18-i686-debug.config	2009-01-30 10:52:10.000000000 +0900
@@ -2465,6 +2465,13 @@
 CONFIG_DEBUG_FS=y
 
 #
+# Layered filesystems
+#
+CONFIG_UNION_FS=m
+# CONFIG_UNION_FS_XATTR is not set
+# CONFIG_UNION_FS_DEBUG is not set
+
+#
 # Miscellaneous filesystems
 #
 # CONFIG_ADFS_FS is not seta
--- SOURCES/kernel-2.6.18-i686.config.orig	2008-04-30 01:08:18.000000000 +0800
+++ SOURCES/kernel-2.6.18-i686.config	2009-01-30 10:37:18.000000000 +0900
@@ -2465,6 +2465,13 @@
 CONFIG_DEBUG_FS=y
 
 #
+# Layered filesystems
+#
+CONFIG_UNION_FS=m
+# CONFIG_UNION_FS_XATTR is not set
+# CONFIG_UNION_FS_DEBUG is not set
+
+#
 # Miscellaneous filesystems
 #
 # CONFIG_ADFS_FS is not seta
--- SOURCES/kernel-2.6.18-i686-xen.config.orig	2008-04-30 01:08:19.000000000 +0800
+++ SOURCES/kernel-2.6.18-i686-xen.config	2009-01-30 10:36:40.000000000 +0900
@@ -2465,6 +2465,13 @@
 CONFIG_DEBUG_FS=y
 
 #
+# Layered filesystems
+#
+CONFIG_UNION_FS=m
+# CONFIG_UNION_FS_XATTR is not set
+# CONFIG_UNION_FS_DEBUG is not set
+
+#
 # Miscellaneous filesystems
 #
 # CONFIG_ADFS_FS is not seta
--- SPECS/kernel-2.6.spec.orig	2009-01-30 10:18:51.000000000 +0900
+++ SPECS/kernel-2.6.spec	2009-01-30 10:38:20.000000000 +0900
@@ -66,7 +66,7 @@
 # that the kernel isn't the stock distribution kernel, for example,
 # by setting the define to ".local" or ".bz123456"
 #
-#% define buildid
+%define buildid .unionfs.1
 #
 %define sublevel 18
 %define kversion 2.6.%{sublevel}
@@ -2351,6 +2351,9 @@
 Patch22555: linux-2.6-xen-ia64-set-memory-attribute-in-inline-asm.patch
 Patch22556: linux-2.6-scsi-cciss-allow-kexec-to-work.patch
 Patch22557: linux-2.6-fs-race-condition-in-dnotify.patch
+
+Patch99001: unionfs-2.4_for_2.6.18-RHEL5.diff
+
 # adds rhel version info to version.h
 Patch99990: linux-2.6-rhel-version-h.patch
 # empty final patch file to facilitate testing of kernel patches
@@ -4657,6 +4660,9 @@
 %patch22555 -p1
 %patch22556 -p1
 %patch22557 -p1
+
+%patch99001 -p1
+
 # correction of SUBLEVEL/EXTRAVERSION in top-level source tree Makefile
 # patch the Makefile to include rhel version info
 %patch99990 -p1
_______________________________________________
unionfs mailing list: http://unionfs.filesystems.org/
unionfs@mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to