Bug 1473701 - [PATCH] Enable introspection, rename shared lib to librpmostree
[PATCH] Enable introspection, rename shared lib to librpmostree
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: rpm-ostree (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Colin Walters
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-21 09:00 EDT by Colin Walters
Modified: 2017-07-21 12:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-21 11:56:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Colin Walters 2017-07-21 09:00:52 EDT
From 9d6ac34da3b5608e5b8267f99929641c9637a290 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 21 Jul 2017 08:52:02 -0400
Subject: [PATCH] Enable introspection, rename shared lib to librpmostree

Due to an oversight, we were not actually building with introspection. Fix that.
And while we are here, split out a shared library package, so that e.g.
containers can do `from gi.repository import RpmOstree` without dragging in the
systemd service, etc.
---
 rpm-ostree.spec | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

diff --git a/rpm-ostree.spec b/rpm-ostree.spec
index f324ae6..bb49a1d 100644
--- a/rpm-ostree.spec
+++ b/rpm-ostree.spec
@@ -1,7 +1,7 @@
 Summary: Hybrid image/package system
 Name: rpm-ostree
 Version: 2017.7
-Release: 1%{?dist}
+Release: 2%{?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
@@ -15,7 +15,7 @@ BuildRequires: chrpath
 BuildRequires: gtk-doc
 BuildRequires: gperf
 BuildRequires: gnome-common
-BuildRequires: gobject-introspection
+BuildRequires: /usr/bin/g-ir-scanner
 # Core requirements
 BuildRequires: pkgconfig(ostree-1) >= 2017.6
 BuildRequires: pkgconfig(polkit-gobject-1)
@@ -68,13 +68,22 @@ Additionally, unlike many "pure" image systems, with rpm-ostree
 each client system can layer on additional packages, providing
 a "best of both worlds" approach.
 
-%package devel
+%package -n librpmostree
+Summary: Shared library for rpm-ostree
+Group: Development/Libraries
+
+%description -n librpmostree
+The librpmostree package includes the shared library for %{name}.
+
+# Renamed to librpmostree in 2017.7-2
+%package -n librpmostree-devel
 Summary: Development headers for %{name}
 Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: librpmostree = %{version}-%{release}
+Obsoletes: %{name}-devel < 2017.7-2
 
-%description devel
-The %{name}-devel package includes the header files for the %{name} library.
+%description -n librpmostree-devel
+The librpmostree-devel package includes the header files for librpmostree.
 
 %prep
 %autosetup -Sgit -n %{name}-%{version}
@@ -114,14 +123,17 @@ 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}/polkit-1/actions/*.policy' \
   '%{_datadir}/dbus-1/system-services'
+
+python autofiles.py > files.lib \
+  '%{_libdir}/*.so.*' \
+  '%{_libdir}/girepository-1.0/*.typelib'
+
 python autofiles.py > files.devel \
   '%{_libdir}/lib*.so' \
   '%{_includedir}/*' \
@@ -133,9 +145,18 @@ python autofiles.py > files.devel \
 %files -f files
 %doc COPYING README.md
 
-%files devel -f files.devel
+%files -n librpmostree -f files.lib
+
+%files -n librpmostree-devel -f files.devel
 
 %changelog
+* Fri Jul 21 2017 Colin Walters <walters@verbum.org> - 2017.7-2
+- Enable introspection, rename shared lib to librpmostree
+  Due to an oversight, we were not actually building with introspection.
+  Fix that.  And while we are here, split out a shared library package,
+  so that e.g. containers can do `from gi.repository import RpmOstree`
+  without dragging in the systemd service, etc.
+
 * Mon Jul 10 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.7-1
 - New upstream version
 
-- 
2.13.2
Comment 1 Colin Walters 2017-07-21 09:01:45 EDT
See https://github.com/projectatomic/rpm-ostree/pull/877
Comment 3 Jonathan Lebon 2017-07-21 12:20:24 EDT
How about a slight naming tweak?

From 0cf999b064d563926eb0da0b04d61d9e31dcbd5d Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jlebon@redhat.com>
Date: Fri, 21 Jul 2017 09:17:27 -0700
Subject: [PATCH] 2017.7-3: rename libs pkg to rpm-ostree-libs

Tweak new pkg name to rpm-ostree-libs to be more consistent with the
main package name and ostree's ostree-libs.
---
 rpm-ostree.spec | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/rpm-ostree.spec b/rpm-ostree.spec
index bb49a1d..b5a3b1e 100644
--- a/rpm-ostree.spec
+++ b/rpm-ostree.spec
@@ -1,7 +1,7 @@
 Summary: Hybrid image/package system
 Name: rpm-ostree
 Version: 2017.7
-Release: 2%{?dist}
+Release: 3%{?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
@@ -68,22 +68,20 @@ Additionally, unlike many "pure" image systems, with rpm-ostree
 each client system can layer on additional packages, providing
 a "best of both worlds" approach.

-%package -n librpmostree
+%package libs
 Summary: Shared library for rpm-ostree
 Group: Development/Libraries

-%description -n librpmostree
-The librpmostree package includes the shared library for %{name}.
+%description libs
+The %{name}-libs package includes the shared library for %{name}.

-# Renamed to librpmostree in 2017.7-2
-%package -n librpmostree-devel
+%package devel
 Summary: Development headers for %{name}
 Group: Development/Libraries
-Requires: librpmostree = %{version}-%{release}
-Obsoletes: %{name}-devel < 2017.7-2
+Requires: %{name}-libs = %{version}-%{release}

-%description -n librpmostree-devel
-The librpmostree-devel package includes the header files for librpmostree.
+%description devel
+The %{name}-devel package includes the header files for %{name}-libs.

 %prep
 %autosetup -Sgit -n %{name}-%{version}
@@ -145,17 +143,21 @@ python autofiles.py > files.devel \
 %files -f files
 %doc COPYING README.md

-%files -n librpmostree -f files.lib
+%files libs -f files.lib

-%files -n librpmostree-devel -f files.devel
+%files devel -f files.devel

 %changelog
+* Fri Jul 21 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.7-3
+- Tweak new pkg name to rpm-ostree-libs to be more consistent with the main
+  package name and ostree's ostree-libs.
+
 * Fri Jul 21 2017 Colin Walters <walters@verbum.org> - 2017.7-2
 - Enable introspection, rename shared lib to librpmostree
   Due to an oversight, we were not actually building with introspection.
   Fix that.  And while we are here, split out a shared library package,
   so that e.g. containers can do `from gi.repository import RpmOstree`
-  without dragging in the systemd service, etc.
+  without dragging in the systemd service, etc. (RHBZ#1473701)

 * Mon Jul 10 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.7-1
 - New upstream version
--
2.13.2
Comment 4 Colin Walters 2017-07-21 12:51:37 EDT
LGTM.

Note You need to log in before you can comment on or make changes to this bug.