Blame charliecloud.spec

2a2ec79
# Charliecloud fedora package spec file
2a2ec79
#
2a2ec79
# Contributors:
2a2ec79
#    Dave Love           @loveshack
2a2ec79
#    Michael Jennings    @mej
2a2ec79
#    Jordan Ogas         @jogas
2a2ec79
#    Reid Priedhorksy    @reidpr
2a2ec79
2a2ec79
# Don't try to compile python3 files with /usr/bin/python.
2a2ec79
%{?el7:%global __python %__python3}
2a2ec79
e777733
Name:          charliecloud
de420ef
Version:       0.26
95daa4c
Release:       1%{?dist}
e777733
Summary:       Lightweight user-defined software stacks for high-performance computing
e777733
License:       ASL 2.0
e777733
URL:           https://hpc.github.io/%{name}/
4edf1f4
Source0:       https://github.com/hpc/%{name}/releases/downloads/v%{version}/%{name}-%{version}.tar.gz
4edf1f4
BuildRequires: gcc rsync bash
4edf1f4
Requires:      squashfuse squashfs-tools
7a357c2
Patch1:        el7-pkgdir.patch
de420ef
Patch2:        printf.patch
7a357c2
7a357c2
%description
4edf1f4
Charliecloud uses Linux user namespaces to run containers with no privileged
4edf1f4
operations or daemons and minimal configuration changes on center resources.
4edf1f4
This simple approach avoids most security risks while maintaining access to
4edf1f4
the performance and functionality already on offer.
7a357c2
4edf1f4
Container images can be built using Docker or anything else that can generate
7b14529
a standard Linux filesystem tree.
7a357c2
4edf1f4
For more information: https://hpc.github.io/charliecloud
7a357c2
4edf1f4
%package builder
7a357c2
Summary:       Charliecloud container image building tools
95daa4c
License:       ASL 2.0 and MIT
7b14529
BuildArch:     noarch
948997f
BuildRequires: python3-devel
948997f
BuildRequires: python%{python3_pkgversion}-lark-parser
948997f
BuildRequires: python%{python3_pkgversion}-requests
4edf1f4
Requires:      %{name}
4edf1f4
Requires:      python3
9b41634
Requires:      python%{python3_pkgversion}-lark-parser
9b41634
Requires:      python%{python3_pkgversion}-requests
95daa4c
Provides:      bundled(python%{python3_pkgversion}-lark-parser) = 0.11.3
2a2ec79
4edf1f4
%description builder
7b14529
This package provides ch-image, Charliecloud's completely unprivileged container
7b14529
image manipulation tool.
2a2ec79
e777733
%package       doc
e777733
Summary:       Charliecloud html documentation
e777733
License:       BSD and ASL 2.0
e777733
BuildArch:     noarch
4edf1f4
Obsoletes:     %{name}-doc < %{version}-%{release}
36896ee
BuildRequires: python%{python3_pkgversion}-sphinx
36896ee
BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme
36896ee
Requires:      python%{python3_pkgversion}-sphinx_rtd_theme
2a2ec79
2a2ec79
%description doc
e777733
Html and man page documentation for %{name}.
e777733
e777733
%package   test
e777733
Summary:   Charliecloud test suite
e777733
License:   ASL 2.0
4edf1f4
Requires:  %{name} %{name}-builder /usr/bin/bats
4edf1f4
Obsoletes: %{name}-test < %{version}-%{release}
e777733
e777733
%description test
e777733
Test fixtures for %{name}.
2a2ec79
2a2ec79
%prep
2a2ec79
%setup -q
e777733
2a2ec79
%if 0%{?el7}
438a3d9
%patch1 -p1
2a2ec79
%endif
2a2ec79
de420ef
%patch2 -p1
de420ef
e777733
%build
e777733
# Use old inlining behavior, see:
e777733
# https://github.com/hpc/charliecloud/issues/735
e777733
CFLAGS=${CFLAGS:-%optflags -fgnu89-inline}; export CFLAGS
4edf1f4
%configure --docdir=%{_pkgdocdir} \
4edf1f4
           --libdir=%{_prefix}/lib \
e777733
           --with-python=/usr/bin/python3 \
2a2ec79
%if 0%{?el7}
438a3d9
           --with-sphinx-build=%{_bindir}/sphinx-build-3.6
2a2ec79
%else
438a3d9
           --with-sphinx-build=%{_bindir}/sphinx-build
2a2ec79
%endif
2a2ec79
2a2ec79
%install
e777733
%make_install
2a2ec79
2a2ec79
cat > README.EL7 <
2a2ec79
For RHEL7 you must increase the number of available user namespaces to a non-
2a2ec79
zero number (note the number below is taken from the default for RHEL8):
2a2ec79
2a2ec79
  echo user.max_user_namespaces=3171 >/etc/sysctl.d/51-userns.conf
e777733
  sysctl -p /etc/sysctl.d/51-userns.conf
2a2ec79
2a2ec79
Note for versions below RHEL7.6, you will also need to enable user namespaces:
2a2ec79
2a2ec79
  grubby --args=namespace.unpriv_enable=1 --update-kernel=ALL
2a2ec79
  reboot
2a2ec79
2a2ec79
Please visit https://hpc.github.io/charliecloud/ for more information.
2a2ec79
EOF
2a2ec79
e777733
# Remove bundled sphinx bits.
e777733
%{__rm} -rf %{buildroot}%{_pkgdocdir}/html/_static/css
e777733
%{__rm} -rf %{buildroot}%{_pkgdocdir}/html/_static/fonts
e777733
%{__rm} -rf %{buildroot}%{_pkgdocdir}/html/_static/js
e777733
e777733
# Use Fedora package sphinx bits.
d2d1225
sphinxdir=%{python3_sitelib}/sphinx_rtd_theme/static
e777733
ln -s "${sphinxdir}/css"   %{buildroot}%{_pkgdocdir}/html/_static/css
e777733
ln -s "${sphinxdir}/fonts" %{buildroot}%{_pkgdocdir}/html/_static/fonts
e777733
ln -s "${sphinxdir}/js"    %{buildroot}%{_pkgdocdir}/html/_static/js
e777733
4edf1f4
# Remove bundled license and readme (prefer license and doc macros).
e777733
%{__rm} -f %{buildroot}%{_pkgdocdir}/LICENSE
e777733
%{__rm} -f %{buildroot}%{_pkgdocdir}/README.rst
2a2ec79
4edf1f4
%files
4edf1f4
%license LICENSE
4edf1f4
%doc README.rst %{?el7:README.EL7}
4edf1f4
%{_bindir}/ch-build
4edf1f4
%{_bindir}/ch-build2dir
4edf1f4
%{_bindir}/ch-builder2squash
4edf1f4
%{_bindir}/ch-builder2tar
7a357c2
%{_bindir}/ch-checkns
de420ef
%{_bindir}/ch-convert
4edf1f4
%{_bindir}/ch-dir2squash
948997f
%{_bindir}/ch-fromhost
4edf1f4
%{_bindir}/ch-pull2dir
4edf1f4
%{_bindir}/ch-pull2tar
7a357c2
%{_bindir}/ch-run
7a357c2
%{_bindir}/ch-run-oci
7a357c2
%{_bindir}/ch-ssh
4edf1f4
%{_bindir}/ch-tar2dir
7b14529
%{_mandir}/man1/ch-build.1*
7b14529
%{_mandir}/man1/ch-build2dir.1*
7b14529
%{_mandir}/man1/ch-builder2squash.1*
7b14529
%{_mandir}/man1/ch-builder2tar.1*
7a357c2
%{_mandir}/man1/ch-checkns.1*
de420ef
%{_mandir}/man1/ch-convert.1*
7b14529
%{_mandir}/man1/ch-dir2squash.1*
7b14529
%{_mandir}/man1/ch-fromhost.1*
7b14529
%{_mandir}/man1/ch-pull2dir.1*
7b14529
%{_mandir}/man1/ch-pull2tar.1*
7a357c2
%{_mandir}/man1/ch-run.1*
7a357c2
%{_mandir}/man1/ch-run-oci.1*
7a357c2
%{_mandir}/man1/ch-ssh.1*
7b14529
%{_mandir}/man1/ch-tar2dir.1*
4edf1f4
%{_mandir}/man7/charliecloud.7*
4edf1f4
%{_prefix}/lib/%{name}/base.sh
4edf1f4
%{_prefix}/lib/%{name}/contributors.bash
4edf1f4
%{_prefix}/lib/%{name}/version.sh
4edf1f4
%{_prefix}/lib/%{name}/version.txt
7a357c2
4edf1f4
%files builder
7a357c2
%{_bindir}/ch-image
7a357c2
%{_mandir}/man1/ch-image.1*
7a357c2
%{_prefix}/lib/%{name}/build.py
7a357c2
%{_prefix}/lib/%{name}/charliecloud.py
7a357c2
%{_prefix}/lib/%{name}/fakeroot.py
95daa4c
%{_prefix}/lib/%{name}/lark
95daa4c
%{_prefix}/lib/%{name}/lark-0.11.3.dist-info
95daa4c
%{_prefix}/lib/%{name}/lark-stubs
7a357c2
%{_prefix}/lib/%{name}/misc.py
7a357c2
%{_prefix}/lib/%{name}/pull.py
7a357c2
%{_prefix}/lib/%{name}/push.py
7a357c2
%{_prefix}/lib/%{name}/version.py
9310d4e
%{?el7:%{_prefix}/lib/%{name}/__pycache__}
948997f
2a2ec79
%files doc
2a2ec79
%license LICENSE
7b14529
%{_pkgdocdir}/examples
2a2ec79
%{_pkgdocdir}/html
7b14529
%{?el7:%exclude %{_pkgdocdir}/examples/*/__pycache__}
7b14529
2a2ec79
e777733
%files test
e777733
%{_bindir}/ch-test
948997f
%{_libexecdir}/%{name}/test
e777733
%{_mandir}/man1/ch-test.1*
7b14529
e777733
2a2ec79
%changelog
de420ef
* Mon Jan 24 2022 Jordan Ogas 
de420ef
- add printf patch for 32-bit
de420ef
- add ch-convert script
de420ef
- new version 0.26
f09b9e5
411370e
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.25-2
411370e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
411370e
95daa4c
* Mon Sep 20 2021 Jordan Ogas 
95daa4c
- bundle python lark parser
95daa4c
- new version
95daa4c
95daa4c
* Thu Aug 05 2021 Jordan Ogas <jogas@lanl.gov> 0.24-12
7b14529
- remove version numbers from Obsolete
7b14529
- remove Provides tag
7b14529
- replace package name with macro
7b14529
- tidy
7b14529
7b14529
* Thu Jul 29 2021 Jordan Ogas <jogas@lanl.gov> 0.24-11
7b14529
- move -builder to noarch
7b14529
- move examples back to -doc
7b14529
- add versions to obsoletes
7b14529
- use name macro
7b14529
b6797fd
* Wed Jul 28 2021 Jordan Ogas <jogas@lanl.gov> 0.24-10
1b8a9df
- fix yet another typo; BuildRequires
1b8a9df
1b8a9df
* Wed Jul 28 2021 Jordan Ogas <jogas@lanl.gov> 0.24-9
68a8a06
- add version to obsoletes
68a8a06
943595c
* Wed Jul 28 2021 Jordan Ogas <jogas@lanl.gov> 0.24-8
943595c
- fix provides typo
943595c
943595c
* Wed Jul 28 2021 Jordan Ogas <jogas@lanl.gov> 0.24-7
943595c
- add -common to obsoletes and provides
c407522
4edf1f4
* Wed Jul 28 2021 Jordan Ogas <jogas@lanl.gov> - 0.24-6
4edf1f4
* revert to meta-package; separate builder to -builder
4edf1f4
4edf1f4
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.24-5
4edf1f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
4edf1f4
9310d4e
* Mon Jul 19 2021 Jordan Ogas <jogas@lanl.gov> - 0.24-4
9310d4e
- fix epel7 python cache files
9310d4e
948997f
* Mon Jul 19 2021 Jordan Ogas <jogas@lanl.gov> - 0.24-3
948997f
- Tidy, alphabatize files
948997f
- Move builder exlusive python files out from -common
948997f
- Move generic helper scripts to -common
948997f
- Add requires runtime to -builders
948997f
bd3334b
* Tue Jul 13 2021 Dave Love <loveshack@fedoraproject.org> - 0.24-2
bd3334b
- Obsolete previous packge by -runtime, not -common
bd3334b
7a357c2
* Wed Jun 30 2021 Dave Love <loveshack@fedoraproject.org> - 0.24-1
7a357c2
- New version
7a357c2
7a357c2
* Sun Apr 18 2021 Dave Love <loveshack@fedoraproject.org> - 0.23-1
7a357c2
- New version
7a357c2
- Split main package into runtime, builder, and common sub-packages
7a357c2
- Require buildah and squashfs at run time
7a357c2
- Use /lib, not /lib64 for noarch; drop lib64 patch
7a357c2
- Don't BR squashfs-tools, squashfuse, buildah
7a357c2
- Require squashfs-tools in -builders
7a357c2
c47af83
* Mon Mar 8 2021 Dave Love <loveshack@fedoraproject.org> <jogas@lanl.gov> - 0.22-2
c47af83
- Fix source0 path
c47af83
- Put man7 in base package
c47af83
c47af83
* Tue Feb 9 2021 Dave Love <loveshack@fedoraproject.org> <jogas@lanl.gov> - 0.22-1
9b41634
- New version
fa3465e
- update lib64.patch
fa3465e
- add pull.py and push.py
9b41634
- (Build)Require python3-lark-parser, python3-requests
9b41634
d40dc73
* Wed Feb 3 2021 <jogas@lanl.gov> - 0.21-2
d40dc73
- Fix lib64.patch path for ch-image
815d5be
36896ee
* Tue Jan 05 2021 <loveshack@fedoraproject.org> <jogas@lanl.gov> - 0.21-1
36896ee
- New version
36896ee
- Ship charlicloud.7
36896ee
- Require fakeroot
36896ee
- Install fakeroot.py
36896ee
- Always ship patch1
36896ee
- Get python3_sitelib defined
36896ee
- Move examples to -test and require sphinx_rtd_theme
36896ee
- Include __pycache__ on el7
36896ee
- Use %%python3_pkgversion
36896ee
- BR python3, not /usr/bin/python3
36896ee
- Fix comment capitalization and spacing
36896ee
438a3d9
* Tue Sep 22 2020 <jogas@lanl.gov> - 0.19-1
36896ee
- Package build.py and misc.py
36896ee
- Remove unnecessary patch
438a3d9
- New release
36896ee
4e2d424
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-2
4e2d424
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
4e2d424
e777733
* Thu Apr 16 2020 <jogas@lanl.gov> - 0.15-1
e777733
- Add test suite package
e777733
- Update spec for autoconf
e777733
- New release
36896ee
580d871
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-2
580d871
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
36896ee
d2d1225
* Wed Sep 04 2019 <jogas@lanl.gov> - 0.10-1
ca7f560
- Patch doc-src/conf.py for epel
ca7f560
- Fix doc-src/dev.rst
ca7f560
- Fix libexec and doc install path for 0.10 changes
7fa89cd
- Tidy comments
f23aad8
- New release
36896ee
ba3dc46
* Thu Aug 22 2019 <jogas@lanl.gov> - 0.9.10-12
ba3dc46
- Upate doc subpackage obsoletes
36896ee
1edc643
* Mon Aug 19 2019 Dave love <loveshack@fedoraproject.org> - 0.9.10-11
1edc643
- Use canonical form for Source0
36896ee
- Remove main package dependency from doc, and make it noarch
36896ee
2a2ec79
* Fri Aug 02 2019 <jogas@lanl.gov> 0.9.10-10
4edf1f4
- Tidy comments; fix typ
36896ee
2a2ec79
* Thu Jul 25 2019 <jogas@lanl.gov> 0.9.10-9
2a2ec79
- Use python site variable; fix doc file reference
36896ee
2a2ec79
* Tue Jul 23 2019 <jogas@lanl.gov> 0.9.10-8
2a2ec79
- Remove bundled js, css, and font bits
36896ee
2a2ec79
* Mon Jul 22 2019 
2a2ec79
- Fix prep section to handle warnings
2a2ec79
- Move documentation dependencies to doc package
36896ee
2a2ec79
* Fri Jul 19 2019 <jogas@lanl.gov> 0.9.10-6
2a2ec79
- Temporarily remove test suite
36896ee
2a2ec79
* Wed Jul 10 2019 <jogas@lanl.gov> 0.9.10-5
2a2ec79
- Revert test and example install path change
2a2ec79
- Update test readme
36896ee
2a2ec79
* Wed Jul 3 2019 <jogas@lanl.gov> 0.9.10-4
2a2ec79
- Add doc package
36896ee
2a2ec79
* Tue Jul 2 2019 <jogas@lanl.gov> 0.9.10-3
2a2ec79
- Tidy comments
2a2ec79
- Update source URL
2a2ec79
- Build html documentation; add rsync dependency
2a2ec79
- Add el7 conditionals for documentation
2a2ec79
- Remove libexecdir definition
2a2ec79
- Add test suite README.TEST
36896ee
2a2ec79
* Wed May 15 2019  <jogas@lanl.gov> 0.9.10-2
2a2ec79
- Fix comment typo
2a2ec79
- Move test suite install path
36896ee
2a2ec79
* Tue May 14 2019  <jogas@lanl.gov> 0.9.10-1
2a2ec79
- New version
2a2ec79
- Fix README.EL7 sysctl command instruction
2a2ec79
- Add pre-built html documentation
2a2ec79
- Fix python dependency
2a2ec79
- Remove temporary test-package readme
2a2ec79
- Fixed capitalization of change log messages
36896ee
2a2ec79
* Tue Apr 30 2019  <jogas@lanl.gov> 0.9.9-4
2a2ec79
- Move global python declaration
36896ee
2a2ec79
* Mon Apr 29 2019  <jogas@lanl.gov> 0.9.9-3
2a2ec79
- Match bin files with wildcard
36896ee
2a2ec79
* Mon Apr 29 2019  <jogas@lanl.gov> 0.9.9-2
2a2ec79
- Update macro comment
2a2ec79
- Fix release tag history
36896ee
2a2ec79
* Tue Apr 16 2019  <jogas@lanl.gov> 0.9.9-1
2a2ec79
- New version
2a2ec79
- Move temp readme creation to install segment
2a2ec79
- Fix spec file macro
36896ee
2a2ec79
* Tue Apr 02 2019  <jogas@lanl.gov> 0.9.8-2
2a2ec79
- Remove python2 build option
36896ee
2a2ec79
* Thu Mar 14 2019  <jogas@lanl.gov> 0.9.8-1
2a2ec79
- Add initial Fedora/EPEL package