]> git.pld-linux.org Git - packages/aufs.git/blob - aufs.spec
- up to 20080527; fixes.patch and spin_lock.patch added, disable-security_inode_permi...
[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 %define         subver          20080527
16 %define         prel            0.%{subver}.%{rel}
17
18 %define         rel             1
19 Summary:        aufs - Another Unionfs
20 Summary(pl.UTF-8):      aufs (Another Unionfs) - inny unionfs
21 Name:           aufs
22 Version:        0
23 Release:        %{prel}
24 License:        GPL v2
25 Group:          Base/Kernel
26 Source0:        %{name}-%{subver}.tar.bz2
27 # Source0-md5:  61a932836cdb0f34e9aed6a6a6697547
28 Patch0:         %{name}-vserver.patch
29 Patch1:         %{name}-disable-security_inode_permission.patch
30 Patch2:         %{name}-fixes.patch
31 Patch3:         %{name}-spin_lock.patch
32 URL:            http://aufs.sourceforge.net/
33 %if %{with kernel}
34 %{?with_dist_kernel:BuildRequires:      kernel%{_alt_kernel}-module-build >= 3:2.6.25.2}
35 BuildRequires:  rpmbuild(macros) >= 1.379
36 %endif
37 BuildRequires:  sed >= 4.0
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 In the early days, aufs was entirely re-designed and re-implemented
42 Unionfs. After many original ideas, approaches, improvements and
43 implementations, it becomes totally different from Unionfs while
44 keeping the basic features. Unionfs is being developed by Professor
45 Erez Zadok at Stony Brook University and his team. If you don't know
46 Unionfs, I recommend you to try and know it before using aufs. Some
47 terminology in aufs follows Unionfs's.
48
49 %description -l pl.UTF-8
50 Początkowo aufs był całkowicie przeprojektowanym i od nowa
51 zaimplementowanym unionfs-em. Po wielu oryginalnych pomysłach,
52 podejściach, poprawkach i implementacjach stał sie całkowicie innym
53 niż unionfs zachowując podstawowe możliwości. unionfs jest rozwijany
54 przez profesora Ereza Zadoka w Stony Brook University i jego zespół.
55 Nie znający unionfs-a powinni spróbować go i poznać przed używaniem
56 aufs-a. Część terminologii wywodzi się z unionfs-a.
57
58 %package -n kernel%{_alt_kernel}-fs-aufs
59 Summary:        Linux driver for aufs
60 Summary(pl.UTF-8):      Sterownik dla Linuksa do aufs
61 Release:        %{prel}@%{_kernel_ver_str}
62 Group:          Base/Kernel
63 Requires(post,postun):  /sbin/depmod
64 %if %{with dist_kernel}
65 %requires_releq_kernel
66 Requires(postun):       %releq_kernel
67 %endif
68
69 %description -n kernel%{_alt_kernel}-fs-aufs
70 This is driver for aufs for Linux.
71
72 This package contains Linux module.
73
74 %description -n kernel%{_alt_kernel}-fs-aufs -l pl.UTF-8
75 Sterownik dla Linuksa do aufs.
76
77 Ten pakiet zawiera moduł jądra Linuksa.
78
79 %prep
80 %setup -qn %{name}
81 %patch0 -p1
82 %patch1 -p1
83 %patch2 -p1
84 %patch3 -p1
85
86 sed '
87         s/$(CONFIG_AUFS)/m/; 
88         %{!?debug:s/$(CONFIG_AUFS_DEBUG.*)/n/}; 
89         s/$(CONFIG_AUFS_HINOTIFY)/n/;
90         s/$(CONFIG_AUFS_EXPORT)/y/;
91         s/$(CONFIG_AUFS_SYSAUFS)/n/
92 ' -i fs/aufs/Makefile
93 cp -a include/linux fs/aufs25
94
95 %build
96 %if %{with kernel}
97 if [ -f %{_kernelsrcdir}/include/linux/vs_base.h ]; then
98         isvserver="-DVSERVER"
99 fi
100 export CONFIG_AUFS_BR_XFS=y
101 %build_kernel_modules -C fs/aufs25 -m aufs \
102         EXTRA_CFLAGS+=" \
103                 -DCONFIG_AUFS_BRANCH_MAX_127 \
104                 -DCONFIG_AUFS_BRANCH_MAX_CHAR \
105                 -DCONFIG_AUFS_FAKE_DM \
106                 -DCONFIG_AUFS_MODULE \
107                 -UCONFIG_AUFS_KSIZE_PATCH \
108                 -UCONFIG_AUFS_DLGT \
109                 %{?debug:-DCONFIG_AUFS_DEBUG} \
110                 $isvserver"
111 %endif
112
113 %if %{with userspace}
114 %{__make} -C util \
115         CC="%{__cc}" \
116         CFLAGS="%{rpmcflags} -DCONFIG_AUFS_BRANCH_MAX_127"
117 %endif
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with userspace}
123 install -d $RPM_BUILD_ROOT{%{_mandir}/man5,%{_sbindir}}
124 install util/{mount.aufs,umount.aufs,auplink,aulchown} $RPM_BUILD_ROOT%{_sbindir}
125 install util/aufs.5 $RPM_BUILD_ROOT%{_mandir}/man5/
126 %endif
127
128 %if %{with kernel}
129 %install_kernel_modules -m fs/aufs25/aufs -d kernel/fs/aufs
130 %endif
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %post   -n kernel%{_alt_kernel}-fs-aufs
136 %depmod %{_kernel_ver}
137
138 %postun -n kernel%{_alt_kernel}-fs-aufs
139 %depmod %{_kernel_ver}
140
141 %if %{with kernel}
142 %files -n kernel%{_alt_kernel}-fs-aufs
143 %defattr(644,root,root,755)
144 %dir /lib/modules/%{_kernel_ver}/kernel/fs/aufs
145 /lib/modules/%{_kernel_ver}/kernel/fs/aufs/*.ko*
146 %endif
147
148 %if %{with userspace}
149 %files
150 %defattr(644,root,root,755)
151 %doc README History
152 %attr(755,root,root) %{_sbindir}/*
153 %{_mandir}/man5/*
154 %endif
This page took 0.08227 seconds and 3 git commands to generate.