udisks2-vl.spec 10 KB

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