udisks2-vl.spec 11 KB

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