I packaged a new app (mygpo), would like testing and feedback

,

Mygpo is the backend behind https://gpodder.net. It allows you to sync your podcast feeds between compatible applications.

I’ve just packaged it for Yunohost. As this is my first time packaging an app, I would like some testing and feedback. Notably, I haven’t been able to get backups to work; the backup fails with Invalid argument: --. This means that restore and change_url are also untested. The app is also totally untested on ARM.

This app requires a dedicated root domain.


Mygpo est le service derrière https://gpodder.net. Il permet de synchroniser ses flux balado entre applis compatibles.

Je l’ai packagé pour Yunohost. C’est la première fois que je package une appli, donc j’aimerais bien avoir des tests et des conseils. Surtout, je narrive pas a faire marcher les backups; ça plante a chaque fois avec une erreur Invalid argument: --. Donc je n’ai pas non plus testé le restore ou le change_url. Je n’ai pas non plus testé l’installation sur ARM.

Il faut un domaine dedié pour installer cette application.

We need complete log and the command you call to do the backup to help on that. You can get debug info by running command with --debug option.

You should ask for integrating your app in YunoHost-Apps organization, like that you will be able to run automatic test from our CI YunoRunner for CI just by adding a comment on a PR with “!testme” or “!gogogadgetoci”. This CI is able to test a lot of aspect of your package.

Note, you can also run the linter by yourself : GitHub - YunoHost/package_linter: Linter for YunoHost applications packages

Hello, thanks for the feedback! I’ve already run the linter and fixed all the issues it found, except for a message
Using ynh_script_progression --time should only be for calibrating the weight (c.f. --weight). It's not meant to be kept for production versions.
I’m not sure what that is supposed to mean.

Backup log:

57   initializing base actions map parser for cli
58   loading actions map namespace 'yunohost'
65   building parser...
67   building parser took 0.002s
67   acquiring lock...
80   lock has been acquired
100  loading python module yunohost.backup took 0.020s
100  processing action [12204.1]: yunohost.backup.create with args={'methods': None, 'description': None, 'apps': ['mygpo'], 'system': None, 'output_directory': None, 'name': None}
101  Collecting files to be backed up for mygpo...
107  Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_CWD=/home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup YNH_APP_MANIFEST_VERSION='2.11.0~ynh1' YNH_BACKUP_CSV=/tmp/backupcsv_BYhjKu YNH_BACKUP_DIR=/home/yunohost.backup/tmp/20210315-152150 YNH_APP_INSTANCE_NAME=mygpo YNH_STDRETURN=/tmp/tmpNHpm5P/stdreturn YNH_APP_BACKUP_DIR=/home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup YNH_STDINFO=/tmp/tmpE46ME9/stdinfo YNH_INTERFACE=cli YNH_APP_ID=mygpo BASH_XTRACEFD=7 /bin/bash -x "/tmp/backup_Rv1rBn" /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup mygpo 7>&1'
113  + source ../settings/scripts/_common.sh
113  ++ pkg_dependencies='python3 python3-pip python3-venv postgresql postgresql-contrib libpq-dev redis-server'
113  + source /usr/share/yunohost/helpers
114  +++ set +o
114  +++ grep xtrace
114  ++ readonly 'XTRACE_ENABLE=set -o xtrace'
114  ++ XTRACE_ENABLE='set -o xtrace'
114  ++ set +x
214  + ynh_abort_if_errors
214  Loading installation settings...
214  + set -o errexit
214  + set -o nounset
215  + trap ynh_exit_properly EXIT
215  + ynh_print_info '--message=Loading installation settings...'
215  + local legacy_args=m
215  + args_array=([m]=message=)
215  + local -A args_array
215  + local message
215  + ynh_handle_getopts_args '--message=Loading installation settings...'
215  + set +o xtrace
215  + echo 'Loading installation settings...'
215  + app=mygpo
215  ++ ynh_app_setting_get --app=mygpo --key=final_path
215  ++ local legacy_args=ak
215  ++ args_array=([a]=app= [k]=key=)
215  ++ local -A args_array
215  ++ local app
215  ++ local key
215  ++ ynh_handle_getopts_args --app=mygpo --key=final_path
215  ++ set +o xtrace
215  ++ [[ final_path =~ (unprotected|protected|skipped)_ ]]
215  ++ ynh_app_setting get mygpo final_path
216  ++ set +o xtrace
216  + final_path=/opt/yunohost/mygpo
216  ++ ynh_app_setting_get --app=mygpo --key=domain
216  ++ local legacy_args=ak
216  ++ args_array=([a]=app= [k]=key=)
216  ++ local -A args_array
216  ++ local app
216  ++ local key
216  ++ ynh_handle_getopts_args --app=mygpo --key=domain
216  ++ set +o xtrace
316  ++ [[ domain =~ (unprotected|protected|skipped)_ ]]
316  ++ ynh_app_setting get mygpo domain
316  ++ set +o xtrace
317  + domain=mygpo1.local
317  ++ ynh_app_setting_get --app=mygpo --key=db_name
317  ++ local legacy_args=ak
317  ++ args_array=([a]=app= [k]=key=)
317  ++ local -A args_array
317  ++ local app
317  ++ local key
317  ++ ynh_handle_getopts_args --app=mygpo --key=db_name
317  ++ set +o xtrace
317  ++ [[ db_name =~ (unprotected|protected|skipped)_ ]]
317  ++ ynh_app_setting get mygpo db_name
317  ++ set +o xtrace
417  + db_name=mygpo
418  Declaring files to be backed up...
418  + ynh_print_info '--message=Declaring files to be backed up...'
418  + local legacy_args=m
418  + args_array=([m]=message=)
418  + local -A args_array
418  + local message
418  + ynh_handle_getopts_args '--message=Declaring files to be backed up...'
418  + set +o xtrace
418  + echo 'Declaring files to be backed up...'
418  + ynh_backup --src_path=/opt/yunohost/mygpo
418  + local legacy_args=sdbm
418  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
418  + local -A args_array
418  + local src_path
418  + local dest_path
418  + local is_big
418  + local not_mandatory
418  + ynh_handle_getopts_args --src_path=/opt/yunohost/mygpo
418  + set +o xtrace
418  + dest_path=
419  + is_big=0
419  + not_mandatory=0
419  + BACKUP_CORE_ONLY=0
419  + test -n mygpo
419  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
419  ++ local legacy_args=ak
419  ++ args_array=([a]=app= [k]=key=)
419  ++ local -A args_array
419  ++ local app
419  ++ local key
419  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
419  ++ set +o xtrace
419  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
419  ++ ynh_app_setting get mygpo do_not_backup_data
419  ++ set +o xtrace
519  + do_not_backup_data=
520  + '[' 0 -eq 1 ']'
520  + '[' '!' -e /opt/yunohost/mygpo ']'
520  ++ realpath /opt/yunohost/mygpo
520  + src_path=/opt/yunohost/mygpo
520  + [[ -z '' ]]
520  + dest_path=opt/yunohost/mygpo
520  + [[ -e opt/yunohost/mygpo ]]
520  + local rel_dir=/apps/mygpo/backup
520  + rel_dir=/apps/mygpo/backup/
520  + dest_path=/apps/mygpo/backup/opt/yunohost/mygpo
520  + dest_path=apps/mygpo/backup/opt/yunohost/mygpo
520  ++ echo /opt/yunohost/mygpo
521  ++ sed --regexp-extended 's/"/\"\"/g'
521  + local src=/opt/yunohost/mygpo
521  ++ echo apps/mygpo/backup/opt/yunohost/mygpo
521  ++ sed --regexp-extended 's/"/\"\"/g'
521  + local dest=apps/mygpo/backup/opt/yunohost/mygpo
521  + echo '"/opt/yunohost/mygpo","apps/mygpo/backup/opt/yunohost/mygpo"'
521  ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/opt/yunohost/mygpo
521  + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/opt/yunohost
521  + ynh_backup --src_path=/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
521  + local legacy_args=sdbm
521  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
521  + local -A args_array
521  + local src_path
521  + local dest_path
521  + local is_big
522  + local not_mandatory
522  + ynh_handle_getopts_args --src_path=/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
522  + set +o xtrace
522  + dest_path=
522  + is_big=0
522  + not_mandatory=0
522  + BACKUP_CORE_ONLY=0
522  + test -n mygpo
522  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
522  ++ local legacy_args=ak
522  ++ args_array=([a]=app= [k]=key=)
522  ++ local -A args_array
522  ++ local app
522  ++ local key
522  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
523  ++ set +o xtrace
523  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
523  ++ ynh_app_setting get mygpo do_not_backup_data
523  ++ set +o xtrace
623  + do_not_backup_data=
623  + '[' 0 -eq 1 ']'
623  + '[' '!' -e /etc/nginx/conf.d/mygpo1.local.d/mygpo.conf ']'
623  ++ realpath /etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
623  + src_path=/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
623  + [[ -z '' ]]
623  + dest_path=etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  + [[ -e etc/nginx/conf.d/mygpo1.local.d/mygpo.conf ]]
624  + local rel_dir=/apps/mygpo/backup
624  + rel_dir=/apps/mygpo/backup/
624  + dest_path=/apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  + dest_path=apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  ++ echo /etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  ++ sed --regexp-extended 's/"/\"\"/g'
624  + local src=/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  ++ echo apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  ++ sed --regexp-extended 's/"/\"\"/g'
624  + local dest=apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  + echo '"/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf","apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf"'
624  ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d/mygpo.conf
624  + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/nginx/conf.d/mygpo1.local.d
624  + ynh_backup --src_path=/etc/systemd/system/mygpo.service
624  + local legacy_args=sdbm
624  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
624  + local -A args_array
625  + local src_path
625  + local dest_path
625  + local is_big
625  + local not_mandatory
625  + ynh_handle_getopts_args --src_path=/etc/systemd/system/mygpo.service
625  + set +o xtrace
625  + dest_path=
625  + is_big=0
625  + not_mandatory=0
625  + BACKUP_CORE_ONLY=0
625  + test -n mygpo
625  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
625  ++ local legacy_args=ak
625  ++ args_array=([a]=app= [k]=key=)
625  ++ local -A args_array
625  ++ local app
625  ++ local key
625  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
625  ++ set +o xtrace
626  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
626  ++ ynh_app_setting get mygpo do_not_backup_data
626  ++ set +o xtrace
726  + do_not_backup_data=
726  + '[' 0 -eq 1 ']'
726  + '[' '!' -e /etc/systemd/system/mygpo.service ']'
726  ++ realpath /etc/systemd/system/mygpo.service
726  + src_path=/etc/systemd/system/mygpo.service
726  + [[ -z '' ]]
726  + dest_path=etc/systemd/system/mygpo.service
726  + [[ -e etc/systemd/system/mygpo.service ]]
727  + local rel_dir=/apps/mygpo/backup
727  + rel_dir=/apps/mygpo/backup/
727  + dest_path=/apps/mygpo/backup/etc/systemd/system/mygpo.service
727  + dest_path=apps/mygpo/backup/etc/systemd/system/mygpo.service
727  ++ echo /etc/systemd/system/mygpo.service
727  ++ sed --regexp-extended 's/"/\"\"/g'
727  + local src=/etc/systemd/system/mygpo.service
727  ++ echo apps/mygpo/backup/etc/systemd/system/mygpo.service
727  ++ sed --regexp-extended 's/"/\"\"/g'
727  + local dest=apps/mygpo/backup/etc/systemd/system/mygpo.service
727  + echo '"/etc/systemd/system/mygpo.service","apps/mygpo/backup/etc/systemd/system/mygpo.service"'
727  ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system/mygpo.service
727  + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system
727  + ynh_backup --src_path=/etc/systemd/system/mygpo-celery.service
727  + local legacy_args=sdbm
727  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
727  + local -A args_array
728  + local src_path
728  + local dest_path
728  + local is_big
728  + local not_mandatory
728  + ynh_handle_getopts_args --src_path=/etc/systemd/system/mygpo-celery.service
728  + set +o xtrace
728  + dest_path=
728  + is_big=0
728  + not_mandatory=0
728  + BACKUP_CORE_ONLY=0
728  + test -n mygpo
728  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
728  ++ local legacy_args=ak
728  ++ args_array=([a]=app= [k]=key=)
728  ++ local -A args_array
728  ++ local app
728  ++ local key
728  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
729  ++ set +o xtrace
729  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
729  ++ ynh_app_setting get mygpo do_not_backup_data
729  ++ set +o xtrace
829  + do_not_backup_data=
829  + '[' 0 -eq 1 ']'
829  + '[' '!' -e /etc/systemd/system/mygpo-celery.service ']'
829  ++ realpath /etc/systemd/system/mygpo-celery.service
829  + src_path=/etc/systemd/system/mygpo-celery.service
829  + [[ -z '' ]]
829  + dest_path=etc/systemd/system/mygpo-celery.service
830  + [[ -e etc/systemd/system/mygpo-celery.service ]]
830  + local rel_dir=/apps/mygpo/backup
830  + rel_dir=/apps/mygpo/backup/
830  + dest_path=/apps/mygpo/backup/etc/systemd/system/mygpo-celery.service
830  + dest_path=apps/mygpo/backup/etc/systemd/system/mygpo-celery.service
830  ++ echo /etc/systemd/system/mygpo-celery.service
830  ++ sed --regexp-extended 's/"/\"\"/g'
830  + local src=/etc/systemd/system/mygpo-celery.service
830  ++ echo apps/mygpo/backup/etc/systemd/system/mygpo-celery.service
830  ++ sed --regexp-extended 's/"/\"\"/g'
830  + local dest=apps/mygpo/backup/etc/systemd/system/mygpo-celery.service
830  + echo '"/etc/systemd/system/mygpo-celery.service","apps/mygpo/backup/etc/systemd/system/mygpo-celery.service"'
830  ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system/mygpo-celery.service
830  + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system
830  + ynh_backup --src_path=/etc/systemd/system/mygpo-beat.service
830  + local legacy_args=sdbm
830  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
830  + local -A args_array
831  + local src_path
831  + local dest_path
831  + local is_big
831  + local not_mandatory
831  + ynh_handle_getopts_args --src_path=/etc/systemd/system/mygpo-beat.service
831  + set +o xtrace
831  + dest_path=
831  + is_big=0
831  + not_mandatory=0
831  + BACKUP_CORE_ONLY=0
831  + test -n mygpo
831  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
831  ++ local legacy_args=ak
831  ++ args_array=([a]=app= [k]=key=)
831  ++ local -A args_array
831  ++ local app
831  ++ local key
831  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
832  ++ set +o xtrace
832  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
832  ++ ynh_app_setting get mygpo do_not_backup_data
832  ++ set +o xtrace
932  + do_not_backup_data=
932  + '[' 0 -eq 1 ']'
932  + '[' '!' -e /etc/systemd/system/mygpo-beat.service ']'
932  ++ realpath /etc/systemd/system/mygpo-beat.service
932  + src_path=/etc/systemd/system/mygpo-beat.service
933  + [[ -z '' ]]
933  + dest_path=etc/systemd/system/mygpo-beat.service
933  + [[ -e etc/systemd/system/mygpo-beat.service ]]
933  + local rel_dir=/apps/mygpo/backup
933  + rel_dir=/apps/mygpo/backup/
933  + dest_path=/apps/mygpo/backup/etc/systemd/system/mygpo-beat.service
933  + dest_path=apps/mygpo/backup/etc/systemd/system/mygpo-beat.service
933  ++ echo /etc/systemd/system/mygpo-beat.service
933  ++ sed --regexp-extended 's/"/\"\"/g'
933  + local src=/etc/systemd/system/mygpo-beat.service
933  ++ echo apps/mygpo/backup/etc/systemd/system/mygpo-beat.service
933  ++ sed --regexp-extended 's/"/\"\"/g'
933  + local dest=apps/mygpo/backup/etc/systemd/system/mygpo-beat.service
933  + echo '"/etc/systemd/system/mygpo-beat.service","apps/mygpo/backup/etc/systemd/system/mygpo-beat.service"'
933  ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system/mygpo-beat.service
933  + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system
933  + ynh_backup --src_path=/etc/systemd/system/mygpo.socket
933  + local legacy_args=sdbm
933  + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
933  + local -A args_array
934  + local src_path
934  + local dest_path
934  + local is_big
934  + local not_mandatory
934  + ynh_handle_getopts_args --src_path=/etc/systemd/system/mygpo.socket
934  + set +o xtrace
934  + dest_path=
934  + is_big=0
934  + not_mandatory=0
934  + BACKUP_CORE_ONLY=0
934  + test -n mygpo
934  ++ ynh_app_setting_get --app=mygpo --key=do_not_backup_data
934  ++ local legacy_args=ak
934  ++ args_array=([a]=app= [k]=key=)
934  ++ local -A args_array
934  ++ local app
934  ++ local key
934  ++ ynh_handle_getopts_args --app=mygpo --key=do_not_backup_data
934  ++ set +o xtrace
935  ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
935  ++ ynh_app_setting get mygpo do_not_backup_data
935  ++ set +o xtrace
1035 + do_not_backup_data=
1037 Invalid argument: --
1037 + '[' 0 -eq 1 ']'
1037 + '[' '!' -e /etc/systemd/system/mygpo.socket ']'
1038 ++ realpath /etc/systemd/system/mygpo.socket
1038 + src_path=/etc/systemd/system/mygpo.socket
1038 + [[ -z '' ]]
1038 + dest_path=etc/systemd/system/mygpo.socket
1038 + [[ -e etc/systemd/system/mygpo.socket ]]
1038 + local rel_dir=/apps/mygpo/backup
1038 + rel_dir=/apps/mygpo/backup/
1039 + dest_path=/apps/mygpo/backup/etc/systemd/system/mygpo.socket
1039 + dest_path=apps/mygpo/backup/etc/systemd/system/mygpo.socket
1039 ++ echo /etc/systemd/system/mygpo.socket
1039 ++ sed --regexp-extended 's/"/\"\"/g'
1039 + local src=/etc/systemd/system/mygpo.socket
1039 ++ echo apps/mygpo/backup/etc/systemd/system/mygpo.socket
1040 ++ sed --regexp-extended 's/"/\"\"/g'
1040 + local dest=apps/mygpo/backup/etc/systemd/system/mygpo.socket
1040 + echo '"/etc/systemd/system/mygpo.socket","apps/mygpo/backup/etc/systemd/system/mygpo.socket"'
1040 ++ dirname /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system/mygpo.socket
1040 + mkdir --parents /home/yunohost.backup/tmp/20210315-152150/apps/mygpo/backup/etc/systemd/system
1040 + ynh_backup --is-big --src_path=/home/yunohost.app/mygpo/
1040 + local legacy_args=sdbm
1041 + args_array=([s]=src_path= [d]=dest_path= [b]=is_big [m]=not_mandatory)
1041 + local -A args_array
1041 + local src_path
1041 + local dest_path
1041 + local is_big
1041 + local not_mandatory
1041 + ynh_handle_getopts_args --is-big --src_path=/home/yunohost.app/mygpo/
1042 + set +o xtrace
1042 + ret_code=1
1042 + echo 'Invalid argument: --'
1042 + exit 1
1042 + ynh_exit_properly
1042 + local exit_code=1
1043 + '[' 1 -eq 0 ']'
1043 + trap '' EXIT
1043 + set +o errexit
1043 + set +o nounset
1043 + sleep 0.5
1546 + type -t ynh_clean_setup
1547 + ynh_clean_setup
1547 + true
1548 + exit 1
1574 Could not back up mygpo
1574 action [12204.1] executed in 1.474s
1574 lock has been released
1575 Nothing to save

I’m guessing it’s --is_big instead of --is-big

1 Like