Commit graph

1526 commits

Author SHA1 Message Date
Laurent Peuch
c5098cd90e Merge pull request #308 from YunoHost/test_m18n_keys_usage
[enh] Add a script to test m18n keys usage
2017-07-23 01:53:48 +02:00
Alexandre Aubin
84153f6390 [mod] Microdecision to go with Moulinette#141 2017-07-21 13:23:32 -04:00
Alexandre Aubin
c96d5f90ec Don't verify SSL during changeurl tests :/ (#332) 2017-07-21 00:45:05 +02:00
Alexandre Aubin
89189ed52f [fix] Refactor DNS conf management for domains (#299)
* Add an helper that build a dict describing the dns conf
* Synchronize the dyndns dns conf with the one from domain.py
* [mod] try to make code more lisible
* [mod] try to make code a bit more lisible
* [mod/fix] try to simplify and clean the code (and remove what looks like a debug return)
* [fix] First delete records, then add the new records
2017-07-21 00:28:37 +02:00
JimboJoe
baf1d44c1f Run change_url scripts as root as a matter of homogeneity (#329) 2017-07-17 20:39:39 +02:00
Laurent Peuch
f3a247442f Merge pull request #321 from YunoHost/helper_autopurge
[enh] New helper autopurge
2017-07-17 03:47:22 +02:00
ljf (zamentur)
20f4a39bf0 [fix] Errors in backup custom methods (#326) 2017-07-13 19:36:31 +02:00
YunoHost Bot
7be85b2e62 Update from Weblate. (#327)
* [i18n] Translated using Weblate (Spanish)
Currently translated at 97.9% (281 of 287 strings)
* [i18n] Translated using Weblate (German)
Currently translated at 96.8% (278 of 287 strings)
* [i18n] Translated using Weblate (French)
Currently translated at 100.0% (301 of 301 strings)
* [i18n] Translated using Weblate (French)
Currently translated at 100.0% (332 of 332 strings)
* [i18n] Translated using Weblate (German)
Currently translated at 83.4% (277 of 332 strings)
* [i18n] Translated using Weblate (German)
Currently translated at 87.6% (291 of 332 strings)
* [i18n] Translated using Weblate (German)
Currently translated at 87.6% (291 of 332 strings)
* [i18n] Translated using Weblate (French)
Currently translated at 95.3% (287 of 301 strings)
2017-07-10 18:24:53 +02:00
Maniack Crudelis
9782f05887 New helpers ynh_add_fpm_config and ynh_remove_fpm_config (#284)
* New helpers ynh_add_fpm_config and ynh_remove_fpm_config
Standard configuration of php-fpm.
Use local files stored in conf/, so it's still possible to use a specific config
* ynh_substitute_char was renamed to ynh_replace_string
* Update checksum command and quiet the second secure_remove
* Fix helpers name
2017-07-10 17:48:32 +02:00
Alexandre Aubin
f0c9e697fe [fix] Do not crash if archivemount is not there (#325) 2017-07-10 17:45:34 +02:00
ljf
9bbdaac58b Update changelog for 2.6.4 release 2017-06-21 17:34:41 -04:00
YunoHost Bot
a8eac8ac42 Update from Weblate. (#323)
* [i18n] Translated using Weblate (Spanish)
* [i18n] Translated using Weblate (German)
* [i18n] Translated using Weblate (French)
2017-06-21 21:32:18 +02:00
Alexandre Aubin
d9761aad7b [fix] Move archivemount to suggested dependency (#322) 2017-06-21 21:04:25 +02:00
Maniack Crudelis
3320aee86e [enh] New helper autopurge
Add an autoremove with purge.
Some deb packages, like transmission let a lot of shit behind itself.
In case of remove then install, transmission doesn't work anymore.
2017-06-17 19:22:10 +02:00
Maniack Crudelis
a01f7ffd2b [Fix] Forgot an asterisk in logrotate helper (#320) 2017-06-13 22:18:48 +02:00
Maniack Crudelis
edcabddb63 [enh] Do not change the db_pwd (#319)
* [enh] Do not change the db_pwd
For restore script, do not change the password.
Keep the primary password and recreate a new database with it.
* A small comment ;)
Thanks, opi, sometimes I forget that's not so obvious.
And I don't want to someone has to search through internet to understand a helper.
2017-06-12 17:03:40 +02:00
Alexandre Aubin
6042e71003 [fix] Don't attempt to change hostname in LXC (#301)
* Don't attempt to change hostname in LXC
* Detect any kind of container, not just lxc
2017-06-12 16:58:22 +02:00
Maniack Crudelis
de3a0b4f69 [fix] ynh_install_app_dependencies uses grep instead of python (#313)
Proposition to discuss
2017-06-09 00:46:36 +02:00
opi
5e4cce3f1f [fix] Do not break if disk is not a dict (fixes #redmine-919) (#315) 2017-06-07 11:53:45 +02:00
Alexandre Aubin
a687b85025 Update changelog for 2.6.3 release 2017-06-02 09:58:18 -04:00
YunoHost Bot
8948694610 Update from Weblate. (#318)
* [i18n] Translated using Weblate (Spanish)
Currently translated at 97.9% (281 of 287 strings)

* [i18n] Translated using Weblate (German)
Currently translated at 96.8% (278 of 287 strings)

* [i18n] Translated using Weblate (French)
Currently translated at 95.3% (287 of 301 strings)

* [i18n] Translated using Weblate (French)
Currently translated at 100.0% (301 of 301 strings)
2017-06-02 14:55:06 +02:00
ljf (zamentur)
d3eeb4bbc7 [enh] Refactor backup management to pave the way to borg (#275)
* [enh] Use a csv to list file to backup
* [enh] Use csv python module
* [wip] Backup refactoring
* [wip] Backup class refactoring
* [enh] Add archivemount dependencies
* [wip] Restore refactoring
* [fix] Some error in this refactoring
* [fix] Missing backup key translation
* [fix] Bad YNH_CWD in hook backup
* [fix] App backup part was broken
* [fix] Restore operation was broken
* [fix] No compressed backup
* [fix] Don't commit backup path into csv if app backup fail
* [fix] Default backup collect_dir should be in tmp subdir
* [enh] Simplify a copy code
* [enh] Build backup info from properties
* [enh] Improve comments presentation
* Adding first tests for backup/restore
* Adding more backup/restore app test scenario
* [enh] Separate BackupMethods in distinct class
* Adding test of restoring a wordpress archive from 2.4
* [fix] Be able to delete backup link too
* [fix] Bad internationalization key
* [fix] Edge case with empty mysql pwd restore
* [fix] Unset var in restore
* [fix] Edge case with empty mysql pwd restore
* Adding test for backup crash handling
* Cleaning tests + checking tmp dir is empty
* [fix] Missing tmp in backup path
* [fix] Error on reading backup csv
* Adding test of failed restore
* Adding tests when not enough space available
* Simplifying tests using markers
* [fix] ynh backup/restore helpers with only one arg
* [fix] Unmount subdir with python
* [enh] Improve backup size management
* [fix] None object in backup
* [enh] Remove dead code
* [fix] Missing locales
* [enh] Adapat test about needed space
* [fix] Pass some test
* [enh] Remove dead code
* [enh] Pass all test
* [enh] Adding test that backups contains what's expected
* Fix typo in tests
* [fix] Bad documentation
* [enh] Add comment
* [enh] Use len in place of implicit {} == False
* [enh] Add comment
* [enh] Add comment
* [enh] Refactoring on _collect_app_files
* Adding skeleton for remaining tests to write
* [enh] Use a csv to list file to backup
* [enh] Use csv python module
* [wip] Backup refactoring
* [wip] Backup class refactoring
* [enh] Add archivemount dependencies
* [wip] Restore refactoring
* [fix] Some error in this refactoring
* [fix] Missing backup key translation
* [fix] Bad YNH_CWD in hook backup
* [fix] App backup part was broken
* [fix] Restore operation was broken
* [fix] No compressed backup
* [fix] Don't commit backup path into csv if app backup fail
* [fix] Default backup collect_dir should be in tmp subdir
* [enh] Simplify a copy code
* [enh] Build backup info from properties
* [enh] Improve comments presentation
* Adding first tests for backup/restore
* Adding more backup/restore app test scenario
* [enh] Separate BackupMethods in distinct class
* Adding test of restoring a wordpress archive from 2.4
* [fix] Be able to delete backup link too
* [fix] Bad internationalization key
* [fix] Edge case with empty mysql pwd restore
* [fix] Unset var in restore
* [fix] Edge case with empty mysql pwd restore
* Adding test for backup crash handling
* Cleaning tests + checking tmp dir is empty
* [fix] Missing tmp in backup path
* [fix] Error on reading backup csv
* Adding test of failed restore
* Adding tests when not enough space available
* Simplifying tests using markers
* [fix] ynh backup/restore helpers with only one arg
* [fix] Unmount subdir with python
* [enh] Improve backup size management
* [fix] None object in backup
* [enh] Remove dead code
* [fix] Missing locales
* [enh] Adapat test about needed space
* [fix] Pass some test
* [enh] Remove dead code
* [enh] Pass all test
* [enh] Adding test that backups contains what's expected
* Fix typo in tests
* [fix] Bad documentation
* Adding skeleton for remaining tests to write
* [enh] Add comment
* [enh] Use len in place of implicit {} == False
* [enh] Add comment
* [enh] Add comment
* [enh] Refactoring on _collect_app_files
* [fix] Replay e1a507 deleted by rebase
* [fix] ynh_restore helper
* Renaming 'hooks' terminology to 'system' where it makes sense
* Propagating new --system/--ignore-system to actionmap
* Adding more tests + clarifying some functions and messages
* Factorize out the definition and validation of backup/restore targets
* Add missing key
* Use list comprehension instead of dirty loops
* [enh] Add docstring in BackupManager
* [enh] Add docstring on BackupMethod(s)
* [fix] Remove deadcode
* [fix] Remove debug message
* [enh] Add comments on RestoreManager
* [enh] Add comments on backup constants
* Adding a proper report/result for each backup target
* Skipping tests not implemented yet
* Fixing little mistake from merging
* [fix] Support different fs or archivemount error
* [enh] Backup helpers readability
* [fix] Copy backup method
* [fix] Deprecated warning always displayed
* [enh] Retrieve info.json file inside tar.gz
* Trying to reorganize methods with sections for readability
* [enh] Support archivemount failure
* [fix] Missing env var for system part restore helpers
* Clarifying disk usage / free space computation
* [enh] Refactoring around backup set_targets()
* Clarifying structure of backup_create and backup_restore
* Move RestoreManager between BackupManager and BackupMethods
* [fix] Missing locales
* [fix] System part restore if archivemount failure
* [enh] Extract all conf instead of specific code
* [fix] Other output directory (compressed archive)
* [enh] Add test for uncompressed backup
* [fix] Compressed backup in an existing output directory
* [fix] Return size for retro-compatibility
* [fix] Mountpoint check aborting script when called with -eu
* [fix] Avoid failure test with set -eu
* [fix] locale strings missing/bad arguments
* Check free space before mount
* [fix] ynh_restore_helpers with existing archive path
* Adding skeletons for moar tests
* Fixing some weird bug in _get_archive_path
* Adding a regen-conf at the end of system restore
* Adding tests of system restore from 2.4
* Have a class dedicated to target management
* Cleaning tests
* Misc formatting
* More meaningful variable names inside app restore
* [fix] can't call source ../settings/scripts/_common.sh in app backup
* [fix] ynh_install_app_dependencies is not compatible with readonly mount
* [fix] Remove temporary file
2017-06-02 13:41:16 +02:00
Alexandre Aubin
2de7e3301b [fix] Typo in applist migration (#317) 2017-06-01 18:14:39 +02:00
Jean-Baptiste
64ab4a82b3 [fix] Yypos in en.json (#314)
* serialzed => serialized
* typo close global_settings_key_doesnt_exists
* serialized/serialize & setings/settings
2017-05-31 17:06:40 +02:00
Alexandre Aubin
7102bf1b0e [fix] Missing change from metronome to ssl-cert (#316) 2017-05-31 16:09:39 +02:00
opi
6371ab4a57 [enh] Increase message size. #914 (#307) 2017-05-24 08:42:16 +02:00
Alexandre Aubin
7af130d81b Allow regen-conf to manage new files already when they're already present on the system (#311) 2017-05-22 15:24:47 +02:00
Maniack Crudelis
c0a40dd2df New helpers ynh_store_file_checksum and ynh_backup_if_checksum_is_different (#286)
* New helpers ynh_store_checksum_config and ynh_compare_checksum_config

Helpers for avoid destruction of personalised config files.
If the config file was manually modified, make a backup of it.

The name of this backup is returned, so the packager can choose which of this both file will used by default.

* Implement @JimboJoe's comments.
* Setting local variables as local
* Adding warning about $app that should be defined
* Remove "globally" in comment to limit confusion
* Remove "globally" in comment to limit confusion
* Remove compress and use /home/yunohost.conf/backup
* Changing timestamp format to match regen-conf's
* Tested and fixed ;)
2017-05-22 15:24:16 +02:00
opi
c0146b69c6 [fix] Wrong identifier for diagnosis related strings. (#309) 2017-05-22 15:23:24 +02:00
Laurent Peuch
f9437bbd33 Global settings (#229)
* [enh] add base to run tests
* [enh] start global settings proto
* [mod] has -> exists
* [enh] configure actionmap for settings module
* [enh] add a default values mecanism
* [enh] nicer yaml dump
* [mod] DRY
* [fix] moulinette doesn't respect positionned arguments
* [fix] typo
* [mod] don't print when it's not needed
* [enh] raise a moulinette exception when the key doesn't exists
* [mod] add todo comments
* [mod] no more default value
* [enh] namespace all global settings commands
* [mod] unix way, be quiet except when needed
* [fix] forgot to add namespace argument to settings-list
* [fix] fail_silently wasn't considered as a cli flag
* [mod] refactoring
* [enh] remove empty namespace on remove
* [enh] print a warning if attempt to list an empty namespace settings
* [mod] refactoring
* [enh] handle case where I can't open settings file
* [enh] handle case where I can't write settings file
* [enh] handle case where I can't serialized settings data into yaml
* [mod] add error return codes
* [enh] start to move to new architecture for settings
* [enh] uses a dict instead of a tuple for settings
* [mod] no more namespace in settings list
* [mod] settings.exists isn't relevant anymore
* [mod] settings.remove isn't relevant anymore
* [enh] fix settings and switch to json
* [enh] adapt settings set
* [enh] don't set a key that doesn't exists
* [enh] check type of keys before settings them
* [enh] start implement default
* [enh] handle case where key doesnt exist for default
* [enh] i18n for bad key type on settings set
* [enh] i18n for bad key type on settings set for enum
* [mod] exception for weird situation
* [mod] this message isn't used anymore
* [enh] i18n for unknown setting key from local settings
* [mod] style
* [enh] start to work on a reset mecanism
* [enh] complain if settings_reset is called without yes
* [fix] --yes of reset is a boolean option
* [enh] backup old settings before resetting
* [fix] bad usage of logger
* [enh] backup unknown settings
* [enh] move settings description in translations
* [enh] add tests for settings
* [enh] migrate to pytest assert style
* [fix] typo
* [doc] add some comments for not explicite part of the code
* [mod] possibilities -> choices for uniformised vocabulary
* [mod] follow rest semantic
* [doc] made namespace usage more explicit
* [fix] we don't use namespace key anymore
* [enh] make settings_default available in cli
* [fix] *really* be Rest semantic
* [doc] add docstrings to settings module functions
* [enh] reset-all and --full option
* [fix] Remove unused global_settings_reset_not_yes
2017-05-16 17:18:07 +02:00
Alexandre Aubin
2d6abf4ffe Use ssl-cert group instead of metronome (#222) 2017-05-16 17:14:42 +02:00
Alexandre Aubin
3f953699eb [fix] Unexpected comment line ending up in /etc/resolv.dnsmasq.conf (#312) 2017-05-14 16:51:29 +02:00
JimboJoe
fee4272eac Fix ynh_local_curl (#306)
POST arguments aren't given to the request if quotes are used.
2017-05-11 23:01:49 +02:00
M5oul
0877da9438 Merge pull request #310 from YunoHost/fix_app_checkport
[fix] app_checkport was broken.
2017-05-10 23:08:51 +02:00
Moul
00d9b9ee86 [fix] app_checkport was broken. 2017-05-10 22:53:40 +02:00
Alexandre Aubin
ad08acee18 Add a script to test m18n keys usage 2017-05-08 23:33:44 +02:00
Maniack Crudelis
dfee06404e Nouveaux helpers ynh_mysql_generate_db et ynh_mysql_remove_db (#236)
* Nouveaux helpers ynh_mysql_generate_db et ynh_mysql_remove_db
Helpers pour créer une base de donnée, son utilisateur et un mot de passe.
Et son pendant pour la supprimer.
* Separate corrections of names
* Grammar nazism
* Update according to comments
* Renaming ynh_make_valid_dbid to ynh_sanitize_dbid
* Fixing remaining make_valid_dbid
* Implement remaining comments
* Add a check that the user exist before deleting it
2017-05-08 19:05:49 +02:00
JimboJoe
c8647fc21f [fix] ynh_setup_source: use YNH_CWD instead of YNH_EXECUTION_DIR (#305)
Following this discussion: https://github.com/YunoHost/yunohost/pull/282#issuecomment-299637999
2017-05-07 19:05:42 +02:00
Maniack Crudelis
3571747718 Nouveau helper ynh_webpath_available et ynh_webpath_register (#235)
* Nouveau helper ynh_path_validity
Simplement un wrapper de yunohost app checkurl.
Peut-être une occasion de lui donner un autre nom plus parlant.
Il me semble justement qu'il en était question.
Conflicts:
	data/helpers.d/network
* Renaming ynh_path_validity to ynh_webpath_available
* Splitting domain and path
* Use the new url-available command instead of deprecated checkurl
* Adding ynh_webpath_register
* [enh] Check before register
- Need to be tested.
- And... probably lack a echo to inform in case of error.
* Fixing helper following discussion with Maniack
2017-05-06 16:53:54 +02:00
Alexandre Aubin
59aafebea7 [microdecision] Fix typo in checkport, fixes issue 912 on redmine 2017-05-04 18:46:20 +02:00
Alexandre Aubin
785790b930 [enh] Add a custom --yunodebug option for pytest (#303) 2017-05-04 16:23:35 +02:00
Maniack Crudelis
0e44a42274 New helper ynh_setup_source (#282)
* New helper ynh_setup_source
THE trollest helper :D
An helper to handle download, checksum, copy, patches, extra files and even a way to install without internet connection.
Really usefull to simplify this part of the packaging.
* [fix] Source id and pkg _dir missing, strip-components deactivation
* [fix] Replace tab by 4 spaces
* [fix] False default value in ynh_setup_source helpers
* [fix] Empty var failed on set -u into ynh_setup_source
* [fix] Multiple patch on setup sources helper
* [fix] Doc, patch and extra_file in ynh_setup helpers
* [enh] Allow to use ynh_setup_source in another dir
* [fix] Doc ynh_get_plain_key
* [fix] Missing default value in ynh_setup_source
* Missing closing } after merge with unstable ?
2017-05-03 19:19:41 +02:00
ljf (zamentur)
afe28470c0 [enh] Add execution dir in env on hook exec (#293)
* [enh] Add execution dir in env on hook exec
* [enh] YNH_EXECUTION_DIR become YNH_CWD
* [fix] Hook exec with no env fail
* [enh] Remove dead condition
2017-05-03 19:11:01 +02:00
Maniack Crudelis
caa63f7022 Merge pull request #302 from YunoHost/curl_helper
[enh] Fix curl helper without POST data
2017-05-03 19:08:36 +02:00
Maniack Crudelis
47ce6d9e33 New helper ynh_secure_remove (#281)
* New helper ynh_secure_remove
A secure way to remove a file or directory.
Prevent to knew issues.
Tested with this paths:
- / -> Not removed
- /var -> Not removed
- /var/www -> Not removed
- /var/www/file -> Removed
- /opt -> Not removed
- /opt/file -> Removed
- /home/yunohost.app -> Not removed
- /home -> Not removed
- /home/ -> Not removed
- // -> Not removed
- /etc/cron.d/ -> Not removed
- /etc -> Not removed
- /etc/ -> Not removed
- /etc/X11 -> Removed
- /etc/X11/$var -> Removed (if $var is not empty)

* JimboJoe's typo fix
2017-04-30 22:37:52 +02:00
Alexandre Aubin
6cc237dcca Changing nginx ciphers to intermediate compatiblity (#298)
* Changing nginx ciphers to intermediate compatiblity
* [fix] Move commented ciphers list after, and add explanation
* [fix] Move commented ciphers list after, and add explanation
2017-04-28 17:37:34 +02:00
Maniack Crudelis
558323f6f2 [enh] Fix curl helper without POST data
- Allow to use this helper without any POST data
- Keep curl more quiet
2017-04-26 19:51:51 +02:00
opi
12b7c438a9 [love] Add missing contributors & translators. 2017-04-25 15:37:14 +02:00
Alexandre Aubin
dc720cc2ce Update changelog for 2.6.2 release 2017-04-24 09:21:44 -04:00
opi
4eceb64ab1 Merge pull request #300 from yunohost-bot/weblate-yunohost-yunohost
Update from Weblate.
2017-04-24 14:22:26 +02:00