]> git.pld-linux.org Git - packages/aufs.git/blame - aufs.spec
- rel up
[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
f57909d6 19%define subver 20090315
46de4e94
ER
20%define prel 0.%{subver}.%{rel}
21
299f3eee 22%define pname aufs
a91bcec4 23%define rel 8
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
f57909d6 32# Source0-md5: f2cb8c2dcf40ed076b1fcdcb1e91412e
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
f57909d6 38Patch5: %{pname}-br-xfs-fix.patch
53833cf9 39Patch6: %{pname}-vfsub.c.patch
4734e1ff
ER
40URL: http://aufs.sourceforge.net/
41%if %{with kernel}
069b6c5a 42%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
509b678e 43BuildRequires: rpmbuild(macros) >= 1.379
4734e1ff 44%endif
518cfd38 45BuildRequires: sed >= 4.0
4734e1ff
ER
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49In the early days, aufs was entirely re-designed and re-implemented
50Unionfs. After many original ideas, approaches, improvements and
51implementations, it becomes totally different from Unionfs while
52keeping the basic features. Unionfs is being developed by Professor
53Erez Zadok at Stony Brook University and his team. If you don't know
54Unionfs, I recommend you to try and know it before using aufs. Some
55terminology in aufs follows Unionfs's.
56
bf531407
JB
57%description -l pl.UTF-8
58Początkowo aufs był całkowicie przeprojektowanym i od nowa
59zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
60podejściach, poprawkach i implementacjach stał sie całkowicie innym
61niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
62przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
63Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
64aufs-a. Część terminologii wywodzi się z unionfs-a.
65
4734e1ff
ER
66%package -n kernel%{_alt_kernel}-fs-aufs
67Summary: Linux driver for aufs
68Summary(pl.UTF-8): Sterownik dla Linuksa do aufs
46de4e94 69Release: %{prel}@%{_kernel_ver_str}
4734e1ff
ER
70Group: Base/Kernel
71Requires(post,postun): /sbin/depmod
72%if %{with dist_kernel}
509b678e 73%requires_releq_kernel
74Requires(postun): %releq_kernel
4734e1ff
ER
75%endif
76
77%description -n kernel%{_alt_kernel}-fs-aufs
78This is driver for aufs for Linux.
79
80This package contains Linux module.
81
82%description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
83Sterownik dla Linuksa do aufs.
84
85Ten pakiet zawiera moduł jądra Linuksa.
86
4734e1ff 87%prep
299f3eee 88%setup -qn %{pname}
509b678e 89%patch0 -p1
6afe7181 90#%patch1 -p1
a36ba58b 91%patch2 -p1
6afe7181 92#%patch3 -p1
ee8d0815 93%if "%{_kernel_ver}" < "2.6.30"
096c8924 94if [ -d %{_kernelsrcdir}/security/apparmor ]; then
95%patch4 -p1
96fi
ee8d0815 97%endif
f57909d6 98%patch5 -p1
4b99866b 99if [ -d %{_kernelsrcdir}/fs/unionfs ]; then
53833cf9 100%patch6 -p0
ee8d0815
AM
101%if "%{_kernel_ver}" >= "2.6.30"
102else
103%patch6 -p0
104%endif
4b99866b 105fi
509b678e 106
a36ba58b 107cp -a include/linux fs/aufs25
4734e1ff
ER
108
109%build
110%if %{with kernel}
096c8924 111if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
112 ! -d %{_kernelsrcdir}/security/apparmor ]; then
dd9fb61b 113 isvserver="-DVSERVER"
114fi
bce0b37e 115%ifarch %{x8664} ia64 ppc64 sparc64
116 ino_t64="-DCONFIG_AUFS_INO_T_64"
117%endif
118
32f7b99c 119export CONFIG_AUFS=m
a36ba58b 120export CONFIG_AUFS_BR_XFS=y
121%build_kernel_modules -C fs/aufs25 -m aufs \
122 EXTRA_CFLAGS+=" \
509b678e 123 -DCONFIG_AUFS_BRANCH_MAX_127 \
124 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
125 -DCONFIG_AUFS_FAKE_DM \
126 -DCONFIG_AUFS_MODULE \
127 -UCONFIG_AUFS_KSIZE_PATCH \
3b805c44 128 -UCONFIG_AUFS_DLGT \
cce770f5 129%if "%{_alt_kernel}" != "vanilla"
130 -DCONFIG_AUFS_UNIONFS23_PATCH \
131 -DCONFIG_AUFS_UNIONFS22_PATCH \
132 -DCONFIG_AUFS_SPLICE_PATCH \
133%endif
509b678e 134 %{?debug:-DCONFIG_AUFS_DEBUG} \
bce0b37e 135 $isvserver \
136 $ino_t64"
4734e1ff
ER
137%endif
138
7d59a9cf 139%if %{with userspace}
140%{__make} -C util \
141 CC="%{__cc}" \
142 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
143%endif
144
4734e1ff
ER
145%install
146rm -rf $RPM_BUILD_ROOT
147
7d59a9cf 148%if %{with userspace}
149install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
150install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
151install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
152%endif
153
4734e1ff 154%if %{with kernel}
a36ba58b 155%install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
4734e1ff
ER
156%endif
157
158%clean
159rm -rf $RPM_BUILD_ROOT
160
161%post -n kernel%{_alt_kernel}-fs-aufs
162%depmod %{_kernel_ver}
163
164%postun -n kernel%{_alt_kernel}-fs-aufs
165%depmod %{_kernel_ver}
166
4734e1ff 167%if %{with kernel}
4734e1ff
ER
168%files -n kernel%{_alt_kernel}-fs-aufs
169%defattr(644,root,root,755)
0f3a7497 170%dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
171/lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
4734e1ff
ER
172%endif
173
4734e1ff
ER
174%if %{with userspace}
175%files
176%defattr(644,root,root,755)
f57909d6 177%doc README.aufs1 README.aufs2 History
7d59a9cf 178%attr(755,root,root) %{_sbindir}/*
179%{_mandir}/man5/*
4734e1ff 180%endif
This page took 0.048755 seconds and 4 git commands to generate.