23 Commits
Author SHA1 Message Date
Mark D Horn 4d119cad7f swupd: Update help to be more accurate
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-29 18:11:52 -07:00
Mark D Horn b04333bc87 swupd: Add support for swupd --certpath
Fixes: #228

Enable the use of an alternate swupd certificate path.
Needed for mixes.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-29 18:11:52 -07:00
Mark D Horn 55df2389ae network: Always copy /etc network files
When executing interactively, text-base or graphical, we want
to always copy any local /etc network configuration files to
the target system.

If the user has made customer network settings, usually with
nmcli/nmtui for console, or NetworkManager on the desktop, these
will want to be propagated to the target.

Add command line option to avoid network copy.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-15 12:52:04 -07:00
Brian J Lovin d9c915b94f Add system checker command line option
Add a new command line option --system-check.

When run with this option, run a system chcker and exit with a 0 or 1
for passing/failing.

Checks for required CPU features using procfs and EFI firmware using
sysfs. Prints status and results to stdout.

Signed-off-by: Brian J Lovin brian.j.lovin@intel.com
2019-04-24 16:56:14 -07:00
Mark D Horn cff36aa736 Generate ISO Framework hook
Create the command line argument and configuration file changes
to support generating an ISO from the raw image.

TODO: Integrate the ISO generation code

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 15:06:47 -07:00
Mark D Horn 685ae93433 swupd: bug fix for state dir init
The initial value will be set incorrectly if the swupd mirror site is set.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-22 12:05:48 -07:00
Mark D Horn 786a1f27b5 Download User Messages
New functionality to download Pre and Post Installer messages
TODO: Display the messages as pop-ups
- Need to use system curl command to handle proxies for now

Refactoring for enabling:
- Moved FetchRemoteConfigFile from conf to network
- Move code for Clear Linux Version parsing until a utility function
  which is called early in the flow for reuse

Now that use external curl FILE protocol passes.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-11 17:11:55 -07:00
Reagan Lopez f61d7092ab Add support for ister json config
- The new -j flag detects ister json config format and converts it to yaml
- The existing -c flag also detects ister json config format, converts it to yaml
  and continues as usual
- Handles the ister "rest" option for physical targets
- Handles multiple targets

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-03-05 13:55:44 -08:00
Mark D Horn 4667cb8dac New Option to clean-up swupd state directory
Fixes #215

We already default to placing the swupd state cache directory
in the installation target. This change implements the only
missing part of the request to allow removing the state directory.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-02-14 16:59:21 -08:00
Mark D Horn c43135f6ee Support Encrypted partitions
Fixes #10

Enable encrypted partitions for all but /boot.

A single passphrase is used for all partitions which enable encryption
expect swap, which currently uses a random password each boot.
NOTE: If we need to support a large swap for laptop suspend/restore, we
should change from a random passphrase to the same known passphrase.

/etc/crypttab will attempt to use either the disk label or the
UUID to identify the disk instead of the physical disk name.

Swap partition would normally loose its UUID or Label each boot
due to dm-crypt and mkswap overwriting the connect. To maintain
identification of the partition, we use a trick from here:
https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption
of creating a small (1M) ext2 partition with label at the beginning
of the swap partition, then use an offset in the /etc/crypttab to
prevent overwriting this information.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Leandro Dorileo cc5db70e9e args: make --skip-diskspace-check optional
Add an argument to enable or disable the swupd's --skip-diskspace-check
argument.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-11-08 15:41:02 -08:00
Leandro Dorileo 536f80ea30 swupd: add new flags
Add the swupd's --format, --contenturl and --versionurl arguments.
These arguments are mapped with the --swupd prefix such as:
--swupd-format, --swupd-contenturl and --swupd-versionurl

And are used for constrained environments dealing with local installs,
specially with image generation in a network isolated environment.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-11-08 15:41:02 -08:00
Leandro Dorileo b44176d93b args: add StubImage argument
With this argument (either -S or --stub-image) we create the image
- if that's the case - and create the target file systems but don't
actually install content.

It's useful for pre-release validation where the content is generated
and dealt by the release tooling.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-19 10:42:55 -07:00
Mark D Horn 245114f669 Allow setting Log-Level via kernel parameter
To enable debugging of an installation the log level may need to
be set via a kernel parameter as the installer should launch upon boot.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-16 16:47:50 -07:00
Mark D Horn dfe87189fd Change default log level to Info
Remove debug information by default.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-16 16:47:50 -07:00
Leandro Dorileo 1074784a7a args: add --swupd-state
When creating images it's useful to have a --swupd-state to provide
an state dir outside the image so we don't duplicate the target's
content.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo 0742f0f521 args: add --block-device argument
With the --block-device command line argument the user can remap
or add an entry to configuration file's block-devices definition.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Mark D Horn eb0c9a22f6 More temp file clean up
- Hid the makefile comment
- Catch additional test case that need to clean up the
  temp downloaded file

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-03 12:22:51 -07:00
Leandro Dorileo eb8c990d56 args: rename --mirror to --swupd-mirror
Preventing future confusions (when we implement dnf support) rename
the --mirror argument to --swupd-mirror and start creating a namespace
for the arguments.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-02 16:27:34 -07:00
Mark D Horn e550ed70ea Clean Up all temporary files and directories
Ensure both the main code and test clean up after themselves.

Testing for changes in the /tmp directory done in the Makefile
to ensure the testing is done outside of the code itself.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-02 16:24:45 -07:00
Leandro Dorileo 5c1b69c8d4 testsuite: prepare to enable check-coverage.sh on CI
This patch fixes the tests coverage regressions and add a small fix
to the script where it doesn't remove the temporary coverage report
file if it fails. Now it can be enabled on the CI and avoid adding
new testsuite regressions.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-19 15:56:54 -07:00
Leandro Dorileo f7acd9b8c8 args: make linters happy
FPrintf's return wasn't being checked, this patch makes the linter
happy by checking the error condition.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-07 10:58:40 -07:00
Mark D Horn e84bb0e403 First Open Source push of code base
This is code is still alpha. The Text-based User Interface is
undergoing a resign of the layout before beta.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-08-13 14:14:30 -07:00