1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lxd_ynh.git synced 2024-09-03 19:45:53 +02:00

Merge pull request #177 from YunoHost-Apps/testing

6.1
This commit is contained in:
Kayou 2024-07-14 21:45:35 +02:00 committed by GitHub
commit 53863ecae0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 14 deletions

View file

@ -7,7 +7,7 @@ name = "LXD"
description.en = "Offers a user experience similar to virtual machines but using Linux containers instead." description.en = "Offers a user experience similar to virtual machines but using Linux containers instead."
description.fr = "Offre une expérience utilisateur similaire aux machines virtuelles mais en utilisant des conteneurs Linux à la place." description.fr = "Offre une expérience utilisateur similaire aux machines virtuelles mais en utilisant des conteneurs Linux à la place."
version = "5.21.1~ynh1" version = "6.1~ynh1"
maintainers = ["kay0u"] maintainers = ["kay0u"]
@ -43,11 +43,13 @@ ram.runtime = "500M"
armhf.url = "https://go.dev/dl/go1.21.5.linux-armv6l.tar.gz" armhf.url = "https://go.dev/dl/go1.21.5.linux-armv6l.tar.gz"
armhf.sha256 = "837f4bf4e22fcdf920ffeaa4abf3d02d1314e03725431065f4d44c46a01b42fe" armhf.sha256 = "837f4bf4e22fcdf920ffeaa4abf3d02d1314e03725431065f4d44c46a01b42fe"
[resources.sources.lxd] [resources.sources.main]
url = "https://github.com/canonical/lxd/releases/download/lxd-5.21.1/lxd-5.21.1.tar.gz" url = "https://github.com/canonical/lxd/releases/download/lxd-6.1/lxd-6.1.tar.gz"
sha256 = "f148aa7e1fc31f6cef3038e141e9bd03787274ffc506b97376d758abf1a93cb7" sha256 = "ef073f19b5e666f306232d7c086ec1f39bbc14672237f2fd7b65d259caead1b9"
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_release"
autoupdate.asset = "^lxd-.*.tar.gz$" autoupdate.asset = "^lxd-.*.tar.gz$"
autoupdate.version_regex = "^lxd-(.*)$"
[resources.system_user] [resources.system_user]

View file

@ -16,7 +16,7 @@ ynh_script_progression --message="Setting up source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --source_id="go" --dest_dir="$install_dir/go" ynh_setup_source --source_id="go" --dest_dir="$install_dir/go"
ynh_setup_source --source_id="lxd" --dest_dir="$install_dir/lxd" ynh_setup_source --source_id="main" --dest_dir="$install_dir/lxd"
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
@ -32,16 +32,16 @@ pushd "$install_dir/lxd"
export HOME=${HOME:-"/root/"} export HOME=${HOME:-"/root/"}
ynh_exec_warn_less make deps ynh_exec_warn_less make deps
export CGO_CFLAGS="-I${GOPATH}/raft/include/ -I${GOPATH}/dqlite/include/" export CGO_CFLAGS="-I${GOPATH}dqlite/include/"
export CGO_LDFLAGS="-L${GOPATH}/raft/.libs -L${GOPATH}/dqlite/.libs/" export CGO_LDFLAGS="-L${GOPATH}dqlite/.libs/"
export LD_LIBRARY_PATH="${GOPATH}/raft/.libs/:${GOPATH}/dqlite/.libs/" export LD_LIBRARY_PATH="${GOPATH}dqlite/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
ynh_exec_warn_less make ynh_exec_warn_less make
mkdir -p /usr/local/lib/$app mkdir -p /usr/local/lib/$app
mkdir -p /var/log/$app mkdir -p /var/log/$app
cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp -a ${GOPATH}/dqlite/.libs/lib*.so* /usr/local/lib/$app/
cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin
cp $install_dir/lxd/scripts/bash/lxd-client /etc/bash_completion.d/ cp $install_dir/lxd/scripts/bash/lxd-client /etc/bash_completion.d/
) )

View file

@ -41,7 +41,7 @@ ynh_setup_source --source_id="go" --dest_dir="$install_dir/go" --full_replace=1
export PATH="$install_dir/go/bin:$PATH" export PATH="$install_dir/go/bin:$PATH"
ynh_setup_source --source_id="lxd" --dest_dir="$install_dir/lxd" --full_replace=1 ynh_setup_source --source_id="main" --dest_dir="$install_dir/lxd" --full_replace=1
export GOPATH="$install_dir/lxd/vendor/" export GOPATH="$install_dir/lxd/vendor/"
@ -56,16 +56,16 @@ pushd "$install_dir/lxd"
export HOME=${HOME:-"/root/"} export HOME=${HOME:-"/root/"}
ynh_exec_warn_less make deps ynh_exec_warn_less make deps
export CGO_CFLAGS="-I${GOPATH}/raft/include/ -I${GOPATH}/dqlite/include/" export CGO_CFLAGS="-I${GOPATH}dqlite/include/"
export CGO_LDFLAGS="-L${GOPATH}/raft/.libs -L${GOPATH}/dqlite/.libs/" export CGO_LDFLAGS="-L${GOPATH}dqlite/.libs/"
export LD_LIBRARY_PATH="${GOPATH}/raft/.libs/:${GOPATH}/dqlite/.libs/" export LD_LIBRARY_PATH="${GOPATH}dqlite/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
ynh_exec_warn_less make ynh_exec_warn_less make
mkdir -p /usr/local/lib/$app mkdir -p /usr/local/lib/$app
mkdir -p /var/log/$app mkdir -p /var/log/$app
cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp -a ${GOPATH}/dqlite/.libs/lib*.so* /usr/local/lib/$app/
cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin
cp $install_dir/lxd/scripts/bash/lxd-client /etc/bash_completion.d/ cp $install_dir/lxd/scripts/bash/lxd-client /etc/bash_completion.d/
popd popd