mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
ostree: version bump and removing old patches
This commit is contained in:
parent
e4e6b7e542
commit
1a56b3515b
@ -1,268 +0,0 @@
|
||||
From 196c2e1036ed990bca57c199f271c0359509e9f9 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Tue, 19 Jun 2018 09:34:18 -0400
|
||||
Subject: [PATCH] Drop "ostree trivial-httpd" CLI, move to tests directory
|
||||
|
||||
See https://github.com/ostreedev/ostree/issues/1593
|
||||
|
||||
Basically this makes it easier for people packaging, as the trivial-httpd
|
||||
is only for tests, and this way the binary will live with the tests.
|
||||
|
||||
Also at this point nothing should depend on `ostree trivial-httpd`.
|
||||
---
|
||||
Makefile-man.am | 6 --
|
||||
Makefile-ostree.am | 7 ---
|
||||
Makefile-tests.am | 7 +++
|
||||
configure.ac | 9 ---
|
||||
man/ostree-trivial-httpd.xml | 116 -----------------------------------
|
||||
src/ostree/main.c | 5 --
|
||||
tests/libtest.sh | 13 ++--
|
||||
7 files changed, 12 insertions(+), 151 deletions(-)
|
||||
delete mode 100644 man/ostree-trivial-httpd.xml
|
||||
|
||||
diff --git a/Makefile-man.am b/Makefile-man.am
|
||||
index 78025fff..4aa668f6 100644
|
||||
--- a/Makefile-man.am
|
||||
+++ b/Makefile-man.am
|
||||
@@ -32,12 +32,6 @@ ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \
|
||||
ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \
|
||||
ostree-rev-parse.1 ostree-show.1 ostree-sign.1 ostree-summary.1 \
|
||||
ostree-static-delta.1
|
||||
-if USE_LIBSOUP
|
||||
-man1_files += ostree-trivial-httpd.1
|
||||
-else
|
||||
-# We still want to distribute the source, even if we are not building it
|
||||
-EXTRA_DIST += man/ostree-trivial-httpd.xml
|
||||
-endif
|
||||
|
||||
if BUILDOPT_FUSE
|
||||
man1_files += rofiles-fuse.1
|
||||
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
|
||||
index 82af1681..dabc7004 100644
|
||||
--- a/Makefile-ostree.am
|
||||
+++ b/Makefile-ostree.am
|
||||
@@ -138,13 +138,6 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c
|
||||
endif
|
||||
|
||||
if USE_LIBSOUP
|
||||
-# Eventually once we stop things from using this, we should support disabling this
|
||||
-ostree_SOURCES += src/ostree/ot-builtin-trivial-httpd.c
|
||||
-pkglibexec_PROGRAMS += ostree-trivial-httpd
|
||||
-ostree_trivial_httpd_SOURCES = src/ostree/ostree-trivial-httpd.c
|
||||
-ostree_trivial_httpd_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_SOUP_CFLAGS)
|
||||
-ostree_trivial_httpd_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_SOUP_LIBS)
|
||||
-
|
||||
if !USE_CURL
|
||||
# This is necessary for the cookie jar bits
|
||||
ostree_CFLAGS += $(OT_INTERNAL_SOUP_CFLAGS)
|
||||
diff --git a/Makefile-tests.am b/Makefile-tests.am
|
||||
index 6bae65cf..47b3ab20 100644
|
||||
--- a/Makefile-tests.am
|
||||
+++ b/Makefile-tests.am
|
||||
@@ -275,6 +275,13 @@ _installed_or_uninstalled_test_programs += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
+if USE_LIBSOUP
|
||||
+test_extra_programs += ostree-trivial-httpd
|
||||
+ostree_trivial_httpd_SOURCES = src/ostree/ostree-trivial-httpd.c
|
||||
+ostree_trivial_httpd_CFLAGS = $(common_tests_cflags) $(OT_INTERNAL_SOUP_CFLAGS)
|
||||
+ostree_trivial_httpd_LDADD = $(common_tests_ldadd) $(OT_INTERNAL_SOUP_LIBS)
|
||||
+endif
|
||||
+
|
||||
if USE_AVAHI
|
||||
test_programs += tests/test-repo-finder-avahi
|
||||
endif
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 93b98cb9..a588eea6 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -186,14 +186,6 @@ if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi
|
||||
AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno)
|
||||
AM_CONDITIONAL(HAVE_LIBSOUP_CLIENT_CERTS, test x$have_libsoup_client_certs = xyes)
|
||||
|
||||
-AC_ARG_ENABLE(trivial-httpd-cmdline,
|
||||
- [AS_HELP_STRING([--enable-trivial-httpd-cmdline],
|
||||
- [Continue to support "ostree trivial-httpd" [default=no]])],,
|
||||
- enable_trivial_httpd_cmdline=no)
|
||||
-AS_IF([test x$enable_trivial_httpd_cmdline = xyes],
|
||||
- [AC_DEFINE([BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE], 1, [Define if we are enabling ostree trivial-httpd entrypoint])]
|
||||
-)
|
||||
-
|
||||
AS_IF([test x$with_curl = xyes && test x$with_soup = xno], [
|
||||
AC_MSG_WARN([Curl enabled, but libsoup is not; libsoup is needed for tests (make check, etc.)])
|
||||
])
|
||||
@@ -606,7 +598,6 @@ echo "
|
||||
introspection: $found_introspection
|
||||
rofiles-fuse: $enable_rofiles_fuse
|
||||
HTTP backend: $fetcher_backend
|
||||
- \"ostree trivial-httpd\": $enable_trivial_httpd_cmdline
|
||||
SELinux: $with_selinux
|
||||
fs-verity: $ac_cv_header_linux_fsverity_h
|
||||
cryptographic checksums: $with_crypto
|
||||
diff --git a/man/ostree-trivial-httpd.xml b/man/ostree-trivial-httpd.xml
|
||||
deleted file mode 100644
|
||||
index 7ba1dae8..00000000
|
||||
--- a/man/ostree-trivial-httpd.xml
|
||||
+++ /dev/null
|
||||
@@ -1,116 +0,0 @@
|
||||
-<?xml version='1.0'?> <!--*-nxml-*-->
|
||||
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
-
|
||||
-<!--
|
||||
-Copyright 2011,2013 Colin Walters <walters@verbum.org>
|
||||
-
|
||||
-SPDX-License-Identifier: LGPL-2.0+
|
||||
-
|
||||
-This library is free software; you can redistribute it and/or
|
||||
-modify it under the terms of the GNU Lesser General Public
|
||||
-License as published by the Free Software Foundation; either
|
||||
-version 2 of the License, or (at your option) any later version.
|
||||
-
|
||||
-This library is distributed in the hope that it will be useful,
|
||||
-but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
-Lesser General Public License for more details.
|
||||
-
|
||||
-You should have received a copy of the GNU Lesser General Public
|
||||
-License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
--->
|
||||
-
|
||||
-<refentry id="ostree">
|
||||
-
|
||||
- <refentryinfo>
|
||||
- <title>ostree trivial-httpd</title>
|
||||
- <productname>OSTree</productname>
|
||||
-
|
||||
- <authorgroup>
|
||||
- <author>
|
||||
- <contrib>Developer</contrib>
|
||||
- <firstname>Colin</firstname>
|
||||
- <surname>Walters</surname>
|
||||
- <email>walters@verbum.org</email>
|
||||
- </author>
|
||||
- </authorgroup>
|
||||
- </refentryinfo>
|
||||
-
|
||||
- <refmeta>
|
||||
- <refentrytitle>ostree trivial-httpd</refentrytitle>
|
||||
- <manvolnum>1</manvolnum>
|
||||
- </refmeta>
|
||||
-
|
||||
- <refnamediv>
|
||||
- <refname>ostree-trivial-httpd</refname>
|
||||
- <refpurpose>Simple webserver</refpurpose>
|
||||
- </refnamediv>
|
||||
-
|
||||
- <refsynopsisdiv>
|
||||
- <cmdsynopsis>
|
||||
- <command>ostree trivial-httpd</command> <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">DIR</arg>
|
||||
- </cmdsynopsis>
|
||||
- </refsynopsisdiv>
|
||||
-
|
||||
-<!-- Don't entirely understand this command. Needs details, better content-->
|
||||
- <refsect1>
|
||||
- <title>Description</title>
|
||||
-
|
||||
- <para>
|
||||
- This runs a simple webserver and keeps it running until killed. If DIR is not specified, it defaults to the current directory.
|
||||
- </para>
|
||||
- </refsect1>
|
||||
-
|
||||
- <refsect1>
|
||||
- <title>Options</title>
|
||||
-
|
||||
- <variablelist>
|
||||
- <varlistentry>
|
||||
- <term><option>--daemonize</option>,<option>-d</option></term>
|
||||
-
|
||||
- <listitem><para>
|
||||
- Fork into background when ready.
|
||||
- </para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
- <term><option>--autoexit</option></term>
|
||||
-
|
||||
- <listitem><para>
|
||||
- Automatically exit when directory is deleted.
|
||||
- </para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
- <term><option>--port-file</option>,<option>-p</option>="PATH"</term>
|
||||
-
|
||||
- <listitem><para>
|
||||
- Write port number to PATH (- for standard output).
|
||||
- </para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
- <term><option>--port</option>,<option>-P</option></term>
|
||||
-
|
||||
- <listitem><para>
|
||||
- Use the specified TCP port to listen on.
|
||||
- </para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
- <term><option>--force-range-requests</option></term>
|
||||
-
|
||||
- <listitem><para>
|
||||
- Force range requests by only serving half of files.
|
||||
- </para></listitem>
|
||||
- </varlistentry>
|
||||
- </variablelist>
|
||||
- </refsect1>
|
||||
-
|
||||
-<!-- NEED EXAMPLE OUTPUT HERE!-->
|
||||
- <refsect1>
|
||||
- <title>Example</title>
|
||||
- <para><command>$ ostree trivial-httpd</command></para>
|
||||
- </refsect1>
|
||||
-</refentry>
|
||||
diff --git a/src/ostree/main.c b/src/ostree/main.c
|
||||
index 7d17080c..19d9b8b0 100644
|
||||
--- a/src/ostree/main.c
|
||||
+++ b/src/ostree/main.c
|
||||
@@ -118,11 +118,6 @@ static OstreeCommand commands[] = {
|
||||
{ "summary", OSTREE_BUILTIN_FLAG_NONE,
|
||||
ostree_builtin_summary,
|
||||
"Manage summary metadata" },
|
||||
-#if defined(HAVE_LIBSOUP) && defined(BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE)
|
||||
- { "trivial-httpd", OSTREE_BUILTIN_FLAG_NONE,
|
||||
- ostree_builtin_trivial_httpd,
|
||||
- NULL },
|
||||
-#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
diff --git a/tests/libtest.sh b/tests/libtest.sh
|
||||
index 686f08dc..79f8bd1f 100755
|
||||
--- a/tests/libtest.sh
|
||||
+++ b/tests/libtest.sh
|
||||
@@ -174,15 +174,12 @@ fi
|
||||
if test -n "${OSTREE_UNINSTALLED:-}"; then
|
||||
OSTREE_HTTPD=${OSTREE_UNINSTALLED}/ostree-trivial-httpd
|
||||
else
|
||||
- # trivial-httpd is now in $libexecdir by default, which we don't
|
||||
- # know at this point. Fortunately, libtest.sh is also in
|
||||
- # $libexecdir, so make an educated guess. If it's not found, assume
|
||||
- # it's still runnable as "ostree trivial-httpd".
|
||||
- if [ -x "${test_srcdir}/../../libostree/ostree-trivial-httpd" ]; then
|
||||
- OSTREE_HTTPD="${CMD_PREFIX} ${test_srcdir}/../../libostree/ostree-trivial-httpd"
|
||||
- else
|
||||
- OSTREE_HTTPD="${CMD_PREFIX} ostree trivial-httpd"
|
||||
+ # trivial-httpd is now the test directory.
|
||||
+ OSTREE_HTTPD="${G_TEST_BUILDDIR}/ostree-trivial-httpd"
|
||||
+ if ! [ -x "${OSTREE_HTTPD}" ]; then
|
||||
+ fatal "Failed to find ${OSTREE_HTTPD}"
|
||||
fi
|
||||
+ OSTREE_HTTPD="${CMD_PREFIX} ${OSTREE_HTTPD}"
|
||||
fi
|
||||
|
||||
files_are_hardlinked() {
|
||||
--
|
||||
2.35.1
|
||||
|
@ -42,31 +42,15 @@ let
|
||||
]);
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "ostree";
|
||||
version = "2023.2";
|
||||
version = "2024.4";
|
||||
|
||||
outputs = [ "out" "dev" "man" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
|
||||
sha256 = "sha256-zrB4h1Wgv/VzjURUNVL7+IPPcd9IG6o8pyiNp6QCu4U=";
|
||||
sha256 = "sha256-Y8kZCCEzOsc3Pg2SPkwnZrJevc/fTvtEy1koxlidn8s=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Tests access the helper using relative path
|
||||
# https://github.com/ostreedev/ostree/issues/1593
|
||||
# Patch from https://github.com/ostreedev/ostree/pull/1633
|
||||
./01-Drop-ostree-trivial-httpd-CLI-move-to-tests-director.patch
|
||||
|
||||
# Workarounds for https://github.com/ostreedev/ostree/issues/1592
|
||||
./fix-1592.patch
|
||||
|
||||
# Hard-code paths in tests
|
||||
(substituteAll {
|
||||
src = ./fix-test-paths.patch;
|
||||
python3 = testPython.interpreter;
|
||||
openssl = "${openssl}/bin/openssl";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
|
@ -1,149 +0,0 @@
|
||||
--- a/tests/basic-test.sh
|
||||
+++ b/tests/basic-test.sh
|
||||
@@ -226,7 +226,7 @@ cd ${test_tmpdir}
|
||||
if $OSTREE commit ${COMMIT_ARGS} -b test-bootable --bootable $test_tmpdir/checkout-test2-4 2>err.txt; then
|
||||
fatal "committed non-bootable tree"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: .*No such file or directory"
|
||||
+assert_file_has_content err.txt "error:.*No such file or directory"
|
||||
echo "ok commit fails bootable if no kernel"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
diff --git a/tests/pull-test.sh b/tests/pull-test.sh
|
||||
index f4084290..4af5ec6f 100644
|
||||
--- a/tests/pull-test.sh
|
||||
+++ b/tests/pull-test.sh
|
||||
@@ -297,7 +297,7 @@ ostree_repo_init mirrorrepo-local --mode=archive
|
||||
if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo 2>err.txt; then
|
||||
fatal "pull with mixed refs succeeded?"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: Invalid ref name origin:main"
|
||||
+assert_file_has_content err.txt "Invalid ref name origin:main"
|
||||
${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo localbranch
|
||||
${CMD_PREFIX} ostree --repo=mirrorrepo-local rev-parse localbranch
|
||||
${CMD_PREFIX} ostree --repo=mirrorrepo-local fsck
|
||||
@@ -308,7 +308,7 @@ if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo nosuchbranc
|
||||
fatal "pulled nonexistent branch"
|
||||
fi
|
||||
# So true
|
||||
-assert_file_has_content_literal err.txt "error: Refspec 'nosuchbranch' not found"
|
||||
+assert_file_has_content_literal err.txt "Refspec 'nosuchbranch' not found"
|
||||
echo "ok pull-local nonexistent branch"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
@@ -687,5 +687,5 @@ rm ostree-srv/gnomerepo/summary
|
||||
if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.txt; then
|
||||
fatal "pull of invalid ref succeeded"
|
||||
fi
|
||||
-assert_file_has_content_literal err.txt 'error: Fetching checksum for ref ((empty), main): Invalid rev lots of html here lots of html here lots of html here lots of'
|
||||
+assert_file_has_content_literal err.txt 'Fetching checksum for ref ((empty), main): Invalid rev lots of html here lots of html here lots of html here lots of'
|
||||
echo "ok pull got HTML for a ref"
|
||||
diff --git a/tests/test-config.sh b/tests/test-config.sh
|
||||
index 2d9aaf53..f1e28614 100755
|
||||
--- a/tests/test-config.sh
|
||||
+++ b/tests/test-config.sh
|
||||
@@ -44,7 +44,7 @@ assert_file_has_content list.txt "http://example\.com/ostree/repo/"
|
||||
if ${CMD_PREFIX} ostree config --repo=repo get --group=core lock-timeout-secs extra 2>err.txt; then
|
||||
assert_not_reached "ostree config get should error out if too many arguments are given"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: Too many arguments given"
|
||||
+assert_file_has_content err.txt "Too many arguments given"
|
||||
echo "ok config get"
|
||||
|
||||
${CMD_PREFIX} ostree config --repo=repo set core.mode bare-user-only
|
||||
@@ -61,7 +61,7 @@ assert_file_has_content repo/config "http://example\.com/ostree/"
|
||||
if ${CMD_PREFIX} ostree config --repo=repo set --group=core lock-timeout-secs 120 extra 2>err.txt; then
|
||||
assert_not_reached "ostree config set should error out if too many arguments are given"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: Too many arguments given"
|
||||
+assert_file_has_content err.txt "Too many arguments given"
|
||||
echo "ok config set"
|
||||
|
||||
# Check that using `--` works and that "ostree config unset" works
|
||||
@@ -78,7 +78,7 @@ if ${CMD_PREFIX} ostree config --repo=repo get core.lock-timeout-secs 2>err.txt;
|
||||
fi
|
||||
# Check for any character where quotation marks would be as they appear differently in the Fedora and Debian
|
||||
# test suites (“” and '' respectively). See: https://github.com/ostreedev/ostree/pull/1839
|
||||
-assert_file_has_content err.txt "error: Key file does not have key .lock-timeout-secs. in group .core."
|
||||
+assert_file_has_content err.txt "Key file does not have key .lock-timeout-secs. in group .core."
|
||||
|
||||
# Check that it's idempotent
|
||||
${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs
|
||||
@@ -95,5 +95,5 @@ ${CMD_PREFIX} ostree config --repo=repo unset --group='remote "aoeuhtns"' 'xa.ti
|
||||
if ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs extra 2>err.txt; then
|
||||
assert_not_reached "ostree config unset should error out if too many arguments are given"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: Too many arguments given"
|
||||
+assert_file_has_content err.txt "Too many arguments given"
|
||||
echo "ok config unset"
|
||||
diff --git a/tests/test-fsck-collections.sh b/tests/test-fsck-collections.sh
|
||||
index 3dbcdd23..d6359979 100755
|
||||
--- a/tests/test-fsck-collections.sh
|
||||
+++ b/tests/test-fsck-collections.sh
|
||||
@@ -98,7 +98,7 @@ ${CMD_PREFIX} ostree fsck --repo=repo
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
||||
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref1.)"
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
|
||||
echo "ok 3 fsck detects missing ref bindings"
|
||||
@@ -111,7 +111,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref1’)"
|
||||
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref1.)"
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||
|
||||
@@ -125,7 +125,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Commit has collection ID ‘org\.example\.Collection’ in collection binding metadata, while the remote it came from has collection ID ‘org\.example\.Collection2’"
|
||||
+assert_file_has_content fsck-error "Commit has collection ID .org\.example\.Collection. in collection binding metadata, while the remote it came from has collection ID .org\.example\.Collection2."
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||
|
||||
@@ -145,7 +145,7 @@ echo "ok 6 fsck ignores unreferenced ref bindings"
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Collection–ref (org\.example\.Collection, ref1) in bindings for commit .* does not exist"
|
||||
+assert_file_has_content fsck-error 'Collection.ref (org\.example\.Collection, ref1) in bindings for commit .* does not exist'
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
|
||||
|
||||
@@ -184,7 +184,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --create=new-ref $(cat ref3-checksum)
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Commit has no requested ref ‘new-ref’ in ref binding metadata (‘ref3’, ‘ref4’)"
|
||||
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref3., .ref4.)"
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
|
||||
echo "ok 9 fsck detects missing ref bindings"
|
||||
@@ -203,7 +203,7 @@ echo "ok 10 fsck ignores unreferenced ref bindings"
|
||||
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
|
||||
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
|
||||
fi
|
||||
-assert_file_has_content fsck-error "Ref ‘ref3’ in bindings for commit .* does not exist"
|
||||
+assert_file_has_content fsck-error 'Ref .ref3. in bindings for commit .* does not exist'
|
||||
assert_file_has_content fsck "^Validating refs\.\.\.$"
|
||||
|
||||
echo "ok 11 fsck ignores unreferenced ref bindings"
|
||||
diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh
|
||||
index 2f5ea634..0f63853c 100755
|
||||
--- a/tests/test-remote-add.sh
|
||||
+++ b/tests/test-remote-add.sh
|
||||
@@ -81,7 +81,7 @@ echo "ok remote delete"
|
||||
if $OSTREE remote delete nosuchremote 2>err.txt; then
|
||||
assert_not_reached "Deleting remote unexpectedly succeeded"
|
||||
fi
|
||||
-assert_file_has_content err.txt "error: "
|
||||
+assert_file_has_content err.txt "not found"
|
||||
|
||||
$OSTREE remote delete --if-exists nosuchremote
|
||||
echo "ok"
|
@ -1,55 +0,0 @@
|
||||
diff --git a/tests/libtest.sh b/tests/libtest.sh
|
||||
index ca457fa2..c0a529ff 100755
|
||||
--- a/tests/libtest.sh
|
||||
+++ b/tests/libtest.sh
|
||||
@@ -709,12 +709,12 @@ gen_ed25519_keys ()
|
||||
{
|
||||
# Generate private key in PEM format
|
||||
pemfile="$(mktemp -p ${test_tmpdir} ed25519_XXXXXX.pem)"
|
||||
- openssl genpkey -algorithm ed25519 -outform PEM -out "${pemfile}"
|
||||
+ @openssl@ genpkey -algorithm ed25519 -outform PEM -out "${pemfile}"
|
||||
|
||||
# Based on: http://openssl.6102.n7.nabble.com/ed25519-key-generation-td73907.html
|
||||
# Extract the private and public parts from generated key.
|
||||
- ED25519PUBLIC="$(openssl pkey -outform DER -pubout -in ${pemfile} | tail -c 32 | base64)"
|
||||
- ED25519SEED="$(openssl pkey -outform DER -in ${pemfile} | tail -c 32 | base64)"
|
||||
+ ED25519PUBLIC="$(@openssl@ pkey -outform DER -pubout -in ${pemfile} | tail -c 32 | base64)"
|
||||
+ ED25519SEED="$(@openssl@ pkey -outform DER -in ${pemfile} | tail -c 32 | base64)"
|
||||
# Secret key is concantination of SEED and PUBLIC
|
||||
ED25519SECRET="$(echo ${ED25519SEED}${ED25519PUBLIC} | base64 -d | base64 -w 0)"
|
||||
|
||||
@@ -725,7 +725,7 @@ gen_ed25519_keys ()
|
||||
|
||||
gen_ed25519_random_public()
|
||||
{
|
||||
- openssl genpkey -algorithm ED25519 | openssl pkey -outform DER | tail -c 32 | base64
|
||||
+ @openssl@ genpkey -algorithm ED25519 | @openssl@ pkey -outform DER | tail -c 32 | base64
|
||||
}
|
||||
|
||||
is_bare_user_only_repo () {
|
||||
diff --git a/tests/test-basic-user-only.sh b/tests/test-basic-user-only.sh
|
||||
index f65094fd..105be893 100755
|
||||
--- a/tests/test-basic-user-only.sh
|
||||
+++ b/tests/test-basic-user-only.sh
|
||||
@@ -29,7 +29,7 @@ extra_basic_tests=5
|
||||
. $(dirname $0)/basic-test.sh
|
||||
|
||||
$CMD_PREFIX ostree --version > version.yaml
|
||||
-python3 -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
+@python3@ -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
echo "ok yaml version"
|
||||
|
||||
# Reset things so we don't inherit a lot of state from earlier tests
|
||||
diff --git a/tests/test-remote-headers.sh b/tests/test-remote-headers.sh
|
||||
index a41d087a..77b34c90 100755
|
||||
--- a/tests/test-remote-headers.sh
|
||||
+++ b/tests/test-remote-headers.sh
|
||||
@@ -26,7 +26,7 @@ echo '1..2'
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
V=$($CMD_PREFIX ostree --version | \
|
||||
- python3 -c 'import sys, yaml; print(yaml.safe_load(sys.stdin)["libostree"]["Version"])')
|
||||
+ @python3@ -c 'import sys, yaml; print(yaml.safe_load(sys.stdin)["libostree"]["Version"])')
|
||||
|
||||
setup_fake_remote_repo1 "archive" "" \
|
||||
--expected-header foo=bar \
|
Loading…
Reference in New Issue
Block a user