Commit Graph

1756 Commits

Author SHA1 Message Date
Brian C. Lane
d47d38e0c8 Override Sphinx documentation version with LORAX_VERSION
Normally you want to document the NEXT release, not the last. This
allows you to build the documentation using:

LORAX_VERSION="29.6" make docs
2018-06-04 16:25:33 -07:00
Brian C. Lane
6f6ce410c0 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-04 15:45:36 -07:00
Brian C. Lane
afa89ea657 Fix DNF related issues with source selection
DNF Repo.dump() function cannot be used as a .repo file for dnf due to
it writing baseurl and gpgkey as a list instead of a string. 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-04 15:45:36 -07:00
Brian C. Lane
dd8e4d9e99 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.
This also includes detecting rawhide vs. non-rawhide releases and
adjusting the tests accordingly (some of the source names change).
2018-06-04 15:45:36 -07:00
Brian C. Lane
666d7f1e03 Speed up test_dnfbase.py
Calling get_base_object is no longer needed, this speeds things up by
not unnecessarily downloading metadata.
2018-06-04 15:45:36 -07:00
Brian C. Lane
1034cfd9a7 Make sure new sources show up in the source/list output
Also remove an unneeded makedirs from test_server.py
2018-06-04 15:45:36 -07:00
Brian C. Lane
23f4b2a3ec 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-04 15:45:36 -07:00
Brian C. Lane
22070dcf42 Update test_server for rawhide
The system repo is 'rawhide' and the 'fedora' and 'updates' repos are
disabled.
2018-06-04 15:45:36 -07:00
Brian C. Lane
6d677b2207 Add support for user defined package sources API
This lives under /api/v0/projects/source/*

See the documentation for details
2018-06-04 15:45:36 -07:00
Brian C. Lane
1f8da3f1a7 Automatic commit of package [lorax] release [29.5-1].
Created by command:

/usr/bin/tito tag
2018-05-23 16:21:24 -07:00
Colin Walters
bb3d8edd06 templates: Stop using gconfset
We had only been indirectly pulling in GConf, and anyways
nothing was listening to these keys.

<kalev> I still think it's a fallout from 27a90d973f

Really in general, if we wanted to make changes like this
it'd probably be a lot simpler to do them on boot or so.

https://bugzilla.redhat.com/show_bug.cgi?id=1581838
2018-05-23 14:20:44 -07:00
Brian C. Lane
095829171a Add support for version globs to blueprints
This uses dnf's version__glob filter to implement it. It amounts to '*'
wildcards and '?' for single character matching.
2018-05-18 12:03:26 -07:00
Brian C. Lane
d406fbdf83 Update atlas blueprint 2018-05-18 11:26:04 -07:00
Brian C. Lane
3edc85e0b9 Automatic commit of package [lorax] release [29.4-1].
Created by command:

/usr/bin/tito tag
2018-05-17 13:21:17 -07:00
Brian C. Lane
683ec03cc8 Update documentation (#1430906) 2018-05-17 11:20:22 -07:00
Dan Horák
4a905bdfb0 really kill kernel-bootwrapper on ppc 2018-05-17 10:32:45 -07:00
Brian C. Lane
cd189aa97e Automatic commit of package [lorax] release [29.3-1].
Created by command:

/usr/bin/tito tag
2018-05-14 15:32:25 -07:00
Brian C. Lane
8188d921c7 Update the README with relevant URLs
Time to point to the blog and to the online documentation.
2018-05-14 14:44:13 -07:00
Brian C. Lane
e963af3b1a Fix documentation for enabling lorax-composer.socket
It needs to be enabled AND started for it to work.
2018-05-14 14:09:46 -07:00
Brian C. Lane
48e318b391 Add support for systemd socket activation
Instead of enabling lorax-composer.service enable lorax-composer.socket
and it will start lorax-composer on first access to
/run/weldr/api.socket
2018-05-14 13:57:44 -07:00
Brian C. Lane
081da8859a Remove -boot-info-table from s390 boot.iso creation (#1478448)
It corrupts the kernel+initrd and isn't needed when booting on s390.

Related: rhbz#1478448
(cherry picked from commit df35857c9b)
2018-05-14 13:01:03 -07:00
Brian C. Lane
c726f19434 Update the generated html docs 2018-05-14 13:00:15 -07:00
Brian C. Lane
ad549a4601 Add documentation for lorax-composer and composer-cli 2018-05-14 13:00:15 -07:00
Brian C. Lane
db67c1267a Move lorax-composer and composer-cli argument parsing into modules
This allows sphinx-argparse to document them automatically.
2018-05-14 13:00:15 -07:00
Brian C. Lane
9eb35c364d Update composer templates for use with Fedora 2018-05-14 13:00:15 -07:00
Brian C. Lane
6e5ca1f062 Add new cmdline args to compose_args settings 2018-05-14 13:00:15 -07:00
Brian C. Lane
e6d64dad61 lorax-composer also requires tar 2018-05-14 13:00:15 -07:00
Brian C. Lane
b1319c7bc1 Remove temporary files after run_compose
A crash can also leave temporary lmc-* files, remove them as well.
2018-05-14 13:00:15 -07:00
Brian C. Lane
0455a5d740 Add --proxy to lorax-composer cmdline
Overrides the [dnf] proxy setting in the config file.
2018-05-14 13:00:15 -07:00
Brian C. Lane
12cb2736ac 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-05-14 13:00:15 -07:00
Brian C. Lane
3c31e52b3c 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-05-14 13:00:15 -07:00
Brian C. Lane
9a1dce5619 Set lorax_templates to the correct directory
Templates are under the share dir, so use find_templates() to find them.
2018-05-14 13:00:15 -07:00
Brian C. Lane
3974a4e479 Adjust the disk size estimates to match Anaconda
First is Anaconda uses 6k blocks per file for its estimate, and it
fudges by 10% so adjust for those with an extra 10% of headroom just in
case.

Second is an Anaconda bug that won't allow it to do a kickstart install
to a disk smaller than 3000 MB. There is a PR to fix it upstream, but
for now the minimum size has to be 3000e9
2018-05-14 13:00:15 -07:00
Brian C. Lane
a363aee971 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.
2018-05-14 13:00:15 -07:00
Brian C. Lane
07ea61be77 Add user and group creation to blueprint
[[customize.user]] and [[customize.group]]
2018-05-14 13:00:15 -07:00
Brian C. Lane
25bec0b50d Add blueprint customization support for hostname and ssh key
This adds support for the optional blueprint section [customizations].

Use it like this:

[customizations]
hostname = yourhostnamehere

[[customiations.sshkey]]
user = root
key = root user key
2018-05-14 13:00:15 -07:00
Brian C. Lane
29ceea3d05 Update setup.py for lorax-composer and composer-cli 2018-05-14 13:00:15 -07:00
Brian C. Lane
825d1931e4 Add composer-cli and tests 2018-05-14 13:00:15 -07:00
Brian C. Lane
a9b626a706 Fix the compose arguments for the Fedora version of Anaconda
This adds make_oci, and moves qcow2 to the more generic image_type
(which just uses qemu-img disk names).
2018-05-14 13:00:15 -07:00
Brian C. Lane
5e0246d4a9 Add selinux check to lorax-composer
anaconda needs to have SELinux set to disabled or permissive in order to
run correctly. Check at startup and exit with an error.
2018-05-14 13:00:15 -07:00
Brian C. Lane
5c25f98db7 Update test_server for blueprint and Yum to DNF changes. 2018-05-14 13:00:15 -07:00
Brian C. Lane
c9187ce4ca Convert Yum usage to DNF
The DNF api is similar, but not the same, as Yum. Make the needed
changes, and rename yum references to dnf to avoid confustion later.
2018-05-14 13:00:15 -07:00
Brian C. Lane
48671b682a workspace read and write needs UTF-8 conversion
reading needs to decode the bytes to str and writing needs to encode the
str to bytes.
2018-05-14 13:00:15 -07:00
Brian C. Lane
d478864fb3 Return an empty list if depsolve results are empty 2018-05-14 13:00:15 -07:00
Brian C. Lane
8ed039107b The git blob needs to be bytes
In py3 str is unicode so it needs to be encoded as UTF-8 when writing to
the blob.
2018-05-14 13:00:15 -07:00
Brian C. Lane
88d8905c0f Remove bin and sbin from nose
They are not packages and cannot be imported.
2018-05-14 13:00:15 -07:00
Brian C. Lane
0a3e6598b2 Update the test blueprints
Change versions to match Fedora versions. Add version numbers to the
blueprints except for glusterfs.toml, not having a version is used as
part of the tests.
2018-05-14 13:00:15 -07:00
Brian C. Lane
733c824c49 Ignore more pylint errors 2018-05-14 13:00:15 -07:00
Brian C. Lane
719aceac82 Use default commit sort order instead of TIME
Different versions of libgit2 act differently. Using TIME results in
some commits (like a revert) being listed correctly, but the rest being
listed in reverse order. Leaving it at the default works for
libgit2-0.26.3
2018-05-14 13:00:15 -07:00
Brian C. Lane
2fa1da0f5e Add lorax-composer and the composer kickstart templates 2018-05-14 13:00:15 -07:00