ostree/ostree.spec

195 lines
4.8 KiB
RPMSpec
Raw Normal View History

# We haven't tried to ship the tests on RHEL
%if 0%{?rhel}
%bcond_with tests
%else
%bcond_without tests
%endif
%if 0%{?rhel} < 10
%bcond_with composefs
%else
%bcond_without composefs
%endif
2014-10-24 17:35:47 +00:00
Summary: Tool for managing bootable, immutable filesystem trees
2012-11-19 21:05:28 +00:00
Name: ostree
Version: 2024.2
Release: %autorelease
2017-02-07 19:27:17 +00:00
Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz
2023-06-13 21:02:00 +00:00
License: LGPL-2.0-or-later
2016-10-27 07:45:11 +00:00
URL: https://ostree.readthedocs.io/en/latest/
2013-09-12 18:21:27 +00:00
# Conditional to ELN right now to reduce blast radius; xref
# https://github.com/containers/composefs/pull/229#issuecomment-1838735764
%if 0%{?rhel} >= 10
ExcludeArch: %{ix86}
%endif
BuildRequires: make
BuildRequires: git
2012-11-19 21:05:28 +00:00
# We always run autogen.sh
BuildRequires: autoconf automake libtool
# For docs
BuildRequires: gtk-doc
2013-09-12 18:21:27 +00:00
# Core requirements
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(libcurl)
BuildRequires: openssl-devel
%if %{with tests}
BuildRequires: pkgconfig(libsoup-3.0)
%endif
BuildRequires: libattr-devel
# The tests require attr
BuildRequires: attr
# Extras
BuildRequires: pkgconfig(libarchive)
2014-06-09 22:42:38 +00:00
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libselinux)
2017-01-18 22:57:46 +00:00
BuildRequires: pkgconfig(mount)
%if 0%{?fedora} <= 36
BuildRequires: pkgconfig(fuse)
%else
BuildRequires: pkgconfig(fuse3)
%endif
2014-06-09 23:58:05 +00:00
BuildRequires: pkgconfig(e2p)
BuildRequires: libcap-devel
BuildRequires: gpgme-devel
BuildRequires: pkgconfig(libsystemd)
2013-09-12 18:21:27 +00:00
BuildRequires: /usr/bin/g-ir-scanner
2013-07-08 01:51:28 +00:00
BuildRequires: dracut
BuildRequires: bison
%if %{with composefs}
BuildRequires: pkgconfig(composefs)
%endif
2012-11-19 21:05:28 +00:00
2013-09-12 18:21:27 +00:00
# Runtime requirements
2013-07-08 01:51:28 +00:00
Requires: dracut
2014-03-07 12:47:27 +00:00
Requires: /usr/bin/gpgv2
Requires: systemd-units
Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
# Strictly speaking, this is not a current hard requirement, but it will
# be in the future.
%if %{with composefs}
Requires: composefs
%endif
2012-11-19 21:05:28 +00:00
%description
libostree is a shared library designed primarily for
use by higher level tools to manage host systems (e.g. rpm-ostree),
as well as container tools like flatpak and the atomic CLI.
2012-11-19 21:05:28 +00:00
%package libs
2022-04-13 18:58:17 +00:00
Summary: C shared libraries %{name}
%description libs
The %{name}-libs provides shared libraries for %{name}.
%package devel
Summary: Development headers for %{name}
Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description devel
The %{name}-devel package includes the header files for the %{name} library.
2018-08-11 16:06:46 +00:00
%ifnarch s390 s390x
2014-10-16 22:19:11 +00:00
%package grub2
Summary: GRUB2 integration for OSTree
2018-08-11 16:06:46 +00:00
%ifnarch aarch64 %{arm}
2014-10-16 22:19:11 +00:00
Requires: grub2
%else
Requires: grub2-efi
%endif
2017-02-07 20:38:33 +00:00
Requires: ostree
2014-10-16 22:19:11 +00:00
%description grub2
GRUB2 integration for OSTree
%endif
2014-10-16 22:19:11 +00:00
%if %{with tests}
2017-09-14 16:50:40 +00:00
%package tests
Summary: Tests for the %{name} package
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
2017-09-14 16:50:40 +00:00
%description tests
This package contains tests that can be used to verify
the functionality of the installed %{name} package.
%endif
2017-09-14 16:50:40 +00:00
2012-11-19 21:05:28 +00:00
%prep
2017-02-07 19:27:17 +00:00
%autosetup -Sgit -n libostree-%{version}
2012-11-19 21:05:28 +00:00
%build
env NOCONFIGURE=1 ./autogen.sh
%configure --disable-silent-rules \
--enable-gtk-doc \
--with-selinux \
--with-curl \
--with-openssl \
--without-soup \
%{?with_composefs:--with-composefs} \
%{?with_tests:--with-soup3} \
%{?!with_tests:--without-soup3} \
%{?with_tests:--enable-installed-tests=exclusive} \
--with-dracut=yesbutnoconf
2016-10-27 07:50:01 +00:00
%make_build
2012-11-19 21:05:28 +00:00
%install
2016-10-27 07:50:01 +00:00
%make_install INSTALL="install -p -c"
find %{buildroot} -name '*.la' -delete
2012-11-19 21:05:28 +00:00
# Needed to enable the service at compose time currently
%post
%systemd_post ostree-remount.service
%preun
%systemd_preun ostree-remount.service
2012-11-19 21:05:28 +00:00
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc README.md
2012-11-19 21:05:28 +00:00
%{_bindir}/ostree
%{_bindir}/rofiles-fuse
%{_datadir}/ostree
%{_datadir}/bash-completion/completions/*
2013-07-08 01:51:28 +00:00
%dir %{_prefix}/lib/dracut/modules.d/98ostree
%{_prefix}/lib/systemd/system/ostree*.*
2013-07-08 01:51:28 +00:00
%{_prefix}/lib/dracut/modules.d/98ostree/*
2014-03-31 21:41:56 +00:00
%{_mandir}/man*/*.gz
%{_prefix}/lib/systemd/system-generators/ostree-system-generator
%exclude %{_sysconfdir}/grub.d/*ostree
2017-02-03 19:14:47 +00:00
%exclude %{_libexecdir}/libostree/grub2*
2017-08-17 21:07:19 +00:00
%{_prefix}/lib/tmpfiles.d/*
%{_prefix}/lib/ostree
2017-01-05 14:00:11 +00:00
# Moved in git master
2017-02-03 19:14:47 +00:00
%{_libexecdir}/libostree/*
2012-11-19 21:05:28 +00:00
%files libs
%{_sysconfdir}/ostree
%{_libdir}/*.so.1*
%{_libdir}/girepository-1.0/OSTree-1.0.typelib
%files devel
%{_libdir}/lib*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*
%dir %{_datadir}/gtk-doc/html/ostree
%{_datadir}/gtk-doc/html/ostree
2013-09-12 18:21:27 +00:00
%{_datadir}/gir-1.0/OSTree-1.0.gir
2018-08-11 16:06:46 +00:00
%ifnarch s390 s390x
2014-10-16 22:19:11 +00:00
%files grub2
%{_sysconfdir}/grub.d/*ostree
2017-08-22 17:58:12 +00:00
%dir %{_libexecdir}/libostree
2017-02-03 19:14:47 +00:00
%{_libexecdir}/libostree/grub2*
%endif
2014-10-16 22:19:11 +00:00
%if %{with tests}
2017-09-14 16:50:40 +00:00
%files tests
%{_libexecdir}/installed-tests
%{_datadir}/installed-tests
%endif
2017-09-14 16:50:40 +00:00
2012-11-19 21:05:28 +00:00
%changelog
%autochangelog