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 20080527
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: aeb6880930a8abcb60947e96b310d3df
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 URL: http://aufs.sourceforge.net/
39 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
40 BuildRequires: rpmbuild(macros) >= 1.379
42 BuildRequires: sed >= 4.0
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 In the early days, aufs was entirely re-designed and re-implemented
47 Unionfs. After many original ideas, approaches, improvements and
48 implementations, it becomes totally different from Unionfs while
49 keeping the basic features. Unionfs is being developed by Professor
50 Erez Zadok at Stony Brook University and his team. If you don't know
51 Unionfs, I recommend you to try and know it before using aufs. Some
52 terminology in aufs follows Unionfs's.
54 %description -l pl.UTF-8
55 Początkowo aufs był całkowicie przeprojektowanym i od nowa
56 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
57 podejściach, poprawkach i implementacjach stał sie całkowicie innym
58 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
59 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
60 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
61 aufs-a. Część terminologii wywodzi się z unionfs-a.
63 %package -n kernel%{_alt_kernel}-fs-aufs
64 Summary: Linux driver for aufs
65 Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
66 Release: %{prel}@%{_kernel_ver_str}
68 Requires(post,postun): /sbin/depmod
69 %if %{with dist_kernel}
70 %requires_releq_kernel
71 Requires(postun): %releq_kernel
74 %description -n kernel%{_alt_kernel}-fs-aufs
75 This is driver for aufs for Linux.
77 This package contains Linux module.
79 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
80 Sterownik dla Linuksa do aufs.
82 Ten pakiet zawiera moduł jądra Linuksa.
91 # we should make it better
94 %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/};
95 s/$(CONFIG_AUFS_HINOTIFY)/n/;
96 s/$(CONFIG_AUFS_EXPORT)/y/;
97 s/$(CONFIG_AUFS_SYSAUFS)/n/
99 cp -a include/linux fs/aufs25
103 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h ]; then
104 isvserver="-DVSERVER"
107 export CONFIG_AUFS_BR_XFS=y
108 %build_kernel_modules -C fs/aufs25 -m aufs \
110 -DCONFIG_AUFS_BRANCH_MAX_127 \
111 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
112 -DCONFIG_AUFS_FAKE_DM \
113 -DCONFIG_AUFS_MODULE \
114 -UCONFIG_AUFS_KSIZE_PATCH \
116 %{?debug:-DCONFIG_AUFS_DEBUG} \
120 %if %{with userspace}
123 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
127 rm -rf $RPM_BUILD_ROOT
129 %if %{with userspace}
130 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
131 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
132 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
136 %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
140 rm -rf $RPM_BUILD_ROOT
142 %post -n kernel%{_alt_kernel}-fs-aufs
143 %depmod %{_kernel_ver}
145 %postun -n kernel%{_alt_kernel}-fs-aufs
146 %depmod %{_kernel_ver}
149 %files -n kernel%{_alt_kernel}-fs-aufs
150 %defattr(644,root,root,755)
151 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
152 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
155 %if %{with userspace}
157 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_sbindir}/*