Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 190602ffb5f9fd4ae58f84b82cefb469 > files > 4

udisks2-2.8.2-1.1.mga7.src.rpm

%define major 0
%define libname %mklibname %{name}_ %{major}
%define girname %mklibname udisks-gir 2.0
%define develname %mklibname %name -d

%global libblockdev_version 2.19
%define with_bcache                     1
%define with_vdo                        1
%define with_lsm                        1
%define with_zram                       1

# bcache is not available on RHEL or Mageia
%if 0%{?rhel} || 0%{?mageia} || %{with_bcache} == 0
%define with_bcache 0
%endif

# vdo is not available on Fedora or Mageia
%if 0%{?fedora} || 0%{?mageia} || %{with_vdo} == 0
%define with_vdo 0
%endif

# vdo is not available on i686
%ifarch %{ix86}
%define with_vdo 0
%endif

# libstoragemgmt isn't in Mageia yet...
%if 0%{?mageia} || %{with_lsm} == 0
%define with_lsm 0
%endif

Summary: Disk Manager
Name: udisks2
Version: 2.8.2
%define  subrel 1
Release: %mkrel 1
License: GPLv2+
Group: System/Libraries
URL: https://github.com/storaged-project/udisks
Source0: %{url}/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
# From Debian:
# https://anonscm.debian.org/cgit/pkg-utopia/udisks2.git/tree/debian/local/udisks2-inhibit
Source1: udisks2-inhibit
# mga#26396
Patch0:  udisks-2.8.2-exfat-drop-namecase-option.patch

BuildRequires: pkgconfig(gio-unix-2.0) >= 2.31.13
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.31.13
BuildRequires: pkgconfig(gudev-1.0) >= 165
BuildRequires: pkgconfig(libatasmart) >= 0.17
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.92
BuildRequires: pkgconfig(polkit-agent-1) >= 0.92
BuildRequires: pkgconfig(mount)
# libblockdev builddeps
BuildRequires: pkgconfig(blockdev)      >= %{libblockdev_version}
BuildRequires: libblockdev-devel        >= %{libblockdev_version}
BuildRequires: libblockdev-part-devel   >= %{libblockdev_version}
BuildRequires: libblockdev-loop-devel   >= %{libblockdev_version}
BuildRequires: libblockdev-swap-devel   >= %{libblockdev_version}
BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version}
BuildRequires: libblockdev-fs-devel     >= %{libblockdev_version}
BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version}

BuildRequires: intltool
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc >= 1.3
# needed to pull in the system bus daemon
Requires: dbus >= 1.4.0
# needed to pull in the udev daemon
Requires: udev >= 173
# for mount, umount, mkswap
Requires: util-linux
# for mkfs.ext3, mkfs.ext3, e2label
Requires: e2fsprogs
# for mkfs.xfs, xfs_admin
Requires: xfsprogs
# for mkfs.vfat
Requires: dosfstools
Requires: ntfsprogs
# for partitioning
Requires: parted
Requires: gdisk
# for LUKS devices
Requires: cryptsetup-luks
# for libblockdev + "plugins"
Requires: %{mklibname blockdev 2}  >= %{libblockdev_version}
Requires: %{mklibname bd_part 2}   >= %{libblockdev_version}
Requires: %{mklibname bd_loop 2}   >= %{libblockdev_version}
Requires: %{mklibname bd_swap 2}   >= %{libblockdev_version}
Requires: %{mklibname bd_mdraid 2} >= %{libblockdev_version}
Requires: %{mklibname bd_fs 2}     >= %{libblockdev_version}
Requires: %{mklibname bd_crypto 2} >= %{libblockdev_version}

%{?systemd_requires}

# for /proc/self/mountinfo, only available in 2.6.26 or higher
Conflicts: kernel < 2.6.26

%description
udisks provides a daemon, D-Bus API and command line tools for
managing disks and storage devices. This package is for the udisks 2.x
series.

%package -n %{libname}
Summary: Dynamic library to access the udisks daemon
Group: System/Libraries
Obsoletes: %{_lib}udisks20 < 1.90.0-2
License: LGPLv2+

%description -n %{libname}
This package contains the dynamic library libudisks2, which provides
access to the udisks daemon. This package is for the udisks 2.x
series.

%package -n %{girname}
Summary: GObject Introspection interface description for %name
Group: System/Libraries
License: LGPLv2+
Requires: %{libname} = %{version}

%description -n %{girname}
GObject Introspection interface description for %{name}.

%package -n %{develname}
Summary: Development files for libudev
Group: Development/C
License: LGPLv2+
Requires: %{libname} = %{version}-%{release}
Requires: %{girname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}

%description -n %{develname}
This package contains the development files for the library
libudisks2, a dynamic library, which provides access to the udisks
daemon. This package is for the udisks 2.x series.

%package -n %{name}-iscsi
Summary: Module for iSCSI
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: open-iscsi
BuildRequires: open-iscsi-devel

%description -n %{name}-iscsi
This package contains module for iSCSI configuration.

%package -n %{name}-lvm2
Summary: Module for LVM2
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: lvm2
Requires: %{mklibname bd_lvm 2} >= %{libblockdev_version}
BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version}

%description -n %{name}-lvm2
This package contains module for LVM2 configuration.

%package -n %{name}-btrfs
Summary: Module for BTRFS
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: %{mklibname bd_btrfs 2} >= %{libblockdev_version}
BuildRequires: libblockdev-btrfs-devel >= %{libblockdev_version}

%description -n %{name}-btrfs
This package contains module for BTRFS configuration.

%package -n %{name}-zram
Summary: Module for ZRAM
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: %{mklibname bd_kbd 2} >= %{libblockdev_version}
Requires: %{mklibname bd_swap 2} >= %{libblockdev_version}
BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version}
BuildRequires: libblockdev-swap-devel

%description -n %{name}-zram
This package contains module for ZRAM configuration.

%if 0%{?with_bcache}
%package -n %{name}-bcache
Summary: Module for Bcache
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: %{mklibname bd_kbd 2} >= %{libblockdev_version}
BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version}

%description -n %{name}-bcache
This package contains module for Bcache configuration.
%endif

%if 0%{?with_lsm}
%package -n %{name}-lsm
Summary: Module for LSM
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: libstoragemgmt
BuildRequires: libstoragemgmt-devel
BuildRequires: libconfig-devel

%description -n %{name}-lsm
This package contains module for LSM configuration.
%endif

%if 0%{?with_vdo}
%package -n %{name}-vdo
Summary: Module for VDO
Group: System/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
License: LGPLv2+
Requires: vdo
Requires: %{mklibname bd_vdo 2} >= %{libblockdev_version}
BuildRequires: libblockdev-vdo-devel >= %{libblockdev_version}

%description -n %{name}-vdo
This package contains module for VDO management.
%endif

%prep
%autosetup -n udisks-%{version} -p1
# Set LUKS2 as the default for disk encryption
sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=luks2/"

%build
%configure2_5x \
        --enable-gtk-doc \
        --disable-static \
        --with-systemdsystemunitdir=%{_unitdir} \
%if 0%{?with_bcache}
        --enable-bcache   \
%endif
%if 0%{?with_vdo}
        --enable-vdo      \
%endif
%if 0%{?with_lsm}
        --enable-lsm      \
%endif
        --enable-lvm2     \
        --enable-lvmcache \
        --enable-btrfs    \
        --enable-zram     \
        --enable-iscsi

%make_build

%install
mkdir -p %buildroot%{_localstatedir}/lib/%{name}
%make_install

mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d

#install udisks2-inhibit
install -pm 0755 %{_sourcedir}/udisks2-inhibit \
	%{buildroot}%{_libexecdir}/udisks2/udisks2-inhibit

# symlink to old location until things are fixed...
mkdir -p %{buildroot}%{_prefix}/lib/udisks2
ln -sr %{buildroot}%{_libexecdir}/udisks2/udisks2-inhibit \
       %{buildroot}%{_prefix}/lib/udisks2/udisks2-inhibit

#we don't want these
find %{buildroot} -name '*.la' -delete

%find_lang %name


%post -n %{name}
%systemd_post udisks2.service
%systemd_post clean-mount-point@.service

%preun -n %{name}
%systemd_preun udisks2.service
%systemd_preun clean-mount-point@.service

%postun -n %{name}
%systemd_postun_with_restart udisks2.service

%post -n %{name}-zram
%systemd_post zram-setup@.service

%preun -n %{name}-zram
%systemd_preun zram-setup@.service


%files -f %name.lang
%doc README.md AUTHORS NEWS HACKING
%license COPYING

%dir %{_sysconfdir}/udisks2
%dir %{_sysconfdir}/udisks2/modules.conf.d
%{_sysconfdir}/udisks2/udisks2.conf

%{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf
%{_datadir}/bash-completion/completions/udisksctl
%dir %{_prefix}/lib/udisks2/
%{_prefix}/lib/udisks2/udisks2-inhibit
%{_sbindir}/umount.udisks2

%dir %{_libexecdir}/udisks2
%{_libexecdir}/udisks2/udisksd
%{_libexecdir}/udisks2/udisks2-inhibit

%{_bindir}/udisksctl

%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*

%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.policy
%{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service

%{_unitdir}/udisks2.service
%{_unitdir}/clean-mount-point@.service
%{_udevrulesdir}/80-udisks2.rules

# Permissions for local state data are 0700 to avoid leaking information
# about e.g. mounts to unprivileged users
%attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2

%files -n %libname
%license COPYING
%{_libdir}/libudisks2.so.%{major}*

%files -n %girname
%{_libdir}/girepository-1.0/UDisks-2.0.typelib

%files -n %develname
%{_libdir}/libudisks2.so
%dir %{_includedir}/udisks2
%dir %{_includedir}/udisks2/udisks
%{_includedir}/udisks2/udisks/*.h
%{_datadir}/gir-1.0/UDisks-2.0.gir
%dir %{_datadir}/gtk-doc/html/udisks2
%{_datadir}/gtk-doc/html/udisks2/*
%{_libdir}/pkgconfig/udisks2.pc

%files -n %{name}-lvm2
%{_libdir}/udisks2/modules/libudisks2_lvm2.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.lvm2.policy

%files -n %{name}-iscsi
%{_libdir}/udisks2/modules/libudisks2_iscsi.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.iscsi.policy

%files -n %{name}-btrfs
%{_libdir}/udisks2/modules/libudisks2_btrfs.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.btrfs.policy

%files -n %{name}-zram
%{_libdir}/udisks2/modules/libudisks2_zram.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy
%{_unitdir}/zram-setup@.service

%if 0%{?with_bcache}
%files -n %{name}-bcache
%{_libdir}/udisks2/modules/libudisks2_bcache.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy
%endif

%if 0%{?with_lsm}
%files -n %{name}-lsm
%{_libdir}/udisks2/modules/libudisks2_lsm.so
%{_mandir}/man5/udisks2_lsm.conf.*
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.lsm.policy
%attr(0600,root,root) %{_sysconfdir}/udisks2/modules.conf.d/udisks2_lsm.conf
%endif

%if 0%{?with_vdo}
%files -n %{name}-vdo
%{_libdir}/udisks2/modules/libudisks2_vdo.so
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.vdo.policy
%endif



%changelog
* Sat Apr 04 2020 tmb <tmb> 2.8.2-1.1.mga7
+ Revision: 1564371
- exfat: dont use non-existing namecase option (mga#26396)

* Wed Apr 10 2019 ngompa <ngompa> 2.8.2-1.mga7
+ Revision: 1387915
- New version 2.8.2
- Revamp spec file to build and package new storaged/udisks2 properly
+ zezinho <zezinho>
- new version 2.8.1

* Sun Sep 23 2018 umeabot <umeabot> 2.1.8-3.mga7
+ Revision: 1301494
- Mageia 7 Mass Rebuild

* Mon Feb 06 2017 wally <wally> 2.1.8-2.mga6
+ Revision: 1085032
- add udisks2-inhibit script from Debian (mga#20247)

* Sun Jan 01 2017 luigiwalser <luigiwalser> 2.1.8-1.mga6
+ Revision: 1078995
- 2.1.8

* Tue Jun 07 2016 tv <tv> 2.1.7-2.mga6
+ Revision: 1020637
- adjust BRs for latest systemd

* Mon May 09 2016 luigiwalser <luigiwalser> 2.1.7-1.mga6
+ Revision: 1011596
- 2.1.7

* Fri Feb 12 2016 umeabot <umeabot> 2.1.6-2.mga6
+ Revision: 959087
- Mageia 6 Mass Rebuild

* Sun Sep 06 2015 fwang <fwang> 2.1.6-1.mga6
+ Revision: 873370
- drop unused patch
- fix correct dir
- 2.1.6

* Mon Jun 29 2015 wally <wally> 2.1.5-2.mga6
+ Revision: 847865
- add requires for gir pkg to devel pkg

* Sun Jun 21 2015 ovitters <ovitters> 2.1.5-1.mga6
+ Revision: 837816
- new version 2.1.5
- dropped merged patch 2

* Tue Jan 27 2015 luigiwalser <luigiwalser> 2.1.4-2.mga5
+ Revision: 812475
- add upstream patch to fix fdo#77134

* Fri Dec 19 2014 luigiwalser <luigiwalser> 2.1.4-1.mga5
+ Revision: 804313
- 2.1.4
- rediff linking patch

* Wed Oct 15 2014 umeabot <umeabot> 2.1.3-5.mga5
+ Revision: 746829
- Second Mageia 5 Mass Rebuild

* Fri Sep 26 2014 wally <wally> 2.1.3-4.mga5
+ Revision: 724968
- rebuild with new rpm-mageia-setup to generate requires for .typelib files

* Tue Sep 16 2014 umeabot <umeabot> 2.1.3-3.mga5
+ Revision: 690017
- Mageia 5 Mass Rebuild

* Thu Sep 04 2014 colin <colin> 2.1.3-2.mga5
+ Revision: 671855
- Rebuild for new systemd

* Mon Mar 10 2014 luigiwalser <luigiwalser> 2.1.3-1.mga5
+ Revision: 601767
- 2.1.3 (fixes CVE-2014-0004)

* Fri Jan 17 2014 luigiwalser <luigiwalser> 2.1.2-1.mga5
+ Revision: 566767
- 2.1.2

* Sat Oct 19 2013 umeabot <umeabot> 2.1.1-2.mga4
+ Revision: 532575
- Mageia 4 Mass Rebuild

* Wed Aug 21 2013 fwang <fwang> 2.1.1-1.mga4
+ Revision: 468701
- new version 2.1.1

* Sat May 25 2013 ovitters <ovitters> 2.1.0-1.mga4
+ Revision: 427397
- new version 2.1.0

* Mon Jan 14 2013 umeabot <umeabot> 2.0.1-2.mga3
+ Revision: 384964
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Thu Jan 03 2013 luigiwalser <luigiwalser> 2.0.1-1.mga3
+ Revision: 338315
- 2.0.1

* Sun Oct 14 2012 tv <tv> 2.0.0-1.mga3
+ Revision: 305288
- further adjust file list
- adjus file list
- new release

* Sat Jul 28 2012 fwang <fwang> 1.99.0-1.mga3
+ Revision: 275127
- update file list
- update file list
- new version 1.99.0

* Mon Jun 11 2012 fwang <fwang> 1.98.0-2.mga3
+ Revision: 259712
- use systemd login

* Mon Jun 11 2012 fwang <fwang> 1.98.0-1.mga3
+ Revision: 259707
- use correct dirname
- fix install
- new verison 1.98.0

* Tue May 29 2012 fwang <fwang> 1.97.0-1.mga3
+ Revision: 248924
- new version 1.97.0

* Sat Apr 28 2012 tmb <tmb> 1.93.0-2.mga2
+ Revision: 233889
- Require rpm-helper >= 0.24.8-1 for systemd support

* Mon Mar 19 2012 colin <colin> 1.93.0-1.mga2
+ Revision: 224510
- New version: 1.93.0 (SSD + misc small fixes)

* Sun Feb 26 2012 colin <colin> 1.92.0-2.mga2
+ Revision: 215403
- Include systemd unit (mga#4704)

* Sat Feb 25 2012 fwang <fwang> 1.92.0-1.mga2
+ Revision: 214313
- update file list
- update file list
- br gettext
- use gnome-autogen
- br gnoem-common
- fix linkage
- add upstream  patch to fix program calling path, hope it could fix bug#4382

* Sun Jan 22 2012 fwang <fwang> 1.90.0-2.mga2
+ Revision: 199518
- fix typo
- correct libname

* Sun Jan 22 2012 fwang <fwang> 1.90.0-1.mga2
+ Revision: 199506
- fix typo
- imported package udisks2