|
|
4c4feb |
%global scl devtoolset-7
|
|
|
4c4feb |
%scl_package %scl
|
|
|
4c4feb |
%global df_toolchain 7356c45f3d7ed9e1def541d3d3ef6b1d51e92f29
|
|
|
4c4feb |
%global df_perftools 1c51b6475a2c0a59def0c4738b4f865979c00b3f
|
|
|
4c4feb |
%global df_toolchain_s %(c=%{df_toolchain}; echo ${c:0:7})
|
|
|
4c4feb |
%global df_perftools_s %(c=%{df_perftools}; echo ${c:0:7})
|
|
|
4c4feb |
%global dockerfiledir %{_datadir}/%{scl_prefix}dockerfiles
|
|
|
4c4feb |
|
|
|
4c4feb |
Summary: Package that installs %scl
|
|
|
4c4feb |
Name: %scl_name
|
|
|
19b2e0 |
Version: 7.1
|
|
|
19b2e0 |
Release: 4%{?dist}
|
|
|
4c4feb |
License: GPLv2+
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
4c4feb |
Source0: README
|
|
|
4c4feb |
# The source for this package was pulled from upstream's git. Use the
|
|
|
4c4feb |
# following commands to generate the tarball:
|
|
|
4c4feb |
# git clone git://pkgs.devel.redhat.com/rpms/devtoolset-7-toolchain-docker -b devtoolset-7.0-rhel-7
|
|
|
4c4feb |
# rm -rf devtoolset-7-toolchain-docker/.git{,ignore}
|
|
|
19b2e0 |
# tar cf - devtoolset-7-toolchain-docker | bzip2 -9 > devtoolset-7-toolchain-docker-%%{df_toolchain_s}.tar.bz2
|
|
|
4c4feb |
# git clone git://pkgs.devel.redhat.com/rpms/devtoolset-7-perftools-docker -b devtoolset-7.0-rhel-7
|
|
|
4c4feb |
# rm -rf devtoolset-7-perftools-docker/.git{,ignore}
|
|
|
19b2e0 |
# tar cf - devtoolset-7-perftools-docker | bzip2 -9 > devtoolset-7-perftools-docker-%%{df_perftools_s}.tar.bz2
|
|
|
4c4feb |
Source1: devtoolset-7-toolchain-docker-%{df_toolchain_s}.tar.bz2
|
|
|
4c4feb |
Source2: devtoolset-7-perftools-docker-%{df_perftools_s}.tar.bz2
|
|
|
4c4feb |
|
|
|
4c4feb |
# The base package requires just the toolchain and the perftools.
|
|
|
4c4feb |
Requires: %{scl_prefix}toolchain %{scl_prefix}perftools
|
|
|
4c4feb |
Obsoletes: %{name} < %{version}-%{release}
|
|
|
4c4feb |
|
|
|
4c4feb |
BuildRequires: scl-utils-build >= 20120927-11
|
|
|
4c4feb |
BuildRequires: iso-codes
|
|
|
4c4feb |
BuildRequires: help2man
|
|
|
4c4feb |
|
|
|
4c4feb |
%description
|
|
|
4c4feb |
This is the main package for %scl Software Collection.
|
|
|
4c4feb |
|
|
|
4c4feb |
%package runtime
|
|
|
4c4feb |
Summary: Package that handles %scl Software Collection.
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
Requires: scl-utils >= 20120927-11
|
|
|
4c4feb |
Obsoletes: %{name}-runtime < %{version}-%{release}
|
|
|
19b2e0 |
%if 0%{?rhel} >= 7
|
|
|
19b2e0 |
Requires(post): %{_root_sbindir}/semanage %{_root_sbindir}/restorecon
|
|
|
19b2e0 |
Requires(postun): %{_root_sbindir}/semanage %{_root_sbindir}/restorecon
|
|
|
19b2e0 |
%else
|
|
|
4c4feb |
Requires(post): libselinux policycoreutils-python
|
|
|
4c4feb |
Requires(postun): libselinux policycoreutils-python
|
|
|
19b2e0 |
%endif
|
|
|
4c4feb |
|
|
|
4c4feb |
%description runtime
|
|
|
4c4feb |
Package shipping essential scripts to work with %scl Software Collection.
|
|
|
4c4feb |
|
|
|
4c4feb |
%package build
|
|
|
4c4feb |
Summary: Package shipping basic build configuration
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
Requires: %{scl_prefix}runtime
|
|
|
4c4feb |
Requires: scl-utils-build >= 20120927-11
|
|
|
4c4feb |
Obsoletes: %{name}-build < %{version}-%{release}
|
|
|
4c4feb |
|
|
|
4c4feb |
%description build
|
|
|
4c4feb |
Package shipping essential configuration macros to build %scl Software Collection.
|
|
|
4c4feb |
|
|
|
4c4feb |
%package toolchain
|
|
|
4c4feb |
Summary: Package shipping basic toolchain applications
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
Requires: %{scl_prefix}runtime
|
|
|
4c4feb |
Requires: %{scl_prefix}gcc %{scl_prefix}gcc-c++ %{scl_prefix}gcc-gfortran
|
|
|
4c4feb |
Requires: %{scl_prefix}binutils %{scl_prefix}gdb %{scl_prefix}strace
|
|
|
4c4feb |
Requires: %{scl_prefix}dwz %{scl_prefix}elfutils %{scl_prefix}memstomp
|
|
|
4c4feb |
Requires: %{scl_prefix}ltrace %{scl_prefix}make
|
|
|
4c4feb |
Obsoletes: %{name}-toolchain < %{version}-%{release}
|
|
|
4c4feb |
|
|
|
4c4feb |
%description toolchain
|
|
|
4c4feb |
Package shipping basic toolchain applications (compiler, debugger, ...)
|
|
|
4c4feb |
|
|
|
4c4feb |
%package perftools
|
|
|
4c4feb |
Summary: Package shipping performance tools
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
Requires: %{scl_prefix}runtime
|
|
|
4c4feb |
Requires: %{scl_prefix}oprofile %{scl_prefix}systemtap %{scl_prefix}valgrind
|
|
|
4c4feb |
%ifarch x86_64 ppc64
|
|
|
4c4feb |
Requires: %{scl_prefix}dyninst
|
|
|
4c4feb |
%endif
|
|
|
4c4feb |
Obsoletes: %{name}-perftools < %{version}-%{release}
|
|
|
4c4feb |
|
|
|
4c4feb |
%description perftools
|
|
|
4c4feb |
Package shipping performance tools (systemtap, oprofile)
|
|
|
4c4feb |
|
|
|
4c4feb |
%package dockerfiles
|
|
|
4c4feb |
Summary: Package shipping Dockerfiles for Developer Toolset
|
|
|
4c4feb |
Group: Applications/File
|
|
|
4c4feb |
|
|
|
4c4feb |
%description dockerfiles
|
|
|
4c4feb |
This package provides a set of example Dockerfiles that can be used
|
|
|
4c4feb |
with Red Hat Developer Toolset. Use these examples to stand up
|
|
|
4c4feb |
test environments using the Docker container engine.
|
|
|
4c4feb |
|
|
|
4c4feb |
%prep
|
|
|
4c4feb |
%setup -c -T -a 1 -a 2
|
|
|
4c4feb |
|
|
|
4c4feb |
# This section generates README file from a template and creates man page
|
|
|
4c4feb |
# from that file, expanding RPM macros in the template file.
|
|
|
4c4feb |
cat <<'EOF' | tee README
|
|
|
4c4feb |
%{expand:%(cat %{SOURCE0})}
|
|
|
4c4feb |
EOF
|
|
|
4c4feb |
|
|
|
4c4feb |
%build
|
|
|
4c4feb |
|
|
|
4c4feb |
# Temporary helper script used by help2man.
|
|
|
4c4feb |
cat <<\EOF | tee h2m_helper
|
|
|
4c4feb |
#!/bin/sh
|
|
|
4c4feb |
if [ "$1" = "--version" ]; then
|
|
|
4c4feb |
printf '%%s' "%{?scl_name} %{version} Software Collection"
|
|
|
4c4feb |
else
|
|
|
4c4feb |
cat README
|
|
|
4c4feb |
fi
|
|
|
4c4feb |
EOF
|
|
|
4c4feb |
chmod a+x h2m_helper
|
|
|
4c4feb |
# Generate the man page.
|
|
|
4c4feb |
help2man -N --section 7 ./h2m_helper -o %{?scl_name}.7
|
|
|
4c4feb |
|
|
|
4c4feb |
# Enable collection script
|
|
|
4c4feb |
# ========================
|
|
|
4c4feb |
cat <<EOF >enable
|
|
|
4c4feb |
# General environment variables
|
|
|
4c4feb |
export PATH=%{_bindir}\${PATH:+:\${PATH}}
|
|
|
4c4feb |
export MANPATH=%{_mandir}:\${MANPATH}
|
|
|
4c4feb |
export INFOPATH=%{_infodir}\${INFOPATH:+:\${INFOPATH}}
|
|
|
4c4feb |
export PCP_DIR=%{_scl_root}
|
|
|
4c4feb |
# Some perl Ext::MakeMaker versions install things under /usr/lib/perl5
|
|
|
4c4feb |
# even though the system otherwise would go to /usr/lib64/perl5.
|
|
|
4c4feb |
export PERL5LIB=%{_scl_root}/%{perl_vendorarch}:%{_scl_root}/usr/lib/perl5:%{_scl_root}/%{perl_vendorlib}\${PERL5LIB:+:\${PERL5LIB}}
|
|
|
4c4feb |
# bz847911 workaround:
|
|
|
4c4feb |
# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time
|
|
|
4c4feb |
# or else /etc/ld.so.conf.d files?
|
|
|
4c4feb |
rpmlibdir=\$(rpm --eval "%%{_libdir}")
|
|
|
4c4feb |
# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.
|
|
|
4c4feb |
if [ "\$rpmlibdir" != "\${rpmlibdir/lib64/}" ]; then
|
|
|
4c4feb |
rpmlibdir32=":%{_scl_root}\${rpmlibdir/lib64/lib}"
|
|
|
4c4feb |
fi
|
|
|
4c4feb |
export LD_LIBRARY_PATH=%{_scl_root}\$rpmlibdir\$rpmlibdir32\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
19b2e0 |
export LD_LIBRARY_PATH=%{_scl_root}\$rpmlibdir\$rpmlibdir32:%{_scl_root}\$rpmlibdir/dyninst\$rpmlibdir32/dyninst\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
4c4feb |
# duplicate python site.py logic for sitepackages
|
|
|
4c4feb |
pythonvers=`python -c 'import sys; print sys.version[:3]'`
|
|
|
4c4feb |
export PYTHONPATH=%{_prefix}/lib64/python\$pythonvers/site-packages:%{_prefix}/lib/python\$pythonvers/site-packages\${PYTHONPATH:+:\${PYTHONPATH}}
|
|
|
4c4feb |
EOF
|
|
|
4c4feb |
|
|
|
4c4feb |
# Sudo script
|
|
|
4c4feb |
# ===========
|
|
|
4c4feb |
cat <<EOF >sudo
|
|
|
4c4feb |
#! /bin/sh
|
|
|
4c4feb |
# TODO: parse & pass-through sudo options from \$@
|
|
|
4c4feb |
sudo_options="-E"
|
|
|
4c4feb |
|
|
|
4c4feb |
for arg in "\$@"
|
|
|
4c4feb |
do
|
|
|
4c4feb |
case "\$arg" in
|
|
|
4c4feb |
*\'*)
|
|
|
4c4feb |
arg=`echo "\$arg" | sed "s/'/'\\\\\\\\''/g"` ;;
|
|
|
4c4feb |
esac
|
|
|
4c4feb |
cmd_options="\$cmd_options '\$arg'"
|
|
|
4c4feb |
done
|
|
|
4c4feb |
exec /usr/bin/sudo \$sudo_options LD_LIBRARY_PATH=\$LD_LIBRARY_PATH PATH=\$PATH scl enable %{scl} "\$cmd_options"
|
|
|
4c4feb |
EOF
|
|
|
4c4feb |
|
|
|
4c4feb |
# " (Fix vim syntax coloring.)
|
|
|
4c4feb |
|
|
|
4c4feb |
%install
|
|
|
4c4feb |
(%{scl_install})
|
|
|
4c4feb |
|
|
|
4c4feb |
# This allows users to build packages using DTS.
|
|
|
4c4feb |
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
|
|
|
4c4feb |
%%enable_devtoolset7 %%global ___build_pre %%{___build_pre}; source scl_source enable %{scl} || :
|
|
|
4c4feb |
EOF
|
|
|
4c4feb |
|
|
|
4c4feb |
mkdir -p %{buildroot}%{_scl_root}/etc/alternatives %{buildroot}%{_scl_root}/var/lib/alternatives
|
|
|
4c4feb |
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_scl_scripts}
|
|
|
4c4feb |
install -p -m 755 enable %{buildroot}%{_scl_scripts}/
|
|
|
4c4feb |
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_scl_scripts}
|
|
|
4c4feb |
install -p -m 755 sudo %{buildroot}%{_bindir}/
|
|
|
4c4feb |
|
|
|
4c4feb |
# Other directories that should be owned by the runtime
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_datadir}/appdata
|
|
|
4c4feb |
# Otherwise unowned perl directories
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_libdir}/perl5
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_libdir}/perl5/vendor_perl
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_libdir}/perl5/vendor_perl/auto
|
|
|
4c4feb |
|
|
|
4c4feb |
%if 0%{?rhel} >= 7
|
|
|
4c4feb |
install -d %{buildroot}%{dockerfiledir}
|
|
|
4c4feb |
install -d -p -m 755 %{buildroot}%{dockerfiledir}/rhel7
|
|
|
4c4feb |
collections="devtoolset-7-toolchain-docker devtoolset-7-perftools-docker"
|
|
|
4c4feb |
for d in $collections; do
|
|
|
4c4feb |
install -d -p -m 755 %{buildroot}%{dockerfiledir}/rhel7/$d
|
|
|
4c4feb |
cp -a $d %{buildroot}%{dockerfiledir}/rhel7
|
|
|
4c4feb |
done
|
|
|
4c4feb |
%endif
|
|
|
4c4feb |
|
|
|
4c4feb |
# Install generated man page.
|
|
|
4c4feb |
install -d -m 755 %{buildroot}%{_mandir}/man7
|
|
|
4c4feb |
install -p -m 644 %{?scl_name}.7 %{buildroot}%{_mandir}/man7/
|
|
|
4c4feb |
|
|
|
4c4feb |
%files
|
|
|
4c4feb |
%doc README
|
|
|
4c4feb |
%{_mandir}/man7/%{?scl_name}.*
|
|
|
4c4feb |
|
|
|
4c4feb |
%files runtime
|
|
|
4c4feb |
%scl_files
|
|
|
4c4feb |
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/selinux-equiv.created
|
|
|
4c4feb |
%dir %{_scl_root}/etc/alternatives
|
|
|
4c4feb |
%dir %{_datadir}/appdata
|
|
|
4c4feb |
|
|
|
4c4feb |
%files build
|
|
|
4c4feb |
%{_root_sysconfdir}/rpm/macros.%{scl}*
|
|
|
4c4feb |
|
|
|
4c4feb |
%files toolchain
|
|
|
4c4feb |
|
|
|
4c4feb |
%files perftools
|
|
|
4c4feb |
|
|
|
4c4feb |
%if 0%{?rhel} >= 7
|
|
|
4c4feb |
%files dockerfiles
|
|
|
4c4feb |
%{dockerfiledir}
|
|
|
4c4feb |
%endif
|
|
|
4c4feb |
|
|
|
4c4feb |
%post runtime
|
|
|
4c4feb |
if [ ! -f %{_sysconfdir}/selinux-equiv.created ]; then
|
|
|
4c4feb |
/usr/sbin/semanage fcontext -a -e / %{_scl_root}
|
|
|
4c4feb |
restorecon -R %{_scl_root}
|
|
|
4c4feb |
touch %{_sysconfdir}/selinux-equiv.created
|
|
|
4c4feb |
fi
|
|
|
4c4feb |
|
|
|
4c4feb |
%preun runtime
|
|
|
4c4feb |
[ $1 = 0 ] && rm -f %{_sysconfdir}/selinux-equiv.created || :
|
|
|
4c4feb |
|
|
|
4c4feb |
%postun runtime
|
|
|
4c4feb |
if [ $1 = 0 ]; then
|
|
|
4c4feb |
/usr/sbin/semanage fcontext -d %{_scl_root}
|
|
|
4c4feb |
[ -d %{_scl_root} ] && restorecon -R %{_scl_root} || :
|
|
|
4c4feb |
fi
|
|
|
4c4feb |
|
|
|
4c4feb |
%changelog
|
|
|
19b2e0 |
* Fri Feb 23 2018 Marek Polacek <polacek@redhat.com> - 7.1-4
|
|
|
19b2e0 |
- add dyninst library path to LD_LIBRARY_PATH (#1540169)
|
|
|
19b2e0 |
|
|
|
19b2e0 |
* Tue Feb 20 2018 Marek Polacek <polacek@redhat.com> - 7.1-3
|
|
|
19b2e0 |
- revert to old devtoolset-7-runtime Requires for RHEL 6
|
|
|
19b2e0 |
|
|
|
19b2e0 |
* Tue Feb 13 2018 Marek Polacek <polacek@redhat.com> - 7.1-2
|
|
|
19b2e0 |
- fix devtoolset-7-runtime Requires
|
|
|
19b2e0 |
|
|
|
19b2e0 |
* Tue Dec 12 2017 Marek Polacek <polacek@redhat.com> - 7.1-1
|
|
|
19b2e0 |
- update for DTS 7.1
|
|
|
19b2e0 |
|
|
|
4c4feb |
* Fri Oct 06 2017 Marek Polacek <polacek@redhat.com> - 7.0-8
|
|
|
4c4feb |
- don't Require gcc for dockerfiles (#1499232)
|
|
|
4c4feb |
|
|
|
4c4feb |
* Thu Aug 24 2017 Marek Polacek <polacek@redhat.com> - 7.0-7
|
|
|
4c4feb |
- drop devtoolset-7-{all,go,llvm,rust}
|
|
|
4c4feb |
|
|
|
4c4feb |
* Tue Aug 8 2017 Marek Polacek <polacek@redhat.com> - 7.0-6
|
|
|
4c4feb |
- update dockerfiles
|
|
|
4c4feb |
|
|
|
4c4feb |
* Mon Jul 3 2017 Marek Polacek <polacek@redhat.com> - 7.0-5
|
|
|
4c4feb |
- the Go toolset is not available on ppc64 (#1466198)
|
|
|
4c4feb |
|
|
|
4c4feb |
* Mon Jul 3 2017 Marek Polacek <polacek@redhat.com> - 7.0-4
|
|
|
4c4feb |
- drop devtoolset-7-{go,llvm,rust} on rhel6 and don't require
|
|
|
4c4feb |
them in -all on rhel6 (#1467194)
|
|
|
4c4feb |
|
|
|
19b2e0 |
* Thu Jun 15 2017 Marek Polacek <polacek@redhat.com> - 7.0-3
|
|
|
19b2e0 |
- bump Release for rebuild
|
|
|
19b2e0 |
|
|
|
4c4feb |
* Wed Jun 7 2017 Marek Polacek <polacek@redhat.com> - 7.0-2
|
|
|
4c4feb |
- update %files for the recently added subpackages
|
|
|
4c4feb |
|
|
|
4c4feb |
* Wed Jun 7 2017 Marek Polacek <polacek@redhat.com> - 7.0-1
|
|
|
4c4feb |
- add devtoolset-7-{go,llvm,rust,all} subpackages
|
|
|
4c4feb |
|
|
|
4c4feb |
* Thu May 25 2017 Marek Polacek <polacek@redhat.com> - 7.0-0
|
|
|
4c4feb |
- initial version, with old dockerfiles (#1455129)
|