New upstream version 2019.5

This commit is contained in:
Simon McVittie committed 2019-11-02 10:23:11 +00:00
commit f2dce86edf
42 files changed
+409 -155

No files matched your search

+1 -1
View File
@@ -145,7 +145,7 @@ ot_test_setup_sysroot (GCancellable *cancellable,
g_autoptr(GString) buf = g_string_new ("mutable-deployments");
gboolean can_relabel;
gboolean can_relabel = FALSE;
if (!ot_check_relabeling (&can_relabel, error))
return FALSE;
if (!can_relabel)
+3
View File
@@ -395,6 +395,8 @@ setup_os_repository () {
mkdir -p usr/bin ${bootdir} usr/lib/modules/${kver} usr/share usr/etc
kernel_path=${bootdir}/vmlinuz
initramfs_path=${bootdir}/initramfs.img
# the HMAC file is only in /usr/lib/modules
hmac_path=usr/lib/modules/${kver}/.vmlinuz.hmac
# /usr/lib/modules just uses "vmlinuz", since the version is in the module
# directory name.
if [[ $bootdir != usr/lib/modules/* ]]; then
@@ -403,6 +405,7 @@ setup_os_repository () {
fi
echo "a kernel" > ${kernel_path}
echo "an initramfs" > ${initramfs_path}
echo "an hmac file" > ${hmac_path}
bootcsum=$(cat ${kernel_path} ${initramfs_path} | sha256sum | cut -f 1 -d ' ')
export bootcsum
# Add the checksum for legacy dirs (/boot, /usr/lib/ostree-boot), but not
+1
View File
@@ -43,6 +43,7 @@ ${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=MOO --karg=quiet --os testos
assert_file_has_content out.txt "Bootloader updated.*"
assert_file_has_content sysroot/boot/loader/entries/ostree-1-testos.conf 'options.* root=LABEL=MOO'
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/vmlinuz-3.6.0 'a kernel'
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/.vmlinuz-3.6.0.hmac 'an hmac file'
assert_file_has_content sysroot/boot/ostree/testos-${bootcsum}/initramfs-3.6.0.img 'an initramfs'
echo "ok generate bls config on first deployment"
+5
View File
@@ -21,6 +21,11 @@
set -euo pipefail
if ! ostree --version | grep -q -e '- libarchive'; then
echo "1..0 #SKIP no libarchive support compiled in"
exit 0
fi
. $(dirname $0)/libtest.sh
setup_test_repository "archive"
+8 -13
View File
@@ -199,16 +199,15 @@ test_get_value_with_default_group_optional (void)
static void
test_copy_group (void)
{
g_auto(GStrv) keys = NULL;
g_auto(GStrv) keys2 = NULL;
gsize length, length2, ii;
GKeyFile *tmp = g_key_file_new ();
gsize length, length2;
const char *section = "section";
GLogLevelFlags always_fatal_mask;
/* Avoid that g_return_val_if_fail causes the test to fail. */
always_fatal_mask = g_log_set_always_fatal (0);
g_autoptr(GKeyFile) tmp = g_key_file_new ();
g_assert_false (ot_keyfile_copy_group (NULL, tmp, section));
g_assert_false (ot_keyfile_copy_group (g_keyfile, NULL, section));
g_assert_false (ot_keyfile_copy_group (g_keyfile, tmp, NULL));
@@ -218,21 +217,17 @@ test_copy_group (void)
g_assert_true (ot_keyfile_copy_group (g_keyfile, tmp, section));
keys = g_key_file_get_keys (g_keyfile, section, &length, NULL);
keys2 = g_key_file_get_keys (tmp, section, &length2, NULL);
g_auto(GStrv) keys = g_key_file_get_keys (g_keyfile, section, &length, NULL);
g_strfreev (g_key_file_get_keys (tmp, section, &length2, NULL));
g_assert_cmpint(length, ==, length2);
for (ii = 0; ii < length; ii++)
for (gsize ii = 0; ii < length; ii++)
{
g_autofree char *value = NULL;
g_autofree char *value2 = NULL;
value = g_key_file_get_value (g_keyfile, section, keys[ii], NULL);
value2 = g_key_file_get_value (g_keyfile, section, keys[ii], NULL);
g_autofree char *value = g_key_file_get_value (g_keyfile, section, keys[ii], NULL);
g_autofree char *value2 = g_key_file_get_value (g_keyfile, section, keys[ii], NULL);
g_assert_cmpstr (value, ==, value2);
}
g_key_file_free (tmp);
}
static void
+1 -1
View File
@@ -54,7 +54,7 @@ echo 'ok documented symbols'
# ONLY update this checksum in release commits!
cat > released-sha256.txt <<EOF
21e8ee92ef53c62c682ef8ae818bb6191b3cf6256d298493f75cc734fb3a3a02 ${released_syms}
a8efa9b08106b973dc3341b52f42fd858ac8db66084586711cc78f12a0bab630 ${released_syms}
EOF
sha256sum -c released-sha256.txt