Compare commits

..

18 commits

Author SHA1 Message Date
Brian C. Lane
4ae070aca1 - Add some extra cancel_func protection to QEMUInstall (bcl@redhat.com)
- installer: make sure cancel_func has a value (#612) (yuvalt@gmail.com)
2019-02-28 11:03:12 -08:00
Brian C. Lane
8d11d8ce4c - Remove duplicate repositories from the sources list (bcl@redhat.com)
- lorax: Move default tmp dir to /var/tmp/lorax (bcl@redhat.com)
2019-01-30 12:11:58 -08:00
Brian C. Lane
0763665c64 - Don't exclude /dev from the setfiles in novirt_install (awilliam@redhat.com)
- dracut-fips is no longer a subpackage, it is included in dracut.  (bcl@redhat.com)
2019-01-18 09:39:44 -08:00
Brian C. Lane
6bd2861ad6 - Remove unneeded else from for/else loop. It confuses pylint (bcl@redhat.com)
- Turn off pylint warning about docstring with backslash (bcl@redhat.com)
- Turn off smartquotes in Sphinx documentation (bcl@redhat.com)
- fixes #543 qemu -nodefconfig deprecated (afm404@gmail.com)
- fix spinx build warnings (afm404@gmail.com)
- Allow customizations to be specified as a toml list (dshea@redhat.com)
- Revert "lorax-composer: Cancel running Anaconda process" (bcl@redhat.com)
- Make sure cancel_func is not None (bcl@redhat.com)
2019-01-08 14:41:32 -08:00
Brian C. Lane
092ba52611 - lorax: Save information about rootfs filesystem size and usage (bcl@redhat.com)
- Turn on signed tags when using tito. (bcl@redhat.com)
- lorax-composer: Cancel running Anaconda process (bcl@redhat.com)
- Add cancel_func to virt and novirt_install functions (bcl@redhat.com)
- lorax-composer: Check for STATUS before deleting (bcl@redhat.com)
- Check for existing CANCEL request, and exit on FINISHED (bcl@redhat.com)
- Fix vhd images (vponcova@redhat.com)
2018-12-17 16:57:10 -08:00
Brian C. Lane
558cfaf63c - lorax-composer: Handle packages with multiple builds (bcl@redhat.com)
- lorax-composer: Check the queue and results at startup (bcl@redhat.com)
2018-12-06 16:22:14 -08:00
Brian C. Lane
bae5d736a1 - Adjust tmux version in the tests to 2.8 (bcl@redhat.com)
- New lorax documentation - 28.21 (bcl@redhat.com)
- lorax-composer: Install selinux-policy-targeted in images (bcl@redhat.com)
- Remove setfiles from mkrootfsimage (bcl@redhat.com)
- Remove SELinux Permissive checks (bcl@redhat.com)
- Add --no-system-repos to lorax-composer (bcl@redhat.com)
2018-11-29 15:01:26 -08:00
Brian C. Lane
7cf0a9de7f - New lorax documentation - 28.20 (bcl@redhat.com)
- Build manpages for composer-cli and lorax-composer (bcl@redhat.com)
- Add tests for ltmpl.py (bcl@redhat.com)
- Move get_dnf_base_object into a module (bcl@redhat.com)
- lorax: Fix dnf problems with selecting highest NEVRA from multiple repos (bcl@redhat.com)
2018-10-29 15:51:30 -07:00
Brian C. Lane
3aa0b902b5 - Fix directory creation for blueprints (bcl@redhat.com)
- Update the tests for new make_dnf_dir arguments. (bcl@redhat.com)
- Change make_dnf_dirs to be run as root (bcl@redhat.com)
- Disable false context-manager pylint error (bcl@redhat.com)
- Add an openstack image type (bcl@redhat.com)
- Add cloud-init to vhd images. (dshea@redhat.com)
- Replace /etc/machine-id with an empty file (dshea@redhat.com)
- Update cli tests to use composer-cli name (bcl@redhat.com)
- Work around dnf problem with multiple repos (bcl@redhat.com)
- Add and enable cloud-init for ami images (lars@karlitski.net)
- Make no-virt generated images sparser (dshea@redhat.com)
- Report an error if the blueprint doesn't exist (bcl@redhat.com)
- cli: Clarify error message for unprivileged access (lars@karlitski.net)
- Write a rootpw line if no root customizations in the blueprint (bcl@redhat.com)
- Add beakerlib to Dockerfile.test (bcl@redhat.com)
- Adjust the new templates for locked root (bcl@redhat.com)
- Always update repo metadata when building an image (bcl@redhat.com)
- Add a test for repo metadata expiration (bcl@redhat.com)
- Add tests for setting root password and ssh key with blueprints (bcl@redhat.com)
- Use rootpw for setting the root password instead of user (bcl@redhat.com)
- Lock the root account, except on live-iso (bcl@redhat.com)
- Add new compose types to compose sanity test (dshea@redhat.com)
- Also run `make check` on travis (lars@karlitski.net)
- Fix pylint errors and warnings (lars@karlitski.net)
- New cli test covering basic compose commands (atodorov@redhat.com)
- Execute bash tests for composer-cli (atodorov@redhat.com)
- Start a HACKING.md file and document how to run the tests (stefw@redhat.com)
- Ignore files created by tests (stefw@redhat.com)
- Makefile: Fix the 'make install' target (stefw@redhat.com)
- lorax: Only run depmod on the installed kernels (bcl@redhat.com)
- Add virt guest agents to the qcow2 compose (dshea@redhat.com)
- Add a vmdk compose type. (dshea@redhat.com)
- Add a vhd compose type for Azure images (dshea@redhat.com)
- Add an ami compose type for AWS images (dshea@redhat.com)
- Remove --fstype from the generated part line (dshea@redhat.com)
- New lorax documentation - 28.18 (bcl@redhat.com)
- Fix /compose/cancel API documentation (bcl@redhat.com)
2018-10-12 15:53:32 -07:00
Brian C. Lane
ee4c4fdcbb - Fix composer-cli blueprints changes to get correct total (bcl@redhat.com)
- Fix blueprints/list and blueprints/changes to return the correct total (bcl@redhat.com)
- Add tests for limit=0 routes (bcl@redhat.com)
- Add a function to get_url_json_unlimited to retrieve the total (bcl@redhat.com)
- Fix tests related to blueprint name changes (bcl@redhat.com)
- Add 'example' to the example blueprint names (bcl@redhat.com)
- Use urllib.parse instead of urlparse (bcl@redhat.com)
- In composer-cli, request all results (dshea@redhat.com)
- Add tests for /compose/status filter arguments (dshea@redhat.com)
- Allow '*' as a uuid in /compose/status/<uuid> (dshea@redhat.com)
- Add filter arguments to /compose/status (dshea@redhat.com)
- composer-cli should not log to a file by default (bcl@redhat.com)
- Add documentation for using a DVD as the package source (bcl@redhat.com)
- Set TCP listen backlog for API socket to SOMAXCONN (lars@karlitski.net)
- New lorax documentation - 28.17 (bcl@redhat.com)
- Add a note about using lorax-composer.service (bcl@redhat.com)
- Ignore dnf.logging when building docs (bcl@redhat.com)
- Fix a little bug in running "modules list". (clumens@redhat.com)
2018-08-27 15:50:11 -07:00
Brian C. Lane
6c84743bf8 - Fix bash_completion.d typo (bcl@redhat.com)
- Move disklabel and UEFI support to compose.py (bcl@redhat.com)
- Fix more tests. (clumens@redhat.com)
- Change INVALID_NAME to INVALID_CHARS. (clumens@redhat.com)
- Update composer-cli for the new error return types. (clumens@redhat.com)
- Add default error IDs everywhere else. (clumens@redhat.com)
- Add error IDs to things that can go wrong when running a compose.  (clumens@redhat.com)
- Add error IDs for common source-related errors. (clumens@redhat.com)
- Add error IDs for unknown modules and unknown projects. (clumens@redhat.com)
- Add error IDs for when an unknown commit is requested. (clumens@redhat.com)
- Add error IDs for when an unknown blueprint is requested.  (clumens@redhat.com)
- Add error IDs for when an unknown build UUID is requested.  (clumens@redhat.com)
- Add error IDs for bad state conditions. (clumens@redhat.com)
- Change the error return type for bad limit= and offset=. (clumens@redhat.com)
- Don't sort error messages. (clumens@redhat.com)
- Fix bash completion of compose info (bcl@redhat.com)
- Add + to the allowed API string character set (bcl@redhat.com)
- Add job_* timestamp support to compose status (bcl@redhat.com)
- Add etc/bash_completion.d/composer-cli (wwoods@redhat.com)
- composer-cli: clean up "list" commands (wwoods@redhat.com)
- Drop .decode from UTF8_TEST_STRING (bcl@redhat.com)
- Add input string checks to the branch and format arguments (bcl@redhat.com)
- Add a test for invalid characters in the API route (bcl@redhat.com)
- Fix logging argument (bcl@redhat.com)
- Update get_system_repo for dnf (bcl@redhat.com)
- Update ConfigParser usage for Py3 (bcl@redhat.com)
- Update StringIO use for Py3 (bcl@redhat.com)
- Add a test for the pylorax.api.timestamp functions (bcl@redhat.com)
- Fix write_timestamp for py3 (bcl@redhat.com)
- Return a JSON error instead of a 404 on certain malformed URLs.  (clumens@redhat.com)
- Return an error if /modules/info doesn't return anything.  (clumens@redhat.com)
- Update documentation (#409). (clumens@redhat.com)
- Use constants instead of strings (#409). (clumens@redhat.com)
- Write timestamps when important events happen during the compose (#409).  (clumens@redhat.com)
- Return multiple timestamps in API results (#409). (clumens@redhat.com)
- Add a new timestamp.py file to the API directory (#409). (clumens@redhat.com)
- Use the first enabled system repo for the test (bcl@redhat.com)
- Show more details when the system repo delete test fails (bcl@redhat.com)
- Add composer-cli function tests (bcl@redhat.com)
- Add a test library (bcl@redhat.com)
- composer-cli: Add support for Group to blueprints diff (bcl@redhat.com)
- Update status.py to use new handle_api_result (bcl@redhat.com)
- Update sources.py to use new handle_api_result (bcl@redhat.com)
- Update projects.py to use new handle_api_result (bcl@redhat.com)
- Update modules.py to use new handle_api_result (bcl@redhat.com)
- Update compose.py to use new handle_api_result (bcl@redhat.com)
- Update blueprints.py to use new handle_api_result (bcl@redhat.com)
- Modify handle_api_result so it can be used in more places (bcl@redhat.com)
- Fix help output on the compose subcommand. (clumens@redhat.com)
- Add timestamps to "compose-cli compose status" output. (clumens@redhat.com)
- And then add real output to the status command. (clumens@redhat.com)
- Add the beginnings of a new status subcommand. (clumens@redhat.com)
- Document that you shouldn't run lorax-composer twice. (clumens@redhat.com)
- Add PIDFile to the .service file. (clumens@redhat.com)
- composer-cli: Fix non-zero epoch in projets info (bcl@redhat.com)
2018-08-09 16:41:24 -07:00
Brian C. Lane
0f948eafd7 - New lorax documentation - 28.16 (bcl@redhat.com)
- Update rsync version in http-server.toml (bcl@redhat.com)
- Log and exit on metadata update errors at startup (bcl@redhat.com)
- Check /projects responses for null values. (bcl@redhat.com)
- Clarify error message from /source/new (bcl@redhat.com)
- Support loading groups from the kickstart template files.  (clumens@redhat.com)
- Add group-based tests. (clumens@redhat.com)
- Include groups in depsolving. (clumens@redhat.com)
- Add support for groups to blueprints. (clumens@redhat.com)
- Add help output to each subcommand. (clumens@redhat.com)
- Split the help output into its own module. (clumens@redhat.com)
- If the help subcommand is given, print the help output. (clumens@redhat.com)
- Check the compose templates at startup (bcl@redhat.com)
- Fix a couple typos in lorax-composer docs. (bcl@redhat.com)
- Include example blueprints in the rpm (bcl@redhat.com)
- Make sure /run/weldr has correct ownership and permissions (bcl@redhat.com)
- Allow more than 1 bash build in tests (bcl@redhat.com)
- Add redhat.exec to s390 .treeinfo (bcl@redhat.com)
- Retry losetup if loop_attach fails (bcl@redhat.com)
- Add reqpart to example kickstart files (bcl@redhat.com)
- Increase default ram used with lmc and virt to 2048 (bcl@redhat.com)
2018-07-20 16:11:30 -07:00
Brian C. Lane
967f71fd67 - Make LogRequestHandler configurable (mkolman@redhat.com) 2018-06-11 11:07:39 -07:00
Brian C. Lane
55ef376a43 - New lorax documentation - 28.14 (bcl@redhat.com)
- Add --dracut-arg support to lorax (bcl@redhat.com)
- gevent has deprecated .wsgi, should use .pywsgi instead (bcl@redhat.com)
2018-06-07 09:20:52 -07:00
Brian C. Lane
7a9adea7aa - New lorax documentation - 28.13 (bcl@redhat.com)
- Override Sphinx documentation version with LORAX_VERSION (bcl@redhat.com)
- Add support for sources to composer-cli (bcl@redhat.com)
- Fix DNF related issues with source selection (bcl@redhat.com)
- Fix handling bad source repos and add a test (bcl@redhat.com)
- Speed up test_dnfbase.py (bcl@redhat.com)
- Make sure new sources show up in the source/list output (bcl@redhat.com)
- Fix make_dnf_dirs (bcl@redhat.com)
- Update test_server for rawhide (bcl@redhat.com)
- Add support for user defined package sources API (bcl@redhat.com)
2018-06-04 16:52:26 -07:00
Brian C. Lane
2cfea92887 - templates: Stop using gconfset (walters@verbum.org)
- Add support for version globs to blueprints (bcl@redhat.com)
- Update atlas blueprint (bcl@redhat.com)
2018-05-24 09:28:30 -07:00
Brian C. Lane
dc94677df2 - Update the generated html docs (bcl@redhat.com)
- Update the README with relevant URLs (bcl@redhat.com)
- Fix documentation for enabling lorax-composer.socket (bcl@redhat.com)
- Add support for systemd socket activation (bcl@redhat.com)
- Add documentation for lorax-composer and composer-cli (bcl@redhat.com)
- Move lorax-composer and composer-cli argument parsing into modules (bcl@redhat.com)
- Update composer templates for use with Fedora (bcl@redhat.com)
- Add new cmdline args to compose_args settings (bcl@redhat.com)
- lorax-composer also requires tar (bcl@redhat.com)
- Remove temporary files after run_compose (bcl@redhat.com)
- Add --proxy to lorax-composer cmdline (bcl@redhat.com)
- Pass the --tmp value into run_creator and cleanup after a crash (bcl@redhat.com)
- Add --tmp to lorax-composer and set default tempdir (bcl@redhat.com)
- Set lorax_templates to the correct directory (bcl@redhat.com)
- Adjust the disk size estimates to match Anaconda (bcl@redhat.com)
- Skip creating groups with the same name as a user (bcl@redhat.com)
- Add user and group creation to blueprint (bcl@redhat.com)
- Add blueprint customization support for hostname and ssh key (bcl@redhat.com)
- Update setup.py for lorax-composer and composer-cli (bcl@redhat.com)
- Add composer-cli and tests (bcl@redhat.com)
- Fix the compose arguments for the Fedora version of Anaconda (bcl@redhat.com)
- Add selinux check to lorax-composer (bcl@redhat.com)
- Update test_server for blueprint and Yum to DNF changes. (bcl@redhat.com)
- Convert Yum usage to DNF (bcl@redhat.com)
- workspace read and write needs UTF-8 conversion (bcl@redhat.com)
- Return an empty list if depsolve results are empty (bcl@redhat.com)
- The git blob needs to be bytes (bcl@redhat.com)
- Remove bin and sbin from nose (bcl@redhat.com)
- Update the test blueprints (bcl@redhat.com)
- Ignore more pylint errors (bcl@redhat.com)
- Use default commit sort order instead of TIME (bcl@redhat.com)
- Add lorax-composer and the composer kickstart templates (bcl@redhat.com)
- Update pylorax.api.projects for DNF usage (bcl@redhat.com)
- Update dnfbase (formerly yumbase) for DNF support (bcl@redhat.com)
- Move core of livemedia-creator into pylorax.creator (bcl@redhat.com)
- Update dnfbase tests (bcl@redhat.com)
- Convert lorax-composer yum base object to DNF (bcl@redhat.com)
- Use 2to3 to convert the python2 lorax-composer code to python3 (bcl@redhat.com)
- Add the tests from lorax-composer branch (bcl@redhat.com)
- Update .dockerignore (bcl@redhat.com)
- Update lorax.spec for lorax-composer (bcl@redhat.com)
- livemedia-creator: Move core functions into pylorax modules (bcl@redhat.com)
- Check selinux state before creating output directory (bcl@redhat.com)
- really kill kernel-bootwrapper on ppc (dan@danny.cz)
- Use Fedora 28 for Dockerfile.test (bcl@redhat.com)
- Enable testing in Travis and collecting of coverage history (atodorov@redhat.com)
- Remove -boot-info-table from s390 boot.iso creation (#1478448) (bcl@redhat.com)
- change installed packages on ppc (dan@danny.cz)
- drop support for 32-bit ppc (dan@danny.cz)
- remove redundant mkdir (dan@danny.cz)
2018-05-17 13:16:06 -07:00
Brian C. Lane
ae0937abe7 - Fix anaconda metapackage name (mkolman@redhat.com)
- Include the anaconda-install-env-deps metapackage (mkolman@redhat.com)
- Update the URL in lorax.spec to point to new Lorax location (bcl@redhat.com)
- New lorax documentation - 28.9 (bcl@redhat.com)
2018-04-09 14:04:42 -07:00
7 changed files with 509 additions and 1003 deletions

View file

@ -1 +0,0 @@
1

162
.gitignore vendored
View file

@ -124,147 +124,21 @@
/lorax-28.6.tar.gz
/lorax-28.7.tar.gz
/lorax-28.8.tar.gz
/lorax-29.0.tar.gz
/lorax-29.1.tar.gz
/lorax-29.2.tar.gz
/lorax-29.3.tar.gz
/lorax-29.4.tar.gz
/lorax-29.5.tar.gz
/lorax-29.6.tar.gz
/lorax-29.7.tar.gz
/lorax-29.8.tar.gz
/lorax-29.9.tar.gz
/lorax-29.10.tar.gz
/lorax-29.11.tar.gz
/lorax-29.12.tar.gz
/lorax-29.13.tar.gz
/lorax-29.14.tar.gz
/lorax-29.15.tar.gz
/lorax-30.0.tar.gz
/lorax-30.1.tar.gz
/lorax-30.2.tar.gz
/lorax-30.3.tar.gz
/lorax-30.4.tar.gz
/lorax-30.5.tar.gz
/lorax-30.6.tar.gz
/lorax-30.7.tar.gz
/lorax-30.8.tar.gz
/lorax-30.9.tar.gz
/lorax-30.10.tar.gz
/lorax-30.12.tar.gz
/lorax-30.13.tar.gz
/lorax-30.14.tar.gz
/lorax-30.15.tar.gz
/lorax-30.16.tar.gz
/lorax-31.0.tar.gz
/lorax-31.1.tar.gz
/lorax-31.2.tar.gz
/lorax-31.3.tar.gz
/lorax-31.4.tar.gz
/lorax-31.5.tar.gz
/lorax-31.6.tar.gz
/lorax-31.7.tar.gz
/lorax-31.8.tar.gz
/lorax-31.9.tar.gz
/lorax-31.10.tar.gz
/lorax-32.0.tar.gz
/lorax-32.1.tar.gz
/lorax-32.2.tar.gz
/lorax-32.3.tar.gz
/lorax-32.4.tar.gz
/lorax-32.5.tar.gz
/lorax-32.6.tar.gz
/lorax-32.7.tar.gz
/lorax-33.0.tar.gz
/lorax-33.1.tar.gz
/lorax-33.2.tar.gz
/lorax-33.3.tar.gz
/lorax-33.4.tar.gz
/lorax-33.5.tar.gz
/lorax-33.6.tar.gz
/lorax-33.7.tar.gz
/lorax-33.8.tar.gz
/lorax-33.9.tar.gz
/lorax-34.0.tar.gz
/lorax-34.1.tar.gz
/lorax-34.2.tar.gz
/lorax-34.3.tar.gz
/lorax-34.4.tar.gz
/lorax-34.5.tar.gz
/lorax-34.6.tar.gz
/lorax-34.7.tar.gz
/lorax-34.8.tar.gz
/lorax-34.9.tar.gz
/lorax-35.0.tar.gz
/lorax-35.1.tar.gz
/lorax-35.2.tar.gz
/lorax-35.3.tar.gz
/lorax-35.4.tar.gz
/lorax-35.5.tar.gz
/lorax-35.6.tar.gz
/lorax-35.7.tar.gz
/lorax-36.0.tar.gz
/lorax-36.1.tar.gz
/lorax-36.2.tar.gz
/lorax-36.3.tar.gz
/lorax-36.4.tar.gz
/lorax-36.5.tar.gz
/lorax-36.6.tar.gz
/lorax-36.7.tar.gz
/lorax-36.8.tar.gz
/lorax-36.9.tar.gz
/lorax-37.0.tar.gz
/lorax-37.1.tar.gz
/lorax-37.2.tar.gz
/lorax-37.3.tar.gz
/lorax-37.4.tar.gz
/lorax-37.5.tar.gz
/lorax-37.6.tar.gz
/lorax-37.7.tar.gz
/lorax-37.8.tar.gz
/lorax-38.0.tar.gz
/lorax-38.1.tar.gz
/lorax-38.2.tar.gz
/lorax-38.3.tar.gz
/lorax-38.4.tar.gz
/lorax-38.5.tar.gz
/lorax-38.6.tar.gz
/lorax-39.0.tar.gz
/lorax-39.1.tar.gz
/lorax-39.2.tar.gz
/lorax-39.3.tar.gz
/lorax-39.4.tar.gz
/lorax-39.5.tar.gz
/lorax-40.0.tar.gz
/lorax-40.1.tar.gz
/lorax-40.2.tar.gz
/lorax-40.3.tar.gz
/lorax-40.4.tar.gz
/lorax-40.5.tar.gz
/lorax-40.6.tar.gz
/lorax-41.0.tar.gz
/lorax-41.1.tar.gz
/lorax-41.2.tar.gz
/lorax-41.3.tar.gz
/lorax-42.0.tar.gz
/lorax-42.1.tar.gz
/lorax-42.2.tar.gz
/lorax-42.3.tar.gz
/lorax-42.4.tar.gz
/lorax-42.5.tar.gz
/lorax-43.0.tar.gz
/lorax-43.1.tar.gz
/lorax-43.2.tar.gz
/lorax-43.3.tar.gz
/lorax-43.4.tar.gz
/lorax-43.5.tar.gz
/lorax-43.6.tar.gz
/lorax-43.7.tar.gz
/lorax-43.8.tar.gz
/lorax-43.9.tar.gz
/lorax-43.10.tar.gz
/lorax-44.0.tar.gz
/lorax-44.1.tar.gz
/lorax-44.2.tar.gz
/lorax-44.3.tar.gz
/lorax-44.4.tar.gz
/lorax-28.10.tar.gz
/lorax-28.11.tar.gz
/lorax-28.12.tar.gz
/lorax-28.13.tar.gz
/lorax-28.14.tar.gz
/lorax-28.15.tar.gz
/lorax-28.16.tar.gz
/lorax-28.17.tar.gz
/lorax-28.18.tar.gz
/lorax-28.19.tar.gz
/lorax-28.20.tar.gz
/lorax-28.21.tar.gz
/lorax-28.22.tar.gz
/lorax-28.23.tar.gz
/lorax-28.24.tar.gz
/lorax-28.25.tar.gz
/lorax-28.26.tar.gz
/lorax-28.27.tar.gz

View file

@ -1,7 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

1063
lorax.spec

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
summary: Run Lorax tests (build an iso, run mkksiso on it)
execute:
script: ./tests/scripts/run_tests.sh

View file

@ -1 +1 @@
SHA512 (lorax-44.4.tar.gz) = e2be9a13a0aec657bfe9a32dbd51e9024dfcb89471dbc57b8206dccdcd71cf5561fb25f97a7fdaca2b0279a2966b142ddf4e4544577ac2b47171f19648742577
SHA512 (lorax-28.27.tar.gz) = 268f4df9b3faa716ba6c93fc9c750beeda01c28cfae7c0024ebc3077f774393c0ebec5df0a627bb50921b5beb47cc0f7ea90e6ee41d3421d73d94f405b2ab343

View file

@ -1,274 +0,0 @@
#!/bin/bash
set -eux
FAILANY=0
BOOTISO=/var/tmp/lorax-fedora-iso/images/boot.iso
KSNAME=fedora-minimal.ks
KS="/usr/share/doc/lorax/$KSNAME"
OUTISO=/var/tmp/out.iso
ISODIR=/var/tmp/iso
## Functions for testing mkkiso
function fail {
echo -e "\n\n#### ERROR: $1\n"
FAIL=1
FAILANY=1
}
function status {
if [ "$FAIL" -eq 0 ]; then
echo -e "\n\n#### PASS: $1\n"
else
echo -e "\n\n#### FAIL: $1\n"
fi
}
function running {
FAIL=0
echo -e "\n\n#### RUN: $1\n"
}
# unmount the dirs lazily because sometimes some outside thing is still touching them
function umount_dirs {
umount --lazy "$ISODIR"
rm -f "$OUTISO"
}
[ -e "$ISODIR" ] || mkdir "$ISODIR"
# Only add kickstart
function ks_only {
running "Add kickstart to iso using --ks"
mkksiso --ks $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
status "Add kickstart to iso using --ks"
umount_dirs
}
# Only add kickstart
function ks_pos_only {
running "Add kickstart to iso using positional argument"
mkksiso $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
status "Add kickstart to iso using positional argument"
umount_dirs
}
function test_ks {
## This all needs to be another function
# Is there a kickstart in / of the iso?
[ -e "$ISODIR/$KSNAME" ] || fail "Missing kickstart"
# Is the kickstart in the GRUB2 BIOS config?
grep "inst.ks=.*$KSNAME" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg kickstart entry"
# Is the kickstart in the UEFI config?
grep "inst.ks=.*$KSNAME" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
}
# Add ks and cmdline
function ks_serial {
running "Add kickstart and serial cmdline"
mkksiso -c "console=ttyS0,115200n8" --ks $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
test_serial
status "Add kickstart and serial cmdline"
umount_dirs
}
# Only add serial console to cmdline
function only_serial {
running "Add serial cmdline (no ks)"
mkksiso -c "console=ttyS0,115200n8" $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_serial
status "Add kickstart and serial cmdline"
umount_dirs
}
function test_serial {
# Is the serial in the BIOS config?
grep "console=ttyS0,115200n8" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg cmdline entry"
# Is the serial in the UEFI config?
grep "console=ttyS0,115200n8" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg cmdline entry"
}
# New VOLID
function new_volid {
running "Use a new VOLID"
mkksiso -V "mkksiso-test" --ks $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
test_volid
status "Use a new VOLID"
umount_dirs
}
function test_volid {
# Is the VOLID in the BIOS config?
grep "hd:LABEL=mkksiso-test" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg kickstart entry"
# Is the VOLID in the UEFI config?
grep "hd:LABEL=mkksiso-test" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
}
# Add extra files
function add_files {
running "Add files"
mkksiso -a /etc/services --ks $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
test_files
status "Add files"
umount_dirs
}
# Remove quiet from the cmdline
function remove_quiet {
running "remove quiet from cmdline (no ks)"
mkksiso --rm "quiet" $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_quiet
status "Remove quiet from cmdline"
umount_dirs
}
function test_quiet {
# Is quiet in the BIOS config?
! grep "append.*quiet" "$ISODIR/boot/grub2/grub.cfg" || fail "quiet not removed from BIOS grub.cfg cmdline entry"
# Is quiet in the UEFI config?
! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry"
}
# Test error if passing both --ks FILE and 3 arguments
function test_two_kickstarts {
running "Test two kickstart error"
mkksiso --ks $KS $KS $BOOTISO $OUTISO && fail "No error using --ks and positional argument"
status "Test two kickstart error"
}
function test_files {
[ -e "$ISODIR/services" ] || fail "Missing file from iso"
}
# Test adding an updates.img file
function add_updatesimg {
running "Add updates.img"
# nothing in the file, just test that it is there
touch /tmp/updates.img
mkksiso -u /tmp/updates.img $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_updatesimg
status "Add updates.img"
umount_dirs
}
function test_updatesimg {
[ -e "$ISODIR/updates.img" ] || fail "Missing updates.img file from iso"
grep "inst.updates=.*updates.img" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg inst.updates entry"
grep "inst.updates=.*updates.img" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg inst.updates entry"
}
# All of the changes
function run_all {
running "Use all the options"
touch /tmp/updates.img
mkksiso -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
test_serial
test_volid
test_files
test_updatesimg
test_quiet
status "Use all the options"
umount_dirs
}
# All of the changes as a user (lorax-ted) with --skip-mkefiboot
function run_as_user {
running "Use all the options as a user"
[ ! -e "/home/lorax-ted" ] && useradd -m lorax-ted
touch /tmp/updates.img
su - lorax-ted -c "mkksiso --skip-mkefiboot -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO" || exit 1
mount $OUTISO $ISODIR || exit 1
test_ks
test_serial
test_volid
test_files
test_updatesimg
test_quiet
status "Use all the options as a user with --skip-mkefiboot"
umount_dirs
}
# Gather up the list of system repo files and use them for lorax
REPOS=$(for f in /etc/yum.repos.d/*repo; do echo -n "--repo $f "; done)
if [ -z "$REPOS" ]; then
echo "No system repos found"
exit 1
fi
# NOTE: We must use --nomacboot because the test system doesn't have the hfsplus fs available
# Run lorax using the host's repository configuration file
if [ ! -e "$BOOTISO" ]; then
running "Build boot.iso with lorax"
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ || exit 1
fi
# Test mkksiso on the new boot.iso
ks_only
ks_pos_only
ks_serial
only_serial
new_volid
add_files
remove_quiet
test_two_kickstarts
add_updatesimg
run_all
run_as_user
exit $FAILANY