mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #4237 from wanyaoqi/bugfix/wyq/fix-build-host-image
bugfix: find ceph needs libraries
This commit is contained in:
@@ -34,9 +34,9 @@ jobs:
|
||||
make cmd/logger cmd/region cmd/scheduler cmd/webconsole
|
||||
make cmd/yunionconf cmd/glance cmd/torrent cmd/s3gateway
|
||||
make cmd/ansibleserver cmd/cloudnet cmd/notify
|
||||
make cmd/host && ./scripts/bundle-libraries.sh _output/bin/bundles/host _output/bin/host
|
||||
make cmd/host-deployer && ./scripts/bundle-libraries.sh _output/bin/bundles/host-deployer _output/bin/host-deployer
|
||||
make cmd/baremetal-agent && ./scripts/bundle-libraries.sh _output/bin/bundles/baremetal-agent _output/bin/baremetal-agent
|
||||
make cmd/host && ./scripts/bundle_libraries.sh _output/bin/bundles/host _output/bin/host && ./scripts/host_find_libraries.sh _output/bin/bundles/host
|
||||
make cmd/host-deployer && ./scripts/bundle_libraries.sh _output/bin/bundles/host-deployer _output/bin/host-deployer
|
||||
make cmd/baremetal-agent && ./scripts/bundle_libraries.sh _output/bin/bundles/baremetal-agent _output/bin/baremetal-agent
|
||||
make cmd/cloudevent
|
||||
|
||||
- name: Image baremetal-agent
|
||||
|
||||
@@ -432,7 +432,7 @@ func ParseOutput(output []byte) []string {
|
||||
|
||||
func bashOutput(cmd string) ([]string, error) {
|
||||
args := []string{"-c", cmd}
|
||||
output, err := procutils.NewCommand("bash", args...).Output()
|
||||
output, err := procutils.NewCommand("sh", args...).Output()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
|
||||
@@ -37,10 +37,14 @@ build_bin() {
|
||||
GOOS=linux make cmd/$1
|
||||
}
|
||||
|
||||
|
||||
build_bundle_libraries() {
|
||||
for bundle_component in 'host' 'host-deployer' 'baremetal-agent'; do
|
||||
if [ $1 == $bundle_component ]; then
|
||||
$CUR_DIR/bundle-libraries.sh _output/bin/bundles/$1 _output/bin/$1
|
||||
$CUR_DIR/bundle_libraries.sh _output/bin/bundles/$1 _output/bin/$1
|
||||
if [ $bundle_component == 'host' ]; then
|
||||
$CUR_DIR/host_find_libraries.sh _output/bin/bundles/$1
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
add_host_specific_libraries() {
|
||||
for libraries in 'libsoftokn3.so' 'libsqlite3.so.0' 'libfreeblpriv3.so'; do
|
||||
lib_path=""
|
||||
for base_lib_path in '/lib64/' '/lib/' '/usr/lib/x86_64-linux-gnu/' '/lib/x86_64-linux-gnu/'; do
|
||||
if [ ! -e $base_lib_path ]; then
|
||||
continue
|
||||
fi
|
||||
lib_path="$(find $base_lib_path -name $libraries -print -quit)"
|
||||
if [ -z "$lib_path" ]; then
|
||||
continue
|
||||
fi
|
||||
real_lib_path="$(readlink -f $lib_path)"
|
||||
cp $real_lib_path $1/lib/$libraries
|
||||
break
|
||||
done
|
||||
if [ -z "$lib_path" ]; then
|
||||
echo "failed find $libraries ..."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
add_host_specific_libraries $@
|
||||
Reference in New Issue
Block a user