lvm2: fix mlock Out of memory errors on musl
This commit is contained in:
parent
a4b85e06e5
commit
a74f4d113c
2 changed files with 20 additions and 1 deletions
14
srcpkgs/lvm2/patches/mlockall-default-config.patch
Normal file
14
srcpkgs/lvm2/patches/mlockall-default-config.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- ./lib/config/defaults.h.orig 2017-04-27 18:16:05.879936377 +0200
|
||||
+++ ./lib/config/defaults.h 2017-04-27 18:16:35.141849047 +0200
|
||||
@@ -55,7 +55,11 @@
|
||||
#define DEFAULT_LVMLOCKD_LOCK_RETRIES 3
|
||||
#define DEFAULT_LVMETAD_UPDATE_WAIT_TIME 10
|
||||
#define DEFAULT_PRIORITISE_WRITE_LOCKS 1
|
||||
+#ifdef __GLIBC__
|
||||
#define DEFAULT_USE_MLOCKALL 0
|
||||
+#else
|
||||
+#define DEFAULT_USE_MLOCKALL 1
|
||||
+#endif
|
||||
#define DEFAULT_METADATA_READ_ONLY 0
|
||||
#define DEFAULT_LVDISPLAY_SHOWS_FULL_DEVICE_PATH 0
|
||||
#define DEFAULT_UNKNOWN_DEVICE_NAME "[unknown]"
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'lvm2'
|
||||
pkgname=lvm2
|
||||
version=2.02.170
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="LVM2.${version}"
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
||||
|
@ -26,6 +26,11 @@ checksum=9372d2523027a751cf54eafdf8b761ff843969520c32b0c50abfba65e23d0d40
|
|||
|
||||
post_install() {
|
||||
sed -i 's,use_lvmetad = 1,use_lvmetad = 0,' ${DESTDIR}/etc/lvm/lvm.conf
|
||||
case $XBPS_TARGET_MACHINE in
|
||||
*-musl)
|
||||
sed -i 's,use_mlockall = 0,use_mlockall = 1,' ${DESTDIR}/etc/lvm/lvm.conf
|
||||
;;
|
||||
esac
|
||||
vsv lvmetad
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue