Blame SPECS/flatpak.spec

778716
%global ostree_version 2017.2
778716
778716
Name:           flatpak
12d9a6
Version:        0.8.8
7e13fc
Release:        4%{?dist}
778716
Summary:        Application deployment framework for desktop apps
778716
778716
Group:          Development/Tools
778716
License:        LGPLv2+
778716
URL:            http://flatpak.org/
778716
Source0:        https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz
778716
Source1:        https://github.com/ostreedev/ostree/releases/download/v%{ostree_version}/libostree-%{ostree_version}.tar.xz
778716
Patch0:         ostree-soup-Hold-a-ref-to-the-pending-URI-during-completion.patch
b0c5b1
Patch1:         no-user-systemd.patch
b0c5b1
Patch2:         fix-build.patch
b0c5b1
Patch3:         ostree-bundle.patch
7e13fc
# https://bugzilla.redhat.com/show_bug.cgi?id=1547376
7e13fc
Patch4:         flatpak-0.8.8-cve-2018-6560.patch
778716
BuildRequires:  pkgconfig(fuse)
778716
BuildRequires:  pkgconfig(gio-unix-2.0)
778716
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.40.0
778716
BuildRequires:  pkgconfig(json-glib-1.0)
778716
BuildRequires:  pkgconfig(libarchive) >= 2.8.0
778716
BuildRequires:  pkgconfig(libelf) >= 0.8.12
778716
BuildRequires:  pkgconfig(libsoup-2.4)
778716
BuildRequires:  pkgconfig(polkit-gobject-1)
778716
BuildRequires:  pkgconfig(libseccomp)
778716
BuildRequires:  pkgconfig(liblzma)
778716
BuildRequires:  pkgconfig(xau)
778716
BuildRequires:  pkgconfig(e2p)
b0c5b1
BuildRequires:  automake, autoconf, libtool, gettext-devel, gtk-doc
778716
BuildRequires:  bison
778716
BuildRequires:  docbook-dtds
778716
BuildRequires:  docbook-style-xsl
778716
BuildRequires:  intltool
778716
BuildRequires:  libattr-devel
778716
BuildRequires:  libcap-devel
778716
BuildRequires:  libdwarf-devel
778716
BuildRequires:  gpgme-devel
778716
BuildRequires:  systemd
778716
BuildRequires:  /usr/bin/xmlto
778716
BuildRequires:  /usr/bin/xsltproc
778716
778716
# Needed for the document portal.
778716
Requires:       /usr/bin/fusermount
778716
b0c5b1
# libostree bundling
b0c5b1
# https://fedoraproject.org/wiki/EPEL:Packaging_Autoprovides_and_Requires_Filtering
b0c5b1
# We're using RPATH to pick up our bundled version
b0c5b1
%filter_from_requires /libostree-1/d
b0c5b1
b0c5b1
# And ensure we don't add a Provides
b0c5b1
%{?filter_setup:
b0c5b1
%filter_provides_in %{_libdir}/%{name}/.*
b0c5b1
%filter_setup
b0c5b1
}
b0c5b1
# And for now we manually inject this dep; surprisingly the
b0c5b1
# command line doesn't currently link to the public libflatpak
b0c5b1
# library.
b0c5b1
Requires:       %{name}-libs = %{version}-%{release}
b0c5b1
778716
%description
778716
flatpak is a system for building, distributing and running sandboxed desktop
778716
applications on Linux. See https://wiki.gnome.org/Projects/SandboxedApps for
778716
more information.
778716
778716
%package builder
778716
Summary:        Build helper for %{name}
778716
Group:          Development/Tools
778716
License:        LGPLv2+
778716
Requires:       %{name}%{?_isa} = %{version}-%{release}
778716
Requires:       /usr/bin/bzip2
778716
Requires:       /usr/bin/bzr
778716
Requires:       /usr/bin/git
778716
Requires:       /usr/bin/patch
778716
Requires:       /usr/bin/strip
778716
Requires:       /usr/bin/tar
778716
Requires:       /usr/bin/unzip
778716
# Remove in F27.
778716
Provides:       xdg-app-builder = %{version}-%{release}
778716
Obsoletes:      xdg-app-builder <= 0.5.2-2
778716
778716
%description builder
778716
flatpak-builder is a tool that makes it easy to build applications and their
778716
dependencies by automating the configure && make && make install steps.
778716
778716
%package devel
778716
Summary:        Development files for %{name}
778716
Group:          Development/Libraries
778716
License:        LGPLv2+
778716
Requires:       %{name}%{?_isa} = %{version}-%{release}
778716
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
778716
# Remove in F27.
778716
Provides:       xdg-app-devel%{?_isa} = %{version}-%{release}
778716
Obsoletes:      xdg-app-devel <= 0.5.2-2
778716
778716
%description devel
778716
This package contains the pkg-config file and development headers for %{name}.
778716
778716
%package libs
778716
Summary:        Libraries for %{name}
778716
Group:          Development/Libraries
778716
License:        LGPLv2+
778716
# Drop if using an external ostree-libs.
778716
Requires:       %{name}%{?_isa} = %{version}-%{release}
778716
# Remove in F27.
778716
Provides:       xdg-app-libs%{?_isa} = %{version}-%{release}
778716
Obsoletes:      xdg-app-libs <= 0.5.2-2
778716
778716
%description libs
778716
This package contains libflatpak.
778716
778716
778716
%prep
778716
%setup -q -a 1
778716
cd libostree-%{ostree_version}
778716
%patch0 -p1
b0c5b1
cd ..
b0c5b1
%patch1 -p1
b0c5b1
%patch2 -p1
b0c5b1
%patch3 -p1
7e13fc
%patch4 -p1
b0c5b1
778716
778716
%build
778716
cd libostree-%{ostree_version}
778716
 %configure \
778716
           --disable-silent-rules \
778716
           --disable-gtk-doc \
778716
           --disable-man \
778716
           --disable-rofiles-fuse \
778716
           --without-libmount \
778716
           --disable-introspection \
778716
           --without-selinux \
778716
           --without-dracut \
12d9a6
           LIBS=-lgpg-error \
12d9a6
           CPPFLAGS="$CPPFLAGS -DDISABLE_OTMPFILE"
778716
%make_build V=1
778716
cd ..
778716
778716
mkdir -p root/lib/pkgconfig
778716
ROOT=`pwd`/root
778716
b0c5b1
mv libostree-%{ostree_version}/.libs/libostree-1.so* root/lib
b0c5b1
ls -al root/lib/libostree*
778716
ln -s `pwd`/libostree-%{ostree_version}/src/libostree root/include
778716
778716
cat > root/lib/pkgconfig/ostree-1.pc <
778716
Name: OSTree
778716
Description: Git for operating system binaries
778716
Version: %{ostree_version}
778716
Requires: gio-unix-2.0
b0c5b1
Libs: -L$ROOT/lib -Wl,-rpath=%{_libdir}/flatpak -lostree-1
778716
Cflags: -I$ROOT/include
778716
EOF
b0c5b1
rm -f configure
b0c5b1
gtkdocize
b0c5b1
autoreconf -f -i -s
778716
export PKG_CONFIG_PATH=$ROOT/lib/pkgconfig
778716
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
778716
 # User namespace support is sufficient.
778716
 # Generate consistent IDs between runs to avoid multilib problems.
778716
 export XMLTO_FLAGS="--stringparam generate.consistent.ids=1"
778716
 %configure \
778716
            --with-dwarf-header=%{_includedir}/libdwarf --with-priv-mode=none \
778716
            --enable-docbook-docs \
778716
            --disable-introspection $CONFIGFLAGS)
778716
%make_build V=1
778716
sed -i s/ostree-1// %{name}.pc
778716
778716
%install
b0c5b1
mkdir -p %{buildroot}%{_datadir}/gtk-doc/html/flatpak
778716
%make_install
b0c5b1
install -d %{buildroot}%{_libdir}/flatpak
b0c5b1
mv root/lib/libostree-1.so* %{buildroot}%{_libdir}/flatpak
12d9a6
# Work around https://bugzilla.redhat.com/show_bug.cgi?id=1392354
12d9a6
install -d %{buildroot}/%{_pkgdocdir}
12d9a6
if test -d %{buildroot}/%{_docdir}/%{name}; then
12d9a6
    mv %{buildroot}/%{_docdir}/%{name}/* %{buildroot}/%{_pkgdocdir}
12d9a6
    rmdir %{buildroot}/%{_docdir}/%{name}/
12d9a6
fi
12d9a6
install -t %{buildroot}/%{_pkgdocdir} -pm 644 NEWS README.md
778716
# The system repo is not installed by the flatpak build system.
778716
install -d %{buildroot}%{_localstatedir}/lib/flatpak
778716
install -d %{buildroot}%{_sysconfdir}/flatpak/remotes.d
778716
rm -f %{buildroot}%{_libdir}/libflatpak.la
778716
%find_lang %{name}
778716
778716
%post
778716
# Create an (empty) system-wide repo.
778716
flatpak remote-list --system &> /dev/null || :
778716
778716
%post libs -p /sbin/ldconfig
778716
778716
778716
%postun libs -p /sbin/ldconfig
778716
778716
778716
%files -f %{name}.lang
778716
%license COPYING
778716
# Comply with the packaging guidelines about not mixing relative and absolute
778716
# paths in doc.
778716
%doc %{_pkgdocdir}
778716
%{_bindir}/flatpak
778716
%{_datadir}/bash-completion
778716
%{_datadir}/dbus-1/interfaces/org.freedesktop.Flatpak.xml
778716
%{_datadir}/dbus-1/interfaces/org.freedesktop.portal.Documents.xml
778716
%{_datadir}/dbus-1/interfaces/org.freedesktop.impl.portal.PermissionStore.xml
778716
%{_datadir}/dbus-1/services/org.freedesktop.Flatpak.service
778716
%{_datadir}/dbus-1/services/org.freedesktop.impl.portal.PermissionStore.service
778716
%{_datadir}/dbus-1/services/org.freedesktop.portal.Documents.service
778716
%{_datadir}/dbus-1/system-services/org.freedesktop.Flatpak.SystemHelper.service
778716
# Co-own directory.
778716
%{_datadir}/gdm/env.d
778716
%{_datadir}/%{name}
778716
%{_datadir}/polkit-1/actions/org.freedesktop.Flatpak.policy
778716
%{_datadir}/polkit-1/rules.d/org.freedesktop.Flatpak.rules
778716
%{_libexecdir}/flatpak-dbus-proxy
778716
%{_libexecdir}/flatpak-session-helper
778716
%{_libexecdir}/flatpak-system-helper
778716
%{_libexecdir}/xdg-document-portal
778716
%{_libexecdir}/xdg-permission-store
778716
%attr(04755,root,root) %{_libexecdir}/flatpak-bwrap
778716
778716
%dir %{_localstatedir}/lib/flatpak
778716
%{_mandir}/man1/%{name}*.1*
778716
%{_mandir}/man5/%{name}-metadata.5*
778716
%{_mandir}/man5/flatpak-flatpakref.5*
778716
%{_mandir}/man5/flatpak-flatpakrepo.5*
778716
%exclude %{_mandir}/man1/flatpak-builder.1*
778716
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.Flatpak.SystemHelper.conf
778716
%{_sysconfdir}/flatpak/remotes.d
778716
%{_sysconfdir}/profile.d/flatpak.sh
778716
%{_unitdir}/flatpak-system-helper.service
778716
%{_userunitdir}/flatpak-session-helper.service
778716
%{_userunitdir}/xdg-document-portal.service
778716
%{_userunitdir}/xdg-permission-store.service
778716
# Co-own directory.
778716
%{_userunitdir}/dbus.service.d
778716
778716
%files builder
778716
%{_bindir}/flatpak-builder
778716
%{_mandir}/man1/flatpak-builder.1*
778716
778716
%files devel
778716
%{_datadir}/gtk-doc/
778716
%{_includedir}/%{name}/
778716
%{_libdir}/libflatpak.so
778716
%{_libdir}/pkgconfig/%{name}.pc
778716
778716
%files libs
778716
%license COPYING
b0c5b1
%{_libdir}/flatpak/libostree-1.so*
778716
%{_libdir}/libflatpak.so.*
778716
778716
778716
%changelog
7e13fc
* Tue Aug 28 2018 David King <dking@redhat.com> - 0.8.8-4
7e13fc
- Add patch for CVE-2018-6560 (#1547376)
7e13fc
12d9a6
* Mon Dec 11 2017 David King <dking@redhat.com> - 0.8.8-3
12d9a6
- Disable O_TMPFILE in libglnx (#1520311)
12d9a6
12d9a6
* Fri Nov 10 2017 Ray Strode <rstrode@redhat.com> - 0.8.8-2
b0c5b1
- Fix crasher in xdg-desktop-portal
12d9a6
  Resolves: #1503579
b0c5b1
- Tweak spec file so it still builds even though we need to
b0c5b1
  autoreconf.
b0c5b1
12d9a6
* Wed Nov 01 2017 David King <dking@redhat.com> - 0.8.8-1
12d9a6
- Update to 0.8.8 (#1500800)
12d9a6
12d9a6
* Tue Aug 01 2017 Colin Walters <walters@verbum.org> - 0.8.7-3
b0c5b1
- Fix libostree bundling:
b0c5b1
  Ensure we do not Provide or Require libostree.
b0c5b1
  Move the shared library into flatpak-libs so flatpak always
b0c5b1
  depends on it.
b0c5b1
  Keep the shared library filename as libostree, but put it
b0c5b1
  under a private directory.  Renaming the file on disk did not
b0c5b1
  really do much since the dynamic linker and RPM work from the
b0c5b1
  soname.
b0c5b1
  Resolves: #1476905
12d9a6
12d9a6
* Tue Aug 01 2017 Colin Walters <walters@verbum.org> - 0.8.7-2
b0c5b1
- Tweak build to work both with and without BZ#1392354
b0c5b1
778716
* Tue Jun 20 2017 Kalev Lember <klember@redhat.com> - 0.8.7-1
778716
- Update to 0.8.7
778716
- Resolves: #1391018
778716
778716
* Tue Apr  4 2017 Alexander Larsson <alexl@redhat.com> - 0.8.5-2
778716
- Add libostree use-after-free patch
778716
- Resolves: #1391018
778716
778716
* Mon Apr 03 2017 Kalev Lember <klember@redhat.com> - 0.8.5-1
778716
- Update to 0.8.5
778716
- Resolves: #1391018
778716
778716
* Fri Mar 10 2017 David King <dking@redhat.com> - 0.8.4-2
778716
- Sync bzip2 dependency with Fedora package
778716
- Make the libs subpackage depend on the base package for libostree
778716
- Fix multilib issues with XML-based documentation
778716
778716
* Fri Mar 10 2017 Kalev Lember <klember@redhat.com> - 0.8.4-1
778716
- Update to 0.8.4
778716
- Resolves: #1391018
778716
778716
* Wed Feb 22 2017 Kalev Lember <klember@redhat.com> - 0.8.3-4
778716
- Remove ExcludeArch ppc now that we have libseccomp there
778716
- Resolves: #1391018
778716
778716
* Fri Feb 17 2017 Alexander Larsson <alexl@redhat.com> - 0.8.3-3
778716
- ExcludeArch 32bit ppc which doesn't have libseccomp
778716
- Resolves: #1391018
778716
778716
* Fri Feb 17 2017 Alexander Larsson <alexl@redhat.com> - 0.8.3-2
778716
- Added pkgconfig(e2p) build dependency
778716
- Resolves: #1391018
778716
778716
* Fri Feb 17 2017 Alexander Larsson <alexl@redhat.com> - 0.8.3-1
778716
- Bundle ostree and bubblewrap
778716
- Resolves: #1391018
778716
778716
* Tue Feb 14 2017 Kalev Lember <klember@redhat.com> - 0.8.3-1
778716
- Update to 0.8.3
778716
778716
* Fri Jan 27 2017 Kalev Lember <klember@redhat.com> - 0.8.2-1
778716
- Update to 0.8.2
778716
778716
* Wed Jan 18 2017 David King <amigadave@amigadave.com> - 0.8.1-1
778716
- Update to 0.8.1
778716
778716
* Tue Dec 20 2016 Kalev Lember <klember@redhat.com> - 0.8.0-1
778716
- Update to 0.8.0
778716
778716
* Tue Nov 29 2016 David King <amigadave@amigadave.com> - 0.6.14-2
778716
- Add a patch to fix a GNOME Software crash
778716
- Silence repository listing during post
778716
778716
* Tue Nov 29 2016 Kalev Lember <klember@redhat.com> - 0.6.14-1
778716
- Update to 0.6.14
778716
778716
* Wed Oct 26 2016 David King <amigadave@amigadave.com> - 0.6.13-2
778716
- Add empty /etc/flatpak/remotes.d
778716
778716
* Tue Oct 25 2016 David King <amigadave@amigadave.com> - 0.6.13-1
778716
- Update to 0.6.13
778716
778716
* Thu Oct 06 2016 David King <amigadave@amigadave.com> - 0.6.12-1
778716
- Update to 0.6.12
778716
778716
* Tue Sep 20 2016 Kalev Lember <klember@redhat.com> - 0.6.11-1
778716
- Update to 0.6.11
778716
- Set minimum ostree and bubblewrap versions
778716
778716
* Mon Sep 12 2016 David King <amigadave@amigadave.com> - 0.6.10-1
778716
- Update to 0.6.10
778716
778716
* Tue Sep 06 2016 David King <amigadave@amigadave.com> - 0.6.9-2
778716
- Look for bwrap in PATH
778716
778716
* Thu Aug 25 2016 David King <amigadave@amigadave.com> - 0.6.9-1
778716
- Update to 0.6.9
778716
778716
* Mon Aug 01 2016 David King <amigadave@amigadave.com> - 0.6.8-1
778716
- Update to 0.6.8 (#1361823)
778716
778716
* Thu Jul 21 2016 David King <amigadave@amigadave.com> - 0.6.7-2
778716
- Use system bubblewrap
778716
778716
* Fri Jul 01 2016 David King <amigadave@amigadave.com> - 0.6.7-1
778716
- Update to 0.6.7
778716
778716
* Thu Jun 23 2016 David King <amigadave@amigadave.com> - 0.6.6-1
778716
- Update to 0.6.6
778716
778716
* Fri Jun 10 2016 David King <amigadave@amigadave.com> - 0.6.5-1
778716
- Update to 0.6.5
778716
778716
* Wed Jun 01 2016 David King <amigadave@amigadave.com> - 0.6.4-1
778716
- Update to 0.6.4
778716
778716
* Tue May 31 2016 David King <amigadave@amigadave.com> - 0.6.3-1
778716
- Update to 0.6.3
778716
- Move bwrap to main package
778716
778716
* Tue May 24 2016 David King <amigadave@amigadave.com> - 0.6.2-1
778716
- Rename from xdg-app to flatpak (#1337434)