]>
Commit | Line | Data |
---|---|---|
bf531407 | 1 | # |
a36ba58b | 2 | # TODO: |
3 | # - define CONFIG_ option directly | |
4 | # | |
4734e1ff ER |
5 | # Conditional build: |
6 | %bcond_without dist_kernel # allow non-distribution kernel | |
7 | %bcond_without kernel # don't build kernel modules | |
4734e1ff ER |
8 | %bcond_without userspace # don't build userspace programs |
9 | %bcond_with verbose # verbose build (V=1) | |
10 | ||
11 | %if %{without kernel} | |
12 | %undefine with_dist_kernel | |
13 | %endif | |
14 | ||
299f3eee | 15 | %if "%{_alt_kernel}" != "%{nil}" |
16 | %undefine with_userspace | |
17 | %endif | |
18 | ||
875870dd | 19 | %define subver 20081106 |
46de4e94 ER |
20 | %define prel 0.%{subver}.%{rel} |
21 | ||
299f3eee | 22 | %define pname aufs |
003d8085 | 23 | %define rel 15 |
509b678e | 24 | Summary: aufs - Another Unionfs |
bf531407 | 25 | Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs |
299f3eee | 26 | Name: %{pname}%{_alt_kernel} |
4734e1ff | 27 | Version: 0 |
46de4e94 | 28 | Release: %{prel} |
4734e1ff ER |
29 | License: GPL v2 |
30 | Group: Base/Kernel | |
299f3eee | 31 | Source0: %{pname}-%{subver}.tar.bz2 |
875870dd | 32 | # Source0-md5: 9a0d8cdeae8706d51f7912b42f7dd438 |
299f3eee | 33 | Patch0: %{pname}-vserver.patch |
6afe7181 | 34 | #Patch1: %{pname}-disable-security_inode_permission.patch |
299f3eee | 35 | Patch2: %{pname}-fixes.patch |
6afe7181 | 36 | #Patch3: %{pname}-spin_lock.patch |
096c8924 | 37 | Patch4: %{pname}-apparmor.patch |
4734e1ff ER |
38 | URL: http://aufs.sourceforge.net/ |
39 | %if %{with kernel} | |
069b6c5a | 40 | %{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25.2} |
509b678e | 41 | BuildRequires: rpmbuild(macros) >= 1.379 |
4734e1ff | 42 | %endif |
518cfd38 | 43 | BuildRequires: sed >= 4.0 |
4734e1ff ER |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
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. | |
54 | ||
bf531407 JB |
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. | |
63 | ||
4734e1ff ER |
64 | %package -n kernel%{_alt_kernel}-fs-aufs |
65 | Summary: Linux driver for aufs | |
66 | Summary(pl.UTF-8): Sterownik dla Linuksa do aufs | |
46de4e94 | 67 | Release: %{prel}@%{_kernel_ver_str} |
4734e1ff ER |
68 | Group: Base/Kernel |
69 | Requires(post,postun): /sbin/depmod | |
70 | %if %{with dist_kernel} | |
509b678e | 71 | %requires_releq_kernel |
72 | Requires(postun): %releq_kernel | |
4734e1ff ER |
73 | %endif |
74 | ||
75 | %description -n kernel%{_alt_kernel}-fs-aufs | |
76 | This is driver for aufs for Linux. | |
77 | ||
78 | This package contains Linux module. | |
79 | ||
80 | %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8 | |
81 | Sterownik dla Linuksa do aufs. | |
82 | ||
83 | Ten pakiet zawiera moduł jądra Linuksa. | |
84 | ||
4734e1ff | 85 | %prep |
299f3eee | 86 | %setup -qn %{pname} |
509b678e | 87 | %patch0 -p1 |
6afe7181 | 88 | #%patch1 -p1 |
a36ba58b | 89 | %patch2 -p1 |
6afe7181 | 90 | #%patch3 -p1 |
096c8924 | 91 | if [ -d %{_kernelsrcdir}/security/apparmor ]; then |
92 | %patch4 -p1 | |
93 | fi | |
509b678e | 94 | |
a36ba58b | 95 | cp -a include/linux fs/aufs25 |
4734e1ff ER |
96 | |
97 | %build | |
98 | %if %{with kernel} | |
096c8924 | 99 | if [ -f %{_kernelsrcdir}/include/linux/vs_base.h && |
100 | ! -d %{_kernelsrcdir}/security/apparmor ]; then | |
dd9fb61b | 101 | isvserver="-DVSERVER" |
102 | fi | |
bce0b37e | 103 | %ifarch %{x8664} ia64 ppc64 sparc64 |
104 | ino_t64="-DCONFIG_AUFS_INO_T_64" | |
105 | %endif | |
106 | ||
32f7b99c | 107 | export CONFIG_AUFS=m |
a36ba58b | 108 | export CONFIG_AUFS_BR_XFS=y |
109 | %build_kernel_modules -C fs/aufs25 -m aufs \ | |
110 | EXTRA_CFLAGS+=" \ | |
509b678e | 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 \ | |
3b805c44 | 116 | -UCONFIG_AUFS_DLGT \ |
cce770f5 | 117 | %if "%{_alt_kernel}" != "vanilla" |
118 | -DCONFIG_AUFS_UNIONFS23_PATCH \ | |
119 | -DCONFIG_AUFS_UNIONFS22_PATCH \ | |
120 | -DCONFIG_AUFS_SPLICE_PATCH \ | |
121 | %endif | |
509b678e | 122 | %{?debug:-DCONFIG_AUFS_DEBUG} \ |
bce0b37e | 123 | $isvserver \ |
124 | $ino_t64" | |
4734e1ff ER |
125 | %endif |
126 | ||
7d59a9cf | 127 | %if %{with userspace} |
128 | %{__make} -C util \ | |
129 | CC="%{__cc}" \ | |
130 | CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127" | |
131 | %endif | |
132 | ||
4734e1ff ER |
133 | %install |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
7d59a9cf | 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/ | |
140 | %endif | |
141 | ||
4734e1ff | 142 | %if %{with kernel} |
a36ba58b | 143 | %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs |
4734e1ff ER |
144 | %endif |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %post -n kernel%{_alt_kernel}-fs-aufs | |
150 | %depmod %{_kernel_ver} | |
151 | ||
152 | %postun -n kernel%{_alt_kernel}-fs-aufs | |
153 | %depmod %{_kernel_ver} | |
154 | ||
4734e1ff | 155 | %if %{with kernel} |
4734e1ff ER |
156 | %files -n kernel%{_alt_kernel}-fs-aufs |
157 | %defattr(644,root,root,755) | |
0f3a7497 | 158 | %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs |
159 | /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko* | |
4734e1ff ER |
160 | %endif |
161 | ||
4734e1ff ER |
162 | %if %{with userspace} |
163 | %files | |
164 | %defattr(644,root,root,755) | |
165 | %doc README History | |
7d59a9cf | 166 | %attr(755,root,root) %{_sbindir}/* |
167 | %{_mandir}/man5/* | |
4734e1ff | 168 | %endif |