3 %bcond_without dist_kernel # allow non-distribution kernel
4 %bcond_without kernel # don't build kernel modules
5 %bcond_without userspace # don't build userspace programs
6 %bcond_with verbose # verbose build (V=1)
7 %bcond_without vserver # kernel build without vserver & grsecurity
10 %undefine with_dist_kernel
13 %define subver 20080313
14 %define prel 0.%{subver}.%{rel}
17 Summary: aufs - Another Unionfs
18 Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs
24 Source0: %{name}-%{subver}.tar.bz2
25 # Source0-md5: 044ba36a61ca6a0ebe72108aaa77b816
26 Patch0: %{name}-vserver.patch
27 Patch1: %{name}-disable-security_inode_permission.patch
28 URL: http://aufs.sourceforge.net/
30 %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.20.2}
31 BuildRequires: rpmbuild(macros) >= 1.379
33 BuildRequires: sed >= 4.0
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 In the early days, aufs was entirely re-designed and re-implemented
38 Unionfs. After many original ideas, approaches, improvements and
39 implementations, it becomes totally different from Unionfs while
40 keeping the basic features. Unionfs is being developed by Professor
41 Erez Zadok at Stony Brook University and his team. If you don't know
42 Unionfs, I recommend you to try and know it before using aufs. Some
43 terminology in aufs follows Unionfs's.
45 %description -l pl.UTF-8
46 Początkowo aufs był całkowicie przeprojektowanym i od nowa
47 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
48 podejściach, poprawkach i implementacjach stał sie całkowicie innym
49 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
50 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
51 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
52 aufs-a. Część terminologii wywodzi się z unionfs-a.
54 %package -n kernel%{_alt_kernel}-fs-aufs
55 Summary: Linux driver for aufs
56 Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
57 Release: %{prel}@%{_kernel_ver_str}
59 Requires(post,postun): /sbin/depmod
60 %if %{with dist_kernel}
61 %requires_releq_kernel
62 Requires(postun): %releq_kernel
65 %description -n kernel%{_alt_kernel}-fs-aufs
66 This is driver for aufs for Linux.
68 This package contains Linux module.
70 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
71 Sterownik dla Linuksa do aufs.
73 Ten pakiet zawiera moduł jądra Linuksa.
84 %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/};
85 s/$(CONFIG_AUFS_HINOTIFY)/n/;
86 s/$(CONFIG_AUFS_EXPORT)/y/;
87 s/$(CONFIG_AUFS_SYSAUFS)/n/
89 cp -a include/linux fs/aufs
93 %build_kernel_modules -C fs/aufs -m aufs \
95 -DCONFIG_AUFS_BRANCH_MAX_127 \
96 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
97 -DCONFIG_AUFS_FAKE_DM \
98 -DCONFIG_AUFS_MODULE \
99 -UCONFIG_AUFS_KSIZE_PATCH \
101 %{?debug:-DCONFIG_AUFS_DEBUG} \
102 %{?with_vserver:-DVSERVER}"
105 %if %{with userspace}
108 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
112 rm -rf $RPM_BUILD_ROOT
114 %if %{with userspace}
115 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
116 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
117 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
121 %install_kernel_modules -m fs/aufs/aufs -d kernel/fs/aufs
125 rm -rf $RPM_BUILD_ROOT
127 %post -n kernel%{_alt_kernel}-fs-aufs
128 %depmod %{_kernel_ver}
130 %postun -n kernel%{_alt_kernel}-fs-aufs
131 %depmod %{_kernel_ver}
134 %files -n kernel%{_alt_kernel}-fs-aufs
135 %defattr(644,root,root,755)
136 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
137 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
140 %if %{with userspace}
142 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_sbindir}/*