1 | %bcond_with systemd |
---|
2 | |
---|
3 | %define glib2_version 2.40.0 |
---|
4 | %define dbus_version 1.6.14 |
---|
5 | %define polkit_version 0.104 |
---|
6 | %define libatasmart_version 0.17 |
---|
7 | %global libblockdev_version 2.24 |
---|
8 | |
---|
9 | # valid options are 'luks1' or 'luks2' |
---|
10 | %define default_luks_encryption luks2 |
---|
11 | |
---|
12 | Summary: Storage Management Service |
---|
13 | Name: udisks2 |
---|
14 | Version: 2.9.0 |
---|
15 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
16 | Group: admin-tools,system |
---|
17 | Vendor: Project Vine |
---|
18 | Distribution: Vine Linux |
---|
19 | |
---|
20 | License: GPLv2+ |
---|
21 | URL: http://www.freedesktop.org/wiki/Software/udisks |
---|
22 | Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 |
---|
23 | |
---|
24 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
25 | |
---|
26 | BuildRequires: glib2-devel >= %{glib2_version} |
---|
27 | BuildRequires: gobject-introspection-devel |
---|
28 | BuildRequires: libgudev-devel |
---|
29 | BuildRequires: dbus-devel >= %{dbus_version} |
---|
30 | BuildRequires: polkit-devel >= %{polkit_version} |
---|
31 | BuildRequires: libacl-devel |
---|
32 | BuildRequires: intltool |
---|
33 | BuildRequires: libatasmart-devel >= %{libatasmart_version} |
---|
34 | BuildRequires: lvm2-devel |
---|
35 | BuildRequires: chrpath |
---|
36 | BuildRequires: gtk-doc |
---|
37 | BuildRequires: gettext-devel |
---|
38 | BuildRequires: libblockdev-devel >= %{libblockdev_version} |
---|
39 | BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version} |
---|
40 | BuildRequires: libblockdev-dm-devel >= %{libblockdev_version} |
---|
41 | BuildRequires: libblockdev-fs-devel >= %{libblockdev_version} |
---|
42 | BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version} |
---|
43 | BuildRequires: libblockdev-loop-devel >= %{libblockdev_version} |
---|
44 | BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version} |
---|
45 | BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version} |
---|
46 | BuildRequires: libblockdev-part-devel >= %{libblockdev_version} |
---|
47 | BuildRequires: libblockdev-swap-devel >= %{libblockdev_version} |
---|
48 | %if 0 |
---|
49 | BuildRequires: libblockdev-vdo-devel >= %{libblockdev_version} |
---|
50 | %endif |
---|
51 | BuildRequires: libmount-devel |
---|
52 | BuildRequires: libuuid-devel |
---|
53 | %if %{with systemd} |
---|
54 | BuildRequires: systemd-devel |
---|
55 | %{?systemd_requires} |
---|
56 | %else |
---|
57 | BuildRequires: eudev-libgudev1-devel |
---|
58 | BuildRequires: eudev-libudev-devel |
---|
59 | BuildRequires: elogind-devel |
---|
60 | %endif |
---|
61 | |
---|
62 | Requires: libblockdev >= %{libblockdev_version} |
---|
63 | Requires: libblockdev-part >= %{libblockdev_version} |
---|
64 | Requires: libblockdev-loop >= %{libblockdev_version} |
---|
65 | Requires: libblockdev-swap >= %{libblockdev_version} |
---|
66 | Requires: libblockdev-mdraid >= %{libblockdev_version} |
---|
67 | Requires: libblockdev-fs >= %{libblockdev_version} |
---|
68 | Requires: libblockdev-crypto >= %{libblockdev_version} |
---|
69 | |
---|
70 | # needed to pull in the system bus daemon |
---|
71 | Requires: dbus >= %{dbus_version} |
---|
72 | %if !%{with systemd} |
---|
73 | # needed to pull in the udev daemon |
---|
74 | Requires: eudev |
---|
75 | %endif |
---|
76 | # we need at least this version for bugfixes / features etc. |
---|
77 | Requires: libatasmart >= %{libatasmart_version} |
---|
78 | # for mount, umount, mkswap |
---|
79 | Requires: util-linux-ng |
---|
80 | # for mkfs.ext3, mkfs.ext3, e2label |
---|
81 | Requires: e2fsprogs |
---|
82 | # for mkfs.xfs, xfs_admin |
---|
83 | Requires: xfsprogs |
---|
84 | # for mkfs.vfat |
---|
85 | Requires: dosfstools |
---|
86 | # For ejecting removable disks |
---|
87 | Requires: eject |
---|
88 | # For utab monitor |
---|
89 | Requires: libmount |
---|
90 | # For utab monitor |
---|
91 | Requires: gdisk |
---|
92 | # For mkntfs (not available on rhel or on ppc/ppc64) |
---|
93 | Requires: ntfsprogs |
---|
94 | |
---|
95 | # for /proc/self/mountinfo, only available in 2.6.26 or higher |
---|
96 | Conflicts: kernel < 2.6.26 |
---|
97 | |
---|
98 | # we need liblvm2app at least this recent since the ABI changed (sizes |
---|
99 | # reported in number of bytes instead of number of sectors) without |
---|
100 | # the sonumber changing |
---|
101 | # |
---|
102 | Requires: lvm2-libs >= %{lvm2_version} |
---|
103 | |
---|
104 | %description |
---|
105 | udisks provides a daemon, D-Bus API and command line tools |
---|
106 | for managing disks and storage devices. |
---|
107 | |
---|
108 | |
---|
109 | %package lvm2 |
---|
110 | Summary: udisks2 module for LVM2 |
---|
111 | Group: system |
---|
112 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
113 | License: LGPLv2+ |
---|
114 | Requires: lvm2 |
---|
115 | Requires: libblockdev-lvm >= %{libblockdev_version} |
---|
116 | |
---|
117 | %description lvm2 |
---|
118 | This package contains module for LVM2 configuration. |
---|
119 | |
---|
120 | |
---|
121 | %package zram |
---|
122 | Summary: udisks2 module for ZRAM |
---|
123 | Group: system |
---|
124 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
125 | License: LGPLv2+ |
---|
126 | Requires: libblockdev-kbd >= %{libblockdev_version} |
---|
127 | Requires: libblockdev-swap >= %{libblockdev_version} |
---|
128 | |
---|
129 | %description zram |
---|
130 | This package contains module for ZRAM configuration. |
---|
131 | |
---|
132 | |
---|
133 | %package bcache |
---|
134 | Summary: udisks2 module for Bcache |
---|
135 | Group: system |
---|
136 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
137 | License: LGPLv2+ |
---|
138 | Requires: libblockdev-kbd >= %{libblockdev_version} |
---|
139 | BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version} |
---|
140 | #Provides: storaged-bcache = %{version}-%{release} |
---|
141 | #Obsoletes: storaged-bcache |
---|
142 | |
---|
143 | %description bcache |
---|
144 | This package contains module for Bcache configuration. |
---|
145 | |
---|
146 | |
---|
147 | %if 0 |
---|
148 | %package vdo |
---|
149 | Summary: udisks2 module for VDO |
---|
150 | Group: system |
---|
151 | Requires: %{name}%{?_isa} = %{version}-%{release} |
---|
152 | License: LGPLv2+ |
---|
153 | Requires: vdo |
---|
154 | Requires: libblockdev-vdo >= %{libblockdev_version} |
---|
155 | |
---|
156 | %description vdo |
---|
157 | This package contains module for VDO management. |
---|
158 | %endif |
---|
159 | |
---|
160 | |
---|
161 | %package devel |
---|
162 | Summary: D-Bus interface definitions for udisks |
---|
163 | Group: programming |
---|
164 | Requires: %{name} = %{version}-%{release} |
---|
165 | |
---|
166 | # See comment above |
---|
167 | # |
---|
168 | %description devel |
---|
169 | D-Bus interface definitions and documentation for udisks. |
---|
170 | |
---|
171 | |
---|
172 | %package docs |
---|
173 | Summary: Documentation for udisks2 |
---|
174 | Group: documentation |
---|
175 | Requires: %{name} = %{version}-%{release} |
---|
176 | BuildArch: noarch |
---|
177 | Provides: %{name}-doc = %{version}-%{release} |
---|
178 | |
---|
179 | %description docs |
---|
180 | This package contains documentation for udisks2. |
---|
181 | |
---|
182 | |
---|
183 | %prep |
---|
184 | %setup -q -n udisks-%{version} |
---|
185 | sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" |
---|
186 | |
---|
187 | |
---|
188 | %build |
---|
189 | autoreconf -vif |
---|
190 | %configure \ |
---|
191 | --sbindir=%{_syssbindir} \ |
---|
192 | --enable-lvm2 \ |
---|
193 | --enable-lvmcache \ |
---|
194 | --enable-zram \ |
---|
195 | --enable-bcache \ |
---|
196 | --enable-gtk-doc |
---|
197 | make %{?_smp_mflags} |
---|
198 | |
---|
199 | |
---|
200 | %install |
---|
201 | rm -rf $RPM_BUILD_ROOT |
---|
202 | |
---|
203 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
204 | |
---|
205 | find %{buildroot} -name \*.la -o -name \*.a | xargs rm |
---|
206 | |
---|
207 | chrpath --delete %{buildroot}/%{_syssbindir}/umount.udisks2 |
---|
208 | chrpath --delete %{buildroot}/%{_bindir}/udisksctl |
---|
209 | chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd |
---|
210 | |
---|
211 | mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d |
---|
212 | |
---|
213 | %find_lang %{name} |
---|
214 | |
---|
215 | |
---|
216 | %clean |
---|
217 | rm -rf $RPM_BUILD_ROOT |
---|
218 | |
---|
219 | |
---|
220 | %post |
---|
221 | /sbin/ldconfig |
---|
222 | %if %{with systemd} |
---|
223 | %systemd_post udisks2.service |
---|
224 | %endif |
---|
225 | # skip retriggering if udevd isn't even accessible, e.g. containers or |
---|
226 | # rpm-ostree-based systems |
---|
227 | if [ -S /run/udev/control ]; then |
---|
228 | udevadm control --reload |
---|
229 | udevadm trigger |
---|
230 | fi |
---|
231 | |
---|
232 | %if %{with systemd} |
---|
233 | %preun |
---|
234 | %systemd_preun udisks2.service |
---|
235 | %endif |
---|
236 | |
---|
237 | %postun |
---|
238 | /sbin/ldconfig |
---|
239 | %if %{with systemd} |
---|
240 | %systemd_postun_with_restart udisks2.service |
---|
241 | %endif |
---|
242 | |
---|
243 | %if %{with systemd} |
---|
244 | %post -n %{name}-zram |
---|
245 | %systemd_post zram-setup@.service |
---|
246 | |
---|
247 | %preun -n %{name}-zram |
---|
248 | %systemd_preun zram-setup@.service |
---|
249 | |
---|
250 | %postun -n %{name}-zram |
---|
251 | %systemd_postun zram-setup@.service |
---|
252 | %endif |
---|
253 | |
---|
254 | |
---|
255 | %files -f %{name}.lang |
---|
256 | %defattr(-,root,root,-) |
---|
257 | %license COPYING |
---|
258 | %doc README.md AUTHORS NEWS HACKING |
---|
259 | %dir %{_sysconfdir}/udisks2 |
---|
260 | %dir %{_sysconfdir}/udisks2/modules.conf.d |
---|
261 | %config(noreplace) %{_sysconfdir}/udisks2/udisks2.conf |
---|
262 | %config(noreplace) %{_sysconfdir}/udisks2/mount_options.conf.example |
---|
263 | /lib/udev/rules.d/80-udisks2.rules |
---|
264 | %{_bindir}/udisksctl |
---|
265 | %{_syssbindir}/umount.udisks2 |
---|
266 | %{_libexecdir}/udisks2/udisksd |
---|
267 | %{_libdir}/libudisks2.so.* |
---|
268 | %{_libdir}/girepository-1.0/UDisks-2.0.typelib |
---|
269 | %dir %{_libdir}/udisks2 |
---|
270 | %dir %{_libdir}/udisks2/modules |
---|
271 | %dir %{_datadir}/bash-completion |
---|
272 | %dir %{_datadir}/bash-completion/completions |
---|
273 | %{_datadir}/bash-completion/completions/udisksctl |
---|
274 | %{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service |
---|
275 | %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf |
---|
276 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.policy |
---|
277 | %{_mandir}/man1/* |
---|
278 | %{_mandir}/man5/* |
---|
279 | %{_mandir}/man8/* |
---|
280 | %attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2 |
---|
281 | %if %{with systemd} |
---|
282 | %{_tmpfilesdir}/%{name}.conf |
---|
283 | %{_unitdir}/udisks2.service |
---|
284 | %endif |
---|
285 | |
---|
286 | %files lvm2 |
---|
287 | %{_libdir}/udisks2/modules/libudisks2_lvm2.so |
---|
288 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.lvm2.policy |
---|
289 | |
---|
290 | %files zram |
---|
291 | %dir %{_sysconfdir}/udisks2/modules.conf.d |
---|
292 | %{_libdir}/udisks2/modules/libudisks2_zram.so |
---|
293 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy |
---|
294 | %if %{with systemd} |
---|
295 | %{_unitdir}/zram-setup@.service |
---|
296 | %endif |
---|
297 | |
---|
298 | %files bcache |
---|
299 | %{_libdir}/udisks2/modules/libudisks2_bcache.so |
---|
300 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy |
---|
301 | |
---|
302 | %if 0 |
---|
303 | %files vdo |
---|
304 | %{_libdir}/udisks2/modules/libudisks2_vdo.so |
---|
305 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.vdo.policy |
---|
306 | %endif |
---|
307 | |
---|
308 | %files devel |
---|
309 | %defattr(-,root,root,-) |
---|
310 | %{_includedir}/udisks2 |
---|
311 | %{_libdir}/libudisks2.so |
---|
312 | %{_libdir}/pkgconfig/udisks2*.pc |
---|
313 | %{_datadir}/gir-1.0/UDisks-2.0.gir |
---|
314 | |
---|
315 | %files docs |
---|
316 | %defattr(-,root,root,-) |
---|
317 | %{_datadir}/gtk-doc/html/%{name} |
---|
318 | |
---|
319 | # |
---|
320 | %changelog |
---|
321 | * Tue Aug 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.0-1 |
---|
322 | - new upstream release. |
---|
323 | - added systemd support (disabled as default). |
---|
324 | |
---|
325 | * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.4-1 |
---|
326 | - new upstream release. |
---|
327 | |
---|
328 | * Mon Jan 07 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.1-2 |
---|
329 | - enabled lvm2, lvmcache and zram. |
---|
330 | |
---|
331 | * Mon Dec 17 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.1-1 |
---|
332 | - new upstream release. |
---|
333 | - enabled elogind. |
---|
334 | |
---|
335 | * Sun Apr 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.7-1 |
---|
336 | - new upstream release |
---|
337 | |
---|
338 | * Sun Jan 03 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.6-2 |
---|
339 | - add Requires: gdisk |
---|
340 | |
---|
341 | * Sun Aug 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.6-1 |
---|
342 | - new upstream release |
---|
343 | |
---|
344 | * Sun May 24 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.5-2 |
---|
345 | - remove unused files |
---|
346 | - change path of umount.udisks2 |
---|
347 | |
---|
348 | * Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.5-1 |
---|
349 | - new upstream release |
---|
350 | |
---|
351 | * Thu Dec 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.4-1 |
---|
352 | - new upstream release |
---|
353 | |
---|
354 | * Thu Jul 03 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.3-3 |
---|
355 | - change BuildRequires: eudev-libgudev1-devel instead of libgudev1-devel |
---|
356 | - change BuildRequires: eudev-libudev-devel instead of libudev-devel |
---|
357 | |
---|
358 | * Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.3-1 |
---|
359 | - new upstream release |
---|
360 | |
---|
361 | * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-2 |
---|
362 | - rebuild with VineSeed environment |
---|
363 | |
---|
364 | * Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-1 |
---|
365 | - new upstream release |
---|
366 | |
---|
367 | * Thu Mar 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.0-1 |
---|
368 | - new upstream release |
---|
369 | |
---|
370 | * Thu Jan 03 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-1 |
---|
371 | - new upstream release |
---|
372 | |
---|
373 | * Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.0-1 |
---|
374 | - new upstream release |
---|
375 | |
---|
376 | * Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.99.0-1 |
---|
377 | - new upstream release |
---|
378 | |
---|
379 | * Sun Jun 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.98.0-1 |
---|
380 | - new upstream release |
---|
381 | - add BuildRequires: libacl-devel |
---|
382 | |
---|
383 | * Sun Apr 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.94.0-1 |
---|
384 | - Initial build for Vine Linux |
---|
385 | |
---|