]> git.pld-linux.org Git - packages/aufs.git/blame - aufs.spec
- added apparmor support (apparmor.patch)
[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
6afe7181 19%define subver 20081030
46de4e94
ER
20%define prel 0.%{subver}.%{rel}
21
299f3eee 22%define pname aufs
6afe7181 23%define rel 0.1
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
6afe7181 32# Source0-md5: 13ea25a28c5a3ed4480c1bd7f26655df
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 \
509b678e 117 %{?debug:-DCONFIG_AUFS_DEBUG} \
bce0b37e 118 $isvserver \
119 $ino_t64"
4734e1ff
ER
120%endif
121
7d59a9cf 122%if %{with userspace}
123%{__make} -C util \
124 CC="%{__cc}" \
125 CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
126%endif
127
4734e1ff
ER
128%install
129rm -rf $RPM_BUILD_ROOT
130
7d59a9cf 131%if %{with userspace}
132install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
133install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
134install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
135%endif
136
4734e1ff 137%if %{with kernel}
a36ba58b 138%install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
4734e1ff
ER
139%endif
140
141%clean
142rm -rf $RPM_BUILD_ROOT
143
144%post -n kernel%{_alt_kernel}-fs-aufs
145%depmod %{_kernel_ver}
146
147%postun -n kernel%{_alt_kernel}-fs-aufs
148%depmod %{_kernel_ver}
149
4734e1ff 150%if %{with kernel}
4734e1ff
ER
151%files -n kernel%{_alt_kernel}-fs-aufs
152%defattr(644,root,root,755)
0f3a7497 153%dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
154/lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
4734e1ff
ER
155%endif
156
4734e1ff
ER
157%if %{with userspace}
158%files
159%defattr(644,root,root,755)
160%doc README History
7d59a9cf 161%attr(755,root,root) %{_sbindir}/*
162%{_mandir}/man5/*
4734e1ff 163%endif
This page took 0.08051 seconds and 4 git commands to generate.