diff --git a/configure.ac b/configure.ac index 6102befaa9..f9c253a08a 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,6 @@ echo " $PACKAGE $VERSION introspection: $found_introspection - rojig: ${enable_rojig:-no} ASAN + UBSAN: ${enable_sanitizers:-no} gtk-doc: $enable_gtk_doc rust: $rust_debug_release diff --git a/rust/src/origin.rs b/rust/src/origin.rs index 9fe33831ef..9fe7eb0b33 100644 --- a/rust/src/origin.rs +++ b/rust/src/origin.rs @@ -15,7 +15,6 @@ use std::result::Result as StdResult; use std::collections::{BTreeMap, BTreeSet}; -const ROJIG_PREFIX: &str = "rojig://"; const ORIGIN: &str = "origin"; const OVERRIDE_COMMIT: &str = "override-commit"; @@ -23,7 +22,6 @@ const OVERRIDE_COMMIT: &str = "override-commit"; pub(crate) enum RefspecType { Checksum, Ostree, - Rojig, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -224,11 +222,7 @@ impl Origin { } pub(crate) fn get_prefixed_refspec(&self) -> String { - let val = self.cache.refspec.value.as_str(); - match self.cache.refspec.kind { - RefspecType::Rojig => format!("{}{}", ROJIG_PREFIX, val), - _ => val.to_string(), - } + self.cache.refspec.value.as_str().to_string() } pub(crate) fn get_custom_url(&self) -> Result { diff --git a/src/app/rpmostree-builtin-rebase.cxx b/src/app/rpmostree-builtin-rebase.cxx index cf475b9bd7..dec46c64cd 100644 --- a/src/app/rpmostree-builtin-rebase.cxx +++ b/src/app/rpmostree-builtin-rebase.cxx @@ -142,10 +142,8 @@ rpmostree_builtin_rebase (int argc, RpmOstreeRefspecType refspectype; if (!rpmostree_refspec_classify (new_provided_refspec, &refspectype, &remainder, error)) return FALSE; - if (!opt_experimental && refspectype == RPMOSTREE_REFSPEC_TYPE_ROJIG) - return glnx_throw (error, "rojig:// refspec requires --experimental"); - /* catch "ostree://" or "rojig://"; we'd error out much later in the daemon otherwise */ + /* catch "ostree://"; we'd error out much later in the daemon otherwise */ if (strlen (remainder) == 0) return glnx_throw (error, "Refspec is empty"); diff --git a/src/app/rpmostree-builtin-status.cxx b/src/app/rpmostree-builtin-status.cxx index 9a6b0e7658..5c057a35f1 100644 --- a/src/app/rpmostree-builtin-status.cxx +++ b/src/app/rpmostree-builtin-status.cxx @@ -652,8 +652,6 @@ print_one_deployment (RPMOSTreeSysroot *sysroot_proxy, g_print ("%s", canonrefspec); } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - g_assert_not_reached (); } } else diff --git a/src/app/rpmostree-compose-builtin-tree.cxx b/src/app/rpmostree-compose-builtin-tree.cxx index 2a075214da..7fec88089a 100644 --- a/src/app/rpmostree-compose-builtin-tree.cxx +++ b/src/app/rpmostree-compose-builtin-tree.cxx @@ -147,7 +147,6 @@ typedef struct { OstreeRepo *pkgcache_repo; /* unified mode: pkgcache repo where we import pkgs */ OstreeRepoDevInoCache *devino_cache; const char *ref; - char *rojig_spec; char *previous_checksum; std::optional> treefile_rs; @@ -295,8 +294,7 @@ install_packages (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 rojigSet build still requires the original RPMs too. + * we're doing unified core, in which case the pkgcache repo is the cache. */ if (opt_cachedir && !opt_unified_core) dnf_context_set_keep_cache (dnfctx, TRUE); @@ -448,9 +446,7 @@ install_packages (RpmOstreeTreeComposeContext *self, return FALSE; /* 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-rojig work. + * is the same thing done in rpmostree_context_commit(). */ g_autoptr(OstreeSePolicy) sepolicy = ostree_sepolicy_new_at (rootfs_dfd, cancellable, error); if (sepolicy == NULL) diff --git a/src/daemon/rpmostree-sysroot-core.cxx b/src/daemon/rpmostree-sysroot-core.cxx index 42cb7990e6..cb514dd2cb 100644 --- a/src/daemon/rpmostree-sysroot-core.cxx +++ b/src/daemon/rpmostree-sysroot-core.cxx @@ -109,7 +109,6 @@ generate_baselayer_refs (OstreeSysroot *sysroot, */ static gboolean add_package_refs_to_set (RpmOstreeRefSack *rsack, - gboolean is_rojig, GHashTable *referenced_pkgs, GCancellable *cancellable, GError **error) @@ -183,7 +182,7 @@ generate_pkgcache_refs (OstreeSysroot *sysroot, if (rsack == NULL) return FALSE; - if (!add_package_refs_to_set (rsack, FALSE, referenced_pkgs, cancellable, error)) + if (!add_package_refs_to_set (rsack, referenced_pkgs, cancellable, error)) return glnx_prefix_error (error, "Deployment index=%d", i); } @@ -211,20 +210,6 @@ generate_pkgcache_refs (OstreeSysroot *sysroot, n_freed++; } - /* Loop over rojig refs */ - g_autoptr(GHashTable) rojig_refs = NULL; - if (!ostree_repo_list_refs_ext (repo, "rpmostree/rojig", &rojig_refs, - OSTREE_REPO_LIST_REFS_EXT_NONE, cancellable, error)) - return FALSE; - GLNX_HASH_TABLE_FOREACH (rojig_refs, const char*, ref) - { - if (g_hash_table_contains (referenced_pkgs, ref)) - continue; - - ostree_repo_transaction_set_ref (repo, NULL, ref, NULL); - n_freed++; - } - *out_n_freed = n_freed; return TRUE; } diff --git a/src/daemon/rpmostree-sysroot-upgrader.cxx b/src/daemon/rpmostree-sysroot-upgrader.cxx index 5a48effb35..0803b92b34 100644 --- a/src/daemon/rpmostree-sysroot-upgrader.cxx +++ b/src/daemon/rpmostree-sysroot-upgrader.cxx @@ -52,7 +52,7 @@ * The #RpmOstreeSysrootUpgrader class models a `baserefspec` OSTree branch * in an origin file, along with a set of layered RPM packages. * - * It also supports the plain-ostree "refspec" model, as well as rojig://. + * It also supports the plain-ostree "refspec" model. */ typedef struct { GObjectClass parent_class; @@ -480,10 +480,6 @@ rpmostree_sysroot_upgrader_pull_base (RpmOstreeSysrootUpgrader *self, } } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - { - return glnx_throw (error, "rojig is not supported in this build of rpm-ostree"); - } } gboolean changed = !g_str_equal (new_base_rev, self->base_revision); diff --git a/src/daemon/rpmostreed-deployment-utils.cxx b/src/daemon/rpmostreed-deployment-utils.cxx index 3773cfc637..8d86794e80 100644 --- a/src/daemon/rpmostreed-deployment-utils.cxx +++ b/src/daemon/rpmostreed-deployment-utils.cxx @@ -337,9 +337,6 @@ rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, } } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - g_assert_not_reached (); - break; } if (refspec) @@ -807,17 +804,6 @@ rpmostreed_update_generate_variant (OstreeDeployment *booted_deployment, if (!rpmostree_refspec_classify (refspec, &refspectype, &refspec_data, error)) return FALSE; - /* we don't support rojig-based origins yet */ - switch (refspectype) - { - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - *out_update = NULL; - return TRUE; /* NB: early return */ - case RPMOSTREE_REFSPEC_TYPE_OSTREE: - case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: - break; - } - /* just skip over "ostree://" so we can talk with libostree without thinking about it */ refspec = refspec_data; } diff --git a/src/daemon/rpmostreed-transaction-types.cxx b/src/daemon/rpmostreed-transaction-types.cxx index 782ee38dc2..01ebbfde00 100644 --- a/src/daemon/rpmostreed-transaction-types.cxx +++ b/src/daemon/rpmostreed-transaction-types.cxx @@ -68,33 +68,6 @@ change_origin_refspec (GVariantDict *options, const char *current_refspecdata; rpmostree_origin_classify_refspec (origin, ¤t_refspectype, ¤t_refspecdata); - /* This function ideally would be split into ostree/rojig handling - * and we'd also do "partial" support for rojig so one could do e.g. - * `rpm-ostree rebase fedora-atomic-workstation` instead of - * `rpm-ostree rebase updates:fedora-atomic-workstation` etc. - */ - switch (refspectype) - { - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - { - if (!rpmostree_origin_set_rebase (origin, src_refspec, error)) - return FALSE; - - if (current_refspectype == RPMOSTREE_REFSPEC_TYPE_ROJIG - && strcmp (current_refspecdata, refspecdata) == 0) - return glnx_throw (error, "Old and new refs are equal: %s", src_refspec); - - if (out_old_refspec != NULL) - *out_old_refspec = g_strdup (current_refspecdata); - if (out_new_refspec != NULL) - *out_new_refspec = g_strdup (src_refspec); - return TRUE; - } - case RPMOSTREE_REFSPEC_TYPE_OSTREE: - case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: - break; - } - /* Now here we "peel" it since the rest of the code assumes libostree */ const char *refspec = refspecdata; @@ -211,9 +184,6 @@ apply_revision_override (RpmostreedTransaction *transaction, rpmostree_origin_set_override_commit (origin, checksum, version); } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - g_assert_not_reached (); - break; case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: g_assert_not_reached (); /* Handled above */ } @@ -233,11 +203,6 @@ apply_revision_override (RpmostreedTransaction *transaction, return FALSE; } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - /* For now we skip validation here, if there's an error we'll see it later - * on. - */ - break; case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: g_assert_not_reached (); /* Handled above */ } @@ -1073,9 +1038,6 @@ deploy_transaction_execute (RpmostreedTransaction *transaction, if (!rpmostree_refspec_classify (self->refspec, &refspectype, &ref, error)) return FALSE; - if (refspectype == RPMOSTREE_REFSPEC_TYPE_ROJIG) - return glnx_throw (error, "Local repo remotes not supported for rojig://"); - g_autoptr(OstreeRepo) local_repo_remote = ostree_repo_open_at (self->local_repo_remote_dfd, ".", cancellable, error); if (!local_repo_remote) @@ -1436,7 +1398,6 @@ deploy_transaction_execute (RpmostreedTransaction *transaction, return glnx_throw (error, "Refusing to download rpm-md for offline OS '%s'", self->osname); - /* XXX: in rojig mode we'll want to do this unconditionally */ g_autoptr(DnfSack) sack = NULL; if (g_hash_table_size (rpmostree_origin_get_packages (origin)) > 0) { diff --git a/src/libpriv/rpmostree-core.cxx b/src/libpriv/rpmostree-core.cxx index 3e2e436e58..0938cd3555 100644 --- a/src/libpriv/rpmostree-core.cxx +++ b/src/libpriv/rpmostree-core.cxx @@ -90,9 +90,6 @@ rpmostree_refspec_to_string (RpmOstreeRefspecType reftype, case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: prefix = RPMOSTREE_REFSPEC_OSTREE_PREFIX; break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - prefix = RPMOSTREE_REFSPEC_ROJIG_PREFIX; - break; } g_assert (prefix); return g_strconcat (prefix, data, NULL); @@ -2158,23 +2155,6 @@ rpmostree_context_get_packages (RpmOstreeContext *self) return g_ptr_array_ref (self->pkgs); } -/* Rather than doing a depsolve, directly set which packages - * are required. Will be used by rojig. - */ -gboolean -rpmostree_context_set_packages (RpmOstreeContext *self, - GPtrArray *packages, - GCancellable *cancellable, - GError **error) -{ - g_clear_pointer (&self->pkgs_to_download, (GDestroyNotify)g_ptr_array_unref); - g_clear_pointer (&self->pkgs_to_import, (GDestroyNotify)g_ptr_array_unref); - self->n_async_pkgs_imported = 0; - g_clear_pointer (&self->pkgs_to_relabel, (GDestroyNotify)g_ptr_array_unref); - self->n_async_pkgs_relabeled = 0; - return sort_packages (self, packages, cancellable, error); -} - /* Returns a reference to the set of packages that will be imported */ GPtrArray * rpmostree_context_get_packages_to_import (RpmOstreeContext *self) diff --git a/src/libpriv/rpmostree-core.h b/src/libpriv/rpmostree-core.h index b9a514df9f..1db1014cd8 100644 --- a/src/libpriv/rpmostree-core.h +++ b/src/libpriv/rpmostree-core.h @@ -59,17 +59,13 @@ G_DECLARE_FINAL_TYPE (RpmOstreeContext, rpmostree_context, RPMOSTREE, CONTEXT, G #define RPMOSTREE_TYPE_TREESPEC (rpmostree_treespec_get_type ()) G_DECLARE_FINAL_TYPE (RpmOstreeTreespec, rpmostree_treespec, RPMOSTREE, TREESPEC, GObject) -/* Now in the code we handle "refspec" types of rojig (rpm-ostree jigdo), - * in addition to ostree. - */ + typedef enum { RPMOSTREE_REFSPEC_TYPE_OSTREE, - RPMOSTREE_REFSPEC_TYPE_ROJIG, RPMOSTREE_REFSPEC_TYPE_CHECKSUM, } RpmOstreeRefspecType; #define RPMOSTREE_REFSPEC_OSTREE_PREFIX "ostree://" -#define RPMOSTREE_REFSPEC_ROJIG_PREFIX "rojig://" gboolean rpmostree_refspec_classify (const char *refspec, RpmOstreeRefspecType *out_type, @@ -165,12 +161,6 @@ gboolean rpmostree_context_prepare (RpmOstreeContext *self, GPtrArray *rpmostree_context_get_packages (RpmOstreeContext *self); -/* Alternative to _prepare() for non-depsolve cases like rojig */ -gboolean rpmostree_context_set_packages (RpmOstreeContext *self, - GPtrArray *packages, - GCancellable *cancellable, - GError **error); - GPtrArray *rpmostree_context_get_packages_to_import (RpmOstreeContext *self); void diff --git a/src/libpriv/rpmostree-origin.cxx b/src/libpriv/rpmostree-origin.cxx index 90a7447eb1..53ba5a2ddc 100644 --- a/src/libpriv/rpmostree-origin.cxx +++ b/src/libpriv/rpmostree-origin.cxx @@ -187,23 +187,13 @@ rpmostree_origin_get_refspec (RpmOstreeOrigin *origin) return origin->cached_refspec; } -/* For rojig:// refspecs, includes the prefix. */ char * rpmostree_origin_get_full_refspec (RpmOstreeOrigin *origin, RpmOstreeRefspecType *out_refspectype) { if (out_refspectype) *out_refspectype = origin->refspec_type; - switch (origin->refspec_type) - { - case RPMOSTREE_REFSPEC_TYPE_OSTREE: - case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: - return g_strdup (origin->cached_refspec); - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - return g_strconcat (RPMOSTREE_REFSPEC_ROJIG_PREFIX, origin->cached_refspec, NULL); - } - g_assert_not_reached (); - return NULL; + return g_strdup (origin->cached_refspec); } void @@ -530,9 +520,6 @@ rpmostree_origin_set_rebase_custom (RpmOstreeOrigin *origin, } } break; - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - g_assert_not_reached (); - break; } return TRUE; @@ -589,11 +576,6 @@ update_keyfile_pkgs_from_cache (RpmOstreeOrigin *origin, g_key_file_remove_key (origin->kf, "origin", "refspec", NULL); break; } - case RPMOSTREE_REFSPEC_TYPE_ROJIG: - /* Nothing to switch, since libostree already doesn't know how to - * handle rojig. - */ - break; } } }