The user may have run the user-setup script previously, or they may
already belong to the 'kvm' group to begin with, so avoid running the
usermod command in these situations.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The "image-creator" and "koji-client-files" subdirectories are named as
such to reflect their purpose from long ago. In the present, the names
are confusing, so I am shuffling files around a bit to reflect current
usage.
All conf files (or conf file templates) have been moved to "conf"
instead, and some documentation has been added to explain what the files
are used for, and how they can be customized.
Also, after moving the conf files, the last file remaining in one of the
old subdirectories is "start_qemu.sh", so move it to the toplevel dir.
We could eventually move the miscellaneous scripts into a dedicated
directory too, but I will save that for another time.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The common tooling behavior changed a while back with respect to the
mock config usage, so update the user-setup script to reflect the
changes. Also add documentation about how to customize the mock config,
which can be leveraged to revert back to the original behavior as well.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
To enable future shared workflows between the common tooling and mixer,
create a directory named 'mix' within the tooling workspace.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Support both absolute and relative paths for the cert options, instead
of relative paths only, by using realpath(1) to resolve the arguments.
(Note that the script cannot reference the path arguments verbatim
because much of the script operates in the workspace's toplevel
directory, which is a different location than where the script is
invoked. In that situation, relative paths would not resolve.)
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Because the package repo cloning process can take a lot of time, do not
clone them by default. Instead, add a new --clone-packages|-a option to
perform this task.
Also, immediately before the script exits, document some possible next
steps when *not* cloning package repos (the new default).
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
To allow setting up multiple workspaces in the same directory, or if the
name "clearlinux" is not the desired name, add a --directory|-d option
to let the user configure it.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Since Clear Linux has many package repos, cloning them all in serial can
take a long time. Add a -j option to the script to let users speed up
the process.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
If you run `newgrp kvm` after the user-setup script completes, and then
proceed to run `make build`, `make autospec`, etc. within a package
repo, mock will fail because it tries to `groupadd mockbuild` in the
package chroot with the wrong group ID. Logging out and logging back in
results in correct behavior, so leave that as the sole recommendation.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>