From 3dd132285ab0908dc19d4930f625282a8eff05ea Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 22 Feb 2018 10:18:24 -0500 Subject: [PATCH] Initial renaming pass of "jigdo" to "rojig" I noticed that Ubuntu also uses the original "jigdo", so let's start pulling off the band-aid here and do a mass rename. For this first pass I'm focusing on CLI entrypoints and docs, as that's what people are going to see; renaming all of the internal C functions, structure variables etc. can come later. Closes: #1269 Approved by: jlebon --- design/{jigdo.md => rojig.md} | 13 ++++++------- docs/manual/treefile.md | 6 +++--- src/app/rpmostree-builtin-ex.c | 8 ++++---- src/app/rpmostree-compose-builtin-tree.c | 18 +++++++++++++----- src/app/rpmostree-compose-builtins.h | 4 ++-- src/app/rpmostree-ex-builtin-commit2jigdo.c | 8 ++++---- src/app/rpmostree-ex-builtin-jigdo2commit.c | 10 +++++----- src/app/rpmostree-ex-builtins.h | 4 ++-- src/libpriv/rpmostree-jigdo-assembler.c | 2 +- src/libpriv/rpmostree-jigdo-build.c | 20 ++++++++++---------- src/libpriv/rpmostree-jigdo-build.h | 2 +- tests/compose-tests/test-compose2jigdo.sh | 8 ++++---- tests/compose-tests/test-jigdo-e2e.sh | 12 ++++++------ 13 files changed, 61 insertions(+), 54 deletions(-) rename design/{jigdo.md => rojig.md} (93%) diff --git a/design/jigdo.md b/design/rojig.md similarity index 93% rename from design/jigdo.md rename to design/rojig.md index b17c991e..43a1ec9a 100644 --- a/design/jigdo.md +++ b/design/rojig.md @@ -1,10 +1,10 @@ -Introducing rpm-ostree jigdo +Introducing rpm-ostree rojig -------- In the rpm-ostree project, we're blending an image system (libostree) with a package system (libdnf). The goal is to gain the advantages of both. However, the dual nature also brings overhead; -this proposal aims to reduce some of that by adding a new "jigdo" +this proposal aims to reduce some of that by adding a new "rojig" model to rpm-ostree that makes more operations use the libdnf side. To do this, we're reviving an old idea: The [http://atterer.org/jigdo/](Jigdo) @@ -62,7 +62,7 @@ How? We've already stated that a primary design goal is to preserve the "image" functionality by default. Further, let's assume that we have an OSTree commit, -and we want to point it at a set of RPMs to use as the jigdo source. The source +and we want to point it at a set of RPMs to use as the rojig source. The source OSTree commit can have modified, added to, or removed data from the RPM set, and we will support that. Examples of additional data are the initramfs and RPM database. @@ -74,7 +74,7 @@ with checksum that is bit-for-bit identical. A simple approach is to scan over the set of files in the RPMs, then the set of files in the OSTree commit, and add RPMs which contain files in the OSTree -commit to our "jigdo set". +commit to our "rojig set". However, a major complication is SELinux labeling. It turns out that in a lot of cases, doing SELinux labeling is expensive; there are thousands of regular @@ -84,7 +84,7 @@ further complicating things is that there are also other packages that add labeling configuration such as `container-selinux`. In other words there's a circular dependency: packages have labels, but labels are contained in packages. We go to great lengths to handle this in rpm-ostree for package layering, and we -need to do the same for jigdo. +need to do the same for rojig. We can address this by having our OIRPM contain a mapping of (package, file path) to a set of extended attributes (including the key `security.selinux` @@ -92,6 +92,5 @@ one). At this point, if we add in the new objects such as the metadata objects from the OSTree commit and all new content objects that aren't part of a package, -we'll have our OIRPM. (There is -some [further complexity](https://pagure.io/fedora-atomic/issue/94) around +we'll have our rojigRPM. (There is some [further complexity](https://pagure.io/fedora-atomic/issue/94) around handling the initramfs and SELinux labeling that we'll omit for now). diff --git a/docs/manual/treefile.md b/docs/manual/treefile.md index 030130ad..0be30f9b 100644 --- a/docs/manual/treefile.md +++ b/docs/manual/treefile.md @@ -203,6 +203,6 @@ Experimental options All options listed here are subject to change or removal in a future version of `rpm-ostree`. - * `ex-jigdo-spec`: string, optional: If specified, will also cause - a run of `rpm-ostree ex commit2jigdo` on changes. Also requires the - `--ex-jigdo-output-rpm` commandline option. + * `ex-rojig-spec`: string, optional: If specified, will also cause + a run of `rpm-ostree ex commit2rojig` on changes. Also requires the + `--ex-rojig-output-rpm` commandline option. diff --git a/src/app/rpmostree-builtin-ex.c b/src/app/rpmostree-builtin-ex.c index 44c20ff9..954f2068 100644 --- a/src/app/rpmostree-builtin-ex.c +++ b/src/app/rpmostree-builtin-ex.c @@ -30,10 +30,10 @@ static RpmOstreeCommand ex_subcommands[] = { "Assemble local unprivileged containers", rpmostree_builtin_container }, { "kargs", 0, "Query or Modify the kernel arguments", rpmostree_ex_builtin_kargs }, - { "commit2jigdo", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, - "Convert an OSTree commit into an rpm-ostree jigdo", rpmostree_ex_builtin_commit2jigdo }, - { "jigdo2commit", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, - "Convert an rpm-ostree jigdo into an OSTree commit", rpmostree_ex_builtin_jigdo2commit }, + { "commit2rojig", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, + "Convert an OSTree commit into an rpm-ostree rojig", rpmostree_ex_builtin_commit2rojig }, + { "rojig2commit", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, + "Convert an rpm-ostree rojig into an OSTree commit", rpmostree_ex_builtin_rojig2commit }, { NULL, 0, NULL, NULL } }; diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index bb023443..06ab73a7 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -78,8 +78,10 @@ static GOptionEntry install_option_entries[] = { { "cachedir", 0, 0, G_OPTION_ARG_STRING, &opt_cachedir, "Cached state", "CACHEDIR" }, { "download-only", 0, 0, G_OPTION_ARG_NONE, &opt_download_only, "Like --dry-run, but download RPMs as well; requires --cachedir", NULL }, { "ex-unified-core", 0, 0, G_OPTION_ARG_NONE, &opt_ex_unified_core, "Use new \"unified core\" codepath", NULL }, - { "ex-jigdo-output-rpm", 0, 0, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_rpm, "Directory to write jigdoRPM", NULL }, - { "ex-jigdo-output-set", 0, 0, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_set, "Directory to write complete jigdo set (jigdoRPM+dependencies)", NULL }, + { "ex-jigdo-output-rpm", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_rpm, "Deprecated alias", NULL }, + { "ex-jigdo-output-set", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_set, "Deprecated alias", NULL }, + { "ex-rojig-output-rpm", 0, 0, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_rpm, "Directory to write rojigRPM", NULL }, + { "ex-rojig-output-set", 0, 0, G_OPTION_ARG_STRING, &opt_ex_jigdo_output_set, "Directory to write complete rojig set (rojigRPM+dependencies)", NULL }, { "proxy", 0, 0, G_OPTION_ARG_STRING, &opt_proxy, "HTTP proxy", "PROXY" }, { "dry-run", 0, 0, G_OPTION_ARG_NONE, &opt_dry_run, "Just print the transaction and exit", NULL }, { "output-repodata-dir", 0, 0, G_OPTION_ARG_STRING, &opt_output_repodata_dir, "Save downloaded repodata in DIR", "DIR" }, @@ -941,8 +943,14 @@ rpm_ostree_compose_context_new (const char *treefile_pathstr, g_autoptr(GFile) treefile_dir = g_file_get_parent (self->treefile_path); const char *jigdo_spec = NULL; - if (!_rpmostree_jsonutil_object_get_optional_string_member (self->treefile, "ex-jigdo-spec", &jigdo_spec, error)) + if (!_rpmostree_jsonutil_object_get_optional_string_member (self->treefile, "ex-rojig-spec", &jigdo_spec, error)) return FALSE; + if (!jigdo_spec) + { + /* Backcompat for a little while */ + if (!_rpmostree_jsonutil_object_get_optional_string_member (self->treefile, "ex-jigdo-spec", &jigdo_spec, error)) + return FALSE; + } if (jigdo_spec) self->jigdo_spec = g_build_filename (gs_file_get_path_cached (treefile_dir), jigdo_spec, NULL); @@ -1276,8 +1284,8 @@ impl_commit_tree (RpmOstreeTreeComposeContext *self, if (jigdo_outputdir) { if (!self->jigdo_spec) - return glnx_throw (error, "No ex-jigdo-spec provided"); - if (!rpmostree_commit2jigdo (self->repo, self->pkgcache_repo, + return glnx_throw (error, "No ex-rojig-spec provided"); + if (!rpmostree_commit2rojig (self->repo, self->pkgcache_repo, new_revision, self->jigdo_spec, jigdo_outputdir, cancellable, error)) diff --git a/src/app/rpmostree-compose-builtins.h b/src/app/rpmostree-compose-builtins.h index d546b7ee..1fc817cc 100644 --- a/src/app/rpmostree-compose-builtins.h +++ b/src/app/rpmostree-compose-builtins.h @@ -30,8 +30,8 @@ gboolean rpmostree_compose_builtin_tree (int argc, char **argv, RpmOstreeCommand gboolean rpmostree_compose_builtin_install (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); gboolean rpmostree_compose_builtin_postprocess (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); gboolean rpmostree_compose_builtin_commit (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); -gboolean rpmostree_compose_builtin_commit2jigdo (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); -gboolean rpmostree_compose_builtin_jigdo2commit (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); +gboolean rpmostree_compose_builtin_commit2rojig (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); +gboolean rpmostree_compose_builtin_rojig2commit (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, GError **error); G_END_DECLS diff --git a/src/app/rpmostree-ex-builtin-commit2jigdo.c b/src/app/rpmostree-ex-builtin-commit2jigdo.c index a905a06c..926dd289 100644 --- a/src/app/rpmostree-ex-builtin-commit2jigdo.c +++ b/src/app/rpmostree-ex-builtin-commit2jigdo.c @@ -45,7 +45,7 @@ static char *opt_repo; static char *opt_pkgcache_repo; static gboolean opt_only_contentdir; -static GOptionEntry commit2jigdo_option_entries[] = { +static GOptionEntry commit2rojig_option_entries[] = { { "repo", 0, 0, G_OPTION_ARG_STRING, &opt_repo, "OSTree repo", "REPO" }, { "pkgcache-repo", 0, 0, G_OPTION_ARG_STRING, &opt_pkgcache_repo, "Pkgcache OSTree repo", "REPO" }, { "only-contentdir", 0, 0, G_OPTION_ARG_NONE, &opt_only_contentdir, "Do not generate RPM, only output content directory", NULL }, @@ -53,7 +53,7 @@ static GOptionEntry commit2jigdo_option_entries[] = { }; int -rpmostree_ex_builtin_commit2jigdo (int argc, +rpmostree_ex_builtin_commit2rojig (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, @@ -61,7 +61,7 @@ rpmostree_ex_builtin_commit2jigdo (int argc, { g_autoptr(GOptionContext) context = g_option_context_new ("REV OIRPM-SPEC OUTPUTDIR"); if (!rpmostree_option_context_parse (context, - commit2jigdo_option_entries, + commit2rojig_option_entries, &argc, &argv, invocation, cancellable, @@ -93,7 +93,7 @@ rpmostree_ex_builtin_commit2jigdo (int argc, g_autoptr(OstreeRepo) pkgcache_repo = ostree_repo_open_at (AT_FDCWD, opt_pkgcache_repo, cancellable, error); if (!pkgcache_repo) return FALSE; - if (!rpmostree_commit2jigdo (repo, pkgcache_repo, rev, oirpm_spec, outputdir, + if (!rpmostree_commit2rojig (repo, pkgcache_repo, rev, oirpm_spec, outputdir, cancellable, error)) return FALSE; diff --git a/src/app/rpmostree-ex-builtin-jigdo2commit.c b/src/app/rpmostree-ex-builtin-jigdo2commit.c index 928e127a..5e5d393a 100644 --- a/src/app/rpmostree-ex-builtin-jigdo2commit.c +++ b/src/app/rpmostree-ex-builtin-jigdo2commit.c @@ -46,7 +46,7 @@ static char *opt_releasever; static char **opt_enable_rpmmdrepo; static char *opt_oirpm_version; -static GOptionEntry jigdo2commit_option_entries[] = { +static GOptionEntry rojig2commit_option_entries[] = { { "repo", 0, 0, G_OPTION_ARG_STRING, &opt_repo, "OSTree repo", "REPO" }, { "rpmmd-reposd", 'd', 0, G_OPTION_ARG_STRING, &opt_rpmmd_reposdir, "Path to yum.repos.d (rpmmd) config directory", "PATH" }, { "enablerepo", 'e', 0, G_OPTION_ARG_STRING_ARRAY, &opt_enable_rpmmdrepo, "Enable rpm-md repo with id ID", "ID" }, @@ -102,7 +102,7 @@ rpm_ostree_jigdo2commit_context_new (RpmOstreeJigdo2CommitContext **out_context, } static gboolean -impl_jigdo2commit (RpmOstreeJigdo2CommitContext *self, +impl_rojig2commit (RpmOstreeJigdo2CommitContext *self, const char *jigdo_id, GCancellable *cancellable, GError **error) @@ -135,7 +135,7 @@ impl_jigdo2commit (RpmOstreeJigdo2CommitContext *self, } int -rpmostree_ex_builtin_jigdo2commit (int argc, +rpmostree_ex_builtin_rojig2commit (int argc, char **argv, RpmOstreeCommandInvocation *invocation, GCancellable *cancellable, @@ -143,7 +143,7 @@ rpmostree_ex_builtin_jigdo2commit (int argc, { g_autoptr(GOptionContext) context = g_option_context_new ("REPOID:OIRPM-NAME"); if (!rpmostree_option_context_parse (context, - jigdo2commit_option_entries, + rojig2commit_option_entries, &argc, &argv, invocation, cancellable, @@ -168,7 +168,7 @@ rpmostree_ex_builtin_jigdo2commit (int argc, g_autoptr(RpmOstreeJigdo2CommitContext) self = NULL; if (!rpm_ostree_jigdo2commit_context_new (&self, cancellable, error)) return FALSE; - if (!impl_jigdo2commit (self, oirpm, cancellable, error)) + if (!impl_rojig2commit (self, oirpm, cancellable, error)) return FALSE; return TRUE; diff --git a/src/app/rpmostree-ex-builtins.h b/src/app/rpmostree-ex-builtins.h index c3a85f81..a7d3fdb5 100644 --- a/src/app/rpmostree-ex-builtins.h +++ b/src/app/rpmostree-ex-builtins.h @@ -34,8 +34,8 @@ BUILTINPROTO(unpack); BUILTINPROTO(livefs); BUILTINPROTO(override); BUILTINPROTO(kargs); -BUILTINPROTO(commit2jigdo); -BUILTINPROTO(jigdo2commit); +BUILTINPROTO(commit2rojig); +BUILTINPROTO(rojig2commit); #undef BUILTINPROTO diff --git a/src/libpriv/rpmostree-jigdo-assembler.c b/src/libpriv/rpmostree-jigdo-assembler.c index a4caa370..bd862796 100644 --- a/src/libpriv/rpmostree-jigdo-assembler.c +++ b/src/libpriv/rpmostree-jigdo-assembler.c @@ -446,7 +446,7 @@ state_transition (RpmOstreeJigdoAssembler *self, return TRUE; } -/* Process new objects included in the OIRPM */ +/* Process new objects included in the rojigRPM */ gboolean rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self, OstreeRepo *repo, diff --git a/src/libpriv/rpmostree-jigdo-build.c b/src/libpriv/rpmostree-jigdo-build.c index ccbc5163..e775298e 100644 --- a/src/libpriv/rpmostree-jigdo-build.c +++ b/src/libpriv/rpmostree-jigdo-build.c @@ -666,7 +666,7 @@ compare_pkgs (gconstpointer ap, } static gboolean -write_commit2jigdo (RpmOstreeCommit2JigdoContext *self, +write_commit2rojig (RpmOstreeCommit2JigdoContext *self, const char *commit, const char *oirpm_spec, const char *outputdir, @@ -1031,14 +1031,14 @@ write_commit2jigdo (RpmOstreeCommit2JigdoContext *self, return TRUE; } -/* Entrypoint function for turning a commit into an OIRPM. +/* Entrypoint function for turning a commit into an rojigRPM. * * The basic prerequisite for this: when doing a compose tree, import the * packages, and after import check out the final tree and SELinux relabel the * imports so that they're reliably updated (currently depends on some unified * core 🌐 work). * - * First, we find the "jigdo set" of packages we need; not all packages that + * First, we find the "rojig set" of packages we need; not all packages that * live in the tree actually need to be imported; things like `emacs-filesystem` * or `rootfiles` today don't actually generate any content objects we use. * @@ -1056,15 +1056,15 @@ write_commit2jigdo (RpmOstreeCommit2JigdoContext *self, * * Once we've determined all the needed data, we make a temporary directory, and * start writing out files inside it. This temporary directory is then turned - * into the OIRPM (what looks like a plain old RPM) by invoking `rpmbuild` using + * into the rojigRPM (what looks like a plain old RPM) by invoking `rpmbuild` using * a `.spec` file. * - * The resulting "jigdo set" is then that OIRPM, plus the exact NEVRAs - we also + * The resulting "rojig set" is then that rojigRPM, plus the exact NEVRAs - we also * record the repodata checksum (normally sha256), to ensure that we get the * *exact* RPMs we require bit-for-bit. */ static gboolean -impl_commit2jigdo (RpmOstreeCommit2JigdoContext *self, +impl_commit2rojig (RpmOstreeCommit2JigdoContext *self, const char *rev, const char *oirpm_spec, const char *outputdir, @@ -1267,7 +1267,7 @@ impl_commit2jigdo (RpmOstreeCommit2JigdoContext *self, } /* Hardcode FALSE for opt_only_contentdir for now */ - if (!write_commit2jigdo (self, commit, oirpm_spec, outputdir, FALSE, pkglist, + if (!write_commit2rojig (self, commit, oirpm_spec, outputdir, FALSE, pkglist, new_reachable_small, new_big_content_identical, cancellable, error)) return FALSE; @@ -1275,9 +1275,9 @@ impl_commit2jigdo (RpmOstreeCommit2JigdoContext *self, return TRUE; } -/* See comment for impl_commit2jigdo() */ +/* See comment for impl_commit2rojig() */ gboolean -rpmostree_commit2jigdo (OstreeRepo *repo, +rpmostree_commit2rojig (OstreeRepo *repo, OstreeRepo *pkgcache_repo, const char *commit, const char *spec, @@ -1295,5 +1295,5 @@ rpmostree_commit2jigdo (OstreeRepo *repo, (GDestroyNotify)g_free,(GDestroyNotify)pkg_objid_free); self->objsize_to_object = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)g_free); - return impl_commit2jigdo (self, commit, spec, outputdir, cancellable, error); + return impl_commit2rojig (self, commit, spec, outputdir, cancellable, error); } diff --git a/src/libpriv/rpmostree-jigdo-build.h b/src/libpriv/rpmostree-jigdo-build.h index 03d51afa..b2370a9c 100644 --- a/src/libpriv/rpmostree-jigdo-build.h +++ b/src/libpriv/rpmostree-jigdo-build.h @@ -24,7 +24,7 @@ #include "rpmostree-jigdo-core.h" gboolean -rpmostree_commit2jigdo (OstreeRepo *repo, +rpmostree_commit2rojig (OstreeRepo *repo, OstreeRepo *pkgcache_repo, const char *commit, const char *spec, diff --git a/tests/compose-tests/test-compose2jigdo.sh b/tests/compose-tests/test-compose2jigdo.sh index a2587eb7..212eff44 100755 --- a/tests/compose-tests/test-compose2jigdo.sh +++ b/tests/compose-tests/test-compose2jigdo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Test rpm-ostree compose tree --ex-jigdo-output-rpm +# Test rpm-ostree compose tree --ex-rojig-output-rpm set -xeuo pipefail @@ -8,10 +8,10 @@ dn=$(cd $(dirname $0) && pwd) . ${dn}/../common/libtest.sh prepare_compose_test "compose2jigdo" -pysetjsonmember "ex-jigdo-spec" '"fedora-atomic-host-oirpm.spec"' +pysetjsonmember "ex-rojig-spec" '"fedora-atomic-host-oirpm.spec"' mkdir cache mkdir jigdo-output -runcompose --ex-jigdo-output-rpm $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.0 +runcompose --ex-rojig-output-rpm $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.0 rev=$(ostree --repo=repo-build rev-parse ${treeref}) find jigdo-output -name '*.rpm' | tee rpms.txt assert_file_has_content rpms.txt 'fedora-atomic-host-42.0.*x86_64' @@ -21,7 +21,7 @@ done assert_file_has_content_literal provides.txt "rpmostree-jigdo-commit(${rev})" echo "ok compose2jigdoRPM" -runcompose --force-nocache --ex-jigdo-output-set $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.1 +runcompose --force-nocache --ex-rojig-output-set $(pwd)/jigdo-output --cachedir $(pwd)/cache --add-metadata-string version=42.1 rev=$(ostree --repo=repo-build rev-parse ${treeref}) find jigdo-output -name '*.rpm' | tee rpms.txt assert_file_has_content rpms.txt 'systemd.*x86_64' diff --git a/tests/compose-tests/test-jigdo-e2e.sh b/tests/compose-tests/test-jigdo-e2e.sh index 4d6abe8d..bf8cdfa3 100755 --- a/tests/compose-tests/test-jigdo-e2e.sh +++ b/tests/compose-tests/test-jigdo-e2e.sh @@ -30,7 +30,7 @@ rev=$(ostree --repo=${repobuild} rev-parse ${treeref}) mkdir jigdo-output do_commit2jigdo() { targetrev=$1 - rpm-ostree ex commit2jigdo --repo=repo-build --pkgcache-repo cache/pkgcache-repo ${targetrev} $(pwd)/composedata/fedora-atomic-host-oirpm.spec $(pwd)/jigdo-output + rpm-ostree ex commit2rojig --repo=repo-build --pkgcache-repo cache/pkgcache-repo ${targetrev} $(pwd)/composedata/fedora-atomic-host-oirpm.spec $(pwd)/jigdo-output (cd jigdo-output && createrepo_c .) } do_commit2jigdo ${rev} @@ -46,10 +46,10 @@ baseurl=file://$(pwd)/jigdo-output enabled=1 gpgcheck=0 eof -do_jigdo2commit() { - rpm-ostree ex jigdo2commit -d $(pwd)/composedata -e fedora-local -e test-repo -e jigdo-test --repo=jigdo-unpack-repo jigdo-test:fedora-atomic-host | tee jigdo2commit-out.txt +do_rojig2commit() { + rpm-ostree ex rojig2commit -d $(pwd)/composedata -e fedora-local -e test-repo -e jigdo-test --repo=jigdo-unpack-repo jigdo-test:fedora-atomic-host | tee jigdo2commit-out.txt } -do_jigdo2commit +do_rojig2commit # there will generally be pkgs not in the jigdo set, but let's at least assert it's > 0 assert_file_has_content jigdo2commit-out.txt ${npkgs}/${npkgs}' packages to import' ostree --repo=jigdo-unpack-repo rev-parse ${rev} @@ -87,7 +87,7 @@ assert_file_has_content requires.txt 'systemd(.*) = ' assert_file_has_content requires.txt 'test-pkg(.*) = 1.0-1' # And pull it; we should download the newer version by default -do_jigdo2commit +do_rojig2commit # Now we should only download 2 packages assert_file_has_content jigdo2commit-out.txt '2/[1-9][0-9]* packages to import' for x in ${origrev} ${newrev}; do @@ -109,7 +109,7 @@ newrev=$(ostree --repo=${repobuild} rev-parse ${treeref}) do_commit2jigdo ${newrev} find jigdo-output -name '*.rpm' | tee rpms.txt assert_file_has_content rpms.txt 'fedora-atomic-host-42.2.*x86_64' -do_jigdo2commit +do_rojig2commit # Not every package has docs, but there are going to need to be changes assert_file_has_content jigdo2commit-out.txt '[1-9][0-9]*/[1-9][0-9]* packages to import ([1-9][0-9]* changed)' ostree --repo=jigdo-unpack-repo ls -R ${newrev} >/dev/null