From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 16 Dec 2006 21:18:23 +0200 From: Michael Shigorin To: sisyphus@lists.altlinux.org Message-ID: <20061216191823.GU13823@osdn.org.ua> Mail-Followup-To: sisyphus@lists.altlinux.org, Vitaly Lipatov Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BI5RvnYi6R4T2M87" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Vitaly Lipatov Subject: [sisyphus] macro abuse cleanup script X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: shigorin@gmail.com, ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2006 19:18:40 -0000 Archived-At: List-Archive: List-Post: --BI5RvnYi6R4T2M87 Content-Type: multipart/mixed; boundary="Clx92ZfkiYIKRjnr" Content-Disposition: inline --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =FA=C4=D2=C1=D7=D3=D4=D7=D5=CA=D4=C5. =F0=D2=C9=CC=C1=C7=C1=C0 =D3=CB=D2=C9=D0=D4=C9=CB =C4=CC=D1 =DA=C1=DE=C9=D3= =D4=CB=C9 =D3=D0=C5=CB=CF=D7 (=C4=C1, =C4=C1, =D1 =C5=C7=CF =D4=CF=CC=D8=CB= =CF =D3=C5=CA=DE=C1=D3 =CE=C1=D0=C9=D3=C1=CC =CE=C1 =CF=D3=CE=CF=D7=C5 /var/lib= /rpm/macros, =C1 =D4=C1=CB =D7=D3=A3 =CC=C1=D0=C1=CD=C9). 2 lav: =C4=CF=C2=C1=D7=C9=DB=D8 =CB rpmcs? (=CB=D3=D4=C1=D4=C9, =C5=D3=CC= =C9 =C2 =D4=D9 =D4=C1=CD =C5=DD=A3 tar.bz2 =CE=C5 =DC=CE=C6=CF=D2=D3=C9=CC, =C2=D9=CC=CF =C2=D9 =D0=D2=CF=D3=D4=CF =DA= =C1=CD=C5=DE=C1=D4=C5=CC=D8=CE=CF -- =C2=D9=D7=C1=C0=D4 =C9 tar.gz, =C9 =D0=D2=CF=D3=D4=CF .tar) --=20 ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --Clx92ZfkiYIKRjnr Content-Type: application/x-sh Content-Disposition: attachment; filename="un__.sh" Content-Transfer-Encoding: quoted-printable #!/bin/sh=0A# a script to clean up RPM %__macro abuse =0A# (those are actua= lly rpm's _internal_ macros, =0A# not intended for direct usage in specs an= d=0A# in fact cluttering them up without any bonus)=0A# 2006 by Michael Shi= gorin =0A# use freely=0A=0Afatal()=0A{=0A echo "$0: $*" = >&2=0A exit 1=0A}=0A=0A[ -s "$1" ] || fatal "gimme a spec!"=0A=0Agrep -q '^= [^#].*%__' "$1" || exit 0=0A=0ATMPSPEC=3D`mktemp $1.XXXXXX` || fatal "unabl= e to create temporary file"=0A=0Ased \=0A -e 's@%__awk@gawk@g' \=0A -e 's@%= __bzip2@bzip2@g' \=0A -e 's@%__cat@cat@g' \=0A -e 's@%__chgrp@chgrp@g' \=0A= -e 's@%__chmod@chmod@g' \=0A -e 's@%__chown@chown@g' \=0A -e 's@%__cp@cp@g= ' \=0A -e 's@%__cpio@cpio@g' \=0A -e 's@%__file@file@g' \=0A -e 's@%__gpg@g= pg@g' \=0A -e 's@%__grep@grep@g' \=0A -e 's@%__gzip@gzip@g' \=0A -e 's@%__i= d@id@g' \=0A -e 's@%__install@install@g' \=0A -e 's@%__install_info@install= -info@g' \=0A -e 's@%__ln_s@ln -s@g' \=0A -e 's@%__make@make@g' \=0A -e 's@= %__mkdir@mkdir@g' \=0A -e 's@%__mkdir_p@mkdir -p@g' \=0A -e 's@%__mv@mv@g' = \=0A -e 's@%__patch@patch@g' \=0A -e 's@%__perl@perl@g' \=0A -e 's@%__pgp@p= gp@g' \=0A -e 's@%__python@python@g' \=0A -e 's@%__rm@rm@g' \=0A -e 's@%__r= sh@rsh@g' \=0A -e 's@%__sed@sed@g' \=0A -e 's@%__ssh@ssh@g' \=0A -e 's@%__s= ubst@subst@g' \=0A -e 's@%__tar@tar@g' \=0A -e 's@%__unzip@unzip@g' \=0A -e= 's@%__ar@ar@g' \=0A -e 's@%__as@as@g' \=0A -e 's@%__cc@gcc@g' \=0A -e 's@%= __cpp@gcc -E@g' \=0A -e 's@%__cxx@g++@g' \=0A -e 's@%__ld@ld@g' \=0A -e 's@= %__nm@nm@g' \=0A -e 's@%__objcopy@objcopy@g' \=0A -e 's@%__objdump@objdump@= g' \=0A -e 's@%__ranlib@ranlib@g' \=0A -e 's@%__strip@strip@g' \=0A -e 's@%= __libtoolize@libtoolize@g' \=0A -e 's@%__aclocal@aclocal@g' \=0A -e 's@%__a= utoheader@autoheader@g' \=0A -e 's@%__automake@automake@g' \=0A -e 's@%__au= toconf@autoconf@g' \=0A < "$1" > "$TMPSPEC" \=0A&& add_changelog -e '- spec= macro abuse cleanup' "$TMPSPEC"=0Aecho "please inspect $TMPSPEC for cleane= d up version" =0A --Clx92ZfkiYIKRjnr-- --BI5RvnYi6R4T2M87 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFhEZ/bsPDprYMm3IRAgeHAJ42g1Cy3XoFVvme9gl97QILvDRNUgCgjUas mfCjH0lNh9TosqVOS8C419M= =J7EG -----END PGP SIGNATURE----- --BI5RvnYi6R4T2M87--