neil / rpms / udisks2

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