ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
63 stars 60 forks source link

zkey and zkey-cryptsetup relinked during "make install" #46

Closed sharkcz closed 5 years ago

sharkcz commented 5 years ago

The zkey and zkey-cryptsetup tools are relinked during "make install" using a default rule, so the distro LDFLAGS are not passed to it. Commit 0bf4f1b957983267ccaf9b6b70c68c62bf1471f2 has no effect on it.

...
make -C zkey TOPDIR= ARCH=s390x install ;
make[1]: Vstupuje se do adresáře „/home/sharkcz/projects/s390-tools/zkey“
gcc -MM -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  keystore.c > .keystore.o.d
gcc -MM -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  pkey.c > .pkey.o.d
gcc -MM -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  zkey.c > .zkey.o.d
gcc -MM -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  zkey-cryptsetup.c > .zkey-cryptsetup.o.d
gcc -MM -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  properties.c > .properties.o.d
for dir in /usr/sbin /usr/bin /sbin /lib /usr/share/man /etc /etc/sysconfig /lib/s390-tools /usr/share/s390-tools /lib/s390-tools/zfcpdump ; do \
    test -d /tmp/s/$dir || install -g sharkcz -o sharkcz -d /tmp/s/$dir; \
done
for i in 1 2 3 4 5 6 7 8; do \
    test -d /tmp/s//usr/share/man/man$i || install -g sharkcz -o sharkcz \
    -d /tmp/s//usr/share/man/man$i; \
done
printf "#include <%s>\n int main(void) {return 0;}"  "openssl/evp.h" | ( gcc -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3 -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT  -o /dev/null -xc - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zkey"  "openssl/evp.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zkey" >&2; printf "* Install package..............: %-45s *\n"  "openssl-devel" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_OPENSSL=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
gcc -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  -c properties.c -o properties.o
make -C ..//libutil/ libutil.a
make[2]: Vstupuje se do adresáře „/home/sharkcz/projects/s390-tools/libutil“
make[2]: „libutil.a“ je aktuální.
make[2]: Opouští se adresář „/home/sharkcz/projects/s390-tools/libutil“
gcc -rdynamic zkey.o pkey.o properties.o keystore.o ..//libutil/libutil.a -ldl -lcrypto -o zkey
printf "#include <%s>\n int main(void) {return 0;}"  "detect-libcryptsetup.h" | ( gcc -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3 -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT  "-I." -o /dev/null -xc - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zkey-cryptsetup"  "detect-libcryptsetup.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zkey-cryptsetup" >&2; printf "* Install package..............: %-45s *\n"  "cryptsetup-devel version 2.0.3" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_CRYPTSETUP2=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
printf "#include <%s>\n int main(void) {return 0;}"  "json-c/json.h" | ( gcc -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3 -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT  -o /dev/null -xc - ) > /dev/null 2>&1; if [ $? != 0 ]; then printf "  REQCHK  %s (%s)\n"  "zkey-cryptsetup"  "json-c/json.h"; printf "********************************************************************************\n" >&2; printf "* Missing build requirement for: %-45s *\n"  "zkey-cryptsetup" >&2; printf "* Install package..............: %-45s *\n"  "json-c-devel" >&2; printf "* You can skip build with......: make %-40s *\n"  "HAVE_JSONC=0" >&2; printf "********************************************************************************\n" >&2; exit 1; fi
gcc -I ../include -D_GNU_SOURCE -DHAVE_LUKS2_SUPPORT -DS390_TOOLS_RELEASE=2.6.0-build-20181016 -DS390_TOOLS_LIBDIR=/lib/s390-tools -DS390_TOOLS_DATADIR=/usr/share/s390-tools -DS390_TOOLS_SYSCONFDIR=/etc -DS390_TOOLS_BINDIR=/sbin -g -rdynamic -fstack-protector-all -W -Wall -Wformat-security -O3  -c zkey-cryptsetup.c -o zkey-cryptsetup.o
gcc -rdynamic zkey-cryptsetup.o pkey.o ..//libutil/libutil.a -ldl -lcryptsetup -ljson-c -o zkey-cryptsetup
install -d -m 755 /tmp/s//usr/bin
install -d -m 755 /tmp/s//usr/share/man/man1
install -g sharkcz -o sharkcz -m 755 zkey /tmp/s//usr/bin
install -m 644 -c zkey.1 /tmp/s//usr/share/man/man1
install -d -m 770 /tmp/s//etc/zkey
install -d -m 770 /tmp/s//etc/zkey/repository
install -g sharkcz -o sharkcz -m 755 zkey-cryptsetup /tmp/s//usr/bin
install -m 644 -c zkey-cryptsetup.1 /tmp/s//usr/share/man/man1
make[1]: Opouští se adresář „/home/sharkcz/projects/s390-tools/zkey“
...
hoeppnerj commented 5 years ago

Thanks for reporting!

sharkcz commented 5 years ago

Thanks for fixing the main issue. What remains is that the *.o.d source/header dependency files are still regenerated during install, I haven't seen it for other dirs than zkey.