Commit graph

328 commits

Author SHA1 Message Date
Alexandre Aubin
c266147fd9 Be able to list only pending or done migrations 2018-03-16 14:38:04 +01:00
Alexandre Aubin
c568b04459 Manage the auto/manual flag in migrations_migrate 2018-03-16 14:38:04 +01:00
Alexandre Aubin
d73197793c Adapt migrations_migrate according to previous changes 2018-03-16 14:38:04 +01:00
Alexandre Aubin
0702af6054 Simplify my previous stuff about managing migration infos ? 2018-03-16 14:38:04 +01:00
Alexandre Aubin
7f359e363b Add mode, description and optionnal disclaimer for migrations 2018-03-16 14:38:04 +01:00
Alexandre Aubin
020dea6531 Change the way we list migrations (always load the module) and the way we manage its infos 2018-03-16 14:38:04 +01:00
Laurent Peuch
f70949b350 [fix] handle uncatched exception 2018-02-11 05:39:45 +01:00
Alexandre Aubin
e80f3a5a55 Fix imports and get_public_ip usage 2018-01-26 03:39:35 +01:00
Laurent Peuch
be8ae067e6
Merge pull request #372 from YunoHost/tsig-sha256
Uses hmac-sha512 for dyndns TSIG
2018-01-24 10:03:34 +01:00
Laurent Peuch
54c9b8be10 [fix] we need absolute path for meltdown check 2018-01-17 19:00:35 +01:00
Laurent Peuch
177914ee00 [fix] useful error messages for meltdown check 2018-01-17 19:00:24 +01:00
Laurent Peuch
a58449ad51 [fix] wrap 'meltdown' diagnosis call in try/catch 2018-01-17 18:59:48 +01:00
Laurent Peuch
6078e42ed9 [fix] wrap 'nginx -t' diagnosis call in try/catch 2018-01-17 18:59:34 +01:00
Alexandre Aubin
de4d4fdd37 Moving spectre/meltdown checker script to vendor folder 2018-01-13 21:20:35 +01:00
Alexandre Aubin
3026035e41 Use --variant 3 to directly check Meltdown only 2018-01-13 21:18:09 +01:00
Laurent Peuch
f46351c7c5 [enh] uses speed47 script to check for meltdown vulnerability 2018-01-13 05:30:20 +01:00
Laurent Peuch
a934b3fd19 [mod] move spectre-meltdown check to diagnosis function 2018-01-13 05:20:50 +01:00
Laurent Peuch
b60d8ca822 [enh] add new api entry point to check for meltdown vulnerability 2018-01-13 05:20:27 +01:00
Laurent Peuch
ae6f65141a
Merge pull request #410 from YunoHost/fix_diagnosis_disk_not_available
[fix] was replacing the dictionnary with a string and thus breaking everything
2018-01-12 01:57:09 +01:00
Laurent Peuch
7363892794
Merge pull request #412 from YunoHost/backports_packages_in_diagnosis
[enh] display backports .deb in diagnosis
2018-01-12 01:54:53 +01:00
Laurent Peuch
935f609136 [enh] display backports .deb in diagnosis 2018-01-12 01:54:13 +01:00
Laurent Peuch
de3e5bed25
Merge pull request #411 from YunoHost/regen_conf_in_diagnosis
[enh] display regen-conf in private diagnosis
2018-01-11 15:53:50 +01:00
Laurent Peuch
27b8dc392f
Merge pull request #389 from YunoHost/clean-postinstall-firewall
Use systemd for all service operations (+ update postinstall firewall enable/start)
2018-01-11 14:15:17 +01:00
Laurent Peuch
2b2676a9c1 [enh] add nginx -t output to diagnosis 2018-01-11 04:49:21 +01:00
Laurent Peuch
97fea34124 [enh] display regen-conf in private diagnosis 2018-01-07 20:23:00 +01:00
Laurent Peuch
0922568d64 [fix] was replacing the dictionnary with a string and thus breaking everything 2018-01-07 17:34:27 +01:00
Alexandre Aubin
465aff4581 Be able to fetch a single migration by its name 2018-01-06 20:51:20 +01:00
Alexandre Aubin
fd23216544 [mod] Use proper functions to enable/start firewall during postinstall 2017-11-27 22:17:09 +01:00
Alexandre Aubin
5ae558edc9 [fix] Clean madness related to DynDNS (#353)
* Add a function to check if a dyndns provider provides a domain
* Add a function to check a domain availability from a dyndns provider
* Use new functions in dyndns_subscribe
* Replace complete madness by _dyndns_available in dyndns_update
* This regex is only used in dyndns_update, no need to define it at the whole file scope level
* Try to clarify management of old ipv4/ipv6 ...
* Add a nice helper to get both ipv4 and ipv6...
* Clarify the dyndns_update madness to get current ipv4/v6
* Remove now useless IPRouteLine
* Change default values of old ipv4/v6 to None, otherwise shit gets update just because IPv6 = None
* Rearrange thing a bit, move path to global variable
* Copypasta typo
* Dyndns zone file as a global variable
* Use helper to write zone content to file
* Adding some debugs/info messages
* Move the domain guessing to a dedicated function...
* Adding comments..
* Using subprocess check_call instead of os.system for nsupdate
* Removing dump of the zone update because it's kinda duplicated from what nsupdate already does
* Ignore error if old_ipvx file is non existent
* Add docstring for _dyndns_available
* Remove parenthesis otherwise this gonna displease Bram-sama :P
* Start working on postinstall .. use _dyndns_provides to check if domain is a .nohost.me or .nohost.st
* Use _dyndns_available to cleanly check for domain availability
* Forget about the weird 'domain split' check...
* Clean dyndns stuff in domain.py
* Missing argument for string
2017-10-08 23:44:07 +02:00
Laurent Peuch
0dbec4fa62 [enh] add debugging in ldap init (#365) 2017-09-06 22:00:17 +02:00
Laurent Peuch
fea6d3568f [fix] previous string was expecting an app name but we don't have any 2017-08-28 18:00:23 +02:00
Alexandre Aubin
950359061e [fix] Set firewall start as background task (to be done right after postinstall) to avoid lock issues 2017-08-23 02:02:44 +02:00
Laurent Peuch
40ea2f9477 [mod] pep8 on tools.py 2017-08-20 21:18:25 +02:00
Laurent Peuch
4f1cf058c2 Merge pull request #351 from YunoHost/dev_shell
Integrate a command to launch a dev shell from within moulinette context
2017-08-18 04:12:25 +02:00
Laurent Peuch
4e1a839557 [enh] can do a 'yunohost tools shell -c command' à la python -c 2017-08-15 17:24:26 +02:00
Laurent Peuch
52c7a37a78 [enh] add 'yunohost tools shell' 2017-08-15 17:18:50 +02:00
Laurent Peuch
970d9b0207 [fix] uses strong hash for admin password 2017-08-15 12:52:44 +02:00
Laurent Peuch
02ea0c0656 [enh] Add reboot/shutdown actions in tools (#190)
* [enh] Implements shutdown/reboot helpers.
* [enh] Improve reboot/shutdown help.
2017-08-11 16:16:09 +02:00
Laurent Peuch
a441f37454 Migration framework (#195)
* [enh] list migrations
* [enh] first version of the migrate command
* [mod] add todo comment
* [mod] migrate command shouldn't return anything
* [mod] rename yunohost_migrations to data_migrations
* [mod] better regex
* [enh] had base class for migration
* [fix] inverted condition
* [enh] save last runned migration
* [enh] add migrations state command
* [mod] add todo comments
* [mod] error handling
* [mod] DRY
* [doc] more comment
* [enh] handle exceptions on migration
* [mod] error handling
* [mod] DRY
* [enh] error handling
* [mod] this is done earlier
* [doc] docstring
* [enh] handle fail to load migration case
* [doc] add TODO Comment
* [fix] typos, thx ju
* [enh] add a migration to remove archivemount (as an example)
* [fix] check_call is boring
* [enh] support forward/backward migrations
* [mod] I don't need auth
* [fix] apt is expecting input...
* [mod] save it as int
* [mod] add some logging
* [doc] update todo
* [fix] I also need to run backward latest runed migration
* [enh] add target cli argument
* [enh] fake migration
* [enh] uniformly convert to int at the same place
* [fix] we need to filename now
* [enh] validate input
* [enh] handle 0 special case
* [mod] rename fake to skip
* [mod] s/runed/run/g
* [doc] anglich typo in comments
* [mod] more explicit error message
* [mod] more typo
* [doc] put comment in the right place
* [mod] typo
* [fix] forgot to cape migrations by target
* [fix] typo
* [mod] uses moulinette helpers
* [enh] launch migrations during package upgrade
* [mod] remove unused import
* [mod] sort translation keys
* [enh] i18n
* [fix] missing __init__.py in data_migrations
* [mod] move to a subcategory
* Typo / caps / consistency
* [fix] forgot that migrations is now in tools, in postinst
* Skip migrations during postinstall
* Remove archivemount example migration
It relied on apt-get, which can't be used during 'postinst' debian scripts because we're already inside a apt
* Add migration for cert group from 'metronome' to 'ssl-cert'
2017-08-07 15:55:18 +02:00
Laurent Peuch
baf0d098f5 [mod] explicitely import previously globals magic variables 2017-07-25 21:32:20 +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
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
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
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
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
Alexandre Aubin
86f0978dfb Cleaner postinstall logs during CA creation (#250) 2017-03-29 02:39:00 +02:00
opi
08760df0ec [fix] Regenerate SSOwat conf during main_domain operation. #672 2017-03-14 22:22:01 +01:00
Alexandre Aubin
1d561123b6 [enh] Set main domain as hostname (#219) 2017-02-13 16:07:09 +01:00
Laurent Peuch
f6c7702dfa [mod] rename all global variables to uppercase 2017-02-12 03:34:15 +01:00