]> git.pld-linux.org Git - packages/aufs.git/blob - aufs.spec
- added apparmor support (apparmor.patch)
[packages/aufs.git] / aufs.spec
1 #
2 # TODO:
3 # - define CONFIG_ option directly
4 #
5 # Conditional build:
6 %bcond_without  dist_kernel     # allow non-distribution kernel
7 %bcond_without  kernel          # don't build kernel modules
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
15 %if "%{_alt_kernel}" != "%{nil}"
16 %undefine       with_userspace
17 %endif
18
19 %define         subver          20081030
20 %define         prel            0.%{subver}.%{rel}
21
22 %define         pname           aufs
23 %define         rel             0.1
24 Summary:        aufs - Another Unionfs
25 Summary(pl.UTF-8):      aufs (Another Unionfs) - inny unionfs
26 Name:           %{pname}%{_alt_kernel}
27 Version:        0
28 Release:        %{prel}
29 License:        GPL v2
30 Group:          Base/Kernel
31 Source0:        %{pname}-%{subver}.tar.bz2
32 # Source0-md5:  13ea25a28c5a3ed4480c1bd7f26655df
33 Patch0:         %{pname}-vserver.patch
34 #Patch1:                %{pname}-disable-security_inode_permission.patch
35 Patch2:         %{pname}-fixes.patch
36 #Patch3:                %{pname}-spin_lock.patch
37 Patch4:         %{pname}-apparmor.patch
38 URL:            http://aufs.sourceforge.net/
39 %if %{with kernel}
40 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
41 BuildRequires:  rpmbuild(macros) >= 1.379
42 %endif
43 BuildRequires:  sed >= 4.0
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
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
64 %package -n kernel%{_alt_kernel}-fs-aufs
65 Summary:        Linux driver for aufs
66 Summary(pl.UTF-8):      Sterownik dla Linuksa do aufs
67 Release:        %{prel}@%{_kernel_ver_str}
68 Group:          Base/Kernel
69 Requires(post,postun):  /sbin/depmod
70 %if %{with dist_kernel}
71 %requires_releq_kernel
72 Requires(postun):       %releq_kernel
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
85 %prep
86 %setup -qn %{pname}
87 %patch0 -p1
88 #%patch1 -p1
89 %patch2 -p1
90 #%patch3 -p1
91 if [ -d %{_kernelsrcdir}/security/apparmor ]; then
92 %patch4 -p1
93 fi
94
95 cp -a include/linux fs/aufs25
96
97 %build
98 %if %{with kernel}
99 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h &&
100      ! -d %{_kernelsrcdir}/security/apparmor ]; then
101         isvserver="-DVSERVER"
102 fi
103 %ifarch %{x8664} ia64 ppc64 sparc64
104         ino_t64="-DCONFIG_AUFS_INO_T_64"
105 %endif
106
107 export CONFIG_AUFS=m
108 export CONFIG_AUFS_BR_XFS=y
109 %build_kernel_modules -C fs/aufs25 -m aufs \
110         EXTRA_CFLAGS+=" \
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 \
116                 -UCONFIG_AUFS_DLGT \
117                 %{?debug:-DCONFIG_AUFS_DEBUG} \
118                 $isvserver \
119                 $ino_t64"
120 %endif
121
122 %if %{with userspace}
123 %{__make} -C util \
124         CC="%{__cc}" \
125         CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
126 %endif
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with userspace}
132 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
133 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
134 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
135 %endif
136
137 %if %{with kernel}
138 %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
139 %endif
140
141 %clean
142 rm -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
150 %if %{with kernel}
151 %files -n kernel%{_alt_kernel}-fs-aufs
152 %defattr(644,root,root,755)
153 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
154 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
155 %endif
156
157 %if %{with userspace}
158 %files
159 %defattr(644,root,root,755)
160 %doc README History
161 %attr(755,root,root) %{_sbindir}/*
162 %{_mandir}/man5/*
163 %endif
This page took 0.074354 seconds and 3 git commands to generate.