Commit graph

1548 commits

Author SHA1 Message Date
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
Jean-Baptiste Holcroft
883fe46d89 [i18n] Translated using Weblate (French)
Currently translated at 100.0% (287 of 287 strings)
2017-04-24 13:39:39 +02:00
Jean-Baptiste Holcroft
6e3b67a843 [i18n] Translated using Weblate (French)
Currently translated at 100.0% (278 of 278 strings)
2017-04-24 13:39:39 +02:00
Jeroen Keerl
0088483835 [i18n] Translated using Weblate (German)
Currently translated at 98.9% (275 of 278 strings)
2017-04-24 13:39:38 +02:00
Jean-Baptiste Holcroft
b6b66f231f [i18n] Translated using Weblate (French)
Currently translated at 100.0% (278 of 278 strings)
2017-04-24 13:39:38 +02:00
Jeroen Keerl
78c88dee32 [i18n] Translated using Weblate (Dutch)
Currently translated at 48.2% (134 of 278 strings)
2017-04-24 13:39:38 +02:00
Philip Gatzka
793baf9484 [i18n] Translated using Weblate (German)
Currently translated at 95.6% (266 of 278 strings)
2017-04-24 13:39:37 +02:00
Jean-Baptiste Holcroft
8687f9ef46 [i18n] Translated using Weblate (French)
Currently translated at 100.0% (278 of 278 strings)
2017-04-24 13:39:37 +02:00
Jean-Baptiste Holcroft
b1119c8289 [i18n] Translated using Weblate (French)
Currently translated at 100.0% (273 of 273 strings)
2017-04-24 13:39:37 +02:00
Jean
482410233a [i18n] Translated using Weblate (French)
Currently translated at 100.0% (273 of 273 strings)
2017-04-24 13:39:36 +02:00
Jean
067137ea82 [i18n] Translated using Weblate (Spanish)
Currently translated at 100.0% (273 of 273 strings)
2017-04-24 13:39:36 +02:00
bricabraque
82de25f6fc [i18n] Translated using Weblate (Italian)
Currently translated at 92.6% (252 of 272 strings)
2017-04-24 13:39:36 +02:00
bricabraque
89589ebaa7 [i18n] Translated using Weblate (Italian)
Currently translated at 92.2% (251 of 272 strings)
2017-04-24 13:39:35 +02:00
fummelmann
ed4fc0f7b9 [i18n] Translated using Weblate (German)
Currently translated at 100.0% (272 of 272 strings)
2017-04-24 13:39:34 +02:00
fummelmann
3eb160707a [i18n] Translated using Weblate (Spanish)
Currently translated at 100.0% (272 of 272 strings)
2017-04-24 13:39:34 +02:00
Alexandre Aubin
c502b8c348 [fix] Add random delay to app fetchlist cron job (#297)
* Add random delay to app fetchlist cron job
* Split the sleep and yunohost command on two lines
2017-04-24 13:38:11 +02:00
Laurent Peuch
1516f48699 [enh] Allow applications to ship a script to change its url (#185)
* [enh] add app_change_url
* [fix] avoid unecessary io and reuse already existing variable
* [fix] bad comment
* [fix] another bad comment
* [fix] I need to be able to call yunohost during change_url scripts
* [mod] global variables are now uppercased
* [mod] compress condition
* [enh] don't change_url if old/new domain_path are identical
* [mod] i18n
* [enh] ensure that nginx doesn't failed at the end of change_url
* [fix] forgot to call this damn m18n
* [mod] m18n
* [enh] ask and requires new domain/path for change_url
* [fix] missing translation key
* [mod] ordering
* [mod] lisibility
* [enh] avoid common mistakes
* [fix] check_output is annoying
* [fix] locale: typo.
* Adding changeurl unit test draft
* [mod] remove useless imports
* [mod] style
* [mod] change_url -> changeurl
* Moving comment about checkurl near checkurl call
* Normalize new path and domain format
* Adding test about trying to changeurl to same url
* Internationalizing change app success message
* Removing 'trimed' stuff
* Moving check for change_url script at beginning of function
* Use _run_service_command to reload nginx
* Changing changeurl back to change-url, gomennasai :s
2017-04-18 00:38:40 +02:00
Alexandre Aubin
7718ed6000 [fix] Properly manage resolv.conf, dns resolvers and dnsmasq (#290)
* Adding resolvconf as dependency
* Adding new templates for dnsmasq
* Adding libnss-myhostname as dependency
* tableflip.gif
* Moar tableflip.gif :/
* Tweaking dns resolvers used by dnsmasq
* Adding Aquilenet + moving FDN back to top
* Clarifying how the resolv.dnsmasq.conf template is used
* Moving nsswitch force regen back to postinstall
2017-04-18 00:37:21 +02:00
Alexandre Aubin
5820f79772 [fix] Properly define app upgradability / Fix app part of tools update (#255)
* Adding a 'upgradable' attribute directly in app_info
Conflicts:
	src/yunohost/app.py
	src/yunohost/tools.py
* Fixing a few weird stuff from cherry-picking
2017-04-16 16:51:03 +02:00
Alexandre Aubin
f646fdf272 [fix] Split checkurl into two functions : availability + booking (#267)
* Splitting checkurl into two functions, one to check availability, the other for booking
* [fix] move import at file's beginning.
* Rename bookurl to registerurl
* Set registerurl as a PUT request for the api
* urlavailable returns a boolean now
* Revert moving import to top of file :/
* Have domain and path as separate arguments
* Flagging checkurl as deprecated in the actionmap
* Adding unit tests for registerurl and related
* Using built-in deprectation mechanism of Moulinette
* Using - separator in names + moving url-available to domain
* Returning directly a bool in url-available
2017-04-16 16:47:51 +02:00
Alexandre Aubin
674d639530 [enh] Adding new port availability checker (#266)
* Adding new port availability checker in tools
* [fix] move import at file's beginning.
* Moving back import inside function
* Using boolean instead of Yes/No
* Using built-in depreciation mechanism in Moulinette
* We're now using boolean instead of yes/no
* Renaming to port-available
* Returning directly a boolean
2017-04-16 16:46:57 +02:00
Laurent Peuch
43155ebc64 Merge pull request #295 from Jibec/unstable
new text proposal "appslist_retrieve_bad_format"
2017-04-10 02:19:02 +02:00
Jean-Baptiste
804daf63bf rewrite proposal for certmanager_http_check_timeout
hairpinning is the answer to the problem, not the problem itself. We should probably rewrite the whole sentence, but to keep it simple, let's just add it is an issue related to hairpinning.
2017-04-09 16:03:02 +02:00
Jean-Baptiste
f8ace3153a new text proposal "appslist_retrieve_bad_format"
Fix: https://dev.yunohost.org/issues/895
2017-04-08 11:30:21 +02:00
Laurent Peuch
a4c487a0aa [enh] Refactor applist management (#160)
* [mod] directly use python to retreive json list

* [enh] app_fetchlist fetch all app_list by default

* [fix] name variable doesn't exists here

* [fix] re returns None when there is not matchs

* [enh] app_fetchlist fetch all app_list by default

* Some cleaning for better readability

* Simpler variable name

* Prepare a function that register lists to be fetched

* Skeletong for applist system migration

* Add implementation of migration system with tests

* Refactorize app_fetchlist

* Misc fixes + adding test for single app fetching

* Fixing a few issues + test removelist

* Adding fetchlist and cron install during postinstall

* Adding debug messages

* Adding particular exception for SSL connection error

* Update actionmap help

* We don't use urlretrieve

* Clean tests, some description were bad

* [mod] some cleaning

* Moving to a .json file to store lists url + adjusting tests

* Adding missing string in locale

* Moving exception to logger.error when fetching fails

* Adding name of applist in error messages

* Fixing cron job stuff + adding proper tests

* Using None instead of -1 for applist lastupdate

* Handling exceptions when writing applist files

* More exception handling...

* [mod] pep8

* Updating test for migration of conflicting lists

* More general error when return code is not 200

* [enh] Improve app_fetchlist help.

* [fix] Use appslist instead of applist.

* [fix] Consistent user string for translation.
2017-04-06 22:21:25 +02:00
ljf (zamentur)
c954429cca [fix] Avoid to remove a apt package accidentally (#292)
* [fix] Avoid to remove a apt package accidentally
* [fix] No need --no-remove option with apt update cmd
2017-04-06 15:34:17 +02:00
Maniack Crudelis
712e69d830 New helper ynh_local_curl (#288)
* New helper ynh_curl_abstract
Just an abstraction around curl command.
To prevent forgot arguments and simplify this difficult command.
* [enh] Switch args of ynh_curl_abstract
* [enh] Rename ynh_curl_abstract into ynh_local_curl
* Splitting the various key=value into several arguments
* Comment to clarify bash command
* Adding comment about $domain and $path_url
2017-04-06 15:33:56 +02:00
Maniack Crudelis
c31e4c5b0d New helper ynh_replace_string (#280)
* New helper ynh_substitute_char
Sed abstraction, and a way to use something other than sed.
I added also an escape of the delimiter used by sed, to prevent a fail in this case.
* Renaming to ynh_replace_string
* Renaming variable for clarity
2017-04-02 23:52:11 +02:00
Alexandre Aubin
86f0978dfb Cleaner postinstall logs during CA creation (#250) 2017-03-29 02:39:00 +02:00