1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libreerp_ynh.git synced 2024-09-03 19:36:13 +02:00

[autopatch] Automatic patch attempt for helpers 2.1

This commit is contained in:
Yunohost-Bot 2024-08-31 01:00:51 +02:00 committed by Alexandre Aubin
parent e0d6578f58
commit 24a28148da
14 changed files with 121 additions and 281 deletions

View file

@ -21,7 +21,8 @@ code = "https://github.com/odoo/odoo"
cpe = "cpe:2.3:a:odoo:odoo"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.18"
helpers_version = "2.1"
architectures = "all"
multi_instance = true
ldap = true

View file

@ -1,7 +1,7 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
# COMMON VARIABLES AND CUSTOM HELPERS
#=================================================
appname="libreerp"
@ -17,10 +17,6 @@ else
bin_file="$install_dir/venv/bin/python3 $install_dir/$appname/$FORKNAME-bin"
fi
#=================================================
# PERSONAL HELPERS
#=================================================
function debranding() {
# Remove Odoo references to avoid trademark issue
if [ -d "$install_dir/$appname/$FORKNAME" ]; then
@ -47,12 +43,11 @@ function setup_files() {
debranding
mkdir -p "$install_dir/custom-addons"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:$app" "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:$app" "$install_dir"
touch "/var/log/$app.log"
chown "$app:$app" "/var/log/$app.log"
#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "/var/log/$app.log"
if [ ! -f "$conf_file" ]; then
mkdir -p "$(dirname "$conf_file")"
@ -62,11 +57,11 @@ function setup_files() {
# Autoinstall the LDAP auth module
if [ -f "$install_dir/$appname/$FORKNAME-bin" ]; then
ynh_replace_string --target_file="$install_dir/$appname/addons/auth_ldap/__manifest__.py" \
--match_string="^{$" --replace_string="{'auto_install': True,"
ynh_replace --file="$install_dir/$appname/addons/auth_ldap/__manifest__.py" \
--match="^{$" --replace="{'auto_install': True,"
else
ynh_replace_string --target_file="$install_dir/$appname/addons/auth_ldap/__openerp__.py" \
--match_string="'auto_install': False" --replace_string="'auto_install': True"
ynh_replace --file="$install_dir/$appname/addons/auth_ldap/__openerp__.py" \
--match="'auto_install': False" --replace="'auto_install': True"
fi
fi
}
@ -78,21 +73,21 @@ function setup_database() {
# Load translation
#param=" --without-demo True --addons-path $install_dir/$appname/addons --db_user $app --db_password $db_pwd --db_host 127.0.0.1 --db_port 5432 --db-filter '^$app\$' -d $app "
param=" -c $conf_file -d $app "
ynh_exec_as "$app" $bin_file -c "$conf_file" --stop-after-init -i base -d "$app"
ynh_exec_as "$app" $bin_file -c "$conf_file" --stop-after-init -i auth_ldap -d "$app"
ynh_exec_as "$app" $bin_file -c "$conf_file" --stop-after-init --load-language $lang -d "$app"
ynh_exec_as_app $bin_file -c "$conf_file" --stop-after-init -i base -d "$app"
ynh_exec_as_app $bin_file -c "$conf_file" --stop-after-init -i auth_ldap -d "$app"
ynh_exec_as_app $bin_file -c "$conf_file" --stop-after-init --load-language $lang -d "$app"
# Configure language, timezone and ldap
ynh_exec_as "$app" $bin_file shell -c "$conf_file" -d "$app" <<< \
ynh_exec_as_app $bin_file shell -c "$conf_file" -d "$app" <<< \
"
self.env['res.users'].search([['login', '=', 'admin']])[0].write({'password': '$admin_password'})
self.env.cr.commit()
"
ynh_exec_as "$app" $bin_file shell -c "$conf_file" -d "$app" <<< \
ynh_exec_as_app $bin_file shell -c "$conf_file" -d "$app" <<< \
"
self.write({'tz':'$tz','lang':'$lang'})
self.env.cr.commit()
"
ynh_exec_as "$app" $bin_file shell -c "$conf_file" -d "$app" <<< \
ynh_exec_as_app $bin_file shell -c "$conf_file" -d "$app" <<< \
"
template=env['res.users'].create({
'login':'template',
@ -135,13 +130,9 @@ ynh_configure () {
content3="list_db = False"
fi
ynh_add_config --template="$TEMPLATE" --destination="$DEST"
ynh_config_add --template="$TEMPLATE" --destination="$DEST"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
# Add swap
#
# usage: ynh_add_swap --size=SWAP in Mb
@ -164,7 +155,7 @@ ynh_add_swap () {
# Swap on SD card only if it's is specified
if ynh_is_main_device_a_sd_card && [ "$SD_CARD_CAN_SWAP" == "0" ]
then
ynh_print_warn --message="The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'"
ynh_print_warn "The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'"
return
fi
@ -233,7 +224,3 @@ ynh_is_main_device_a_sd_card () {
return 1
fi
}
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View file

@ -8,44 +8,41 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
ynh_print_info "Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir/$appname"
ynh_backup --src_path="$install_dir/custom-addons"
ynh_backup --src_path="$install_dir/.local"
ynh_backup "$install_dir/$appname"
ynh_backup "$install_dir/custom-addons"
ynh_backup "$install_dir/.local"
ynh_backup --src_path="$conf_file"
ynh_backup "$conf_file"
#=================================================
# BACKUP THE SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/systemd/system/$app.service"
ynh_backup "/etc/systemd/system/$app.service"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/var/log/$app.log"
ynh_backup "/var/log/$app.log"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================
ynh_print_info --message="Backing up the PostgreSQL database..."
ynh_print_info "Backing up the PostgreSQL database..."
ynh_psql_dump_db --database="$db_name" > db.sql
ynh_psql_dump_db > db.sql
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."

View file

@ -1,6 +1,6 @@
#!/bin/bash
source /usr/share/yunohost/helpers
ynh_abort_if_errors
#REMOVEME? ynh_abort_if_errors
CUSTOM_ADDONS=$install_dir/custom-addons
VENV=$install_dir/venv
@ -10,45 +10,45 @@ REQUIREMENTS_TXT=$CUSTOM_REPO/requirements.txt
_setup_git() {
pushd $CUSTOM_ADDONS>/dev/null
ynh_exec_as $app git config --global user.email $app@$(hostname)
ynh_exec_as $app git config --global user.name $app
ynh_exec_as $app git config --global init.defaultBranch main
ynh_exec_as $app git config --global pull.rebase false
ynh_exec_as_app git config --global user.email $app@$(hostname)
ynh_exec_as_app git config --global user.name $app
ynh_exec_as_app git config --global init.defaultBranch main
ynh_exec_as_app git config --global pull.rebase false
popd>/dev/null
}
get__custom_repo() {
_setup_git
if [ -d $CUSTOM_REPO ]; then
echo '"'$(ynh_exec_as $app git -C $CUSTOM_REPO remote get-url origin)'"'
echo '"'$(ynh_exec_as_app git -C $CUSTOM_REPO remote get-url origin)'"'
fi
}
get__custom_branch() {
_setup_git
if [ -d $CUSTOM_REPO ]; then
echo '"'$(ynh_exec_as $app git -C $CUSTOM_REPO rev-parse --abbrev-ref HEAD)'"'
echo '"'$(ynh_exec_as_app git -C $CUSTOM_REPO rev-parse --abbrev-ref HEAD)'"'
fi
}
run__update_code() {
_setup_git
if [ -d $CUSTOM_REPO ]; then
ynh_script_progression --message="Updating custom code"
ynh_script_progression "Updating custom code"
if [ -z "$custom_repo" ]; then
rm -rf $CUSTOM_REPO
else
pushd $CUSTOM_REPO
if [ ! -z "$custom_branch" ]; then
ynh_exec_as $app git -C $CUSTOM_REPO fetch origin $custom_branch
ynh_exec_as $app git -C $CUSTOM_REPO checkout $custom_branch
ynh_exec_as_app git -C $CUSTOM_REPO fetch origin $custom_branch
ynh_exec_as_app git -C $CUSTOM_REPO checkout $custom_branch
fi
ynh_exec_as $app git -C $CUSTOM_REPO reset --hard
ynh_exec_as $app git -C $CUSTOM_REPO pull -X theirs
ynh_exec_as_app git -C $CUSTOM_REPO reset --hard
ynh_exec_as_app git -C $CUSTOM_REPO pull -X theirs
popd
fi
else
ynh_script_progression --message="Installing custom code from $custom_repo"
ynh_script_progression "Installing custom code from $custom_repo"
pushd $CUSTOM_ADDONS
if [ ! -z "$custom_repo" ]; then
if [ ! -z "$custom_branch" ]; then
@ -56,34 +56,34 @@ run__update_code() {
else
CUSTOM_BRANCH=""
fi
ynh_exec_as $app git clone $custom_repo $CUSTOM_REPO $CUSTOM_BRANCH
ynh_exec_as_app git clone $custom_repo $CUSTOM_REPO $CUSTOM_BRANCH
fi
popd
fi
if [ ! -f "$REPOS_YML" ]; then
ynh_print_warn --message="Could not find a repos.yml file in $CUSTOM_REPO"
ynh_print_warn "Could not find a repos.yml file in $CUSTOM_REPO"
else
ynh_script_progression --message="Resetting repos and running gitaggregate"
ynh_script_progression "Resetting repos and running gitaggregate"
pushd $CUSTOM_ADDONS
for GITDIR in $(find $CUSTOM_ADDONS -name .git); do
ynh_exec_as $app git -C $(dirname $GITDIR) reset --hard
ynh_exec_as_app git -C $(dirname $GITDIR) reset --hard
done
ynh_exec_as $app $VENV/bin/pip3 install -U git-aggregator
ynh_exec_as $app $VENV/bin/gitaggregate --force --no-color -c $REPOS_YML
ynh_exec_as_app $VENV/bin/pip3 install -U git-aggregator
ynh_exec_as_app $VENV/bin/gitaggregate --force --no-color -c $REPOS_YML
popd
fi
pushd $CUSTOM_ADDONS
# link addons to custom-addons
for MANIFEST in $(find $CUSTOM_ADDONS -name __manifest__.py); do
ynh_exec_as $app ln -rsnf $(dirname $MANIFEST)
ynh_exec_as_app ln -rsnf $(dirname $MANIFEST)
done
find $CUSTOM_ADDONS -maxdepth 1 -xtype l -delete
popd
if [ -f $REQUIREMENTS_TXT ]; then
ynh_exec_as $app $VENV/bin/pip3 install -Ur $CUSTOM_REPO/requirements.txt
ynh_exec_as_app $VENV/bin/pip3 install -Ur $CUSTOM_REPO/requirements.txt
fi
ynh_script_progression --message="Updating odoo addons and restarting the service"
sudo -u $app $VENV/bin/python $install_dir/libreerp/odoo-bin shell -d $app -c /etc/$app/main.conf --logfile /proc/self/fd/1 <<ODOODOC
ynh_script_progression "Updating odoo addons and restarting the service"
ynh_exec_as_app $VENV/bin/python $install_dir/libreerp/odoo-bin shell -d $app -c /etc/$app/main.conf /proc/self/fd/1 <<ODOODOC
if hasattr(self.env['ir.module.module'], 'upgrade_changed_checksum_shell'):
self.env['ir.module.module'].upgrade_changed_checksum_shell()
else:

View file

@ -17,23 +17,23 @@ preinstall=0
# ADD SWAP
#=================================================
# if [ "${PACKAGE_CHECK_EXEC:-0}" -ne 1 ]; then
# ynh_script_progression --message="Adding swap..." --weight=1
# if ! ynh_in_ci_tests; then
# ynh_script_progression "Adding swap..."
# ynh_add_swap --size=$swap_needed
# fi
#=================================================
# CREATE A POSTGRESQL DATABASE
#=================================================
ynh_script_progression --message="Configuring $app's PostgreSQL database..." --weight=1
ynh_script_progression "Configuring $app's PostgreSQL database..."
# Make sure that its encoding is UTF-8
ynh_psql_execute_as_root --sql="update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '$db_name'"
ynh_psql_db_shell <<< "update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '$db_name'"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..." --weight=1
ynh_script_progression "Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
setup_files
@ -41,10 +41,10 @@ setup_files
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building app..." --weight=1
ynh_script_progression "Building app..."
pushd "$install_dir"
ynh_exec_warn_less ynh_exec_as "$app" \
ynh_hide_warnings ynh_exec_as_app \
RUSTUP_HOME="$install_dir/.rustup" \
CARGO_HOME="$install_dir/.cargo" \
bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y'
@ -62,39 +62,39 @@ pushd "$install_dir"
venv/bin/pip install wheel
venv/bin/pip install -r "$appname/requirements.txt"
fi
ynh_secure_remove --file="$install_dir/.cargo"
ynh_secure_remove --file="$install_dir/.rustup"
ynh_safe_rm "$install_dir/.cargo"
ynh_safe_rm "$install_dir/.rustup"
popd
#=================================================
# SETUP DATABASE
#=================================================
ynh_script_progression --message="Setting up the database..." --weight=1
ynh_script_progression "Setting up the database..."
setup_database
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_config_add_nginx
# Create a dedicated systemd config
ynh_add_systemd_config
ynh_config_add_systemd
yunohost service add "$app" --log="/var/log/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
ynh_script_progression "Starting $app's systemd service..."
# Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app.log"
ynh_systemctl --service="$app" --action="start" --log_path="/var/log/$app.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last
ynh_script_progression "Installation of $app completed"

View file

@ -10,36 +10,36 @@ source /usr/share/yunohost/helpers
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
ynh_script_progression "Removing system configurations related to $app..."
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then
if ynh_hide_warnings yunohost service status "$app" >/dev/null; then
yunohost service remove "$app"
fi
# Remove the dedicated systemd config
ynh_remove_systemd_config
ynh_config_remove_systemd
# Remove the dedicated NGINX config
ynh_remove_nginx_config
ynh_config_remove_nginx
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
ynh_script_progression "Removing various files..."
# Remove a directory securely
ynh_secure_remove --file="/etc/$app"
ynh_safe_rm "/etc/$app"
# Remove the log files
ynh_secure_remove --file="/var/log/$app.log"
#REMOVEME? (Apps should not remove their log dir during remove ... this should only happen if --purge is used, and be handled by the core...) ynh_safe_rm "/var/log/$app.log"
#=================================================
# REMOVE SWAP
#=================================================
# if [ "${PACKAGE_CHECK_EXEC:-0}" -ne 1 ]; then
# ynh_script_progression --message="Removing swap..." --weight=1
# if ! ynh_in_ci_tests; then
# ynh_script_progression "Removing swap..."
# ynh_del_swap
# fi
@ -47,4 +47,4 @@ ynh_secure_remove --file="/var/log/$app.log"
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Removal of $app completed" --last
ynh_script_progression "Removal of $app completed"

View file

@ -12,45 +12,44 @@ source /usr/share/yunohost/helpers
# ADD SWAP
#=================================================
# if [ "${PACKAGE_CHECK_EXEC:-0}" -ne 1 ]; then
# ynh_script_progression --message="Adding swap..." --weight=1
# if ! ynh_in_ci_tests; then
# ynh_script_progression "Adding swap..."
# ynh_add_swap --size=$swap_needed
# fi
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=1
ynh_script_progression "Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir/$appname"
ynh_restore_file --origin_path="$install_dir/custom-addons"
ynh_restore_file --origin_path="$install_dir/.local"
ynh_restore "$install_dir/$appname"
ynh_restore "$install_dir/custom-addons"
ynh_restore "$install_dir/.local"
chmod -R o-rwx "$install_dir"
chown -R "$app:$app" "$install_dir"
ynh_restore_file --origin_path="$conf_file"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:$app" "$install_dir"
ynh_restore "$conf_file"
chmod 400 "$conf_file"
chown "$app:$app" "$conf_file"
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1
ynh_script_progression "Restoring the PostgreSQL database..."
# Make sure that its encoding is UTF-8
ynh_psql_execute_as_root --sql="update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '$db_name'"
ynh_psql_db_shell <<< "update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '$db_name'"
# Restore the database contents
ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql
ynh_psql_db_shell < ./db.sql
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building app..." --weight=1
ynh_script_progression "Building app..."
pushd "$install_dir"
ynh_exec_warn_less ynh_exec_as "$app" \
ynh_hide_warnings ynh_exec_as_app \
RUSTUP_HOME="$install_dir/.rustup" \
CARGO_HOME="$install_dir/.cargo" \
bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y'
@ -68,40 +67,40 @@ pushd "$install_dir"
venv/bin/pip install wheel
venv/bin/pip install -r "$appname/requirements.txt"
fi
ynh_secure_remove --file="$install_dir/.cargo"
ynh_secure_remove --file="$install_dir/.rustup"
ynh_safe_rm "$install_dir/.cargo"
ynh_safe_rm "$install_dir/.rustup"
popd
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_script_progression --message="Restoring various files..." --weight=1
ynh_script_progression "Restoring various files..."
ynh_restore_file --origin_path="/var/log/$app.log"
chown "$app:$app" "/var/log/$app.log"
ynh_restore "/var/log/$app.log"
#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "/var/log/$app.log"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_restore "/etc/systemd/system/$app.service"
systemctl enable "$app.service" --quiet
yunohost service add "$app" --log="/var/log/$app.log"
#=================================================
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_script_progression "Reloading NGINX web server and $app's service..."
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app.log"
ynh_systemctl --service="$app" --action="start" --log_path="/var/log/$app.log"
ynh_systemd_action --service_name=nginx --action=reload
ynh_systemctl --service=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last
ynh_script_progression "Restoration completed for $app"

View file

@ -12,28 +12,28 @@ export preinstall=0
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
ynh_script_progression "Stopping $app's systemd service..."
ynh_systemd_action --service_name="$app" --action="stop" --log_path="/var/log/$app.log"
ynh_systemctl --service="$app" --action="stop" --log_path="/var/log/$app.log"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
# ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# ynh_script_progression "Ensuring downward compatibility..."
#=================================================
# ADD SWAP
#=================================================
# if [ "${PACKAGE_CHECK_EXEC:-0}" -ne 1 ]; then
# ynh_script_progression --message="Adding swap..." --weight=1
# if ! ynh_in_ci_tests; then
# ynh_script_progression "Adding swap..."
# ynh_add_swap --size=$swap_needed
# fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=1
ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
setup_files
@ -41,10 +41,10 @@ setup_files
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building app..." --weight=1
ynh_script_progression "Building app..."
pushd "$install_dir"
ynh_exec_warn_less ynh_exec_as "$app" \
ynh_hide_warnings ynh_exec_as_app \
RUSTUP_HOME="$install_dir/.rustup" \
CARGO_HOME="$install_dir/.cargo" \
bash -c 'curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -q -y'
@ -62,31 +62,31 @@ pushd "$install_dir"
venv/bin/pip install wheel
venv/bin/pip install -r "$appname/requirements.txt"
fi
ynh_secure_remove --file="$install_dir/.cargo"
ynh_secure_remove --file="$install_dir/.rustup"
ynh_safe_rm "$install_dir/.cargo"
ynh_safe_rm "$install_dir/.rustup"
popd
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated NGINX config
ynh_add_nginx_config
ynh_config_add_nginx
# Create a dedicated systemd config
ynh_add_systemd_config
ynh_config_add_systemd
yunohost service add "$app" --log="/var/log/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting $app's systemd service..." --weight=1
ynh_script_progression "Starting $app's systemd service..."
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app.log"
ynh_systemctl --service="$app" --action="start" --log_path="/var/log/$app.log"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of $app completed" --last
ynh_script_progression "Upgrade of $app completed"

View file

@ -1,52 +0,0 @@
diff --cc addons/web_settings_dashboard/static/src/xml/dashboard.xml
index f7b12769459,8509f725f97..00000000000
--- a/addons/web_settings_dashboard/static/src/xml/dashboard.xml
+++ b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
@@@ -134,34 -91,19 +134,20 @@@
<t t-name="DashboardShare">
<div class="text-center o_web_settings_dashboard_share">
- <i class="fa fa-share-alt fa-4x text-muted"/>
- <div class="o_web_settings_dashboard_header">Share the Love</div>
- <div>
- <small class="text-muted text-center o_web_settings_dashboard_compact_subtitle">
- Help us spread the word: Share Odoo's awesomeness with your friends!
- </small>
- </div>
- <div class="row mt16">
- <div class="col-xs-4"><a href="#"><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>
- <div class="col-xs-4"><a href="#"><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>
- <div class="col-xs-4"><a href="#"><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>
- </div>
- <hr/>
<t t-set="server_version" t-value="widget.data.server_version"/>
<t t-set="debug" t-value="widget.data.debug"/>
- <t t-set="demo_active" t-value="widget.data.demo_active"/>
- <div class="text-center">
- <div class="user-heading">
- <h3>
- LibreERP <t t-esc="server_version"/> <i>fork from Odoo CE</i>
- </h3>
- </div>
- <div>
- <div class="tab-content">
- <div role="tabpanel" id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
+ <div class="row">
+ <div class="text-center">
+ <div class="user-heading">
+ <h3>
- Odoo <t t-esc="server_version"/>
- (Community Edition)
++ LibreERP <t t-esc="server_version"/>
+ </h3>
+ </div>
+ <div>
+ <div class="tab-content">
+ <div id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <small>Copyright © 2004-2016 <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a> <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
++ forked from Odoo CE - <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a>
+ </div>
</div>
</div>
</div>

View file

@ -1,13 +0,0 @@
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 20576a168f9..e64f1a5b336 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -93,7 +93,7 @@ var AbstractWebClient = Widget.extend(mixins.ServiceProvider, {
this._current_state = null;
this.menu_dm = new concurrency.DropMisordered();
this.action_mutex = new concurrency.Mutex();
- this.set('title_part', {"zopenerp": "Odoo"});
+ this.set('title_part', {"zopenerp": "LibreERP"});
},
start: function () {
var self = this;

View file

@ -1,13 +0,0 @@
diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml
index 5fa62beb761..124ab72d45a 100644
--- a/addons/web/views/webclient_templates.xml
+++ b/addons/web/views/webclient_templates.xml
@@ -253,7 +253,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
- <title t-esc="title or 'Odoo'"/>
+ <title t-esc="title or 'LibreERP'"/>
<link type="image/x-icon" rel="shortcut icon" t-att-href="x_icon or '/web/static/src/img/favicon.ico'"/>
<script type="text/javascript">

View file

@ -1,40 +0,0 @@
diff --git a/addons/web_settings_dashboard/static/src/xml/dashboard.xml b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
index b8c8f339ebd..8509f725f97 100644
--- a/addons/web_settings_dashboard/static/src/xml/dashboard.xml
+++ b/addons/web_settings_dashboard/static/src/xml/dashboard.xml
@@ -91,33 +91,19 @@
<t t-name="DashboardShare">
<div class="text-center o_web_settings_dashboard_share">
- <i class="fa fa-share-alt fa-4x text-muted" role="img" aria-label="Share" title="Share"/>
- <div class="o_web_settings_dashboard_header">Share the Love</div>
- <div>
- <small class="text-muted text-center o_web_settings_dashboard_compact_subtitle">
- Help us spread the word: Share Odoo's awesomeness with your friends!
- </small>
- </div>
- <div class="row mt16">
- <div class="col-4"><a href="#" aria-label="Twitter" title="Twitter"><i class="fa fa-twitter-square fa-4x tw_share"/></a></div>
- <div class="col-4"><a href="#" aria-label="Facebook" title="Facebook"><i class="fa fa-facebook-square fa-4x fb_share"/></a></div>
- <div class="col-4"><a href="#" aria-label="LinkedIn" title="LinkedIn"><i class="fa fa-linkedin-square fa-4x li_share"/></a></div>
- </div>
- <hr/>
<t t-set="server_version" t-value="widget.data.server_version"/>
<t t-set="debug" t-value="widget.data.debug"/>
<t t-set="demo_active" t-value="widget.data.demo_active"/>
<div class="text-center">
<div class="user-heading">
<h3>
- Odoo <t t-esc="server_version"/>
- (Community Edition)
+ LibreERP <t t-esc="server_version"/>
</h3>
</div>
<div>
<div class="tab-content">
<div role="tabpanel" id="settings" class="tab-pane active text-muted text-center o_web_settings_dashboard_compact_subtitle">
- <small>Copyright © 2004 <a target="_blank" href="https://www.odoo.com" style="text-decoration: underline;">Odoo S.A.</a> <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a></small>
+ forked from Odoo CE - <a target="_blank" href="http://www.gnu.org/licenses/lgpl.html" style="text-decoration: underline;">GNU LGPL Licensed</a>
</div>
</div>
</div>

View file

@ -1,13 +0,0 @@
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js
index 80711fd24ed..1e98bc1d1db 100644
--- a/addons/web/static/src/js/chrome/abstract_web_client.js
+++ b/addons/web/static/src/js/chrome/abstract_web_client.js
@@ -98,7 +98,7 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi
this._current_state = null;
this.menu_dm = new concurrency.DropMisordered();
this.action_mutex = new concurrency.Mutex();
- this.set('title_part', {"zopenerp": "Odoo"});
+ this.set('title_part', {"zopenerp": "LibreERP"});
},
start: function () {
var self = this;

View file

@ -1,13 +0,0 @@
diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml
index cb1184e3565..2b921b9c6d9 100644
--- a/addons/web/views/webclient_templates.xml
+++ b/addons/web/views/webclient_templates.xml
@@ -331,7 +331,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
- <title t-esc="title or 'Odoo'"/>
+ <title t-esc="title or 'LibreERP'"/>
<link type="image/x-icon" rel="shortcut icon" t-att-href="x_icon or '/web/static/src/img/favicon.ico'"/>
<script type="text/javascript">