diff --git a/extra/lvm2/build b/extra/lvm2/build deleted file mode 100755 index ed5bff1d..00000000 --- a/extra/lvm2/build +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -e - -patch -p1 < portability.patch -patch -p1 < fix-stdio-usage.patch - -./configure \ - --prefix=/usr \ - --disable-selinux - -make -make DESTDIR="$1" install - -# Make all libraries and binaries writable. -chmod -v u+w "$1/usr/lib/"* \ - "$1/usr/include/"* \ - "$1/usr/sbin/"* diff --git a/extra/cryptsetup/build b/testing/cryptsetup/build similarity index 100% rename from extra/cryptsetup/build rename to testing/cryptsetup/build diff --git a/extra/cryptsetup/checksums b/testing/cryptsetup/checksums similarity index 100% rename from extra/cryptsetup/checksums rename to testing/cryptsetup/checksums diff --git a/extra/cryptsetup/depends b/testing/cryptsetup/depends similarity index 100% rename from extra/cryptsetup/depends rename to testing/cryptsetup/depends diff --git a/extra/cryptsetup/sources b/testing/cryptsetup/sources similarity index 100% rename from extra/cryptsetup/sources rename to testing/cryptsetup/sources diff --git a/extra/cryptsetup/version b/testing/cryptsetup/version similarity index 100% rename from extra/cryptsetup/version rename to testing/cryptsetup/version diff --git a/extra/libaio/build b/testing/libaio/build similarity index 100% rename from extra/libaio/build rename to testing/libaio/build diff --git a/extra/libaio/checksums b/testing/libaio/checksums similarity index 100% rename from extra/libaio/checksums rename to testing/libaio/checksums diff --git a/extra/libaio/sources b/testing/libaio/sources similarity index 100% rename from extra/libaio/sources rename to testing/libaio/sources diff --git a/extra/libaio/version b/testing/libaio/version similarity index 100% rename from extra/libaio/version rename to testing/libaio/version diff --git a/testing/lvm2/build b/testing/lvm2/build new file mode 100755 index 00000000..d46ed9bc --- /dev/null +++ b/testing/lvm2/build @@ -0,0 +1,43 @@ +#!/bin/sh -e + +patch -p1 < portability.patch +patch -p1 < fix-stdio-usage.patch +patch -p1 < mlockall-default-config.patch +patch -p1 < dash.patch + +# Dummy 'fmt' file. +mkdir -p fakebin +:> fakebin/fmt +chmod +x fakebin/fmt + +export PATH=/usr/bin:$PWD/fakebin +export MKDIR_P="install -d" + +./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-selinux \ + --disable-nls \ + --disable-udev-systemd-background-jobs \ + --enable-pkgconfig \ + --enable-cmdlib \ + --enable-udev_sync \ + --enable-udev_rules \ + --enable-dmeventd \ + --with-cache=none \ + --with-thin=none \ + --with-default-dm-run-dir=/run \ + --with-default-locking-dir=/run/lock/lvm \ + --with-default-pid-dir=/run \ + --with-default-run-dir=/run/lvm \ + CLDFLAGS="$LDFLAGS" + +make +make -j1 DESTDIR="$1" install + +# Make all libraries and binaries writable. +chmod -v u+w "$1/usr/lib/"* \ + "$1/usr/include/"* \ + "$1/usr/bin/"* diff --git a/extra/lvm2/checksums b/testing/lvm2/checksums similarity index 59% rename from extra/lvm2/checksums rename to testing/lvm2/checksums index d4b028ed..5fa2d82a 100644 --- a/extra/lvm2/checksums +++ b/testing/lvm2/checksums @@ -1,3 +1,5 @@ ca52815c999b20c6d25e3192f142f081b93d01f07b9d787e99664b169dba2700 LVM2.2.03.05.tgz -d1f78c5a07f0ba66856e00e498c0f62164cabbcd9f0d9abcda1c25501eb235ff portability.patch +4c7e068efb1734728016cab4cd05f900f21a3e9caf9ff811ba91be1240304bc0 dash.patch a15546fefd675fd6282683e93b41a5350b4e58e090f881b1a2807b44a4a5bd11 fix-stdio-usage.patch +352ec9eff8b5f796b6767cdab6df1cac0f94d37365a33988fdb9bff11f72c547 mlockall-default-config.patch +d1f78c5a07f0ba66856e00e498c0f62164cabbcd9f0d9abcda1c25501eb235ff portability.patch diff --git a/extra/lvm2/depends b/testing/lvm2/depends similarity index 75% rename from extra/lvm2/depends rename to testing/lvm2/depends index 166ccb58..95359853 100644 --- a/extra/lvm2/depends +++ b/testing/lvm2/depends @@ -1,2 +1,3 @@ +eudev libaio util-linux diff --git a/testing/lvm2/file b/testing/lvm2/file new file mode 100644 index 00000000..3b5f57a5 --- /dev/null +++ b/testing/lvm2/file @@ -0,0 +1,91 @@ +execve("/usr/bin/lvdisplay", ["lvdisplay"], ["USER=goldie", "CXXFLAGS=-march=native -pipe -O3", "SHLVL=3", "HOME=/home/goldie", "OLDPWD=/home/goldie/projects/kis"..., "PS1=\342\236\234 ", "FFF_OPENER=opn", "MAKEFLAGS=-j5", "ENV=/home/goldie/.ashrc", "LOGNAME=goldie", "WINDOWID=16777221", "TERM=st-256color", "WINDOWPATH=1", "PATH=/usr/lib/ccache/bin:/home/g"..., "LESSHISTFILE=-", "CFLAGS=-march=native -pipe -O3", "DISPLAY=:0", "SHELL=/bin/sh", "PWD=/home/goldie/projects/kiss-n"..., "TZ=Europe/Athens", "KISS_PATH=/home/goldie/dylan-rep"...]) = 0 +arch_prctl(ARCH_SET_FS, 0x7f1447175d48) = 0 +set_tid_address(0x7f144717631c) = 13829 +open("/etc/ld-musl-x86_64.path", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) +open("/lib/libdevmapper-event.so.1.02", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=1581957, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=64, st_size=31104, st_atime=1567515221 /* 2019-09-03T15:53:41.456220042+0300 */, st_atime_nsec=456220042, st_mtime=1567515202 /* 2019-09-03T15:53:22+0300 */, st_mtime_nsec=0, st_ctime=1567515208 /* 2019-09-03T15:53:28.812219522+0300 */, st_ctime_nsec=812219522}) = 0 +read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260#\0\0\0\0\0\0"..., 960) = 960 +mmap(NULL, 36864, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f14470a8000 +mmap(0x7f14470aa000, 12288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7f14470aa000 +mmap(0x7f14470ad000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x7f14470ad000 +mmap(0x7f14470af000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x7f14470af000 +close(3) = 0 +open("/lib/libdevmapper.so.1.02", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=1581958, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=768, st_size=390920, st_atime=1567515216 /* 2019-09-03T15:53:36.452219836+0300 */, st_atime_nsec=452219836, st_mtime=1567515202 /* 2019-09-03T15:53:22+0300 */, st_mtime_nsec=0, st_ctime=1567515208 /* 2019-09-03T15:53:28.816219522+0300 */, st_ctime_nsec=816219522}) = 0 +read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\320\0\0\0\0\0\0"..., 960) = 960 +mmap(NULL, 397312, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1447047000 +mmap(0x7f1447053000, 241664, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xc000) = 0x7f1447053000 +mmap(0x7f144708e000, 81920, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x47000) = 0x7f144708e000 +mmap(0x7f14470a3000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5b000) = 0x7f14470a3000 +mmap(0x7f14470a7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f14470a7000 +close(3) = 0 +open("/lib/libudev.so.1", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=1575368, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=328, st_size=167272, st_atime=1567496686 /* 2019-09-03T10:44:46.412000860+0300 */, st_atime_nsec=412000860, st_mtime=1567406636 /* 2019-09-02T09:43:56+0300 */, st_mtime_nsec=0, st_ctime=1567406640 /* 2019-09-02T09:44:00.844327756+0300 */, st_ctime_nsec=844327756}) = 0 +read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`Y\0\0\0\0\0\0"..., 960) = 960 +mmap(NULL, 176128, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f144701c000 +mmap(0x7f1447021000, 106496, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x7f1447021000 +mmap(0x7f144703b000, 36864, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x1f000) = 0x7f144703b000 +mmap(0x7f1447044000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x27000) = 0x7f1447044000 +mmap(0x7f1447046000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f1447046000 +close(3) = 0 +open("/lib/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=1573319, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=712, st_size=361200, st_atime=1567496753 /* 2019-09-03T10:45:53.524003621+0300 */, st_atime_nsec=524003621, st_mtime=1567489156 /* 2019-09-03T08:39:16+0300 */, st_mtime_nsec=0, st_ctime=1567489159 /* 2019-09-03T08:39:19.868114295+0300 */, st_ctime_nsec=868114295}) = 0 +read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\256\0\0\0\0\0\0"..., 960) = 960 +mmap(NULL, 364544, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1446fc3000 +mmap(0x7f1446fcd000, 233472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xa000) = 0x7f1446fcd000 +mmap(0x7f1447006000, 65536, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x43000) = 0x7f1447006000 +mmap(0x7f1447017000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x53000) = 0x7f1447017000 +close(3) = 0 +open("/lib/libaio.so.1", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fstat(3, {st_dev=makedev(0x8, 0x1), st_ino=1581939, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=32, st_size=13616, st_atime=1567511483 /* 2019-09-03T14:51:23.364066266+0300 */, st_atime_nsec=364066266, st_mtime=1567488120 /* 2019-09-03T08:22:00+0300 */, st_mtime_nsec=0, st_ctime=1567511454 /* 2019-09-03T14:50:54.540065081+0300 */, st_ctime_nsec=540065081}) = 0 +read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\20\0\0\0\0\0\0"..., 960) = 960 +mmap(NULL, 20480, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1446fbe000 +mmap(0x7f1446fbf000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x7f1446fbf000 +mmap(0x7f1446fc0000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7f1446fc0000 +mmap(0x7f1446fc1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7f1446fc1000 +close(3) = 0 +mprotect(0x7f14470af000, 4096, PROT_READ) = 0 +mprotect(0x7f14470a3000, 4096, PROT_READ) = 0 +mprotect(0x7f1447044000, 4096, PROT_READ) = 0 +mprotect(0x7f1447017000, 16384, PROT_READ) = 0 +mprotect(0x7f1446fc1000, 4096, PROT_READ) = 0 +mprotect(0x7f1447172000, 4096, PROT_READ) = 0 +mprotect(0x55c6a0f59000, 36864, PROT_READ) = 0 +fcntl(2, F_GETFD) = 0 +fcntl(0, F_GETFD) = 0 +fcntl(1, F_GETFD) = 0 +fcntl(2, F_GETFD) = 0 +getppid() = 13826 +open("/proc/13826/cmdline", O_RDONLY) = 3 +read(3, "strace\0-vff\0lvdisplay\0", 31) = 22 +close(3) = 0 +open("/proc/self/fd", O_RDONLY|O_CLOEXEC|O_DIRECTORY) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +getdents64(3, [{d_ino=448581, d_off=1, d_reclen=24, d_type=DT_DIR, d_name="."}, {d_ino=448580, d_off=2, d_reclen=24, d_type=DT_DIR, d_name=".."}, {d_ino=448582, d_off=3, d_reclen=24, d_type=DT_LNK, d_name="0"}, {d_ino=448583, d_off=4, d_reclen=24, d_type=DT_LNK, d_name="1"}, {d_ino=448584, d_off=5, d_reclen=24, d_type=DT_LNK, d_name="2"}, {d_ino=448585, d_off=66, d_reclen=24, d_type=DT_LNK, d_name="3"}], 2048) = 144 +getdents64(3, [], 2048) = 0 +close(3) = 0 +open("/etc/udev/udev.conf", O_RDONLY|O_CLOEXEC) = 3 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +fcntl(3, F_SETFD, FD_CLOEXEC) = 0 +read(3, "# see udev.conf(5) for details\n\n"..., 1024) = 49 +read(3, "", 1024) = 0 +close(3) = 0 +brk(NULL) = 0x55c6a1225000 +brk(0x55c6a1229000) = 0x55c6a1229000 +gettid() = 13829 +getpid() = 13829 +brk(0x55c6a122c000) = 0x55c6a122c000 +fcntl(0, F_GETFD) = 0 +fcntl(0, F_GETFL) = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE) +dup(0) = 3 +close(0) = 0 +dup2(3, 0) = 0 +close(3) = 0 +--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f1447172e10} --- ++++ killed by SIGSEGV +++ +Segmentation fault diff --git a/testing/lvm2/patches/dash.patch b/testing/lvm2/patches/dash.patch new file mode 100644 index 00000000..56adf6ce --- /dev/null +++ b/testing/lvm2/patches/dash.patch @@ -0,0 +1,28 @@ +--- LVM2.2.03.05/configure ++++ LVM2.2.03.05/configure +@@ -3077,7 +3077,7 @@ if test -z "$CFLAGS"; then : + fi + case "$host_os" in + linux*) +- CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym" ++ CLDFLAGS="${CLDFLAGS:-"$LDFLAGS"} -Wl,--version-script,.export.sym" + # equivalent to -rdynamic + ELDFLAGS="-Wl,--export-dynamic" + # FIXME Generate list and use --dynamic-list=.dlopen.sym +@@ -3098,7 +3098,7 @@ case "$host_os" in + ;; + darwin*) + CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" +- CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" ++ CLDFLAGS="${CLDFLAGS:-"$LDFLAGS"}" + ELDFLAGS= + CLDWHOLEARCHIVE="-all_load" + CLDNOWHOLEARCHIVE= +@@ -3111,7 +3111,7 @@ case "$host_os" in + BLKDEACTIVATE=no + ;; + *) +- CLDFLAGS="${CLDFLAGS:"$LDFLAGS"}" ++ CLDFLAGS="${CLDFLAGS:-"$LDFLAGS"}" + ;; + esac diff --git a/extra/lvm2/patches/fix-stdio-usage.patch b/testing/lvm2/patches/fix-stdio-usage.patch similarity index 100% rename from extra/lvm2/patches/fix-stdio-usage.patch rename to testing/lvm2/patches/fix-stdio-usage.patch diff --git a/testing/lvm2/patches/mlockall-default-config.patch b/testing/lvm2/patches/mlockall-default-config.patch new file mode 100644 index 00000000..d741df2e --- /dev/null +++ b/testing/lvm2/patches/mlockall-default-config.patch @@ -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]" diff --git a/extra/lvm2/patches/portability.patch b/testing/lvm2/patches/portability.patch similarity index 100% rename from extra/lvm2/patches/portability.patch rename to testing/lvm2/patches/portability.patch diff --git a/extra/lvm2/sources b/testing/lvm2/sources similarity index 68% rename from extra/lvm2/sources rename to testing/lvm2/sources index 100e2d06..dbc4be56 100644 --- a/extra/lvm2/sources +++ b/testing/lvm2/sources @@ -1,3 +1,5 @@ https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.2.03.05.tgz -patches/portability.patch +patches/dash.patch patches/fix-stdio-usage.patch +patches/mlockall-default-config.patch +patches/portability.patch diff --git a/extra/lvm2/version b/testing/lvm2/version similarity index 100% rename from extra/lvm2/version rename to testing/lvm2/version