renamed from udisks2 [release 2.9.4-4mamba;Tue May 30 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 18:46:25 +01:00
parent e76c7166dd
commit 6dd17a8f94
5 changed files with 152 additions and 266 deletions

View File

@ -1,124 +0,0 @@
From 2b2fcf80841972b70ad695a5a1ed74487d4fd37a Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Wed, 19 May 2010 13:01:31 -0400
Subject: [PATCH] Update to latest LVM2 API
See
http://lists.freedesktop.org/archives/devkit-devel/2010-April/000783.html
---
configure.ac | 2 +-
src/probers/udisks-lvm-pv-export.c | 30 ++++++++++--------------------
2 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/configure.ac b/configure.ac
index 469be5f..a9141bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,7 @@ AC_SUBST(DEVMAPPER_LIBS)
have_lvm2=no
AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--disable-lvm2], [disable LVM2 support]))
if test "x$enable_lvm2" != "xno"; then
- PKG_CHECK_MODULES(LVM2, lvm2app >= 2.1,
+ PKG_CHECK_MODULES(LVM2, lvm2app >= 2.2,
[AC_DEFINE(HAVE_LVM2, 1, [Define if LVM2 is available]) have_lvm2=yes],
have_lvm2=no)
AC_SUBST(LVM2_CFLAGS)
diff --git a/src/probers/udisks-lvm-pv-export.c b/src/probers/udisks-lvm-pv-export.c
index 5675fb8..ee6d8ed 100644
--- a/src/probers/udisks-lvm-pv-export.c
+++ b/src/probers/udisks-lvm-pv-export.c
@@ -47,7 +47,7 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
struct lvm_pv_list *pv_list;
dm_list_iterate_items (pv_list, pvs)
{
- char *uuid;
+ const char *uuid;
pv_t pv = pv_list->pv;
uuid = lvm_pv_get_uuid (pv);
@@ -58,10 +58,8 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
if (out_pv != NULL)
*out_pv = pv;
ret = vg;
- dm_free (uuid);
goto out;
}
- dm_free (uuid);
}
}
}
@@ -79,12 +77,12 @@ find_vg_for_pv_uuid (lvm_t lvm_ctx,
static void
print_vg (vg_t vg)
{
- char *s;
+ const char *s;
struct dm_list *pvs;
struct dm_list *lvs;
- s = lvm_vg_get_uuid (vg); g_print ("UDISKS_LVM2_PV_VG_UUID=%s\n", s); dm_free (s);
- s = lvm_vg_get_name (vg); g_print ("UDISKS_LVM2_PV_VG_NAME=%s\n", s); dm_free (s);
+ s = lvm_vg_get_uuid (vg); g_print ("UDISKS_LVM2_PV_VG_UUID=%s\n", s);
+ s = lvm_vg_get_name (vg); g_print ("UDISKS_LVM2_PV_VG_NAME=%s\n", s);
g_print ("UDISKS_LVM2_PV_VG_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_size (vg));
g_print ("UDISKS_LVM2_PV_VG_FREE_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_free_size (vg));
g_print ("UDISKS_LVM2_PV_VG_EXTENT_SIZE=%" G_GUINT64_FORMAT "\n", lvm_vg_get_extent_size (vg));
@@ -117,17 +115,14 @@ print_vg (vg_t vg)
str = g_string_new (NULL);
dm_list_iterate_items (pv_list, pvs)
{
- char *uuid;
+ const char *uuid;
guint64 size;
guint64 free_size;
pv_t pv = pv_list->pv;
uuid = lvm_pv_get_uuid (pv);
if (uuid != NULL)
- {
- g_string_append_printf (str, "uuid=%s", uuid);
- dm_free (uuid);
- }
+ g_string_append_printf (str, "uuid=%s", uuid);
size = lvm_pv_get_size (pv);
g_string_append_printf (str, ";size=%" G_GUINT64_FORMAT, size);
free_size = lvm_pv_get_free (pv);
@@ -173,8 +168,8 @@ print_vg (vg_t vg)
str = g_string_new (NULL);
dm_list_iterate_items (lv_list, lvs)
{
- char *uuid;
- char *name;
+ const char *uuid;
+ const char *name;
gboolean is_active;
guint64 size;
lv_t lv = lv_list->lv;
@@ -195,11 +190,6 @@ print_vg (vg_t vg)
g_string_append_printf (str, "active=%d", is_active);
g_string_append_c (str, ' ');
}
-
- if (uuid != NULL)
- dm_free (uuid);
- if (name != NULL)
- dm_free (name);
}
g_print ("UDISKS_LVM2_PV_VG_LV_LIST=%s\n", str->str);
g_string_free (str, TRUE);
@@ -212,9 +202,9 @@ print_vg (vg_t vg)
static void
print_pv (pv_t pv)
{
- char *s;
+ const char *s;
- s = lvm_pv_get_uuid (pv); g_print ("UDISKS_LVM2_PV_UUID=%s\n", s); dm_free (s);
+ s = lvm_pv_get_uuid (pv); g_print ("UDISKS_LVM2_PV_UUID=%s\n", s);
g_print ("UDISKS_LVM2_PV_NUM_MDA=%" G_GUINT64_FORMAT "\n", lvm_pv_get_mda_count (pv));
/* TODO: ask for more API in liblvm - pvdisplay(8) suggests more information
--
1.7.0.1

View File

@ -1,28 +0,0 @@
commit c73b5ab54378ec6d7df9948c46ce87f98587af9a
Author: Tom Gundersen <teg@jklm.no>
Date: 2 days ago
udev: remove redundant call to deprecated pci-db
The binary is no longer shipped with systemd/udev. The functionality
is taken over by a builtin, which is ran for all devices, rendering
this rule superfluous.
Cc: Jan de Groot <jgc@archlinux.org>
Signed-off-by: Tom Gundersen <teg@jklm.no>
diff --git a/data/80-udisks.rules b/data/80-udisks.rules
index d1c8c5d..4bf2b37 100644
--- a/data/80-udisks.rules
+++ b/data/80-udisks.rules
@@ -1,10 +1,6 @@
# Do not edit this file, it will be overwritten on updates
#
-# import names for PCI storage controllers
-#
-SUBSYSTEM=="pci", ACTION=="add|change", ENV{ID_MODEL_FROM_DATABASE}=="", ATTR{class}=="0x01*", IMPORT{program}="pci-db %p"
-
# Set eSATA port type for known eSATA CardBus adapters - first we want to ensure
# the device is on a cardbus controller (upper PCI device) - then we check
# vid/pid (lower PCI device)

View File

@ -1,24 +0,0 @@
diff -Nru udisks-1.0.5.orig/data/Makefile.am udisks-1.0.5/data/Makefile.am
--- udisks-1.0.5.orig/data/Makefile.am 2014-03-10 09:57:48.000000000 +0100
+++ udisks-1.0.5/data/Makefile.am 2014-04-01 16:05:56.924208225 +0200
@@ -31,7 +31,7 @@
systemdservice_DATA = $(systemdservice_in_files:.service.in=.service)
$(systemdservice_DATA): $(systemdservice_in_files) Makefile
- @sed -e "s|\@libexecdir\@|$(prefix)/lib/udisks|" $< > $@
+ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
endif
udevrulesdir = $(slashlibdir)/udev/rules.d
diff -Nru udisks-1.0.5.orig/data/Makefile.in udisks-1.0.5/data/Makefile.in
--- udisks-1.0.5.orig/data/Makefile.in 2014-03-10 10:04:33.000000000 +0100
+++ udisks-1.0.5/data/Makefile.in 2014-04-01 16:06:14.665014923 +0200
@@ -722,7 +722,7 @@
cp $< $@
@HAVE_SYSTEMD_TRUE@$(systemdservice_DATA): $(systemdservice_in_files) Makefile
-@HAVE_SYSTEMD_TRUE@ @sed -e "s|\@libexecdir\@|$(prefix)/lib/udisks|" $< > $@
+@HAVE_SYSTEMD_TRUE@ @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
clean-local :
rm -f *~ $(service_DATA) $(dbusconf_DATA) $(systemdservice_DATA)

View File

@ -1,33 +1,33 @@
Name: udisks Name: udisks
Version: 1.0.5 Version: 2.9.4
Release: 3mamba Release: 4mamba
Summary: Storage Management Service Summary: Storage Management Service
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.freedesktop.org/wiki/Software/udisks URL: https://udisks.freedesktop.org
Source: http://hal.freedesktop.org/releases/udisks-%{version}.tar.gz Source: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
Patch0: udisks-1.0.1-Update-to-latest-LVM2-API.patch Patch0: udisks2-1.93.0-define-missing-LOOP_CTL_GET_FREE.patch
Patch1: udisks-1.0.4-udev-197.patch
Patch2: udisks-1.0.5-systemd-libexecdir.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libatasmart-devel BuildRequires: libatasmart-devel
BuildRequires: libdbus-devel BuildRequires: libattr-devel
BuildRequires: libdbus-glib-devel BuildRequires: libblockdev-devel
BuildRequires: libdevmapper-devel
BuildRequires: libglib-devel BuildRequires: libglib-devel
BuildRequires: libparted-devel BuildRequires: libgudev-devel
BuildRequires: libmount-devel
BuildRequires: libpolkit-devel BuildRequires: libpolkit-devel
BuildRequires: libsg3_utils-devel BuildRequires: libsystemd-devel
BuildRequires: libudev-devel BuildRequires: libudev-devel
BuildRequires: libuuid-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libblkid-devel
BuildRequires: libsepol-devel BuildRequires: libsepol-devel
BuildRequires: libuuid-devel Provides: udisks2
Obsoletes: udisks2 <= 2.9.4-3mamba
Requires: dbus Requires: dbus
Requires: dosfstools Requires: dosfstools
Requires: e2fsprogs Requires: e2fsprogs
@ -35,11 +35,8 @@ Requires: mdadm
Requires: mtools Requires: mtools
Requires: smp_utils Requires: smp_utils
Requires: udev Requires: udev
Requires: util-linux Requires: util-linux-ng
Requires: xfsprogs Requires: xfsprogs
Obsoletes: DeviceKit-disks
Provides: DeviceKit-disks
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices. UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices.
@ -48,31 +45,29 @@ UDisks provides a daemon, D-Bus API and command line tools for managing disks an
Summary: Devel package for %{name} Summary: Devel package for %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: DeviceKit-disks-devel Provides: udisks2-devel
Provides: DeviceKit-disks-devel Obsoletes: udisks2-devel <= 2.9.4-3mamba
%description devel %description devel
UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices. UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development.
%package apidocs %package apidocs
Summary: %{name} API documentation Summary: %{name} API documentation
Group: Documentation Group: Documentation
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: DeviceKit-disks-apidocs Provides: udisks2-apidocs
Provides: DeviceKit-disks-apidocs Obsoletes: udisks2-apidocs <= 2.9.4-3mamba
%description apidocs %description apidocs
UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices. UDisks provides a daemon, D-Bus API and command line tools for managing disks and storage devices.
This package contains %{name} API documentation. This package contains %{name} API documentation.
%debug_package
%prep %prep
%setup -q %setup -q -n udisks-%{version}
#%patch0 -p1 #%patch0 -p1
%patch1 -p1
%patch2 -p1
%build %build
%configure \ %configure \
@ -84,88 +79,144 @@ This package contains %{name} API documentation.
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
ln -s udisks %{buildroot}%{_bindir}/devkit-disks %find_lang %{name} --all-name
ln -s udisks.1 %{buildroot}%{_datadir}/man/man1/devkit-disks.1
chmod 644 %{buildroot}%{_sysconfdir}/profile.d/udisks-bash-completion.sh
%find_lang %{name}
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
%tmpfiles_create %{name}
%systemd_post %{name}
:
%preun
%systemd_preun %{name}
:
%postun
%systemd_postun_with_restart %{name}
:
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%{_sysconfdir}/avahi/services/udisks.service %config(noreplace) %{_sysconfdir}/udisks2/udisks2.conf
%{_sysconfdir}/dbus-1/system.d/*.conf %{_sysconfdir}/udisks2/mount_options.conf.example
%{_sysconfdir}/profile.d/udisks-bash-completion.sh %{_sbindir}/umount.udisks2
%attr(0700,root,root) %dir %{_localstatedir}/lib/udisks %{_bindir}/udisksctl
#%attr(0700,root,root) %dir %{_localstatedir}/run/udisks %{_prefix}/lib/tmpfiles.d/udisks2.conf
/lib/systemd/system/udisks.service #%{_unitdir}/clean-mount-point@.service
/lib/udev/rules.d/80-udisks.rules %{_libdir}/libudisks2.so.*
/lib/udev/udisks-dm-export %{_libdir}/girepository-1.0/UDisks-2.0.typelib
#/lib/udev/udisks-lvm-pv-export %dir %{_libexecdir}/udisks2
/lib/udev/udisks-part-id %{_libexecdir}/udisks2/udisksd
/lib/udev/udisks-probe-ata-smart %{_datadir}/bash-completion/completions/udisksctl
/lib/udev/udisks-probe-sas-expander %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf
/sbin/umount.udisks %{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service
%{_bindir}/udisks %attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2
%{_bindir}/udisks-tcp-bridge %{_unitdir}/udisks2.service
%{_bindir}/devkit-disks %{_udevrulesdir}/80-udisks2.rules
%{_datadir}/dbus-1/interfaces/org.freedesktop.UDisks*.xml
#%{_libdir}/polkit-1/extensions/libudisks-action-lookup.so
%{_datadir}/polkit-1/actions/*.policy %{_datadir}/polkit-1/actions/*.policy
%{_libexecdir}/udisks-daemon %{_mandir}/man1/udisksctl.1*
%{_libexecdir}/udisks-helper-ata-smart-collect %{_mandir}/man5/udisks2.conf.5*
%{_libexecdir}/udisks-helper-ata-smart-selftest %{_mandir}/man8/udisks.8*
%{_libexecdir}/udisks-helper-change-filesystem-label %{_mandir}/man8/udisksd.8*
%{_libexecdir}/udisks-helper-change-luks-password %{_mandir}/man8/umount.udisks2.8*
%{_libexecdir}/udisks-helper-create-partition
%{_libexecdir}/udisks-helper-create-partition-table
%{_libexecdir}/udisks-helper-delete-partition
%{_libexecdir}/udisks-helper-drive-benchmark
%{_libexecdir}/udisks-helper-drive-detach
%{_libexecdir}/udisks-helper-drive-poll
%{_libexecdir}/udisks-helper-fstab-mounter
%{_libexecdir}/udisks-helper-linux-md-check
%{_libexecdir}/udisks-helper-linux-md-remove-component
%{_libexecdir}/udisks-helper-mdadm-expand
%{_libexecdir}/udisks-helper-mkfs
%{_libexecdir}/udisks-helper-modify-partition
%{_datadir}/dbus-1/system-services/org.freedesktop.UDisks.service
%{_mandir}/man1/devkit-disks.1*
%{_mandir}/man1/udisks.1*
%{_mandir}/man1/udisks-tcp-bridge.1*
%{_mandir}/man7/udisks.7*
%{_mandir}/man8/udisks-daemon.8*
%doc AUTHORS COPYING %doc AUTHORS COPYING
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
#%{_libdir}/polkit-1/extensions/libudisks-action-lookup.*a %dir %{_includedir}/udisks2
%{_datadir}/pkgconfig/udisks.pc %dir %{_includedir}/udisks2/udisks
%doc HACKING NEWS README doc/TODO %{_includedir}/udisks2/udisks/*.h
%{_libdir}/libudisks2.a
%{_libdir}/libudisks2.so
%{_libdir}/pkgconfig/udisks2.pc
%{_datadir}/gir-1.0/UDisks-2.0.gir
#%doc HACKING NEWS doc/TODO
%files apidocs %files apidocs
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/gtk-doc/html/udisks %dir %{_datadir}/gtk-doc/html/udisks2
%{_datadir}/gtk-doc/html/udisks/* %{_datadir}/gtk-doc/html/udisks2/*
%changelog %changelog
* Fri Sep 05 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.5-3mamba * Tue May 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.4-4mamba
- mode dbus files from -devel to main package - renamed from udisks2
* Tue Apr 01 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.5-2mamba * Tue May 30 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.4-3mamba
- added a patch to fix libexecdir in systemd file - rebuilt
* Sat Mar 15 2014 Automatic Build System <autodist@mambasoft.it> 1.0.5-1mamba * Sun May 08 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.9.4-2mamba
- obsolete udisks
* Sun Nov 28 2021 Automatic Build System <autodist@mambasoft.it> 2.9.4-1mamba
- automatic version update by autodist - automatic version update by autodist
* Fri Feb 01 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.4-2mamba * Mon Mar 08 2021 Automatic Build System <autodist@mambasoft.it> 2.9.2-1mamba
- patch: drop rule using pci-db missing in udev >= 197 - automatic version update by autodist
* Tue Apr 03 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.4-1mamba * Sun Aug 16 2020 Automatic Build System <autodist@mambasoft.it> 2.9.1-1mamba
- update to 1.0.4 - automatic version update by autodist
* Sat Jun 06 2020 Automatic Build System <autodist@mambasoft.it> 2.9.0-1mamba
- automatic version update by autodist
* Sat Aug 03 2019 Automatic Build System <autodist@mambasoft.it> 2.8.4-1mamba
- automatic version update by autodist
* Mon Mar 25 2019 Automatic Build System <autodist@mambasoft.it> 2.8.2-1mamba
- automatic version update by autodist
* Sun Mar 10 2019 Automatic Build System <autodist@mambasoft.it> 2.8.1-1mamba
- automatic version update by autodist
* Wed Mar 21 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.6-1mamba
- update to 2.7.6
* Mon Dec 12 2016 Automatic Build System <autodist@mambasoft.it> 2.1.8-1mamba
- automatic version update by autodist
* Fri Mar 04 2016 Automatic Build System <autodist@mambasoft.it> 2.1.7-1mamba
- automatic version update by autodist
* Sun Aug 02 2015 Automatic Build System <autodist@mambasoft.it> 2.1.6-1mamba
- automatic version update by autodist
* Tue Mar 10 2015 Automatic Build System <autodist@mambasoft.it> 2.1.5-1mamba
- automatic version update by autodist
* Sun Jan 18 2015 Automatic Build System <autodist@mambasoft.it> 2.1.4-1mamba
- automatic update by autodist
* Thu Mar 13 2014 Automatic Build System <autodist@mambasoft.it> 2.1.3-1mamba
- automatic version update by autodist
* Sun Feb 16 2014 Automatic Build System <autodist@mambasoft.it> 2.1.2-1mamba
- automatic version update by autodist
* Fri Aug 23 2013 Automatic Build System <autodist@mambasoft.it> 2.1.1-1mamba
- automatic update by autodist
* Tue Mar 19 2013 Automatic Build System <autodist@mambasoft.it> 2.1.0-1mamba
- automatic version update by autodist
* Fri Mar 01 2013 Automatic Build System <autodist@mambasoft.it> 2.0.92-1mamba
- automatic version update by autodist
* Sun Jan 20 2013 Automatic Build System <autodist@mambasoft.it> 2.0.91-1mamba
- automatic version update by autodist
* Wed Jan 02 2013 Automatic Build System <autodist@mambasoft.it> 2.0.90-1mamba
- automatic version update by autodist
* Thu Oct 18 2012 Automatic Build System <autodist@mambasoft.it> 2.0.0-1mamba
- automatic version update by autodist
* Thu Aug 09 2012 Automatic Build System <autodist@mambasoft.it> 1.99.0-1mamba
- automatic version update by autodist
* Tue Apr 03 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.93.0-1mamba
- update to 1.93.0
* Sun Jul 24 2011 Automatic Build System <autodist@mambasoft.it> 1.0.3-1mamba * Sun Jul 24 2011 Automatic Build System <autodist@mambasoft.it> 1.0.3-1mamba
- automatic version update by autodist - automatic version update by autodist

View File

@ -0,0 +1,11 @@
--- udisks-1.93.0.orig/src/udiskslinuxmanager.c 2012-03-05 17:04:03.000000000 +0100
+++ udisks-1.93.0/src/udiskslinuxmanager.c 2012-04-04 00:10:48.134381152 +0200
@@ -42,6 +42,8 @@
#include "udisksdaemonutil.h"
#include "udiskscleanup.h"
+#define LOOP_CTL_GET_FREE 0x4C82
+
/**
* SECTION:udiskslinuxmanager
* @title: UDisksLinuxManager