tree-wide: Replace archive-z2 with archive

In almost all places. There are just a few exceptions; one tricky bit for
example is that the repo config must still have `mode=archive-z2`, since
`archive` used to mean something else. (We could very likely just get rid of
that check, but eh, later).

I also added a test that one can still do `ostree repo init --mode=archive-z2`.

Closes: #1125
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-09-01 16:15:33 -04:00 committed by Atomic Bot
parent f07432d4ce
commit 88b25dc65c
57 changed files with 85 additions and 78 deletions

View File

@ -67,9 +67,13 @@ Boston, MA 02111-1307, USA.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><option>--mode</option>="MODE"</term> <term><option>--mode</option>="MODE"</term>
<listitem><para> <listitem><para> Initialize repository in given mode
Initialize repository in given mode (bare, bare-user, archive-z2). Default is "bare". (<literal>bare</literal>, <literal>bare-user</literal>,
</para></listitem> <literal>archive</literal>). The default is
<literal>bare</literal>. Note that for
<literal>archive</literal> the repository configuration file
will actually have <literal>archive-z2</literal>, as that's the
historical name.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -157,7 +157,7 @@ Boston, MA 02111-1307, USA.
<para>Perform a complete mirror of the remote. (This is <para>Perform a complete mirror of the remote. (This is
likely most useful if your repository is also likely most useful if your repository is also
<literal>archive-z2</literal> mode)</para> <literal>archive</literal> mode)</para>
<para><command>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard</command></para> <para><command>$ ostree --repo=repo pull remote_name exampleos/x86_64/standard</command></para>

View File

@ -76,7 +76,7 @@ Boston, MA 02111-1307, USA.
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><varname>mode</varname></term> <term><varname>mode</varname></term>
<listitem><para>One of <literal>bare</literal>, <literal>bare-user</literal> or <literal>archive-z2</literal>. </para></listitem> <listitem><para>One of <literal>bare</literal>, <literal>bare-user</literal> or <literal>archive-z2</literal> (note that <literal>archive</literal> is used everywhere else.)</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -312,7 +312,7 @@ _ostree_file_header_new (GFileInfo *file_info,
* @file_info: a #GFileInfo * @file_info: a #GFileInfo
* @xattrs: (allow-none): Optional extended attribute array * @xattrs: (allow-none): Optional extended attribute array
* *
* Returns: (transfer full): A new #GVariant containing file header for an archive-z2 repository * Returns: (transfer full): A new #GVariant containing file header for an archive repository
*/ */
GVariant * GVariant *
_ostree_zlib_file_header_new (GFileInfo *file_info, _ostree_zlib_file_header_new (GFileInfo *file_info,

View File

@ -3631,7 +3631,7 @@ ostree_repo_pull_with_options (OstreeRepo *self,
} }
/* We can't use static deltas if pulling into an archive-z2 repo. */ /* We can't use static deltas if pulling into an archive repo. */
if (self->mode == OSTREE_REPO_MODE_ARCHIVE_Z2) if (self->mode == OSTREE_REPO_MODE_ARCHIVE_Z2)
{ {
if (pull_data->require_static_deltas) if (pull_data->require_static_deltas)

View File

@ -608,7 +608,7 @@ dispatch_open_splice_and_close (OstreeRepo *repo,
} }
else else
{ {
/* Slower path, for symlinks and unpacking deltas into archive-z2 */ /* Slower path, for symlinks and unpacking deltas into archive */
g_autoptr(GFileInfo) finfo = g_autoptr(GFileInfo) finfo =
_ostree_mode_uidgid_to_gfileinfo (state->mode, state->uid, state->gid); _ostree_mode_uidgid_to_gfileinfo (state->mode, state->uid, state->gid);

View File

@ -780,7 +780,7 @@ ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError
if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error)) if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error))
goto out; goto out;
/* The default for this option is FALSE, even for archive-z2 repos, /* The default for this option is FALSE, even for archive repos,
* because ostree supports multiple processes committing to the same * because ostree supports multiple processes committing to the same
* repo (but different refs) concurrently, and in fact gnome-continuous * repo (but different refs) concurrently, and in fact gnome-continuous
* actually does this. In that context it's best to update the summary * actually does this. In that context it's best to update the summary

View File

@ -37,7 +37,7 @@ static char *opt_collection_id = NULL;
*/ */
static GOptionEntry options[] = { static GOptionEntry options[] = {
{ "mode", 0, 0, G_OPTION_ARG_STRING, &opt_mode, "Initialize repository in given mode (bare, archive-z2)", NULL }, { "mode", 0, 0, G_OPTION_ARG_STRING, &opt_mode, "Initialize repository in given mode (bare, archive)", NULL },
#ifdef OSTREE_ENABLE_EXPERIMENTAL_API #ifdef OSTREE_ENABLE_EXPERIMENTAL_API
{ "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id, { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id,
"Globally unique ID for this repository as an collection of refs for redistribution to other repositories", "COLLECTION-ID" }, "Globally unique ID for this repository as an collection of refs for redistribution to other repositories", "COLLECTION-ID" },

View File

@ -70,7 +70,7 @@ ot_test_setup_repo (GCancellable *cancellable,
g_autoptr(GFile) repo_path = g_file_new_for_path ("repo"); g_autoptr(GFile) repo_path = g_file_new_for_path ("repo");
glnx_unref_object OstreeRepo* ret_repo = NULL; glnx_unref_object OstreeRepo* ret_repo = NULL;
if (!ot_test_run_libtest ("setup_test_repository archive-z2", error)) if (!ot_test_run_libtest ("setup_test_repository archive", error))
goto out; goto out;
ret_repo = ostree_repo_new (repo_path); ret_repo = ostree_repo_new (repo_path);
@ -94,7 +94,7 @@ ot_test_setup_sysroot (GCancellable *cancellable,
glnx_unref_object OstreeSysroot *ret_sysroot = NULL; glnx_unref_object OstreeSysroot *ret_sysroot = NULL;
struct statfs stbuf; struct statfs stbuf;
if (!ot_test_run_libtest ("setup_os_repository \"archive-z2\" \"syslinux\"", error)) if (!ot_test_run_libtest ("setup_os_repository \"archive\" \"syslinux\"", error))
goto out; goto out;
{ g_autoptr(GString) buf = g_string_new ("mutable-deployments"); { g_autoptr(GString) buf = g_string_new ("mutable-deployments");

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..3" echo "1..3"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..1" echo "1..1"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..1" echo "1..1"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..2" echo "1..2"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "grub2 ostree-grub-generator" setup_os_repository "archive" "grub2 ostree-grub-generator"
extra_admin_tests=0 extra_admin_tests=0

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..3" echo "1..3"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..4" echo "1..4"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
extra_admin_tests=3 extra_admin_tests=3

View File

@ -23,7 +23,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "uboot" setup_os_repository "archive" "uboot"
extra_admin_tests=1 extra_admin_tests=1

View File

@ -23,7 +23,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..5" echo "1..5"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
# If parallel is not installed, skip the test # If parallel is not installed, skip the test
if ! parallel --gnu /bin/true </dev/null >/dev/null 2>&1; then if ! parallel --gnu /bin/true </dev/null >/dev/null 2>&1; then

View File

@ -25,7 +25,7 @@ set -euo pipefail
echo "1..1" echo "1..1"
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
cd ${test_tmpdir} cd ${test_tmpdir}
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo

View File

@ -25,7 +25,7 @@ set -euo pipefail
echo "1..1" echo "1..1"
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
cd ${test_tmpdir} cd ${test_tmpdir}
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo ${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
# This does: # This does:
# - init ostree repo in testos-repo # - init ostree repo in testos-repo
# - create system files in osdata and commit twice those contents into testos-repo # - create system files in osdata and commit twice those contents into testos-repo

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..2" echo "1..2"

View File

@ -22,7 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
# Exports OSTREE_SYSROOT so --sysroot not needed. # Exports OSTREE_SYSROOT so --sysroot not needed.
setup_os_repository "archive-z2" "syslinux" setup_os_repository "archive" "syslinux"
echo "1..2" echo "1..2"

View File

@ -21,12 +21,15 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
echo '1..11' echo '1..12'
setup_test_repository "archive-z2" setup_test_repository "archive"
. ${test_srcdir}/archive-test.sh . ${test_srcdir}/archive-test.sh
${CMD_PREFIX} ostree --repo=repo-archive-z2 init --mode=archive-z2
echo "ok did an init with archive-z2 alias"
cd ${test_tmpdir} cd ${test_tmpdir}
mkdir repo2 mkdir repo2
ostree_repo_init repo2 ostree_repo_init repo2

View File

@ -55,7 +55,7 @@ input_stream_to_bytes (GInputStream *input)
} }
static void static void
test_raw_file_to_archive_z2_stream (gconstpointer data) test_raw_file_to_archive_stream (gconstpointer data)
{ {
OstreeRepo *repo = OSTREE_REPO (data); OstreeRepo *repo = OSTREE_REPO (data);
g_autofree gchar *commit_checksum = NULL; g_autofree gchar *commit_checksum = NULL;
@ -249,7 +249,7 @@ int main (int argc, char **argv)
goto out; goto out;
g_test_add_data_func ("/repo-not-system", repo, test_repo_is_not_system); g_test_add_data_func ("/repo-not-system", repo, test_repo_is_not_system);
g_test_add_data_func ("/raw-file-to-archive-z2-stream", repo, test_raw_file_to_archive_z2_stream); g_test_add_data_func ("/raw-file-to-archive-stream", repo, test_raw_file_to_archive_stream);
g_test_add_data_func ("/objectwrites", repo, test_object_writes); g_test_add_data_func ("/objectwrites", repo, test_object_writes);
g_test_add_func ("/remotename", test_validate_remotename); g_test_add_func ("/remotename", test_validate_remotename);

View File

@ -33,7 +33,7 @@ oldpwd=`pwd`
mkdir ostree-srv mkdir ostree-srv
cd ostree-srv cd ostree-srv
mkdir gnomerepo mkdir gnomerepo
ostree_repo_init gnomerepo --mode="archive-z2" ostree_repo_init gnomerepo --mode="archive"
mkdir gnomerepo-files mkdir gnomerepo-files
cd gnomerepo-files cd gnomerepo-files
echo first > firstfile echo first > firstfile

View File

@ -29,7 +29,7 @@ morebindatafiles="false ls"
echo '1..12' echo '1..12'
mkdir repo mkdir repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
mkdir files mkdir files
for bin in ${bindatafiles}; do for bin in ${bindatafiles}; do

View File

@ -68,7 +68,7 @@ packages="bash systemd"
mkdir build-repo mkdir build-repo
ostree_repo_init build-repo --mode=bare-user ostree_repo_init build-repo --mode=bare-user
mkdir repo mkdir repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
# Our FUSE mount point # Our FUSE mount point
mkdir mnt mkdir mnt

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_test_repository "archive-z2" setup_test_repository "archive"
echo '1..5' echo '1..5'

View File

@ -29,7 +29,7 @@ fi
echo "1..1" echo "1..1"
setup_test_repository "archive-z2" setup_test_repository "archive"
export OSTREE_GPG_SIGN="${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME}" export OSTREE_GPG_SIGN="${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME}"

View File

@ -21,13 +21,13 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_test_repository "archive-z2" setup_test_repository "archive"
echo "1..1" echo "1..1"
cd ${test_tmpdir} cd ${test_tmpdir}
mkdir repo2 mkdir repo2
ostree_repo_init repo2 --mode="archive-z2" ostree_repo_init repo2 --mode="archive"
${CMD_PREFIX} ostree --repo=repo2 pull-local repo ${CMD_PREFIX} ostree --repo=repo2 pull-local repo
find repo2/objects -name '*.commit' | wc -l > commitcount find repo2/objects -name '*.commit' | wc -l > commitcount

View File

@ -28,7 +28,7 @@ skip_without_user_xattrs
echo "1..8" echo "1..8"
setup_test_repository "archive-z2" setup_test_repository "archive"
echo "ok setup" echo "ok setup"
cd ${test_tmpdir} cd ${test_tmpdir}
@ -40,7 +40,7 @@ ${CMD_PREFIX} ostree --repo=repo2 fsck
echo "ok pull-local z2 to bare-user" echo "ok pull-local z2 to bare-user"
mkdir repo3 mkdir repo3
ostree_repo_init repo3 --mode="archive-z2" ostree_repo_init repo3 --mode="archive"
${CMD_PREFIX} ostree --repo=repo3 pull-local repo2 ${CMD_PREFIX} ostree --repo=repo3 pull-local repo2
${CMD_PREFIX} ostree --repo=repo3 fsck ${CMD_PREFIX} ostree --repo=repo3 fsck
echo "ok pull-local bare-user to z2" echo "ok pull-local bare-user to z2"
@ -62,7 +62,7 @@ cmp checkout1.files checkout3.files
echo "ok checkouts same" echo "ok checkouts same"
mkdir repo4 mkdir repo4
ostree_repo_init repo4 --mode="archive-z2" ostree_repo_init repo4 --mode="archive"
${CMD_PREFIX} ostree --repo=repo4 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo ${CMD_PREFIX} ostree --repo=repo4 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo
if ${CMD_PREFIX} ostree --repo=repo4 pull-local --remote=origin --gpg-verify repo test2 2>&1; then if ${CMD_PREFIX} ostree --repo=repo4 pull-local --remote=origin --gpg-verify repo test2 2>&1; then
assert_not_reached "GPG verification unexpectedly succeeded" assert_not_reached "GPG verification unexpectedly succeeded"
@ -72,13 +72,13 @@ echo "ok --gpg-verify with no signature"
${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME} test2 ${TEST_GPG_KEYID_1} ${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME} test2 ${TEST_GPG_KEYID_1}
mkdir repo5 mkdir repo5
ostree_repo_init repo5 --mode="archive-z2" ostree_repo_init repo5 --mode="archive"
${CMD_PREFIX} ostree --repo=repo5 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo ${CMD_PREFIX} ostree --repo=repo5 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo
${CMD_PREFIX} ostree --repo=repo5 pull-local --remote=origin --gpg-verify repo test2 ${CMD_PREFIX} ostree --repo=repo5 pull-local --remote=origin --gpg-verify repo test2
echo "ok --gpg-verify" echo "ok --gpg-verify"
mkdir repo6 mkdir repo6
ostree_repo_init repo6 --mode="archive-z2" ostree_repo_init repo6 --mode="archive"
${CMD_PREFIX} ostree --repo=repo6 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo ${CMD_PREFIX} ostree --repo=repo6 remote add --gpg-import ${test_tmpdir}/gpghome/key1.asc origin repo
if ${CMD_PREFIX} ostree --repo=repo6 pull-local --remote=origin --gpg-verify-summary repo test2 2>&1; then if ${CMD_PREFIX} ostree --repo=repo6 pull-local --remote=origin --gpg-verify-summary repo test2 2>&1; then
assert_not_reached "GPG summary verification with no summary unexpectedly succeeded" assert_not_reached "GPG summary verification with no summary unexpectedly succeeded"
@ -97,7 +97,7 @@ ${CMD_PREFIX} ostree --repo=repo6 pull-local --remote=origin --gpg-verify-summar
echo "ok --gpg-verify-summary" echo "ok --gpg-verify-summary"
mkdir repo7 mkdir repo7
ostree_repo_init repo7 --mode="archive-z2" ostree_repo_init repo7 --mode="archive"
${CMD_PREFIX} ostree --repo=repo7 pull-local repo ${CMD_PREFIX} ostree --repo=repo7 pull-local repo
${CMD_PREFIX} ostree --repo=repo7 fsck ${CMD_PREFIX} ostree --repo=repo7 fsck
for src_object in `find repo/objects -name '*.filez'`; do for src_object in `find repo/objects -name '*.filez'`; do

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..1' echo '1..1'

View File

@ -25,7 +25,7 @@ skip_without_user_xattrs
echo '1..2' echo '1..2'
setup_test_repository "archive-z2" setup_test_repository "archive"
export OSTREE_GPG_SIGN="${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME}" export OSTREE_GPG_SIGN="${OSTREE} gpg-sign --gpg-homedir=${TEST_GPG_KEYHOME}"

View File

@ -23,7 +23,7 @@ set -euo pipefail
skip_without_user_xattrs skip_without_user_xattrs
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..5' echo '1..5'

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..1' echo '1..1'

View File

@ -28,7 +28,7 @@ if has_gpgme; then
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
fi fi
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}"
# create a summary # create a summary
${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo \ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo \

View File

@ -27,7 +27,7 @@ fi
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..2' echo '1..2'

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..1' echo '1..1'

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..1' echo '1..1'

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..9' echo '1..9'

View File

@ -24,7 +24,7 @@ set -euo pipefail
echo "1..5" echo "1..5"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}"
# Now, setup multiple branches # Now, setup multiple branches
mkdir ${test_tmpdir}/ostree-srv/other-files mkdir ${test_tmpdir}/ostree-srv/other-files
@ -41,7 +41,7 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u
prev_dir=`pwd` prev_dir=`pwd`
cd ${test_tmpdir} cd ${test_tmpdir}
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo
${CMD_PREFIX} ostree --repo=repo pull --mirror origin ${CMD_PREFIX} ostree --repo=repo pull --mirror origin
assert_has_file repo/summary assert_has_file repo/summary
@ -69,13 +69,13 @@ cd $prev_dir
cd ${test_tmpdir} cd ${test_tmpdir}
rm -rf repo rm -rf repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${OSTREE} --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo ${OSTREE} --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo
echo "ok pull mirror without checking signed summary" echo "ok pull mirror without checking signed summary"
cd ${test_tmpdir} cd ${test_tmpdir}
rm -rf repo rm -rf repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo ${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo
if ${OSTREE} --repo=repo pull --mirror origin 2>err.txt; then if ${OSTREE} --repo=repo pull --mirror origin 2>err.txt; then
assert_not_reached "Mirroring unexpectedly succeeded" assert_not_reached "Mirroring unexpectedly succeeded"
@ -86,7 +86,7 @@ ${OSTREE} --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u ${COMMIT_SIGN}
cd ${test_tmpdir} cd ${test_tmpdir}
rm -rf repo rm -rf repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo ${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo
${OSTREE} --repo=repo pull --mirror origin ${OSTREE} --repo=repo pull --mirror origin
assert_has_file repo/summary assert_has_file repo/summary
@ -99,7 +99,7 @@ truncate --size=1 ${test_tmpdir}/ostree-srv/gnomerepo/summary.sig
cd ${test_tmpdir} cd ${test_tmpdir}
rm -rf repo rm -rf repo
mkdir repo mkdir repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${OSTREE} --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo ${OSTREE} --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo
${OSTREE} --repo=repo pull --mirror origin ${OSTREE} --repo=repo pull --mirror origin
assert_has_file repo/summary assert_has_file repo/summary

View File

@ -23,7 +23,7 @@ set -euo pipefail
echo "1..3" echo "1..3"
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
setup_mirror () { setup_mirror () {
name=$1; shift name=$1; shift

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..1' echo '1..1'
@ -34,7 +34,7 @@ gnomerepo_url="$(cat httpd-address)/ostree/gnomerepo"
mkdir mirror-srv mkdir mirror-srv
cd mirror-srv cd mirror-srv
mkdir gnomerepo mkdir gnomerepo
ostree_repo_init gnomerepo --mode "archive-z2" ostree_repo_init gnomerepo --mode "archive"
${CMD_PREFIX} ostree --repo=gnomerepo remote add --set=gpg-verify=false origin ${gnomerepo_url} ${CMD_PREFIX} ostree --repo=gnomerepo remote add --set=gpg-verify=false origin ${gnomerepo_url}
${CMD_PREFIX} ostree --repo=gnomerepo pull --mirror --depth=-1 origin main ${CMD_PREFIX} ostree --repo=gnomerepo pull --mirror --depth=-1 origin main

View File

@ -24,10 +24,10 @@ set -euo pipefail
echo "1..1" echo "1..1"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}" --random-500s=50 setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}" --random-500s=50
cd ${test_tmpdir} cd ${test_tmpdir}
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo
for x in $(seq 200); do for x in $(seq 200); do
if ${CMD_PREFIX} ostree --repo=repo pull --mirror origin main 2>err.txt; then if ${CMD_PREFIX} ostree --repo=repo pull --mirror origin main 2>err.txt; then

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" "" "--force-range-requests" setup_fake_remote_repo1 "archive" "" "--force-range-requests"
echo '1..1' echo '1..1'

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..4' echo '1..4'

View File

@ -24,7 +24,7 @@ set -euo pipefail
echo "1..7" echo "1..7"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}"
# Now, setup multiple branches # Now, setup multiple branches
mkdir ${test_tmpdir}/ostree-srv/other-files mkdir ${test_tmpdir}/ostree-srv/other-files
@ -41,7 +41,7 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u
prev_dir=`pwd` prev_dir=`pwd`
cd ${test_tmpdir} cd ${test_tmpdir}
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo
${CMD_PREFIX} ostree --repo=repo pull --mirror origin ${CMD_PREFIX} ostree --repo=repo pull --mirror origin
assert_has_file repo/summary assert_has_file repo/summary
@ -66,7 +66,7 @@ repo_reinit () {
cd ${test_tmpdir} cd ${test_tmpdir}
rm -rf repo rm -rf repo
mkdir repo mkdir repo
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo ${OSTREE} --repo=repo remote add --set=gpg-verify-summary=true origin $(cat httpd-address)/ostree/gnomerepo
} }

View File

@ -21,7 +21,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo '1..2' echo '1..2'

View File

@ -24,7 +24,7 @@ echo '1..4'
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_fake_remote_repo1 "archive-z2" "" \ setup_fake_remote_repo1 "archive" "" \
"--expected-cookies foo=bar --expected-cookies baz=badger" "--expected-cookies foo=bar --expected-cookies baz=badger"
assert_fail (){ assert_fail (){

View File

@ -24,7 +24,7 @@ set -euo pipefail
# We don't want OSTREE_GPG_HOME used for these tests. # We don't want OSTREE_GPG_HOME used for these tests.
unset OSTREE_GPG_HOME unset OSTREE_GPG_HOME
setup_fake_remote_repo1 "archive-z2" setup_fake_remote_repo1 "archive"
echo "1..4" echo "1..4"

View File

@ -23,7 +23,7 @@ echo "1..1"
. $(dirname $0)/libtest.sh . $(dirname $0)/libtest.sh
setup_test_repository "archive-z2" setup_test_repository "archive"
cd ${test_tmpdir}/files cd ${test_tmpdir}/files
$OSTREE commit -b testx -s "Another Commit" $OSTREE commit -b testx -s "Another Commit"
cd ${test_tmpdir} cd ${test_tmpdir}

View File

@ -27,7 +27,7 @@ set -euo pipefail
echo "1..2" echo "1..2"
COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}" COMMIT_SIGN="--gpg-homedir=${TEST_GPG_KEYHOME} --gpg-sign=${TEST_GPG_KEYID_1}"
setup_fake_remote_repo1 "archive-z2" "${COMMIT_SIGN}" setup_fake_remote_repo1 "archive" "${COMMIT_SIGN}"
# Set up a second branch. # Set up a second branch.
mkdir ${test_tmpdir}/ostree-srv/other-files mkdir ${test_tmpdir}/ostree-srv/other-files
@ -41,7 +41,7 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo summary -u
# Check out the repository. # Check out the repository.
prev_dir=`pwd` prev_dir=`pwd`
cd ${test_tmpdir} cd ${test_tmpdir}
ostree_repo_init repo --mode=archive-z2 ostree_repo_init repo --mode=archive
${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo
${CMD_PREFIX} ostree --repo=repo pull --mirror origin ${CMD_PREFIX} ostree --repo=repo pull --mirror origin

View File

@ -40,7 +40,7 @@ function libtestExec(shellCode) {
print('1..1') print('1..1')
libtestExec('setup_os_repository archive-z2 syslinux'); libtestExec('setup_os_repository archive syslinux');
GLib.setenv("OSTREE_SYSROOT_DEBUG", "mutable-deployments", true); GLib.setenv("OSTREE_SYSROOT_DEBUG", "mutable-deployments", true);

View File

@ -28,7 +28,7 @@ skip_without_user_xattrs
echo "1..2" echo "1..2"
setup_test_repository "archive-z2" setup_test_repository "archive"
cd ${test_tmpdir} cd ${test_tmpdir}
${CMD_PREFIX} ostree --repo=repo checkout test2 test2-checkout1 ${CMD_PREFIX} ostree --repo=repo checkout test2 test2-checkout1