2017.5-1 -- new upstream version

This commit is contained in:
Jonathan Lebon 2017-04-28 10:30:43 -04:00
parent f30773dcfb
commit c43bf439b0
4 changed files with 7 additions and 64 deletions

1
.gitignore vendored
View File

@ -47,3 +47,4 @@
/rpm-ostree-2017.2.tar.xz
/rpm-ostree-2017.3.tar.xz
/rpm-ostree-2017.4.tar.xz
/rpm-ostree-2017.5.tar.xz

View File

@ -1,59 +0,0 @@
From b21b08c7706eaf80b979094e9c9a080e090170e6 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 13 Apr 2017 17:07:53 -0400
Subject: [PATCH] app: Only call RegisterClient() if we're root
Otherwise we can't do e.g. `rpm-ostree status`.
Closes: https://github.com/projectatomic/rpm-ostree/issues/738
Closes: #739
Approved by: dustymabe
---
src/app/rpmostree-dbus-helpers.c | 15 ++++++++++-----
tests/vmcheck/test-layering-basic.sh | 3 +++
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/app/rpmostree-dbus-helpers.c b/src/app/rpmostree-dbus-helpers.c
index 32c2798..8dfeb5d 100644
--- a/src/app/rpmostree-dbus-helpers.c
+++ b/src/app/rpmostree-dbus-helpers.c
@@ -153,11 +153,16 @@ rpmostree_load_sysroot (gchar *sysroot,
if (sysroot_proxy == NULL)
return FALSE;
- /* This tells the daemon not to auto-exit as long as we are alive */
- if (!rpmostree_sysroot_call_register_client_sync (sysroot_proxy,
- g_variant_builder_end (options_builder),
- cancellable, error))
- return FALSE;
+ /* This tells the daemon not to auto-exit as long as we are alive; but we can
+ * only do this as root.
+ */
+ if (getuid () == 0)
+ {
+ if (!rpmostree_sysroot_call_register_client_sync (sysroot_proxy,
+ g_variant_builder_end (options_builder),
+ cancellable, error))
+ return FALSE;
+ }
*out_sysroot_proxy = g_steal_pointer (&sysroot_proxy);
*out_peer_pid = peer_pid; peer_pid = 0;
diff --git a/tests/vmcheck/test-layering-basic.sh b/tests/vmcheck/test-layering-basic.sh
index f57d4f6..e116e66 100755
--- a/tests/vmcheck/test-layering-basic.sh
+++ b/tests/vmcheck/test-layering-basic.sh
@@ -49,6 +49,9 @@ if vm_cmd "runuser -u bin rpm-ostree pkg-add foo-1.0"; then
assert_not_reached "Was able to install a package as non-root!"
fi
+# Assert that we can do status as non-root
+vm_cmd "runuser -u bin rpm-ostree status" >/dev/null
+
# Be sure an unprivileged user exists
if vm_rpmostree install test-opt-1.0 2>err.txt; then
assert_not_reached "Was able to install a package in /opt"
--
2.12.2

View File

@ -1,15 +1,13 @@
Summary: Hybrid image/package system
Name: rpm-ostree
Version: 2017.4
Release: 2%{?dist}
Version: 2017.5
Release: 1%{?dist}
#VCS: https://github.com/cgwalters/rpm-ostree
# This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot"
Source0: rpm-ostree-%{version}.tar.xz
License: LGPLv2+
URL: https://github.com/projectatomic/rpm-ostree
Patch0: 0001-app-Only-call-RegisterClient-if-we-re-root.patch
# We always run autogen.sh
BuildRequires: autoconf automake libtool git
# For docs
@ -132,6 +130,9 @@ python autofiles.py > files.devel \
%files devel -f files.devel
%changelog
* Fri Apr 28 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.5-1
- New upstream version
* Fri Apr 14 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.4-2
- Backport patch to allow unprivileged `rpm-ostree status`

View File

@ -1 +1 @@
SHA512 (rpm-ostree-2017.4.tar.xz) = 3d042de1d0dd1ca08db4d999267a1098d1810f6779abf5b18e61c13a8db7e4b86bc3c19f7e864825f1ed2f2d7850952816bc0fb70c16cdde94180bee98c39fe4
SHA512 (rpm-ostree-2017.5.tar.xz) = edc25afdfc4a6d1210732a3e1c06e660ac6dc765f9202ae6e9375403613fe8baddc233ff699eee2b9d2e13474677df459944f57aa0a647e8f38693b538ba24e0