[packages/lvm2] - up to 2.03.05; build initrd variant with glibc (drop dietlibc and uclibc; pain to maintain these a

arekm arekm at pld-linux.org
Thu Dec 12 18:18:51 CET 2019


commit bac719c66b8a1a41be58caf5b3c5dd78c96a4cbc
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Dec 12 18:18:36 2019 +0100

    - up to 2.03.05; build initrd variant with glibc (drop dietlibc and uclibc; pain to maintain these and we use glibc in initrd already anyway)

 clvmd.service                           |  15 ---
 clvmd.sysconfig                         |   3 -
 device-mapper-dmsetup-deps-export.patch |   8 +-
 device-mapper-dmsetup-export.patch      |   6 +-
 dl-dlsym.patch                          |  18 ---
 lvm2-clvmd_cmd_timeout.patch            |  32 ------
 lvm2-diet.patch                         | 180 -----------------------------
 lvm2-pld_init.patch                     | 144 -----------------------
 lvm2-sd_notify.patch                    |  32 ------
 lvm2.spec                               | 196 +++++---------------------------
 udev-deprecated.patch                   |  29 -----
 11 files changed, 35 insertions(+), 628 deletions(-)
---
diff --git a/lvm2.spec b/lvm2.spec
index d2fc68b..547b9aa 100644
--- a/lvm2.spec
+++ b/lvm2.spec
@@ -6,12 +6,8 @@
 # Conditional build:
 # - initrd stuff
 %bcond_with	initrd		# build initrd version
-%bcond_without	uClibc		# link initrd version with uClibc
-%bcond_with	dietlibc	# link initrd version with dietlibc
-%bcond_with	glibc		# link initrd version with static GLIBC
 # - functionality
-%bcond_without  cluster		# disable all cluster support (clvmd&cmirrord)
-%bcond_without	lvmetad		# lvmetad (and lvmlockd)
+%bcond_without  cluster		# disable all cluster support (cmirrord)
 %bcond_without	lvmdbusd	# lvmdbusd
 %bcond_without	lvmpolld	# lvmpolld (and lvmlockd)
 %bcond_without	lvmlockd	# lvmlockd
@@ -23,27 +19,11 @@
 %bcond_without	python2		# Python 2 binding
 %bcond_without	python3		# Python 3 binding and lvmdbusd
 
-# lvmlockd requires lvmetad and lvmpolld
-%if %{without lvmetad} || %{without lvmpolld}
+# lvmlockd requires lvmpolld
+%if %{without lvmpolld}
 %undefine	with_lvmpolld
 %endif
 
-# only glibc possible on SPARC
-%ifarch sparc sparcv9 sparc64
-%define		with_glibc 1
-%endif
-# if one of the *libc is enabled disable default dietlibc
-%if %{with dietlibc} && %{with uClibc}
-%undefine	with_dietlibc
-%endif
-# with glibc disables default dietlibc
-%if %{with glibc} && %{with dietlibc}
-%undefine	with_dietlibc
-%endif
-# fallback is glibc if neither alternatives are enabled
-%if %{without dietlibc} && %{without uClibc}
-%define		with_glibc	1
-%endif
 # for convenience
 %if %{without python}
 %undefine	with_python2
@@ -56,22 +36,17 @@
 Summary:	The new version of Logical Volume Manager for Linux
 Summary(pl.UTF-8):	Nowa wersja Logical Volume Managera dla Linuksa
 Name:		lvm2
-Version:	2.02.186
-Release:	5
+Version:	2.03.05
+Release:	0.1
 License:	GPL v2 and LGPL v2.1
 Group:		Applications/System
 Source0:	ftp://sourceware.org/pub/lvm2/LVM2.%{version}.tgz
-# Source0-md5:	73e24436171f3022c5e80452295ac792
-Source2:	clvmd.service
-Source3:	clvmd.sysconfig
-Patch1:		%{name}-diet.patch
-Patch2:		device-mapper-dmsetup-export.patch
-Patch3:		%{name}-pld_init.patch
-Patch4:		dl-dlsym.patch
-Patch7:		%{name}-sd_notify.patch
-Patch8:		%{name}-clvmd_cmd_timeout.patch
-Patch9:		device-mapper-dmsetup-deps-export.patch
-Patch11:	%{name}-thin.patch
+# Source0-md5:	22e4a9e66b94bbfcf81444472ed32a2d
+Patch0:		%{name}-build.patch
+Patch1:		device-mapper-dmsetup-export.patch
+Patch2:		%{name}-pld_init.patch
+Patch3:		device-mapper-dmsetup-deps-export.patch
+Patch4:		%{name}-thin.patch
 URL:		http://www.sourceware.org/lvm2/
 BuildRequires:	autoconf >= 2.69
 BuildRequires:	automake
@@ -95,16 +70,9 @@ BuildRequires:	rpmbuild(macros) >= 1.647
 BuildRequires:	systemd-devel >= 1:221
 BuildRequires:	udev-devel >= 1:176
 %if %{with initrd}
-%if %{with dietlibc}
-BuildRequires:	dietlibc-static >= 2:0.32-7
-BuildConflicts:	device-mapper-dietlibc
-%endif
-%if %{with glibc}
 %{?with_selinux:BuildRequires:	libselinux-static}
 %{?with_selinux:BuildRequires:	libsepol-static}
-%endif
-%{?with_glibc:BuildRequires:	glibc-static}
-%{?with_uClibc:BuildRequires:	uClibc-static >= 2:0.9.29}
+BuildRequires:	glibc-static
 %else
 Obsoletes:	lvm2-initrd
 %endif
@@ -136,11 +104,7 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 # causes: undefined reference to `__stack_chk_fail_local'
 %define		filterout_c	-fstack-protector
 
-# for some reason known only to rpm there must be "\\|" not "\|" here
-%define		dietarch	%(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
-%define		dietlibdir	%{_prefix}/lib/dietlibc/lib-%{dietarch}
-
-%define		skip_post_check_so	'.*libdevmapper-event-lvm2.so.*'
+%define		skip_post_check_so	'.*libdevmapper-event-lvm2.so.*' 'liblvm2cmd.so.*'
 
 %description
 This package includes a number of utilities for creating, checking,
@@ -165,22 +129,6 @@ Pakiet ten zawiera narzędzia do tworzenia, sprawdzania i naprawiania
 logicznych wolumenów dyskowych (LVM2) - statycznie skonsolidowane na
 potrzeby initrd.
 
-%package clvmd
-Summary:	Cluster LVM daemon
-Summary(pl.UTF-8):	Demon clustra LVM
-Group:		Applications/System
-Requires:	%{name} = %{version}-%{release}
-
-%description clvmd
-clvmd is the daemon that distributes LVM metadata updates around a
-cluster. It must be running on all nodes in the cluster and will give
-an error if a node in the cluster does not have this daemon running.
-
-%description clvmd -l pl.UTF-8
-clvmd to demon który rozprowadza zmiany meta-danych LVM po klastrze.
-Mysi działać na wszystkich węzłach klastra i zgłosi błąd gdy jakiś
-węzeł w klastrze nie ma tego demona uruchomionego.
-
 %package cmirrord
 Summary:	Cluster mirror log daemon
 Summary(pl.UTF-8):	Demon śledzący log lustrzany w klastrze
@@ -346,19 +294,6 @@ Static devmapper library.
 %description -n device-mapper-static -l pl.UTF-8
 Statyczna biblioteka devmapper.
 
-%package -n device-mapper-dietlibc
-Summary:	Static devmapper library built with dietlibc
-Summary(pl.UTF-8):	Statyczna biblioteka devmapper zbudowana z dietlibc
-License:	LGPL v2.1
-Group:		Development/Libraries
-Requires:	device-mapper-devel = %{version}-%{release}
-
-%description -n device-mapper-dietlibc
-Static devmapper library built with dietlibc.
-
-%description -n device-mapper-dietlibc -l pl.UTF-8
-Statyczna biblioteka devmapper zbudowana z dietlibc.
-
 %package -n device-mapper-initrd
 Summary:	Userspace support for the device-mapper - initrd version
 Summary(pl.UTF-8):	Wsparcie dla mapowania urządzeń w przestrzeni użytkownika - wersja dla initrd
@@ -389,43 +324,29 @@ potrzeby initrd.
 
 %prep
 %setup -q -n LVM2.%{version}
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch11 -p1
 
 # do not force --export-symbol linker option for e.g. statically linked executables
 # -rdynamic compiler option drives linker in the right way.
-%{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.ac
+#%{__sed} -i -e 's#-Wl,--export-dynamic#-rdynamic#g' configure.ac
 
 %build
-%if %{with initrd}
-echo Using %{?with_glibc:GLIBC} %{?with_uClibc:uClibc} %{?with_dietlibc:diet} for initrd
-%endif
 cp -f /usr/share/automake/config.sub autoconf
 %{__aclocal}
 %{__autoconf}
 
 %if %{with initrd}
-%{?with_glibc:export CC="%{__cc}"}
-%{?with_uClibc:export CC="%{_target_cpu}-uclibc-gcc"}
-%{?with_dietlibc:cc="%{__cc}"; export CC="diet ${cc#ccache }"}
 
 %configure \
-	ac_cv_lib_dl_dlopen=no \
-	%{?with_uClibc:ac_cv_func_siginterrupt=no} \
 	%{?debug:--enable-debug} \
 	--disable-nls \
 	--disable-readline \
-	--enable-selinux%{!?with_glibc:=no} \
+	--enable-selinux \
 	--enable-static_link \
 	--with-optimisation="%{rpmcflags} -Os"
-# glibc version links with normal static libdevicemapper which has selinux enabled
-# and we need to keep these in sync between device-mapper and lvm2
 
 %{__sed} -i -e 's#rpl_malloc#malloc#g' lib/misc/configure.h
 %{__sed} -i -e 's#rpl_realloc#realloc#g' lib/misc/configure.h
@@ -434,7 +355,7 @@ cp -f /usr/share/automake/config.sub autoconf
 %{__make} -j1 -C lib LIB_SHARED= VERSIONED_SHLIB= V=1
 %{__make} -j1 -C libdm LIB_SHARED= VERSIONED_SHLIB= V=1
 %{__make} -j1 -C libdaemon/client LIB_SHARED= VERSIONED_SHLIB= V=1
-%{__make} -j1 -C tools dmsetup.static lvm.static %{?with_dietlibc:DIETLIBC_LIBS="-lcompat"} V=1
+%{__make} -j1 -C tools dmsetup.static lvm.static V=1
 %{__mv} tools/lvm.static initrd-lvm
 %{__mv} tools/dmsetup.static initrd-dmsetup
 
@@ -447,7 +368,6 @@ for tool in initrd-lvm initrd-dmsetup; do
 	fi
 done
 
-%{?with_dietlibc:%{__mv} libdm/ioctl/libdevmapper.a diet-libdevmapper.a}
 %{__make} clean
 
 unset CC
@@ -466,7 +386,6 @@ unset CC
 	%{?with_cluster:--enable-lvmlockd-dlm} \
 	%{?with_sanlock:--enable-lvmlockd-sanlock} \
 %endif
-	%{?with_lvmetad:--enable-lvmetad} \
 	--enable-lvmpolld \
 	--enable-ocf \
 	%{?with_python2:--enable-python2_bindings} \
@@ -484,7 +403,6 @@ unset CC
 	--with-cache-restore=/usr/sbin/cache_restore \
 	--with-cluster=internal \
 %if %{with cluster}
-	--with-clvmd=corosync \
 	--enable-cmirrord \
 %endif
 	--with-dmeventd-path=%{_sbindir}/dmeventd \
@@ -514,7 +432,6 @@ unset CC
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig,/var/lock/lvm/subsys}
-%{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
 
 %{__make} install install_system_dirs install_systemd_units install_initscripts install_tmpfiles_configuration \
 	DESTDIR=$RPM_BUILD_ROOT \
@@ -527,11 +444,6 @@ install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/lvm,/etc/sysconfig,/var/lock/
 	DESTDIR=$RPM_BUILD_ROOT \
 	V=1
 
-%if %{with cluster}
-cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/clvmd.service
-cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/clvmd
-%endif
-
 %{__mv} $RPM_BUILD_ROOT%{_libdir}/lib*.so.* $RPM_BUILD_ROOT/%{_lib}
 for lib in $RPM_BUILD_ROOT/%{_lib}/lib*.so.*; do
 	lib=$(echo $lib | sed -e "s#$RPM_BUILD_ROOT##g")
@@ -545,8 +457,6 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/lvm/lvm.conf
 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
 install -p initrd-lvm $RPM_BUILD_ROOT%{_libdir}/initrd/lvm
 install -p initrd-dmsetup $RPM_BUILD_ROOT%{_libdir}/initrd/dmsetup
-
-%{?with_dietlibc:cp -a diet-libdevmapper.a $RPM_BUILD_ROOT%{dietlibdir}/libdevmapper.a}
 %endif
 
 cp -a libdm/libdevmapper.a $RPM_BUILD_ROOT%{_libdir}
@@ -561,9 +471,6 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/chkconfig --add blk-availability
 # no service blk-availability restart
 %systemd_post blk-availability.service
-%if %{with lvmetad}
-%systemd_post lvm2-lvmetad.socket
-%endif
 %if %{with lvmpolld}
 %systemd_post lvm2-lvmpolld.socket
 %endif
@@ -571,9 +478,6 @@ rm -rf $RPM_BUILD_ROOT
 %preun
 %systemd_preun lvm2-monitor.service
 %systemd_preun blk-availability.service
-%if %{with lvmetad}
-%systemd_preun lvm2-lvmetad.socket
-%endif
 %if %{with lvmpolld}
 %systemd_preun lvm2-lvmpolld.socket
 %endif
@@ -605,24 +509,6 @@ fi
 %post	-n device-mapper-libs -p /sbin/ldconfig
 %postun	-n device-mapper-libs -p /sbin/ldconfig
 
-%post clvmd
-/sbin/chkconfig --add clvmd
-# no service restart - it breaks current locks!
-export NORESTART=1
-%systemd_post clvmd.service
-# re-exec instead
-/usr/sbin/clvmd -S 2>/dev/null || :
-
-%preun clvmd
-%systemd_preun clvmd.service
-if [ "$1" = "0" ]; then
-	%service clvmd stop
-	/sbin/chkconfig --del clvmd
-fi
-
-%postun clvmd
-%systemd_reload
-
 %post dbusd
 %systemd_post lvm2-lvmdbusd.service
 
@@ -652,7 +538,7 @@ fi
 %attr(755,root,root) %{_sbindir}/lvdisplay
 %attr(755,root,root) %{_sbindir}/lvextend
 %attr(755,root,root) %{_sbindir}/lvm
-%attr(755,root,root) %{_sbindir}/lvmconf
+#%attr(755,root,root) %{_sbindir}/lvmconf
 %attr(755,root,root) %{_sbindir}/lvmconfig
 %attr(755,root,root) %{_sbindir}/lvmdiskscan
 %attr(755,root,root) %{_sbindir}/lvmdump
@@ -710,7 +596,7 @@ fi
 %{_mandir}/man8/lvm-fullreport.8*
 %{_mandir}/man8/lvm-lvpoll.8*
 %{_mandir}/man8/lvm.8*
-%{_mandir}/man8/lvmconf.8*
+#%{_mandir}/man8/lvmconf.8*
 %{_mandir}/man8/lvmconfig.8*
 %{_mandir}/man8/lvmdiskscan.8*
 %{_mandir}/man8/lvmdump.8*
@@ -760,6 +646,7 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-generic.profile
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/vdo-small.profile
 %{systemdtmpfilesdir}/lvm2.conf
 %{systemdunitdir}/blk-availability.service
 %{systemdunitdir}/lvm2-monitor.service
@@ -771,19 +658,11 @@ fi
 %attr(700,root,root) %dir /run/lvm
 %attr(700,root,root) %dir /var/lock/lvm
 %attr(700,root,root) %dir /var/lock/lvm/subsys
-%if %{with lvmetad}
-%attr(755,root,root) %{_sbindir}/lvmetad
-/lib/udev/rules.d/69-dm-lvm-metad.rules
-%attr(754,root,root) /etc/rc.d/init.d/lvm2-lvmetad
-%{systemdunitdir}/lvm2-lvmetad.service
-%{systemdunitdir}/lvm2-lvmetad.socket
-%{_mandir}/man8/lvmetad.8*
-%endif
 %if %{with lvmlockd}
 %attr(755,root,root) %{_sbindir}/lvmlockctl
 %attr(755,root,root) %{_sbindir}/lvmlockd
-%{systemdunitdir}/lvm2-lvmlockd.service
-%{systemdunitdir}/lvm2-lvmlocking.service
+%{systemdunitdir}/lvmlockd.service
+%{systemdunitdir}/lvmlocks.service
 %{_mandir}/man8/lvmlockctl.8*
 %{_mandir}/man8/lvmlockd.8*
 %endif
@@ -796,17 +675,6 @@ fi
 %endif
 
 %if %{with cluster}
-%files clvmd
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_usrsbindir}/clvmd
-%attr(754,root,root) /etc/rc.d/init.d/clvmd
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/clvmd
-%attr(755,root,root) /lib/systemd/lvm2-cluster-activation
-%{systemdunitdir}/clvmd.service
-%{systemdunitdir}/lvm2-cluster-activation.service
-%{systemdunitdir}/lvm2-clvmd.service
-%{_mandir}/man8/clvmd.8*
-
 %files cmirrord
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_usrsbindir}/cmirrord
@@ -835,15 +703,15 @@ fi
 %if %{with python2}
 %files -n python-lvm
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/lvm.so
-%{py_sitedir}/lvm-%{version}_*-py*.egg-info
+#%attr(755,root,root) %{py_sitedir}/lvm.so
+#%{py_sitedir}/lvm-%{version}_*-py*.egg-info
 %endif
 
 %if %{with python3}
 %files -n python3-lvm
 %defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/lvm.cpython-*.so
-%{py3_sitedir}/lvm-%{version}_*-py*.egg-info
+#%attr(755,root,root) %{py3_sitedir}/lvm.cpython-*.so
+#%{py3_sitedir}/lvm-%{version}_*-py*.egg-info
 %endif
 
 %files -n device-mapper
@@ -855,6 +723,7 @@ fi
 /lib/udev/rules.d/11-dm-lvm.rules
 /lib/udev/rules.d/13-dm-disk.rules
 /lib/udev/rules.d/95-dm-notify.rules
+/lib/udev/rules.d/69-dm-lvm-metad.rules
 %attr(755,root,root) %{_sbindir}/dmeventd
 %attr(755,root,root) %{_sbindir}/dmsetup
 %attr(755,root,root) %{_sbindir}/dmstats
@@ -869,6 +738,7 @@ fi
 %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2snapshot.so
 %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2thin.so
 %attr(755,root,root) %{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so
+%{_mandir}/man7/lvmvdo.7*
 %{_mandir}/man8/dmsetup.8*
 %{_mandir}/man8/dmstats.8*
 %{_mandir}/man8/dmeventd.8*
@@ -878,7 +748,6 @@ fi
 %attr(755,root,root) /%{_lib}/libdevmapper.so.*.*
 %attr(755,root,root) /%{_lib}/libdevmapper-event.so.*.*
 %attr(755,root,root) /%{_lib}/libdevmapper-event-lvm2.so.*.*
-%attr(755,root,root) /%{_lib}/liblvm2app.so.*.*
 %attr(755,root,root) /%{_lib}/liblvm2cmd.so.*.*
 
 %files -n device-mapper-devel
@@ -886,27 +755,18 @@ fi
 %attr(755,root,root) %{_libdir}/libdevmapper.so
 %attr(755,root,root) %{_libdir}/libdevmapper-event.so
 %attr(755,root,root) %{_libdir}/libdevmapper-event-lvm2.so
-%attr(755,root,root) %{_libdir}/liblvm2app.so
 %attr(755,root,root) %{_libdir}/liblvm2cmd.so
 %{_includedir}/libdevmapper.h
 %{_includedir}/libdevmapper-event.h
-%{_includedir}/lvm2app.h
 %{_includedir}/lvm2cmd.h
 %{_pkgconfigdir}/devmapper.pc
 %{_pkgconfigdir}/devmapper-event.pc
-%{_pkgconfigdir}/lvm2app.pc
 
 %files -n device-mapper-static
 %defattr(644,root,root,755)
 %{_libdir}/libdevmapper.a
 
 %if %{with initrd}
-%if %{with dietlibc}
-%files -n device-mapper-dietlibc
-%defattr(644,root,root,755)
-%{dietlibdir}/libdevmapper.a
-%endif
-
 %files -n device-mapper-initrd
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/initrd/dmsetup
diff --git a/clvmd.service b/clvmd.service
deleted file mode 100644
index 2b6ae29..0000000
--- a/clvmd.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=cluster LVM daemon
-After=syslog.target network.target corosync.service dlm.service
-Requires=dlm.service
-
-[Service]
-Type=notify
-NotifyAccess=main
-EnvironmentFile=/etc/sysconfig/clvmd
-ExecStart=/usr/sbin/clvmd -f $CLVMDOPTS
-ExecReload=/usr/sbin/clvmd -R
-TimeoutStartSec=0
-
-[Install]
-WantedBy=multi-user.target
diff --git a/clvmd.sysconfig b/clvmd.sysconfig
deleted file mode 100644
index 99ed4f7..0000000
--- a/clvmd.sysconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-# CLVMDOPTS -- set command line options for clvmd
-# See clvmd man page for list of options.
-CLVMDOPTS="-T30"
diff --git a/device-mapper-dmsetup-deps-export.patch b/device-mapper-dmsetup-deps-export.patch
index fbf59e3..0f59720 100644
--- a/device-mapper-dmsetup-deps-export.patch
+++ b/device-mapper-dmsetup-deps-export.patch
@@ -1,11 +1,11 @@
 ---
- tools/dmsetup.c |   23 +++++++++++++++++++++++
+ libdm/dm-tools/dmsetup.c |   23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)
 
-Index: LVM2.2.02.98/tools/dmsetup.c
+Index: LVM2.2.02.98/libdm/dm-tools/dmsetup.c
 ===================================================================
---- LVM2.2.02.98.orig/tools/dmsetup.c
-+++ LVM2.2.02.98/tools/dmsetup.c
+--- LVM2.2.02.98.orig/libdm/dm-tools/dmsetup.c
++++ LVM2.2.02.98/libdm/dm-tools/dmsetup.c
 @@ -1717,10 +1717,11 @@ static int _export(CMD_ARGS)
  	char *target_type = NULL;
  	char *params;
diff --git a/device-mapper-dmsetup-export.patch b/device-mapper-dmsetup-export.patch
index 0a378b5..90adb66 100644
--- a/device-mapper-dmsetup-export.patch
+++ b/device-mapper-dmsetup-export.patch
@@ -1,6 +1,6 @@
 ---
  man/dmsetup.8.in |    7 ++++
- tools/dmsetup.c  |   88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ libdm/dm-tools/dmsetup.c  |   88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 95 insertions(+)
 
 --- LVM2.2.02.149/man/dmsetup.8_main.orig	2016-04-05 22:16:49.848604442 +0200
@@ -30,8 +30,8 @@
  .CMD_HELP
  .br
  Outputs a summary of the commands available, optionally including
---- LVM2.2.02.181/tools/dmsetup.c.orig	2018-09-07 20:22:51.648299609 +0200
-+++ LVM2.2.02.181/tools/dmsetup.c	2018-09-07 20:26:20.021630562 +0200
+--- LVM2.2.02.181/libdm/dm-tools/dmsetup.c.orig	2018-09-07 20:22:51.648299609 +0200
++++ LVM2.2.02.181/libdm/dm-tools/dmsetup.c	2018-09-07 20:26:20.021630562 +0200
 @@ -2570,6 +2570,93 @@
  	return r;
  }
diff --git a/dl-dlsym.patch b/dl-dlsym.patch
deleted file mode 100644
index db4c9cc..0000000
--- a/dl-dlsym.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- LVM2.2.02.72/lib/commands/toolcontext.c~	2010-07-29 13:21:40.000000000 +0300
-+++ LVM2.2.02.72/lib/commands/toolcontext.c	2010-07-29 13:21:42.552959287 +0300
-@@ -876,6 +876,7 @@
- 	return 1;
- }
- 
-+#ifdef HAVE_LIBDL
- static int _init_single_segtype(struct cmd_context *cmd,
- 				struct segtype_library *seglib)
- {
-@@ -893,6 +894,7 @@
- 
- 	return lvm_register_segtype(seglib, segtype);
- }
-+#endif
- 
- static int _init_segtypes(struct cmd_context *cmd)
- {
diff --git a/lvm2-clvmd_cmd_timeout.patch b/lvm2-clvmd_cmd_timeout.patch
deleted file mode 100644
index ba2b6f8..0000000
--- a/lvm2-clvmd_cmd_timeout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit 8b6c9bb794361c75b0aa96bede8a3f71d1dd663e
-Author: Jacek Konieczny <jajcus at jajcus.net>
-Date:   Wed Dec 12 11:59:42 2012 +0100
-
-    clvmd: command timeout handling fix
-    
-    clvmd would wait for select() to time-out before processing command
-    time-outs. The select timeout would be set to the cmd_timeout ('-t'
-    command-line option) value, which is 60 seconds by default.
-    
-    Normally the select() call is woken up more frequently, so the command
-    time-outs are never processed. This causes LVM tools wait forever on
-    cluster locking for operations started during temporary cluster
-    problems.
-    
-    Signed-off-by: Jacek Konieczny <jajcus at jajcus.net>
-
-diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
-index eb0bffd..2b5d753 100644
---- a/daemons/clvmd/clvmd.c
-+++ b/daemons/clvmd/clvmd.c
-@@ -939,8 +939,8 @@ static void main_loop(int local_sock, int cmd_timeout)
- 			}
- 		}
- 
--		/* Select timed out. Check for clients that have been waiting too long for a response */
--		if (select_status == 0) {
-+		/* Check for clients that have been waiting too long for a response */
-+		if (select_status >= 0) {
- 			time_t the_time = time(NULL);
- 
- 			for (thisfd = &local_client_head; thisfd != NULL;
diff --git a/lvm2-diet.patch b/lvm2-diet.patch
deleted file mode 100644
index 0263961..0000000
--- a/lvm2-diet.patch
+++ /dev/null
@@ -1,180 +0,0 @@
---- LVM2.2.02.45/lib/commands/toolcontext.c	2009-02-22 22:14:38.000000000 +0100
-+++ LVM2.2.02.45-diet/lib/commands/toolcontext.c	2009-03-18 12:18:23.000000000 +0100
-@@ -1006,10 +1006,10 @@
- #ifdef M_MMAP_MAX
- 	mallopt(M_MMAP_MAX, 0);
- #endif
--
-+#ifdef __dietlibc__
- 	if (!setlocale(LC_ALL, ""))
- 		log_very_verbose("setlocale failed");
--
-+#endif
- #ifdef INTL_PACKAGE
- 	bindtextdomain(INTL_PACKAGE, LOCALEDIR);
- #endif
---- LVM2.2.02.45/libdm/libdevmapper.h	2008-11-04 16:07:45.000000000 +0100
-+++ LVM2.2.02.45-diet/libdm/libdevmapper.h	2009-03-18 12:17:27.000000000 +0100
-@@ -160,6 +160,10 @@
- /*
-  * Control read_ahead.
-  */
-+#ifdef __dietlibc__
-+# define UINT32_MAX             (4294967295U)
-+#endif
-+
- #define DM_READ_AHEAD_AUTO UINT32_MAX	/* Use kernel default readahead */
- #define DM_READ_AHEAD_NONE 0		/* Disable readahead */
- 
---- LVM2.2.02.45/lib/config/config.c	2008-11-03 23:14:27.000000000 +0100
-+++ LVM2.2.02.45-diet/lib/config/config.c	2009-03-18 12:22:31.000000000 +0100
-@@ -28,6 +28,10 @@
- #include <ctype.h>
- #include <assert.h>
- 
-+#ifdef __dietlibc__
-+typedef char* caddr_t __attribute_dontuse__;
-+#endif
-+
- struct config_file {
- 	time_t timestamp;
- 	off_t st_size;
---- LVM2.2.02.45/lib/misc/lib.h	2008-11-03 19:59:58.000000000 +0100
-+++ LVM2.2.02.45-diet/lib/misc/lib.h	2009-03-18 12:24:30.000000000 +0100
-@@ -45,4 +45,20 @@
- #include <unistd.h>
- #include <sys/stat.h>
- 
-+#ifdef __dietlibc__
-+# include <strings.h>
-+# include <limits.h>
-+# if __WORDSIZE == 64
-+#  define INT64_C(c)    c ## L
-+# else
-+#  define INT64_C(c)    c ## LL
-+# endif
-+# define UINT32_C(c)    c ## U
-+# if __WORDSIZE == 64
-+#  define UINT64_C(c)   c ## UL
-+# else
-+#  define UINT64_C(c)   c ## ULL
-+# endif
-+#endif
-+
- #endif
---- LVM2.2.02.45/tools/tools.h	2008-11-04 15:57:06.000000000 +0100
-+++ LVM2.2.02.45-diet/tools/tools.h	2009-03-18 12:24:58.000000000 +0100
-@@ -55,6 +55,21 @@
- #include <stdarg.h>
- #include <sys/types.h>
- 
-+#ifdef __dietlibc__
-+# include <limits.h>
-+# if __WORDSIZE == 64
-+#  define INT64_C(c)    c ## L
-+# else
-+#  define INT64_C(c)    c ## LL
-+# endif
-+# define UINT32_C(c)    c ## U
-+# if __WORDSIZE == 64
-+#  define UINT64_C(c)   c ## UL
-+# else
-+#  define UINT64_C(c)   c ## ULL
-+# endif
-+#endif
-+
- #define CMD_LEN 256
- #define MAX_ARGS 64
- 
---- LVM2.2.02.45/lib/report/report.c	2009-02-09 10:45:49.000000000 +0100
-+++ LVM2.2.02.45-diet/lib/report/report.c	2009-03-18 12:45:23.000000000 +0100
-@@ -24,6 +24,11 @@
- #include "str_list.h"
- #include "lvmcache.h"
- 
-+#ifdef __dietlibc__
-+#define __UINT64_C(c) c ## ULL
-+# define UINT64_MAX             (__UINT64_C(18446744073709551615))
-+#endif
-+
- struct lvm_report_object {
- 	struct volume_group *vg;
- 	struct logical_volume *lv;
---- LVM2.2.02.45/tools/dmsetup.c	2008-10-30 18:52:06.000000000 +0100
-+++ LVM2.2.02.45-diet/tools/dmsetup.c	2009-03-18 12:47:46.000000000 +0100
-@@ -40,6 +40,23 @@
- #include <fcntl.h>
- #include <sys/stat.h>
- 
-+#ifdef __dietlibc__
-+# include <limits.h>
-+# if __WORDSIZE == 64
-+#  define INT64_C(c)    c ## L
-+# else
-+#  define INT64_C(c)    c ## LL
-+# endif
-+# define UINT32_C(c)    c ## U
-+# if __WORDSIZE == 64
-+#  define UINT64_C(c)   c ## UL
-+# else
-+#  define UINT64_C(c)   c ## ULL
-+# endif
-+#define canonicalize_file_name(x) realpath(x, NULL)
-+#endif
-+#include <strings.h>
-+
- /* FIXME Unused so far */
- #undef HAVE_SYS_STATVFS_H
-
---- LVM2.2.02.181/tools/Makefile.in.orig	2018-08-02 08:18:51.000000000 +0200
-+++ LVM2.2.02.181/tools/Makefile.in	2018-09-07 20:22:21.481633286 +0200
-@@ -124,13 +124,13 @@
- 
- dmsetup: dmsetup.o $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX)
- 	@echo "    [CC] $@"
--	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-+	$(Q) $(CC) $(CFLAGS) -L$(interfacebuilddir) -L$(top_builddir)/libdm $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
- 	      -o $@ dmsetup.o -ldevmapper $(LIBS)
- 
- dmsetup.static: dmsetup.o $(interfacebuilddir)/libdevmapper.a
- 	@echo "    [CC] $@"
--	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
--	      -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
-+	$(Q) $(CC) $(CFLAGS) -static -L$(interfacebuilddir) $(LDFLAGS) \
-+	      -o $@ dmsetup.o -ldevmapper $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS) $(DIETLIBC_LIBS)
- 
- all: device-mapper
- 
-@@ -140,7 +140,7 @@
- 
- lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a
- 	@echo "    [CC] $@"
--	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
-+	$(Q) $(CC) $(CFLAGS) -L$(interfacebuilddir) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
- 		$(LVMLIBS) $(READLINE_LIBS) $(LIBS)
- 
- DEFS_man-generator.o += -DMAN_PAGE_GENERATOR
-@@ -160,7 +160,7 @@
- lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a  $(interfacebuilddir)/libdevmapper.a
- 	@echo "    [CC] $@"
- 	$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
--	      $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)
-+	      $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) $(PTHREAD_LIBS) $(DIETLIBC_LIBS)
- 
- liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
- 	@echo "    [AR] $@"
---- LVM2.2.02.75/lib/metadata/pv.c.orig	2010-09-30 22:47:18.000000000 +0200
-+++ LVM2.2.02.75/lib/metadata/pv.c	2010-11-06 12:05:40.672884033 +0100
-@@ -17,6 +17,12 @@
- #include "metadata.h"
- #include "lvmcache.h"
- 
-+#ifdef __dietlibc__
-+# ifndef UINT64_MAX
-+#  define UINT64_MAX             __UINT64_MAX__
-+# endif
-+#endif
-+
- /*
-  * FIXME: Check for valid handle before dereferencing field or log error?
-  */
diff --git a/lvm2-pld_init.patch b/lvm2-pld_init.patch
index 5f64a85..3c10ec9 100644
--- a/lvm2-pld_init.patch
+++ b/lvm2-pld_init.patch
@@ -38,94 +38,6 @@
 +	exit 3
  	;;
  esac
---- LVM2.2.02.181/scripts/clvmd_init_red_hat.in.orig	2018-09-07 20:29:42.941628244 +0200
-+++ LVM2.2.02.181/scripts/clvmd_init_red_hat.in	2018-09-07 20:42:59.688285818 +0200
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #
- # clvmd - Clustered LVM Daemon init script
- #
-@@ -61,9 +61,8 @@
- start()
- {
- 	if ! rh_status_q; then
--		echo -n "Starting $DAEMON: "
-+		msg_starting "$DAEMON"
- 		"$usrsbindir/$DAEMON" $CLVMDOPTS || return $?
--		echo
- 	fi
- 
- 	# Refresh local cache.
-@@ -83,7 +82,7 @@
- 
- 	"$lvm_vgscan" > /dev/null 2>&1
- 
--	action "Activating VG(s):" "$lvm_vgchange" -aay $LVM_VGS || return $?
-+	run_cmd "Activating VG(s):" "$lvm_vgchange" -aay $LVM_VGS || return $?
- 
- 	touch "$LOCK_FILE"
- 
-@@ -108,27 +107,23 @@
- 
- 	[ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
- 	if [ -n "$LVM_VGS" ]; then
--		action "Deactivating clustered VG(s):" "$lvm_vgchange" -anl $LVM_VGS || return $?
-+		run_cmd "Deactivating clustered VG(s):" "$lvm_vgchange" -anl $LVM_VGS || return $?
- 	fi
- 
--	action "Signaling $DAEMON to exit" kill -TERM "$(pidofproc "$DAEMON")" || return $?
-+	run_cmd "Signaling $DAEMON to exit" kill -TERM "$(pidofproc "$DAEMON")" || return $?
- 
- 	# wait half second before we start the waiting loop or we will show
- 	# the loop more time than really necessary
- 	usleep 500000
- 
- 	# clvmd could take some time to stop
--	rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
-+	rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
- 
- 	if rh_status_q; then
--		echo -n "$DAEMON failed to exit"
--		failure
--		echo
-+		fail
- 		return 1
- 	else
--		echo -n "$DAEMON terminated"
--		success
--		echo
-+		ok
- 	fi
- 
- 	rm -f "$LOCK_FILE"
-@@ -138,7 +133,7 @@
- 
- reload() {
- 	rh_status_q || exit 7
--	action "Reloading $DAEMON configuration: " "$usrsbindir/$DAEMON" -R || return $?
-+	run_cmd "Reloading $DAEMON configuration: " "$usrsbindir/$DAEMON" -R || return $?
- }
- 
- restart() {
-@@ -149,7 +144,7 @@
- 
- 	# Try to get clvmd to restart itself. This will preserve 
- 	# exclusive LV locks
--	action "Restarting $DAEMON: " "$usrsbindir/$DAEMON" -S
-+	run_cmd "Restarting $DAEMON: " "$usrsbindir/$DAEMON" -S
- 
- 	# If that fails then do a normal stop & restart
- 	if  [ $? != 0 ]; then
-@@ -206,7 +201,7 @@
- 	;;
- 
-   *)
--	echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
-+	msg_usage "$0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- 	rtrn=2
- 	;;
- esac
 --- LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in.orig	2018-08-02 08:18:51.000000000 +0200
 +++ LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in	2018-09-07 21:12:38.944932161 +0200
 @@ -1,4 +1,4 @@
@@ -186,62 +98,6 @@
  ExecStop=@SBINDIR@/blkdeactivate -u -l wholevg -m disablequeueing -r wait
  RemainAfterExit=yes
  
---- LVM2.2.02.181/scripts/lvm2_lvmetad_init_red_hat.in.orig	2018-08-02 08:18:51.000000000 +0200
-+++ LVM2.2.02.181/scripts/lvm2_lvmetad_init_red_hat.in	2018-09-07 21:30:09.964920166 +0200
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #
- # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
- #
-@@ -31,7 +31,7 @@
- #                    subsequent LVM commands or while using lvm2app library.
- ### END INIT INFO
- 
--. /etc/init.d/functions
-+. /etc/rc.d/init.d/functions
- 
- DAEMON=lvmetad
- 
-@@ -51,14 +51,15 @@
- start()
- {
- 	ret=0
--	action "Starting LVM metadata daemon:" "$sbindir/$DAEMON" || ret=$?
-+	run_cmd "Starting LVM metadata daemon:" "$sbindir/$DAEMON" || ret=$?
- 	return $ret
- }
- 
- stop()
- {
- 	ret=0
--	action "Signaling LVM metadata daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
-+	msg_stopping "LVM metadata daemon"
-+	killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
- 	return $ret
- }
- 
-@@ -78,9 +79,10 @@
- 	stop
- 	rtrn=$?
- 	[ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
-+	exit 0
- 	;;
- 
--  restart)
-+  restart|force-reload)
- 	if stop
- 	then
- 		start
-@@ -103,7 +105,7 @@
- 	;;
- 
-   *)
--	echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
-+	msg_usage "$0 {start|stop|force-stop|restart|force-reload|condrestart|try-restart|status}"
- 	;;
- esac
- 
 --- LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in.orig	2019-09-23 21:36:48.727591492 +0200
 +++ LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in	2019-09-23 21:39:51.961644240 +0200
 @@ -1,4 +1,4 @@
diff --git a/lvm2-sd_notify.patch b/lvm2-sd_notify.patch
deleted file mode 100644
index 2dbfbe0..0000000
--- a/lvm2-sd_notify.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -dur LVM2.2.02.98.orig/daemons/clvmd/Makefile.in LVM2.2.02.98/daemons/clvmd/Makefile.in
---- LVM2.2.02.98.orig/daemons/clvmd/Makefile.in	2012-10-15 16:24:58.000000000 +0200
-+++ LVM2.2.02.98/daemons/clvmd/Makefile.in	2012-11-01 18:35:19.000000000 +0100
-@@ -90,6 +90,8 @@
- DEFS += -D_REENTRANT
- CFLAGS += -fno-strict-aliasing
- 
-+LIBS += `pkg-config --libs libsystemd`
-+
- INSTALL_TARGETS = \
- 	install_clvmd
- 
-diff -dur LVM2.2.02.98.orig/daemons/clvmd/clvmd.c LVM2.2.02.98/daemons/clvmd/clvmd.c
---- LVM2.2.02.98.orig/daemons/clvmd/clvmd.c	2012-10-15 16:24:58.000000000 +0200
-+++ LVM2.2.02.98/daemons/clvmd/clvmd.c	2012-11-01 18:34:20.000000000 +0100
-@@ -41,6 +41,8 @@
- #include <sys/un.h>
- #include <sys/utsname.h>
- 
-+#include <systemd/sd-daemon.h>
-+
- #ifndef TRUE
- #define TRUE 1
- #endif
-@@ -599,6 +601,7 @@
- 		clops->cluster_init_completed();
- 
- 	DEBUGLOG("clvmd ready for work\n");
-+	sd_notify(0, "READY=1");
- 	child_init_signal(SUCCESS);
- 
- 	/* Try to shutdown neatly */
diff --git a/udev-deprecated.patch b/udev-deprecated.patch
deleted file mode 100644
index f2a26bf..0000000
--- a/udev-deprecated.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- LVM2.2.02.95/lib/misc/lvm-wrappers.c~	2011-04-22 14:00:00.000000000 +0200
-+++ LVM2.2.02.95/lib/misc/lvm-wrappers.c	2012-06-02 17:13:13.996363539 +0200
-@@ -72,7 +72,7 @@
- 		return NULL;
- 	}
- 
--	return udev_get_dev_path(_udev);
-+	return "/dev";
- }
- 
- struct udev* udev_get_library_context(void)
---- LVM2.2.02.95/tools/dmsetup.c~	2012-06-02 17:11:33.999700397 +0200
-+++ LVM2.2.02.95/tools/dmsetup.c	2012-06-02 17:18:14.323019614 +0200
-@@ -1047,12 +1047,11 @@
- 			  " defined by --udevcookie option.",
- 			  _udev_cookie);
- 
--	if (!(udev = udev_new()) ||
--	    !(udev_dev_dir = udev_get_dev_path(udev)) ||
--	    !*udev_dev_dir) {
--		log_error("Could not get udev dev path.");
-+	if (!(udev = udev_new())) {
-+		log_error("Could not get udev.");
- 		return 0;
- 	}
-+	udev_dev_dir = "/dev";
- 	udev_dev_dir_len = strlen(udev_dev_dir);
- 
- 	/*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lvm2.git/commitdiff/bac719c66b8a1a41be58caf5b3c5dd78c96a4cbc



More information about the pld-cvs-commit mailing list