Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1972499 Details for
Bug 2188430
grep-3.8 is incompatible with previous versions of grep for fgrep and egrep
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh89 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
Source RPM for the noarch RPM bringing back egrep and fgrep without complaining output
grep-compat.spec (text/plain), 3.05 KB, created by
Albert Flügel
on 2023-06-25 10:45:16 UTC
(
hide
)
Description:
Source RPM for the noarch RPM bringing back egrep and fgrep without complaining output
Filename:
MIME Type:
Creator:
Albert Flügel
Created:
2023-06-25 10:45:16 UTC
Size:
3.05 KB
patch
obsolete
>Name: grep-compat >Version: 1.0.0 >Release: 1%{?dist} >Summary: Provide egrep and fgrep again >BuildArch: noarch > >License: GPL 3.0 > >Requires: grep >= 3.8 > ># This is ignored anyway: >BuildRoot: ~/rpm/BUILD/grep-compat-1.0.0 ># You must use rpmbuild -bb --buildroot=... or specify in ~/rpmmacros > >%define _rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm >%define name_before %{NAME} >%define name_after %%{NAME} > >%description >To alleviate the consequences of abolishing fgrep and egrep this >"package" brings them back for the zillions of script that use them >without conflicting files > >%pre >PROGDIR=/usr/bin >COMMANDS="$PROGDIR/egrep $PROGDIR/fgrep" >SAVED_FILES="" >TMPDIR=`mktemp -d` >RST=0 >cleanup(){ > if [ -d "$TMPDIR" ] ; then > /bin/rm -f "$TMPDIR"/*grep > rmdir "$TMPDIR" > fi >} >rollback(){ > for F in $SAVED_FILES ; do > BN=`basename "$F"` > if [ -f "$TMPDIR/"`basename $F` ] ; then > ( /bin/cp -p "$TMPDIR/$BN" "$PROGDIR/$BN" \ > && /bin/rm "$TMPDIR/$BN" \ > || /bin/mv "$TMPDIR/$BN" "$PROGDIR/$BN" > ) > if [ $? -ne 0 ] ; then > echo "ERROR: Could not recover $PROGDIR/$BN" > RST=3 > fi > fi > done >} >for C in $COMMANDS ; do > BN=`basename "$C"` > if [ -f "$C" ] ; then > /bin/cp -p "$C" "$TMPDIR/$BN" > if [ $? -ne 0 ] ; then > echo "$ERROR: Could not save file $C" >&2 > RST=5 > rollback > break > fi > SAVED_FILES="$SAVED_FILES $C" > fi > OPTION=`basename "$C"|cut -c1| tr '[a-z]' '[A-Z]'` > touch "$C" \ > && chmod 755 "$C" \ > && ( > echo '#!/bin/sh' > echo 'exec grep -'"$OPTION"' "$@"' > ) >"$C" > if [ $? -ne 0 ] ; then > echo "ERROR: Could not create $C correctly. Trying to rollback." >&2 > RST=4 > rollback > fi >done >cleanup >exit $RST > >%preun >PROGDIR=/usr/bin >COMMANDS="$PROGDIR/egrep $PROGDIR/fgrep" >SAVED_FILES="" >TMPDIR=`mktemp -d` >RST=0 >cleanup(){ > if [ -d "$TMPDIR" ] ; then > /bin/rm -f "$TMPDIR"/*grep > rmdir "$TMPDIR" > fi >} >rollback(){ > for F in $SAVED_FILES ; do > BN=`basename "$F"` > if [ -f "$TMPDIR/"`basename $F` ] ; then > ( /bin/cp -p "$TMPDIR/$BN" "$PROGDIR/$BN" \ > && /bin/rm "$TMPDIR/$BN" \ > || /bin/mv "$TMPDIR/$BN" "$PROGDIR/$BN" > ) > if [ $? -ne 0 ] ; then > echo "ERROR: Could not recover $PROGDIR/$BN" > RST=3 > fi > fi > done >} >for C in $COMMANDS ; do > BN=`basename "$C"` > if [ -f "$C" ] ; then > /bin/cp -p "$C" "$TMPDIR/$BN" > if [ $? -ne 0 ] ; then > echo "$ERROR: Could not save file $C" >&2 > RST=5 > rollback > break > fi > SAVED_FILES="$SAVED_FILES $C" > fi > OPTION=`basename "$C"|cut -c1| tr '[a-z]' '[A-Z]'` > touch "$C" \ > && chmod 755 "$C" \ > && ( > echo '#!/usr/bin/sh' > echo 'cmd=${0##*/}' > echo 'echo "$cmd: warning: $cmd is obsolescent; using grep -'"$OPTION"'" >&2' > echo 'exec grep -'"$OPTION"' "$@"' > ) >"$C" > if [ $? -ne 0 ] ; then > echo "ERROR: Could not create $C correctly. Trying to rollback." >&2 > RST=4 > rollback > fi >done >cleanup >exit $RST > >%clean > >%files > >%changelog >* Sun Jun 25 2023 Albert >- initial version
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2188430
:
1972498
| 1972499 |
1972501