]> git.pld-linux.org Git - packages/aufs.git/blame - aufs.spec
- release 2
[packages/aufs.git] / aufs.spec
CommitLineData
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
e03587e3 23%define rel 2
509b678e 24Summary: aufs - Another Unionfs
bf531407 25Summary(pl.UTF-8): aufs (Another Unionfs) - inny unionfs
299f3eee 26Name: %{pname}%{_alt_kernel}
4734e1ff 27Version: 0
46de4e94 28Release: %{prel}
4734e1ff
ER
29License: GPL v2
30Group: Base/Kernel
299f3eee 31Source0: %{pname}-%{subver}.tar.bz2
875870dd 32# Source0-md5: 9a0d8cdeae8706d51f7912b42f7dd438
299f3eee 33Patch0: %{pname}-vserver.patch
6afe7181 34#Patch1: %{pname}-disable-security_inode_permission.patch
299f3eee 35Patch2: %{pname}-fixes.patch
6afe7181 36#Patch3: %{pname}-spin_lock.patch
096c8924 37Patch4: %{pname}-apparmor.patch
4734e1ff
ER
38URL: 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 41BuildRequires: rpmbuild(macros) >= 1.379
4734e1ff 42%endif
518cfd38 43BuildRequires: sed >= 4.0
4734e1ff
ER
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47In the early days, aufs was entirely re-designed and re-implemented
48Unionfs. After many original ideas, approaches, improvements and
49implementations, it becomes totally different from Unionfs while
50keeping the basic features. Unionfs is being developed by Professor
51Erez Zadok at Stony Brook University and his team. If you don't know
52Unionfs, I recommend you to try and know it before using aufs. Some
53terminology in aufs follows Unionfs's.
54
bf531407
JB
55%description -l pl.UTF-8
56Początkowo aufs był całkowicie przeprojektowanym i od nowa
57zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
58podejściach, poprawkach i implementacjach stał sie całkowicie innym
59niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
60przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
61Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
62aufs-a. Część terminologii wywodzi się z unionfs-a.
63
4734e1ff
ER
64%package -n kernel%{_alt_kernel}-fs-aufs
65Summary: Linux driver for aufs
66Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
46de4e94 67Release: %{prel}@%{_kernel_ver_str}
4734e1ff
ER
68Group: Base/Kernel
69Requires(post,postun): /sbin/depmod
70%if %{with dist_kernel}
509b678e 71%requires_releq_kernel
72Requires(postun): %releq_kernel
4734e1ff
ER
73%endif
74
75%description -n kernel%{_alt_kernel}-fs-aufs
76This is driver for aufs for Linux.
77
78This package contains Linux module.
79
80%description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
81Sterownik dla Linuksa do aufs.
82
83Ten 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 91if [ -d %{_kernelsrcdir}/security/apparmor ]; then
92%patch4 -p1
93fi
509b678e 94
a36ba58b 95cp -a include/linux fs/aufs25
4734e1ff
ER
96
97%build
98%if %{with kernel}
096c8924 99if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
100 ! -d %{_kernelsrcdir}/security/apparmor ]; then
dd9fb61b 101 isvserver="-DVSERVER"
102fi
bce0b37e 103%ifarch %{x8664} ia64 ppc64 sparc64
104 ino_t64="-DCONFIG_AUFS_INO_T_64"
105%endif
106
32f7b99c 107export CONFIG_AUFS=m
a36ba58b 108export 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
134rm -rf $RPM_BUILD_ROOT
135
7d59a9cf 136%if %{with userspace}
137install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
138install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
139install 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
147rm -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
This page took 0.06941 seconds and 4 git commands to generate.