flatcar-scripts/build_library
Thilo Fromm e4c22ef6c7 build_library/disk_util: use byte array for conversion
disk_util sometimes bails out during build with an ASCII conversion
error:

Traceback (most recent call last):
  File "/mnt/host/source/src/scripts/build_library/disk_util", line 1114, in <module>
    main(sys.argv)
  File "/mnt/host/source/src/scripts/build_library/disk_util", line 1110, in main
    options.func(options)
  File "/mnt/host/source/src/scripts/build_library/disk_util", line 779, in Verity
    Tune2fsReadWrite(options, part, disable_rw=True)
  File "/mnt/host/source/src/scripts/build_library/disk_util", line 716, in Tune2fsReadWrite
    image.write(chr(flag_value))
UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 0: ordinal not in range(128)

Curiously, the error does not reproduce every time (though the code
leading to the error is straightforward).

This change converts the integer to be written to a byte array (of size
1) instead of using chr(). Also, the file to be written is explicitly
opened in binary mode.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-08-27 17:25:34 +02:00
..
board_options.sh board_options: new portageq wrappers 2016-02-20 14:17:45 -08:00
build_image_util.sh build_library: Fix python script extension 2021-08-18 18:57:04 +02:00
catalyst_sdk.sh build_library/catalyst_sdk.sh: save snapshot of coreos-overlay 2021-03-04 18:59:13 +01:00
catalyst_toolchains.sh catalyst_toolchains: don't touch the SDK 2021-06-25 10:37:21 +02:00
catalyst.sh bootstrap_sdk: no package updates in stage 1 2021-03-03 17:32:38 +01:00
check_root build_library/check_root: Port to python3 2021-02-12 10:03:16 +01:00
configure_bootloaders.sh 2317.0.1 2019-11-07 19:40:01 +01:00
dev_container_util.sh build_library: Fix git URLs 2021-01-19 17:31:17 +01:00
disk_layout.json Revert "Revert "disk_layout: use btrfs for the OEM partition"" 2021-08-03 10:50:06 +02:00
disk_util build_library/disk_util: use byte array for conversion 2021-08-27 17:25:34 +02:00
ebuild_aci_manifest.in Initial checkin of docker-aci build script 2017-03-01 14:59:43 -08:00
ebuild_aci_util.sh build_library: Enhance license info and store it on the image 2020-06-09 21:09:44 +02:00
gen_tmpfiles.py build_library: Convert python2 scripts to python3 2021-08-18 18:56:48 +02:00
generate_au_zip.py generate_au_zip: Remove useless line 2021-08-24 16:08:15 +02:00
generate_grub_hashes.py build_library: Fix getting integer from string 2021-08-18 19:01:51 +02:00
generate_kernel_hash.py build_library: Fix python script extension 2021-08-18 18:57:04 +02:00
grub_install.sh 2345.0.0 2019-12-04 14:59:11 +01:00
grub.cfg grub.cfg: Stop probing for UUID 0x01 2020-08-04 11:45:29 +02:00
menu.lst grub: the one bootloader to rule them all 2014-12-05 16:51:11 -08:00
modify_image_util.sh 2317.0.1 2019-11-07 19:40:01 +01:00
niftycloud_ovf.sh vm_image_util: changed niftycloud format to ovf 2014-12-18 17:22:51 +09:00
oem_aci_util.sh build_library: Enhance license info and store it on the image 2020-06-09 21:09:44 +02:00
parallels_pvs.sh build_library: set parallels build scripts as executable 2016-10-27 13:27:30 -07:00
prod_image_util.sh build_library: Enhance license info and store it on the image 2020-06-09 21:09:44 +02:00
qemu_template.sh build_lib/qemu_tmpl: fix short-form warning 2021-07-16 16:04:50 +02:00
release_util.sh Add the new OEM type, and selective upload azure as private 2020-09-19 18:58:12 +05:30
set_lsb_release set_lsb_release: update codename 2020-05-18 12:22:51 +02:00
template_interoute.ovf init commit of interoute oem build 2015-09-05 00:32:50 +01:00
template_vmware.ovf build_library/template_vmware.ovf: Newer OS type and hardware version 2020-07-09 12:19:23 +02:00
test_build_root fix(test_image_content): Improve /usr symlink and conflict tests. 2013-12-09 19:32:54 -08:00
test_image_content.sh test_image_content: whitelist OpenSSL GLSA 2020-05-22 15:30:54 +02:00
test_oem_pkgs test_oem_pkgs: Drop reference to oem-xendom0 2017-06-08 14:48:38 -07:00
toolchain_util.sh build_library/toolchain_util: check CBUILD+CHOST for rust warning 2021-07-28 16:47:13 +02:00
torcx_manifest.sh build_library: Filter out null paths in torcx manifests 2017-09-15 12:17:52 -07:00
virtualbox_ovf.sh virtualbox_ovf.sh: use virtio network interfaces 2014-11-07 16:16:03 -07:00
vm_image_util.sh build_image_util.sh: delete vmlinuz file from /usr partition 2021-07-28 20:59:16 +02:00
write_hdd.sh build_library: set parallels build scripts as executable 2016-10-27 13:27:30 -07:00