Commit Graph

31 Commits

Author SHA1 Message Date
Gaël PORTAY
e9e4be1c60 [umount] Fix list of mount-points to unmount
The root mount-point can end with a / while the mount-point read from
the file /etc/mtab does not end with a /.

This leads to skip the unmounting of the root mount-point and causes the
removal of the root mountpoint directory to fail with EBUSY because it
is still mounted.

This uses the python functions os.path.normpath() to normalize the root
mount-point (i.e. to drop the trailing /) and os.path.commonprefix() to
determine the longest common prefix between the two mount-points. If the
returned prefix is identical to the normalized root mount-point then the
mount-point must be added to the list of the mount-points to unmount.

More generally, the python modules should rely on the os.path functions
to compare for paths instead of using strings. It covers this way lots
of corner cases (path with "//", "/../", "/./", ...).
2020-11-04 08:37:22 -05:00
Adriaan de Groot
1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
2020-08-26 02:28:38 +02:00
Adriaan de Groot
863a4cc2a4 REUSE: (GPL-3.0-or-later) Python modules 2020-08-26 02:22:49 +02:00
Adriaan de Groot
1b23520f20 REUSE: (CC0-1.0) module descriptors and configuration files
In spite of there being considerable documentation sometimes in the
config file, we go with CC0 because we don't want the notion of
'derived work' of a config file.

The example `settings.conf` is also CC0. Add some docs to
it while we're at it.
2020-08-26 02:22:49 +02:00
Adriaan de Groot
86f66e8f16 REUSE: (GPL-3.0-or-later) all the schema files
- these are vaguely derived from the schema's written by
  artoo@manjaro.org, but totally re-done for JSON-Schema
2020-08-26 02:01:58 +02:00
Adriaan de Groot
efab699479 [umount] Fix schema -- prefer *preservefiles* for keeping the log 2020-08-12 10:29:13 +02:00
Adriaan de Groot
4a07bd4ae3 CI: import all the rest of the YAML schema
- These have **not** been fixed for validation, so the schema's themselves
  will fail to load. This is a consequence of variations in JSON-Schema
  representations through various drafts. Fixing the schemata is
  fairly straightforward.

This gives us 19 new tests, all of which fail.
2020-06-16 16:06:56 +02:00
Adriaan de Groot
c59af8881c [umount] Avoid SIGPIPE
- collect output from umount process, and then ignore it
2020-04-21 16:13:19 +02:00
Kevin Kofler
02c7fe8345 [umount]: Fix default srcLog in umount.conf
Also fix the introductory comment, which also contained the old
location.
2019-05-06 15:01:30 +02:00
Adriaan de Groot
247a0e3a56 [umount] Make a pretty_name() 2018-02-20 04:49:51 -05:00
Adriaan de Groot
060990bdd0 Python: use warning() method in modules 2018-02-20 04:42:56 -05:00
Adriaan de Groot
2a0a2a26bc [umount] Don't raise when copying log file fails. 2018-01-03 05:01:38 -05:00
Adriaan de Groot
6f7b5a0510 [umount] Move module documentation into config file, fix wording
FIXES #831
2018-01-03 04:33:20 -05:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Adriaan de Groot
7e87e3ccb5 Configs: fix trivial spelling error 2017-06-02 15:43:07 +02:00
Teo Mrnjavac
097f48bfed Try to fix umount. 2016-01-21 14:46:02 +01:00
Teo Mrnjavac
f81f275b38 Oh come on Python. 2016-01-21 12:09:42 +01:00
Teo Mrnjavac
9621fd4635 Python :C 2016-01-21 11:56:55 +01:00
Teo Mrnjavac
19f207ed42 Don't crash on bad log path. 2016-01-21 11:31:45 +01:00
demmm
11922e074d set default umount.conf to not find any file
adjust readme to refelect option to also use default Calamares.log
2016-01-14 12:40:08 -05:00
demmm
50ffc52f3f Creating the option to copy an install log to target
instead of having to hope users save an installation log before leaving live mode,
this commit gives distributions the option to have a full calamares -d log available on
the newly installed system
see the readme.md for details
this is fully tested and working properly, using the example launcher script & .desktop line
as noted in the readme
2016-01-13 16:11:55 -05:00
Gormogon
bc66502fda Some more PEP 2015-06-14 07:25:37 -04:00
Philip
d22e194ee7 [umount] add python doc strings 2015-02-25 14:49:23 +01:00
Gormogon
113d9db7cb Python Better Docstrings 2015-02-25 14:49:23 +01:00
Gormogon
8e1480431a [PEP 263] Corrected Encoding Headers 2015-02-18 09:06:10 -05:00
Manjaro Linux
eee54241d1 [umount] use lazy switch
in some rare cases you can't unmount your mountpoints. As it is the last step we can use lazy switch to force unmounting.
2014-11-28 22:32:38 +01:00
Teo Mrnjavac
8f10c21e5b Big configuration overhaul.
Module descriptors are now module.desc, no configuration allowed inside.
Module config files are <modulename>.conf, installed in
share/calamares/modules.
settings.conf is read from /etc/calamares, then share/calamares, and if
running with --debug also in the current dir.
Module config files are read from /etc/calamares/modules, then
share/calamares/modules, and if running with --debug also in
src/modules/<modulename> relative to the current dir.
2014-08-06 11:54:45 +02:00
Teo Mrnjavac
2b097e7f3c PEPify umount 2014-07-29 14:53:07 +02:00
Teo Mrnjavac
4fc2efb7fa Correctly report exit status from Python modules. 2014-07-28 17:40:57 +02:00
Teo Mrnjavac
beafcd9cc4 Consistency: calamares_main ==> run; global_storage => globalStorage 2014-07-25 16:46:12 +02:00
Aurélien Gâteau
92114576ce Create umount module 2014-07-24 13:51:14 +02:00