From 7e991d5e4305766dafc18ce1104678dd6e31b998 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 12:08:04 +0000 Subject: import rpm-ostree-2018.1-3.atomic.el7 --- diff --git a/.gitignore b/.gitignore index dbf48f0..1817019 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/bubblewrap-0.1.8.tar.xz -SOURCES/rpm-ostree-2017.11.tar.xz +SOURCES/bubblewrap-0.2.0.tar.xz +SOURCES/rpm-ostree-2018.1.tar.xz diff --git a/.rpm-ostree.metadata b/.rpm-ostree.metadata index d7d2755..1b32d5a 100644 --- a/.rpm-ostree.metadata +++ b/.rpm-ostree.metadata @@ -1,2 +1,2 @@ -dbb597b75848aa28daeaa7d4c933aadcb1a110dc SOURCES/bubblewrap-0.1.8.tar.xz -6c8722c9977bcc4d5605c6b6424dffb75a00e4aa SOURCES/rpm-ostree-2017.11.tar.xz +4524806db4d3d27e40c4874a7517a7debe6d9974 SOURCES/bubblewrap-0.2.0.tar.xz +fa352e44221e24f9d8024d9d9e94e2ebb17814c3 SOURCES/rpm-ostree-2018.1.tar.xz diff --git a/SOURCES/0001-postprocess-Special-case-NFS-state-files.patch b/SOURCES/0001-postprocess-Special-case-NFS-state-files.patch new file mode 100644 index 0000000..f2fc90c --- /dev/null +++ b/SOURCES/0001-postprocess-Special-case-NFS-state-files.patch @@ -0,0 +1,107 @@ +From 80c5811980c745c373351e52a85f3f847fe08d7b Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 5 Feb 2018 13:12:44 -0500 +Subject: [PATCH] postprocess: Special case NFS state files + +Currently in RHELAH 7.4, `systemctl start nfs` fails because we've dropped +`/var/lib/nfs/etab` at least: +https://bugzilla.redhat.com/show_bug.cgi?id=1427537 + +Things appear to work in Fedora 27 Atomic Host; there's been a lot of changes in +upstream nfs-utils in this area. I didn't fully try to analyze all of them, but +I am guessing it's +http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=8e98eed42b64aa388c09716e3276a53028a839bf +that made things work here. + +For now let's just special case these. I debated having it in a RHEL-only +build but I often do RHELAH treecomposes from my Fedora dev container, and +eh...I think let's ask the RHEL nfs-utils maintainer to backport the patches +to make this work, then we can drop our hack. + +Closes: #1229 +Approved by: jlebon +--- + src/libpriv/rpmostree-postprocess.c | 40 +++++++++++++++++++++++-------------- + 1 file changed, 25 insertions(+), 15 deletions(-) + +diff --git a/src/libpriv/rpmostree-postprocess.c b/src/libpriv/rpmostree-postprocess.c +index 7e9cde3d..71513134 100644 +--- a/src/libpriv/rpmostree-postprocess.c ++++ b/src/libpriv/rpmostree-postprocess.c +@@ -462,12 +462,20 @@ convert_var_to_tmpfiles_d_recurse (GOutputStream *tmpfiles_out, + case DT_LNK: + filetype_c = 'L'; + break; ++ case DT_REG: ++ /* nfs-utils in RHEL7; https://bugzilla.redhat.com/show_bug.cgi?id=1427537 */ ++ if (g_str_has_prefix (prefix->str, "/var/lib/nfs")) ++ { ++ filetype_c = 'f'; ++ break; ++ } ++ /* Fallthrough */ + default: ++ if (!glnx_unlinkat (dfd_iter.fd, dent->d_name, 0, error)) ++ return FALSE; + g_print ("Ignoring non-directory/non-symlink '%s/%s'\n", + prefix->str, + dent->d_name); +- if (!glnx_unlinkat (dfd_iter.fd, dent->d_name, 0, error)) +- return FALSE; + continue; + } + +@@ -478,7 +486,7 @@ convert_var_to_tmpfiles_d_recurse (GOutputStream *tmpfiles_out, + g_string_append_c (tmpfiles_d_buf, '/'); + g_string_append (tmpfiles_d_buf, dent->d_name); + +- if (filetype_c == 'd') ++ if (filetype_c == 'd' || filetype_c == 'f') + { + struct stat stbuf; + if (!glnx_fstatat (dfd_iter.fd, dent->d_name, &stbuf, AT_SYMLINK_NOFOLLOW, error)) +@@ -493,20 +501,20 @@ convert_var_to_tmpfiles_d_recurse (GOutputStream *tmpfiles_out, + return glnx_throw (error, "Failed to find group '%u' for %s", stbuf.st_gid, dent->d_name); + g_string_append_printf (tmpfiles_d_buf, " %s %s - -", user, group); + +- /* Push prefix */ +- g_string_append_c (prefix, '/'); +- g_string_append (prefix, dent->d_name); ++ if (filetype_c == 'd') ++ { ++ /* Push prefix */ ++ gsize prev_len = prefix->len; ++ g_string_append_c (prefix, '/'); ++ g_string_append (prefix, dent->d_name); + +- if (!convert_var_to_tmpfiles_d_recurse (tmpfiles_out, dfd, pwdb, prefix, +- cancellable, error)) +- return FALSE; ++ if (!convert_var_to_tmpfiles_d_recurse (tmpfiles_out, dfd, pwdb, prefix, ++ cancellable, error)) ++ return FALSE; + +- /* Pop prefix */ +- { +- char *r = memrchr (prefix->str, '/', prefix->len); +- g_assert (r != NULL); +- g_string_truncate (prefix, r - prefix->str); +- } ++ /* Pop prefix */ ++ g_string_truncate (prefix, prev_len); ++ } + } + else + { +@@ -538,6 +546,8 @@ convert_var_to_tmpfiles_d (int rootfs_dfd, + GCancellable *cancellable, + GError **error) + { ++ GLNX_AUTO_PREFIX_ERROR ("Converting /var to tmpfiles.d", error); ++ + g_autoptr(RpmOstreePasswdDB) pwdb = rpmostree_passwddb_open (rootfs_dfd, cancellable, error); + if (!pwdb) + return FALSE; +-- +2.14.3 + diff --git a/SPECS/rpm-ostree.spec b/SPECS/rpm-ostree.spec index 852a6d4..8010b3e 100644 --- a/SPECS/rpm-ostree.spec +++ b/SPECS/rpm-ostree.spec @@ -1,8 +1,8 @@ -%global bubblewrap_version 0.1.8 +%global bubblewrap_version 0.2.0 Summary: Client side upgrade program and server side compose tool Name: rpm-ostree -Version: 2017.11 -Release: 1.atomic%{?dist} +Version: 2018.1 +Release: 3.atomic%{?dist} #VCS: https://github.com/cgwalters/rpm-ostree # This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot" # because github doesn't support placing submodules in tarballs and RPM @@ -12,6 +12,8 @@ License: LGPLv2+ URL: https://github.com/projectatomic/rpm-ostree Source1: https://github.com/projectatomic/bubblewrap/releases/download/v%{bubblewrap_version}/bubblewrap-%{bubblewrap_version}.tar.xz +Patch0: 0001-postprocess-Special-case-NFS-state-files.patch + Requires: ostree-fuse # We always run autogen.sh @@ -22,7 +24,7 @@ BuildRequires: gtk-doc BuildRequires: gnome-common BuildRequires: /usr/bin/g-ir-scanner # Core requirements -BuildRequires: pkgconfig(ostree-1) >= 2017.14 +BuildRequires: pkgconfig(ostree-1) >= 2017.15 BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(rpm) @@ -126,6 +128,7 @@ python autofiles.py > files \ '%{_libdir}/%{name}' \ '%{_mandir}/man*/*' \ '%{_sysconfdir}/dbus-1/system.d/*' \ + '%{_sysconfdir}/rpm-ostreed.conf' \ '%{_prefix}/lib/systemd/system/*' \ '%{_libexecdir}/rpm-ostree*' \ '%{_datadir}/polkit-1/actions/*.policy' \ @@ -149,6 +152,17 @@ python autofiles.py > files.devel \ %files devel -f files.devel %changelog +* Wed Feb 21 2018 Jonathan Lebon - 2018.1-3.atomic +- Actually add NFS patch to spec file + +* Tue Feb 06 2018 Colin Walters - 2018.1-2.atomic +- Add patch for NFS state files +- Resolves: #1427537 + +* Thu Feb 01 2018 Jonathan Lebon - 2018.1-1.atomic +- New upstream release +- Resolves: #1536616 + * Tue Dec 05 2017 Jonathan Lebon - 2017.11-1.atomic - New upstream release - Resolves: #1518282