]> git.pld-linux.org Git - packages/aufs.git/blobdiff - aufs.spec
- added apparmor support (apparmor.patch)
[packages/aufs.git] / aufs.spec
index 5e26ba3b693460b68851a2285cc4812a06842af9..a36438889bab3261d5aacc1e5cb15f5e3a056e8e 100644 (file)
--- a/aufs.spec
+++ b/aufs.spec
@@ -1,30 +1,43 @@
 #
+# TODO:
+# - define CONFIG_ option directly
+#
 # Conditional build:
 %bcond_without dist_kernel     # allow non-distribution kernel
 %bcond_without kernel          # don't build kernel modules
 %bcond_without userspace       # don't build userspace programs
 %bcond_with    verbose         # verbose build (V=1)
-%bcond_without vserver         # kernel build without vserver & grsecurity
 
 %if %{without kernel}
 %undefine      with_dist_kernel
 %endif
 
-%define                _cvsdate        20070914
-%define                _rel            0.%{_cvsdate}.2
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine      with_userspace
+%endif
+
+%define                subver          20081030
+%define                prel            0.%{subver}.%{rel}
+
+%define                pname           aufs
+%define                rel             0.1
 Summary:       aufs - Another Unionfs
 Summary(pl.UTF-8):     aufs (Another Unionfs) - inny unionfs
-Name:          aufs
+Name:          %{pname}%{_alt_kernel}
 Version:       0
-Release:       %{_rel}
+Release:       %{prel}
 License:       GPL v2
 Group:         Base/Kernel
-Source0:       %{name}-%{_cvsdate}.tar.bz2
-# Source0-md5: e40a80a7b93af168cae7f5b3499531e3
-Patch0:                %{name}-vserver.patch
+Source0:       %{pname}-%{subver}.tar.bz2
+# Source0-md5: 13ea25a28c5a3ed4480c1bd7f26655df
+Patch0:                %{pname}-vserver.patch
+#Patch1:               %{pname}-disable-security_inode_permission.patch
+Patch2:                %{pname}-fixes.patch
+#Patch3:               %{pname}-spin_lock.patch
+Patch4:                %{pname}-apparmor.patch
 URL:           http://aufs.sourceforge.net/
 %if %{with kernel}
-%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
+%{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
 BuildRequires: rpmbuild(macros) >= 1.379
 %endif
 BuildRequires: sed >= 4.0
@@ -51,7 +64,7 @@ aufs-a. Część terminologii wywodzi się z unionfs-a.
 %package -n kernel%{_alt_kernel}-fs-aufs
 Summary:       Linux driver for aufs
 Summary(pl.UTF-8):     Sterownik dla Linuksa do aufs
-Release:       %{_rel}@%{_kernel_ver_str}
+Release:       %{prel}@%{_kernel_ver_str}
 Group:         Base/Kernel
 Requires(post,postun): /sbin/depmod
 %if %{with dist_kernel}
@@ -70,32 +83,40 @@ Sterownik dla Linuksa do aufs.
 Ten pakiet zawiera moduł jądra Linuksa.
 
 %prep
-%setup -qn %{name}
-%if %{with vserver}
+%setup -qn %{pname}
 %patch0 -p1
-%endif
+#%patch1 -p1
+%patch2 -p1
+#%patch3 -p1
+if [ -d %{_kernelsrcdir}/security/apparmor ]; then
+%patch4 -p1
+fi
 
-sed '
-       s/$(CONFIG_AUFS)/m/; 
-       %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/}; 
-       s/$(CONFIG_AUFS_HINOTIFY)/n/;
-       s/$(CONFIG_AUFS_EXPORT)/y/;
-       s/$(CONFIG_AUFS_SYSAUFS)/n/
-' -i fs/aufs/Makefile
-cp -a include/linux fs/aufs
+cp -a include/linux fs/aufs25
 
 %build
 %if %{with kernel}
-%build_kernel_modules -C fs/aufs -m aufs \
-       EXTRA_CFLAGS=" \
+if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
+     ! -d %{_kernelsrcdir}/security/apparmor ]; then
+       isvserver="-DVSERVER"
+fi
+%ifarch %{x8664} ia64 ppc64 sparc64
+       ino_t64="-DCONFIG_AUFS_INO_T_64"
+%endif
+
+export CONFIG_AUFS=m
+export CONFIG_AUFS_BR_XFS=y
+%build_kernel_modules -C fs/aufs25 -m aufs \
+       EXTRA_CFLAGS+=" \
                -DCONFIG_AUFS_BRANCH_MAX_127 \
                -DCONFIG_AUFS_BRANCH_MAX_CHAR \
                -DCONFIG_AUFS_FAKE_DM \
                -DCONFIG_AUFS_MODULE \
                -UCONFIG_AUFS_KSIZE_PATCH \
+               -UCONFIG_AUFS_DLGT \
                %{?debug:-DCONFIG_AUFS_DEBUG} \
-               %{?with_vserver:-DVSERVER} \
-       "
+               $isvserver \
+               $ino_t64"
 %endif
 
 %if %{with userspace}
@@ -114,7 +135,7 @@ install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
 %endif
 
 %if %{with kernel}
-%install_kernel_modules -m fs/aufs/aufs -d kernel/fs/aufs
+%install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
 %endif
 
 %clean
This page took 0.112925 seconds and 4 git commands to generate.