diff --git a/README.md b/README.md index b788b45..cbc41e9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview LXD is a next generation system container manager. It offers a user experience similar to virtual machines but using Linux containers instead. -**Shipped version:** 4.11 +**Shipped version:** 4.12 ## Demo diff --git a/check_process b/check_process index 29c19e5..5fe45d5 100644 --- a/check_process +++ b/check_process @@ -4,6 +4,7 @@ pkg_linter=1 setup_nourl=1 upgrade=1 + upgrade=1 from_commit=cb39602175d6fe3f13335c33c6c9276f7aa980a2 backup_restore=1 ;;; Options Email= diff --git a/conf/lxd.src b/conf/lxd.src index 72873f7..713de01 100644 --- a/conf/lxd.src +++ b/conf/lxd.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/lxc/lxd/releases/download/lxd-4.11/lxd-4.11.tar.gz -SOURCE_SUM=3d70bb0a07b6b343b1ff4b06f62d11147d205b30a808abc13978ea18ebed8fdd +SOURCE_URL=https://github.com/lxc/lxd/releases/download/lxd-4.12/lxd-4.12.tar.gz +SOURCE_SUM=3c5b87eb20e49f11084afb29224b6bad7a69bbdd8eaa99941c106149234bf1e1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index ab90e7b..e0c7130 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,6 +9,8 @@ Environment=LXD_OVMF_PATH=/usr/share/ovmf/x64 ExecStart=/usr/local/bin/__APP__ --group=__APP__ --logfile=/var/log/__APP__/__APP__.log ExecStartPost=/usr/local/bin/__APP__ waitready --timeout=600 ExecStop=/usr/local/bin/__APP__ shutdown +User=root +Group=root TimeoutStartSec=600s TimeoutStopSec=30s Restart=on-failure diff --git a/manifest.json b/manifest.json index 2000228..e260224 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "Offers a user experience similar to virtual machines but using Linux containers instead." }, - "version": "4.11~ynh1", + "version": "4.12~ynh1", "url": "https://example.com", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/backup b/scripts/backup index b6ff79f..3328385 100755 --- a/scripts/backup +++ b/scripts/backup @@ -54,6 +54,7 @@ ynh_backup --src_path="/usr/local/bin/lxc" ynh_backup --src_path="/usr/local/bin/lxd" ynh_backup --src_path="/usr/local/bin/lxc-to-lxd" ynh_backup --src_path="/usr/local/bin/lxd-p2c" +ynh_backup --src_path="/etc/bash_completion.d/lxd-client" ynh_backup --src_path="/etc/dnsmasq.d/lxd" diff --git a/scripts/install b/scripts/install index 382c547..22fc194 100755 --- a/scripts/install +++ b/scripts/install @@ -86,6 +86,7 @@ mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin +cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd ynh_secure_remove --file="$go_tmp" @@ -126,7 +127,8 @@ ynh_store_file_checksum --file="/etc/ld.so.conf.d/$app.conf" ldconfig -echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid +echo "# Added by lxd +root:100000:65536" | tee -a /etc/subuid /etc/subgid #================================================= # GENERIC FINALIZATION diff --git a/scripts/remove b/scripts/remove index 984298f..8a814d4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -76,8 +76,9 @@ ynh_secure_remove --file="/usr/local/bin/lxc" ynh_secure_remove --file="/usr/local/bin/lxd" ynh_secure_remove --file="/usr/local/bin/lxc-to-lxd" ynh_secure_remove --file="/usr/local/bin/lxd-p2c" +ynh_secure_remove --file="/etc/bash_completion.d/lxd-client" -sed -i "/root:1000000:65536 # Added by lxd#/d" /etc/sub{uid,gid} +sed -i "/# Added by lxd$/{N;/root:100000:65536/d}" /etc/sub{u,g}id #================================================= # GENERIC FINALIZATION @@ -93,7 +94,7 @@ ynh_system_user_delete --username=$app # INFO TO REMOVE CONTAINERS #================================================= -ynh_print_warn --message="If you really want to delete all containers and files related to lxd please run \"sudo rm /var/lib/lxd -rf\"" +ynh_print_warn --message="If you really want to delete all containers and files related to lxd please run \"rm /var/lib/lxd -rf\"" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index a060a33..aea4fbd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -83,6 +83,7 @@ ynh_restore_file --origin_path="/usr/local/bin/lxc" ynh_restore_file --origin_path="/usr/local/bin/lxd" ynh_restore_file --origin_path="/usr/local/bin/lxc-to-lxd" ynh_restore_file --origin_path="/usr/local/bin/lxd-p2c" +ynh_restore_file --origin_path="/etc/bash_completion.d/lxd-client" ynh_restore_file --origin_path="/etc/dnsmasq.d/lxd" @@ -92,7 +93,8 @@ ynh_restore_file --origin_path="/etc/ld.so.conf.d/$app.conf" ldconfig -echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid +echo "# Added by lxd +root:100000:65536" | tee -a /etc/subuid /etc/subgid #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index e5b4646..5c9680d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,8 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +sed -i "/root:1000000:65536 # Added by lxd#/d" /etc/sub{u,g}id + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -92,6 +94,7 @@ mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/deps/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ cp ${GOPATH}/bin/{lxc,lxd,lxc-to-lxd,lxd-p2c} /usr/local/bin +cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd ynh_secure_remove --file="$go_tmp" @@ -136,7 +139,8 @@ ynh_store_file_checksum --file="/etc/ld.so.conf.d/$app.conf" ldconfig -echo "root:1000000:65536 # Added by lxd#" | tee -a /etc/subuid /etc/subgid +echo "# Added by lxd +root:100000:65536" | tee -a /etc/subuid /etc/subgid #================================================= # GENERIC FINALIZATION