Commit Graph

1794 Commits

Author SHA1 Message Date
Brian C. Lane
8ac04a1521 Add support for user defined package sources API
This lives under /api/v0/projects/source/*

See the documentation for details

(cherry picked from commit 6d677b2207)
2018-06-04 15:47:00 -07:00
Brian C. Lane
5548f5f1c7 Automatic commit of package [lorax] release [28.12-1].
Created by command:

/usr/bin/tito tag
2018-05-24 09:13:16 -07:00
Colin Walters
e5ef195a3b 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
(cherry picked from commit bb3d8edd06)
2018-05-24 09:13:05 -07:00
Brian C. Lane
1af6040143 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.

(cherry picked from commit 095829171a)
2018-05-21 15:41:45 -07:00
Brian C. Lane
13234166f5 Update atlas blueprint
(cherry picked from commit d406fbdf83)
2018-05-21 15:41:45 -07:00
Brian C. Lane
9c7446f44c Automatic commit of package [lorax] release [28.11-1].
Created by command:

/usr/bin/tito tag
2018-05-17 13:13:17 -07:00
Brian C. Lane
140a736518 Update the generated html docs 2018-05-17 10:34:35 -07:00
Brian C. Lane
dcb5c5b59a Update the README with relevant URLs
Time to point to the blog and to the online documentation.
2018-05-17 10:34:35 -07:00
Brian C. Lane
1fef566bb2 Fix documentation for enabling lorax-composer.socket
It needs to be enabled AND started for it to work.
2018-05-17 10:34:35 -07:00
Brian C. Lane
55b89d1aeb 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-17 10:34:35 -07:00
Brian C. Lane
680393de3d Add documentation for lorax-composer and composer-cli 2018-05-17 10:34:35 -07:00
Brian C. Lane
e7f9028fca Move lorax-composer and composer-cli argument parsing into modules
This allows sphinx-argparse to document them automatically.
2018-05-17 10:34:35 -07:00
Brian C. Lane
8bd028e9d0 Update composer templates for use with Fedora 2018-05-17 10:34:35 -07:00
Brian C. Lane
cd1d414e0e Add new cmdline args to compose_args settings 2018-05-17 10:34:35 -07:00
Brian C. Lane
d68429071c lorax-composer also requires tar 2018-05-17 10:34:35 -07:00
Brian C. Lane
e91aed9b10 Remove temporary files after run_compose
A crash can also leave temporary lmc-* files, remove them as well.
2018-05-17 10:34:35 -07:00
Brian C. Lane
611f5e62f3 Add --proxy to lorax-composer cmdline
Overrides the [dnf] proxy setting in the config file.
2018-05-17 10:34:35 -07:00
Brian C. Lane
d9c4a6c951 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-17 10:34:35 -07:00
Brian C. Lane
559b66b7e3 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-17 10:34:35 -07:00
Brian C. Lane
bb652368dc Set lorax_templates to the correct directory
Templates are under the share dir, so use find_templates() to find them.
2018-05-17 10:34:35 -07:00
Brian C. Lane
d6283f9540 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-17 10:34:35 -07:00
Brian C. Lane
5443c1cfea 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-17 10:34:35 -07:00
Brian C. Lane
cb7e4e55ba Add user and group creation to blueprint
[[customizations.user]] and [[customizations.group]]
2018-05-17 10:34:34 -07:00
Brian C. Lane
8839182f43 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

[[customizations.sshkey]]
user = root
key = root user key
2018-05-17 10:34:34 -07:00
Brian C. Lane
df63cfddc5 Update setup.py for lorax-composer and composer-cli 2018-05-17 10:34:34 -07:00
Brian C. Lane
fb58277028 Add composer-cli and tests 2018-05-17 10:34:34 -07:00
Brian C. Lane
b67c821706 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-17 10:34:34 -07:00
Brian C. Lane
b6e0ba2e45 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-17 10:34:34 -07:00
Brian C. Lane
01645a1faf Update test_server for blueprint and Yum to DNF changes. 2018-05-17 10:34:34 -07:00
Brian C. Lane
e6145faf86 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-17 10:34:34 -07:00
Brian C. Lane
c4a09c42cc 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-17 10:34:34 -07:00
Brian C. Lane
99cdd573a3 Return an empty list if depsolve results are empty 2018-05-17 10:34:34 -07:00
Brian C. Lane
6aa52b0b53 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-17 10:34:34 -07:00
Brian C. Lane
25e12f1971 Remove bin and sbin from nose
They are not packages and cannot be imported.
2018-05-17 10:34:34 -07:00
Brian C. Lane
8970b6758b 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-17 10:34:34 -07:00
Brian C. Lane
bb214b21ab Ignore more pylint errors 2018-05-17 10:34:34 -07:00
Brian C. Lane
0f59710b36 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-17 10:34:34 -07:00
Brian C. Lane
cb0158ca22 Add lorax-composer and the composer kickstart templates 2018-05-17 10:34:34 -07:00
Brian C. Lane
9085840401 Update pylorax.api.projects for DNF usage
And adjust tests to match.
2018-05-17 10:34:34 -07:00
Brian C. Lane
e1be281fbb Update dnfbase (formerly yumbase) for DNF support
And adjust tests to match.
2018-05-17 10:34:34 -07:00
Brian C. Lane
7fa009c66e Move core of livemedia-creator into pylorax.creator
This moves everything except the cmdline checking into run_creator in
pylorax.creator

It also rearranges some functions to prevent import loops, and adds a
utility function to imgutils (mkfsimage_from_disk for copying a
partition into a filesystem image).
2018-05-17 10:34:34 -07:00
Brian C. Lane
96a82b07d9 Update dnfbase tests 2018-05-17 10:34:34 -07:00
Brian C. Lane
25394eefb7 Convert lorax-composer yum base object to DNF
This no longer uses the enabled configuration setting to select repos to
use. It uses everything in the repo_dir, and if system repos have not
been disabled it copies them into the repo_dir at startup, overwriting
the previous copy.
2018-05-17 10:34:34 -07:00
Brian C. Lane
9bf93d7154 Use 2to3 to convert the python2 lorax-composer code to python3 2018-05-17 10:34:34 -07:00
Brian C. Lane
b4096ccb62 Add the tests from lorax-composer branch
These currently fail for several reasons and will be adjusted as the
code it ported to this branch.
2018-05-17 10:34:34 -07:00
Brian C. Lane
b3d6dab83b Update .dockerignore
Don't send .git to docker daemon
2018-05-17 10:34:34 -07:00
Brian C. Lane
263f1154a0 Update lorax.spec for lorax-composer
Add new subpackages for lorax-composer and composer-cli, and new requirements.
Trim changelog
Fix a couple of un-versioned Provides
2018-05-17 10:34:34 -07:00
Brian C. Lane
fc56671638 livemedia-creator: Move core functions into pylorax modules
This reduces the amount of code in livemedia-creator to the cmdline
parsing and calling of the installer functions. Moving them into other
modules will allow them to be used by other projects, like the
lorax-composer API server.
2018-05-17 10:34:34 -07:00
Brian C. Lane
39673941a8 Check selinux state before creating output directory
This closes issue #163

(cherry picked from commit dc348fac25)
2018-05-17 10:34:34 -07:00
Dan Horák
1f48a5137d really kill kernel-bootwrapper on ppc
(cherry picked from commit 4a905bdfb0)
2018-05-17 10:33:55 -07:00