rojig-rename: (almost) Everything else
This renames the remaining C files, tests, etc. There are only a few hits for `jigdo` left; changing them would be a format break, so let's wait to do that until we need to. Closes: #1279 Approved by: jlebon
This commit is contained in:
parent
ec5b560979
commit
36071d3c69
@ -48,8 +48,8 @@ librpmostreepriv_la_SOURCES = \
|
||||
src/libpriv/rpmostree-importer.h \
|
||||
src/libpriv/rpmostree-rojig-build.c \
|
||||
src/libpriv/rpmostree-rojig-build.h \
|
||||
src/libpriv/rpmostree-jigdo-assembler.c \
|
||||
src/libpriv/rpmostree-jigdo-assembler.h \
|
||||
src/libpriv/rpmostree-rojig-assembler.c \
|
||||
src/libpriv/rpmostree-rojig-assembler.h \
|
||||
src/libpriv/rpmostree-rojig-core.h \
|
||||
src/libpriv/rpmostree-rojig-client.c \
|
||||
src/libpriv/rpmostree-unpacker-core.c \
|
||||
|
@ -40,7 +40,7 @@ rpm_ostree_SOURCES = src/app/main.c \
|
||||
src/app/rpmostree-builtin-ex.c \
|
||||
src/app/rpmostree-builtin-container.c \
|
||||
src/app/rpmostree-ex-builtin-commit2rojig.c \
|
||||
src/app/rpmostree-ex-builtin-jigdo2commit.c \
|
||||
src/app/rpmostree-ex-builtin-rojig2commit.c \
|
||||
src/app/rpmostree-builtin-db.c \
|
||||
src/app/rpmostree-builtin-start-daemon.c \
|
||||
src/app/rpmostree-db-builtin-diff.c \
|
||||
|
@ -118,7 +118,7 @@ typedef struct {
|
||||
OstreeRepo *pkgcache_repo;
|
||||
OstreeRepoDevInoCache *devino_cache;
|
||||
char *ref;
|
||||
char *jigdo_spec;
|
||||
char *rojig_spec;
|
||||
char *previous_checksum;
|
||||
|
||||
JsonParser *treefile_parser;
|
||||
@ -146,7 +146,7 @@ rpm_ostree_tree_compose_context_free (RpmOstreeTreeComposeContext *ctx)
|
||||
g_clear_object (&ctx->pkgcache_repo);
|
||||
g_clear_pointer (&ctx->devino_cache, (GDestroyNotify)ostree_repo_devino_cache_unref);
|
||||
g_free (ctx->ref);
|
||||
g_free (ctx->jigdo_spec);
|
||||
g_free (ctx->rojig_spec);
|
||||
g_free (ctx->previous_checksum);
|
||||
g_clear_object (&ctx->treefile_parser);
|
||||
g_clear_pointer (&ctx->serialized_treefile, (GDestroyNotify)g_bytes_unref);
|
||||
@ -246,15 +246,15 @@ hardlink_or_copy_at (int src_dfd,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
copy_jigdo_rpms_to_outputdir (RpmOstreeTreeComposeContext *self,
|
||||
const char *jigdoset_outputdir,
|
||||
copy_rojig_rpms_to_outputdir (RpmOstreeTreeComposeContext *self,
|
||||
const char *rojigset_outputdir,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GLNX_AUTO_PREFIX_ERROR ("Copying jigdo RPMs", error);
|
||||
GLNX_AUTO_PREFIX_ERROR ("Copying rojig RPMs", error);
|
||||
g_autoptr(GPtrArray) pkglist = rpmostree_context_get_packages (self->corectx);
|
||||
int output_dfd = -1;
|
||||
if (!glnx_opendirat (AT_FDCWD, jigdoset_outputdir, TRUE, &output_dfd, error))
|
||||
if (!glnx_opendirat (AT_FDCWD, rojigset_outputdir, TRUE, &output_dfd, error))
|
||||
return FALSE;
|
||||
|
||||
guint n_copied = 0;
|
||||
@ -272,8 +272,8 @@ copy_jigdo_rpms_to_outputdir (RpmOstreeTreeComposeContext *self,
|
||||
return FALSE;
|
||||
n_copied++;
|
||||
}
|
||||
g_print ("Copied %u (of %u total) jigdoSet RPMS to %s\n", n_copied, pkglist->len,
|
||||
jigdoset_outputdir);
|
||||
g_print ("Copied %u (of %u total) rojigSet RPMS to %s\n", n_copied, pkglist->len,
|
||||
rojigset_outputdir);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -418,7 +418,7 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
|
||||
|
||||
/* By default, retain packages in addition to metadata with --cachedir, unless
|
||||
* we're doing unified core, in which case the pkgcache repo is the cache. But
|
||||
* the jigdoSet build still requires the original RPMs too.
|
||||
* the rojigSet build still requires the original RPMs too.
|
||||
*/
|
||||
if ((opt_cachedir && !opt_ex_unified_core) || opt_ex_jigdo_output_set)
|
||||
dnf_context_set_keep_cache (dnfctx, TRUE);
|
||||
@ -573,10 +573,10 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
|
||||
if (opt_download_only)
|
||||
return TRUE; /* 🔚 Early return */
|
||||
|
||||
/* Hardlink our input set now for jigdo-set output mode */
|
||||
/* Hardlink our input set now for rojig-set output mode */
|
||||
if (opt_ex_jigdo_output_set)
|
||||
{
|
||||
if (!copy_jigdo_rpms_to_outputdir (self, opt_ex_jigdo_output_set, cancellable, error))
|
||||
if (!copy_rojig_rpms_to_outputdir (self, opt_ex_jigdo_output_set, cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -610,7 +610,7 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
|
||||
/* Now reload the policy from the tmproot, and relabel the pkgcache - this
|
||||
* is the same thing done in rpmostree_context_commit(). But here we want
|
||||
* to ensure our pkgcache labels are accurate, since that will
|
||||
* be important for the ostree-jigdo work.
|
||||
* be important for the ostree-rojig work.
|
||||
*/
|
||||
g_autoptr(OstreeSePolicy) sepolicy = ostree_sepolicy_new_at (rootfs_dfd, cancellable, error);
|
||||
rpmostree_context_set_sepolicy (self->corectx, sepolicy);
|
||||
@ -828,7 +828,7 @@ rpm_ostree_compose_context_new (const char *treefile_pathstr,
|
||||
if (opt_workdir_tmpfs)
|
||||
g_print ("note: --workdir-tmpfs is deprecated and will be ignored\n");
|
||||
|
||||
/* jigdo implies unified core mode currently */
|
||||
/* rojig implies unified core mode currently */
|
||||
if (opt_ex_jigdo_output_rpm || opt_ex_jigdo_output_set)
|
||||
opt_ex_unified_core = TRUE;
|
||||
|
||||
@ -942,17 +942,17 @@ rpm_ostree_compose_context_new (const char *treefile_pathstr,
|
||||
return FALSE;
|
||||
|
||||
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-rojig-spec", &jigdo_spec, error))
|
||||
const char *rojig_spec = NULL;
|
||||
if (!_rpmostree_jsonutil_object_get_optional_string_member (self->treefile, "ex-rojig-spec", &rojig_spec, error))
|
||||
return FALSE;
|
||||
if (!jigdo_spec)
|
||||
if (!rojig_spec)
|
||||
{
|
||||
/* Backcompat for a little while */
|
||||
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-jigdo-spec", &rojig_spec, error))
|
||||
return FALSE;
|
||||
}
|
||||
if (jigdo_spec)
|
||||
self->jigdo_spec = g_build_filename (gs_file_get_path_cached (treefile_dir), jigdo_spec, NULL);
|
||||
if (rojig_spec)
|
||||
self->rojig_spec = g_build_filename (gs_file_get_path_cached (treefile_dir), rojig_spec, NULL);
|
||||
|
||||
*out_context = g_steal_pointer (&self);
|
||||
return TRUE;
|
||||
@ -1296,14 +1296,14 @@ impl_commit_tree (RpmOstreeTreeComposeContext *self,
|
||||
&new_revision, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
const char *jigdo_outputdir = opt_ex_jigdo_output_rpm ?: opt_ex_jigdo_output_set;
|
||||
if (jigdo_outputdir)
|
||||
const char *rojig_outputdir = opt_ex_jigdo_output_rpm ?: opt_ex_jigdo_output_set;
|
||||
if (rojig_outputdir)
|
||||
{
|
||||
if (!self->jigdo_spec)
|
||||
if (!self->rojig_spec)
|
||||
return glnx_throw (error, "No ex-rojig-spec provided");
|
||||
if (!rpmostree_commit2rojig (self->repo, self->pkgcache_repo,
|
||||
new_revision, self->jigdo_spec,
|
||||
jigdo_outputdir,
|
||||
new_revision, self->rojig_spec,
|
||||
rojig_outputdir,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "rpmostree-ex-builtins.h"
|
||||
#include "rpmostree-util.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-jigdo-assembler.h"
|
||||
#include "rpmostree-rojig-assembler.h"
|
||||
#include "rpmostree-postprocess.h"
|
||||
#include "rpmostree-passwd-util.h"
|
||||
#include "rpmostree-libbuiltin.h"
|
||||
@ -59,25 +59,25 @@ typedef struct {
|
||||
OstreeRepo *repo;
|
||||
GLnxTmpDir tmpd;
|
||||
RpmOstreeContext *ctx;
|
||||
} RpmOstreeJigdo2CommitContext;
|
||||
} RpmOstreeRojig2CommitContext;
|
||||
|
||||
static void
|
||||
rpm_ostree_jigdo2commit_context_free (RpmOstreeJigdo2CommitContext *ctx)
|
||||
rpm_ostree_rojig2commit_context_free (RpmOstreeRojig2CommitContext *ctx)
|
||||
{
|
||||
g_clear_object (&ctx->repo);
|
||||
(void) glnx_tmpdir_delete (&ctx->tmpd, NULL, NULL);
|
||||
g_free (ctx);
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(RpmOstreeJigdo2CommitContext, rpm_ostree_jigdo2commit_context_free)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(RpmOstreeRojig2CommitContext, rpm_ostree_rojig2commit_context_free)
|
||||
|
||||
/* Initialize a context for converting a jigdo to a commit.
|
||||
/* Initialize a context for converting a rojig to a commit.
|
||||
*/
|
||||
static gboolean
|
||||
rpm_ostree_jigdo2commit_context_new (RpmOstreeJigdo2CommitContext **out_context,
|
||||
rpm_ostree_rojig2commit_context_new (RpmOstreeRojig2CommitContext **out_context,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
g_autoptr(RpmOstreeJigdo2CommitContext) self = g_new0 (RpmOstreeJigdo2CommitContext, 1);
|
||||
g_autoptr(RpmOstreeRojig2CommitContext) self = g_new0 (RpmOstreeRojig2CommitContext, 1);
|
||||
|
||||
self->repo = ostree_repo_open_at (AT_FDCWD, opt_repo, cancellable, error);
|
||||
if (!self->repo)
|
||||
@ -85,7 +85,7 @@ rpm_ostree_jigdo2commit_context_new (RpmOstreeJigdo2CommitContext **out_context,
|
||||
|
||||
/* Our workdir lives in the repo for command line testing */
|
||||
if (!glnx_mkdtempat (ostree_repo_get_dfd (self->repo),
|
||||
"tmp/rpmostree-jigdo-XXXXXX", 0700, &self->tmpd, error))
|
||||
"tmp/rpmostree-rojig-XXXXXX", 0700, &self->tmpd, error))
|
||||
return FALSE;
|
||||
|
||||
self->ctx = rpmostree_context_new_tree (self->tmpd.fd, self->repo, cancellable, error);
|
||||
@ -102,7 +102,7 @@ rpm_ostree_jigdo2commit_context_new (RpmOstreeJigdo2CommitContext **out_context,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
impl_rojig2commit (RpmOstreeJigdo2CommitContext *self,
|
||||
impl_rojig2commit (RpmOstreeRojig2CommitContext *self,
|
||||
const char *rojig_id,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
@ -165,8 +165,8 @@ rpmostree_ex_builtin_rojig2commit (int argc,
|
||||
|
||||
const char *oirpm = argv[1];
|
||||
|
||||
g_autoptr(RpmOstreeJigdo2CommitContext) self = NULL;
|
||||
if (!rpm_ostree_jigdo2commit_context_new (&self, cancellable, error))
|
||||
g_autoptr(RpmOstreeRojig2CommitContext) self = NULL;
|
||||
if (!rpm_ostree_rojig2commit_context_new (&self, cancellable, error))
|
||||
return FALSE;
|
||||
if (!impl_rojig2commit (self, oirpm, cancellable, error))
|
||||
return FALSE;
|
@ -35,7 +35,7 @@
|
||||
#include "rpmostree-unpacker-core.h"
|
||||
#include "rpmostree-importer.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-jigdo-assembler.h"
|
||||
#include "rpmostree-rojig-assembler.h"
|
||||
#include "rpmostree-rpm-util.h"
|
||||
#include <rpm/rpmlib.h>
|
||||
#include <rpm/rpmlog.h>
|
||||
@ -720,7 +720,7 @@ rojig_filter_cb (OstreeRepo *repo,
|
||||
if (g_file_info_get_file_type (file_info) != G_FILE_TYPE_DIRECTORY)
|
||||
{
|
||||
self->rojig_next_xattrs = NULL;
|
||||
if (!rpmostree_jigdo_assembler_xattr_lookup (self->rojig_xattr_table, path,
|
||||
if (!rpmostree_rojig_assembler_xattr_lookup (self->rojig_xattr_table, path,
|
||||
self->rojig_xattrs,
|
||||
&self->rojig_next_xattrs,
|
||||
error))
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include "rpmostree-libarchive-input-stream.h"
|
||||
#include "rpmostree-unpacker-core.h"
|
||||
#include "rpmostree-jigdo-assembler.h"
|
||||
#include "rpmostree-rojig-assembler.h"
|
||||
#include "rpmostree-core.h"
|
||||
#include "rpmostree-rpm-util.h"
|
||||
#include <rpm/rpmlib.h>
|
||||
@ -46,7 +46,7 @@ typedef enum {
|
||||
STATE_NEW,
|
||||
STATE_XATTRS_TABLE,
|
||||
STATE_XATTRS_PKG,
|
||||
} JigdoAssemblerState;
|
||||
} RojigAssemblerState;
|
||||
|
||||
static gboolean
|
||||
throw_libarchive_error (GError **error,
|
||||
@ -55,12 +55,12 @@ throw_libarchive_error (GError **error,
|
||||
return glnx_throw (error, "%s", archive_error_string (a));
|
||||
}
|
||||
|
||||
typedef GObjectClass RpmOstreeJigdoAssemblerClass;
|
||||
typedef GObjectClass RpmOstreeRojigAssemblerClass;
|
||||
|
||||
struct RpmOstreeJigdoAssembler
|
||||
struct RpmOstreeRojigAssembler
|
||||
{
|
||||
GObject parent_instance;
|
||||
JigdoAssemblerState state;
|
||||
RojigAssemblerState state;
|
||||
DnfPackage *pkg;
|
||||
GVariant *commit;
|
||||
GVariant *meta;
|
||||
@ -71,12 +71,12 @@ struct RpmOstreeJigdoAssembler
|
||||
int fd;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(RpmOstreeJigdoAssembler, rpmostree_jigdo_assembler, G_TYPE_OBJECT)
|
||||
G_DEFINE_TYPE(RpmOstreeRojigAssembler, rpmostree_rojig_assembler, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
rpmostree_jigdo_assembler_finalize (GObject *object)
|
||||
rpmostree_rojig_assembler_finalize (GObject *object)
|
||||
{
|
||||
RpmOstreeJigdoAssembler *self = (RpmOstreeJigdoAssembler*)object;
|
||||
RpmOstreeRojigAssembler *self = (RpmOstreeRojigAssembler*)object;
|
||||
if (self->archive)
|
||||
archive_read_free (self->archive);
|
||||
g_clear_pointer (&self->commit, (GDestroyNotify)g_variant_unref);
|
||||
@ -86,25 +86,25 @@ rpmostree_jigdo_assembler_finalize (GObject *object)
|
||||
g_clear_pointer (&self->xattrs_table, (GDestroyNotify)g_variant_unref);
|
||||
glnx_close_fd (&self->fd);
|
||||
|
||||
G_OBJECT_CLASS (rpmostree_jigdo_assembler_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (rpmostree_rojig_assembler_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
rpmostree_jigdo_assembler_class_init (RpmOstreeJigdoAssemblerClass *klass)
|
||||
rpmostree_rojig_assembler_class_init (RpmOstreeRojigAssemblerClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = rpmostree_jigdo_assembler_finalize;
|
||||
gobject_class->finalize = rpmostree_rojig_assembler_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
rpmostree_jigdo_assembler_init (RpmOstreeJigdoAssembler *self)
|
||||
rpmostree_rojig_assembler_init (RpmOstreeRojigAssembler *self)
|
||||
{
|
||||
self->fd = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* rpmostree_jigdo_assembler_new_take_fd:
|
||||
* rpmostree_rojig_assembler_new_take_fd:
|
||||
* @fd: Fd, ownership is taken
|
||||
* @pkg: (optional): Package reference, used for metadata
|
||||
* @error: error
|
||||
@ -113,8 +113,8 @@ rpmostree_jigdo_assembler_init (RpmOstreeJigdoAssembler *self)
|
||||
* specified, will be inspected and metadata such as the
|
||||
* origin repo will be added to the final commit.
|
||||
*/
|
||||
RpmOstreeJigdoAssembler *
|
||||
rpmostree_jigdo_assembler_new_take_fd (int *fd,
|
||||
RpmOstreeRojigAssembler *
|
||||
rpmostree_rojig_assembler_new_take_fd (int *fd,
|
||||
DnfPackage *pkg,
|
||||
GError **error)
|
||||
{
|
||||
@ -124,7 +124,7 @@ rpmostree_jigdo_assembler_new_take_fd (int *fd,
|
||||
if (archive == NULL)
|
||||
return NULL;
|
||||
|
||||
RpmOstreeJigdoAssembler *ret = g_object_new (RPMOSTREE_TYPE_JIGDO_ASSEMBLER, NULL);
|
||||
RpmOstreeRojigAssembler *ret = g_object_new (RPMOSTREE_TYPE_ROJIG_ASSEMBLER, NULL);
|
||||
ret->archive = g_steal_pointer (&archive);
|
||||
ret->pkg = pkg ? g_object_ref (pkg) : NULL;
|
||||
ret->fd = glnx_steal_fd (&owned_fd);
|
||||
@ -133,7 +133,7 @@ rpmostree_jigdo_assembler_new_take_fd (int *fd,
|
||||
}
|
||||
|
||||
static GVariant *
|
||||
jigdo_read_variant (const GVariantType *vtype,
|
||||
rojig_read_variant (const GVariantType *vtype,
|
||||
struct archive *a,
|
||||
struct archive_entry *entry,
|
||||
GCancellable *cancellable,
|
||||
@ -186,7 +186,7 @@ peel_entry_pathname (struct archive_entry *entry,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
jigdo_next_entry (RpmOstreeJigdoAssembler *self,
|
||||
rojig_next_entry (RpmOstreeRojigAssembler *self,
|
||||
gboolean *out_eof,
|
||||
struct archive_entry **out_entry,
|
||||
GCancellable *cancellable,
|
||||
@ -231,13 +231,13 @@ jigdo_next_entry (RpmOstreeJigdoAssembler *self,
|
||||
}
|
||||
|
||||
static struct archive_entry *
|
||||
jigdo_require_next_entry (RpmOstreeJigdoAssembler *self,
|
||||
rojig_require_next_entry (RpmOstreeRojigAssembler *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean eof;
|
||||
struct archive_entry *entry;
|
||||
if (!jigdo_next_entry (self, &eof, &entry, cancellable, error))
|
||||
if (!rojig_next_entry (self, &eof, &entry, cancellable, error))
|
||||
return FALSE;
|
||||
if (eof)
|
||||
return glnx_null_throw (error, "Unexpected end of archive");
|
||||
@ -261,7 +261,7 @@ parse_checksum_from_pathname (const char *pathname,
|
||||
* GPG verification.
|
||||
*/
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *self,
|
||||
rpmostree_rojig_assembler_read_meta (RpmOstreeRojigAssembler *self,
|
||||
char **out_checksum,
|
||||
GVariant **out_commit,
|
||||
GVariant **out_detached_meta,
|
||||
@ -269,7 +269,7 @@ rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *self,
|
||||
GError **error)
|
||||
{
|
||||
g_assert_cmpint (self->state, ==, STATE_COMMIT);
|
||||
struct archive_entry *entry = jigdo_require_next_entry (self, cancellable, error);
|
||||
struct archive_entry *entry = rojig_require_next_entry (self, cancellable, error);
|
||||
if (!entry)
|
||||
return FALSE;
|
||||
const char *entry_path = peel_entry_pathname (entry, error);
|
||||
@ -283,7 +283,7 @@ rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *self,
|
||||
if (!checksum)
|
||||
return FALSE;
|
||||
|
||||
g_autoptr(GVariant) commit = jigdo_read_variant (OSTREE_COMMIT_GVARIANT_FORMAT,
|
||||
g_autoptr(GVariant) commit = rojig_read_variant (OSTREE_COMMIT_GVARIANT_FORMAT,
|
||||
self->archive, entry, cancellable, error);
|
||||
g_autoptr(GVariant) meta = NULL;
|
||||
|
||||
@ -295,13 +295,13 @@ rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *self,
|
||||
return glnx_throw (error, "Checksum mismatch; described='%s' actual='%s'",
|
||||
checksum, actual_checksum);
|
||||
|
||||
entry = jigdo_require_next_entry (self, cancellable, error);
|
||||
entry = rojig_require_next_entry (self, cancellable, error);
|
||||
entry_path = peel_entry_pathname (entry, error);
|
||||
if (!entry_path)
|
||||
return FALSE;
|
||||
if (g_str_equal (entry_path, RPMOSTREE_ROJIG_COMMIT_DIR "/meta"))
|
||||
{
|
||||
meta = jigdo_read_variant (G_VARIANT_TYPE ("a{sv}"), self->archive, entry,
|
||||
meta = rojig_read_variant (G_VARIANT_TYPE ("a{sv}"), self->archive, entry,
|
||||
cancellable, error);
|
||||
if (!meta)
|
||||
return FALSE;
|
||||
@ -322,7 +322,7 @@ rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_contentident (RpmOstreeJigdoAssembler *self,
|
||||
process_contentident (RpmOstreeRojigAssembler *self,
|
||||
OstreeRepo *repo,
|
||||
struct archive_entry *entry,
|
||||
const char *meta_pathname,
|
||||
@ -341,14 +341,14 @@ process_contentident (RpmOstreeJigdoAssembler *self,
|
||||
return glnx_throw (error, "Malformed contentident: %s", meta_pathname);
|
||||
// g_autofree char *contentident_id_str = g_strndup (contentident_id_start, slash - contentident_id_start);
|
||||
|
||||
g_autoptr(GVariant) meta = jigdo_read_variant (RPMOSTREE_ROJIG_NEW_CONTENTIDENT_VARIANT_FORMAT,
|
||||
g_autoptr(GVariant) meta = rojig_read_variant (RPMOSTREE_ROJIG_NEW_CONTENTIDENT_VARIANT_FORMAT,
|
||||
self->archive, entry,
|
||||
cancellable, error);
|
||||
|
||||
|
||||
/* Read the content */
|
||||
// FIXME match contentident_id
|
||||
entry = jigdo_require_next_entry (self, cancellable, error);
|
||||
entry = rojig_require_next_entry (self, cancellable, error);
|
||||
if (!entry)
|
||||
return FALSE;
|
||||
|
||||
@ -435,9 +435,9 @@ process_contentident (RpmOstreeJigdoAssembler *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
state_transition (RpmOstreeJigdoAssembler *self,
|
||||
state_transition (RpmOstreeRojigAssembler *self,
|
||||
const char *pathname,
|
||||
JigdoAssemblerState new_state,
|
||||
RojigAssemblerState new_state,
|
||||
GError **error)
|
||||
{
|
||||
if (self->state > new_state)
|
||||
@ -448,7 +448,7 @@ state_transition (RpmOstreeJigdoAssembler *self,
|
||||
|
||||
/* Process new objects included in the rojigRPM */
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self,
|
||||
rpmostree_rojig_assembler_write_new_objects (RpmOstreeRojigAssembler *self,
|
||||
OstreeRepo *repo,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
@ -463,7 +463,7 @@ rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self,
|
||||
{
|
||||
gboolean eof;
|
||||
struct archive_entry *entry;
|
||||
if (!jigdo_next_entry (self, &eof, &entry, cancellable, error))
|
||||
if (!rojig_next_entry (self, &eof, &entry, cancellable, error))
|
||||
return FALSE;
|
||||
if (eof)
|
||||
break;
|
||||
@ -478,7 +478,7 @@ rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self,
|
||||
parse_checksum_from_pathname (pathname + strlen (RPMOSTREE_ROJIG_DIRMETA_DIR "/"), error);
|
||||
if (!checksum)
|
||||
return FALSE;
|
||||
g_autoptr(GVariant) dirmeta = jigdo_read_variant (OSTREE_DIRMETA_GVARIANT_FORMAT,
|
||||
g_autoptr(GVariant) dirmeta = rojig_read_variant (OSTREE_DIRMETA_GVARIANT_FORMAT,
|
||||
self->archive, entry,
|
||||
cancellable, error);
|
||||
g_autofree guint8*csum = NULL;
|
||||
@ -494,7 +494,7 @@ rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self,
|
||||
parse_checksum_from_pathname (pathname + strlen (RPMOSTREE_ROJIG_DIRTREE_DIR "/"), error);
|
||||
if (!checksum)
|
||||
return FALSE;
|
||||
g_autoptr(GVariant) dirtree = jigdo_read_variant (OSTREE_TREE_GVARIANT_FORMAT,
|
||||
g_autoptr(GVariant) dirtree = rojig_read_variant (OSTREE_TREE_GVARIANT_FORMAT,
|
||||
self->archive, entry,
|
||||
cancellable, error);
|
||||
g_autofree guint8*csum = NULL;
|
||||
@ -540,7 +540,7 @@ rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *self,
|
||||
}
|
||||
|
||||
GVariant *
|
||||
rpmostree_jigdo_assembler_get_xattr_table (RpmOstreeJigdoAssembler *self)
|
||||
rpmostree_rojig_assembler_get_xattr_table (RpmOstreeRojigAssembler *self)
|
||||
{
|
||||
g_assert (self->xattrs_table);
|
||||
return g_variant_ref (self->xattrs_table);
|
||||
@ -548,7 +548,7 @@ rpmostree_jigdo_assembler_get_xattr_table (RpmOstreeJigdoAssembler *self)
|
||||
|
||||
/* Loop over each package, returning its xattr set (as indexes into the xattr table) */
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
rpmostree_rojig_assembler_next_xattrs (RpmOstreeRojigAssembler *self,
|
||||
GVariant **out_objid_to_xattrs,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
@ -556,7 +556,7 @@ rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
/* If we haven't loaded the xattr string table, do so */
|
||||
if (self->state < STATE_XATTRS_TABLE)
|
||||
{
|
||||
struct archive_entry *entry = jigdo_require_next_entry (self, cancellable, error);
|
||||
struct archive_entry *entry = rojig_require_next_entry (self, cancellable, error);
|
||||
if (!entry)
|
||||
return FALSE;
|
||||
|
||||
@ -566,7 +566,7 @@ rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
if (!g_str_has_prefix (pathname, RPMOSTREE_ROJIG_XATTRS_TABLE))
|
||||
return glnx_throw (error, "Unexpected entry: %s", pathname);
|
||||
|
||||
g_autoptr(GVariant) xattrs_table = jigdo_read_variant (RPMOSTREE_ROJIG_XATTRS_TABLE_VARIANT_FORMAT,
|
||||
g_autoptr(GVariant) xattrs_table = rojig_read_variant (RPMOSTREE_ROJIG_XATTRS_TABLE_VARIANT_FORMAT,
|
||||
self->archive, entry, cancellable, error);
|
||||
if (!xattrs_table)
|
||||
return FALSE;
|
||||
@ -581,7 +581,7 @@ rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
/* Look for an xattr entry */
|
||||
gboolean eof;
|
||||
struct archive_entry *entry;
|
||||
if (!jigdo_next_entry (self, &eof, &entry, cancellable, error))
|
||||
if (!rojig_next_entry (self, &eof, &entry, cancellable, error))
|
||||
return FALSE;
|
||||
if (eof)
|
||||
return TRUE; /* 🔚 Early return */
|
||||
@ -595,14 +595,14 @@ rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
if (!g_str_has_prefix (pathname, RPMOSTREE_ROJIG_XATTRS_PKG_DIR "/"))
|
||||
return glnx_throw (error, "Unexpected entry: %s", pathname);
|
||||
// const char *nevra = pathname + strlen (RPMOSTREE_ROJIG_XATTRS_PKG_DIR "/");
|
||||
*out_objid_to_xattrs = jigdo_read_variant (RPMOSTREE_ROJIG_XATTRS_PKG_VARIANT_FORMAT,
|
||||
*out_objid_to_xattrs = rojig_read_variant (RPMOSTREE_ROJIG_XATTRS_PKG_VARIANT_FORMAT,
|
||||
self->archive, entry, cancellable, error);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Client side lookup for xattrs */
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_xattr_lookup (GVariant *xattr_table,
|
||||
rpmostree_rojig_assembler_xattr_lookup (GVariant *xattr_table,
|
||||
const char *path,
|
||||
GVariant *xattrs,
|
||||
GVariant **out_xattrs,
|
||||
@ -618,14 +618,14 @@ rpmostree_jigdo_assembler_xattr_lookup (GVariant *xattr_table,
|
||||
// "don't import"
|
||||
*out_xattrs = NULL;
|
||||
return TRUE;
|
||||
/* jigdodata->caught_error = TRUE; */
|
||||
/* return glnx_null_throw (&jigdodata->error, "Failed to find jigdo xattrs for path '%s'", path); */
|
||||
/* rojigdata->caught_error = TRUE; */
|
||||
/* return glnx_null_throw (&rojigdata->error, "Failed to find rojig xattrs for path '%s'", path); */
|
||||
}
|
||||
}
|
||||
guint xattr_idx;
|
||||
g_variant_get_child (xattrs, pos, "(&su)", NULL, &xattr_idx);
|
||||
if (xattr_idx >= g_variant_n_children (xattr_table))
|
||||
return glnx_throw (error, "Out of range jigdo xattr index %u for path '%s'", xattr_idx, path);
|
||||
return glnx_throw (error, "Out of range rojig xattr index %u for path '%s'", xattr_idx, path);
|
||||
*out_xattrs = g_variant_get_child_value (xattr_table, xattr_idx);
|
||||
return TRUE;
|
||||
}
|
@ -23,23 +23,23 @@
|
||||
#include "libglnx.h"
|
||||
#include "rpmostree-rojig-core.h"
|
||||
|
||||
typedef struct RpmOstreeJigdoAssembler RpmOstreeJigdoAssembler;
|
||||
typedef struct RpmOstreeRojigAssembler RpmOstreeRojigAssembler;
|
||||
|
||||
#define RPMOSTREE_TYPE_JIGDO_ASSEMBLER (rpmostree_jigdo_assembler_get_type ())
|
||||
#define RPMOSTREE_JIGDO_ASSEMBLER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), RPMOSTREE_TYPE_JIGDO_ASSEMBLER, RpmOstreeJigdoAssembler))
|
||||
#define RPMOSTREE_IS_JIGDO_ASSEMBLER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), RPMOSTREE_TYPE_JIGDO_ASSEMBLER))
|
||||
#define RPMOSTREE_TYPE_ROJIG_ASSEMBLER (rpmostree_rojig_assembler_get_type ())
|
||||
#define RPMOSTREE_ROJIG_ASSEMBLER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), RPMOSTREE_TYPE_ROJIG_ASSEMBLER, RpmOstreeRojigAssembler))
|
||||
#define RPMOSTREE_IS_ROJIG_ASSEMBLER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), RPMOSTREE_TYPE_ROJIG_ASSEMBLER))
|
||||
|
||||
GType rpmostree_jigdo_assembler_get_type (void);
|
||||
GType rpmostree_rojig_assembler_get_type (void);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RpmOstreeJigdoAssembler, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RpmOstreeRojigAssembler, g_object_unref)
|
||||
|
||||
RpmOstreeJigdoAssembler*
|
||||
rpmostree_jigdo_assembler_new_take_fd (int *fd,
|
||||
RpmOstreeRojigAssembler*
|
||||
rpmostree_rojig_assembler_new_take_fd (int *fd,
|
||||
DnfPackage *pkg, /* for metadata */
|
||||
GError **error);
|
||||
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *jigdo,
|
||||
rpmostree_rojig_assembler_read_meta (RpmOstreeRojigAssembler *rojig,
|
||||
char **out_checksum,
|
||||
GVariant **commit,
|
||||
GVariant **detached_meta,
|
||||
@ -47,22 +47,22 @@ rpmostree_jigdo_assembler_read_meta (RpmOstreeJigdoAssembler *jigdo,
|
||||
GError **error);
|
||||
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_write_new_objects (RpmOstreeJigdoAssembler *jigdo,
|
||||
rpmostree_rojig_assembler_write_new_objects (RpmOstreeRojigAssembler *rojig,
|
||||
OstreeRepo *repo,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
|
||||
GVariant * rpmostree_jigdo_assembler_get_xattr_table (RpmOstreeJigdoAssembler *self);
|
||||
GVariant * rpmostree_rojig_assembler_get_xattr_table (RpmOstreeRojigAssembler *self);
|
||||
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_next_xattrs (RpmOstreeJigdoAssembler *self,
|
||||
rpmostree_rojig_assembler_next_xattrs (RpmOstreeRojigAssembler *self,
|
||||
GVariant **out_objid_to_xattrs,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean
|
||||
rpmostree_jigdo_assembler_xattr_lookup (GVariant *xattr_table,
|
||||
rpmostree_rojig_assembler_xattr_lookup (GVariant *xattr_table,
|
||||
const char *path,
|
||||
GVariant *xattrs,
|
||||
GVariant **out_xattrs,
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include <gio/gunixinputstream.h>
|
||||
#include <gio/gunixoutputstream.h>
|
||||
#include "rpmostree-jigdo-assembler.h"
|
||||
#include "rpmostree-rojig-assembler.h"
|
||||
#include "rpmostree-core-private.h"
|
||||
#include "rpmostree-rpm-util.h"
|
||||
#include "rpmostree-output.h"
|
||||
@ -214,13 +214,13 @@ rpmostree_context_execute_rojig (RpmOstreeContext *self,
|
||||
if (!rpmostree_context_consume_package (self, oirpm_pkg, &oirpm_fd, error))
|
||||
return FALSE;
|
||||
|
||||
g_autoptr(RpmOstreeJigdoAssembler) jigdo = rpmostree_jigdo_assembler_new_take_fd (&oirpm_fd, oirpm_pkg, error);
|
||||
if (!jigdo)
|
||||
g_autoptr(RpmOstreeRojigAssembler) rojig = rpmostree_rojig_assembler_new_take_fd (&oirpm_fd, oirpm_pkg, error);
|
||||
if (!rojig)
|
||||
return FALSE;
|
||||
g_autofree char *checksum = NULL;
|
||||
g_autoptr(GVariant) commit = NULL;
|
||||
g_autoptr(GVariant) commit_meta = NULL;
|
||||
if (!rpmostree_jigdo_assembler_read_meta (jigdo, &checksum, &commit, &commit_meta,
|
||||
if (!rpmostree_rojig_assembler_read_meta (rojig, &checksum, &commit, &commit_meta,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
@ -247,7 +247,7 @@ rpmostree_context_execute_rojig (RpmOstreeContext *self,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!rpmostree_jigdo_assembler_write_new_objects (jigdo, repo, cancellable, error))
|
||||
if (!rpmostree_rojig_assembler_write_new_objects (rojig, repo, cancellable, error))
|
||||
return FALSE;
|
||||
|
||||
if (!ostree_repo_commit_transaction (repo, NULL, cancellable, error))
|
||||
@ -266,7 +266,7 @@ rpmostree_context_execute_rojig (RpmOstreeContext *self,
|
||||
{
|
||||
DnfPackage *pkg = pkgs_required->pdata[i];
|
||||
g_autoptr(GVariant) objid_to_xattrs = NULL;
|
||||
if (!rpmostree_jigdo_assembler_next_xattrs (jigdo, &objid_to_xattrs, cancellable, error))
|
||||
if (!rpmostree_rojig_assembler_next_xattrs (rojig, &objid_to_xattrs, cancellable, error))
|
||||
return FALSE;
|
||||
if (!objid_to_xattrs)
|
||||
return glnx_throw (error, "missing xattr entry: %s", dnf_package_get_name (pkg));
|
||||
@ -304,7 +304,7 @@ rpmostree_context_execute_rojig (RpmOstreeContext *self,
|
||||
/* Start the download and import, using the xattr data from the rojigRPM */
|
||||
if (!rpmostree_context_download (self, cancellable, error))
|
||||
return FALSE;
|
||||
g_autoptr(GVariant) xattr_table = rpmostree_jigdo_assembler_get_xattr_table (jigdo);
|
||||
g_autoptr(GVariant) xattr_table = rpmostree_rojig_assembler_get_xattr_table (rojig);
|
||||
if (!rpmostree_context_import_rojig (self, xattr_table, pkg_to_xattrs,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
|
@ -6,7 +6,7 @@ dn=$(cd $(dirname $0) && pwd)
|
||||
. ${dn}/libcomposetest.sh
|
||||
. ${dn}/../common/libtest.sh
|
||||
|
||||
prepare_compose_test "jigdo"
|
||||
prepare_compose_test "rojig"
|
||||
# Add a local rpm-md repo so we can mutate local test packages
|
||||
pyappendjsonmember "repos" '["test-repo"]'
|
||||
build_rpm test-pkg \
|
||||
@ -27,34 +27,34 @@ rpm-ostree --repo=${repobuild} db list ${treeref} test-pkg >test-pkg-list.txt
|
||||
assert_file_has_content test-pkg-list.txt 'test-pkg-1.0-1.x86_64'
|
||||
|
||||
rev=$(ostree --repo=${repobuild} rev-parse ${treeref})
|
||||
mkdir jigdo-output
|
||||
do_commit2jigdo() {
|
||||
mkdir rojig-output
|
||||
do_commit2rojig() {
|
||||
targetrev=$1
|
||||
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 .)
|
||||
rpm-ostree ex commit2rojig --repo=repo-build --pkgcache-repo cache/pkgcache-repo ${targetrev} $(pwd)/composedata/fedora-atomic-host-oirpm.spec $(pwd)/rojig-output
|
||||
(cd rojig-output && createrepo_c .)
|
||||
}
|
||||
do_commit2jigdo ${rev}
|
||||
find jigdo-output -name '*.rpm' | tee rpms.txt
|
||||
do_commit2rojig ${rev}
|
||||
find rojig-output -name '*.rpm' | tee rpms.txt
|
||||
assert_file_has_content rpms.txt 'fedora-atomic-host-42.0.*x86_64'
|
||||
|
||||
ostree --repo=jigdo-unpack-repo init --mode=bare-user
|
||||
echo 'fsync=false' >> jigdo-unpack-repo/config
|
||||
ostree --repo=rojig-unpack-repo init --mode=bare-user
|
||||
echo 'fsync=false' >> rojig-unpack-repo/config
|
||||
# Technically this isn't part of composedata but eh
|
||||
cat > composedata/jigdo-test.repo <<eof
|
||||
[jigdo-test]
|
||||
baseurl=file://$(pwd)/jigdo-output
|
||||
cat > composedata/rojig-test.repo <<eof
|
||||
[rojig-test]
|
||||
baseurl=file://$(pwd)/rojig-output
|
||||
enabled=1
|
||||
gpgcheck=0
|
||||
eof
|
||||
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
|
||||
rpm-ostree ex rojig2commit -d $(pwd)/composedata -e fedora-local -e test-repo -e rojig-test --repo=rojig-unpack-repo rojig-test:fedora-atomic-host | tee rojig2commit-out.txt
|
||||
}
|
||||
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}
|
||||
ostree --repo=jigdo-unpack-repo fsck
|
||||
ostree --repo=jigdo-unpack-repo refs > rojig-refs.txt
|
||||
# there will generally be pkgs not in the rojig set, but let's at least assert it's > 0
|
||||
assert_file_has_content rojig2commit-out.txt ${npkgs}/${npkgs}' packages to import'
|
||||
ostree --repo=rojig-unpack-repo rev-parse ${rev}
|
||||
ostree --repo=rojig-unpack-repo fsck
|
||||
ostree --repo=rojig-unpack-repo refs > rojig-refs.txt
|
||||
assert_file_has_content rojig-refs.txt 'rpmostree/rojig/test-pkg/1.0-1.x86__64'
|
||||
|
||||
echo "ok rojig ♲📦 fresh assembly"
|
||||
@ -76,9 +76,9 @@ newrev=$(ostree --repo=${repobuild} rev-parse ${treeref})
|
||||
rpm-ostree --repo=${repobuild} db list ${treeref} test-newpkg >test-newpkg-list.txt
|
||||
assert_file_has_content test-newpkg-list.txt 'test-newpkg-1.0-1.x86_64'
|
||||
|
||||
# Jigdo version 42.1
|
||||
do_commit2jigdo ${newrev}
|
||||
find jigdo-output -name '*.rpm' | tee rpms.txt
|
||||
# Rojig version 42.1
|
||||
do_commit2rojig ${newrev}
|
||||
find rojig-output -name '*.rpm' | tee rpms.txt
|
||||
assert_file_has_content rpms.txt 'fedora-atomic-host-42.1.*x86_64'
|
||||
path=$(head -1 rpms.txt)
|
||||
rpm -qp --requires ${path} > requires.txt
|
||||
@ -89,12 +89,12 @@ assert_file_has_content requires.txt 'test-pkg(.*) = 1.0-1'
|
||||
# And pull it; we should download the newer version by default
|
||||
do_rojig2commit
|
||||
# Now we should only download 2 packages
|
||||
assert_file_has_content jigdo2commit-out.txt '2/[1-9][0-9]* packages to import'
|
||||
assert_file_has_content rojig2commit-out.txt '2/[1-9][0-9]* packages to import'
|
||||
for x in ${origrev} ${newrev}; do
|
||||
ostree --repo=jigdo-unpack-repo rev-parse ${x}
|
||||
ostree --repo=rojig-unpack-repo rev-parse ${x}
|
||||
done
|
||||
ostree --repo=jigdo-unpack-repo fsck
|
||||
ostree --repo=jigdo-unpack-repo refs > rojig-refs.txt
|
||||
ostree --repo=rojig-unpack-repo fsck
|
||||
ostree --repo=rojig-unpack-repo refs > rojig-refs.txt
|
||||
# We should have both refs; GC will be handled by the sysroot upgrader
|
||||
# via deployments, same way it is for pkg layering.
|
||||
assert_file_has_content rojig-refs.txt 'rpmostree/rojig/test-pkg/1.0-1.x86__64'
|
||||
@ -106,11 +106,11 @@ echo "ok rojig ♲📦 update!"
|
||||
pysetjsonmember "documentation" 'True'
|
||||
runcompose --ex-unified-core --cachedir $(pwd)/cache --add-metadata-string version=42.2
|
||||
newrev=$(ostree --repo=${repobuild} rev-parse ${treeref})
|
||||
do_commit2jigdo ${newrev}
|
||||
find jigdo-output -name '*.rpm' | tee rpms.txt
|
||||
do_commit2rojig ${newrev}
|
||||
find rojig-output -name '*.rpm' | tee rpms.txt
|
||||
assert_file_has_content rpms.txt 'fedora-atomic-host-42.2.*x86_64'
|
||||
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
|
||||
assert_file_has_content rojig2commit-out.txt '[1-9][0-9]*/[1-9][0-9]* packages to import ([1-9][0-9]* changed)'
|
||||
ostree --repo=rojig-unpack-repo ls -R ${newrev} >/dev/null
|
||||
echo "ok rojig ♲📦 updated docs"
|
@ -5,9 +5,9 @@
|
||||
Name: fedora-atomic-host
|
||||
Version: %{ostree_version}
|
||||
Release: 1%{?dist}
|
||||
Summary: Image (rpm-ostree jigdo) for Fedora Atomic Host
|
||||
Summary: Image (rpm-ostree rojig) for Fedora Atomic Host
|
||||
License: MIT
|
||||
#@@@rpmostree_jigdo_meta@@@
|
||||
#@@@rpmostree_rojig_meta@@@
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
|
@ -41,7 +41,7 @@ vm_rpmostree rebase --experimental rojig://fahc:fedora-atomic-host
|
||||
vm_assert_status_jq '.deployments[0].origin|startswith("rojig://fahc:fedora-atomic-host")'
|
||||
vm_cmd ostree refs > refs.txt
|
||||
assert_file_has_content refs.txt '^rpmostree/rojig/kernel-core/'
|
||||
echo "ok jigdo client rebase "
|
||||
echo "ok rojig client rebase "
|
||||
|
||||
version=$(vm_get_deployment_info 0 version)
|
||||
version_major=$(echo ${version} | cut -f 1 -d '.')
|
||||
@ -52,9 +52,9 @@ vm_rpmostree deploy ${prev_version}
|
||||
vm_assert_status_jq '.deployments[0].origin|startswith("rojig://fahc:fedora-atomic-host")' \
|
||||
'.deployments[0].version == "'${prev_version}'"'
|
||||
|
||||
echo "ok jigdo client deploy"
|
||||
echo "ok rojig client deploy"
|
||||
|
||||
vm_cmd rpm-ostree status > status.txt
|
||||
assert_file_has_content_literal status.txt 'fahc:fedora-atomic-host-'${prev_version}'-1.fc27.x86_64'
|
||||
|
||||
echo "ok jigdo status"
|
||||
echo "ok rojig status"
|
Loading…
Reference in New Issue
Block a user