Commit Graph

1633 Commits

Author SHA1 Message Date
Brian C. Lane
21ab321558 Automatic commit of package [lorax] release [19.7.28-1].
Created by command:

/usr/bin/tito tag
2020-05-14 13:53:44 -07:00
Brian C. Lane
06a242aa0a rhel7-livemedia: Increase the rootfilesystem size
In some cases a livemedia-creator run doesn't have enough space to
install all the packages. Increase the size by 500M to increase the
chances of this working with the defaults.

Resolves: rhbz#1829204
2020-05-14 11:59:25 -07:00
Brian C. Lane
3d11e7026e Automatic commit of package [lorax] release [19.7.27-1].
Created by command:

/usr/bin/tito tag
2020-04-20 09:54:09 -07:00
Brian C. Lane
533a0cb309 Change --make-pxe-live --no-virt to use a fsimage
Instead of a partitioned disk image. This will allow a single pass
of lmc to be used to create an ostree live PXE image.

Resolves: rhbz#1802591
2020-04-17 09:33:09 -07:00
Brian C. Lane
b81a8516a0 Makefile: Add the ability to use podman instead of docker
Run with 'DOCKER=podman make test-in-docker' to run the tests using
podman.

Related: rhbz#1472622
2020-03-04 17:37:55 -08:00
Brian C. Lane
6473143f44 tests: Add tests for _install_branding with and without variant
This adds tests to make sure that the changes to _install_branding are
working as expected.

Related: rhbz#1472622
2020-03-04 17:37:10 -08:00
Brian C. Lane
d22ebad3d2 lorax: Move get_yum_base_object into pylorax.yumbase
This will make it easier to run tests.

Related: rhbz#1472622
2020-03-04 17:33:41 -08:00
Brian C. Lane
bebec0cf58 lorax: Update how the release package is chosen
Previously the release package was chosen by picking the first package
that provides 'system-release' that isn't named generic. This can cause
branding issues with repos containing multiple system-release packages.

This patch changes _install_branding so that it will give preference to
a system-release package that ends with lowercase --variant name. If
there isn't one it will fall back to the previous behavior.

Resolves: rhbz#1472622
2020-03-03 17:18:34 -08:00
Brian C. Lane
970a39f296 Automatic commit of package [lorax] release [19.7.26-1].
Created by command:

/usr/bin/tito tag
2019-12-16 09:34:59 -08:00
Brian C. Lane
4defe98a0d Remove unneeded scap-security-guide files
This removes all of scap-security-guide except for ssg-rhel7-ds.xml

Related: rhbz#1779659
2019-12-13 10:46:59 -08:00
Brian C. Lane
c8bb73d9a5 Automatic commit of package [lorax] release [19.7.25-1].
Created by command:

/bin/tito tag
2019-06-04 11:57:37 -07:00
Brian C. Lane
8f5444aad2 lorax: Add --rootfs-size
This controls how big the root filesystem is for the squashfs used in
the boot.iso, the default is 2GiB.

Note that larger rootfs sizes will require more memory and may cause the
build to fail.

(cherry picked from commit 37d36daa9c)

Resolves: rhbz#1715116
2019-06-04 10:33:03 -07:00
Brian C. Lane
2aa2ea4404 lorax: pass size from Lorax.run to create_runtime
This allows Lorax class users to specify the image size when calling
run()

(cherry picked from commit 9e979f760b)

Related: rhbz#1715116
2019-06-04 10:32:36 -07:00
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