Commit Graph

1378 Commits

Author SHA1 Message Date
Alexander Todorov d71290153e Fix mocking the built-in open function for Python2
- fix import of mock module
- account for io.StringIO differences in Python 2
2018-06-11 16:54:57 -07:00
Alexander Todorov 2cd4f73177 Don't do wildcard imports 2018-06-11 16:54:57 -07:00
Alexander Todorov e9e6e5701e Misc pylint fixes that are reported usually once 2018-06-11 16:54:57 -07:00
Alexander Todorov bf9ed50d51 Fix dangerous-default value warnings
when default value is list or dict the default arguments are
instantiated as objects at the time of definition. This is significant
(exposing visible semantics) when the object is mutable. There’s no way
of re-binding that default argument name in the function’s closure. When
function is executed multiple times with its default value the value
will change between executions, possibly leading to strange side effects.

For more information see:
http://satran.in/2012/01/12/python-dangerous-default-value-as-argument.html
2018-06-11 16:54:57 -07:00
Alexander Todorov a0766b1d70 Don't redefine variables from outer scope 2018-06-11 16:54:57 -07:00
Alexander Todorov 4d8e2b5356 Define all class attributes inside __init__ 2018-06-11 16:54:57 -07:00
Alexander Todorov 663b0f8378 Fix logging formatting 2018-06-11 16:54:57 -07:00
Alexander Todorov 18528b4f47 Don't redefine builtins 2018-06-11 16:54:57 -07:00
Alexander Todorov b15df5a0af Silence relative import warnings 2018-06-11 16:54:57 -07:00
Alexander Todorov 7f5b492198 pylint fix: unused variable warning 2018-06-11 16:54:57 -07:00
Alexander Todorov 15de3e1687 pylint fix: remove unused imports 2018-06-11 16:54:57 -07:00
Alexander Todorov 54cdb5dbf5 Add make test target and update .gitignore
also submit coverage report to Coveralls.io if environment is
configured
2018-06-11 16:54:57 -07:00
Alexander Todorov f405aedf6e Add first unit test so we can start collecting coverage 2018-06-11 16:54:57 -07:00
Brian C. Lane 2008a413b6 lorax-composer initial commit
The lorax-composer program will launch a BDCS compatible API server
using Flask and Gevent. Currently this is a skeleton application with
only one active route (/api/v0/status).

The API code lives in ./src/pylorax/api/v0.py with related code in other
pylorax/api/* modules.
2018-06-11 16:54:57 -07:00
Brian C. Lane 798023b199 Add pylint support to Makefile
This requires pylint and python-pocketlint from EPEL7 to work.
runpylint.py copied from upstream lorax.
2018-06-11 16:54:57 -07:00
Brian C. Lane bf8be43c90 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-06-11 16:54:57 -07:00
Brian C. Lane 47aa2fb215 Automatic commit of package [lorax] release [19.7.1-1].
Created by command:

/usr/bin/tito tag --keep-version
2018-06-11 16:27:56 -07:00
Brian C. Lane c5dfe8e940 Automatic commit of package [lorax] release [19.6.105-1].
Created by command:

/usr/bin/tito tag
2018-06-11 14:52:23 -07:00
Brian C. Lane c746e8b0c3 Retry losetup if loop_attach fails
It appears that sometimes the loop device doesn't get setup properly,
this may be a race with other users of loop devices on the system, or
some other mechanism that isn't understood.

To try and prevent total failure when this happens this patch retries
the loop setup 3 times before giving up. Previously it would wait for
the loop device to appear (checking 5 times), that operation is now
executed 3 times with a new losetup attempt each time.

Resolves: rhbz#1589084
2018-06-11 13:56:53 -07:00
Brian C. Lane f116ee8f05 Add reqpart to example kickstart files
This will make sure that platform specific partitions are created when
making partitioned disk images.

Resolves: rhbz#1545289
2018-06-11 13:52:21 -07:00
Brian C. Lane 4788d4eb4d Increase default ram used with lmc and virt to 2048
1024 is a bit small in some situations, double it.

Resolves: rhbz#1538747
2018-06-11 13:49:28 -07:00
Brian C. Lane c8cee96b1c Add --virt-uefi to boot the VM using OVMF
This requires OVMF to be setup on the system, and for the kickstart to
create a /boot/efi/ partition. You can then use it to create UEFI
bootable partitioned disk images.

The UEFI firmware needs to be installed manually on the system, either
in the default location of /usr/share/OVMF/ or use --ovmf-path to point
to the location.

Resolves: rhbz#1546715
Resolves: rhbz#1544805
2018-06-11 13:45:32 -07:00
Brian C. Lane 22392b64fc Add --dracut-arg support to lorax
Use it to override the default dracut arguments (displayed as part of
the --help output). If you want to extend the default arguments they
all need to be passed in on the cmdline as well. eg.

--dracut-arg='--xz' --dracut-arg='--install /.buildstamp' ...

Resolves: rhbz#1452220
2018-06-06 17:38:55 -07:00
Brian C. Lane 6f2494f9d5 livemedia-creator: Search for kernel/initrd under /images/pxeboot (#1522629)
On aarch64 the kernel and initrd are under /images/pxeboot, add these
paths to the search list.

Resolves: rhbz#1522629
2018-05-17 10:30:34 -07:00
Brian C. Lane 88664f03a1 Automatic commit of package [lorax] release [19.6.104-1].
Created by command:

/usr/bin/tito tag
2018-01-24 08:47:26 -08:00
Brian C. Lane 99254492e3 Replace fedora-gnome-theme with gnome-themes-standard (#1537573)
gnome-themes-standard used to provide fedora-gnome-theme, but dropped it
in version 3.22.2-1

Resolves: rhbz#1537573
2018-01-23 08:34:27 -08:00
Brian C. Lane 5479fab3e4 Automatic commit of package [lorax] release [19.6.103-1].
Created by command:

/usr/bin/tito tag
2018-01-11 09:22:50 -08:00
Samantha N. Bueno 730badfebc Keep hid-multitouch and i2c-hid modules. (rhbz#1526323)
Several laptops require these modules for the touchpad to work.

Resolves: rhbz#1526323
2018-01-11 08:55:17 -08:00
Brian C. Lane 8361d021a5 Automatic commit of package [lorax] release [19.6.102-1].
Created by command:

/usr/bin/tito tag
2018-01-02 11:55:06 -08:00
Brian C. Lane 2c5ba00dc0 Add grub2-tools to aarch64 (#1489707)
These can be useful during installation or rescue.

Resolves: rhbz#1489707
2017-12-05 08:33:22 -08:00
Brian C. Lane ea72c3e035 Automatic commit of package [lorax] release [19.6.101-1].
Created by command:

/usr/bin/tito tag
2017-10-17 10:20:41 -07:00
Brian C. Lane 9429d392d6 Restore all of the grub2-tools on x86_64 and i386 (#1489707)
These can be useful during installation or rescue.
(They are already present on ppc64)

Resolves: rhbz#1489707
2017-10-13 09:00:31 -07:00
Brian C. Lane db8892bef3 Automatic commit of package [lorax] release [19.6.100-1].
Created by command:

/usr/bin/tito tag
2017-10-09 11:49:44 -07:00
Vendula Poncova 9c6575689a Add dependencies for SE/HMC (#1498834)
Resolves: rhbz#1498834
2017-10-09 08:52:44 -07:00
Brian C. Lane 1745c4f15b Automatic commit of package [lorax] release [19.6.99-1].
Created by command:

/usr/bin/tito tag
2017-09-29 09:37:04 -07:00
Brian C. Lane 7a0b4f2070 s390 doesn't need to graft product.img and updates.img into /images (#1478448)
The /images directory is already grafted into the iso, so it
doesn't need a specific line for the .img files.

Related: rhbz#1478448
2017-09-29 09:31:34 -07:00
Brian C. Lane 58309c2018 Automatic commit of package [lorax] release [19.6.98-1].
Created by command:

/usr/bin/tito tag
2017-09-27 09:08:26 -07:00
Brian C. Lane 54d973e059 Write a list of installed packages to /root/lorax-packages.log (#1416155)
This can't be done the same way as on master because there is no rpm
database inside the installroot to run rpm -qa against. Do it at the end
of the yum transaction.

Resolves: rhbz#1416155
2017-09-27 08:30:04 -07:00
Brian C. Lane 1639df6862 Set the releasever and install gpg keys when using --repo
This uses the --release value as the yum releasever so that $releasever
in a --repo will work.

It also turns on assumeyes so that any gpgkey entries in the .repo file
will be installed and used automatically if gpgcheck is enabled for the
repo.

Related: rhbz#1430479
2017-09-26 15:48:37 -07:00
Brian C. Lane b1aa852b58 Automatic commit of package [lorax] release [19.6.97-1].
Created by command:

/usr/bin/tito tag
2017-08-18 10:21:20 -07:00
Brian C. Lane df35857c9b 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
2017-08-18 10:19:28 -07:00
Brian C. Lane 4f55facece Automatic commit of package [lorax] release [19.6.96-1].
Created by command:

/usr/bin/tito tag
2017-08-15 15:05:13 -07:00
Brian C. Lane 641bbc21af Install mk-s390-cdboot to /usr/bin/ (#1478448)
Related: rhbz#1478448
2017-08-15 14:55:46 -07:00
Brian C. Lane a909182aad Automatic commit of package [lorax] release [19.6.95-1].
Created by command:

/usr/bin/tito tag
2017-08-11 18:00:15 -07:00
Brian C. Lane 3cfd532382 IsoMountpoint: Add ppc64le kernel to search (#1373358)
Resolves: rhbz#1373358
2017-08-11 17:38:58 -07:00
Brian C. Lane d30143d146 livemedia-creator: Report correct results dir (#1374609)
Resolves: rhbz#1374609
2017-08-11 17:38:58 -07:00
Brian C. Lane e5c6f9e8bc Add creation of a bootable s390 iso (#1478448)
Use mk-s390-cdboot to create a combined kernel+initrd and then build a
boot.iso using it.

Resolves: rhbz#1478448
2017-08-11 16:02:52 -07:00
Brian C. Lane 6007b35096 Add mk-s360-cdboot utility (#1478448)
Add a utility to concatenate the kernel and initrd, and edit the kernel.

This is based on:
https://github.com/rhinstaller/anaconda/blob/rhel6-branch/utils/mk-s390-cdboot.c

It takes into account byteorder and it wipes the cmdline area before
writing the parmfile into the kernel.

Related: rhbz#1478448
2017-08-11 16:02:52 -07:00
Brian C. Lane 5238b9cd18 Fix systemctl command (#1478247)
When multiple units are passed to systemctl and one fails it doesn't
finish the others. Change the template command to call systemctl for
each unit individually.

This also removes the lvm2-activation-generator in runtime-cleanup.tmpl

Resolves: rhbz#1478247
2017-08-11 15:49:10 -07:00
Brian C. Lane 1b29041089 Add the version to the log (#1335456)
Log the version number as INFO and add -V version display to
livemedia-creator.

Resolves: rhbz#1335456
2017-08-11 15:42:16 -07:00