Compare commits
No commits in common. "rawhide" and "f24" have entirely different histories.
17 changed files with 453 additions and 309 deletions
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
37
README
Normal file
37
README
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
The colorgcc is a perl script written by Jamie Moyers to colorize the
|
||||||
|
terminal output of C++, CC, CCACHE, G++, GCC so error messages can be
|
||||||
|
found within longer compiler outputs.
|
||||||
|
|
||||||
|
Homepage:
|
||||||
|
|
||||||
|
http://schlueters.de/colorgcc.html
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Call the compiler name with the 'color-' prefix, eg:
|
||||||
|
|
||||||
|
color-gcc
|
||||||
|
color-g++
|
||||||
|
color-cc
|
||||||
|
color-c++
|
||||||
|
|
||||||
|
That's it. Alternatively you may want to create following handy aliases:
|
||||||
|
|
||||||
|
alias gcc='color-gcc'
|
||||||
|
alias g++='color-g++'
|
||||||
|
alias cc='color-cc'
|
||||||
|
alias c++='color-c++'
|
||||||
|
|
||||||
|
The default settings can be overridden with ~/.colorgccrc. See the
|
||||||
|
comments in the packaged sample config file for more information.
|
||||||
|
|
||||||
|
Note:
|
||||||
|
|
||||||
|
colorgcc will only emit color codes if:
|
||||||
|
|
||||||
|
(1) Its STDOUT is a tty and
|
||||||
|
(2) the value of $TERM is not listed in the "nocolor" option.
|
||||||
|
|
||||||
|
If colorgcc colorizes the output, the compiler's STDERR will be combined
|
||||||
|
with STDOUT. Otherwise, colorgcc just passes the output from the
|
||||||
|
compiler through without modification.
|
||||||
17
colorgcc-1.3.2-bz1078180.patch
Normal file
17
colorgcc-1.3.2-bz1078180.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/colorgcc.1.3.2.txt b/colorgcc.1.3.2.txt
|
||||||
|
index 258ab97..f7c4a1e 100644
|
||||||
|
--- a/colorgcc.1.3.2.txt
|
||||||
|
+++ b/colorgcc.1.3.2.txt
|
||||||
|
@@ -95,6 +95,12 @@ sub initDefaults
|
||||||
|
$compilerPaths{"color-c++"} = "c++";
|
||||||
|
$compilerPaths{"color-ccache"} = "ccache";
|
||||||
|
|
||||||
|
+ $compilerPaths{"colorgcc"} = "gcc";
|
||||||
|
+ $compilerPaths{"colorg++"} = "g++";
|
||||||
|
+ $compilerPaths{"colorcc"} = "cc";
|
||||||
|
+ $compilerPaths{"colorc++"} = "c++";
|
||||||
|
+ $compilerPaths{"colorccache"} = "ccache";
|
||||||
|
+
|
||||||
|
$nocolor{"dumb"} = "true";
|
||||||
|
|
||||||
|
$colors{"srcColor"} = color("cyan");
|
||||||
44
colorgcc-1.3.2-invocation.patch
Normal file
44
colorgcc-1.3.2-invocation.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
diff --git a/colorgcc.1.3.2.txt b/colorgcc.1.3.2.txt
|
||||||
|
index 3cc7899..258ab97 100644
|
||||||
|
--- a/colorgcc.1.3.2.txt
|
||||||
|
+++ b/colorgcc.1.3.2.txt
|
||||||
|
@@ -14,17 +14,13 @@
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
-# In a directory that occurs in your PATH _before_ the directory
|
||||||
|
-# where the compiler lives, create a softlink to colorgcc for
|
||||||
|
-# each compiler you want to colorize:
|
||||||
|
+# Call the compiler name with the 'color-' prefix, eg:
|
||||||
|
+# color-gcc
|
||||||
|
+# color-g++
|
||||||
|
+# color-cc
|
||||||
|
+# color-c++
|
||||||
|
#
|
||||||
|
-# g++ -> colorgcc
|
||||||
|
-# gcc -> colorgcc
|
||||||
|
-# cc -> colorgcc
|
||||||
|
-# etc.
|
||||||
|
-#
|
||||||
|
-# That's it. When "g++" is invoked, colorgcc is run instead.
|
||||||
|
-# colorgcc looks at the program name to figure out which compiler to run.
|
||||||
|
+# That's it.
|
||||||
|
#
|
||||||
|
# The default settings can be overridden with ~/.colorgccrc.
|
||||||
|
# See the comments in the sample .colorgccrc for more information.
|
||||||
|
@@ -93,10 +89,11 @@ use IPC::Open3;
|
||||||
|
|
||||||
|
sub initDefaults
|
||||||
|
{
|
||||||
|
- $compilerPaths{"gcc"} = "/usr/bin/gcc";
|
||||||
|
- $compilerPaths{"g++"} = "/usr/bin/g++";
|
||||||
|
- $compilerPaths{"cc"} = "/usr/bin/cc";
|
||||||
|
- $compilerPaths{"c++"} = "/usr/bin/c++";
|
||||||
|
+ $compilerPaths{"color-gcc"} = "gcc";
|
||||||
|
+ $compilerPaths{"color-g++"} = "g++";
|
||||||
|
+ $compilerPaths{"color-cc"} = "cc";
|
||||||
|
+ $compilerPaths{"color-c++"} = "c++";
|
||||||
|
+ $compilerPaths{"color-ccache"} = "ccache";
|
||||||
|
|
||||||
|
$nocolor{"dumb"} = "true";
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
diff --git a/colorgcc.pl b/colorgcc.pl
|
|
||||||
index 92bb58c..ceb31de 100755
|
|
||||||
--- a/colorgcc.pl
|
|
||||||
+++ b/colorgcc.pl
|
|
||||||
@@ -149,6 +149,18 @@ my($unfinishedQuote, $previousColor);
|
|
||||||
|
|
||||||
sub initDefaults
|
|
||||||
{
|
|
||||||
+ $compilerPaths{"color-gcc"} = "gcc";
|
|
||||||
+ $compilerPaths{"color-g++"} = "g++";
|
|
||||||
+ $compilerPaths{"color-cc"} = "cc";
|
|
||||||
+ $compilerPaths{"color-c++"} = "c++";
|
|
||||||
+ $compilerPaths{"color-ccache"} = "ccache";
|
|
||||||
+
|
|
||||||
+ $compilerPaths{"colorgcc"} = "gcc";
|
|
||||||
+ $compilerPaths{"colorg++"} = "g++";
|
|
||||||
+ $compilerPaths{"colorcc"} = "cc";
|
|
||||||
+ $compilerPaths{"colorc++"} = "c++";
|
|
||||||
+ $compilerPaths{"colorccache"} = "ccache";
|
|
||||||
+
|
|
||||||
$options{"chainedPath"} = "0";
|
|
||||||
$nocolor{"dumb"} = "true";
|
|
||||||
|
|
||||||
254
colorgcc.1.3.2.txt
Normal file
254
colorgcc.1.3.2.txt
Normal file
|
|
@ -0,0 +1,254 @@
|
||||||
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
|
#
|
||||||
|
# colorgcc
|
||||||
|
#
|
||||||
|
# Version: 1.3.2
|
||||||
|
#
|
||||||
|
# $Id: colorgcc,v 1.10 1999/04/29 17:15:52 jamoyers Exp $
|
||||||
|
#
|
||||||
|
# A wrapper to colorize the output from compilers whose messages
|
||||||
|
# match the "gcc" format.
|
||||||
|
#
|
||||||
|
# Requires the ANSIColor module from CPAN.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# In a directory that occurs in your PATH _before_ the directory
|
||||||
|
# where the compiler lives, create a softlink to colorgcc for
|
||||||
|
# each compiler you want to colorize:
|
||||||
|
#
|
||||||
|
# g++ -> colorgcc
|
||||||
|
# gcc -> colorgcc
|
||||||
|
# cc -> colorgcc
|
||||||
|
# etc.
|
||||||
|
#
|
||||||
|
# That's it. When "g++" is invoked, colorgcc is run instead.
|
||||||
|
# colorgcc looks at the program name to figure out which compiler to run.
|
||||||
|
#
|
||||||
|
# The default settings can be overridden with ~/.colorgccrc.
|
||||||
|
# See the comments in the sample .colorgccrc for more information.
|
||||||
|
#
|
||||||
|
# Note:
|
||||||
|
#
|
||||||
|
# colorgcc will only emit color codes if:
|
||||||
|
#
|
||||||
|
# (1) Its STDOUT is a tty and
|
||||||
|
# (2) the value of $TERM is not listed in the "nocolor" option.
|
||||||
|
#
|
||||||
|
# If colorgcc colorizes the output, the compiler's STDERR will be
|
||||||
|
# combined with STDOUT. Otherwise, colorgcc just passes the output from
|
||||||
|
# the compiler through without modification.
|
||||||
|
#
|
||||||
|
# Author: Jamie Moyers <jmoyers@geeks.com>
|
||||||
|
# Started: April 20, 1999
|
||||||
|
# Licence: GNU Public License
|
||||||
|
#
|
||||||
|
# Credits:
|
||||||
|
#
|
||||||
|
# I got the idea for this from a script called "color_cvs":
|
||||||
|
# color_cvs .03 Adrian Likins <adrian@gimp.org> <adrian@redhat.com>
|
||||||
|
#
|
||||||
|
# <seh4@ix.netcom.com> (Scott Harrington)
|
||||||
|
# Much improved handling of compiler command line arguments.
|
||||||
|
# exec compiler when not colorizing to preserve STDOUT, STDERR.
|
||||||
|
# Fixed my STDIN kludge.
|
||||||
|
#
|
||||||
|
# <ecarotti@athena.polito.it> (Elias S. G. Carotti)
|
||||||
|
# Corrected handling of text like -DPACKAGE=\"Package\"
|
||||||
|
# Spotted return code bug.
|
||||||
|
#
|
||||||
|
# <erwin@erwin.andreasen.org> (Erwin S. Andreasen)
|
||||||
|
# <schurchi@ucsd.edu> (Steve Churchill)
|
||||||
|
# Return code bug fixes.
|
||||||
|
#
|
||||||
|
# <rik@kde.org> (Rik Hemsley)
|
||||||
|
# Found STDIN bug.
|
||||||
|
#
|
||||||
|
# Changes:
|
||||||
|
#
|
||||||
|
# 1.3.2 Better handling of command line arguments to compiler.
|
||||||
|
#
|
||||||
|
# If we aren't colorizing output, we just exec the compiler which
|
||||||
|
# preserves the original STDOUT and STDERR.
|
||||||
|
#
|
||||||
|
# Removed STDIN kludge. STDIN being passed correctly now.
|
||||||
|
#
|
||||||
|
# 1.3.1 Added kludge to copy STDIN to the compiler's STDIN.
|
||||||
|
#
|
||||||
|
# 1.3.0 Now correctly returns (I hope) the return code of the compiler
|
||||||
|
# process as its own.
|
||||||
|
#
|
||||||
|
# 1.2.1 Applied patch to handle text similar to -DPACKAGE=\"Package\".
|
||||||
|
#
|
||||||
|
# 1.2.0 Added tty check. If STDOUT is not a tty, don't do color.
|
||||||
|
#
|
||||||
|
# 1.1.0 Added the "nocolor" option to turn off the color if the terminal type
|
||||||
|
# ($TERM) is listed.
|
||||||
|
#
|
||||||
|
# 1.0.0 Initial Version
|
||||||
|
|
||||||
|
use Term::ANSIColor;
|
||||||
|
use IPC::Open3;
|
||||||
|
|
||||||
|
sub initDefaults
|
||||||
|
{
|
||||||
|
$compilerPaths{"gcc"} = "/usr/bin/gcc";
|
||||||
|
$compilerPaths{"g++"} = "/usr/bin/g++";
|
||||||
|
$compilerPaths{"cc"} = "/usr/bin/cc";
|
||||||
|
$compilerPaths{"c++"} = "/usr/bin/c++";
|
||||||
|
|
||||||
|
$nocolor{"dumb"} = "true";
|
||||||
|
|
||||||
|
$colors{"srcColor"} = color("cyan");
|
||||||
|
$colors{"introColor"} = color("blue");
|
||||||
|
|
||||||
|
$colors{"warningFileNameColor"} = color("yellow");
|
||||||
|
$colors{"warningNumberColor"} = color("yellow");
|
||||||
|
$colors{"warningMessageColor"} = color("yellow");
|
||||||
|
|
||||||
|
$colors{"errorFileNameColor"} = color("bold red");
|
||||||
|
$colors{"errorNumberColor"} = color("bold red");
|
||||||
|
$colors{"errorMessageColor"} = color("bold red");
|
||||||
|
}
|
||||||
|
|
||||||
|
sub loadPreferences
|
||||||
|
{
|
||||||
|
# Usage: loadPreferences("filename");
|
||||||
|
|
||||||
|
my($filename) = @_;
|
||||||
|
|
||||||
|
open(PREFS, "<$filename") || return;
|
||||||
|
|
||||||
|
while(<PREFS>)
|
||||||
|
{
|
||||||
|
next if (m/^\#.*/); # It's a comment.
|
||||||
|
next if (!m/(.*):\s*(.*)/); # It's not of the form "foo: bar".
|
||||||
|
|
||||||
|
$option = $1;
|
||||||
|
$value = $2;
|
||||||
|
|
||||||
|
if ($option =~ m/cc|c\+\+|gcc|g\+\+/)
|
||||||
|
{
|
||||||
|
$compilerPaths{$option} = $value;
|
||||||
|
}
|
||||||
|
elsif ($option eq "nocolor")
|
||||||
|
{
|
||||||
|
# The nocolor option lists terminal types, separated by
|
||||||
|
# spaces, not to do color on.
|
||||||
|
foreach $termtype (split(/\s+/, $value))
|
||||||
|
{
|
||||||
|
$nocolor{$termtype} = "true";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$colors{$option} = color($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(PREFS);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub srcscan
|
||||||
|
{
|
||||||
|
# Usage: srcscan($text, $normalColor)
|
||||||
|
# $text -- the text to colorize
|
||||||
|
# $normalColor -- The escape sequence to use for non-source text.
|
||||||
|
|
||||||
|
# Looks for text between ` and ', and colors it srcColor.
|
||||||
|
|
||||||
|
my($line, $normalColor) = @_;
|
||||||
|
|
||||||
|
my($srcon) = color("reset") . $colors{"srcColor"};
|
||||||
|
my($srcoff) = color("reset") . $normalColor;
|
||||||
|
|
||||||
|
$line = $normalColor . $line;
|
||||||
|
|
||||||
|
# This substitute replaces `foo' with `AfooB' where A is the escape
|
||||||
|
# sequence that turns on the the desired source color, and B is the
|
||||||
|
# escape sequence that returns to $normalColor.
|
||||||
|
$line =~ s/\`(.*?)\'/\`$srcon$1$srcoff\'/g;
|
||||||
|
|
||||||
|
print($line, color("reset"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Main program
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set up default values for colors and compilers.
|
||||||
|
initDefaults();
|
||||||
|
|
||||||
|
# Read the configuration file, if there is one.
|
||||||
|
$configFile = $ENV{"HOME"} . "/.colorgccrc";
|
||||||
|
if (-f $configFile)
|
||||||
|
{
|
||||||
|
loadPreferences($configFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Figure out which compiler to invoke based on our program name.
|
||||||
|
$0 =~ m%.*/(.*)$%;
|
||||||
|
$progName = $1 || $0;
|
||||||
|
|
||||||
|
$compiler = $compilerPaths{$progName} || $compilerPaths{"gcc"};
|
||||||
|
|
||||||
|
# Get the terminal type.
|
||||||
|
$terminal = $ENV{"TERM"} || "dumb";
|
||||||
|
|
||||||
|
# If it's in the list of terminal types not to color, or if
|
||||||
|
# we're writing to something that's not a tty, don't do color.
|
||||||
|
if (! -t STDOUT || $nocolor{$terminal})
|
||||||
|
{
|
||||||
|
exec $compiler, @ARGV
|
||||||
|
or die("Couldn't exec");
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep the pid of the compiler process so we can get its return
|
||||||
|
# code and use that as our return code.
|
||||||
|
$compiler_pid = open3('<&STDIN', \*GCCOUT, '', $compiler, @ARGV);
|
||||||
|
|
||||||
|
# Colorize the output from the compiler.
|
||||||
|
while(<GCCOUT>)
|
||||||
|
{
|
||||||
|
if (m/^(.*?):([0-9]+):(.*)$/) # filename:lineno:message
|
||||||
|
{
|
||||||
|
$field1 = $1 || "";
|
||||||
|
$field2 = $2 || "";
|
||||||
|
$field3 = $3 || "";
|
||||||
|
|
||||||
|
if ($field3 =~ m/\s+warning:.*/)
|
||||||
|
{
|
||||||
|
# Warning
|
||||||
|
print($colors{"warningFileNameColor"}, "$field1:", color("reset"));
|
||||||
|
print($colors{"warningNumberColor"}, "$field2:", color("reset"));
|
||||||
|
srcscan($field3, $colors{"warningMessageColor"});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Error
|
||||||
|
print($colors{"errorFileNameColor"}, "$field1:", color("reset"));
|
||||||
|
print($colors{"errorNumberColor"}, "$field2:", color("reset"));
|
||||||
|
srcscan($field3, $colors{"errorMessageColor"});
|
||||||
|
}
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
elsif (m/^(.*?):(.+):$/) # filename:message:
|
||||||
|
{
|
||||||
|
# No line number, treat as an "introductory" line of text.
|
||||||
|
srcscan($_, $colors{"introColor"});
|
||||||
|
}
|
||||||
|
else # Anything else.
|
||||||
|
{
|
||||||
|
# Doesn't seem to be a warning or an error. Print normally.
|
||||||
|
print(color("reset"), $_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get the return code of the compiler and exit with that.
|
||||||
|
waitpid($compiler_pid, 0);
|
||||||
|
exit ($? >> 8);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
128
colorgcc.spec
128
colorgcc.spec
|
|
@ -1,29 +1,35 @@
|
||||||
Summary: Script to colorize the compiler output
|
Summary: Script to colorize the compiler output
|
||||||
Name: colorgcc
|
Name: colorgcc
|
||||||
Version: 1.4.5
|
Version: 1.3.2
|
||||||
Release: 28%{?dist}
|
Release: 14%{?dist}
|
||||||
License: GPL-1.0-or-later
|
License: GPL+
|
||||||
|
Group: Development/Tools
|
||||||
Url: http://schlueters.de/colorgcc.html
|
Url: http://schlueters.de/colorgcc.html
|
||||||
Source0: https://github.com/colorgcc/colorgcc/archive/%{version}.tar.gz
|
Source0: http://schlueters.de/colorgcc.%{version}.txt
|
||||||
|
Source1: http://schlueters.de/colorgccrc.txt
|
||||||
|
Source2: README
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Patch0: colorgcc-invocation.patch
|
Patch0: colorgcc-1.3.2-invocation.patch
|
||||||
Patch1: readme-fedora.patch
|
Patch1: sampleconfig.patch
|
||||||
BuildRequires: perl-generators
|
Patch2: colorgcc-1.3.2-bz1078180.patch
|
||||||
Requires: perl-interpreter
|
Requires: perl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Perl script written by Jamie Moyers to colorize the terminal output of C++, CC,
|
Perl script written by Jamie Moyers to colorize the terminal output of C++, CC,
|
||||||
CCACHE, G++, GCC so error messages can be found within longer compiler outputs.
|
CCACHE, G++, GCC so error messages can be found within longer compiler outputs.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -q -c -T
|
||||||
mv ./colorgccrc.txt ./colorgccrc.sample
|
cp -p %{SOURCE0} .
|
||||||
%patch -P0 -p1
|
cp -p %{SOURCE1} ./colorgccrc.sample
|
||||||
%patch -P1 -p1
|
cp -p %{SOURCE2} .
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
|
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
|
||||||
install -p -m 755 colorgcc.pl $RPM_BUILD_ROOT/%{_bindir}/color-gcc
|
install -p -m 755 $(basename %{SOURCE0}) $RPM_BUILD_ROOT/%{_bindir}/color-gcc
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-g++
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-g++
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-cc
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-cc
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-c++
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/color-c++
|
||||||
|
|
@ -35,12 +41,8 @@ ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorcc
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorc++
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorc++
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorccache
|
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT/%{_bindir}/colorccache
|
||||||
|
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_libdir}/colorgcc
|
|
||||||
for n in cc gcc g++ c++ ; do
|
|
||||||
ln -s %{_bindir}/color-gcc $RPM_BUILD_ROOT%{_libdir}/colorgcc/$n
|
|
||||||
done
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/color-gcc
|
%{_bindir}/color-gcc
|
||||||
%{_bindir}/color-g++
|
%{_bindir}/color-g++
|
||||||
%{_bindir}/color-cc
|
%{_bindir}/color-cc
|
||||||
|
|
@ -52,93 +54,9 @@ done
|
||||||
%{_bindir}/colorcc
|
%{_bindir}/colorcc
|
||||||
%{_bindir}/colorc++
|
%{_bindir}/colorc++
|
||||||
%{_bindir}/colorccache
|
%{_bindir}/colorccache
|
||||||
|
|
||||||
%dir %{_libdir}/colorgcc
|
|
||||||
%{_libdir}/colorgcc/*
|
|
||||||
|
|
||||||
%doc README colorgccrc.sample
|
%doc README colorgccrc.sample
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-28
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-27
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-26
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 17 2024 Miroslav Suchý <msuchy@redhat.com> - 1.4.5-25
|
|
||||||
- convert license to SPDX
|
|
||||||
|
|
||||||
* Sun Mar 10 2024 Martin Cermak <mcermak@redhat.com> - 1.4.5-24
|
|
||||||
- NVR bump and rebuild for CI gating changes
|
|
||||||
|
|
||||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-23
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-22
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-21
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Mar 29 2023 Martin Cermak <mcermak@redhat.com> - 1.4.5-20
|
|
||||||
- NVR bump and rebuild for CI gating changes
|
|
||||||
|
|
||||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-18
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-17
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-16
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-15
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-14
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Nov 26 2020 Martin Cermak <mcermak@redhat.com> 1.4.5-13
|
|
||||||
- NVR bump and rebuild for CI gating changes
|
|
||||||
|
|
||||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-9
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-7
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Dec 8 2017 Martin Cermak <mcermak@redhat.com> 1.4.5-3
|
|
||||||
- Provide convenience symlinks per bz1402003#c10
|
|
||||||
- Update README
|
|
||||||
|
|
||||||
* Wed Dec 6 2017 Martin Cermak <mcermak@redhat.com> 1.4.5-1
|
|
||||||
- Rebase to 1.4.5 per bz1402003
|
|
||||||
|
|
||||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-17
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 13 2017 Petr Pisar <ppisar@redhat.com> - 1.3.2-16
|
|
||||||
- perl dependency renamed to perl-interpreter
|
|
||||||
<https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules>
|
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-15
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-14
|
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-14
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
|
@ -151,10 +69,10 @@ done
|
||||||
* Fri Apr 11 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-11
|
* Fri Apr 11 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-11
|
||||||
- Allow using "color" prefix as well as "color-" prefix (bz1078180)
|
- Allow using "color" prefix as well as "color-" prefix (bz1078180)
|
||||||
|
|
||||||
* Fri Jan 03 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-10
|
* Thu Jan 03 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-10
|
||||||
- Updated README
|
- Updated README
|
||||||
|
|
||||||
* Fri Jan 03 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-9
|
* Thu Jan 03 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-9
|
||||||
- Renamed and updated config sample
|
- Renamed and updated config sample
|
||||||
|
|
||||||
* Thu Jan 02 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-8
|
* Thu Jan 02 2014 Martin Cermak <mcermak@redhat.com> 1.3.2-8
|
||||||
|
|
@ -185,6 +103,6 @@ done
|
||||||
- Absolute paths pointing to compiler binaries removed
|
- Absolute paths pointing to compiler binaries removed
|
||||||
- Resolves bz700833
|
- Resolves bz700833
|
||||||
|
|
||||||
* Fri Apr 29 2011 Martin Cermak <mcermak@redhat.com> 1.3.2-1
|
* Thu Apr 29 2011 Martin Cermak <mcermak@redhat.com> 1.3.2-1
|
||||||
- Packaged for Fedora
|
- Packaged for Fedora
|
||||||
|
|
||||||
|
|
|
||||||
54
colorgccrc.txt
Normal file
54
colorgccrc.txt
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#
|
||||||
|
# colorgcc configuration file
|
||||||
|
#
|
||||||
|
# $Id: colorgccrc,v 1.1.1.1 1999/04/25 15:24:03 jamoyers Exp $
|
||||||
|
#
|
||||||
|
# This file should be named $HOME/.colorgccrc
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The following groups of attributes may be combined for a given color:
|
||||||
|
#
|
||||||
|
# clear black on_black
|
||||||
|
# reset red on_red
|
||||||
|
# bold green on_green
|
||||||
|
# underline yellow on_yellow
|
||||||
|
# underscore blue on_blue
|
||||||
|
# blink magenta on_magenta
|
||||||
|
# reverse cyan on_cyan
|
||||||
|
# concealed white on_white
|
||||||
|
#
|
||||||
|
# For example, srcColor: bold cyan on_yellow
|
||||||
|
#
|
||||||
|
|
||||||
|
# Define the paths to the actual location of the various compilers.
|
||||||
|
# (Currently, colorgcc only understands these: g++ gcc c++ cc)
|
||||||
|
g++: /usr/bin/g++
|
||||||
|
gcc: /usr/bin/gcc
|
||||||
|
c++: /usr/bin/c++
|
||||||
|
cc: /usr/bin/cc
|
||||||
|
|
||||||
|
# Don't do color if our terminal type ($TERM) is one of these.
|
||||||
|
# (List all terminal types on one line, seperated by whitespace.)
|
||||||
|
nocolor: dumb
|
||||||
|
|
||||||
|
# Text between ` and ' is usually source code.
|
||||||
|
srcColor: bold cyan
|
||||||
|
|
||||||
|
# Text other than a warning or error.
|
||||||
|
introColor: reset
|
||||||
|
|
||||||
|
# Warnings and errors both have similar formats:
|
||||||
|
# filename:999:Message
|
||||||
|
# Each field may be assigned a different color.
|
||||||
|
|
||||||
|
# Warnings
|
||||||
|
warningFileNameColor: reset
|
||||||
|
warningNumberColor: white
|
||||||
|
warningMessageColor: yellow
|
||||||
|
|
||||||
|
# Errors
|
||||||
|
errorFileNameColor: reset
|
||||||
|
errorNumberColor: white
|
||||||
|
errorMessageColor: bold red
|
||||||
|
|
||||||
|
|
||||||
19
gating.yaml
19
gating.yaml
|
|
@ -1,19 +0,0 @@
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- fedora-*
|
|
||||||
decision_context: bodhi_update_push_stable
|
|
||||||
subject_type: koji_build
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-8
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
|
||||||
--- !Policy
|
|
||||||
product_versions:
|
|
||||||
- rhel-9
|
|
||||||
decision_context: osci_compose_gate
|
|
||||||
rules:
|
|
||||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
summary: CI Gating Plan
|
|
||||||
discover:
|
|
||||||
how: fmf
|
|
||||||
directory: tests
|
|
||||||
execute:
|
|
||||||
how: beakerlib
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
diff --git a/README b/README
|
|
||||||
index 2f38386..b5b978f 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -48,6 +48,26 @@ If colorgcc colorizes the output, the compiler's STDERR will be
|
|
||||||
combined with STDOUT. Otherwise, colorgcc just passes the output from
|
|
||||||
the compiler through without modification.
|
|
||||||
|
|
||||||
+Fedora note:
|
|
||||||
+
|
|
||||||
+Here is how to use colorgcc along with ccache on a Fedora system under
|
|
||||||
+a non-root user. Install both colorgcc and ccache. The ccache
|
|
||||||
+modifies user $PATH via it's /etc/profile.d/ccache* scripts.
|
|
||||||
+Now do the following:
|
|
||||||
+
|
|
||||||
+ $ export PATH="/usr/lib/colorgcc:$PATH"
|
|
||||||
+ $ export CCACHE_PATH="/usr/bin"
|
|
||||||
+
|
|
||||||
+Now add entries like the following to your ~/.colorgccrc file:
|
|
||||||
+
|
|
||||||
+ g++: /usr/lib64/ccache/g++
|
|
||||||
+ gcc: /usr/lib64/ccache/gcc
|
|
||||||
+ c++: /usr/lib64/ccache/g++
|
|
||||||
+ cc: /usr/lib64/ccache/cc
|
|
||||||
+
|
|
||||||
+You should be all set.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
Author: Jamie Moyers <jmoyers@geeks.com>
|
|
||||||
Started: April 20, 1999
|
|
||||||
Licence: GNU Public License
|
|
||||||
24
sampleconfig.patch
Normal file
24
sampleconfig.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/colorgccrc.sample b/colorgccrc.sample
|
||||||
|
index 5ec5949..8e87f98 100644
|
||||||
|
--- a/colorgccrc.sample
|
||||||
|
+++ b/colorgccrc.sample
|
||||||
|
@@ -20,12 +20,14 @@
|
||||||
|
# For example, srcColor: bold cyan on_yellow
|
||||||
|
#
|
||||||
|
|
||||||
|
-# Define the paths to the actual location of the various compilers.
|
||||||
|
+# Define the paths to the actual location of the various compilers. By default
|
||||||
|
+# colorgcc calls basenames (e.g. 'gcc') so that $PATH setting is important.
|
||||||
|
# (Currently, colorgcc only understands these: g++ gcc c++ cc)
|
||||||
|
-g++: /usr/bin/g++
|
||||||
|
-gcc: /usr/bin/gcc
|
||||||
|
-c++: /usr/bin/c++
|
||||||
|
-cc: /usr/bin/cc
|
||||||
|
+#
|
||||||
|
+# g++: /usr/bin/g++
|
||||||
|
+# gcc: /usr/bin/gcc
|
||||||
|
+# c++: /usr/bin/c++
|
||||||
|
+# cc: /usr/bin/cc
|
||||||
|
|
||||||
|
# Don't do color if our terminal type ($TERM) is one of these.
|
||||||
|
# (List all terminal types on one line, seperated by whitespace.)
|
||||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
||||||
SHA512 (1.4.5.tar.gz) = 4125ada9b65b6387c2c259e2347236b3b18f7cdbf06ae0bb0212474a11354be6d463fbc4d239c2eb666c8246fc20277e06c8272fdee6dd4f60caa66164bcc1cf
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Makefile of /tools/colorgcc/Sanity/basic
|
|
||||||
# Description: basic smoke test
|
|
||||||
# Author: Martin Cermak <mcermak@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# This program 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 of
|
|
||||||
# the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program 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.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
export TEST=/tools/colorgcc/Sanity/basic
|
|
||||||
export TESTVERSION=1.0
|
|
||||||
|
|
||||||
BUILT_FILES=
|
|
||||||
|
|
||||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
|
||||||
|
|
||||||
.PHONY: all install download clean
|
|
||||||
|
|
||||||
run: $(FILES) build
|
|
||||||
./runtest.sh
|
|
||||||
|
|
||||||
build: $(BUILT_FILES)
|
|
||||||
test -x runtest.sh || chmod a+x runtest.sh
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *~ $(BUILT_FILES)
|
|
||||||
|
|
||||||
|
|
||||||
include /usr/share/rhts/lib/rhts-make.include
|
|
||||||
|
|
||||||
$(METADATA): Makefile
|
|
||||||
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
|
|
||||||
@echo "Name: $(TEST)" >> $(METADATA)
|
|
||||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
||||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
||||||
@echo "Description: basic smoke test" >> $(METADATA)
|
|
||||||
@echo "Type: Sanity" >> $(METADATA)
|
|
||||||
@echo "TestTime: 48h" >> $(METADATA)
|
|
||||||
@echo "RunFor: colorgcc" >> $(METADATA)
|
|
||||||
@echo "Requires: colorgcc gcc" >> $(METADATA)
|
|
||||||
@echo "Priority: Normal" >> $(METADATA)
|
|
||||||
@echo "License: GPLv2+" >> $(METADATA)
|
|
||||||
@echo "Confidential: no" >> $(METADATA)
|
|
||||||
@echo "Destructive: no" >> $(METADATA)
|
|
||||||
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA)
|
|
||||||
|
|
||||||
rhts-lint $(METADATA)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
PURPOSE of /tools/colorgcc/Sanity/basic
|
|
||||||
Description: basic smoke test
|
|
||||||
Author: Martin Cermak <mcermak@redhat.com>
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
summary: basic smoke test
|
|
||||||
description: ''
|
|
||||||
contact:
|
|
||||||
- Martin Cermak <mcermak@redhat.com>
|
|
||||||
component:
|
|
||||||
- colorgcc
|
|
||||||
test: ./runtest.sh
|
|
||||||
framework: beakerlib
|
|
||||||
recommend:
|
|
||||||
- colorgcc
|
|
||||||
- gcc
|
|
||||||
duration: 48h
|
|
||||||
extra-summary: /tools/colorgcc/Sanity/basic
|
|
||||||
extra-task: /tools/colorgcc/Sanity/basic
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# runtest.sh of /tools/colorgcc/Sanity/basic
|
|
||||||
# Description: basic smoke test
|
|
||||||
# Author: Martin Cermak <mcermak@redhat.com>
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
#
|
|
||||||
# Copyright (c) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# This program 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 of
|
|
||||||
# the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program 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.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
||||||
#
|
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
# Include Beaker environment
|
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
||||||
|
|
||||||
PACKAGE="colorgcc"
|
|
||||||
|
|
||||||
rlJournalStart
|
|
||||||
rlPhaseStartSetup
|
|
||||||
rlAssertRpm $PACKAGE
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartTest
|
|
||||||
rlRun "echo -e 'int main() {\nreturn 0;\n}' | color-gcc -xc -o /dev/null -"
|
|
||||||
rlRun "echo -e 'int main() {\nreturn 0\n}' | color-gcc -xc -o /dev/null - |& fgrep '<stdin>:2:9: error'"
|
|
||||||
rlPhaseEnd
|
|
||||||
rlJournalPrintText
|
|
||||||
rlJournalEnd
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue