diff --git a/.gitignore b/.gitignore index 9b451cd..042b391 100644 --- a/.gitignore +++ b/.gitignore @@ -12,15 +12,3 @@ /udisks-2.8.1.tar.bz2 /udisks-2.8.2.tar.bz2 /udisks-2.8.4.tar.bz2 -/udisks-2.9.0.tar.bz2 -/udisks-2.9.1.tar.bz2 -/udisks-2.9.2.tar.bz2 -/udisks-2.9.3.tar.bz2 -/udisks-2.9.4.tar.bz2 -/udisks-2.10.0.tar.bz2 -/udisks-2.10.1.tar.bz2 -/udisks-2.10.90.tar.bz2 -/udisks-2.10.91.tar.bz2 -/udisks-2.11.0.tar.bz2 -/udisks-2.11.1.tar.bz2 -/udisks-2.11.2.tar.bz2 diff --git a/sources b/sources index e41b09d..f76a3b6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.11.2.tar.bz2) = 3996ac935cb330eb7f286f25a716da52ca374b14cc7b4f2e60a7e4b0b0745559607fa8c6d1e96e777b44eb8e07eb16e1ad6bc00b3051adea14e865df3efa2662 +SHA512 (udisks-2.8.4.tar.bz2) = 70860e5ca9ac73d442ca67f0e0429ce2f33575d8f64945fbf06d1694b080c8b6fed8d65b2485eff0ab66eab59cdebeb9309424820a2ee82c5faaa38029e15e6c diff --git a/udisks2.spec b/udisks2.spec index 0d1136b..67ce1e1 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -1,43 +1,76 @@ -%global glib2_version 2.68 +%global glib2_version 2.36 %global gobject_introspection_version 1.30.0 %global polkit_version 0.102 %global systemd_version 208 +%global libatasmart_version 0.17 %global dbus_version 1.4.0 %global with_gtk_doc 1 -%global libblockdev_version 3.4 +%global libblockdev_version 2.19 +%define with_bcache 1 %define with_btrfs 1 -%ifnarch %{ix86} +%define with_vdo 1 %define with_lsm 1 -%endif +%define with_zram 1 +%define with_lvmcache 1 + +# valid options are 'luks1' or 'luks2' +%define default_luks_encryption luks1 %define is_fedora 0%{?rhel} == 0 %define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0) %define git_hash %(git log -1 --pretty=format:"%h" || true) %define build_date %(date '+%Y%m%d') -# btrfs is not available on RHEL -%if 0%{?rhel} + +# bcache is not available on RHEL +%if (0%{?rhel}) || %{with_bcache} == 0 +%define with_bcache 0 +%endif + +# btrfs is not available on RHEL > 7 +%if 0%{?rhel} > 7 || %{with_btrfs} == 0 %define with_btrfs 0 %endif +# vdo is not available on Fedora +%if (0%{?fedora}) || %{with_vdo} == 0 +%define with_vdo 0 +%endif + +# vdo is not available on i686 +%ifnarch x86_64 aarch64 ppc64le s390x +%define with_vdo 0 +%endif + +# feature parity with existing RHEL 7 packages +%if (0%{?rhel}) && (0%{?rhel} <= 7) +%define with_lsm 0 +%define with_zram 0 +%define with_lvmcache 0 +%endif + +# default to LUKS2 for RHEL > 7 +%if 0%{?rhel} > 7 +%define default_luks_encryption luks2 +%endif + Name: udisks2 Summary: Disk Manager -Version: 2.11.2 -Release: 1%{?dist} -License: GPL-2.0-or-later +Version: 2.8.4 +Release: 4%{?dist} +License: GPLv2+ URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 -BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} BuildRequires: libgudev1-devel >= %{systemd_version} +BuildRequires: libatasmart-devel >= %{libatasmart_version} BuildRequires: polkit-devel >= %{polkit_version} BuildRequires: systemd >= %{systemd_version} BuildRequires: systemd-devel >= %{systemd_version} -BuildRequires: systemd-rpm-macros BuildRequires: libacl-devel BuildRequires: chrpath BuildRequires: gtk-doc @@ -50,10 +83,7 @@ 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: libblockdev-nvme-devel >= %{libblockdev_version} -BuildRequires: libblockdev-smart-devel >= %{libblockdev_version} BuildRequires: libmount-devel -BuildRequires: libuuid-devel Requires: libblockdev >= %{libblockdev_version} Requires: libblockdev-part >= %{libblockdev_version} @@ -62,55 +92,45 @@ Requires: libblockdev-swap >= %{libblockdev_version} Requires: libblockdev-mdraid >= %{libblockdev_version} Requires: libblockdev-fs >= %{libblockdev_version} Requires: libblockdev-crypto >= %{libblockdev_version} -Requires: libblockdev-nvme >= %{libblockdev_version} -Requires: libblockdev-smart >= %{libblockdev_version} -Requires: lib%{name}%{?_isa} = %{version}-%{release} +# Needed for the systemd-related macros used in this file +%{?systemd_requires} +BuildRequires: systemd # Needed to pull in the system bus daemon Requires: dbus >= %{dbus_version} # Needed to pull in the udev daemon Requires: udev >= %{systemd_version} +# We need at least this version for bugfixes/features etc. +Requires: libatasmart >= %{libatasmart_version} # For mount, umount, mkswap Requires: util-linux # For mkfs.ext3, mkfs.ext3, e2label -Recommends: e2fsprogs +Requires: e2fsprogs # For mkfs.xfs, xfs_admin -Recommends: xfsprogs +Requires: xfsprogs # For mkfs.vfat -Recommends: dosfstools -# For exfat -Recommends: exfatprogs -# For UDF -Recommends: udftools +Requires: dosfstools +Requires: gdisk # For ejecting removable disks -Recommends: eject +Requires: eject # For utab monitor Requires: libmount -# The actual polkit agent -Requires: polkit >= %{polkit_version} -# For mkntfs (not available on rhel or on ppc/ppc64) and f2fs -%if %{is_fedora} -Recommends: f2fs-tools -Recommends: nilfs-utils +Requires: lib%{name}%{?_isa} = %{version}-%{release} + +# For mkntfs (not available on rhel or on ppc/ppc64) +%if ! 0%{?rhel} %ifnarch ppc ppc64 -Recommends: ntfsprogs +Requires: ntfsprogs %endif %endif -Recommends: ntfs-3g - -# btrfs -%if 0%{?with_btrfs} -Recommends: btrfs-progs -%endif - # For /proc/self/mountinfo, only available in 2.6.26 or higher Conflicts: kernel < 2.6.26 Provides: storaged = %{version}-%{release} -Obsoletes: storaged < %{version}-%{release} +Obsoletes: storaged %description The Udisks project provides a daemon, tools and libraries to access and @@ -118,9 +138,9 @@ manipulate disks, storage devices and technologies. %package -n lib%{name} Summary: Dynamic library to access the udisksd daemon -License: LGPL-2.0-or-later +License: LGPLv2+ Provides: libstoraged = %{version}-%{release} -Obsoletes: libstoraged < %{version}-%{release} +Obsoletes: libstoraged %description -n lib%{name} This package contains the dynamic library, which provides @@ -129,11 +149,11 @@ access to the udisksd daemon. %package -n %{name}-iscsi Summary: Module for iSCSI Requires: %{name}%{?_isa} = %{version}-%{release} -License: LGPL-2.0-or-later +License: LGPLv2+ Requires: iscsi-initiator-utils BuildRequires: iscsi-initiator-utils-devel Provides: storaged-iscsi = %{version}-%{release} -Obsoletes: storaged-iscsi < %{version}-%{release} +Obsoletes: storaged-iscsi %description -n %{name}-iscsi This package contains module for iSCSI configuration. @@ -141,12 +161,13 @@ This package contains module for iSCSI configuration. %package -n %{name}-lvm2 Summary: Module for LVM2 Requires: %{name}%{?_isa} = %{version}-%{release} -License: LGPL-2.0-or-later +License: LGPLv2+ Requires: lvm2 Requires: libblockdev-lvm >= %{libblockdev_version} +BuildRequires: lvm2-devel BuildRequires: libblockdev-lvm-devel >= %{libblockdev_version} Provides: storaged-lvm2 = %{version}-%{release} -Obsoletes: storaged-lvm2 < %{version}-%{release} +Obsoletes: storaged-lvm2 %description -n %{name}-lvm2 This package contains module for LVM2 configuration. @@ -154,23 +175,37 @@ This package contains module for LVM2 configuration. %package -n lib%{name}-devel Summary: Development files for lib%{name} Requires: lib%{name}%{?_isa} = %{version}-%{release} -License: LGPL-2.0-or-later +License: LGPLv2+ Provides: libstoraged-devel = %{version}-%{release} -Obsoletes: libstoraged-devel < %{version}-%{release} +Obsoletes: libstoraged-devel %description -n lib%{name}-devel -This package contains the development files for the library lib%{name}, -a dynamic library, which provides access to the udisksd daemon. +This package contains the development files for the library lib%{name}, a +dynamic library, which provides access to the udisksd daemon. + +%if 0%{?with_bcache} +%package -n %{name}-bcache +Summary: Module for Bcache +Requires: %{name}%{?_isa} = %{version}-%{release} +License: LGPLv2+ +Requires: libblockdev-kbd >= %{libblockdev_version} +BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version} +Provides: storaged-bcache = %{version}-%{release} +Obsoletes: storaged-bcache + +%description -n %{name}-bcache +This package contains module for Bcache configuration. +%endif %if 0%{?with_btrfs} %package -n %{name}-btrfs Summary: Module for BTRFS Requires: %{name}%{?_isa} = %{version}-%{release} -License: LGPL-2.0-or-later +License: LGPLv2+ Requires: libblockdev-btrfs >= %{libblockdev_version} BuildRequires: libblockdev-btrfs-devel >= %{libblockdev_version} Provides: storaged-btrfs = %{version}-%{release} -Obsoletes: storaged-btrfs < %{version}-%{release} +Obsoletes: storaged-btrfs %description -n %{name}-btrfs This package contains module for BTRFS configuration. @@ -180,27 +215,52 @@ This package contains module for BTRFS configuration. %package -n %{name}-lsm Summary: Module for LSM Requires: %{name}%{?_isa} = %{version}-%{release} -License: LGPL-2.0-or-later +License: LGPLv2+ Requires: libstoragemgmt BuildRequires: libstoragemgmt-devel BuildRequires: libconfig-devel Provides: storaged-lsm = %{version}-%{release} -Obsoletes: storaged-lsm < %{version}-%{release} +Obsoletes: storaged-lsm %description -n %{name}-lsm This package contains module for LSM configuration. %endif +%if 0%{?with_zram} +%package -n %{name}-zram +Summary: Module for ZRAM +Requires: %{name}%{?_isa} = %{version}-%{release} +License: LGPLv2+ +Requires: libblockdev-kbd >= %{libblockdev_version} +Requires: libblockdev-swap >= %{libblockdev_version} +BuildRequires: libblockdev-kbd-devel >= %{libblockdev_version} +BuildRequires: libblockdev-swap-devel +Provides: storaged-zram = %{version}-%{release} +Obsoletes: storaged-zram + +%description -n %{name}-zram +This package contains module for ZRAM configuration. +%endif + +%if 0%{?with_vdo} +%package -n %{name}-vdo +Summary: Module for VDO +Requires: %{name}%{?_isa} = %{version}-%{release} +License: LGPLv2+ +Requires: vdo +Requires: libblockdev-vdo >= %{libblockdev_version} +BuildRequires: libblockdev-vdo-devel >= %{libblockdev_version} + +%description -n %{name}-vdo +This package contains module for VDO management. +%endif + %prep -%autosetup -p1 -n udisks-%{version} -rm -f src/tests/dbus-tests/config_h.py -rm -f src/udisks-daemon-resources.{c,h} -# default to ntfs-3g (#2182206) -sed -i data/builtin_mount_options.conf -e 's/ntfs_drivers=ntfs3,ntfs/ntfs_drivers=ntfs,ntfs3/' -sed -i data/builtin_mount_options.conf -e 's/exfat_defaults=uid=\$UID,gid=\$GID,iocharset=utf8,errors=remount-ro/exfat_defaults=uid=\$UID,gid=\$GID,iocharset=utf8,errors=remount-ro,sys_tz/' +%setup -q -n udisks-%{version} +sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" %build -# autoreconf -ivf +autoreconf -ivf # modules need to be explicitly enabled %configure \ %if %{with_gtk_doc} @@ -208,12 +268,23 @@ sed -i data/builtin_mount_options.conf -e 's/exfat_defaults=uid=\$UID,gid=\$GID, %else --disable-gtk-doc \ %endif - --enable-smart \ +%if 0%{?with_bcache} + --enable-bcache \ +%endif %if 0%{?with_btrfs} --enable-btrfs \ %endif +%if 0%{?with_vdo} + --enable-vdo \ +%endif +%if 0%{?with_zram} + --enable-zram \ +%endif %if 0%{?with_lsm} --enable-lsm \ +%endif +%if 0%{?with_lvmcache} + --enable-lvmcache \ %endif --enable-lvm2 \ --enable-iscsi @@ -225,9 +296,6 @@ make install DESTDIR=%{buildroot} rm -fr %{buildroot}/%{_datadir}/gtk-doc/html/udisks2 %endif -# not created if lsm is disabled -mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d - find %{buildroot} -name \*.la -o -name \*.a | xargs rm chrpath --delete %{buildroot}/%{_sbindir}/umount.udisks2 @@ -238,6 +306,7 @@ chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd %post -n %{name} %systemd_post udisks2.service +%systemd_post clean-mount-point@.service # skip retriggering if udevd isn't even accessible, e.g. containers or # rpm-ostree-based systems if [ -S /run/udev/control ]; then @@ -247,12 +316,25 @@ fi %preun -n %{name} %systemd_preun udisks2.service +%systemd_preun clean-mount-point@.service %postun -n %{name} %systemd_postun_with_restart udisks2.service +%systemd_postun clean-mount-point@.service %ldconfig_scriptlets -n lib%{name} +%if 0%{?with_zram} +%post -n %{name}-zram +%systemd_post zram-setup@.service + +%preun -n %{name}-zram +%systemd_preun zram-setup@.service + +%postun -n %{name}-zram +%systemd_postun zram-setup@.service +%endif + %files -f udisks2.lang %doc README.md AUTHORS NEWS HACKING %license COPYING @@ -262,13 +344,12 @@ fi %dir %{_sysconfdir}/udisks2/modules.conf.d %endif %{_sysconfdir}/udisks2/udisks2.conf -%{_sysconfdir}/udisks2/mount_options.conf.example %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf %{_datadir}/bash-completion/completions/udisksctl -%{_datadir}/zsh/site-functions/_udisks2 %{_tmpfilesdir}/%{name}.conf %{_unitdir}/udisks2.service +%{_unitdir}/clean-mount-point@.service %{_udevrulesdir}/80-udisks2.rules %{_sbindir}/umount.udisks2 @@ -316,13 +397,11 @@ fi %{_datadir}/gtk-doc/html/udisks2/* %endif %{_libdir}/pkgconfig/udisks2.pc -%{_libdir}/pkgconfig/udisks2-lvm2.pc -%{_libdir}/pkgconfig/udisks2-iscsi.pc -%if 0%{?with_btrfs} -%{_libdir}/pkgconfig/udisks2-btrfs.pc -%endif -%if 0%{?with_lsm} -%{_libdir}/pkgconfig/udisks2-lsm.pc + +%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_btrfs} @@ -340,133 +419,21 @@ fi %attr(0600,root,root) %{_sysconfdir}/udisks2/modules.conf.d/udisks2_lsm.conf %endif +%if 0%{?with_zram} +%files -n %{name}-zram +%dir %{_sysconfdir}/udisks2/modules.conf.d +%{_libdir}/udisks2/modules/libudisks2_zram.so +%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy +%{_unitdir}/zram-setup@.service +%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 -* Thu Aug 06 2026 Tomas Bzatek - 2.11.2-1 -- Version 2.11.2 - -* Fri Jul 17 2026 Fedora Release Engineering - 2.11.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Wed Apr 01 2026 Tomas Bzatek - 2.11.1-2 -- Use 'sys_tz' exfat mount option by default (#2403452) - -* Wed Feb 25 2026 Tomas Bzatek - 2.11.1-1 -- Version 2.11.1 (#2442584,#2442588) - -* Sat Jan 17 2026 Fedora Release Engineering - 2.11.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Wed Dec 17 2025 Tom Callaway - 2.11.0-2 -- rebuild for new libconfig - -* Thu Nov 06 2025 Tomas Bzatek - 2.11.0-1 -- Version 2.11.0 - -* Fri Aug 29 2025 Tomas Bzatek - 2.10.91-1 -- Version 2.10.91 - -* Fri Jul 25 2025 Fedora Release Engineering - 2.10.90-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jun 19 2025 Tomas Bzatek - 2.10.90-3 -- Harden temporary private mounts (#2373301) - -* Sun Jan 19 2025 Fedora Release Engineering - 2.10.90-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Oct 02 2024 Tomas Bzatek - 2.10.90-1 -- Version 2.10.90 - -* Sat Jul 20 2024 Fedora Release Engineering - 2.10.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Mar 01 2024 Tomas Bzatek - 2.10.1-5 -- udiskslinuxblock: Survive a missing /etc/fstab (#2264922) - -* Mon Feb 12 2024 Tomas Bzatek - 2.10.1-4 -- Use SPDX license tags for subpackages - -* Mon Feb 12 2024 Tomas Bzatek - 2.10.1-3 -- Use a SPDX license tag -- udiskslinuxblockobject: Try issuing BLKRRPART ioctl harder -- udiskslinuxmanager: Fix use after free -- tests: Fix targetcli_config.json - -* Sat Jan 27 2024 Fedora Release Engineering - 2.10.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Sep 07 2023 Tomas Bzatek - 2.10.1-1 -- Version 2.10.1 -- Default to ntfs-3g for stability reasons (#2182206) -- Use Recommends: for filesystem tools (#2169848) - -* Sat Jul 22 2023 Fedora Release Engineering - 2.10.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Jun 29 2023 Tomas Bzatek - 2.10.0-1 -- Version 2.10.0 - -* Sat Jan 21 2023 Fedora Release Engineering - 2.9.4-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 2.9.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Mar 03 2022 Tomas Bzatek - 2.9.4-4 -- Fix gtk-doc annotations - -* Thu Mar 03 2022 Tomas Bzatek - 2.9.4-3 -- Require ntfs-3g (#2058506) - -* Sat Jan 22 2022 Fedora Release Engineering - 2.9.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Oct 04 2021 Tomas Bzatek - 2.9.4-1 -- Version 2.9.4 -- Fixes CVE-2021-3802 (#2003650) - -* Thu Aug 05 2021 Tomas Bzatek - 2.9.3-1 -- Version 2.9.3 - -* Fri Jul 23 2021 Fedora Release Engineering - 2.9.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri Jun 18 2021 Tomas Bzatek - 2.9.2-5 -- Switch the default encryption to LUKS2 - -* Mon Apr 19 2021 Tomas Bzatek - 2.9.2-4 -- Fix a couple of issues found by Coverity -- Ignore systemd "Extended Boot Loader" GPT partition - -* Fri Mar 26 2021 Tomas Bzatek - 2.9.2-3 -- Fix FAT mkfs with dosfstools >= 4.2 -- udiskslinuxdriveata: Use GTask to apply configuration in a thread -- Limit allowed module names -- 80-udisks2.rules: Ignore Apple boot partition from livecd-tools - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.9.2-2 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Thu Feb 04 2021 Tomas Bzatek - 2.9.2-1 -- Version 2.9.2 - -* Wed Jan 27 2021 Fedora Release Engineering - 2.9.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Sep 07 2020 Neal Gompa - 2.9.1-2 -- Fix conditional around polkit Recommends for building on EL7 - -* Wed Aug 12 2020 Tomas Bzatek - 2.9.1-1 -- Version 2.9.1 -- Renamed zram-setup@.service to udisks2-zram-setup@.service - -* Wed Jul 29 2020 Fedora Release Engineering - 2.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue May 26 2020 Tomas Bzatek - 2.9.0-1 -- Version 2.9.0 - * Fri Jan 31 2020 Fedora Release Engineering - 2.8.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild