[12462] | 1 | %bcond_with systemd |
---|
| 2 | |
---|
[8353] | 3 | %define glib2_version 2.40.0 |
---|
[7938] | 4 | %define dbus_version 1.6.14 |
---|
[6011] | 5 | %define polkit_version 0.104 |
---|
| 6 | %define libatasmart_version 0.17 |
---|
[12462] | 7 | %global libblockdev_version 2.24 |
---|
[6011] | 8 | |
---|
[12462] | 9 | # valid options are 'luks1' or 'luks2' |
---|
| 10 | %define default_luks_encryption luks2 |
---|
| 11 | |
---|
[6011] | 12 | Summary: Storage Management Service |
---|
| 13 | Name: udisks2 |
---|
[12462] | 14 | Version: 2.9.0 |
---|
| 15 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
| 16 | Group: admin-tools,system |
---|
[12361] | 17 | Vendor: Project Vine |
---|
| 18 | Distribution: Vine Linux |
---|
| 19 | |
---|
[6011] | 20 | License: GPLv2+ |
---|
| 21 | URL: http://www.freedesktop.org/wiki/Software/udisks |
---|
[12361] | 22 | Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 |
---|
[6011] | 23 | |
---|
| 24 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 25 | |
---|
| 26 | BuildRequires: glib2-devel >= %{glib2_version} |
---|
[12015] | 27 | BuildRequires: gobject-introspection-devel |
---|
[12462] | 28 | BuildRequires: libgudev-devel |
---|
[6011] | 29 | BuildRequires: dbus-devel >= %{dbus_version} |
---|
| 30 | BuildRequires: polkit-devel >= %{polkit_version} |
---|
[6304] | 31 | BuildRequires: libacl-devel |
---|
[6011] | 32 | BuildRequires: intltool |
---|
| 33 | BuildRequires: libatasmart-devel >= %{libatasmart_version} |
---|
[12462] | 34 | BuildRequires: lvm2-devel |
---|
[12015] | 35 | BuildRequires: chrpath |
---|
[12462] | 36 | BuildRequires: gtk-doc |
---|
| 37 | BuildRequires: gettext-devel |
---|
[12015] | 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 |
---|
[12462] | 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 |
---|
[6011] | 61 | |
---|
[12462] | 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 | |
---|
[6011] | 70 | # needed to pull in the system bus daemon |
---|
| 71 | Requires: dbus >= %{dbus_version} |
---|
[12462] | 72 | %if !%{with systemd} |
---|
[6011] | 73 | # needed to pull in the udev daemon |
---|
[8732] | 74 | Requires: eudev |
---|
[12462] | 75 | %endif |
---|
[6011] | 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 |
---|
[12462] | 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) |
---|
[6011] | 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 | |
---|
[12015] | 108 | |
---|
| 109 | %package lvm2 |
---|
| 110 | Summary: udisks2 module for LVM2 |
---|
[12462] | 111 | Group: system |
---|
[12015] | 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 |
---|
[12462] | 123 | Group: system |
---|
[12015] | 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 | |
---|
[12462] | 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 | |
---|
[12015] | 147 | %if 0 |
---|
| 148 | %package vdo |
---|
| 149 | Summary: udisks2 module for VDO |
---|
[12462] | 150 | Group: system |
---|
[12015] | 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 | |
---|
[6011] | 161 | %package devel |
---|
| 162 | Summary: D-Bus interface definitions for udisks |
---|
[12462] | 163 | Group: programming |
---|
[6011] | 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 | |
---|
[7938] | 172 | %package docs |
---|
[6011] | 173 | Summary: Documentation for udisks2 |
---|
[12462] | 174 | Group: documentation |
---|
[6011] | 175 | Requires: %{name} = %{version}-%{release} |
---|
[7938] | 176 | BuildArch: noarch |
---|
| 177 | Provides: %{name}-doc = %{version}-%{release} |
---|
[6011] | 178 | |
---|
[7938] | 179 | %description docs |
---|
[6011] | 180 | This package contains documentation for udisks2. |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | %prep |
---|
| 184 | %setup -q -n udisks-%{version} |
---|
[12462] | 185 | sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" |
---|
[6011] | 186 | |
---|
[12462] | 187 | |
---|
[6011] | 188 | %build |
---|
[12015] | 189 | autoreconf -vif |
---|
[6011] | 190 | %configure \ |
---|
[9578] | 191 | --sbindir=%{_syssbindir} \ |
---|
[12015] | 192 | --enable-lvm2 \ |
---|
| 193 | --enable-lvmcache \ |
---|
| 194 | --enable-zram \ |
---|
[12462] | 195 | --enable-bcache \ |
---|
[6011] | 196 | --enable-gtk-doc |
---|
[12462] | 197 | make %{?_smp_mflags} |
---|
[6011] | 198 | |
---|
[12462] | 199 | |
---|
[6011] | 200 | %install |
---|
| 201 | rm -rf $RPM_BUILD_ROOT |
---|
| 202 | |
---|
| 203 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
| 204 | |
---|
[12015] | 205 | find %{buildroot} -name \*.la -o -name \*.a | xargs rm |
---|
[6011] | 206 | |
---|
[12015] | 207 | chrpath --delete %{buildroot}/%{_syssbindir}/umount.udisks2 |
---|
| 208 | chrpath --delete %{buildroot}/%{_bindir}/udisksctl |
---|
| 209 | chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd |
---|
[6081] | 210 | |
---|
[12462] | 211 | mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d |
---|
[12015] | 212 | |
---|
[12462] | 213 | %find_lang %{name} |
---|
[12015] | 214 | |
---|
| 215 | |
---|
[6011] | 216 | %clean |
---|
| 217 | rm -rf $RPM_BUILD_ROOT |
---|
| 218 | |
---|
[12462] | 219 | |
---|
[12015] | 220 | %post |
---|
| 221 | /sbin/ldconfig |
---|
[12462] | 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 |
---|
[6011] | 231 | |
---|
[12462] | 232 | %if %{with systemd} |
---|
| 233 | %preun |
---|
| 234 | %systemd_preun udisks2.service |
---|
| 235 | %endif |
---|
[6011] | 236 | |
---|
[12462] | 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 | |
---|
[6011] | 255 | %files -f %{name}.lang |
---|
| 256 | %defattr(-,root,root,-) |
---|
[12000] | 257 | %license COPYING |
---|
[12462] | 258 | %doc README.md AUTHORS NEWS HACKING |
---|
| 259 | %dir %{_sysconfdir}/udisks2 |
---|
| 260 | %dir %{_sysconfdir}/udisks2/modules.conf.d |
---|
[12000] | 261 | %config(noreplace) %{_sysconfdir}/udisks2/udisks2.conf |
---|
[12462] | 262 | %config(noreplace) %{_sysconfdir}/udisks2/mount_options.conf.example |
---|
[6011] | 263 | /lib/udev/rules.d/80-udisks2.rules |
---|
| 264 | %{_bindir}/udisksctl |
---|
[9578] | 265 | %{_syssbindir}/umount.udisks2 |
---|
[9715] | 266 | %{_libexecdir}/udisks2/udisksd |
---|
[6011] | 267 | %{_libdir}/libudisks2.so.* |
---|
| 268 | %{_libdir}/girepository-1.0/UDisks-2.0.typelib |
---|
[12015] | 269 | %dir %{_libdir}/udisks2 |
---|
| 270 | %dir %{_libdir}/udisks2/modules |
---|
[12000] | 271 | %dir %{_datadir}/bash-completion |
---|
| 272 | %dir %{_datadir}/bash-completion/completions |
---|
[6951] | 273 | %{_datadir}/bash-completion/completions/udisksctl |
---|
[6011] | 274 | %{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service |
---|
[12361] | 275 | %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf |
---|
[12000] | 276 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.policy |
---|
[6011] | 277 | %{_mandir}/man1/* |
---|
[12000] | 278 | %{_mandir}/man5/* |
---|
[6011] | 279 | %{_mandir}/man8/* |
---|
| 280 | %attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2 |
---|
[12462] | 281 | %if %{with systemd} |
---|
| 282 | %{_tmpfilesdir}/%{name}.conf |
---|
| 283 | %{_unitdir}/udisks2.service |
---|
| 284 | %endif |
---|
[6011] | 285 | |
---|
[12015] | 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 |
---|
[12462] | 294 | %if %{with systemd} |
---|
| 295 | %{_unitdir}/zram-setup@.service |
---|
| 296 | %endif |
---|
[12015] | 297 | |
---|
[12462] | 298 | %files bcache |
---|
| 299 | %{_libdir}/udisks2/modules/libudisks2_bcache.so |
---|
| 300 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy |
---|
| 301 | |
---|
[12015] | 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 | |
---|
[6011] | 308 | %files devel |
---|
| 309 | %defattr(-,root,root,-) |
---|
| 310 | %{_includedir}/udisks2 |
---|
| 311 | %{_libdir}/libudisks2.so |
---|
[12462] | 312 | %{_libdir}/pkgconfig/udisks2*.pc |
---|
[6011] | 313 | %{_datadir}/gir-1.0/UDisks-2.0.gir |
---|
| 314 | |
---|
[7938] | 315 | %files docs |
---|
[6011] | 316 | %defattr(-,root,root,-) |
---|
| 317 | %{_datadir}/gtk-doc/html/%{name} |
---|
| 318 | |
---|
| 319 | # |
---|
| 320 | %changelog |
---|
[12462] | 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 | |
---|
[12361] | 325 | * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.4-1 |
---|
| 326 | - new upstream release. |
---|
| 327 | |
---|
[12015] | 328 | * Mon Jan 07 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.1-2 |
---|
| 329 | - enabled lvm2, lvmcache and zram. |
---|
| 330 | |
---|
[12000] | 331 | * Mon Dec 17 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.1-1 |
---|
| 332 | - new upstream release. |
---|
| 333 | - enabled elogind. |
---|
| 334 | |
---|
[10195] | 335 | * Sun Apr 24 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.7-1 |
---|
| 336 | - new upstream release |
---|
| 337 | |
---|
[9930] | 338 | * Sun Jan 03 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.6-2 |
---|
| 339 | - add Requires: gdisk |
---|
| 340 | |
---|
[9715] | 341 | * Sun Aug 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.6-1 |
---|
| 342 | - new upstream release |
---|
| 343 | |
---|
[9578] | 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 | |
---|
[9502] | 348 | * Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.5-1 |
---|
| 349 | - new upstream release |
---|
| 350 | |
---|
[9192] | 351 | * Thu Dec 25 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.4-1 |
---|
| 352 | - new upstream release |
---|
| 353 | |
---|
[8732] | 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 | |
---|
[8353] | 358 | * Sun Mar 30 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.3-1 |
---|
| 359 | - new upstream release |
---|
| 360 | |
---|
[8119] | 361 | * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-2 |
---|
| 362 | - rebuild with VineSeed environment |
---|
| 363 | |
---|
[7938] | 364 | * Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.1-1 |
---|
| 365 | - new upstream release |
---|
| 366 | |
---|
[7582] | 367 | * Thu Mar 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.0-1 |
---|
| 368 | - new upstream release |
---|
| 369 | |
---|
[7294] | 370 | * Thu Jan 03 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.1-1 |
---|
| 371 | - new upstream release |
---|
| 372 | |
---|
[6951] | 373 | * Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.0.0-1 |
---|
| 374 | - new upstream release |
---|
| 375 | |
---|
[6890] | 376 | * Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.99.0-1 |
---|
| 377 | - new upstream release |
---|
| 378 | |
---|
[6304] | 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 | |
---|
[6011] | 383 | * Sun Apr 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.94.0-1 |
---|
| 384 | - Initial build for Vine Linux |
---|
| 385 | |
---|