ostree: 2021.6 → 2022.1

https://github.com/ostreedev/ostree/releases/tag/v2022.1

Also fix `libostree/test-basic-user.sh.test` and `libostree/test-basic-user-only.sh.test`
installed tests (another instance of https://github.com/ostreedev/ostree/issues/1592).
There is one new broken test `libostree/test-cli-extensions.sh.test` due to
https://github.com/ostreedev/ostree/issues/2553

+56 -47
+22 -24
pkgs/tools/misc/ostree/01-Drop-ostree-trivial-httpd-CLI-move-to-tests-director.patch
··· 1 - From 977fdfad2ceba7232b4f78144b20640d7fd0aedb Mon Sep 17 00:00:00 2001 1 + From 196c2e1036ed990bca57c199f271c0359509e9f9 Mon Sep 17 00:00:00 2001 2 2 From: Colin Walters <walters@verbum.org> 3 3 Date: Tue, 19 Jun 2018 09:34:18 -0400 4 4 Subject: [PATCH] Drop "ostree trivial-httpd" CLI, move to tests directory ··· 14 14 Makefile-ostree.am | 7 --- 15 15 Makefile-tests.am | 7 +++ 16 16 configure.ac | 9 --- 17 - man/ostree-trivial-httpd.xml | 118 ----------------------------------- 17 + man/ostree-trivial-httpd.xml | 116 ----------------------------------- 18 18 src/ostree/main.c | 5 -- 19 19 tests/libtest.sh | 13 ++-- 20 - 7 files changed, 12 insertions(+), 153 deletions(-) 20 + 7 files changed, 12 insertions(+), 151 deletions(-) 21 21 delete mode 100644 man/ostree-trivial-httpd.xml 22 22 23 23 diff --git a/Makefile-man.am b/Makefile-man.am 24 - index bc58103b..bcfde285 100644 24 + index 78025fff..4aa668f6 100644 25 25 --- a/Makefile-man.am 26 26 +++ b/Makefile-man.am 27 - @@ -34,12 +34,6 @@ ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \ 27 + @@ -32,12 +32,6 @@ ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 \ 28 28 ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 \ 29 - ostree-rev-parse.1 ostree-show.1 ostree-summary.1 \ 29 + ostree-rev-parse.1 ostree-show.1 ostree-sign.1 ostree-summary.1 \ 30 30 ostree-static-delta.1 31 31 -if USE_LIBSOUP 32 32 -man1_files += ostree-trivial-httpd.1 ··· 38 38 if BUILDOPT_FUSE 39 39 man1_files += rofiles-fuse.1 40 40 diff --git a/Makefile-ostree.am b/Makefile-ostree.am 41 - index f861afe4..497d99b0 100644 41 + index 82af1681..dabc7004 100644 42 42 --- a/Makefile-ostree.am 43 43 +++ b/Makefile-ostree.am 44 - @@ -144,13 +144,6 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c 44 + @@ -138,13 +138,6 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c 45 45 endif 46 46 47 47 if USE_LIBSOUP ··· 56 56 # This is necessary for the cookie jar bits 57 57 ostree_CFLAGS += $(OT_INTERNAL_SOUP_CFLAGS) 58 58 diff --git a/Makefile-tests.am b/Makefile-tests.am 59 - index fc2f2d91..7343b63f 100644 59 + index 6bae65cf..47b3ab20 100644 60 60 --- a/Makefile-tests.am 61 61 +++ b/Makefile-tests.am 62 - @@ -263,6 +263,13 @@ _installed_or_uninstalled_test_programs += \ 62 + @@ -275,6 +275,13 @@ _installed_or_uninstalled_test_programs += \ 63 63 $(NULL) 64 64 endif 65 65 ··· 74 74 test_programs += tests/test-repo-finder-avahi 75 75 endif 76 76 diff --git a/configure.ac b/configure.ac 77 - index 46a900f5..2f91cdec 100644 77 + index 93b98cb9..a588eea6 100644 78 78 --- a/configure.ac 79 79 +++ b/configure.ac 80 - @@ -190,14 +190,6 @@ if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi 80 + @@ -186,14 +186,6 @@ if test x$with_soup != xno; then OSTREE_FEATURES="$OSTREE_FEATURES libsoup"; fi 81 81 AM_CONDITIONAL(USE_LIBSOUP, test x$with_soup != xno) 82 82 AM_CONDITIONAL(HAVE_LIBSOUP_CLIENT_CERTS, test x$have_libsoup_client_certs = xyes) 83 83 ··· 92 92 AS_IF([test x$with_curl = xyes && test x$with_soup = xno], [ 93 93 AC_MSG_WARN([Curl enabled, but libsoup is not; libsoup is needed for tests (make check, etc.)]) 94 94 ]) 95 - @@ -617,7 +609,6 @@ echo " 96 - Rust (internal oxidation): $rust_debug_release 95 + @@ -606,7 +598,6 @@ echo " 96 + introspection: $found_introspection 97 97 rofiles-fuse: $enable_rofiles_fuse 98 98 HTTP backend: $fetcher_backend 99 99 - \"ostree trivial-httpd\": $enable_trivial_httpd_cmdline 100 100 SELinux: $with_selinux 101 + fs-verity: $ac_cv_header_linux_fsverity_h 101 102 cryptographic checksums: $with_crypto 102 - systemd: $have_libsystemd 103 103 diff --git a/man/ostree-trivial-httpd.xml b/man/ostree-trivial-httpd.xml 104 104 deleted file mode 100644 105 - index d03c12be..00000000 105 + index 7ba1dae8..00000000 106 106 --- a/man/ostree-trivial-httpd.xml 107 107 +++ /dev/null 108 - @@ -1,118 +0,0 @@ 108 + @@ -1,116 +0,0 @@ 109 109 -<?xml version='1.0'?> <!--*-nxml-*--> 110 110 -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 111 111 - "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> ··· 126 126 -Lesser General Public License for more details. 127 127 - 128 128 -You should have received a copy of the GNU Lesser General Public 129 - -License along with this library; if not, write to the 130 - -Free Software Foundation, Inc., 59 Temple Place - Suite 330, 131 - -Boston, MA 02111-1307, USA. 129 + -License along with this library. If not, see <https://www.gnu.org/licenses/>. 132 130 ---> 133 131 - 134 132 -<refentry id="ostree"> ··· 225 223 - </refsect1> 226 224 -</refentry> 227 225 diff --git a/src/ostree/main.c b/src/ostree/main.c 228 - index a523ff9a..61ea742d 100644 226 + index 7d17080c..19d9b8b0 100644 229 227 --- a/src/ostree/main.c 230 228 +++ b/src/ostree/main.c 231 229 @@ -118,11 +118,6 @@ static OstreeCommand commands[] = { ··· 241 239 }; 242 240 243 241 diff --git a/tests/libtest.sh b/tests/libtest.sh 244 - index 3f5fd931..eacd96de 100755 242 + index 686f08dc..79f8bd1f 100755 245 243 --- a/tests/libtest.sh 246 244 +++ b/tests/libtest.sh 247 - @@ -160,15 +160,12 @@ fi 245 + @@ -174,15 +174,12 @@ fi 248 246 if test -n "${OSTREE_UNINSTALLED:-}"; then 249 247 OSTREE_HTTPD=${OSTREE_UNINSTALLED}/ostree-trivial-httpd 250 248 else ··· 266 264 267 265 files_are_hardlinked() { 268 266 -- 269 - 2.25.0 267 + 2.35.1 270 268
+4 -4
pkgs/tools/misc/ostree/default.nix
··· 20 20 , autoconf 21 21 , automake 22 22 , libtool 23 - , fuse 23 + , fuse3 24 24 , util-linuxMinimal 25 25 , libselinux 26 26 , libsodium ··· 41 41 ])); 42 42 in stdenv.mkDerivation rec { 43 43 pname = "ostree"; 44 - version = "2021.6"; 44 + version = "2022.1"; 45 45 46 46 outputs = [ "out" "dev" "man" "installedTests" ]; 47 47 48 48 src = fetchurl { 49 49 url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz"; 50 - sha256 = "sha256-6AYxyxNj1HNP6dDJH2mmi+OEgWbW4EgdsZzkSpy09TE="; 50 + sha256 = "sha256-Q6AOeFaEK4o09mFvws4c4jjvQyEMykH3DmtLDSqfytU="; 51 51 }; 52 52 53 53 patches = [ ··· 90 90 libsoup 91 91 glib-networking 92 92 gpgme 93 - fuse 93 + fuse3 94 94 libselinux 95 95 libsodium 96 96 libcap
+30 -19
pkgs/tools/misc/ostree/fix-1592.patch
··· 1 + --- a/tests/basic-test.sh 2 + +++ b/tests/basic-test.sh 3 + @@ -226,7 +226,7 @@ cd ${test_tmpdir} 4 + if $OSTREE commit ${COMMIT_ARGS} -b test-bootable --bootable $test_tmpdir/checkout-test2-4 2>err.txt; then 5 + fatal "committed non-bootable tree" 6 + fi 7 + -assert_file_has_content err.txt "error: .*No such file or directory" 8 + +assert_file_has_content err.txt "error:.*No such file or directory" 9 + echo "ok commit fails bootable if no kernel" 10 + 11 + cd ${test_tmpdir} 1 12 diff --git a/tests/pull-test.sh b/tests/pull-test.sh 2 - index a8bc49a9..4a08ebb5 100644 13 + index f4084290..4af5ec6f 100644 3 14 --- a/tests/pull-test.sh 4 15 +++ b/tests/pull-test.sh 5 - @@ -275,7 +275,7 @@ 16 + @@ -297,7 +297,7 @@ ostree_repo_init mirrorrepo-local --mode=archive 6 17 if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo 2>err.txt; then 7 18 fatal "pull with mixed refs succeeded?" 8 19 fi ··· 11 22 ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo localbranch 12 23 ${CMD_PREFIX} ostree --repo=mirrorrepo-local rev-parse localbranch 13 24 ${CMD_PREFIX} ostree --repo=mirrorrepo-local fsck 14 - @@ -286,7 +286,7 @@ 25 + @@ -308,7 +308,7 @@ if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo nosuchbranc 15 26 fatal "pulled nonexistent branch" 16 27 fi 17 28 # So true ··· 20 31 echo "ok pull-local nonexistent branch" 21 32 22 33 cd ${test_tmpdir} 23 - @@ -593,5 +593,5 @@ 34 + @@ -687,5 +687,5 @@ rm ostree-srv/gnomerepo/summary 24 35 if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.txt; then 25 36 fatal "pull of invalid ref succeeded" 26 37 fi ··· 28 39 +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' 29 40 echo "ok pull got HTML for a ref" 30 41 diff --git a/tests/test-config.sh b/tests/test-config.sh 31 - index 7e913d32..69d1675d 100755 42 + index 2d9aaf53..f1e28614 100755 32 43 --- a/tests/test-config.sh 33 44 +++ b/tests/test-config.sh 34 - @@ -46,7 +46,7 @@ 45 + @@ -44,7 +44,7 @@ assert_file_has_content list.txt "http://example\.com/ostree/repo/" 35 46 if ${CMD_PREFIX} ostree config --repo=repo get --group=core lock-timeout-secs extra 2>err.txt; then 36 47 assert_not_reached "ostree config get should error out if too many arguments are given" 37 48 fi ··· 40 51 echo "ok config get" 41 52 42 53 ${CMD_PREFIX} ostree config --repo=repo set core.mode bare-user-only 43 - @@ -63,7 +63,7 @@ 54 + @@ -61,7 +61,7 @@ assert_file_has_content repo/config "http://example\.com/ostree/" 44 55 if ${CMD_PREFIX} ostree config --repo=repo set --group=core lock-timeout-secs 120 extra 2>err.txt; then 45 56 assert_not_reached "ostree config set should error out if too many arguments are given" 46 57 fi ··· 48 59 +assert_file_has_content err.txt "Too many arguments given" 49 60 echo "ok config set" 50 61 51 - # Check that "ostree config unset" works 52 - @@ -78,7 +78,7 @@ 62 + # Check that using `--` works and that "ostree config unset" works 63 + @@ -78,7 +78,7 @@ if ${CMD_PREFIX} ostree config --repo=repo get core.lock-timeout-secs 2>err.txt; 53 64 fi 54 65 # Check for any character where quotation marks would be as they appear differently in the Fedora and Debian 55 66 # test suites (“” and '' respectively). See: https://github.com/ostreedev/ostree/pull/1839 ··· 58 69 59 70 # Check that it's idempotent 60 71 ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs 61 - @@ -95,5 +95,5 @@ 72 + @@ -95,5 +95,5 @@ ${CMD_PREFIX} ostree config --repo=repo unset --group='remote "aoeuhtns"' 'xa.ti 62 73 if ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs extra 2>err.txt; then 63 74 assert_not_reached "ostree config unset should error out if too many arguments are given" 64 75 fi ··· 66 77 +assert_file_has_content err.txt "Too many arguments given" 67 78 echo "ok config unset" 68 79 diff --git a/tests/test-fsck-collections.sh b/tests/test-fsck-collections.sh 69 - index dc6bcfeb..4a5eef55 100755 80 + index 3dbcdd23..d6359979 100755 70 81 --- a/tests/test-fsck-collections.sh 71 82 +++ b/tests/test-fsck-collections.sh 72 - @@ -100,7 +100,7 @@ 83 + @@ -98,7 +98,7 @@ ${CMD_PREFIX} ostree fsck --repo=repo 73 84 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then 74 85 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 75 86 fi ··· 78 89 assert_file_has_content fsck "^Validating refs\.\.\.$" 79 90 80 91 echo "ok 3 fsck detects missing ref bindings" 81 - @@ -113,7 +113,7 @@ 92 + @@ -111,7 +111,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect 82 93 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then 83 94 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 84 95 fi ··· 87 98 assert_file_has_content fsck "^Validating refs\.\.\.$" 88 99 assert_file_has_content fsck "^Validating refs in collections\.\.\.$" 89 100 90 - @@ -127,7 +127,7 @@ 101 + @@ -125,7 +125,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect 91 102 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then 92 103 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 93 104 fi ··· 96 107 assert_file_has_content fsck "^Validating refs\.\.\.$" 97 108 assert_file_has_content fsck "^Validating refs in collections\.\.\.$" 98 109 99 - @@ -147,7 +147,7 @@ 110 + @@ -145,7 +145,7 @@ echo "ok 6 fsck ignores unreferenced ref bindings" 100 111 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then 101 112 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 102 113 fi ··· 105 116 assert_file_has_content fsck "^Validating refs\.\.\.$" 106 117 assert_file_has_content fsck "^Validating refs in collections\.\.\.$" 107 118 108 - @@ -186,7 +186,7 @@ 119 + @@ -184,7 +184,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --create=new-ref $(cat ref3-checksum) 109 120 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then 110 121 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 111 122 fi ··· 114 125 assert_file_has_content fsck "^Validating refs\.\.\.$" 115 126 116 127 echo "ok 9 fsck detects missing ref bindings" 117 - @@ -205,7 +205,7 @@ 128 + @@ -203,7 +203,7 @@ echo "ok 10 fsck ignores unreferenced ref bindings" 118 129 if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then 119 130 assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!" 120 131 fi ··· 124 135 125 136 echo "ok 11 fsck ignores unreferenced ref bindings" 126 137 diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh 127 - index bb7eae89..62a3bcd7 100755 138 + index 2f5ea634..0f63853c 100755 128 139 --- a/tests/test-remote-add.sh 129 140 +++ b/tests/test-remote-add.sh 130 - @@ -83,7 +83,7 @@ 141 + @@ -81,7 +81,7 @@ echo "ok remote delete" 131 142 if $OSTREE remote delete nosuchremote 2>err.txt; then 132 143 assert_not_reached "Deleting remote unexpectedly succeeded" 133 144 fi