Blame SPECS/flatpak.spec

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