With -joliet-long it allows longer filenames, but silently drops the
ones longer than 253 characters. Check for this and raise an error.
Related: rhbz#2028048
mkksiso cannot be run on an iso from another arch, some of the files and
tools are arch specific. Catch this problem and tell the user that the
iso doesn't match the host's architecture.
Related: rhbz#2028048
It is possible the source iso doesn't have an id, or there is an errorr
reading it. Raise an error when this happens to make it more clear what
the problem is.
Related: rhbz#2028048
Sometimes, depending on the buffering, or length of data being received,
the end of the data could be the 1st byte or so of a UTF8 character.
This would cause a crash when trying to decode the raw data buffer.
This switches it to only decode once a full line has been found.
It also adds tests for the LogMonitor class.
Make sure that os.ftruncate() is called with an int() size. Before python
3.10 it used to handle this internally, but in 3.9 it was deprecated and
in 3.10 it now raises an error:
TypeError: 'float' object cannot be interpreted as an integer
This makes sure that the size is truncated to an int(). The value is in
bytes, so truncation does not lose anything.
mkfs.hfsplus may not be installed so instead of crashing near the end of
the install check for it and print a useful error message.
Resolves: rhbz#1969743
dracut needs a reasonable chroot environment in order to run correctly.
This adds the DracutChroot context manager that sets up and tears down
mounts inside the root directory tree.
Switch to using it in creator.rebuild_initrds_for_live() and
TreeBuilder.rebuild_initrds()
The branding package name doesn't always match the product name. This
saves the branding package names as discovered in the enabled repos and
exposes it to the templates as branding.release and branding.logos --
which could potentially be None so the template needs to take that into
account.
Related: rhbz#1956205
weldr-client has replaced composer-cli so remove all of the code and
tests, adjust various things so they don't expect it to be available,
and rename some things like test/composertest.py to reflect its
exclusive use by lorax.
Some ostree builds, like edge, require passing a url to it along with
the ref and parent arguments. This adds an optional --url argument to
the 'composer-cli compose start-ostree' command.
Resolves: rhbz#1929381
This will cause livemedia-creator to terminate anaconda and exit when an
install hits an error that often causes anaconda to get stuck and not
exit.
Resolves: rhbz#1900596
When monitoring log output in livemedia-creator --no-virt it could get
stuck if the output from anaconda stops for some reason.
This changes execReadlines so that it will only read output when it is
available, will monitor the process state, and continue to call the
callback function.
It also adds a final timeout on proc.communicate() so that if Anaconda
becomes stuck and won't exit livemedia-creator will eventually exit.
When the no-virt callback terminates anaconda on an error it now sends a
TERM signal to all of the unshare process' children because just sending
it to unshare doesn't cause anaconda to exit.
mk-s390-cdboot has stopped working because the kernel outgrew the
hard-coded offset it used when creating cdboot.img. IBM now has a script
in s390utils that can do the same thing so use the upstream script
instead.
This drops mk-s390-cdboot script, switches the s390 templates to use
mk-s390image from s390utils.
It adds @ROOT@ to cdboot.prm, and sets inst.stage2 so that the installer
image will be found when booting the iso.
Resolves: rhbz#1891778
Because of the way that compress pipes things between processes it would
leave open file descriptors, and running processes around for a bit.
This waits for them to exit and closes the fds before returning.
Python will eventually close open files, but it is recommended to
explicitly close them instead of waiting for the gc or program exit.
This fixes all the uses of open...read/write in the codebase, mostly in
tests.
This changes the start-ostree command to:
compose start-ostree [--size XXXX] [--parent PARENT] [--ref REF] <BLUEPRINT> <TYPE> [<IMAGE-NAME> <PROFILE.TOML>]
Both of them are optional, and if missing a "" is passed to
osbuild-composer. Also adds more tests for all the various possible
options and removes the provider and profile arguments.
Creating /proc/modules just quiets one dracut warning, it doesn't
actually effect the initrd that is created.
Now that mock is being run with netsharedpath set to exclude /proc is
causes problems for running lorax inside a mock, so just remove this to
prevent a crash when it doesn't exist.
Related: rhbz#1848201
If the original ISO contains both `efiboot.img` and `macboot.img`,
the current `xorrisofs` invocation does not configure `efiboot.img`
to be bootable, only `macboot.img`.
This fix uses `>=` to compare `efimode` against `EFIBOOT`, since
`MACBOOT` implies `EFIBOOT` as well.
This is similar to the logic for `mkisofs`.
Fixes#1046.
Generated image confirmed to work, when comparing the reports:
`xorriso -indev $PATH_TO_ISO -report_el_torito cmd`
```
❯ diff -u ~/xorriso-report-{orig,new}.log
--- /home/michel/xorriso-report-orig.log 2020-07-15 20:01:01.405289018 -0700
+++ /home/michel/xorriso-report-new.log 2020-07-15 20:01:19.183555423 -0700
@@ -1,6 +1,6 @@
--volid 'Fedora-S-dvd-x86_64-32'
--volume_date uuid '2020042219432600'
--boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/Downloads/Fedora-Server-netinst-x86_64-32-1.6.iso'
+-volid 'Fedora-32-btrfs'
+-volume_date uuid '2020071602410900'
+-boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/src/github/michel-slm/luks-kickstarts/iso/Fedora-32-WS-20200715-3.iso'
-boot_image any partition_cyl_align=on
-boot_image any partition_offset=0
-boot_image any partition_hd_cyl=64
@@ -14,12 +14,6 @@
-boot_image any load_size=2048
-boot_image any boot_info_table=on
-boot_image any next
--boot_image any efi_path='/images/efiboot.img'
--boot_image any platform_id=0xef
--boot_image any emul_type=no_emulation
--boot_image any load_size=11462656
--boot_image isolinux partition_entry=gpt_basdat
--boot_image any next
-boot_image any efi_path='/images/macboot.img'
-boot_image any platform_id=0xef
-boot_image any emul_type=no_emulation
```
```
❯ diff -u ~/xorriso-report-{orig,new5}.log
--- /home/michel/xorriso-report-orig.log 2020-07-15 20:01:01.405289018 -0700
+++ /home/michel/xorriso-report-new5.log 2020-07-15 20:30:27.571644770 -0700
@@ -1,6 +1,6 @@
--volid 'Fedora-S-dvd-x86_64-32'
--volume_date uuid '2020042219432600'
--boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'/home/michel/Downloads/Fedora-Server-netinst-x86_64-32-1.6.iso'
+-volid 'Fedora-32-btrfs'
+-volume_date uuid '2020071603283100'
+-boot_image isolinux system_area=--interval:imported_iso:0s-15s:zero_mbrpt,zero_gpt:'./iso/Fedora-32-WS-20200715-5.iso'
-boot_image any partition_cyl_align=on
-boot_image any partition_offset=0
-boot_image any partition_hd_cyl=64
@@ -17,7 +17,7 @@
-boot_image any efi_path='/images/efiboot.img'
-boot_image any platform_id=0xef
-boot_image any emul_type=no_emulation
--boot_image any load_size=11462656
+-boot_image any load_size=11460608
-boot_image isolinux partition_entry=gpt_basdat
-boot_image any next
-boot_image any efi_path='/images/macboot.img'
```
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
urllib3 has a retry system that send the request again when the
connection fails, times out, is redircted, etc. This turns off retries,
which aren't very useful anyway.
This is used to start an ostree build, it is only supported on
ostree-composer, and requires the ostree ref and parent. It may also
include --size and optionally be uploaded.
osbuild-composer can support user specified image sizes, this adds an
optional argument, after start, to specify the size in MiB. eg.
composer-cli compose start --size 2048 example-http-server qcow2
This only works when the backend is not 'lorax-composer', when it is the
user will get a warning that it will be ignored.