Commit Graph

261 Commits

Author SHA1 Message Date
Lubomír Sedlář ea7f98ef4e [image-build] Use subvariants in logging output
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-17 10:19:28 +01:00
Lubomír Sedlář f1974d3f03 [live-media] Use subvariants in logging
Print the subvariant together with variant UID and arches. This should
make the global log easier to understand.

The output of koji command should now be split into multiple files in
logs/{arch}/livemedia-{variant}-{subvariant}.{arch}.log instead of
having them all in one file.

The tests were updated to use more sensible value for the subvariant
field.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-17 09:04:50 +01:00
Lubomír Sedlář 4afd21952c Add tracebacks to all failable phases
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-16 18:47:12 +01:00
Lubomír Sedlář 0759c7fb48 [buildinstall] Add more debugging output
When it fails, a traceback will be printed.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-16 18:16:24 +01:00
Lubomír Sedlář aab22b6f9f [checksums] Add label to file name
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-16 08:49:44 +01:00
Lubomír Sedlář aa38eb1fd7 [buildinstall] Use customized dvd disc type
This should generate the same volume id in buildinstall and createiso
phases, with isolinux.cfg being consistent as well.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-14 08:20:43 +01:00
Adam Williamson c321bca8ef image_build: fix subvariant handling
Dennis added a 'subvariant' property to the Docker image config,
but we weren't using it, we were just hard-coding the variant
as the subvariant...and doing it wrong, as well, using the
variant object rather than its uid property.

This fixes both problems: we'll now use the explicitly set
image config 'subvariant' property if there is one, otherwise
we use the variant.uid as the subvariant.

Note this is a high priority fix, as it broke F24 compose today.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2016-03-13 09:18:08 -07:00
Adam Williamson 254bfb8ca4 add 'subvariant' image property, create live/appliance names
This adds the new 'subvariant' property to all images produced by Pungi.
For most image types this is the same as the variant, for now. For
live_images and livemedia_phase, the image config may specify
'subvariant' and the value will be used if present, otherwise the
variant name will be used.

We also now synthesize the Koji image 'name' for live and appliance
images if the image config doesn't specify it, and use a name that
complies better with the naming policy for ARM disk images (partially
resolving https://pagure.io/pungi-fedora/issue/7 ).

This is completely untested as yet, just bashing stuff out on a Sunday,
will work more on it tomorrow.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2016-03-10 16:59:34 -06:00
Lubomír Sedlář 2fd117367e Simplify koji pkgset
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 19:13:51 +01:00
Lubomír Sedlář 619e5323d6 [init] Iterate over arches just once
We can create the repos in one loop together with writing the comps
files.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 15:30:05 +01:00
Lubomír Sedlář 1efd4a9873 [init] Remove duplicated checks for comps
Check once before iterating through the variants. This greatly
simplifies the tests as each function now has one less code path.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 15:30:05 +01:00
Lubomír Sedlář 1c84dc6ea0 [init] Break long lines
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 15:30:03 +01:00
Lubomír Sedlář 41cdf54c05 [init] Don't overwrite the same log file
When creating the comps repo, use a separate log file for each variant
instead of overwriting the same global file again and again.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 15:29:40 +01:00
Lubomír Sedlář 2ca002d602 [init] Add config option for keeping original comps
The configuration can specify a list of variants for which the original
comps file will be copied without any modification.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-10 15:22:21 +01:00
Lubomír Sedlář d909adf26c [pkgset] Respect inherit setting
It's logged, but not really used...

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-09 19:23:37 +01:00
Lubomír Sedlář 7e2cd28fb8 [live-media] Support release set to None globally
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-09 13:08:22 +01:00
Dennis Gilmore 0e7ea91d9d Merge #206 `Add option to customize disc type` 2016-03-08 13:40:43 +00:00
Dennis Gilmore f898c7ca7d Merge #203 `Simplify common live media options ` 2016-03-08 13:38:39 +00:00
Lubomír Sedlář 72f9819779 [createiso] Add customizing disc type
Relates: #105
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-08 13:04:34 +01:00
Lubomír Sedlář 44d7b31a80 [live-images] Add customizing disc type
Relates: #105
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-08 13:04:34 +01:00
Lubomír Sedlář 0c9ad96a31 [buildinstall] Add customizing disc type
This patch adds configuration option to change disc type used in file
name. So far this can only be changed for link to images/boot.iso.

Resolves: #109
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-08 13:04:28 +01:00
Lubomír Sedlář ad104f994a [buildinstall] Rename method to not mention symlinks
It is either hardlinking or copying, so the name is quite misleading.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-08 11:26:14 +01:00
Lubomír Sedlář 27375788c2 [createrepo] Compute delta RPMS against old compose
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-07 14:49:17 +01:00
Lubomír Sedlář 19c3707aee [util] Add function to search for old composes
This was already implemented as part of pkgset phase. It is now moved to
the util module and covered with tests.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-07 14:49:17 +01:00
Lubomír Sedlář 86bb816417 [live-media] Add global settings
These can be overriden for a particular image, but in general case they
can simplify the config.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-04 08:15:25 +01:00
Lubomír Sedlář 9aed3364a6 [createrepo] Refactor code
This patch tries to simplify the code by:

 * breaking up too long lines
 * simplifying the loop to start createrepo jobs
 * removing duplication
 * general clean up

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-02 16:11:25 +01:00
Lubomír Sedlář 44c4ef5c41 [testphase] Don't run repoclosure for empty variants
As a side effect, the non-existing repositories are no longer passed to
global repoclosure.

Fixes: #196
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-03-01 12:44:07 +01:00
Lubomír Sedlář 4a4ef23e3c [image-build] Fix resolving git urls
After config was modified to work with sections, the resolving broke.
This patch fixes it and adds a test to catch this problem in the future.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-29 08:23:26 +01:00
Lubomír Sedlář 73a560d63c [live-images] No manifest for appliances
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-26 19:48:52 +01:00
Dennis Gilmore e6596d818c Merge #190 `[live-images] Rename log file` 2016-02-26 13:54:01 +00:00
Dennis Gilmore 8670452b6b Merge #189 `[buildinstall] Use -dvd- in volume ids instead of -boot-` 2016-02-26 13:53:43 +00:00
Lubomír Sedlář abb27ac7d7 [live-images] Rename log file
The log file started with createiso-, which is utterly confusing. With
this patch, the logs are named with liveimage- prefix.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-26 12:05:58 +01:00
Lubomír Sedlář 452da86649 [buildinstall] Use -dvd- in volume ids instead of -boot-
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-26 11:42:41 +01:00
Lubomír Sedlář 636ac79186 [buildinstall] Hardlink boot isos
Instead of creating a symlink, try to hardlink the image, and copy it if
hardlinking fails.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-26 10:58:03 +01:00
Lubomír Sedlář 6e8970e648 [live-images] Fix crash when repo_from is not a list
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-24 19:33:28 +01:00
Lubomír Sedlář 98a9e02b1b [buildinstall] Don't copy files for empty variants
They are not there in the first place.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-24 07:31:13 +01:00
Lubomír Sedlář ca7c78d98c [live-images] Set type to raw-xz for appliances
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-23 09:41:03 +01:00
Lubomír Sedlář 456fbb8812 [live-images] Correctly create format
Extracting extensions from the file name is not reliable as there is no
way to determine where extensions start. There can very well be a
version.release separated by dot. To bypass this, just use hardcoded
list of possible formats.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-23 09:35:50 +01:00
Lubomír Sedlář 90954ddf0e [tests] Use real paths module in testing
This avoids problems of mock paths having different API that the real
ones.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 19:11:04 +01:00
Lubomír Sedlář 75b57ac25a [live-images] Create image dir if needed
We can't copy an image to a non-existing directory.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 18:59:31 +01:00
Lubomír Sedlář 7734ddf57e [live-images] Add images to manifest
The type is either "live" or "appliance", the format is set based on
filename extension.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 14:27:51 +01:00
Lubomír Sedlář f80c97e3ec [live-images] Fix path processing
* Add option to keep filenames generated by Koji.
 * Put results of spin-appliance into image dir
 * On failure images are no longer deleted.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 14:27:26 +01:00
Lubomír Sedlář 4a1e029c1d [live-images] Move repo calculation to separate method
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 12:27:26 +01:00
Lubomír Sedlář ab44f3539e [live-images] Filter non-image results
Only keep results that have known extension.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 12:27:17 +01:00
Lubomír Sedlář 1044fb01f8 [live-images] Rename repos_from to repo_from
It should be consistent with live media and image build.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 08:48:12 +01:00
Lubomír Sedlář 7c81c5aa9c [live-images] Automatically populate release with date and respin
This is the same feature that is already available for image-build and
live-media.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 08:38:19 +01:00
Lubomír Sedlář 32a966fc91 [live-images] Build all images specified in config
Not just the first one.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-22 08:21:51 +01:00
Lubomír Sedlář 8ed44dd153 [live-media] Don't create $basedir arch
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-19 09:01:45 +01:00
Dennis Gilmore b4a008f86a do not ad to image build and live tasks the variant if it is empty
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-02-19 08:51:03 +01:00
Dennis Gilmore 466a0eb24f when a variant is empty do not add it to the repolist for livemedia
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-02-19 08:47:05 +01:00
Lubomír Sedlář 1b6688d22c [buildinstall] Don't run lorax for empty variants
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-18 16:12:44 +01:00
Lubomír Sedlář 71369c7690 Merge #159 `use $basearch not $arch in livemedia tasks` 2016-02-18 13:56:15 +00:00
Tomas Mlcoch 5bffca5037 Support signing of rpm wrapped live images
With this patch, you can specify a command for
signing of koji builds. For example:

    signing_key_password_file = '~/file_with_password_for_key_fedora-24'
    signing_key_id = '81b46521'
    signing_command = '~/git/releng/scripts/sigulsign_unsigned.py -vv --password=%(signing_key_password)s fedora-24'

'signing_key_password_file' is a path to a file which contains
a password that will be formatted into 'signing_command' string
via '%(signing_key_password)s' string format syntax (if used).
Because pungi config is usualy stored in git and part of compose
logs we don't want password to be included directly in the config.
Note: If '-' is used instead of a filename, then you will be asked
for the password interactivelly right after pungi starts.

'signing_key_id' is ID of the key that will be used for the signing.
This ID will be used when crafting koji paths to signed files
(kojipkgs.fedoraproject.org/packages/NAME/VER/REL/data/signed/KEYID/..).

'signing_command' a command that will be run with a build as a single
argument. This command mustn't require any user interaction.
If you need to pass a password for a signing key to the command,
do this via command line option of the command with use of string
formatting syntax '%(signing_key_password)s' (see details
about 'signing_key_password_file').

Signed-off-by: Tomáš Mlčoch <tmlcoch@redhat.com>
2016-02-18 13:36:38 +01:00
Dennis Gilmore 1616de1e1e use $basearch not $arch in livemedia tasks
koji for livemedia acts different to image builds and does
not translate $arch to x86_64, i386, etc so we need to just pass
in $basearch so that yum/dnf will translate it for us

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-02-17 17:03:46 -06:00
Lubomír Sedlář bf5196af4a [live-images] Don't tweak kickstarts
Instead of downloading the kickstart file in Pungi and modifying it,
just pass it to Koji.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-17 14:35:28 +01:00
Lubomír Sedlář 454363fba8 Allow specifying empty variants
The variants.xml file can list a variant with is_empty="true" and no
groups. If such variant is found, not package gathering will be run for
it, and no repos will be created.

This only makes sense for a variant that will have some other
deliverables like live media or images.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-16 15:08:15 +01:00
Lubomír Sedlář adbc772fd0 [createrepo] Remove dead assignments
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-16 15:08:15 +01:00
Lubomír Sedlář 284d3a3510 [image-build] Use dashes as arch separator in log
Since multiple images are created in a single Koji task, the path to log
file contains a list of arches. These used to be separated with comma.
For consistency with live-media they are now separated by dashes.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-15 09:04:03 +01:00
Lubomír Sedlář abcc51fb85 [buildinstall] Stop parsing task_id
KojiWrapper returns the task id as an integer already (if at all). There
is no need to parse it again.

Pagure: #148
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-12 12:39:50 +01:00
Dennis Gilmore 96489a1e78 Merge #146 `[live-media] Properly calculate iso dir` 2016-02-11 13:07:30 +00:00
Lubomír Sedlář 8ef2e7e308 [live-media] Properly calculate iso dir
The method expects to be called with a arch, not just variant.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 13:58:42 +01:00
Lubomír Sedlář e9a42ad54f [image-build] Fix tests
This patch updates tests so that they pass, and fixes a couple places in
image build that did not work correctly with the nested configuration.
The documentation is reformatted so that it horizontal scrolling is less
likely.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 13:22:26 +01:00
Lubos Kocman f067f38df0 add image-build sections
allows to use factory-parameters ...

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-02-11 13:22:16 +01:00
Lubomír Sedlář 5138a9b6e6 [live-images] Add support for spin-appliance
The config can specify type=appliance so that koji uses spin-appliance
instead of spin-livecd.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 12:08:48 +01:00
Lubomír Sedlář ac29bf05ee [live-media] Koji option is ksfile, not kickstart
In config, it is still called kickstart to be consistent with how
image-build calls it.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 10:40:04 +01:00
Lubomír Sedlář 6ec151cde2 [live-media] Use install tree from another variant
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 10:24:12 +01:00
Lubomír Sedlář 0c4bd42f80 [live-media] Put images into iso dir
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 10:11:38 +01:00
Lubomír Sedlář 91faa0fafe [image-build] Koji expects arches as a comma separated string
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-11 07:50:02 +01:00
Dennis Gilmore 8bf1b09641 Merge #139 `Log more details when any deliverable fails` 2016-02-10 21:03:32 +00:00
Lubomír Sedlář b35264cfba [live-media] Version is required argument
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-10 18:29:29 +01:00
Lubomír Sedlář f57665f963 [buildinstall] Improve logging
This patch fixes how logs are stored if lorax is used as buildinstall
method. The logs for each variant are in a separate file now. If failure
is allowed, the global log will now show why it failed.

A couple tests are added as well.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-08 13:17:08 +01:00
Lubomír Sedlář d661de3e73 Log more details about failed deliverable
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-08 12:07:04 +01:00
Dennis Gilmore 2b897ec6ea Merge #135 `Add live media support` 2016-02-02 10:15:56 +00:00
Dennis Gilmore a2ea84934b Merge #133 `media_split: add logger support. Helps with debugging space issues on dvd media` 2016-02-02 10:11:46 +00:00
Lubomír Sedlář 439622d576 [live-media] Add live media phase
This phase builds live media in Koji using the Live Media Creator. It
runs in parallel with current live images, create ISO and image build
phases.

The documentation is updated to explain how to configure this.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-02-01 13:28:49 +01:00
Lubomír Sedlář ae30c07553 [koji-wrapper] Use more descriptive method names
The methods mentioning image build are generic and can work for other
task types.

get_image_build_paths -> get_image_paths
run_create_image_cmd -> run_blocking_cmd

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-29 09:02:02 +01:00
Lubomír Sedlář d85f00818d [image-build] Remove dead code
There are no mounts when running image-build tasks in Koji. This looks
like a copy-paste error.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-29 09:02:02 +01:00
Lubos Kocman f0a8899ea7 media_split: add logger support. Helps with debugging space issues on dvd media
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-01-26 13:02:14 +00:00
Lubomír Sedlář a698c7cc0a [image-build] Allow running image build scratch tasks
Issue #130

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-26 12:47:59 +01:00
Lubomír Sedlář dc4d502f2a [image-build] Allow dynamic release for images
When the release is explicitly set to None, generate a value from date
and respin. The documentation is updated to explain how it works.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-21 14:32:29 +01:00
Dennis Gilmore c77e78c4f1 Merge #123 `Live images: add repo from another variant` 2016-01-20 15:37:36 +00:00
Dennis Gilmore 09aebd3db9 Merge #125 `[image-build] Stop creating wrong arch dirs` 2016-01-20 15:37:27 +00:00
Lubomír Sedlář 8b4ad1ea02 Toggle multilib per variant
There is now a single option `multilib`, that maps variants and arches
to multilib methods. This replaces old `multilib_methods` option.

Multilib arches are implicitly deduced instead of using the
`multilib_arches` option.

The test compose is updated to only enable multilib on Server and its
addons.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-20 12:53:08 +01:00
Lubomír Sedlář 6d7fff5d1b [live-images] Code cleanup
This patch removes some duplicated variables that get passed on to the
build thread. It also moves creation of the command for generating image
manifest closer to where it is used. Finally it adds tests for the
thread.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-19 08:26:59 +01:00
Lubomír Sedlář 9059852ab5 [live-images] Add repos from other variants
This patch adds option for adding repositories from other variants to
the koji task for building images.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-19 08:26:59 +01:00
Lubomír Sedlář e016015cf3 [image-build] Stop creating wrong arch dirs
There is no such arch as $arch or %(arch)s.

Pagure: #124
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-19 08:24:02 +01:00
Lubomír Sedlář f3f0ce0d35 Fix filtering of system release packages
The code was inconsistent with the documentation: the logic was
inverted.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-13 08:52:06 +01:00
Dennis Gilmore 5f7f23ed96 Merge #114 `Use install tree/repo from another variant for image build` 2016-01-12 17:56:38 +00:00
Lubomír Sedlář b78878ac69 Make system release package filtering optional
Fedora variants needs both general fedora-release and
fedora-release-$variant packages installed. This patch disables the code
that would throw fedora-release away (assuming correct config is set).

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-12 17:04:37 +01:00
Lubomír Sedlář 5688f1cbae [image-build] Optionally do not break whole compose
The configuration can now specify image-build as a deliverable that can
fail but not abort the whole compose.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-12 08:39:30 +01:00
Lubomír Sedlář af11bebf1b [image-build] Refactoring
* Move getting arches to separate method.
 * Modify git url only if there is going to be a build. This is not very
   likely to happen, but could save a bit of time if it really does
   happen.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-11 16:42:05 +01:00
Lubomír Sedlář d2ea1dd288 [image-build] Use repo from another variant
The config can now additionally specify other variants whose repos will
be passed on to koji. The previous way of specifying extra repos is
still available, as is the automatic adding of repo for current variant.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-11 16:42:05 +01:00
Lubomír Sedlář 7f815d80f5 [image-build] Take install tree from another variant
Add a configuration option to use install tree from another variant.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-11 16:42:05 +01:00
Lubomír Sedlář 9c1418eb0a [image-build] Use single koji task per variant
Given a list of arches, koji can build multiple images in one go
(automatically starting children tasks for each one).

This causes a bunch of changes:
 * The configuration no longer allows changing config based on
   architecture, only variants are allowed. It is however possible to
   filter which arches are used for the building in the variant.
 * The configuration files for koji image-build are stored in
   work/image-build/$variant (not split based on arch).

This patch also changes the option name that is passed to koji
image-build: the repos should be specified under key `repo` (without the
trailing slash).

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-08 14:33:54 +01:00
Lubomír Sedlář 88bb6ac3d7 Fix image-build modifying config
The code modifies the config in place, so it only works in the first
iteration. The fix is to create a copy which can be safely modified and
next iteration will still see the original data.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-06 16:53:00 +01:00
Lubomír Sedlář 770a81b76c Don't crash on generating volid without variant
First, this fixes the crash when volume id requires variant uid, but it
is not specified. This happened in buildinstall phase.

When lorax is used, it is run once for each variant, so we can actually
specify the variant and get the correct variant.

When using buildinstall, no volume id will be generated and pungi will
possibly crash later on.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-01-04 19:27:11 +01:00
Dennis Gilmore 1af17a5262 Merge #99 `Add option to specify non-failing stuff` 2015-12-17 18:18:12 +00:00
Lubomír Sedlář 0222d4dc6d Add repo from current compose
This gets added together with the any repos from configuration.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-17 12:15:17 -06:00
Lubomír Sedlář 7a965bcb83 Fix getting compose topdir in CreateImage build thread
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-17 12:15:13 -06:00
Lubomír Sedlář a6b673dbdd Add option to specify non-failing stuff
There is a new configuration option that allows listing what can fail
without aborting the whole compose. So far, only buildinstall, createiso
and liveimages phases react to this option.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-17 11:15:47 +01:00
Lubomír Sedlář 0e237db5f6 Allow customizing image name and volume id
The computation of image name has been moved to a separate function.
This allowed simplification in how work dir for isos is computed, but
the result is not changed.

The live image phase has some special casing for names of RPM wrapped
ISOs. This is moved to the actual phase. Since this is (and has been)
undocumented, there should not be many users of this special case.

The documentation is updated to describe how image names and volume ids
are determined and how the process can be customized.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-14 14:39:21 +01:00
Dennis Gilmore 81e90eb780 Merge #88 `Resolve HEAD in ksurl to actual hash` 2015-12-08 17:37:09 +00:00
Dennis Gilmore f5862deea7 Merge #87 `Add support for customizing lorax options` 2015-12-08 17:36:18 +00:00
Dennis Gilmore 4b374278e4 we need to ensure that we send all the tasks to koji on the correct arch
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-12-08 09:04:32 -06:00
Lubomír Sedlář fe95221f10 Resolve HEAD in ksurl to actual hash
When the image build configuration specifies kickstart URL as a HEAD of
a git repo, pungi now figures out what the actual hash of that commit is
and uses that hash instead. This might make logs clearer and should
prevent potential problems if someone pushes to that repo during
composing.

Documentation is updated to mention this.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-08 14:29:18 +01:00
Lubomír Sedlář 716b2d521a Add support for customizing lorax options
The config file can now specify options for lorax per variant and arch.
This is needed for Fedora to set x86_64 images as bootable on mac.

The old config option `buildinstall_upgrade_image` was deprecated, as
the same can be specified via new `lorax_options`.

Documentation and tests are updated.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-08 12:47:21 +01:00
Lubomír Sedlář 4a96e8e313 Run lorax in separate dirs for each variant
Lorax fails when run on an existing non-empty directory. This patch runs
it in separate subdirectiories base on variant. Running with
buildinstall should not be changed at all.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-07 09:45:33 +01:00
Dennis Gilmore bdb1bcb35c Merge #84 `Allow specifying --installpkgs for lorax` 2015-12-04 19:41:28 +00:00
Dennis Gilmore 4a26b99a24 Merge #83 `Fix recently discovered bugs` 2015-12-04 19:39:49 +00:00
Lubomír Sedlář cdec198b6d Start lorax for each variant separately
The buildinstall phase now starts lorax for each variant separately.
Running with buildinstall should not be affected in any way.

Only variants of type=variant are considered. The side-effect of this is
that if an architecture is only used by variants of other types, lorax
will not be called at all.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-03 15:19:12 +01:00
Lubomír Sedlář b6d9b5632e Fix generating checksum files
This patch modifies how checksums are stored - it uses BSD-style
checksums.

The filename with the checksum can now be customized depending on actual
compose run and metadata. This required adding another option to the
checksumming phase. Documentation is updated and includes example for
creating names used in Fedora.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-03 10:54:09 +01:00
Lubomír Sedlář 539736a11e Use lowercase hashed directories
On case-insensitive filesystems it is not such a good idea to have
directories that only differ in case. Packages should be always split
into lowercased directories.

The test data is modified to include some packages starting with
uppercase letters. The example in code can be verified by running
`nosetests --with-doctest`.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-12-03 09:08:15 +01:00
Dennis Gilmore 290f8f6540 indentation fixs correcting dvd creation
getting the commands together to run the iso creation process was
incorrectly moved when jigdo creation was made optional, patch fixes
https://pagure.io/pungi/issue/77

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-12-02 13:00:06 -06:00
Dennis Gilmore e9699b7327 remove glibc32 from the runroot tasks
a workaround has been put in place on os's that need it. dnf errors
when a package is listed that is not available. breaking rawhide
composes.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-12-02 08:51:18 -06:00
Dennis Gilmore 6f00f20b3d Merge #68 `Add support for sending messages` 2015-11-25 14:56:51 +00:00
Lubomír Sedlář 7ce5c76673 Send more messages in createiso phase
When phase starts, a message is sent with list of images that are going
to be built. As each images is finished (or fails), another message
announces that status.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-25 15:46:50 +01:00
Lubomír Sedlář 066855a039 Add ability to send messages about progress
With this patch, Pungi can invoke an arbitrary command on various
moments of the compose process. The invoked command can the decide on
what message to send (and using what messaging system).

The actual command is specified in the config file.

There is a script provided that sends the messages via fedmsg.

The documentation is updated to have details about the new config option
as well as the interface for the messaging script.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-25 15:46:50 +01:00
Lubomír Sedlář 129e654690 Compute checksums in ImageChecksumPhase
The phase goes through all images declared in image manifest, computes
their checksums, stores them in appropriate files and updates the
manifest so that it includes the actual checksums.

The documentation contains details about new configuration options.

The test suite now needs Python's mock package.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-24 09:36:22 +01:00
Lubomír Sedlář 660c8bc2b3 Remove computing checksums from phases
These phases were computing checksums for images:

 * buildinstall
 * createiso
 * image_build
 * live_images
 * product_img

In each phase the checksummed thing would ultimately end-up in image
manifest.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-24 09:36:19 +01:00
Lubomír Sedlář 359eb444e5 Move image checksum collecting to separate phase
The checksums are still generated in the ImageBuild and CreatISO phases,
but collecting of them into single file is moved from pungi-koji script
into a separate phase.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-24 09:36:13 +01:00
Dennis Gilmore 5ff5ffc259 compose.config is in self
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-10-28 21:18:15 -05:00
Jon Disnard fd537e5070 Merge #61 `make jigdo optional (iii)` 2015-09-15 13:39:15 -05:00
Jon Disnard 2114369e9c Default True for configurable jigdo ISOs.
Signed-off-by: Jon Disnard <jdisnard@redhat.com>
2015-09-15 13:23:54 -05:00
Tomas Mlcoch 1d97ce5ea1 Add live_images option to live_images phase 2015-09-10 07:10:41 -04:00
Tomas Mlcoch b4fd280d80 Fix expected type of createrepo_checksum config option 2015-09-10 07:09:37 -04:00
Tomas Mlcoch 3df5a11a89 Fix KojiWrapper initialization in live_images phase 2015-09-09 03:40:30 -04:00
Tomas Mlcoch 02e55b67b3 Remove createiso phase's dependency on pkgset_koji_url config option 2015-09-09 03:40:29 -04:00
Lubos Kocman fd64bba4dd Merge #54 `fix log_info for image_build (fails if image_build is skipped)` 2015-09-07 15:41:27 +00:00
Lubos Kocman 3efd29e465 image_build: self.log_info -> self.compose.log_info 2015-09-07 15:41:27 +00:00
Dennis Gilmore da0405a0f5 Revert "Added params needed for Atomic compose to LoraxWrapper"
This reverts commit 919a4fc619.
2015-09-04 12:12:36 -05:00
Jon Disnard 6e773f8676 Disable jigdo by default, saves a lot of time.
Signed-off-by: Jon Disnard <jdisnard@redhat.com>
2015-09-01 17:14:46 -05:00
Lubos Kocman abb2ff1584 live_images: replace hardcoded path substition with translate_path() call
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2015-09-01 08:23:42 +00:00
Lubos Kocman 158d1834a6 live_images fix reference from koji to koji_wrapper
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2015-09-01 08:23:24 +00:00
Lubos Kocman 8e90a2a32a Add image-build support
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2015-09-01 08:03:34 +00:00
Lubos Kocman 449b4e4c87 import duplicate import of errno from buildinstall
Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2015-08-31 22:51:22 -05:00
Tomas Kopecek 9235844529 More detailed message for unsigned rpms. 2015-08-25 08:07:05 -04:00
Tomas Mlcoch d9d9db3e5d live_images: Copy built wrapped rpms from koji into compose. 2015-08-25 07:57:51 -04:00
Tomas Mlcoch 44ebf5eedc live_images: Allow custom name prefix for live ISOs. 2015-08-25 07:49:29 -04:00
Tomas Mlcoch 39c073abf9 Do not require enabled runroot option for live_images phase. 2015-08-25 07:48:19 -04:00
Tomas Mlcoch ba39435bf6 Support for rpm wrapped live images. 2015-08-25 07:42:05 -04:00
Adam Miller 05e9bbab9c Merge #36 `Add params needed for Atomic compose to LoraxWrapper` 2015-08-18 15:50:16 -05:00
Adam Miller 919a4fc619 Added params needed for Atomic compose to LoraxWrapper
Add add_template, add_template_var, add_arch_template, and
add_arch_template_var to the call for lorax.get_lorax_cmd for the Atomic
ISO composes.

Remove duplicate if statement for add_template_var in lorax wrapper
2015-08-18 15:47:41 -05:00
Daniel Mach 5238e1cc99 createrepo: Fix empty repodata when hash directories were enabled. 2015-07-24 18:18:03 -04:00
Daniel Mach 19a7394974 Fix treeinfo checksums. 2015-07-24 10:49:28 -04:00
Daniel Mach 0d8ad9a111 gather: Implement hashed directories.
Set 'hashed_directories = True' config option to enable the feature.
2015-07-24 04:40:55 -04:00
Daniel Mach 1f313b39ad createiso: Add createiso_skip options to skip createiso on any variant/arch. 2015-07-23 10:58:35 -04:00
Daniel Mach b85307c683 Fix buildinstall for armhfp.
armhfp is not a valid RPM arch, it's only a tree arch or basearch.
Lorax requires valid RPM arch as --buildarch.
2015-07-22 13:00:36 -04:00
Daniel Mach 63338a9689 Fix and document productimg phase. 2015-07-22 12:57:39 -04:00
Daniel Mach 63c631a99b Add dependency of 'runroot' config option on 'koji_profile'. 2015-07-10 07:31:57 -04:00
Daniel Mach 72302bd98e Rename product_* to release_*.
CHANGE: Rename product_* config options to release_* for consistency with productmd.
ACTION: Rename product_name, product_short, product_version, product_is_layered to release_* in config files.
        Rename //variant/product to //variant/release in variants XML.
2015-07-09 06:58:30 -04:00