3 # - define CONFIG_ option directly
6 %bcond_without dist_kernel # allow non-distribution kernel
7 %bcond_without kernel # don't build kernel modules
8 %bcond_without userspace # don't build userspace programs
9 %bcond_with verbose # verbose build (V=1)
12 %undefine with_dist_kernel
15 %if "%{_alt_kernel}" != "%{nil}"
16 %undefine with_userspace
19 %define subver 20081106
20 %define prel 0.%{subver}.%{rel}
24 Summary: aufs - Another Unionfs
25 Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs
26 Name: %{pname}%{_alt_kernel}
31 Source0: %{pname}-%{subver}.tar.bz2
32 # Source0-md5: 9a0d8cdeae8706d51f7912b42f7dd438
33 Patch0: %{pname}-vserver.patch
34 #Patch1: %{pname}-disable-security_inode_permission.patch
35 Patch2: %{pname}-fixes.patch
36 #Patch3: %{pname}-spin_lock.patch
37 Patch4: %{pname}-apparmor.patch
38 URL: http://aufs.sourceforge.net/
40 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
41 BuildRequires: rpmbuild(macros) >= 1.379
43 BuildRequires: sed >= 4.0
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 In the early days, aufs was entirely re-designed and re-implemented
48 Unionfs. After many original ideas, approaches, improvements and
49 implementations, it becomes totally different from Unionfs while
50 keeping the basic features. Unionfs is being developed by Professor
51 Erez Zadok at Stony Brook University and his team. If you don't know
52 Unionfs, I recommend you to try and know it before using aufs. Some
53 terminology in aufs follows Unionfs's.
55 %description -l pl.UTF-8
56 Początkowo aufs był całkowicie przeprojektowanym i od nowa
57 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
58 podejściach, poprawkach i implementacjach stał sie całkowicie innym
59 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
60 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
61 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
62 aufs-a. Część terminologii wywodzi się z unionfs-a.
64 %package -n kernel%{_alt_kernel}-fs-aufs
65 Summary: Linux driver for aufs
66 Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
67 Release: %{prel}@%{_kernel_ver_str}
69 Requires(post,postun): /sbin/depmod
70 %if %{with dist_kernel}
71 %requires_releq_kernel
72 Requires(postun): %releq_kernel
75 %description -n kernel%{_alt_kernel}-fs-aufs
76 This is driver for aufs for Linux.
78 This package contains Linux module.
80 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
81 Sterownik dla Linuksa do aufs.
83 Ten pakiet zawiera moduł jądra Linuksa.
91 if [ -d %{_kernelsrcdir}/security/apparmor ]; then
95 cp -a include/linux fs/aufs25
99 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
100 ! -d %{_kernelsrcdir}/security/apparmor ]; then
101 isvserver="-DVSERVER"
103 %ifarch %{x8664} ia64 ppc64 sparc64
104 ino_t64="-DCONFIG_AUFS_INO_T_64"
108 export CONFIG_AUFS_BR_XFS=y
109 %build_kernel_modules -C fs/aufs25 -m aufs \
111 -DCONFIG_AUFS_BRANCH_MAX_127 \
112 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
113 -DCONFIG_AUFS_FAKE_DM \
114 -DCONFIG_AUFS_MODULE \
115 -UCONFIG_AUFS_KSIZE_PATCH \
117 %if "%{_alt_kernel}" != "vanilla"
118 -DCONFIG_AUFS_UNIONFS23_PATCH \
119 -DCONFIG_AUFS_UNIONFS22_PATCH \
120 -DCONFIG_AUFS_SPLICE_PATCH \
122 %{?debug:-DCONFIG_AUFS_DEBUG} \
127 %if %{with userspace}
130 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
134 rm -rf $RPM_BUILD_ROOT
136 %if %{with userspace}
137 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
138 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
139 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
143 %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
147 rm -rf $RPM_BUILD_ROOT
149 %post -n kernel%{_alt_kernel}-fs-aufs
150 %depmod %{_kernel_ver}
152 %postun -n kernel%{_alt_kernel}-fs-aufs
153 %depmod %{_kernel_ver}
156 %files -n kernel%{_alt_kernel}-fs-aufs
157 %defattr(644,root,root,755)
158 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
159 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
162 %if %{with userspace}
164 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_sbindir}/*