Browse Source

updated 5 packages

libblockdev-2.24-1

parted-3.3-1

sg3_utils-1.45-1

udisks-1.0.5-2

udisks2-2.9.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12462 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 3 years ago
parent
commit
0baf392558

+ 82 - 41
lib/libb/libblockdev/libblockdev-vl.spec

@@ -1,4 +1,6 @@
-%define with_python2 1
+%bcond_with systemd
+
+%define with_python2 0
 %define with_python3 1
 %define with_gtk_doc 1
 %define with_bcache 0
@@ -7,7 +9,11 @@
 %define with_dm 1
 %define with_loop 1
 %define with_lvm 1
+%if %{with systemd}
+%define with_lvm_dbus 1
+%else
 %define with_lvm_dbus 0
+%endif
 %define with_mdraid 1
 %define with_mpath 1
 %define with_swap 1
@@ -104,11 +110,11 @@
 
 %define configure_opts %{?python2_copts} %{?python3_copts} %{?bcache_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?kbd_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{?vdo_copts} %{?gi_copts}
 
-Name:         libblockdev
-Version:      2.23
-Release:      1%{?_dist_release}
 Summary:      A library for low-level manipulation with block devices
-
+Name:         libblockdev
+Version:      2.24
+Release:      1%{?_dist_release}%{?with_systemd:.systemd}
+Group:        system
 Vendor:       Project Vine
 Distribution: Vine Linux
 
@@ -117,7 +123,11 @@ URL:          https://github.com/storaged-project/libblockdev
 Source0:      https://github.com/storaged-project/libblockdev/releases/download/%{version}-1/%{name}-%{version}.tar.gz
 
 BuildRequires: glib2-devel
+%if %{with systemd}
+BuildRequires: systemd-devel
+%else
 BuildRequires: libudev-devel
+%endif
 %if %{with_gi}
 BuildRequires: gobject-introspection-devel
 %endif
@@ -168,8 +178,10 @@ be used as standalone libraries. One of the core principles of libblockdev is
 that it is stateless from the storage configuration's perspective (e.g. it has
 no information about VGs when creating an LV).
 
+
 %package devel
 Summary:     Development files for libblockdev
+Group:       programming
 Requires: %{name}%{?_isa} = %{version}-%{release}
 Requires: glib2-devel
 
@@ -177,9 +189,11 @@ Requires: glib2-devel
 This package contains header files and pkg-config files needed for development
 with the libblockdev library.
 
+
 %if %{with_python2}
 %package -n python-blockdev
 Summary:       Python gobject-introspection bindings for libblockdev
+Group:         programming
 BuildRequires: python-devel python-rpm-macros
 Requires:      %{name}%{?_isa} = %{version}-%{release}
 Requires:      pygobject
@@ -190,9 +204,11 @@ This package contains enhancements to the gobject-introspection bindings for
 libblockdev in Python2.
 %endif
 
+
 %if %{with_python3}
 %package -n python3-blockdev
 Summary:       Python3 gobject-introspection bindings for libblockdev
+Group:         programming
 BuildRequires: python3-devel python3-rpm-macros
 Requires:      %{name}%{?_isa} = %{version}-%{release}
 Requires:      python3-pygobject
@@ -206,13 +222,16 @@ libblockdev in Python3.
 %package utils
 BuildRequires: kmod-devel
 Summary:     A library with utility functions for the libblockdev library
+Group:       admin-tools
 
 %description utils
 The libblockdev-utils is a library providing utility functions used by the
 libblockdev library and its plugins.
 
+
 %package utils-devel
 Summary:     Development files for libblockdev-utils
+Group:       programming
 Requires: %{name}-utils%{?_isa} = %{version}-%{release}
 Requires: glib2-devel
 
@@ -225,6 +244,7 @@ with the libblockdev-utils library.
 %package btrfs
 BuildRequires: libbytesize-devel
 Summary:     The BTRFS plugin for the libblockdev library
+Group:       system
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: btrfs-progs
 
@@ -232,8 +252,10 @@ Requires: btrfs-progs
 The libblockdev library plugin (and in the same time a standalone library)
 providing the BTRFS-related functionality.
 
+
 %package btrfs-devel
 Summary:     Development files for the libblockdev-btrfs plugin/library
+Group:       programming
 Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
 Requires: glib2-devel
 Requires: %{name}-utils-devel%{?_isa}
@@ -246,6 +268,8 @@ with the libblockdev-btrfs plugin/library.
 
 %if %{with_crypto}
 %package crypto
+Summary:     The crypto plugin for the libblockdev library
+Group:       system
 BuildRequires: cryptsetup-devel
 BuildRequires: libblkid-devel
 
@@ -254,14 +278,14 @@ BuildRequires: volume_key-devel >= 0.3.9-7
 BuildRequires: nss-devel
 %endif
 
-Summary:     The crypto plugin for the libblockdev library
-
 %description crypto
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to encrypted devices (LUKS).
 
+
 %package crypto-devel
 Summary:     Development files for the libblockdev-crypto plugin/library
+Group:       programming
 Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
 Requires: glib2-devel
 
@@ -273,13 +297,13 @@ with the libblockdev-crypto plugin/library.
 
 %if %{with_dm}
 %package dm
+Summary:     The Device Mapper plugin for the libblockdev library
+Group:       system
 BuildRequires: device-mapper-devel
 %if %{with_dmraid}
 BuildRequires: dmraid
 BuildRequires: dmraid-devel
 %endif
-#BuildRequires: systemd-devel
-Summary:     The Device Mapper plugin for the libblockdev library
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: device-mapper
 %if %{with_dmraid}
@@ -292,10 +316,13 @@ providing the functionality related to Device Mapper.
 
 %package dm-devel
 Summary:     Development files for the libblockdev-dm plugin/library
+Group:       programming
 Requires: %{name}-dm%{?_isa} = %{version}-%{release}
 Requires: glib2-devel
 Requires: device-mapper-devel
-#Requires: systemd-devel
+%if %{with systemd}
+Requires: systemd-devel
+%endif
 %if %{with_dmraid}
 Requires: dmraid-devel
 %endif
@@ -309,19 +336,22 @@ with the libblockdev-dm plugin/library.
 
 %if %{with_fs}
 %package fs
+Summary:     The FS plugin for the libblockdev library
+Group:       system
 BuildRequires: parted-devel
 BuildRequires: libblkid-devel
 BuildRequires: libmount-devel
-Summary:     The FS plugin for the libblockdev library
 Requires: %{name}-utils%{?_isa} >= 0.11
 #Requires: device-mapper-multipath
 
+
 %description fs
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to operations with file systems.
 
 %package fs-devel
 Summary:     Development files for the libblockdev-fs plugin/library
+Group:       programming
 Requires: %{name}-fs%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -336,8 +366,9 @@ with the libblockdev-fs plugin/library.
 
 %if %{with_kbd}
 %package kbd
-BuildRequires: libbytesize-devel
 Summary:     The KBD plugin for the libblockdev library
+Group:       system
+BuildRequires: libbytesize-devel
 Requires: %{name}-utils%{?_isa} >= 0.11
 %if %{with_bcache}
 Requires: bcache-tools >= 1.0.8
@@ -348,8 +379,10 @@ The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to kernel block devices (namely zRAM and
 Bcache).
 
+
 %package kbd-devel
 Summary:     Development files for the libblockdev-kbd plugin/library
+Group:       programming
 Requires: %{name}-kbd%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -363,14 +396,17 @@ with the libblockdev-kbd plugin/library.
 %if %{with_loop}
 %package loop
 Summary:     The loop plugin for the libblockdev library
+Group:       system
 Requires: %{name}-utils%{?_isa} >= 0.11
 
 %description loop
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to loop devices.
 
+
 %package loop-devel
 Summary:     Development files for the libblockdev-loop plugin/library
+Group:       programming
 Requires: %{name}-loop%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -385,6 +421,7 @@ with the libblockdev-loop plugin/library.
 %package lvm
 BuildRequires: device-mapper-devel
 Summary:     The LVM plugin for the libblockdev library
+Group:       system
 Provides: %{name}-tools = %{version}-%{release}
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: lvm2
@@ -395,8 +432,10 @@ Requires: device-mapper-persistent-data
 The libblockdev library plugin (and in the same time a standalone library)
 providing the LVM-related functionality.
 
+
 %package lvm-devel
 Summary:     Development files for the libblockdev-lvm plugin/library
+Group:       programming
 Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -406,10 +445,12 @@ This package contains header files and pkg-config files needed for development
 with the libblockdev-lvm plugin/library.
 %endif
 
+
 %if %{with_lvm_dbus}
 %package lvm-dbus
 BuildRequires: device-mapper-devel
 Summary:     The LVM plugin for the libblockdev library
+Group:       system
 Requires: %{name}-utils%{?_isa} >= 1.4
 Requires: lvm2-dbusd >= 2.02.156
 # for thin_metadata_size
@@ -419,8 +460,10 @@ Requires: device-mapper-persistent-data
 The libblockdev library plugin (and in the same time a standalone library)
 providing the LVM-related functionality utilizing the LVM DBus API.
 
+
 %package lvm-dbus-devel
 Summary:     Development files for the libblockdev-lvm-dbus plugin/library
+Group:       programming
 Requires: %{name}-lvm-dbus%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa} >= 1.4
 Requires: glib2-devel
@@ -435,6 +478,7 @@ with the libblockdev-lvm-dbus plugin/library.
 %package mdraid
 BuildRequires: libbytesize-devel
 Summary:     The MD RAID plugin for the libblockdev library
+Group:       system
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: mdadm
 
@@ -442,8 +486,10 @@ Requires: mdadm
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to MD RAID.
 
+
 %package mdraid-devel
 Summary:     Development files for the libblockdev-mdraid plugin/library
+Group:       programming
 Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -456,8 +502,9 @@ with the libblockdev-mdraid plugin/library.
 
 %if %{with_mpath}
 %package mpath
-BuildRequires: device-mapper-devel
 Summary:     The multipath plugin for the libblockdev library
+Group:       system
+BuildRequires: device-mapper-devel
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: device-mapper-multipath
 
@@ -465,8 +512,10 @@ Requires: device-mapper-multipath
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to multipath devices.
 
+
 %package mpath-devel
 Summary:     Development files for the libblockdev-mpath plugin/library
+Group:       programming
 Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -476,11 +525,13 @@ This package contains header files and pkg-config files needed for development
 with the libblockdev-mpath plugin/library.
 %endif
 
+
 %if %{with_nvdimm}
 %package nvdimm
+Summary:     The NVDIMM plugin for the libblockdev library
+Group:       system
 BuildRequires: ndctl-devel
 BuildRequires: libuuid-devel
-Summary:     The NVDIMM plugin for the libblockdev library
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: ndctl
 
@@ -488,8 +539,10 @@ Requires: ndctl
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to operations with NVDIMM devices.
 
+
 %package nvdimm-devel
 Summary:     Development files for the libblockdev-nvdimm plugin/library
+Group:       programming
 Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -502,8 +555,9 @@ with the libblockdev-nvdimm plugin/library.
 
 %if %{with_part}
 %package part
-BuildRequires: parted-devel
 Summary:     The partitioning plugin for the libblockdev library
+Group:       system
+BuildRequires: parted-devel
 Requires: %{name}-utils%{?_isa} >= 0.11
 #Requires: device-mapper-multipath
 Requires: gdisk
@@ -513,8 +567,10 @@ Requires: util-linux
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to partitioning.
 
+
 %package part-devel
 Summary:     Development files for the libblockdev-part plugin/library
+Group:       programming
 Requires: %{name}-part%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -528,6 +584,7 @@ with the libblockdev-part plugin/library.
 %if %{with_swap}
 %package swap
 Summary:     The swap plugin for the libblockdev library
+Group:       system
 Requires: %{name}-utils%{?_isa} >= 0.11
 Requires: util-linux
 
@@ -535,8 +592,10 @@ Requires: util-linux
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to swap devices.
 
+
 %package swap-devel
 Summary:     Development files for the libblockdev-swap plugin/library
+Group:       programming
 Requires: %{name}-swap%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -549,9 +608,10 @@ with the libblockdev-swap plugin/library.
 
 %if %{with_vdo}
 %package vdo
+Summary:     The vdo plugin for the libblockdev library
+Group:       system
 BuildRequires: libbytesize-devel
 BuildRequires: libyaml-devel
-Summary:     The vdo plugin for the libblockdev library
 Requires: %{name}-utils%{?_isa} >= 0.11
 
 # weak dependencies doesn't work on older RHEL
@@ -569,8 +629,10 @@ Recommends: kmod-kvdo
 The libblockdev library plugin (and in the same time a standalone library)
 providing the functionality related to VDO devices.
 
+
 %package vdo-devel
 Summary:     Development files for the libblockdev-vdo plugin/library
+Group:       programming
 Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
 Requires: %{name}-utils-devel%{?_isa}
 Requires: glib2-devel
@@ -581,28 +643,9 @@ with the libblockdev-vdo plugin/library.
 %endif
 
 
-%ifarch s390 s390x
-%package s390
-Summary:    The s390 plugin for the libblockdev library
-Requires: s390utils
-
-%description s390
-The libblockdev library plugin (and in the same time a standalone library)
-providing the functionality related to s390 devices.
-
-%package s390-devel
-Summary:     Development files for the libblockdev-s390 plugin/library
-Requires: %{name}-s390%{?_isa} = %{version}-%{release}
-Requires: %{name}-utils-devel%{?_isa}
-Requires: glib2-devel
-
-%description s390-devel
-This package contains header files and pkg-config files needed for development
-with the libblockdev-s390 plugin/library.
-%endif
-
 %package plugins-all
 Summary:     Meta-package that pulls all the libblockdev plugins as dependencies
+Group:       system,collections
 Requires: %{name}%{?_isa} = %{version}-%{release}
 
 %if %{with_btrfs}
@@ -657,10 +700,6 @@ Requires: %{name}-swap%{?_isa} = %{version}-%{release}
 Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
 %endif
 
-%ifarch s390 s390x
-Requires: %{name}-s390%{?_isa} = %{version}-%{release}
-%endif
-
 %description plugins-all
 A meta-package that pulls all the libblockdev plugins as dependencies.
 
@@ -673,6 +712,7 @@ autoreconf -ivf
 %configure %{?configure_opts}
 %{__make} %{?_smp_mflags}
 
+
 %install
 %{make_install}
 find %{buildroot} -type f -name "*.la" | xargs %{__rm}
@@ -681,7 +721,8 @@ find %{buildroot} -type f -name "*.la" | xargs %{__rm}
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-%postun utils
+%post utils -p /sbin/ldconfig
+%postun utils -p /sbin/ldconfig
 
 %if %{with_btrfs}
 %post btrfs -p /sbin/ldconfig

+ 11 - 8
p/parted/parted-vl.spec

@@ -3,12 +3,14 @@
 Summary: The GNU disk partition manipulation program.
 Summary(ja): ディスクパーティション操作ツール
 Name: parted
-Version: 3.2.153
+Version: 3.3
 Release: 1%{?_dist_release}
+Group: admin-tools,system
+Vendor: Project Vine
+Distribution: Vine Linux
+
 License: GPLv3
-Group: Applications/Administration
 URL: http://www.gnu.org/software/parted/
-
 Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
 
 # Upstream still uses python2 for these scripts
@@ -27,9 +29,6 @@ BuildRequires: gnupg
 
 Provides: libparted = %{version}-%{release}
 
-Vendor: Project Vine
-Distribution: Vine Linux
-
 %description
 GNU Parted is a program that allows you to create, destroy,
 resize, move and copy hard disk partitions. This is useful for
@@ -42,10 +41,11 @@ GNU Parted はハードディスクのパーティションを作成/削除/リ
 システムをインストールするスペースを確保したり,ディスクのパーティションを
 整理したり,新しいハードディスクにデータをコピーする際に非常に便利です.
 
+
 %package devel
 Summary: Files for developing apps which will manipulate disk partitions.
 Summary(ja) : パーティション操作をするアプリケーションの開発用ファイル
-Group: Development/Libraries
+Group: programming
 Requires: parted = %{version}-%{release}
 Provides: libparted-devel = %{version}-%{release}
 
@@ -111,7 +111,7 @@ fi
 %files -f %{name}.lang
 %defattr(-,root,root)
 %license COPYING
-%doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
+%doc AUTHORS BUGS ChangeLog* NEWS README* THANKS TODO
 %doc doc/FAT doc/USER.jp
 %{_sbindir}/*
 %{_mandir}/man8/*
@@ -127,6 +127,9 @@ fi
 %{_libdir}/pkgconfig/libparted*.pc
 
 %changelog
+* Mon Aug 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3-1
+- new upstream release.
+
 * Mon Sep 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.2.153-1
 - new upstream release.
 - built with readline-8.0.

+ 56 - 12
s/sg3_utils/sg3_utils-vl.spec

@@ -1,20 +1,34 @@
-%define rescan_version 1.57
+%global rescan_script rescan-scsi-bus.sh
+%global _udevrulesdir /lib/udev/rules.d
 
 Summary: Utilities for devices that use SCSI command sets
 Summary(ja): SCSIコマンドセットを利用するデバイスのためのユーティリティ
 Name: sg3_utils
-Version: 1.37
+Version: 1.45
+Group: admin-tools
 Release: 1%{?_dist_release}
+Vendor: Project Vine
+
+Distribution: Vine Linux
 License: GPLv2+ and BSD
-Group: Applications/System
-Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
-Source1: http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh-%{rescan_version}
 URL: http://sg.danny.cz/sg/
+Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
+Source2: scsi-rescan.8
+Source10: 40-usb-blacklist.rules
+Source11: 59-fc-wwpn-id.rules
+# https://bugzilla.redhat.com/show_bug.cgi?id=1683343
+# sg_turs: improper usage show
+Patch1: sg_turs-help.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1627657
+# sg_raw -V fail
+Patch2: sg_raw-version.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=1760847
+# FC_TARGET_LUN attribute assigned for non FC device
+Patch3: fc_wwpn_id-non_FC-devices.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: %{name}-libs = %{version}-%{release}
 
-Vendor: Project Vine
-Distribution: Vine Linux
 
 %description
 Collection of Linux utilities for devices that use the SCSI command set.
@@ -30,18 +44,20 @@ well (e.g. /dev/sda).
 Warning: Some of these tools access the internals of your system
 and the incorrect usage of them may render your system inoperable.
 
+
 %package libs
 Summary: Shared library for %{name}
 Summary(ja): %{name} の共有ライブラリ
-Group: System Environment/Libraries
+Group: system
 
 %description libs
 This package contains the shared library for %{name}.
 
+
 %package devel
 Summary: Development library and header files for the sg3_utils library
 Summary(ja): %{name} ライブラリの開発ファイル
-Group: Development/Libraries
+Group: programming
 Requires: %{name}-libs = %{version}-%{release}
 Requires: glibc-headers
 
@@ -49,8 +65,10 @@ Requires: glibc-headers
 This package contains the %{name} library and its header files for
 developing applications.
 
+
 %prep
 %setup -q
+%autosetup -p 1
 
 
 %build
@@ -64,10 +82,26 @@ make %{?_smp_mflags}
 
 
 %install
+rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
 
-install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/rescan-scsi-bus.sh
+install -p -m 755 scripts/%{rescan_script} $RPM_BUILD_ROOT%{_bindir}
+( cd $RPM_BUILD_ROOT%{_bindir}; ln -sf %{rescan_script} scsi-rescan )
+
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8
+
+# install all extra udev rules
+mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir}
+mkdir -p $RPM_BUILD_ROOT/lib/udev
+# need to run after 60-persistent-storage.rules
+install -p -m 644 scripts/55-scsi-sg3_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/61-scsi-sg3_id.rules
+# need to run after 62-multipath.rules
+install -p -m 644 scripts/58-scsi-sg3_symlink.rules $RPM_BUILD_ROOT%{_udevrulesdir}/63-scsi-sg3_symlink.rules
+install -p -m 644 scripts/59-scsi-cciss_id.rules $RPM_BUILD_ROOT%{_udevrulesdir}/65-scsi-cciss_id.rules
+install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_udevrulesdir}
+install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevrulesdir}/63-fc-wwpn-id.rules
+install -p -m 755 scripts/fc_wwpn_id $RPM_BUILD_ROOT/lib/udev/
 
 
 %clean
@@ -75,15 +109,22 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %post libs -p /sbin/ldconfig
-
 %postun libs -p /sbin/ldconfig
 
 
 %files
 %defattr(-,root,root)
-%doc ChangeLog COVERAGE CREDITS INSTALL README README.sg_start
+%license COPYING
+%doc ChangeLog COVERAGE CREDITS INSTALL README README.iscsi README.sg_start
 %attr(755,root,root) %{_bindir}/*
+%{_bindir}/*
 %{_mandir}/man8/*
+%{_udevrulesdir}/61-scsi-sg3_id.rules
+%{_udevrulesdir}/63-scsi-sg3_symlink.rules
+%{_udevrulesdir}/63-fc-wwpn-id.rules
+%{_udevrulesdir}/65-scsi-cciss_id.rules
+%{_udevrulesdir}/40-usb-blacklist.rules
+/lib/udev/fc_wwpn_id
 
 %files libs
 %defattr(-,root,root)
@@ -96,6 +137,9 @@ rm -rf $RPM_BUILD_ROOT
 
  
 %changelog
+* Mon Aug 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.45-1
+- new upstream release.
+
 * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.37-1
 - update to 1.37
 

+ 42 - 12
u/udisks/udisks-vl.spec

@@ -1,3 +1,5 @@
+%bcond_with systemd
+
 %define glib2_version           2.6.0
 %define dbus_version            1.2
 %define dbus_glib_version       0.82
@@ -13,15 +15,14 @@
 Summary: Storage Management Service
 Name: udisks
 Version: 1.0.5
-Release: 1%{?_dist_release}
-Group: System Environment/Libraries
-
+Release: 2%{?_dist_release}%{?with_systemd:.systemd}
+Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
 
 License: GPLv2+
-URL: http://www.freedesktop.org/wiki/Software/udisks
-Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
+URL: https://www.freedesktop.org/wiki/Software/udisks
+Source0: https://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
 # https://bugs.freedesktop.org/show_bug.cgi?id=90778
 Patch0:  udisks-1.0.5-fix-build-with-glibc-2.20.patch
 Patch1:  fix_bash_completion.patch
@@ -38,9 +39,15 @@ BuildRequires: parted-devel >= %{parted_version}
 BuildRequires: device-mapper-devel >= %{device_mapper_version}
 BuildRequires: intltool
 BuildRequires: libatasmart-devel >= %{libatasmart_version}
+BuildRequires: sg3_utils-devel >= %{sg3_utils_version}
+%if %{with systemd}
+BuildRequires: systemd-devel
+BuildRequires: libgudev-devel
+%{?systemd_requires}
+%else
 BuildRequires: eudev-libgudev1-devel >= %{eudev_version}
 BuildRequires: eudev-libudev-devel >= %{eudev_version}
-BuildRequires: sg3_utils-devel >= %{sg3_utils_version}
+%endif
 # needed to pull in the system bus daemon
 Requires: dbus >= %{dbus_version}
 # needed to pull in the udev daemon
@@ -84,12 +91,12 @@ Provides: DeviceKit-disks = 010
 udisks provides a daemon, D-Bus API and command line tools
 for managing disks and storage devices.
 
+
 %package devel
 Summary: D-Bus interface definitions for udisks
-Group: Development/Libraries
+Group: programming
 Requires: %{name} = %{version}-%{release}
 Requires: gtk-doc
-
 # See comment above
 #
 Obsoletes: DeviceKit-disks-devel <= 009
@@ -98,6 +105,7 @@ Provides: DeviceKit-disks-devel = 010
 %description devel
 D-Bus interface definitions and documentation for udisks.
 
+
 %prep
 %setup -q
 %autopatch -p1
@@ -107,15 +115,16 @@ rm -f src/*-glue.h tools/*-glue.h
 
 autoreconf --force --install
 
+
 %build
 %configure \
 	--enable-gtk-doc \
 	%{nil}
 make %{_smp_mflags}
 
+
 %install
 rm -rf $RPM_BUILD_ROOT
-
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 
 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
@@ -131,9 +140,23 @@ chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/udisks-bash-completion.sh
 
 %find_lang %{name}
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
+%if %{with systemd}
+%post
+%systemd_post udisks.service
+
+%preun
+%systemd_preun udisks.service
+
+%postun
+%systemd_postun_with_restart udisks.service
+%endif
+
+
 %files -f %{name}.lang
 %defattr(-,root,root,-)
 %license COPYING
@@ -141,8 +164,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/avahi/services/udisks.service
 %{_sysconfdir}/dbus-1/system.d/*.conf
 %{_sysconfdir}/profile.d/*.sh
-/lib/udev/rules.d/*.rules
 
+%if %{with systemd}
+%{_unitdir}/udisks.service
+%endif
+
+/lib/udev/rules.d/*.rules
 /lib/udev/udisks-part-id
 /lib/udev/udisks-dm-export
 /lib/udev/udisks-probe-ata-smart
@@ -171,9 +198,12 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/gtk-doc/html/udisks
 %{_datadir}/gtk-doc/html/udisks/*
 
-# Note: please don't forget the %{?dist} in the changelog. Thanks
-#
+
 %changelog
+* Tue Aug 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.5-2
+- rebuilt with sg3_utils-1.45.
+- added systemd support (disabled as default).
+
 * Sun Mar 29 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.5-1
 - new upstream release.
 

+ 118 - 57
u/udisks2/udisks2-vl.spec

@@ -1,20 +1,19 @@
+%bcond_with systemd
+
 %define glib2_version           2.40.0
 %define dbus_version            1.6.14
-%define dbus_glib_version       0.98
 %define polkit_version          0.104
-%define parted_version          2.3
-%define mdadm_version           2.6.7
-%define device_mapper_version   1.02
 %define libatasmart_version     0.17
-%define sg3_utils_version       1.27
-%define smp_utils_version       0.94
-%global libblockdev_version     2.19
+%global libblockdev_version     2.24
+
+# valid options are 'luks1' or 'luks2'
+%define default_luks_encryption luks2
 
 Summary: Storage Management Service
 Name: udisks2
-Version: 2.8.4
-Release: 1%{?_dist_release}
-Group: System Environment/Libraries
+Version: 2.9.0
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
+Group: admin-tools,system
 Vendor: Project Vine
 Distribution: Vine Linux
 
@@ -26,22 +25,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: glib2-devel >= %{glib2_version}
 BuildRequires: gobject-introspection-devel
-BuildRequires: eudev-libgudev1-devel
-BuildRequires: eudev-libudev-devel
+BuildRequires: libgudev-devel
 BuildRequires: dbus-devel  >= %{dbus_version}
-BuildRequires: dbus-glib-devel >= %{dbus_glib_version}
 BuildRequires: polkit-devel >= %{polkit_version}
-BuildRequires: parted-devel >= %{parted_version}
-BuildRequires: device-mapper-devel >= %{device_mapper_version}
 BuildRequires: libacl-devel
 BuildRequires: intltool
 BuildRequires: libatasmart-devel >= %{libatasmart_version}
-BuildRequires: sg3_utils-devel >= %{sg3_utils_version}
-BuildRequires: lvm2-devel >= %{lvm2_version}
-BuildRequires: elogind-devel
-BuildRequires: gnome-common
-BuildRequires: libmount-devel
+BuildRequires: lvm2-devel
 BuildRequires: chrpath
+BuildRequires: gtk-doc
+BuildRequires: gettext-devel
 BuildRequires: libblockdev-devel        >= %{libblockdev_version}
 BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version}
 BuildRequires: libblockdev-dm-devel     >= %{libblockdev_version}
@@ -55,16 +48,33 @@ BuildRequires: libblockdev-swap-devel   >= %{libblockdev_version}
 %if 0
 BuildRequires: libblockdev-vdo-devel    >= %{libblockdev_version}
 %endif
+BuildRequires: libmount-devel
+BuildRequires: libuuid-devel
+%if %{with systemd}
+BuildRequires: systemd-devel
+%{?systemd_requires}
+%else
+BuildRequires: eudev-libgudev1-devel
+BuildRequires: eudev-libudev-devel
+BuildRequires: elogind-devel
+%endif
+
+Requires: libblockdev        >= %{libblockdev_version}
+Requires: libblockdev-part   >= %{libblockdev_version}
+Requires: libblockdev-loop   >= %{libblockdev_version}
+Requires: libblockdev-swap   >= %{libblockdev_version}
+Requires: libblockdev-mdraid >= %{libblockdev_version}
+Requires: libblockdev-fs     >= %{libblockdev_version}
+Requires: libblockdev-crypto >= %{libblockdev_version}
 
 # needed to pull in the system bus daemon
 Requires: dbus >= %{dbus_version}
+%if !%{with systemd}
 # needed to pull in the udev daemon
 Requires: eudev
+%endif
 # we need at least this version for bugfixes / features etc.
 Requires: libatasmart >= %{libatasmart_version}
-Requires: mdadm >= %{mdadm_version}
-# for smp_rep_manufacturer
-Requires: smp_utils >= %{smp_utils_version}
 # for mount, umount, mkswap
 Requires: util-linux-ng
 # for mkfs.ext3, mkfs.ext3, e2label
@@ -73,21 +83,14 @@ Requires: e2fsprogs
 Requires: xfsprogs
 # for mkfs.vfat
 Requires: dosfstools
-# for mlabel
-Requires: mtools
-# for mkntfs - no ntfsprogs on ppc, though
-%ifnarch ppc ppc64
-Requires: ntfsprogs
-%endif
+# For ejecting removable disks
+Requires: eject
+# For utab monitor
+Requires: libmount
+# For utab monitor
 Requires: gdisk
-
-Requires: libblockdev        >= %{libblockdev_version}
-Requires: libblockdev-part   >= %{libblockdev_version}
-Requires: libblockdev-loop   >= %{libblockdev_version}
-Requires: libblockdev-swap   >= %{libblockdev_version}
-Requires: libblockdev-mdraid >= %{libblockdev_version}
-Requires: libblockdev-fs     >= %{libblockdev_version}
-Requires: libblockdev-crypto >= %{libblockdev_version}
+# For mkntfs (not available on rhel or on ppc/ppc64)
+Requires: ntfsprogs
 
 # for /proc/self/mountinfo, only available in 2.6.26 or higher
 Conflicts: kernel < 2.6.26
@@ -105,7 +108,7 @@ for managing disks and storage devices.
 
 %package lvm2
 Summary: udisks2 module for LVM2
-Group: System Environment/Libraries
+Group: system
 Requires: %{name}%{?_isa} = %{version}-%{release}
 License: LGPLv2+
 Requires: lvm2
@@ -117,7 +120,7 @@ This package contains module for LVM2 configuration.
 
 %package zram
 Summary: udisks2 module for ZRAM
-Group: System Environment/Libraries
+Group: system
 Requires: %{name}%{?_isa} = %{version}-%{release}
 License: LGPLv2+
 Requires: libblockdev-kbd >= %{libblockdev_version}
@@ -127,10 +130,24 @@ Requires: libblockdev-swap >= %{libblockdev_version}
 This package contains module for ZRAM configuration.
 
 
+%package bcache
+Summary: udisks2 module for Bcache
+Group: system
+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 bcache
+This package contains module for Bcache configuration.
+
+
 %if 0
 %package vdo
 Summary: udisks2 module for VDO
-Group: System Environment/Libraries
+Group: system
 Requires: %{name}%{?_isa} = %{version}-%{release}
 License: LGPLv2+
 Requires: vdo
@@ -143,7 +160,7 @@ This package contains module for VDO management.
 
 %package devel
 Summary: D-Bus interface definitions for udisks
-Group: Development/Libraries
+Group: programming
 Requires: %{name} = %{version}-%{release}
 
 # See comment above
@@ -154,18 +171,19 @@ D-Bus interface definitions and documentation for udisks.
 
 %package        docs
 Summary:        Documentation for udisks2
-Group:          Documentation
+Group:          documentation
 Requires:       %{name} = %{version}-%{release}
 BuildArch:		noarch
 Provides:       %{name}-doc = %{version}-%{release}
 
-
 %description    docs
 This package contains documentation for udisks2.
 
 
 %prep
 %setup -q -n udisks-%{version}
+sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/"
+
 
 %build
 autoreconf -vif
@@ -174,8 +192,10 @@ autoreconf -vif
 	--enable-lvm2 \
 	--enable-lvmcache \
 	--enable-zram \
+	--enable-bcache \
 	--enable-gtk-doc
-make
+make %{?_smp_mflags}
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -188,31 +208,58 @@ chrpath --delete %{buildroot}/%{_syssbindir}/umount.udisks2
 chrpath --delete %{buildroot}/%{_bindir}/udisksctl
 chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd
 
-mkdir %{buildroot}/run
-
-mkdir -p %{buildroot}/%{_sysconfdir}/udisks2/modules.conf.d
-
-perl -pi \
-	-e 's/modules_load_preference=ondemand/modules_load_preference=onstartup/' \
-	%{buildroot}%{_sysconfdir}/udisks2/udisks2.conf
+mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d
 
 %find_lang %{name}
 
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+
 %post
 /sbin/ldconfig
-udevadm control --reload
-udevadm trigger
+%if %{with systemd}
+%systemd_post udisks2.service
+%endif
+# skip retriggering if udevd isn't even accessible, e.g. containers or
+# rpm-ostree-based systems
+if [ -S /run/udev/control ]; then
+    udevadm control --reload
+    udevadm trigger
+fi
+
+%if %{with systemd}
+%preun
+%systemd_preun udisks2.service
+%endif
+
+%postun
+/sbin/ldconfig
+%if %{with systemd}
+%systemd_postun_with_restart udisks2.service
+%endif
+
+%if %{with systemd}
+%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
 
-%postun -p /sbin/ldconfig
 
 %files -f %{name}.lang
 %defattr(-,root,root,-)
 %license COPYING
-%doc README* AUTHORS NEWS HACKING NEWS
+%doc README.md AUTHORS NEWS HACKING
+%dir %{_sysconfdir}/udisks2
+%dir %{_sysconfdir}/udisks2/modules.conf.d
 %config(noreplace) %{_sysconfdir}/udisks2/udisks2.conf
+%config(noreplace) %{_sysconfdir}/udisks2/mount_options.conf.example
 /lib/udev/rules.d/80-udisks2.rules
 %{_bindir}/udisksctl
 %{_syssbindir}/umount.udisks2
@@ -231,7 +278,10 @@ udevadm trigger
 %{_mandir}/man5/*
 %{_mandir}/man8/*
 %attr(0700,root,root) %dir %{_localstatedir}/lib/udisks2
-%attr(0755,root,root) %dir /run
+%if %{with systemd}
+%{_tmpfilesdir}/%{name}.conf
+%{_unitdir}/udisks2.service
+%endif
 
 %files lvm2
 %{_libdir}/udisks2/modules/libudisks2_lvm2.so
@@ -241,6 +291,13 @@ udevadm trigger
 %dir %{_sysconfdir}/udisks2/modules.conf.d
 %{_libdir}/udisks2/modules/libudisks2_zram.so
 %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy
+%if %{with systemd}
+%{_unitdir}/zram-setup@.service
+%endif
+
+%files bcache
+%{_libdir}/udisks2/modules/libudisks2_bcache.so
+%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy
 
 %if 0
 %files vdo
@@ -252,7 +309,7 @@ udevadm trigger
 %defattr(-,root,root,-)
 %{_includedir}/udisks2
 %{_libdir}/libudisks2.so
-%{_libdir}/pkgconfig/udisks2.pc
+%{_libdir}/pkgconfig/udisks2*.pc
 %{_datadir}/gir-1.0/UDisks-2.0.gir
 
 %files docs
@@ -261,6 +318,10 @@ udevadm trigger
 
 #
 %changelog
+* Tue Aug 11 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.9.0-1
+- new upstream release.
+- added systemd support (disabled as default).
+
 * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.8.4-1
 - new upstream release.