diff --git a/.gitignore b/.gitignore index 0664170..e22f394 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rpm-ostree-2015.5.tar.xz +SOURCES/rpm-ostree-2015.11.tar.xz diff --git a/.rpm-ostree.metadata b/.rpm-ostree.metadata index 44e995a..7717aa6 100644 --- a/.rpm-ostree.metadata +++ b/.rpm-ostree.metadata @@ -1 +1 @@ -7cf8869f6d574a9d4602ad7266de7b43b74a37e3 SOURCES/rpm-ostree-2015.5.tar.xz +63b8258337d5f42cbfa5263c302f0074f47ba37b SOURCES/rpm-ostree-2015.11.tar.xz diff --git a/SOURCES/0001-postprocess-Handle-Fedora-rawhide-kernel-installatio.patch b/SOURCES/0001-postprocess-Handle-Fedora-rawhide-kernel-installatio.patch deleted file mode 100644 index 57294f6..0000000 --- a/SOURCES/0001-postprocess-Handle-Fedora-rawhide-kernel-installatio.patch +++ /dev/null @@ -1,156 +0,0 @@ -From 1c3a549ef9ebaecf9a0eab7515adddc594c78779 Mon Sep 17 00:00:00 2001 -From: Colin Walters -Date: Tue, 12 May 2015 12:26:38 -0400 -Subject: [PATCH] postprocess: Handle Fedora rawhide kernel installation - -The vmlinuz binary has moved to /usr/lib/modules, which is a change -mostly for the better, but we need to adapt. - -Closes: https://github.com/projectatomic/rpm-ostree/pull/143 ---- - src/libpriv/rpmostree-postprocess.c | 98 +++++++++++++++++++++++++++++++------ - 1 file changed, 84 insertions(+), 14 deletions(-) - -diff --git a/src/libpriv/rpmostree-postprocess.c b/src/libpriv/rpmostree-postprocess.c -index c690fe2..7b390f9 100644 ---- a/src/libpriv/rpmostree-postprocess.c -+++ b/src/libpriv/rpmostree-postprocess.c -@@ -168,7 +168,8 @@ find_kernel_and_initramfs_in_bootdir (GFile *bootdir, - - name = g_file_info_get_name (file_info); - -- if (g_str_has_prefix (name, "vmlinuz-")) -+ /* Current Fedora 23 kernel.spec installs as just vmlinuz */ -+ if (strcmp (name, "vmlinuz") == 0 || g_str_has_prefix (name, "vmlinuz-")) - { - if (ret_kernel) - { -@@ -192,17 +193,57 @@ find_kernel_and_initramfs_in_bootdir (GFile *bootdir, - } - } - -- if (!ret_kernel) -+ ret = TRUE; -+ gs_transfer_out_value (out_kernel, &ret_kernel); -+ gs_transfer_out_value (out_initramfs, &ret_initramfs); -+ out: -+ return ret; -+} -+ -+/* Given a directory @d, find the first child that is a directory, -+ * returning it in @out_subdir. If there are multiple directories, -+ * return an error. -+ */ -+static gboolean -+find_ensure_one_subdirectory (GFile *d, -+ GFile **out_subdir, -+ GCancellable *cancellable, -+ GError **error) -+{ -+ gboolean ret = FALSE; -+ gs_unref_object GFileEnumerator *direnum = NULL; -+ gs_unref_object GFile *ret_subdir = NULL; -+ -+ direnum = g_file_enumerate_children (d, "standard::name,standard::type", 0, -+ cancellable, error); -+ if (!direnum) -+ goto out; -+ -+ while (TRUE) - { -- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -- "Unable to find vmlinuz- in %s", -- gs_file_get_path_cached (bootdir)); -- goto out; -+ GFileInfo *file_info; -+ GFile *child; -+ -+ if (!gs_file_enumerator_iterate (direnum, &file_info, &child, -+ cancellable, error)) -+ goto out; -+ if (!file_info) -+ break; -+ -+ if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY) -+ { -+ if (ret_subdir) -+ { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "Multiple subdirectories found in: %s", gs_file_get_path_cached (d)); -+ goto out; -+ } -+ ret_subdir = g_object_ref (child); -+ } - } - - ret = TRUE; -- gs_transfer_out_value (out_kernel, &ret_kernel); -- gs_transfer_out_value (out_initramfs, &ret_initramfs); -+ gs_transfer_out_value (out_subdir, &ret_subdir); - out: - return ret; - } -@@ -220,14 +261,38 @@ do_kernel_prep (GFile *yumroot, - gs_unref_object GFile *initramfs_path = NULL; - const char *boot_checksum_str = NULL; - GChecksum *boot_checksum = NULL; -- const char *kname; -- const char *kver; -+ g_autofree char *kver = NULL; - - if (!find_kernel_and_initramfs_in_bootdir (bootdir, &kernel_path, - &initramfs_path, - cancellable, error)) - goto out; - -+ if (kernel_path == NULL) -+ { -+ gs_unref_object GFile *mod_dir = g_file_resolve_relative_path (yumroot, "usr/lib/modules"); -+ gs_unref_object GFile *modversion_dir = NULL; -+ -+ if (!find_ensure_one_subdirectory (mod_dir, &modversion_dir, cancellable, error)) -+ goto out; -+ -+ if (modversion_dir) -+ { -+ kver = g_file_get_basename (modversion_dir); -+ if (!find_kernel_and_initramfs_in_bootdir (modversion_dir, &kernel_path, -+ &initramfs_path, -+ cancellable, error)) -+ goto out; -+ } -+ } -+ -+ if (kernel_path == NULL) -+ { -+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, -+ "Unable to find kernel (vmlinuz) in /boot or /usr/lib/modules"); -+ goto out; -+ } -+ - if (initramfs_path) - { - g_print ("Removing RPM-generated '%s'\n", -@@ -236,10 +301,15 @@ do_kernel_prep (GFile *yumroot, - goto out; - } - -- kname = gs_file_get_basename_cached (kernel_path); -- kver = strchr (kname, '-'); -- g_assert (kver); -- kver += 1; -+ if (!kver) -+ { -+ const char *kname = gs_file_get_basename_cached (kernel_path); -+ const char *kver_p; -+ -+ kver_p = strchr (kname, '-'); -+ g_assert (kver_p); -+ kver = g_strdup (kver_p + 1); -+ } - - /* OSTree needs to own this */ - { --- -1.8.3.1 - diff --git a/SPECS/rpm-ostree.spec b/SPECS/rpm-ostree.spec index 588fba4..8dddac1 100644 --- a/SPECS/rpm-ostree.spec +++ b/SPECS/rpm-ostree.spec @@ -1,13 +1,12 @@ Summary: Client side upgrade program and server side compose tool Name: rpm-ostree -Version: 2015.5 +Version: 2015.11 Release: 2.atomic%{?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 -Patch0: 0001-postprocess-Handle-Fedora-rawhide-kernel-installatio.patch License: LGPLv2+ -URL: https://github.com/cgwalters/rpm-ostree +URL: https://github.com/projectatomic/rpm-ostree BuildRequires: git # We always run autogen.sh BuildRequires: autoconf automake libtool @@ -19,11 +18,11 @@ BuildRequires: pkgconfig(libgsystem) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(hawkey) >= 0.5.0 BuildRequires: pkgconfig(libhif) +BuildRequires: pkgconfig(hawkey) BuildRequires: pkgconfig(rpm) BuildRequires: libcap-devel +BuildRequires: libattr-devel -#Technically it is required only for treecompose -#Requires: /usr/bin/yum Requires: ostree >= 2014.7 %description @@ -51,23 +50,63 @@ make %{?_smp_mflags} make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c" find $RPM_BUILD_ROOT -name '*.la' -delete -%files +# I try to do continuous delivery via rpmdistro-gitoverlay while +# reusing the existing spec files. Currently RPM only supports +# mandatory file entries. What this is doing is making each file +# entry optional - if it exists it will be picked up. That +# way the same spec file works more easily across multiple versions where e.g. an +# older version might not have a systemd unit file. +cat > autofiles.py < 0: + sys.stderr.write('{0} matched {1} files\n'.format(line, len(files))) + sys.stdout.write(line + '\n') + else: + sys.stderr.write('{0} did not match any files\n'.format(line)) +EOF +python autofiles.py > files \ + '%{_bindir}/*' \ + '%{_libdir}/%{name}' \ + '%{_libdir}/*.so.*' \ + '%{_mandir}/man*/*' \ + '%{_libdir}/girepository-1.0/*.typelib' \ + '%{_sysconfdir}/dbus-1/system.d/*' \ + '%{_prefix}/lib/systemd/system/*' \ + '%{_libexecdir}/rpm-ostree*' \ + '%{_datadir}/dbus-1/system-services' +python autofiles.py > files.devel \ + '%{_libdir}/lib*.so' \ + '%{_includedir}/*' \ + '%{_libdir}/pkgconfig/*' \ + '%{_datadir}/gtk-doc/html/*' \ + '%{_datadir}/gir-1.0/*-1.0.gir' + +%files -f files %doc COPYING README.md -%{_bindir}/rpm-ostree -%{_libdir}/%{name}/ -%{_mandir}/man1/*.gz -%{_libdir}/*.so.1* -%{_libdir}/girepository-1.0/*.typelib - -%files devel -%{_libdir}/lib*.so -%{_includedir}/* -%{_libdir}/pkgconfig/* -%dir %{_datadir}/gtk-doc/html/* -%{_datadir}/gtk-doc/html/* -%{_datadir}/gir-1.0/*-1.0.gir + +%files devel -f files.devel %changelog +* Tue Jan 12 2016 Colin Walters - 2015.11-2.atomic +- New upstream version + Resolves: #1291841 + Resolves: #1274070 + +* Tue Oct 06 2015 Colin Walters - 2015.9-2.atomic +- New upstream version + +* Fri Sep 25 2015 Colin Walters - 2015.5-3.atomic +- Rebuild + * Mon May 18 2015 Colin Walters - 2015.5-2.atomic - Rebuild against latest libhif