neil / rpms / udisks2

Forked from rpms/udisks2 a year ago
Clone
a19a3f
%global glib2_version                   2.36
a19a3f
%global gobject_introspection_version   1.30.0
a19a3f
%global polkit_version                  0.102
a19a3f
%global systemd_version                 208
a19a3f
%global libatasmart_version             0.17
a19a3f
%global dbus_version                    1.4.0
a19a3f
%global with_gtk_doc                    1
a19a3f
%global libblockdev_version             2.10
a19a3f
a19a3f
%define is_git                          %(git show > /dev/null 2>&1 && echo 1 || echo 0)
a19a3f
%define git_hash                        %(git log -1 --pretty=format:"%h" || true)
a19a3f
%define build_date                      %(date '+%Y%m%d')
a19a3f
a19a3f
Name:    udisks2
a19a3f
Summary: Disk Manager
a19a3f
Version: 2.7.3
a19a3f
Release: 6%{?dist}
a19a3f
License: GPLv2+
a19a3f
Group:   System Environment/Libraries
a19a3f
URL:     https://github.com/storaged-project/udisks
a19a3f
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
a19a3f
a19a3f
Patch0:  reboot_mpoint_cleanup_1384796.patch
a19a3f
Patch1:  raid_watchers_1400056.patch
a19a3f
Patch2:  no_discard_1516697.patch
a19a3f
Patch3:  fix_thinpool_size_1534904.patch
a19a3f
Patch4:  fix_mpoin_cleanup_1384796.patch
a19a3f
a19a3f
BuildRequires: glib2-devel >= %{glib2_version}
a19a3f
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
a19a3f
BuildRequires: libgudev1-devel >= %{systemd_version}
a19a3f
BuildRequires: libatasmart-devel >= %{libatasmart_version}
a19a3f
BuildRequires: polkit-devel >= %{polkit_version}
a19a3f
BuildRequires: systemd-devel >= %{systemd_version}
a19a3f
BuildRequires: gnome-common
a19a3f
BuildRequires: libacl-devel
a19a3f
BuildRequires: chrpath
a19a3f
BuildRequires: gtk-doc
a19a3f
BuildRequires: intltool
a19a3f
BuildRequires: redhat-rpm-config
a19a3f
BuildRequires: libblockdev-devel        >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-part-devel   >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-loop-devel   >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-swap-devel   >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-fs-devel     >= %{libblockdev_version}
a19a3f
BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version}
a19a3f
a19a3f
Requires: libblockdev        >= %{libblockdev_version}
a19a3f
Requires: libblockdev-part   >= %{libblockdev_version}
a19a3f
Requires: libblockdev-loop   >= %{libblockdev_version}
a19a3f
Requires: libblockdev-swap   >= %{libblockdev_version}
a19a3f
Requires: libblockdev-mdraid >= %{libblockdev_version}
a19a3f
Requires: libblockdev-fs     >= %{libblockdev_version}
a19a3f
Requires: libblockdev-crypto >= %{libblockdev_version}
a19a3f
a19a3f
# Needed for the systemd-related macros used in this file
a19a3f
%{?systemd_requires}
a19a3f
BuildRequires: systemd
a19a3f
a19a3f
# Needed to pull in the system bus daemon
a19a3f
Requires: dbus >= %{dbus_version}
a19a3f
# Needed to pull in the udev daemon
a19a3f
Requires: udev >= %{systemd_version}
a19a3f
# We need at least this version for bugfixes/features etc.
a19a3f
Requires: libatasmart >= %{libatasmart_version}
a19a3f
# For mount, umount, mkswap
a19a3f
Requires: util-linux
a19a3f
# For mkfs.ext3, mkfs.ext3, e2label
a19a3f
Requires: e2fsprogs
a19a3f
# For mkfs.xfs, xfs_admin
a19a3f
Requires: xfsprogs
a19a3f
# For mkfs.vfat
a19a3f
Requires: dosfstools
a19a3f
Requires: gdisk
a19a3f
# For ejecting removable disks
a19a3f
Requires: eject
a19a3f
a19a3f
Requires: lib%{name}%{?_isa} = %{version}-%{release}
a19a3f
a19a3f
# For mkntfs (not available on rhel or on ppc/ppc64)
a19a3f
%if ! 0%{?rhel}
a19a3f
%ifnarch ppc ppc64
a19a3f
Requires: ntfsprogs
a19a3f
%endif
a19a3f
%endif
a19a3f
a19a3f
Obsoletes: storaged
a19a3f
a19a3f
%description
a19a3f
The Udisks project provides a daemon, tools and libraries to access and
a19a3f
manipulate disks, storage devices and technologies.
a19a3f
a19a3f
%package -n lib%{name}
a19a3f
Summary: Dynamic library to access the udisksd daemon
a19a3f
Group: System Environment/Libraries
a19a3f
License: LGPLv2+
a19a3f
Obsoletes: libstoraged
a19a3f
a19a3f
%description -n lib%{name}
a19a3f
This package contains the dynamic library, which provides
a19a3f
access to the udisksd daemon.
a19a3f
a19a3f
%package -n %{name}-iscsi
a19a3f
Summary: Module for iSCSI
a19a3f
Group: System Environment/Libraries
a19a3f
Requires: %{name}%{?_isa} = %{version}-%{release}
a19a3f
License: LGPLv2+
a19a3f
Requires: iscsi-initiator-utils
a19a3f
BuildRequires: iscsi-initiator-utils-devel
a19a3f
Obsoletes: storaged-iscsi
a19a3f
a19a3f
%description -n %{name}-iscsi
a19a3f
This package contains module for iSCSI configuration.
a19a3f
a19a3f
%package -n %{name}-lvm2
a19a3f
Summary: Module for LVM2
a19a3f
Group: System Environment/Libraries
a19a3f
Requires: %{name}%{?_isa} = %{version}-%{release}
a19a3f
License: LGPLv2+
a19a3f
Requires: lvm2
a19a3f
Requires: libblockdev-lvm >= %{libblockdev_version}
a19a3f
BuildRequires: lvm2-devel
a19a3f
BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version}
a19a3f
Obsoletes: storaged-lvm2
a19a3f
a19a3f
%description -n %{name}-lvm2
a19a3f
This package contains module for LVM2 configuration.
a19a3f
a19a3f
%package -n lib%{name}-devel
a19a3f
Summary: Development files for lib%{name}
a19a3f
Group: Development/Libraries
a19a3f
Requires: lib%{name}%{?_isa} = %{version}-%{release}
a19a3f
License: LGPLv2+
a19a3f
Obsoletes: libstoraged-devel
a19a3f
a19a3f
%description -n lib%{name}-devel
a19a3f
This package contains the development files for the library lib%{name}, a
a19a3f
dynamic library, which provides access to the udisksd daemon.
a19a3f
a19a3f
%prep
a19a3f
%setup -q -n udisks-%{version}
a19a3f
%patch0 -p1
a19a3f
%patch1 -p1
a19a3f
%patch2 -p1
a19a3f
%patch3 -p1
a19a3f
%patch4 -p1
a19a3f
a19a3f
%build
a19a3f
autoreconf -ivf
a19a3f
# we can't use _hardened_build here, see
a19a3f
# https://bugzilla.redhat.com/show_bug.cgi?id=892837
a19a3f
export CFLAGS='-fPIC %optflags'
a19a3f
export LDFLAGS='-pie -Wl,-z,now -Wl,-z,relro'
a19a3f
%configure            \
a19a3f
    --sysconfdir=/etc \
a19a3f
    --enable-iscsi    \
a19a3f
    --enable-lvm2     \
a19a3f
%if %{with_gtk_doc}
a19a3f
    --enable-gtk-doc
a19a3f
%else
a19a3f
    --disable-gtk-doc
a19a3f
%endif
a19a3f
make %{?_smp_mflags}
a19a3f
a19a3f
%install
a19a3f
make install DESTDIR=%{buildroot}
a19a3f
%if %{with_gtk_doc} == 0
a19a3f
rm -fr %{buildroot}/%{_datadir}/gtk-doc/html/udisks2
a19a3f
%endif
a19a3f
a19a3f
find %{buildroot} -name \*.la -o -name \*.a | xargs rm
a19a3f
a19a3f
chrpath --delete %{buildroot}/%{_sbindir}/umount.udisks2
a19a3f
chrpath --delete %{buildroot}/%{_bindir}/udisksctl
a19a3f
chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd
a19a3f
a19a3f
%find_lang udisks2
a19a3f
a19a3f
%post -n %{name}
a19a3f
%systemd_post udisks2.service
a19a3f
%systemd_post clean-mount-point@.service
a19a3f
udevadm control --reload
a19a3f
udevadm trigger
a19a3f
a19a3f
%preun -n %{name}
a19a3f
%systemd_preun udisks2.service
a19a3f
%systemd_preun clean-mount-point@.service
a19a3f
a19a3f
%postun -n %{name}
a19a3f
%systemd_postun_with_restart udisks2.service
a19a3f
%systemd_postun_with_restart clean-mount-point@.service
a19a3f
a19a3f
%post -n lib%{name} -p /sbin/ldconfig
a19a3f
a19a3f
%postun -n lib%{name} -p /sbin/ldconfig
a19a3f
a19a3f
%files -f udisks2.lang
a19a3f
%doc README.md AUTHORS NEWS HACKING
a19a3f
%license COPYING
a19a3f
a19a3f
%dir %{_sysconfdir}/udisks2
a19a3f
%{_sysconfdir}/udisks2/udisks2.conf
a19a3f
a19a3f
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.UDisks2.conf
a19a3f
%{_datadir}/bash-completion/completions/udisksctl
a19a3f
%{_unitdir}/udisks2.service
a19a3f
%{_unitdir}/clean-mount-point@.service
a19a3f
%{_udevrulesdir}/80-udisks2.rules
a19a3f
%{_sbindir}/umount.udisks2
a19a3f
a19a3f
a19a3f
%dir %{_libdir}/udisks2
a19a3f
%dir %{_libdir}/udisks2/modules
a19a3f
%dir %{_libexecdir}/udisks2
a19a3f
%{_libexecdir}/udisks2/udisksd
a19a3f
a19a3f
%{_bindir}/udisksctl
a19a3f
a19a3f
%{_mandir}/man1/udisksctl.1*
a19a3f
%{_mandir}/man5/udisks2.conf.5*
a19a3f
%{_mandir}/man8/udisksd.8*
a19a3f
%{_mandir}/man8/udisks.8*
a19a3f
%{_mandir}/man8/umount.udisks2.8*
a19a3f
a19a3f
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.policy
a19a3f
%{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service
a19a3f
a19a3f
# Permissions for local state data are 0700 to avoid leaking information
a19a3f
# about e.g. mounts to unprivileged users
a19a3f
%attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2
a19a3f
a19a3f
%files -n lib%{name}
a19a3f
%{_libdir}/libudisks2.so.*
a19a3f
%{_libdir}/girepository-1.0/UDisks-2.0.typelib
a19a3f
a19a3f
%files -n %{name}-lvm2
a19a3f
%{_libdir}/udisks2/modules/libudisks2_lvm2.so
a19a3f
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.lvm2.policy
a19a3f
a19a3f
%files -n %{name}-iscsi
a19a3f
%{_libdir}/udisks2/modules/libudisks2_iscsi.so
a19a3f
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.iscsi.policy
a19a3f
a19a3f
%files -n lib%{name}-devel
a19a3f
%{_libdir}/libudisks2.so
a19a3f
%dir %{_includedir}/udisks2
a19a3f
%dir %{_includedir}/udisks2/udisks
a19a3f
%{_includedir}/udisks2/udisks/*.h
a19a3f
%{_datadir}/gir-1.0/UDisks-2.0.gir
a19a3f
%if %{with_gtk_doc}
a19a3f
%dir %{_datadir}/gtk-doc/html/udisks2
a19a3f
%{_datadir}/gtk-doc/html/udisks2/*
a19a3f
%endif
a19a3f
%{_libdir}/pkgconfig/udisks2.pc
a19a3f
a19a3f
# Note: please don't forget the %{?dist} in the changelog. Thanks
a19a3f
%changelog
a19a3f
* Tue Feb 06 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.7.3-6
a19a3f
- Fix escaping mountpoint for the cleanup service
a19a3f
  Related: rhbz#1384796
a19a3f
a19a3f
* Mon Feb 05 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.7.3-5
a19a3f
- lvm2: Don't match prefixes in cmp_int_lv_name
a19a3f
  Resolves: rhbz#1534904
a19a3f
a19a3f
* Thu Nov 30 2017 Vratislav Podzimek <vpodzime@redhat.com> - 2.7.3-4
a19a3f
- Add 'no-discard' option to formatting methods (mvollmer)
a19a3f
  Resolves: rhbz#1516697
a19a3f
a19a3f
* Mon Oct 23 2017 Vratislav Podzimek <vpodzime@redhat.com> - 2.7.3-3
a19a3f
- Add and use a service for cleaning up mount point directories
a19a3f
  Resolves: rhbz#1384796
a19a3f
- Do not try to create file watchers for RAIDs without redundancy
a19a3f
  Resolves: rhbz#1400056
a19a3f
a19a3f
* Thu Oct 19 2017 Vratislav Podzimek <vpodzime@redhat.com> - 2.7.3-2
a19a3f
- Put back the hack to ensure hardening
a19a3f
  Related: rhbz#1477736
a19a3f
- Fix the relationship between new udisks2 and storaged
a19a3f
  Related: rhbz#1477736
a19a3f
a19a3f
* Thu Oct 12 2017 Vratislav Podzimek <vpodzime@redhat.com> - 2.7.3-1
a19a3f
- Rebase to upstream version 2.7.3
a19a3f
  Resolves: rhbz#1477736
a19a3f
a19a3f
* Wed May 13 2015 Tomas Smetana <tsmetana@redhat.com> - 2.1.2-6
a19a3f
- Rename the Intel SW RAID (#1175225)
a19a3f
- Resolves: rhbz#1175225
a19a3f
a19a3f
* Wed Feb 26 2014 Jan Safranek <jsafrane@redhat.com> - 2.1.2-5
a19a3f
- Fix CVE-2014-0004: stack-based buffer overflow when handling long path names
a19a3f
  (#1070144)
a19a3f
a19a3f
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.1.2-4
a19a3f
- Mass rebuild 2014-01-24
a19a3f
a19a3f
* Wed Jan 22 2014 Tomas Bzatek <tbzatek@redhat.com> - 2.1.2-3%{?dist}
a19a3f
- Fix upgrade path from old udisks
a19a3f
a19a3f
* Wed Jan 22 2014 Tomas Bzatek <tbzatek@redhat.com> - 2.1.2-2%{?dist}
a19a3f
- Fix crash when loop-deleting non-loop device (#1036076)
a19a3f
- Fix some thread safety issues (#1036099)
a19a3f
- Fix lingering mount after CD-ROM drive is ejected (#835120)
a19a3f
- Fix some uninitializes variables (#1056580)
a19a3f
a19a3f
* Thu Jan 16 2014 Tomas Bzatek <tbzatek@redhat.com> - 2.1.2-1%{?dist}
a19a3f
- Update to 2.1.2
a19a3f
a19a3f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.1.0-5
a19a3f
- Mass rebuild 2013-12-27
a19a3f
a19a3f
* Thu Jul 25 2013 Tomas Bzatek <tbzatek@redhat.com> - 2.1.0-4%{?dist}
a19a3f
- Add a man page for umount.udisks2 (#948926)
a19a3f
a19a3f
* Tue Jul 02 2013 Tomas Bzatek <tbzatek@redhat.com> - 2.1.0-3%{?dist}
a19a3f
- Sync with recent upstream changes
a19a3f
- Add Provides/Obsoletes udisks (#976796)
a19a3f
a19a3f
* Thu Mar 28 2013 Tomas Bzatek <tbzatek@redhat.com> - 2.1.0-2%{?dist}
a19a3f
- Fix firewire drives identification (#909010)
a19a3f
a19a3f
* Wed Mar 20 2013 Kalev Lember <kalevlember@gmail.com> - 2.1.0-1
a19a3f
- Update to 2.1.0
a19a3f
a19a3f
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.91-3
a19a3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a19a3f
a19a3f
* Tue Jan 22 2013 Matthias Clasen <mclasen@redhat.com> - 2.0.91-2%{?dist}
a19a3f
- Hardened build
a19a3f
a19a3f
* Mon Jan 07 2013 David Zeuthen <davidz@redhat.com> - 2.0.91-1%{?dist}
a19a3f
- Update to release 2.0.91
a19a3f
a19a3f
* Tue Dec 18 2012 David Zeuthen <davidz@redhat.com> - 2.0.90-1%{?dist}
a19a3f
- Update to release 2.0.90
a19a3f
a19a3f
* Fri Oct 02 2012 David Zeuthen <davidz@redhat.com> - 2.0.0-1%{?dist}
a19a3f
- Update to release 2.0.0
a19a3f
a19a3f
* Fri Jul 27 2012 David Zeuthen <davidz@redhat.com> - 1.99.0-1%{?dist}
a19a3f
- Update to release 1.99.0
a19a3f
a19a3f
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.98.0-2
a19a3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a19a3f
a19a3f
* Thu Jun 07 2012 David Zeuthen <davidz@redhat.com> - 1.98.0-1%{?dist}
a19a3f
- Update to release 1.98.0
a19a3f
a19a3f
* Mon Jun 04 2012 Kay Sievers <kay@redhat.com> - 1.97.0-4
a19a3f
- rebuild for libudev1
a19a3f
a19a3f
* Tue May 22 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.97.0-3
a19a3f
- Add upstream patch to fix issue with rootfs being on a bound mount
a19a3f
a19a3f
* Fri May 18 2012 Matthias Clasen <mclasen@redhat.com> - 1.97.0-2%{?dist}
a19a3f
- Add a Requires for eject (#810882)
a19a3f
a19a3f
* Wed May 09 2012 David Zeuthen <davidz@redhat.com> - 1.97.0-1%{?dist}
a19a3f
- Update to release 1.97.0
a19a3f
a19a3f
* Thu May 03 2012 David Zeuthen <davidz@redhat.com> - 1.96.0-2%{?dist}
a19a3f
- Include patch so Fedora Live media is shown
a19a3f
a19a3f
* Mon Apr 30 2012 David Zeuthen <davidz@redhat.com> - 1.96.0-1%{?dist}
a19a3f
- Update to release 1.96.0
a19a3f
a19a3f
* Mon Apr 30 2012 David Zeuthen <davidz@redhat.com> - 1.95.0-3%{?dist}
a19a3f
- BR: gnome-common
a19a3f
a19a3f
* Mon Apr 30 2012 David Zeuthen <davidz@redhat.com> - 1.95.0-2%{?dist}
a19a3f
- Make daemon actually link with libsystemd-login
a19a3f
a19a3f
* Mon Apr 30 2012 David Zeuthen <davidz@redhat.com> - 1.95.0-1%{?dist}
a19a3f
- Update to release 1.95.0
a19a3f
a19a3f
* Tue Apr 10 2012 David Zeuthen <davidz@redhat.com> - 1.94.0-1%{?dist}
a19a3f
- Update to release 1.94.0
a19a3f
a19a3f
* Tue Apr 03 2012 David Zeuthen <davidz@redhat.com> - 1.93.0-2%{?dist}
a19a3f
- Don't inadvertently unmount large block devices (fdo #48155)
a19a3f
a19a3f
* Mon Mar 05 2012 David Zeuthen <davidz@redhat.com> - 1.93.0-1%{?dist}
a19a3f
- Update to release 1.93.0
a19a3f
a19a3f
* Thu Feb 23 2012 David Zeuthen <davidz@redhat.com> - 1.92.0-2%{?dist}
a19a3f
- Fix build
a19a3f
a19a3f
* Thu Feb 23 2012 David Zeuthen <davidz@redhat.com> - 1.92.0-1%{?dist}
a19a3f
- Update to release 1.92.0
a19a3f
a19a3f
* Wed Feb 22 2012 David Zeuthen <davidz@redhat.com> - 1.91.0-2%{?dist}
a19a3f
- Avoid using $XDG_RUNTIME_DIR/media for now
a19a3f
a19a3f
* Mon Feb 06 2012 David Zeuthen <davidz@redhat.com> - 1.91.0-1%{?dist}
a19a3f
- Update to release 1.91.0
a19a3f
a19a3f
* Fri Jan 21 2012 David Zeuthen <davidz@redhat.com> - 1.90.0-3%{?dist}
a19a3f
- Manually set PATH, if not set
a19a3f
a19a3f
* Fri Jan 20 2012 David Zeuthen <davidz@redhat.com> - 1.90.0-2%{?dist}
a19a3f
- Rebuild
a19a3f
a19a3f
* Fri Jan 20 2012 David Zeuthen <davidz@redhat.com> - 1.90.0-1%{?dist}
a19a3f
- Update to release 1.90.0
a19a3f
a19a3f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.90.0-0.git20111128.1
a19a3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a19a3f
a19a3f
* Mon Nov 28 2011 David Zeuthen <davidz@redhat.com> - 1.90.0-0.git20111128%{?dist}
a19a3f
- Updated for review comments (#756046)
a19a3f
a19a3f
* Mon Nov 22 2011 David Zeuthen <davidz@redhat.com> - 1.90.0-0.git20111122%{?dist}
a19a3f
- Initial packaging of udisks2