ceph: patch getopt path at build time (#440224)
This commit is contained in:
@@ -45,8 +45,6 @@ let
|
||||
partOf = [ "ceph-${daemonType}.target" ];
|
||||
wantedBy = [ "ceph-${daemonType}.target" ];
|
||||
|
||||
path = [ pkgs.getopt ];
|
||||
|
||||
# Don't start services that are not yet initialized
|
||||
unitConfig.ConditionPathExists = "/var/lib/${stateDirectory}/keyring";
|
||||
startLimitBurst =
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
cunit,
|
||||
e2fsprogs,
|
||||
doxygen,
|
||||
getopt,
|
||||
gperf,
|
||||
graphviz,
|
||||
gnugrep,
|
||||
@@ -518,6 +519,10 @@ stdenv.mkDerivation {
|
||||
substituteInPlace src/client/fuse_ll.cc \
|
||||
--replace-fail "mount -i -o remount" "${util-linux}/bin/mount -i -o remount"
|
||||
|
||||
substituteInPlace src/{ceph-osd-prestart.sh,ceph-post-file.in,init-ceph.in} \
|
||||
--replace-fail "GETOPT=/usr/local/bin/getopt" "GETOPT=${getopt}/bin/getopt" \
|
||||
--replace-fail "GETOPT=getopt" "GETOPT=${getopt}/bin/getopt"
|
||||
|
||||
# The install target needs to be in PYTHONPATH for "*.pth support" check to succeed
|
||||
export PYTHONPATH=$PYTHONPATH:$lib/${sitePackages}:$out/${sitePackages}
|
||||
patchShebangs src/
|
||||
@@ -584,6 +589,10 @@ stdenv.mkDerivation {
|
||||
# silently drop it with misconfigurations.
|
||||
test -f $out/bin/ceph-volume
|
||||
|
||||
# Assert that getopt patch from preConfigure covered all instances
|
||||
! grep -F -r 'GETOPT=getopt' $out
|
||||
! grep -F -r 'GETOPT=/usr/local/bin/getopt' $out
|
||||
|
||||
mkdir -p $client/{bin,etc,${sitePackages},share/bash-completion/completions}
|
||||
cp -r $out/bin/{ceph,.ceph-wrapped,rados,rbd,rbdmap} $client/bin
|
||||
cp -r $out/bin/ceph-{authtool,conf,dencoder,rbdnamer,syn} $client/bin
|
||||
|
||||
Reference in New Issue
Block a user