Hi,

I hope this list is correct place for submit patches, --
please correct me otherwise.


Makefile and rpm/unionfs.spec are evolving not so fast,
such as other changes, thus "rpmbuild -ta" won't run out of the box.
Could you please apply the fixes attached below?
Thanks.

unionfs.spec patch below is just an quick hack for SuSE,
where uname -r says: "2.6.13-15.7-default",
and may not work with other distributions.

Regards,
--Vladimir


--------------------------------------------------------------------
diff -bur unionfs-1.1.2/Makefile unionfs-1.1.2-w/Makefile
--- unionfs-1.1.2/Makefile      2006-01-25 23:58:11.000000000 +0200
+++ unionfs-1.1.2-w/Makefile    2006-01-30 15:59:45.000000000 +0200
@@ -97,6 +97,7 @@
        cp man/unionfs.4 ${MANDIR}/man4
        cp man/unionctl.8 ${MANDIR}/man8
        cp man/uniondbg.8 ${MANDIR}/man8
+       cp man/unionimap.8 ${MANDIR}/man8
 
 install-mod: unionfs.ko
        mkdir -p ${MODPREFIX}/${MODDIR}/kernel/fs/unionfs
@@ -106,13 +107,15 @@
 install: install-utils install-mod
 
 uninstall:
-       rm ${MODPREFIX}/${MODDIR}/kernel/fs/unionfs.ko
+       rm ${MODPREFIX}/${MODDIR}/kernel/fs/unionfs/unionfs.ko
        -/sbin/depmod -a
        rm ${MANDIR}/man8/unionctl.8
        rm ${MANDIR}/man8/uniondbg.8
+       rm ${MANDIR}/man8/unionimap.8
        rm ${MANDIR}/man4/unionfs.4
        rm ${PREFIX}/sbin/unionctl
        rm ${PREFIX}/sbin/uniondbg
+       rm ${PREFIX}/sbin/unionimap
 
 release: unionfs-${VERSION}.tar${COMPEXT}
 
diff -bur unionfs-1.1.2/rpm/unionfs.spec unionfs-1.1.2-w/rpm/unionfs.spec
--- unionfs-1.1.2/rpm/unionfs.spec      2006-01-25 23:58:11.000000000 +0200
+++ unionfs-1.1.2-w/rpm/unionfs.spec    2006-01-30 16:01:52.000000000 +0200
@@ -1,6 +1,7 @@
 %{!?kernel: %{expand: %%define kernel %(uname -r)}}
-%define kversion %(echo %{kernel} | sed -e s/smp// - )
-%define krelver %(echo %{kversion} | tr -s '-' '_')
+%define kversion %(echo %{kernel} | sed -e 's/smp\\|-[^-]*$//' - )
+%define kbuild   %(echo %{kernel} | sed -e 's/smp\\|^.*-//' - )
+%define krelver %(echo %{kversion}_%{kbuild} | tr -s '-' '_')
 %if %(echo %{kernel} | grep -c smp)
     %{expand:%%define ksmp -smp}
 %endif
@@ -10,7 +11,7 @@
 Version: 1.1.2
 Copyright: GPL
 Release: 1_%{krelver}
-Requires: kernel%{?ksmp} = %{kversion}, /sbin/depmod
+Requires: kernel-%{kbuild} = %{kversion}, /sbin/depmod
 Group: System Environment/Libraries
 Source: ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/unionfs-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -28,10 +29,11 @@
 %setup
 
 %build
+echo kversion=%{kversion} kbuild=%{kbuild} krelver=%{krelver}
 make
 
 %install
-mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel}/kernel/fs
+mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel}/kernel/fs/unionfs
 make install PREFIX=$RPM_BUILD_ROOT MODPREFIX=$RPM_BUILD_ROOT
 
 %clean
@@ -47,9 +49,10 @@
 /man/man4/unionfs.4
 /man/man8/unionctl.8
 /man/man8/uniondbg.8
+/man/man8/unionimap.8
 
 %if %(echo %{kernel} | grep -c '^2.6')
-/lib/modules/%{kernel}/kernel/fs/unionfs.ko
+/lib/modules/%{kernel}/kernel/fs/unionfs/unionfs.ko
 %else
 /lib/modules/%{kernel}/kernel/fs/unionfs.o
 %endif

--------------------------------------------------------------------
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to