Drop all patches and fix bogus dates
This commit is contained in:
parent
70a8898860
commit
580f4db85f
@ -1,39 +0,0 @@
|
|||||||
From 677c80b7f9eb145d863f2735fb0e9ec96c3f2c49 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dusty Mabe <dusty@dustymabe.com>
|
|
||||||
Date: Fri, 19 Jan 2018 21:01:31 -0500
|
|
||||||
Subject: [PATCH] Revert "status: Prefix ostree refspecs with ostree://"
|
|
||||||
|
|
||||||
This reverts commit d99175f664983a9ae6f73a95568639fcd3568b34.
|
|
||||||
---
|
|
||||||
src/app/rpmostree-builtin-status.c | 2 +-
|
|
||||||
tests/check/test-basic.sh | 1 -
|
|
||||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/app/rpmostree-builtin-status.c b/src/app/rpmostree-builtin-status.c
|
|
||||||
index 282ef17..bbaa697 100644
|
|
||||||
--- a/src/app/rpmostree-builtin-status.c
|
|
||||||
+++ b/src/app/rpmostree-builtin-status.c
|
|
||||||
@@ -305,7 +305,7 @@ status_generic (RPMOSTreeSysroot *sysroot_proxy,
|
|
||||||
g_print ("%s ", is_booted ? libsd_special_glyph (BLACK_CIRCLE) : " ");
|
|
||||||
|
|
||||||
if (origin_refspec)
|
|
||||||
- g_print ("ostree://%s", origin_refspec);
|
|
||||||
+ g_print ("%s", origin_refspec);
|
|
||||||
else
|
|
||||||
g_print ("%s", checksum);
|
|
||||||
g_print ("\n");
|
|
||||||
diff --git a/tests/check/test-basic.sh b/tests/check/test-basic.sh
|
|
||||||
index d36441e..645c258 100755
|
|
||||||
--- a/tests/check/test-basic.sh
|
|
||||||
+++ b/tests/check/test-basic.sh
|
|
||||||
@@ -50,7 +50,6 @@ assert_status_jq '.deployments[0].version == "1.0.10"'
|
|
||||||
echo "ok status shows right version"
|
|
||||||
|
|
||||||
rpm-ostree status > status.txt
|
|
||||||
-assert_file_has_content status.txt ' ostree://testos:testos/buildmaster/x86_64-runtime'
|
|
||||||
assert_file_has_content status.txt 'Version: 1.0.10'
|
|
||||||
assert_not_file_has_content status.txt StateRoot:
|
|
||||||
rpm-ostree status -v > status.txt
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
From 00fab1ec2336ec35bd20caff43635e2032b24c2f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jlebon@redhat.com>
|
|
||||||
Date: Mon, 13 Nov 2017 03:09:00 +0000
|
|
||||||
Subject: [PATCH] compose CLI: fix --repo consuming two arguments
|
|
||||||
|
|
||||||
I was trying to figure out why:
|
|
||||||
|
|
||||||
rpm-ostree compose tree --repo repo/ manifest.json
|
|
||||||
|
|
||||||
would result in:
|
|
||||||
|
|
||||||
error: opendir(manifest.json): No such file or directory
|
|
||||||
|
|
||||||
It turned out to be because we had `--repo` in *both* the `install`
|
|
||||||
options and the `commit` options. This makes sense since both these
|
|
||||||
subcommands need to be given a repo. However, in the `tree` case, we
|
|
||||||
were adding both arrays, which meant we inherited two `GOptionEntry`s
|
|
||||||
for `--repo`. This confused glib2 which consumed not one but two CLI
|
|
||||||
arguments when looking for the argument associated with `--repo`.
|
|
||||||
|
|
||||||
Our CI didn't notice this because it uses the `--repo=foo` notation,
|
|
||||||
which doesn't throw off glib2.
|
|
||||||
|
|
||||||
Fix this by factoring out the `--repo` option into a separate array so
|
|
||||||
that in the `tree` case, it only gets added once. Exercise the fix in CI
|
|
||||||
by using the two argument notation for `--repo`.
|
|
||||||
|
|
||||||
Closes: #1101
|
|
||||||
Approved by: cgwalters
|
|
||||||
---
|
|
||||||
src/app/rpmostree-compose-builtin-tree.c | 14 ++++++++++++--
|
|
||||||
tests/compose-tests/libcomposetest.sh | 2 +-
|
|
||||||
2 files changed, 13 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c
|
|
||||||
index 9291e17..be66e62 100644
|
|
||||||
--- a/src/app/rpmostree-compose-builtin-tree.c
|
|
||||||
+++ b/src/app/rpmostree-compose-builtin-tree.c
|
|
||||||
@@ -58,13 +58,18 @@ static gboolean opt_dry_run;
|
|
||||||
static gboolean opt_print_only;
|
|
||||||
static char *opt_write_commitid_to;
|
|
||||||
|
|
||||||
+/* shared by both install & commit */
|
|
||||||
+static GOptionEntry common_option_entries[] = {
|
|
||||||
+ { "repo", 'r', 0, G_OPTION_ARG_STRING, &opt_repo, "Path to OSTree repository", "REPO" },
|
|
||||||
+ { NULL }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
static GOptionEntry install_option_entries[] = {
|
|
||||||
{ "force-nocache", 0, 0, G_OPTION_ARG_NONE, &opt_force_nocache, "Always create a new OSTree commit, even if nothing appears to have changed", NULL },
|
|
||||||
{ "cache-only", 0, 0, G_OPTION_ARG_NONE, &opt_cache_only, "Assume cache is present, do not attempt to update it", NULL },
|
|
||||||
{ "cachedir", 0, 0, G_OPTION_ARG_STRING, &opt_cachedir, "Cached state", "CACHEDIR" },
|
|
||||||
{ "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 },
|
|
||||||
- { "repo", 'r', 0, G_OPTION_ARG_STRING, &opt_repo, "Path to OSTree repository", "REPO" },
|
|
||||||
{ "output-repodata-dir", 0, 0, G_OPTION_ARG_STRING, &opt_output_repodata_dir, "Save downloaded repodata in DIR", "DIR" },
|
|
||||||
{ "print-only", 0, 0, G_OPTION_ARG_NONE, &opt_print_only, "Just expand any includes and print treefile", NULL },
|
|
||||||
{ "touch-if-changed", 0, 0, G_OPTION_ARG_STRING, &opt_touch_if_changed, "Update the modification time on FILE if a new commit was created", "FILE" },
|
|
||||||
@@ -80,7 +85,6 @@ static GOptionEntry postprocess_option_entries[] = {
|
|
||||||
static GOptionEntry commit_option_entries[] = {
|
|
||||||
{ "add-metadata-string", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_metadata_strings, "Append given key and value (in string format) to metadata", "KEY=VALUE" },
|
|
||||||
{ "add-metadata-from-json", 0, 0, G_OPTION_ARG_STRING, &opt_metadata_json, "Parse the given JSON file as object, convert to GVariant, append to OSTree commit", "JSON" },
|
|
||||||
- { "repo", 'r', 0, G_OPTION_ARG_STRING, &opt_repo, "Path to OSTree repository", "REPO" },
|
|
||||||
{ "write-commitid-to", 0, 0, G_OPTION_ARG_STRING, &opt_write_commitid_to, "File to write the composed commitid to instead of updating the ref", "FILE" },
|
|
||||||
{ NULL }
|
|
||||||
};
|
|
||||||
@@ -1066,6 +1070,8 @@ rpmostree_compose_builtin_install (int argc,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
g_autoptr(GOptionContext) context = g_option_context_new ("TREEFILE DESTDIR");
|
|
||||||
+ g_option_context_add_main_entries (context, common_option_entries, NULL);
|
|
||||||
+
|
|
||||||
if (!rpmostree_option_context_parse (context,
|
|
||||||
install_option_entries,
|
|
||||||
&argc, &argv,
|
|
||||||
@@ -1172,6 +1178,8 @@ rpmostree_compose_builtin_commit (int argc,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
g_autoptr(GOptionContext) context = g_option_context_new ("TREEFILE ROOTFS");
|
|
||||||
+ g_option_context_add_main_entries (context, common_option_entries, NULL);
|
|
||||||
+
|
|
||||||
if (!rpmostree_option_context_parse (context,
|
|
||||||
commit_option_entries,
|
|
||||||
&argc, &argv,
|
|
||||||
@@ -1214,8 +1222,10 @@ rpmostree_compose_builtin_tree (int argc,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
g_autoptr(GOptionContext) context = g_option_context_new ("TREEFILE");
|
|
||||||
+ g_option_context_add_main_entries (context, common_option_entries, NULL);
|
|
||||||
g_option_context_add_main_entries (context, install_option_entries, NULL);
|
|
||||||
g_option_context_add_main_entries (context, postprocess_option_entries, NULL);
|
|
||||||
+
|
|
||||||
if (!rpmostree_option_context_parse (context,
|
|
||||||
commit_option_entries,
|
|
||||||
&argc, &argv,
|
|
||||||
diff --git a/tests/compose-tests/libcomposetest.sh b/tests/compose-tests/libcomposetest.sh
|
|
||||||
index 94d9dc4..885b3cb 100644
|
|
||||||
--- a/tests/compose-tests/libcomposetest.sh
|
|
||||||
+++ b/tests/compose-tests/libcomposetest.sh
|
|
||||||
@@ -33,7 +33,7 @@ prepare_compose_test() {
|
|
||||||
export treeref=fedora/stable/x86_64/${name}
|
|
||||||
}
|
|
||||||
|
|
||||||
-compose_base_argv="--repo=${repobuild} --cache-only --cachedir=${test_compose_datadir}/cache"
|
|
||||||
+compose_base_argv="--repo ${repobuild} --cache-only --cachedir=${test_compose_datadir}/cache"
|
|
||||||
runcompose() {
|
|
||||||
rpm-ostree compose tree ${compose_base_argv} ${treefile} "$@"
|
|
||||||
ostree --repo=${repo} pull-local ${repobuild}
|
|
||||||
--
|
|
||||||
2.13.5
|
|
||||||
|
|
@ -1,119 +0,0 @@
|
|||||||
From b5c8915ea23fae4dc8a5844444f34c7a00141f42 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Colin Walters <walters@verbum.org>
|
|
||||||
Date: Wed, 22 Nov 2017 10:46:27 -0500
|
|
||||||
Subject: [PATCH] postprocess: Add envvar option, and detect NFS, skip ostree
|
|
||||||
txn
|
|
||||||
|
|
||||||
This is for: https://pagure.io/atomic-wg/issue/387
|
|
||||||
|
|
||||||
Right now the way libostree stages objects into `${repo}/tmp` is basically an
|
|
||||||
anti-pattern for (possibly concurrent) operations on NFS. Having multiple
|
|
||||||
processes try to clean the tmpdir invites races, and there's really no reason to
|
|
||||||
"stage" all of the content.
|
|
||||||
|
|
||||||
(Unfortunately unless NFS supports `O_TMPFILE` we still need temp files,
|
|
||||||
but that's a separate issue)
|
|
||||||
|
|
||||||
In this patch we auto-detect NFS which should make the Fedora pungi runs "just
|
|
||||||
work", but I also added an environment variable to opt-in.
|
|
||||||
|
|
||||||
Closes: #1111
|
|
||||||
Approved by: jlebon
|
|
||||||
---
|
|
||||||
src/libpriv/rpmostree-postprocess.c | 58 +++++++++++++++++++++++++++++--------
|
|
||||||
1 file changed, 46 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libpriv/rpmostree-postprocess.c b/src/libpriv/rpmostree-postprocess.c
|
|
||||||
index 03a22173..4827ebed 100644
|
|
||||||
--- a/src/libpriv/rpmostree-postprocess.c
|
|
||||||
+++ b/src/libpriv/rpmostree-postprocess.c
|
|
||||||
@@ -29,6 +29,10 @@
|
|
||||||
#include <utime.h>
|
|
||||||
#include <err.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#include <sys/statvfs.h>
|
|
||||||
+#include <sys/vfs.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+#include <linux/magic.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <grp.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
@@ -1872,6 +1876,17 @@ on_progress_timeout (gpointer datap)
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* https://pagure.io/atomic-wg/issue/387 */
|
|
||||||
+static gboolean
|
|
||||||
+repo_is_on_netfs (OstreeRepo *repo)
|
|
||||||
+{
|
|
||||||
+ int dfd = ostree_repo_get_dfd (repo);
|
|
||||||
+ struct statfs stbuf;
|
|
||||||
+ if (fstatfs (dfd, &stbuf) != 0)
|
|
||||||
+ return FALSE;
|
|
||||||
+ return stbuf.f_type == NFS_SUPER_MAGIC;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
gboolean
|
|
||||||
rpmostree_commit (int rootfs_fd,
|
|
||||||
OstreeRepo *repo,
|
|
||||||
@@ -1893,8 +1908,15 @@ rpmostree_commit (int rootfs_fd,
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
|
|
||||||
- return FALSE;
|
|
||||||
+ /* See comment above */
|
|
||||||
+ const gboolean use_txn = (getenv ("RPMOSTREE_COMMIT_NO_TXN") == NULL &&
|
|
||||||
+ !repo_is_on_netfs (repo));
|
|
||||||
+
|
|
||||||
+ if (use_txn)
|
|
||||||
+ {
|
|
||||||
+ if (!ostree_repo_prepare_transaction (repo, NULL, cancellable, error))
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
g_autoptr(OstreeMutableTree) mtree = ostree_mutable_tree_new ();
|
|
||||||
/* We may make this configurable if someone complains about including some
|
|
||||||
@@ -1986,17 +2008,29 @@ rpmostree_commit (int rootfs_fd,
|
|
||||||
return glnx_prefix_error (error, "While writing to '%s'", write_commitid_to);
|
|
||||||
}
|
|
||||||
else if (refname)
|
|
||||||
- ostree_repo_transaction_set_ref (repo, NULL, refname, new_revision);
|
|
||||||
-
|
|
||||||
- OstreeRepoTransactionStats stats = { 0, };
|
|
||||||
- if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error))
|
|
||||||
- return glnx_prefix_error (error, "Commit");
|
|
||||||
+ {
|
|
||||||
+ if (use_txn)
|
|
||||||
+ ostree_repo_transaction_set_ref (repo, NULL, refname, new_revision);
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ if (!ostree_repo_set_ref_immediate (repo, NULL, refname, new_revision,
|
|
||||||
+ cancellable, error))
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- g_print ("Metadata Total: %u\n", stats.metadata_objects_total);
|
|
||||||
- g_print ("Metadata Written: %u\n", stats.metadata_objects_written);
|
|
||||||
- g_print ("Content Total: %u\n", stats.content_objects_total);
|
|
||||||
- g_print ("Content Written: %u\n", stats.content_objects_written);
|
|
||||||
- g_print ("Content Bytes Written: %" G_GUINT64_FORMAT "\n", stats.content_bytes_written);
|
|
||||||
+ if (use_txn)
|
|
||||||
+ {
|
|
||||||
+ OstreeRepoTransactionStats stats = { 0, };
|
|
||||||
+ if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error))
|
|
||||||
+ return glnx_prefix_error (error, "Commit");
|
|
||||||
+
|
|
||||||
+ g_print ("Metadata Total: %u\n", stats.metadata_objects_total);
|
|
||||||
+ g_print ("Metadata Written: %u\n", stats.metadata_objects_written);
|
|
||||||
+ g_print ("Content Total: %u\n", stats.content_objects_total);
|
|
||||||
+ g_print ("Content Written: %u\n", stats.content_objects_written);
|
|
||||||
+ g_print ("Content Bytes Written: %" G_GUINT64_FORMAT "\n", stats.content_bytes_written);
|
|
||||||
+ }
|
|
||||||
if (out_new_revision)
|
|
||||||
*out_new_revision = g_steal_pointer (&new_revision);
|
|
||||||
return TRUE;
|
|
||||||
--
|
|
||||||
2.14.2
|
|
||||||
|
|
@ -8,8 +8,6 @@ Source0: rpm-ostree-%{version}.tar.xz
|
|||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/projectatomic/rpm-ostree
|
URL: https://github.com/projectatomic/rpm-ostree
|
||||||
|
|
||||||
Patch0: 0001-Revert-status-Prefix-ostree-refspecs-with-ostree.patch
|
|
||||||
|
|
||||||
# We always run autogen.sh
|
# We always run autogen.sh
|
||||||
BuildRequires: autoconf automake libtool git
|
BuildRequires: autoconf automake libtool git
|
||||||
# For docs
|
# For docs
|
||||||
@ -166,14 +164,14 @@ python autofiles.py > files.devel \
|
|||||||
* Mon Jan 15 2018 Colin Walters <walters@verbum.org> - 2018.1-1
|
* Mon Jan 15 2018 Colin Walters <walters@verbum.org> - 2018.1-1
|
||||||
- https://github.com/projectatomic/rpm-ostree/releases/tag/v2018.1
|
- https://github.com/projectatomic/rpm-ostree/releases/tag/v2018.1
|
||||||
|
|
||||||
* Tue Dec 04 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.11-1
|
* Tue Dec 05 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.11-1
|
||||||
- New upstream version
|
- New upstream version
|
||||||
|
|
||||||
* Wed Nov 22 2017 Colin Walters <walters@verbum.org> - 2017.10-3
|
* Wed Nov 22 2017 Colin Walters <walters@verbum.org> - 2017.10-3
|
||||||
- Backport patch for NFS issues
|
- Backport patch for NFS issues
|
||||||
- https://pagure.io/atomic-wg/issue/387
|
- https://pagure.io/atomic-wg/issue/387
|
||||||
|
|
||||||
* Sun Nov 14 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.10-2
|
* Sun Nov 12 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.10-2
|
||||||
- Backport fix for --repo handling
|
- Backport fix for --repo handling
|
||||||
https://github.com/projectatomic/rpm-ostree/pull/1101
|
https://github.com/projectatomic/rpm-ostree/pull/1101
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user