Compare commits

...

30 Commits

Author SHA1 Message Date
Václav Kadlčík
9ddf8ccb93 Standardize tier1 in gating
The tier1 tests were traditionally run by BaseOS CI by various
tasks if the baseos-ci.brew-build.* family, typically implemented
by Beaker jobs.

Every component used to have its own special flavor of the
configuration, both in BaseOS CI (the triggering part) and here in
the component's gating.yaml (results processing).

The each-component-is-a-snowflake approach didn't work very well,
creating discrepancies like RHEL-140879.

At long last, I've unified the BaseOS CI configuration for all my
components:
- drop the Beaker job(s) (which have been declared obsoleted anyway)
- trigger two OpenStack jobs
  - "fast lane" for architectures where we usually get results fast,
    sometimes it's advantageous to take a look ASAP
  - "slow lane" for architectures we typically have to wait
For reference, it's commit d2baef686 in baseos-qe/citool-config.

Now I'm fixing the counterpart in gating.yaml (results processing):
We wait for the "fast lane" and "slow lane" results and they both
must pass.
2026-02-13 14:33:35 +01:00
Václav Kadlčík
2b1f7d4138 Extend tier0 coverage
Replace the existing STI smoke test with a reference to the top tie of
https://gitlab.com/redhat/centos-stream/tests/gcc-toolset-metapackage
2025-09-10 14:12:55 +02:00
Siddhesh Poyarekar
fc829baa2d Bump again for rebuild
Related: RHEL-96490
2025-07-03 12:05:19 -04:00
Siddhesh Poyarekar
56031b3b77 It's not Friday yet
Related: RHEL-96490
2025-07-03 10:18:28 -04:00
Siddhesh Poyarekar
af405a46d6 Bump for rebuild
Related: RHEL-96490
2025-07-03 08:56:18 -04:00
Siddhesh Poyarekar
a410d8180e Specify a better man page name
Related: RHEL-96490
2025-06-21 06:59:56 -04:00
Siddhesh Poyarekar
d8fd8a639c Require the same version of runtime package
Related: RHEL-96490
2025-06-20 08:28:53 -04:00
Siddhesh Poyarekar
a4ac00497e Amend the bug reporting link
Related: RHEL-96490
2025-06-20 06:21:27 -04:00
Siddhesh Poyarekar
7a9672af5c Compress man page and fix its name
Resolves: RHEL-96490
2025-06-20 05:44:30 -04:00
Siddhesh Poyarekar
5c5559450d Fix typo in gcc-toolset-env
Resolves: RHEL-94760
2025-06-11 07:22:19 -04:00
Siddhesh Poyarekar
e9f80772b4 Support scl-style quoted invocations
Resolves: RHEL-94760
2025-06-11 06:32:11 -04:00
Siddhesh Poyarekar
bbdc77bc40 Remove redundant version number form version string
Resolves: RHEL-95996
2025-06-10 21:11:29 -04:00
Siddhesh Poyarekar
77d16d4430 ChangeLog entries for man page updates
Resolves: RHEL-95996
2025-06-10 15:53:03 -04:00
Siddhesh Poyarekar
3427fc4bda Drop quoting from commands
Resolves: RHEL-95996
2025-06-10 15:53:01 -04:00
Siddhesh Poyarekar
2dfcb4dc08 Mention only major version in documentation
Point release updates have no significance for the meta package.

Resolves: RHEL-95996
2025-06-10 15:52:53 -04:00
Siddhesh Poyarekar
ced527c67f Install man pages in _root_mandir
One shouldn't need to invoke gcc-toolset-env (or scl) to read about
gcc-toolset.

Resolves: RHEL-95996
2025-06-10 15:52:36 -04:00
Siddhesh Poyarekar
99843ffec7 Move scripts to gcc-toolset-15-runtime
Resolves: RHEL-94841
2025-06-04 16:17:40 -04:00
Siddhesh Poyarekar
574ad5d274 Fix quoting and other issues in gcc-toolset-env script
Resolves: RHEL-94760
2025-06-04 15:14:55 -04:00
Siddhesh Poyarekar
1a67fd6f9b Drop PCP_DIR
PCP is no longer part of GTS.

Related: RHEL-88743
2025-05-15 12:20:15 -04:00
Siddhesh Poyarekar
87488aeddb Drop mention of Software collections from all documentation
Resolves: RHEL-88743
2025-05-15 12:20:15 -04:00
Siddhesh Poyarekar
6890fadb85 New script gcc-toolset-15-env
Add a new script to replace the `scl enable` command.  Also update the
`enable_devtoolset` macro to instead be called `enable_gcctoolset` and
have it use a new installed script instead of an SCL snippet.

Resolves: RHEL-88743
2025-05-15 12:20:15 -04:00
Siddhesh Poyarekar
b2b180e27a Add README and gts-annobin-plugin-select.sh to git
Move it out of the lookaside cache so that changes can be tracked more
easily.

Related: RHEL-81745
Resolves: RHEL-88742
2025-05-08 06:56:39 -04:00
Siddhesh Poyarekar
435318cd81 Drop the sudo wrapper script
Related: RHEL-81745
Resolves: RHEL-88742
2025-05-08 06:56:36 -04:00
Siddhesh Poyarekar
65b4317cf2 Split out a devel package
That should break the circular dependency with gts-gcc and gts-binutils.

Related: RHEL-81745
Resolves: RHEL-88742
2025-05-08 06:56:32 -04:00
Siddhesh Poyarekar
e527cb6052 c10s: Drop scl dependency
Bundle in a modified version of the SCL macros file and adjust uses.

Resolves: RHEL-88742
2025-05-08 06:56:17 -04:00
Siddhesh Poyarekar
b0073c2605 Initial version
Based on commit 91444113e6, adapted for
RHEL10.

Resolves: RHEL-81745
2025-05-08 06:50:51 -04:00
Johnny Hughes
9dd1813ec1 remove dead.package info
Signed-off-by: Johnny Hughes <jhughes@redhat.com>
2025-04-22 11:35:26 -05:00
Johnny Hughes
d39a88801b Merge remote-tracking branch 'rhel/rhel-10-main' into c10s 2025-04-22 11:17:00 -05:00
Johnny Hughes
d029c67c0c Reset branch contents to only include README.md and dead.package. 2025-04-08 17:53:03 +00:00
Release Configuration Management
2744326db2 New branch setup 2025-04-08 07:19:16 -04:00
10 changed files with 738 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

28
README Normal file
View File

@ -0,0 +1,28 @@
Package %{scl_name} is the main package for Red Hat GCC
Toolset 15. By installing the %{scl_name} package, you will get
the working set of packages that are included in Red Hat GCC
Toolset 15, which includes the compiler and linker.
Usage: %{scl_name}-env [command]
Red Hat GCC Toolset allows you to build and execute applications
which are not located in the filesystem root hierarchy, but are
stored in an alternative location, which is %{_scl_root} in case
of %{scl_name}.
Examples:
%{scl_name}-env
Run an interactive shell wherein %{scl_name} is enabled.
%{scl_name}-env command --arg
Run a specific command with the argument --arg within the %{scl_name}
Red Hat GCC Toolset environment.
%{scl_name}-env gcc
Run GCC from the %{scl_name} Red Hat GCC Toolset.
%{scl_name}-env man gcc
Show man pages for the gcc command, which is a part of the
%{scl_name} Red Hat GCC Toolset.
Report bugs to <%{dist_bug_report_url}>.

21
enable.in Normal file
View File

@ -0,0 +1,21 @@
# General environment variables
export PATH=%{_bindir}${PATH:+:${PATH}}
export MANPATH=%{_mandir}${MANPATH:+:${MANPATH}}
export INFOPATH=%{_infodir}${INFOPATH:+:${INFOPATH}}
# bz847911 workaround:
# we need to evaluate rpm's installed run-time % { _libdir }, not rpmbuild time
# or else /etc/ld.so.conf.d files?
rpmlibdir=$(rpm --eval "%%{_libdir}")
# bz1017604: On 64-bit hosts, we should include also the 32-bit library path.
# bz1873882: On 32-bit hosts, we should include also the 64-bit library path.
# bz2027377: Avoid unbound variables
if [ "$rpmlibdir" != "${rpmlibdir/lib64/}" ]; then
rpmlibdir32=":%{_scl_root}${rpmlibdir/lib64/lib}"
rpmlibdir64=
else
rpmlibdir64=":%{_scl_root}${rpmlibdir/lib/lib64}"
rpmlibdir32=
fi
# Prepend the usual /opt/.../usr/lib{64,}.
export LD_LIBRARY_PATH=%{_scl_root}$rpmlibdir$rpmlibdir64$rpmlibdir32${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}

7
gating.yaml Normal file
View File

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}

304
gcc-toolset-15.spec Normal file
View File

@ -0,0 +1,304 @@
%global __python /usr/bin/python3
%global gts_ver 15
%global scl gcc-toolset-%{gts_ver}
%global scl_prefix gcc-toolset-%{gts_ver}-
%global scl_name %scl
# We moved away from scl-utils in RHEL10. Instead, we have bundled in the
# minimal macro hackery necessary to build GTS into the same root to give us
# the necessary isolation and allow an equivalent of `scl enable` since that's
# a common way to use GTS.
#
# Some day we will move away from the 'scl' names, but today is not that day.
%if 0%{?rhel} >= 10
%global have_scl_utils 0
%else
%global have_scl_utils 1
%endif
# GTS only has gcc and binutils in RHEL9 and later.
%if 0%{?rhel} >= 9
%global gts_only_gcc_binutils 1
%else
%global gts_only_gcc_binutils 0
%endif
%if %have_scl_utils
%global long_name %scl Software Collection
%global version_string GCC-Toolset %{gts_ver} Software Collection
BuildRequires: scl-utils-build
%else
%global long_name GCC Toolset %gts_ver
%global version_string GCC-Toolset %{gts_ver}
%include %{_sourcedir}/macros.gts
%endif
%{?scl_package:%scl_package %scl}
Summary: Package that installs %scl
Name: %scl_name
Version: %{gts_ver}.0
Release: 11%{?dist}
License: GPLv2+
Group: Applications/File
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: README
Source2: gts-annobin-plugin-select.sh
Source3: macros.gts
Source4: enable.in
Source5: gcc-toolset-env.in
Requires: %{scl_prefix}runtime == %{version}-%{release}
Requires: %{scl_prefix}gcc %{scl_prefix}gcc-c++ %{scl_prefix}gcc-gfortran
Requires: %{scl_prefix}binutils
# None of these are in GTS in RHEL9 and later.
%if %gts_only_gcc_binutils == 0
Requires: %{scl_prefix}gdb
Requires: %{scl_prefix}dwz
Requires: %{scl_prefix}annobin-plugin-gcc
%endif
Obsoletes: %{name} < %{version}-%{release}
Obsoletes: %{scl_prefix}dockerfiles < %{version}-%{release}
BuildRequires: iso-codes
BuildRequires: help2man
%if 0%{?rhel} >= 8
BuildRequires: python3-devel
%endif
%if %gts_only_gcc_binutils == 0
%global rrcdir %{_scl_root}/usr/lib/rpm/redhat
%endif
%description
This is the main package for %long_name.
%package runtime
Summary: Package that handles %long_name.
Group: Applications/File
Obsoletes: %{name}-runtime < %{version}-%{release}
%if %have_scl_utils
Requires: scl-utils >= 20120927-11
%if 0%{?rhel} >= 7
%{?scl_package:Requires(post): %{_root_sbindir}/semanage %{_root_sbindir}/restorecon}
%{?scl_package:Requires(postun): %{_root_sbindir}/semanage %{_root_sbindir}/restorecon}
%else
Requires(post): libselinux policycoreutils-python
Requires(postun): libselinux policycoreutils-python
%endif
%endif
%description runtime
Package shipping essential scripts to work with %long_name.
%if %have_scl_utils == 0
%package devel
Summary: Scripts needed to build %long_name.
Group: Applications/File
Conflicts: scl-utils-build
%description devel
Package shipping scripts to build %long_name.
%endif
%prep
%setup -c -T
# This section generates README file from a template and creates man page
# from that file, expanding RPM macros in the template file.
cat <<'EOF' | tee README
%{expand:%(cat %{SOURCE0})}
EOF
%build
# Temporary helper script used by help2man.
cat <<\EOF | tee h2m_helper
#!/bin/sh
if [ "$1" = "--version" ]; then
printf '%%s' "%{version_string}"
else
cat README
fi
EOF
chmod a+x h2m_helper
# Generate the man page.
help2man -n "GNU project C, C++ and Fortran compiler and linker" -N --section 7 ./h2m_helper -o %{?scl_name}.7
gzip %{?scl_name}.7
# Enable collection script
# ========================
cat <<'EOF' | tee enable
%{expand:%(cat %{SOURCE4})}
EOF
%if %have_scl_utils == 0
cat <<'EOF' | tee gcc-toolset-%{gts_ver}-env
%{expand:%(cat %{SOURCE5})}
EOF
%endif
%install
%if %have_scl_utils
(%{scl_install})
# We no longer need this, and it would result in an "unpackaged but
# installed" error.
rm -rf %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
%else
mkdir -p %{buildroot}%{_root_sysconfdir}/rpm
# RPM macro weirdness: when it's explicitly included like in this spec file, it
# expects the %%define but when it is installed as a macro file, it cannot
# handle the %%define and instead expects %%<macro name> directly.
sed 's/^%%define scl_/%%scl_/' %{SOURCE3} > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-build
%endif
%if %have_scl_utils
%define source_cmd source scl_source enable %{scl}
%else
%define source_cmd source %{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source
%endif
# This allows users to build packages using DTS/GTS.
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-enable << EOF
%%enable_gcctoolset%{gts_ver} %%global ___build_pre %%{___build_pre}; %source_cmd || :
EOF
%if %have_scl_utils
# Without SCL we just let gcc-toolset-*-binutils own this and use the
# --altdir/--admindir mechanism.
mkdir -p %{buildroot}%{_scl_root}/etc/alternatives %{buildroot}%{_scl_root}/var/lib/alternatives
install -d -m 755 %{buildroot}%{_scl_scripts}
install -p -m 755 enable %{buildroot}%{_scl_scripts}/
%if %gts_only_gcc_binutils == 0
# Other directories that should be owned by the runtime
install -d -m 755 %{buildroot}%{_datadir}/appdata
# Otherwise unowned perl directories
install -d -m 755 %{buildroot}%{_libdir}/perl5
install -d -m 755 %{buildroot}%{_libdir}/perl5/vendor_perl
install -d -m 755 %{buildroot}%{_libdir}/perl5/vendor_perl/auto
# Install the plugin selector trigger script.
mkdir -p %{buildroot}%{rrcdir}
install -p -m 755 %{SOURCE2} %{buildroot}%{rrcdir}/
%endif
%else
install -d -m 755 %{buildroot}%{_root_bindir}
install -p -m 755 gcc-toolset-%{gts_ver}-env %{buildroot}%{_root_bindir}/
install -d -m 755 %{buildroot}%{_root_prefix}/lib/gcc-toolset
install -p -m 755 enable %{buildroot}%{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source
%endif
# Install generated man page.
install -d -m 755 %{buildroot}%{_root_mandir}/man7
install -p -m 644 %{?scl_name}.7.gz %{buildroot}%{_root_mandir}/man7/
%if %have_scl_utils == 0
pushd %{buildroot}%{_root_mandir}/man7/
ln -s ./%{?scl_name}.7.gz gcc-toolset-%{gts_ver}-env.7.gz
popd
%endif
# This trigger is used to decide which version of the annobin plugin for gcc
# should be used. See comments in the script for full details.
%if %gts_only_gcc_binutils == 0
%triggerin runtime -- %{scl_prefix}annobin-plugin-gcc %{scl_prefix}gcc-plugin-annobin
%{rrcdir}/gts-annobin-plugin-select.sh %{_scl_root}
%end
# We also trigger when annobin is uninstalled. This allows us to switch
# over to the gcc generated version of the plugin. It does not matter if
# gcc is uninstalled, since if that happens the plugin cannot be used.
%triggerpostun runtime -- %{scl_prefix}annobin-plugin-gcc
%{rrcdir}/gts-annobin-plugin-select.sh %{_scl_root}
%end
%endif
%files
%doc README
%if %have_scl_utils
%{_root_mandir}/man7/%{?scl_name}.*
%endif
%files runtime
%{_root_sysconfdir}/rpm/macros.%{scl}-enable
%if %have_scl_utils
%if %gts_only_gcc_binutils == 0
%attr(0755,-,-) %{rrcdir}/gts-annobin-plugin-select.sh
%dir %{_datadir}/appdata
%endif
%scl_files
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/selinux-equiv.created
%dir %{_scl_root}/etc/alternatives
%else
%{_root_mandir}/man7/%{?scl_name}.*
%{_root_mandir}/man7/gcc-toolset-%{gts_ver}-env.*
%{_root_bindir}/gcc-toolset-%{gts_ver}-env
%{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source
%endif
%if %have_scl_utils
%post runtime
if [ ! -f %{_sysconfdir}/selinux-equiv.created ]; then
/usr/sbin/semanage fcontext -a -e / %{_scl_root}
restorecon -R %{_scl_root}
touch %{_sysconfdir}/selinux-equiv.created
fi
%preun runtime
[ $1 = 0 ] && rm -f %{_sysconfdir}/selinux-equiv.created || :
%postun runtime
if [ $1 = 0 ]; then
/usr/sbin/semanage fcontext -d %{_scl_root}
[ -d %{_scl_root} ] && restorecon -R %{_scl_root} || :
fi
%endif
%if %have_scl_utils == 0
%files devel
%{_root_sysconfdir}/rpm/macros.%{scl}-build
%endif
%changelog
* Thu Jul 3 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-11
- Bump again for rebuild (RHEL-96490)
* Thu Jul 3 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-10
- Bump for rebuild (RHEL-96490)
* Fri Jun 20 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-9
- Compress man page and fix its name (RHEL-96490)
* Wed Jun 11 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-8
- Fix typo in gcc-toolset-env (RHEL-94760)
* Tue Jun 10 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-7
- Man page and documentation updates (RHEL-95996)
- Support scl-style quoted invocation (RHEL-94760)
* Thu Jun 5 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-6
- Split out scripts into a -runtime package on RHEL10 (RHEL-94841)
* Wed Jun 4 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-5
- Fix quoting and other issues in gcc-toolset-env script (RHEL-94760)
* Thu May 15 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-4
- New script to replace scl-enable (RHEL-88743).
* Thu May 8 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-3
- Drop the sudo wrapper script.
* Mon May 5 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-2
- Split out a devel package to break the dependency look with gts-gcc and
gts-binutils.
* Mon May 5 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-1
- Drop scl-utils dependency on c10s and later.
* Wed Apr 30 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 15.0-0
- new package (RHELPLAN-171631)

14
gcc-toolset-env.in Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/sh
# Environment wrapper for GCC Toolset %{gts_ver}
. %{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source
if [ -z "$1" ]; then
exec /usr/bin/sh
# Compatibility with `scl enable`, where the entire command shows up as a
# single argument.
elif [ -z "$2" ]; then
exec sh -c "$@"
else
exec "$@"
fi

View File

@ -0,0 +1,226 @@
#!/usr/bin/sh
# This is a script to switch the symlinks in a GTS gcc's plugin
# directory so that they select either the GTS-annobin provided
# plugin or the GTS-gcc provided plugin.
# Author: Nick Clifton <nickc@redhat.com>
# Copyright (c) 2021-2022 Red Hat.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your
# option) any later version.
# It is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Usage:
# gts-annobin-plugin-select scl_root
#
# Set this variable to non-zero to enable the generation of debugging
# messages.
debug=0
if test "x$1" = "x" ;
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Must provide a root directory"
fi
exit 1
else
scl_root=$1
fi
# This script is similar to the redhat-annobin-plugin-select.sh script which
# is part of the redhat-rpm-config package. That scripts decides between two
# versions of the annobin plugin for the system compiler and stores it choice
# in a symlink in the /usr/lib/rpm/redhat directory. The choice eventually
# resolves into the system gcc attempting to load either a plugin called
# annobin.so or a plugin called gcc-annobin.so.
# In a GTS environment the choice made by redhat-annobin-plugin-select.sh
# might not be appropriate (or even possible). The choice cannot be changed
# because the system compilation environment must remain instact. So instead
# the GTS versions of gcc and annobin install plugins called gts-annobin.so
# and gts-gcc-annobin.so (into the GTS gcc's plugin directory) and this script
# creates a pair of symlinks called annobin.so and gcc-annobin.so. In this
# way the decision made by redhat-annobin-plugin-select.sh is overridden
# without affecting any system files.
# We cannot be sure that this script will run inside a GTS enabled shell,
# so we have to use absolute paths.
gts_gcc=$scl_root/usr/bin/gcc
if [ ! -x $gts_gcc ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Could not find gcc. Expected: $gts_gcc"
fi
exit 0
fi
# This is where the annobin package stores the information on the version
# of gcc that built the annobin plugin.
aver=`$gts_gcc --print-file-name=plugin`/annobin-plugin-version-info
# This is where the gcc package stores its version information.
gver=`$gts_gcc --print-file-name=rpmver`
aplugin=`$gts_gcc --print-file-name=plugin`/gts-annobin.so.0.0.0
gplugin=`$gts_gcc --print-file-name=plugin`/gts-gcc-annobin.so.0.0.0
install_annobin_version=0
install_gcc_version=0
if [ -f $aplugin ]
then
if [ -f $gplugin ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Both plugins exist, checking version information"
fi
if [ -f $gver ]
then
if [ -f $aver ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Both plugin version files exist - comparing..."
fi
# Get the first line from the version info files. This is just in
# case there are extra lines in the files.
avers=`head --lines=1 $aver`
gvers=`head --lines=1 $gver`
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Annobin plugin built by gcc $avers"
echo " gts-annobin-plugin-select: GCC plugin built by gcc $gvers"
fi
# If both plugins were built by the same version of gcc then select
# the one from the annobin package (in case it is built from newer
# sources). If the plugin builder versions differ, select the gcc
# built version instead. This assumes that the gcc built version
# always matches the installed gcc, which should be true.
if [ $avers = $gvers ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Both plugins built by the same compiler - using annobin-built plugin"
fi
install_annobin_version=1
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Versions differ - using gcc-built plugin"
fi
install_gcc_version=1
fi
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Annobin version file does not exist, using gcc-built plugin"
fi
install_gcc_version=1
fi
else
if [ -f $aver ]
then
# FIXME: This is suspicious. If the installed GCC does not supports plugins
# then enabling the annobin plugin will not work.
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: GCC plugin version file does not exist, using annobin-built plugin"
fi
install_annobin_version=1
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Neither version file exists - playing safe and using gcc-built plugin"
echo " gts-annobin-plugin-select: Note: expected to find $aver and/or $gver"
fi
install_gcc_version=1
fi
fi
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Only the annobin plugin exists - using that"
fi
install_annobin_version=1
fi
else
if [ -f $gplugin ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Only the gcc plugin exists - using that"
fi
install_gcc_version=1
else
aplugin=`$gts_gcc --print-file-name=plugin`/annobin.so.0.0.0
if [ -f $aplugin ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Original annobin plugin exists - renaming"
echo " gts-annobin-plugin-select: Using renamed original annobin plugin"
fi
pushd `$gts_gcc --print-file-name=plugin` > /dev/null
mv annobin.so.0.0.0 gts-annobin.so.0.0.0
popd > /dev/null
install_annobin_version=1
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Neither plugin exists - playing safe and not changing anything"
echo " gts-annobin-plugin-select: Note: expected to find $aplugin and/or $gplugin"
fi
fi
fi
fi
if [ $install_annobin_version -eq 1 ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Setting symlinks for the annobin version of the plugin"
fi
pushd `$gts_gcc --print-file-name=plugin` > /dev/null
rm -f gcc-annobin.so.0.0.0 annobin.so.0.0.0 gcc-annobin.so annobin.so
ln -s gts-annobin.so.0.0.0 annobin.so
ln -s gts-annobin.so.0.0.0 gcc-annobin.so
ln -s gts-annobin.so.0.0.0 annobin.so.0.0.0
ln -s gts-annobin.so.0.0.0 gcc-annobin.so.0.0.0
popd > /dev/null
else if [ $install_gcc_version -eq 1 ]
then
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: Setting symlinks for the gcc version of the plugin"
fi
pushd `$gts_gcc --print-file-name=plugin` > /dev/null
rm -f gcc-annobin.so.0.0.0 annobin.so.0.0.0 gcc-annobin.so annobin.so
ln -s gts-gcc-annobin.so.0.0.0 annobin.so
ln -s gts-gcc-annobin.so.0.0.0 gcc-annobin.so
ln -s gts-gcc-annobin.so.0.0.0 annobin.so.0.0.0
ln -s gts-gcc-annobin.so.0.0.0 gcc-annobin.so.0.0.0
popd > /dev/null
else
if [ $debug -eq 1 ]
then
echo " gts-annobin-plugin-select: NOT CHANGING SYMLINKS"
fi
fi
fi

109
macros.gts Normal file
View File

@ -0,0 +1,109 @@
# scl-utils RPM macros
#
# Copyright (C) 2012 Red Hat, Inc.
# Written by Jindrich Novy <jnovy@redhat.com>.
%define scl_debug() %{expand:
%define old_debug %{lua:print(rpm.expand("%{debug_package}"):len())}
%undefine _debugsource_packages
%global debug_package %{expand:
%if "%{?old_debug}" == "0"
%{expand: %{nil}}
%else
%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
%{expand: %{nil}}
%else
%ifnarch noarch
%package debuginfo
Summary: Debug information for package %{name}
Group: Development/Debug
AutoReqProv: 0
%{lua:
debuginfo=tonumber(rpm.expand("%{old_debug}"))
if debuginfo > 0 then
rpm.define("__debug_package 1")
end
}
%description debuginfo
This package provides debug information for package %{name}.
Debug information is useful when developing applications that use this
package or when debugging this package.
%files debuginfo -f debugfiles.list
%defattr(-,root,root)
%endif
%endif
%endif
%{nil}}}
%define scl_prefix() %{?scl:%(if [ "%1" = "%%1" ]; then echo "%{scl}-"; else echo "%1-"; fi)}%{!?scl:%{nil}}
%define scl_package() %{expand:%{!?_root_prefix:
%global pkg_name %1
%global scl_name %{scl}
%global scl_runtime %{scl}-runtime
%global scl_basedir /opt
%{!?scl_vendor: %global scl_vendor rh}
%{!?_scl_prefix: %global _scl_prefix %{scl_basedir}/%{scl_vendor}}
%global _scl_scripts %{_scl_prefix}/%{scl}
%global _scl_root %{_scl_prefix}/%{scl}/root
%global _root_prefix %{_prefix}
%global _root_exec_prefix %{_root_prefix}
%global _root_bindir %{_exec_prefix}/bin
%global _root_sbindir %{_exec_prefix}/sbin
%global _root_libexecdir %{_exec_prefix}/libexec
%global _root_datadir %{_prefix}/share
%global _root_sysconfdir %{_sysconfdir}
%global _root_sharedstatedir %{_sharedstatedir}
%global _root_localstatedir %{_localstatedir}
%global _root_libdir %{_exec_prefix}/%{_lib}
%global _root_includedir %{_prefix}/include
%global _root_infodir %{_datadir}/info
%global _root_mandir %{_datadir}/man
%global _root_initddir %{_sysconfdir}/rc.d/init.d
%global _prefix %{_scl_root}/usr
%global _exec_prefix %{_prefix}
%global _bindir %{_exec_prefix}/bin
%global _sbindir %{_exec_prefix}/sbin
%global _libexecdir %{_exec_prefix}/libexec
%global _datadir %{_prefix}/share
%global _sysconfdir %{_scl_root}/etc
%{?nfsmountable: %global _sysconfdir %{_root_sysconfdir}%{_scl_prefix}/scls/%{scl}}
%{?rh_layout: %global _sysconfdir %{_root_sysconfdir}%{_scl_prefix}/%{scl}}
%global _sharedstatedir %{_scl_root}/var/lib
%{?nfsmountable: %global _sharedstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}/lib}
%{?rh_layout: %global _sharedstatedir %{_root_localstatedir}%{_scl_prefix}/%{scl}/lib}
%global _localstatedir %{_scl_root}/var
%{?nfsmountable: %global _localstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}}
%{?rh_layout: %global _localstatedir %{_root_localstatedir}%{_scl_prefix}/%{scl}}
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _infodir %{_datadir}/info
%global _mandir %{_datadir}/man
%global _docdir %{_datadir}/doc
%global _defaultdocdir %{_docdir}
}
%{?scl_dependency_generators:%scl_dependency_generators}
%global scl_pkg_name %{scl}-%{pkg_name}
%scl_debug
%global __os_install_post %{expand:
/usr/lib/rpm/brp-compress %{_scl_root}/usr
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
}
/usr/lib/rpm/brp-strip-static-archive %{__strip}
[ -f /usr/lib/rpm/redhat/brp-python-hardlink ] && /usr/lib/rpm/redhat/brp-python-hardlink || /usr/lib/rpm/brp-python-hardlink
%{nil}}
%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
%endif
%{?scl_package_override:%scl_package_override}
}
%define scl_require() %{_scl_prefix}/%1/enable, %1
%define scl_require_package() %1-%2
%define scl_enable_script() %{expand:
cat >> %{buildroot}%{_scl_scripts}/enable << 'EOF'
eval `/usr/bin/modulecmd bash load %{scl}`
EOF
}

28
plans/tier0.fmf Normal file
View File

@ -0,0 +1,28 @@
# Tier 0 test plan. It's actually Tier 1
# - limited to its public part
# - executed on the architecture at hand
# When run by osci.tier0 on CentOS Stream or RHEL, it receives the following
# context:
# arch=x86_64 (the architecture at hand, currently OSCI uses just x86_64)
# distro=rhel<M>.<m> (even for CentOS Stream builds)
# trigger=build
summary: Tier 0 test plan
context:
component: gcc-toolset-15
discover:
- name: collect_info
how: shell
tests:
- name: /info/rpms
test: rpm -qa --last
- name: public_tests
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/gcc-toolset-metapackage.git
filter: tier:1
execute:
how: tmt
prepare+:
how: shell
environment+:
WITH_SCL: gcc-toolset-15-env

0
sources Normal file
View File