%global bubblewrap_version 0.2.0
Summary: Client side upgrade program and server side compose tool
Name: rpm-ostree
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
# doesn't understand git.
Source0: rpm-ostree-%{version}.tar.xz
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
BuildRequires: autoconf automake libtool git
# For docs
BuildRequires: chrpath
BuildRequires: gtk-doc
BuildRequires: gnome-common
BuildRequires: /usr/bin/g-ir-scanner
# Core requirements
BuildRequires: pkgconfig(ostree-1) >= 2017.15
BuildRequires: pkgconfig(polkit-gobject-1)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(rpm)
BuildRequires: pkgconfig(libarchive)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: gperf
BuildRequires: libcap-devel
BuildRequires: libattr-devel
# We currently interact directly with librepo
BuildRequires: pkgconfig(librepo)
# libdnf bundling
# We're using RPATH to pick up our bundled version
%global __requires_exclude ^libdnf[.]so[.].*$
# Our bundled libdnf.so.1 is for us only
%global __provides_exclude_from ^%{_libdir}/%{name}/.*$
BuildRequires: cmake
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(check)
BuildRequires: python-devel
BuildRequires: python-sphinx
%if (0%{?rhel} != 0 && 0%{?rhel} <= 7)
BuildRequires: libsolv-devel
%else
BuildRequires: pkgconfig(libsolv)
%endif
# explicit requires since we don't version symbols
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
This tool binds together the world of RPM packages with the OSTree
model of bootable filesystem trees. It provides commands usable both
on client systems as well as server-side composes.
%package libs
Summary: Shared library for rpm-ostree
Group: Development/Libraries
%description libs
The %{name}-libs package includes the shared library for %{name}.
%package devel
Summary: Development headers for %{name}
Group: Development/Libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package includes the header files for %{name}-libs.
%prep
%autosetup -Sgit -n %{name}-%{version}
tar xf %{SOURCE1}
%build
(cd bubblewrap-%{bubblewrap_version} &&
if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi &&
%configure --disable-silent-rules
make %{?_smp_mflags}
)
env NOCONFIGURE=1 ./autogen.sh
%configure --disable-silent-rules --enable-gtk-doc --with-bubblewrap=%{_libdir}/rpm-ostree/bwrap
make %{?_smp_mflags}
%install
(cd bubblewrap-%{bubblewrap_version} &&
install -d -m 0755 $RPM_BUILD_ROOT/%{_libdir}/rpm-ostree
install -m 0755 bwrap $RPM_BUILD_ROOT/%{_libdir}/rpm-ostree
)
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c"
find $RPM_BUILD_ROOT -name '*.la' -delete
# 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 <<EOF
#!/usr/bin/python
import os,sys,glob
os.chdir(os.environ['RPM_BUILD_ROOT'])
for line in sys.argv[1:]:
if line == '':
break
if line[0] != '/':
sys.stdout.write(line + '\n')
else:
files = glob.glob(line[1:])
if len(files) > 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}' \
'%{_mandir}/man*/*' \
'%{_sysconfdir}/dbus-1/system.d/*' \
'%{_sysconfdir}/rpm-ostreed.conf' \
'%{_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}/*' \
'%{_datadir}/dbus-1/interfaces/org.projectatomic.rpmostree1.xml' \
'%{_libdir}/pkgconfig/*' \
'%{_datadir}/gtk-doc/html/*' \
'%{_datadir}/gir-1.0/*-1.0.gir'
%files -f files
%doc COPYING README.md
%files libs -f files.lib
%files devel -f files.devel
%changelog
* Wed Feb 21 2018 Jonathan Lebon <jlebon@redhat.com> - 2018.1-3.atomic
- Actually add NFS patch to spec file
* Tue Feb 06 2018 Colin Walters <walters@redhat.com> - 2018.1-2.atomic
- Add patch for NFS state files
- Resolves: #1427537
* Thu Feb 01 2018 Jonathan Lebon <jlebon@redhat.com> - 2018.1-1.atomic
- New upstream release
- Resolves: #1536616
* Tue Dec 05 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.11-1.atomic
- New upstream release
- Resolves: #1518282
* Tue Sep 26 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.9-2.atomic
- Add explicit req on -libs subpackage
* Mon Sep 25 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.9-1.atomic
- New upstream release
- Resolves: #1494120
* Tue Aug 08 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.6-4.atomic
- Backport fix to allow rollback more than once
- Resolves: #1478083
* Fri Jul 07 2017 Colin Walters <walters@redhat.com> - 2017.6-3.atomic
- Backport patch to fix metadata-only repos
* Thu Jun 15 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.6-2.atomic
- Backport patch to fix SELinux workaround for policy move to /var
- Backport patch to fix /var/run potentially being a directory
* Fri Jun 02 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.6-1.atomic
- New upstream release
- Resolves: #1457964
* Tue May 02 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.5-1.atomic
- New upstream release
- Resolves: #1447070
* Tue Mar 21 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.3-2.atomic
- Add BR on gobject-introspection-devel.
* Fri Mar 17 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.3-1.atomic
- New upstream release
- Resolves: #1433392
* Tue Feb 14 2017 Colin Walters <walters@verbum.org> - 2017.1-5.atomic
- Add patch to do GPG checking before importing/installing RPMs
- Resolves: #1422157
* Tue Feb 14 2017 Colin Walters <walters@verbum.org> - 2017.1-4.atomic
- Backport patch for unconfigured-state handling
- Resolves: #1421867
* Mon Feb 13 2017 Jonathan Lebon <jlebon@redhat.com> - 2017.1-3.atomic
- Resolves: #1421781
* Tue Jan 24 2017 Colin Walters <walters@verbum.org> - 2017.1-2.atomic
- New upstream version
Resolves: #1416089
- Bump bubblewrap to latest release too
* Mon Dec 12 2016 walters@redhat.com - 2016.13-1.atomic
- New upstream version
- Resolves: #1403933
* Mon Oct 24 2016 Colin Walters <walters@redhat.com>
- New upstream version
* Thu Sep 08 2016 walters@redhat.com - 2016.10-1
- New upstream version
* Mon Jul 25 2016 Colin Walters <walters@redhat.com> - 2016.5-1.atomic
- New upstream version
* Fri Jul 08 2016 Colin Walters <walters@redhat.com> - 2016.4-2.atomic
- New upstream version
* Tue Jun 14 2016 Colin Walters <walters@redhat.com> - 2016.3-3.atomic
- New upstream version
* Tue Apr 19 2016 Colin Walters <walters@redhat.com> - 2016.1-2.atomic
- New upstream version
* Tue Jan 12 2016 Colin Walters <walters@redhat.com> - 2015.11-2.atomic
- New upstream version
Resolves: #1291841
Resolves: #1274070
* Tue Oct 06 2015 Colin Walters <walters@redhat.com> - 2015.9-2.atomic
- New upstream version
* Fri Sep 25 2015 Colin Walters <walters@redhat.com> - 2015.5-3.atomic
- Rebuild
* Mon May 18 2015 Colin Walters <walters@redhat.com> - 2015.5-2.atomic
- Rebuild against latest libhif
* Fri May 15 2015 Colin Walters <walters@redhat.com> - 2015.5-1.atomic
- Rebase to Fedora rawhide
* Wed May 13 2015 Colin Walters <walters@redhat.com> - 2015.3-4.atomic
- Drop /usr/bin/atomic like we did for -client; this fixes installing
with the new atomic package.
* Fri Apr 17 2015 Colin Walters <walters@redhat.com> - 2015.3-3.atomic
- Backport client side GPG verification status patches
* Fri Jan 23 2015 Colin Walters <walters@redhat.com> - 2015.3-2.atomic
- New upstream release
* Fri Jan 09 2015 Colin Walters <walters@redhat.com> - 2015.2-2.atomic
- New upstream release
* Fri Dec 19 2014 Colin Walters <walters@redhat.com> - 2014.114-2.atomic
- Rebuild for 7.1
* Fri Dec 05 2014 Colin Walters <walters@redhat.com> - 2014.114-1.atomic
- New upstream release
* Thu Nov 20 2014 Colin Walters <walters@redhat.com> - 2014.111-2.atomic
- New upstream release
* Fri Oct 24 2014 Colin Walters <walters@redhat.com> - 2014.109-1.atomic
- New upstream release
* Thu Oct 16 2014 Colin Walters <walters@redhat.com>
- New upstream version
* Tue Oct 07 2014 Colin Walters <walters@redhat.com> - 2014.107-2.atomic
- New upstream version
* Mon Sep 29 2014 Colin Walters <walters@redhat.com> - 2014.106-4.atomic
- rebuilt
* Mon Sep 29 2014 Colin Walters <walters@redhat.com> - 2014.106-3.atomic
- rebuilt
* Tue Sep 09 2014 Colin Walters <walters@redhat.com> - 2014.106-2.atomic
- New upstream release
- BR/R OSTree 2014.6
* Fri Aug 08 2014 Colin Walters <walters@redhat.com> - 2014.105-2.atomic
- New upstream release
* Mon Jul 14 2014 Colin Walters <walters@redhat.com>
- New upstream version
* Fri May 23 2014 Colin Walters <walters@redhat.com>
- Previous autobuilder code is split off into rpm-ostree-toolbox
* Sat Mar 22 2014 Colin Walters <walters@verbum.org> - 2014.6.3.g5707fa7-1
- New git snapshot, add rpm-ostree-sign to file list
* Sat Mar 22 2014 Colin Walters <walters@verbum.org> - 2014.6-1
- New upstream version
* Fri Mar 07 2014 Colin Walters <walters@verbum.org> - 2014.5-1
- Initial package