Commit Graph

1620 Commits

Author SHA1 Message Date
Jan Stodola
15772acfd1 Fix path to generic.prm
Also quote ${extra_boot_args} as in the other templates

Resolves: rhbz#1712491
2019-05-23 11:06:19 +03:00
Brian C. Lane
5f050669e6 Automatic commit of package [lorax] release [19.7.24-1].
Created by command:

/bin/tito tag
2019-04-29 09:07:04 -07:00
Brian C. Lane
f5b781a9e6 Update PPC isolabel to allow escaping spaces
Escaped spaces is supported, so remove the extra filtering of the
isolabel on PPC so that it uses the same form as the other arches.

eg. inst.stage2=hd:LABEL=RHEL-7.7\x20Server.ppc64le for an iso with a
label of 'RHEL-7.7 Server.ppc64le'

Resolves: rhbz#1402328
2019-04-29 08:57:25 -07:00
Brian C. Lane
d2bf2edad2 Automatic commit of package [lorax] release [19.7.23-1].
Created by command:

/usr/bin/tito tag
2019-04-04 11:55:03 -07:00
Brian C. Lane
12da07a8f6 lorax: Install redhat-release-eula
Resolves: rhbz#1696335
2019-04-04 11:02:40 -07:00
Brian C. Lane
a4f6f78c2c Automatic commit of package [lorax] release [19.7.22-1].
Created by command:

/bin/tito tag
2019-03-26 11:37:20 -07:00
Brian C. Lane
05128a76fd Improve logging for template syntax errors
The shlex splitting can fail, resulting in error messages like:

ERROR livemedia-creator: No closing quotation

without any context in the log files. This logs the line that failed to
be split and expanded.

Related: rhbz#1689314
2019-03-26 11:29:30 -07:00
Brian C. Lane
c15a976832 Add extra boot args to the livemedia-creator iso templates
This adds a new livemedia-creator argument, --extra-boot-args, which can
be used to add arguments to the kernel command-line in the templates.

Resolves: rhbz#1689314
2019-03-26 11:29:30 -07:00
Brian C. Lane
7c1f29af5a Use hd:LABEL= for inst.stage2 on ppc
This allows USB drives to boot as well as the iso.  Also switch the
isolabel to follow the x86 format and use '-' instead of '_'.

Based on upstream commits:
c53de4e63c
372bef945f

Resolves: rhbz#1402328
2019-03-26 11:26:08 -07:00
Brian C. Lane
1f89fdbfe3 Don't remove chmem and lsmem from install.img
Resolves: rhbz#1511358
2019-03-18 16:21:50 -07:00
Brian C. Lane
3537fb784a Automatic commit of package [lorax] release [19.7.21-1].
Created by command:

/bin/tito tag
2019-03-18 09:31:41 -07:00
Brian C. Lane
376c480691 Do not include /usr/bin/delv
It changed packages, and was never included before so add it to the
binaries removed from bind-utils.

Resolves: rhbz#1688767
2019-03-18 09:24:57 -07:00
Brian C. Lane
69df5f2362 Remove SELinux Permissive checks
Anaconda, Lorax, lorax-composer, and livemedia-creator can all now run
with SELinux in Enforcing mode. It does not need to be disabled and if
there are denials they should be reported as a bug.

Log the current state of SELinux when starting, update the
documentation.

Resolves: rhbz#1654795
(cherry picked from commit 482d6277e0)
2019-03-15 16:24:19 -07:00
Brian C. Lane
4f373dcc10 Remove lorax-composer tests
The lorax-composer package handles running tests for itself, lorax should
only be running the lorax tests.

Resolves: rhbz#1679798
2019-02-27 09:10:39 -08:00
Brian C. Lane
3a1d7da06e Automatic commit of package [lorax] release [19.7.20-1].
Created by command:

/bin/tito tag
2019-02-25 11:09:26 -08:00
Brian C. Lane
18ee6a2a89 Add cancel_func to virt and novirt_install functions
In addition to monitoring the logs for errors, call a function (or
functions) that tell it to cancel the anaconda process and cleanup.

Also check for a cancel after creating the squashfs image for live-iso
since that's a long running process.

This required adding a new argument to a number of existing functions,
passing it down to VirtualInstall and novirt_install where the function
is called.

Resolves: rhbz#1659129
2019-02-21 14:14:36 -08:00
Brian C. Lane
81ce55a1e5 lorax: Move default tmp dir to /var/tmp/lorax
If systemd's tmpfiles.d timer is executed while lorax is running it will
remove any files and directories older than 30 days. This is what has
been causing the occasional error where /proc/ would seem to vanish
during the install.

Upstream has proposed this solution, https://github.com/systemd/systemd/pull/11482
but until that is released we need a work-around to protect the lorax
files.

This commit does several things:

* Move the default tmpdir from /var/tmp/ to /var/tmp/lorax/
* Add a lorax.conf tmpfiles.d file that prevents systemd-tmpfiles from
  removing anything under /var/tmp/lorax/
* Add an exit handler to lorax so that temporary directories are removed on
  exit or on a python traceback.
* Use flock to lock access to the tempdir while lorax is running.
* Remove any unlocked tempdirs named /var/tmp/lorax/lorax.* at startup

Note that the exit handler will not remove the tempdir if lorax is
killed with a signal -- those are being caught by dnf and prevent the
exit handler from running.

systemd-tmpfiles cannot clean up the tempdirs at boot time because they
contain files labeled as shadow_t, so we have to remove those when lorax
runs. It uses the flock to prevent removing any directories created by
parallel instances of lorax and only removes ones that are unlocked.
Worst case they will be around until the first run of lorax after a
reboot.

If you want to keep the working directory around for debugging purposes
use --workdir /var/tmp/lorax/my-workdir and it won't be removed by
lorax.

Resolves: rhbz#1668520
2019-01-22 17:12:56 -08:00
Alexander Todorov
fffb03d5c3 New cli test covering basic compose commands
- need to specify --sharedir so lorax-composer can find its
  kickstart files

- each test script writes results into a separate directory to
  avoid a passing test overwriting the results from a failing one.
  To avoid reporting failures in case of previously failing tests
  (e.g. during development) remove the temporary directories holding
  tets results before execution!
2018-10-01 12:35:23 +02:00
Alexander Todorov
1ba7613036 Execute bash tests for composer-cli
these are built on top of beakerlib and we use its internal
protocol to figure out the result without relying on the full
test runner that is tipically used inside of a RHEL environment!

Includes a disabled test snippet for Issue #460
2018-10-01 12:35:23 +02:00
Brian C. Lane
ccf34b1913 Add pylint testing
This adds pylint testing via make check, using the framework from
Anaconda. False positives can be added to
./tests/pylint/pylint-false-positives
2018-10-01 12:35:23 +02:00
Brian C. Lane
bbbd805909 Automatic commit of package [lorax] release [19.7.19-1].
Created by command:

/usr/bin/tito tag
2018-08-15 12:43:28 -07:00
Brian C. Lane
5499fed441 Add documentation for --dracut-arg to lorax.1
And update documentation for lorax-composer. Make it clear that to pass
the arguments you must single quote them. Like so:

--dracut-arg='--xz'

And that all dracut args must be passed, since it overrides the
defaults.

Related: rhbz#1452220
2018-08-15 09:03:32 -07:00
Brian C. Lane
245e0e84df Add the dracut options to the lorax help output
Related: rhbz#1452220
2018-08-15 09:03:32 -07:00
Brian C. Lane
e3b1292262 Automatic commit of package [lorax] release [19.7.18-1].
Created by command:

/usr/bin/tito tag
2018-06-21 10:21:23 -07:00
Brian C. Lane
1566f3d10f Add redhat.exec to s390 .treeinfo
Resolves: rhbz#1593657
2018-06-21 08:24:31 -07:00
Brian C. Lane
9fff793dff Automatic commit of package [lorax] release [19.7.17-1].
Created by command:

/usr/bin/tito tag
2018-06-19 14:09:05 -07:00
Brian C. Lane
c4417470da Exclude lorax-composer and composer-cli code from the lorax build
These will be built in Extras from the rhel7-extras branch using the
lorax-composer package name.

Resolves: rhbz#1547759
2018-06-19 11:56:40 -07:00
Brian C. Lane
bb8c7851d2 Fix composer-cli command help text
sources shouldn't be indented
details for a compose are 'details' not 'info'
2018-06-18 10:45:36 -07:00
Brian C. Lane
2ddad4dd82 Automatic commit of package [lorax] release [19.7.16-2].
Created by command:

/usr/bin/tito tag --keep-version
2018-06-15 10:46:25 -07:00
Brian C. Lane
9eb7c0d206 Fixup the lorax.spec after rebasing on 19.6.105-1
Also correct some long running rpmlint complaints.

Resolves: rhbz#1547759
2018-06-15 10:44:31 -07:00
Brian C. Lane
ba76efba14 Automatic commit of package [lorax] release [19.7.16-1].
Created by command:

/usr/bin/tito tag
2018-06-11 16:54:59 -07:00
Brian C. Lane
4bfcd8fcd2 Remove SortMode from list_commits
The current version of libgit2 available (0.26.3) has different behavior
with SortMode.TIME. It works correctly when left at the default (which
is also how the rawhide version works).
2018-06-11 16:54:59 -07:00
Brian C. Lane
3cfb895054 Use yum.add_enable_repo() for new repos
Yum needs to have some other attrs setup on the YumRepository object, so
use the function provided to ensure that everything is correct. Also
switch the related functions to use a dict instead of a YumRepository
object.
2018-06-11 16:54:59 -07:00
Brian C. Lane
957def1264 Add support for sources to composer-cli
This adds the sources command which can be used to list, add, change,
and delete sources using the TOML formatted source file.
2018-06-11 16:54:59 -07:00
Brian C. Lane
a5eaebeefc yum repos has a delete() function. But it doesn't clear the cache.
yum also has a cache it uses for listEnabled(), but the cache isn't
invalidated when a repo is deleted it any following metadata update
will fail because it is still using the deleted repo.

We are forced to use the heavy hammer on a yum private variable yet
again to force the cache to be cleared so that it won't crash.
2018-06-11 16:54:59 -07:00
Brian C. Lane
2e95b56508 Fix DNF related issues with source selection
yum TumRepository.dump() function cannot be used as a .repo file Add a
new function to write this in the correct format, and limited to the
fields we use.

Add a test for the new function.

Fix /projects/source/info to return an error 400 if a nonexistant TOML
source is requested. If JSON is used the error is part of the standard
response.

Update test_server.py to check for the correct error code.
2018-06-11 16:54:59 -07:00
Brian C. Lane
3f7997d7ae Fix handling bad source repos and add a test
When adding a source failed it wasn't being removed from the dnf object.
This fixes that, and returns an error when setting up the source fails.
Also adds a test for it.
2018-06-11 16:54:59 -07:00
Brian C. Lane
f1000b448d Make sure new sources show up in the source/list output
Also remove an unneeded makedirs from test_server.py
2018-06-11 16:54:59 -07:00
Brian C. Lane
25bae61520 Fix make_dnf_dirs
It was chopping off an extra directory level due to realpath removing
the trailing / from the paths when they are setup.
2018-06-11 16:54:59 -07:00
Brian C. Lane
33c84331fe Add support for user defined package sources API
This lives under /api/v0/projects/source/*

See the documentation for details
2018-06-11 16:54:59 -07:00
Brian C. Lane
82c8c3a491 gevent has deprecated .wsgi, should use .pywsgi instead
https://github.com/gevent/gevent/blob/master/doc/api/gevent.wsgi.rst
(cherry picked from commit c9ca451568)
2018-06-11 16:54:59 -07:00
Brian C. Lane
b99d8d7f6b Add support for version globs to blueprints
You can use '*' wildcards and '?' for single character matching.
2018-06-11 16:54:59 -07:00
Brian C. Lane
9e06f6e113 Automatic commit of package [lorax] release [19.7.15-1].
Created by command:

/usr/bin/tito tag
2018-06-11 16:54:59 -07:00
Brian C. Lane
ce715ad15f Check to make sure blueprints directory exists 2018-06-11 16:54:59 -07:00
Brian C. Lane
7745a019c0 lorax-composer also requires tar 2018-06-11 16:54:59 -07:00
Brian C. Lane
3c60f07d98 Remove temporary files after run_compose
A crash can also leave temporary lmc-* files, remove them as well.
2018-06-11 16:54:59 -07:00
Brian C. Lane
f26a6212d6 Add --proxy to lorax-composer cmdline
Overrides the [yum] proxy setting in the config file.
2018-06-11 16:54:59 -07:00
Brian C. Lane
9978503a69 Pass the --tmp value into run_creator and cleanup after a crash
Crashing can sometimes leave directories in /var/tmp/lmc-* so clean
those up after run_creator is finished.
2018-06-11 16:54:59 -07:00
Brian C. Lane
3a38a57ae1 Add --tmp to lorax-composer and set default tempdir
It was using /tmp/ which can fill up quickly when building images.
Default to /var/tmp unless the user passes --tmp /tmp/
2018-06-11 16:54:59 -07:00
Brian C. Lane
050f87168a Skip creating groups with the same name as a user
Otherwise the user creation fails when anaconda sees there is already a
group with that name. Log a warning and continue on.

(cherry picked from commit a363aee971)
2018-06-11 16:54:59 -07:00