Commit 001e5fa2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

initial commit (moved from CVS)

parents
Vitaly Lipatov <lav@etersoft.ru>
Denis Smirnov <mithraen@altlinux.ru>
Slava Semushin <php-coder@altlinux.ru>
Alexey Gladkov <legion@altlinux.ru>
MSGFMT = msgfmt -v
MSGMERGE = msgmerge
MSGMERGE_UPDATE = msgmerge --update
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
#.po.mo:
all: QuickHelp.txt QuickHelp.koi8-r.txt etersoft-build-utils.mo
po/etersoft-build-utils.mo: po/etersoft-build-utils.po
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
po/etersoft-build-utils.pot: Makefile share/common tools/upload-to-alt
ls -1 -d bin/* | grep -v "CVS" | xargs xgettext -a -o $@ -L Shell --from-code=koi8-r share/commons tools/upload-to-alt || :
# ls -1 -d bin/* etersoft-build-functions upload-to-alt | grep -v "CVS" | xargs grep echo | xgettext -a -o $@ -L Shell --from-code=koi8-r - || :
QuickHelp.koi8-r.txt:
for i in bin/* ; do echo -e "\n\n---------------------------"; $$i -h ; done >$@
QuickHelp.txt:
for i in bin/* ; do echo -e "\n\n---------------------------"; LANG=C $$i -h ; done >$@
po/etersoft-build-utils.po: po/etersoft-build-utils.pot
$(MSGMERGE_UPDATE) $@ $<
install: po/etersoft-build-utils.mo
install -D $< $(DESTDIR)/usr/share/locale/ru/LC_MESSAGES/$<
This package is a set of helper utils for rpm building process.
See info in Russian at
http://www.freesource.info/wiki/AltLinux/Razrabotchiku/SborkaPaketov
See QuickHelp.txt also.
This package is tested with follow Linux distributions:
- ALT Linux 2.3/2.4/3.0/4.0/Sisyphus
- ASP Linux 10/11/11.2
- Scientific/4.1
- Fedora Core 4/5/6/7/8
- OpenSuSe 10/10.1
- Mandriva 2005/2006/2007/2008
- MOPSLinux 3.1/4.0/5.0
- Slackware 10.2/11
- Debian 3.1 (Sarge) / 4.0
- Ubuntu 5.10/6.06/6.10/7.04/7.10
- RedHat 9 / MCBC 3.0
Replacement rules (for rpmbph):
alt-package-name|foreign-package-name
pkgrepl.rpm - base rules, use always
pkgrepl.pclinux - rules only for PC Linux
pkgrepl.pclinux.2007 - rules only for PC Linux 2007
Examples:
rpmbb [-c] [-i] [-p] name.spec - build package
-r do build req
rpmbsh [-r] [-m] [-s] [-u/-U] [-i] name.spec - build package in hasher [and (-s) sign its src.rpm]
rpmbs [-s] [-r] [-u/-U] name.spec - make src.rpm [and (-s) sign package]
-d delete uploaded package from incoming
rpmbph [-M30] [-r] [-u/-U] name.spec - backport spec and build package for previous/foreign distro
rpmgs name.spec - download main source file for spec (works with any types)
-f force
rpmgp name - download src.rpm for package 'name' or download source package 'name'
-c name | name.spec | package*rpm - check if the package is published in Sisyphus
-b name.spec - install need packages for build (via apt-get)
-n download only
rpmurl [-c -f] name.spec - open Url from spec in browser
rpmbugs [-qf ] name.spec | name - open buglist for package in browser
-t console output
-n create new bug
rpmcs name.spec - cleanup spec (foreign specs adoption helper)
loginhsh [-M30] [-t -i] - log in to shell in hasher
myhsh [-u -i] package.src.rpm - rebuild package(s) in hasher
rpmrb spec new_version - get source for new version, rebuild it and upload
rpmrb spec .2 change only minor version
rpmrb spec 2.6 change only major version
Common options:
-r - remote build
-m - send result of remote build by e-mail
-s - sign package and prepare to publish
-u/-U - upload signed package to Incoming/Backports(Updates)
-i - install after build
NOTE:
you have to prepare correct ~/.rpmmacros file, GPG signature in ~/.gnupg,
SSH private key in ~/.ssh/id_dsa,
hostname 'devel' in ~/.ssh/config as alias for cvs.altlinux.ru (typical for joined at ALT Linux)
Please send any questions at lav@etersoft.ru
Vitaly Lipatov, 07 Nov 2007
, () - rpmbs -s ? git
?
, ,
( )
rpmbb git
Req ( )
, hasher
src.rpm SRPMS
etersoft-build-functions /usr/share/etersoft-build-utils/functions
:
ALT -
pkgrepl.rpm - ,
pkgrepl.pclinux -
pkgrepl.pclinux.2007 -
, ( ALT)
-x ̣ x86_64?
cvs_update (man cvs?)
%homedir tmp ?
rpm -bE rpm --showrc ?
> >>:) 3. ,
> >>
> >> ,
> >> , apt.conf
> >> .
> >
> > .
>
> rpmgs --help :)
=== ===
ݣ ( , ).
( ,
). , , ݣ .
=== 1.3 ===
- %changelog rpmcs
-
- md5sum PLD Source
- LICENSE INSTALL
- rpmbph src.rpm ( hasher):
--init-root, .in, rpm -i src.rpm, rpmbph ( hasher), .out { }
hasher ??
- rpm -bE , - .
- : src.rpm
- ,
- / ?
=== 1.4 ===
- rpmbugs -n ( )
- sles_version, rhel_version, alt_version
- myhsh ?
- how to use --build-args= for hsh? - myhsh rpm
- ?
- , ޣ (diff )
- rpmbph -a M24 M23 -
- rpmbb -r -bi :(
- .pot
- pot - echog ( message)
=== 2.0 ===
- -v ( DEBUG )
- TODO:
( -- )
- apt ,
- -m rpmbph rpmbsh
- -i -u
- ( )?
- ?
- short-circuit -bc -bi :(
- , -m -r ( -m )
( )
alias
alias hsh="hsh --build='--define \"_unpackaged_files_terminate_build 1\"'"
~/.rpmmacros
Unpackaged:
awk '
on { if (/^ +\//) print $0; else on=0 }
/^warning: Installed \(but unpackaged\)/ { on=1; print $0 }
' <"$LOG_FILE"
----
$ list="line1
line2
line3"
$ a=qqq
$ while read l; do a="$l"; done < <(echo "$list")
$ echo $a
line3
#!/bin/sh
# 2005-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# Get shell in hasher with apt and mc
# -t - use test hasher
# -i - initialize hasher
# -M? - set target distro
# Public domain
# TODO: -r
. /etc/rpm/etersoft-build-functions
SAVEOPT=$@
#############################
Usage="Usage: $name [-t -i -h -r] bin.rpm..."
function mygetopts()
{
name=${0##*/}
Descr="$name - install package in hasher / take shell"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -i - initialize hasher"
echog " -c - cleanup hasher"
echog " -t - use test hasher dir"
echog " -r - remote login to hasher"
}
while getopts :chitr opt; do
case $opt in
h) phelp; exit 0;;
t) HASHERDIR=$HASHERDIR-test; TESTMODE=1 ;;
i) INITIALIZE=1 ;;
c) CLEANUP=1 ;;
r) REMOTE=1 ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
LISTRPMARGS=$@
}
parse_cmd_pre "$@" --
HASHERDIR=$HASHERDIR$MENVARG
HSH=/usr/bin/hsh
if [ ! -x "$HSH" ] ; then
echo "Please install hasher package before use it"
exit 1
fi
mygetopts $LISTARGS
if [ -n "$REMOTE" ] ; then
check_key
test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file"
ssh -t $BUILDSERVER loginhsh ${SAVEOPT/-r/}
exit 0
fi
if [ "$CLEANUP" = "1" ]; then
echog "Cleanup $HASHERDIR ..."
$HSH --cleanup-only $HASHERDIR || fatal "cleanup"
exit 0
fi
if [ ! -d $HASHERDIR -o "$INITIALIZE" = "1" ]; then
echog "Initialize $HASHERDIR ..."
mkdir -p $HASHERDIR && $HSH --initroot-only $HASHERDIR || fatal "mkdir"
fi
HASHERARG="$HASHERARG --mountpoints=/proc"
check_locking
echog "Prepare hasher in $HASHERDIR ..."
# there is package names in LISTRPMARGS
UTILPKG="mc"
[ "$USER" = "lav" ] && UTILPKG="mc ms-fonts-ttf"
if [ -n "$TESTMODE" ] ; then
UTILPKG="$UTILPKG XFree86-xauth"
else
UTILPKG="$UTILPKG etersoft-build-utils"
fi
$HSH-install $HASHERDIR $UTILPKG $LISTRPMARGS $LISTNAMES || fatal "Error with install"
echog "You are in hasher shell"
$HSH-shell $HASHERDIR -Y --shell
if [ -n "$TESTMODE" ] ; then
echo "Cleanup hasher..."
$HSH --cleanup-only $HASHERDIR
fi
# $HASHERARG
#!/bin/sh
# Public domain
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Make patch for file in $1 against CVS/SVN repository or .orig file
#
. /etc/rpm/etersoft-build-functions
if [ -f Makefile.in ] ; then
DD1=`grep ^TOPOBJDIR Makefile.in | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile.in | sed -e "s| ||g"`
else
warning "Can't get topdir from Makefile.in"
fi
if [ -n "$DD1" ] ; then
export $DD1
TOPDIR=$TOPOBJDIR
fi
if [ -n "$DD2" ] ; then
export $DD2
TOPDIR=$top_builddir
fi
#test -z "$TOPDIR" && exit 1
#echo "TOPDIR: $TOPDIR"
export TOPDIR
which cvs >/dev/null && CVS=cvs
which svn >/dev/null && SVN=svn
which git >/dev/null && GIT=git
if [ -f $1.orig ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
diff -purN $DIFILE.orig $DIFILE > $DIFILE.patch
exit 0
fi
if [ -n "$CVS" -a -d CVS ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 1 $DIFILE $PWD
$CVS diff -u $DIFILE > $DIFILE.patch
exit 0
fi
if [ -n "$SVN" -a -d .svn ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
$SVN diff $DIFILE > $DIFILE.patch
exit 0
fi
if [ -n "$GIT" ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
$GIT diff $DIFILE | sed -e "s|^--- a/|--- |g" | sed -e "s|^\+\+\+ b/|\+\+\+ |g" > $DIFILE.patch
exit 0
fi
#!/bin/sh
# 2003-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# 06.02.05
# 15.04.05 add other repository support
# 20.08.05 add /proc support
# SRPM- hasher
# ( -m)
# -i hasher
if [ ! -f /etc/rpm/etersoft-build-functions ] ; then
echog "NOTE: /etc/rpm/etersoft-build-functions does not exist"
echog "Please fix this path in $0 file if you are using local install"
exit 1
fi
. /etc/rpm/etersoft-build-functions
#############################
Usage="Usage: $name [-m -s -u -i -c] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - build package via hasher"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -m - mail result log"
echog " -s - sign package(s)"
echog " -u - sign and upload package(s) to Incoming"
echog " -i - install built packages in test hasher"
echog " -c - build without stuff (previous built packages)"
}
while getopts :hmic opt; do
case $opt in
h) phelp; exit 0;;
m) fatal "Mail is disabled for this version" ; TOMAIL=1 ;;
i) TESTINSTALL=1;;
c) HASHERARG="--without-stuff $HASHERARG";;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
LISTRPMARGS=$@
}
parse_cmd_pre "$@"
mygetopts $LISTARGS
# Start as mail helper
function mail_build()
{
MUTT=mutt
which $MUTT &>/dev/null || return
$0 "$@" 2>&1 | $MUTT "$OWNERMAIL" -s "Result of rebuild at $HOSTNAME at `date`"
}
if [ -n "$TOMAIL" ]; then
echog "Build via email"
( mail_build $LISTNAMES $LISTARGS ) >/dev/null 2>&1 &
echog "Build request is accepted for: $LISTNAMES"
echog "Report will be sending to: $OWNERMAIL"
exit 0
fi
RESULT=0
HASHERDIR=$HASHERDIR$MENVARG
mkdir -p $LOGDIR $HASHERDIR || fatal "cannot mkdir"
check_locking
HSH=/usr/bin/hsh
if [ ! -x "$HSH" ] ; then
echo "Please install hasher package before use it"
exit 1
fi
echog "List of packages: \$LISTNAMES"
if [ -z "${LISTNAMES/^.*spec/}" ] ; then
echo "!!!!!!!!"
fatal "Please use src.rpm as argument, not spec"
fi
echog -n "Checking with sisyphus_check..."
sisyphus_check --no-check=$HASHER_NOCHECK --files $LISTNAMES || fatal "check for sisyphus failed"
echog "OK"
# TODO: for add $LISTRPMARGS we need skip function for delete "our" params
HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$APTCONF --target $DEFAULTARCH $HASHERARG"
if [ "$MENV" != "SS" ] && [ "$MENV" != "DD" ]; then
HASHERARG="--build-args \"--with=build_$MENV\" --build-args \"--with=build_backport\" $HASHERARG"
fi
LISTBUILTSH=""
for i in $LISTNAMES
do
# !
# --nprocs=2
# Note: hasher is already use renice for low priority
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo "Build in hasher ($MENV)" >$LOGFILE
rm -f $LOGFILE.failed
# enable /proc support only if require it
#rpm --requires -p $i | grep "/proc" && ARG="$HASHERARG --mountpoints=/proc" || ARG="$HASHERARG"
# we do not need check cases for mount points, thanks ldv@
ARG="$HASHERARG --mountpoints=/proc,/dev/pts"
echog "Build in hasher: $i (arg: $ARG, distro: $MENV, hasherdir: $HASHERDIR)"
($HSH $ARG --build-args "--define 'backport_distro ${MENV}'" -- $HASHERDIR $i 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/
if [ -f $LOGFILE.failed ] ; then
RESULT=1
break
fi
check_log $LOGFILE ; RESULT=$?
test $RESULT = 1 && break
echog "########## Build of `basename $i` is done in hasher $MENV #############"
echo
LISTBUILTSH="$LISTBUILTSH$i "
done
echo
if [ "$RESULT" = "1" ] ; then
echog "!!!!!!! Hasher: FAILED FAILED FAILED !!!!!!!!!"
echog "Failed with $i, built only"
else
echog "Full list of the hashered packages:"
fi
for i in $LISTBUILTSH ; do
echo " $i"
LASTPACKAGE=$i
done
echo
# build binary package list
function get_binpkg_list()
{
PKGDIR=$HASHERDIR/repo/i586/RPMS.hasher
find "$PKGDIR" ! -name '*\.src\.rpm' -name '*\.rpm' -execdir \
rpmquery -p --qf='%{sourcerpm}\t%{name}-%{version}-%{release}.%{arch}.rpm\n' "{}" \; \
| grep "^$1[[:space:]].*" | cut -f2 | xargs -n1 -I "{}" echo "$PKGDIR/{} "
}
if [ "$RESULT" = "0" -a -n "$TESTINSTALL" ] ; then
# test install (only for last package in list)
# some key for build hasher from scratch
MySRPM=$LASTPACKAGE
echog "Find binary packages for $MySRPM ..."
BINPACKAGES=`get_binpkg_list $MySRPM`
echo "List: $BINPACKAGES"
echo
loginhsh -t -i $MENVARG $BINPACKAGES || exit 1
fi
# make src.rpm is need
if [ "$RESULT" = "0" ] ; then
test -n "$LISTRPMARGS" && rpmbs $MENVARG $LISTRPMARGS $LISTBUILTSH
fi
exit $RESULT
#!/bin/sh
# 2004-2005 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
. /etc/rpm/etersoft-build-functions
if [ "$1" = "-h" ]; then
echo "rpmU - the same as [sudo] rpm -Uvh - update package"
exit 0
fi
#set -x
$SUDO rpm -Uvh "$@"
#!/bin/bash
# 2003-2007 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# BB - binary build (like rpm option -bb)
# 06.02.05
# rpm-
# :
# - -
# TODO -M?
# TODO: -c
. /etc/rpm/etersoft-build-functions
# Start as helper
if [ "$1" = "--helper" ]; then
shift
cd $RPMDIR/SPECS && rpmbb "$@"
exit $?
fi
#############################
Usage="Usage: $name [-c -p -i -r] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - build binary rpm from spec (with ccache using if found)"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -c - start from compile stage"
echog " -i - install and package"
echog " -p - packaging installed files into package"
echog " -r - find build requires"
}
while getopts :hcipr opt; do
case $opt in
h) phelp; exit 0;;
c) BUILDOPT="c" ;;
i) BUILDOPT="i b" ;;
p) BUILDOPT="b" ;;
r) BUILDREQ=1 ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# FIXME: (, -i, -b)
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
# pass other options to RPM:
LISTRPMARGS=$@
}
parse_cmd_pre "$@"
mygetopts $LISTARGS
mkdir -p "$LOGDIR"
mkdir -p "$RPMDIR/RPMS"
test -z "$LISTNAMES" && fatal "Please run with spec(s) name"
test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
# instead cbuild req
if [ -n "$BUILDREQ" ] ; then
uni_rpmbuild buildreq $LISTNAMES
RET=$?
echog "You can run buildreq with -bi param for search a dependences for install section of the package"
exit $RET
fi
if [ -n "$BUILDOPT" ] ; then
is_alt || fatal "Sorry, only ALT Linux systems support --short-circuit correctly"
for it in $BUILDOPT
do
uni_rpmbuild $RPMBUILD $LISTNAMES -b$it $LISTRPMARGS --target $DEFAULTARCH --short-circuit
done
exit 0
fi
# Set nodeps if run in non rpm system
[ "$TARGET" = "rpm" ] && NODEPS="" || NODEPS="--nodeps"
for i in $LISTNAMES
do
# build src.rpm if old way
SPECDIR=`dirname $i`
is_git $SPECDIR || build_rpms_name "$i"
if ! is_alt ; then
if ! build_buildroot ; then
LISTRPMARGS="--buildroot $BUILDROOT $LISTRPMARGS"
fi
echo "For non ALT distro clean BuildRoot $BUILDROOT"
test -n "$BUILDROOT" || fatal "BUILDROOT var is empty"
rm -rf "$BUILDROOT"
fi
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.failed
(uni_rpmbuild $RPMBUILD $i -bb $LISTRPMARGS $NODEPS --target $DEFAULTARCH 2>&1 || touch $LOGFILE.failed) | tee -a $LOGFILE
check_log $LOGFILE ; RES=$?
if [ -f $LOGFILE.failed ] || [ $RES != 0 ]
then
echo "!!!!!!!! ERROR !!!!!"
fatal "Failed with $i"
fi
done
echog "Built is done correctly"
date
exit 0
######################################################
# rpmbbr =========
RESULT=0
check_key
echog "Packing without check of build dependencies for packages"
NODEPS="--nodeps"
LISTBUILT=""
pack_src_rpm $LISTRPMARGS
echog "==== Copying to build server ====="
echog "It is recommended to rename old version at server for save traffic during rsync"
rsync -vay --partial --progress --stats --checksum \
-e ssh $LISTBUILT $BUILDSERVER:/$RPMDIR/SRPMS/
echo
echog "############ Build at build server ############"
echo
ssh $BUILDSERVER rpm -ivh $LISTBUILT
ssh -t $BUILDSERVER rpmbb --helper "$@"
echo "-------------------------------"
echog "Remote build is done"
date
#!/bin/bash
# 2003-2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# BPH - backport; use hasher
# 06.09.2005, 12.09.2005, 07.11.2005, 16.02.2006, 02.07.2007, 08.09.2007
# Makes backport package to any target platfrom (RPM, DEB, TGZ)
# . alt4
# alt0.M24.4
# TODO: use RPMBUILDARG
. /etc/rpm/etersoft-build-functions
#VENDORVERSION=`distr_vendor -e`
DISTRVERSION=`distr_vendor -v`
alt_tolocal()
{
local SPECNAME
SPECNAME=$1
# get current release number
BASERELEASE=$(get_release $SPECNAME | sed -e "s/alt//" | sed -e "s/%{_vendor}//" | sed -e "s/eter//" | sed -e "s/%_vendor//")
# Set buildreq
if [ "$VENDOR" = "alt" ] ; then
BUILDREQ="BuildRequires: rpm-build-compat >= 0.95"
[ -z "$BUILDCOMMAND" ] && BUILDCOMMAND=rpmbsh
# Change release according to alt policy
set_release $SPECNAME alt0.$MDISTR.$BASERELEASE
ADDDEF=""
CLEANTEXT=""
else
BUILDREQ="BuildRequires: rpm-build-altlinux-compat >= 0.95"
[ -z "$BUILDCOMMAND" ] && BUILDCOMMAND=rpmbb
set_release $SPECNAME eter$BASERELEASE$VENDOR
ADDDEF="%defattr(-, root, root)"
CLEANTEXT=""
fi
# Do not add BuildReq if already exist
cat $SPECNAME | grep rpm-build-compat &>/dev/null && BUILDREQ=""
# fix mktemp using for MCBC
if [ "$VENDOR" = "mcbc" ] ; then
FIXMKTEMP="%__subst "s|mktemp -dt|mktemp -d|g" configure"
else
FIXMKTEMP=""
fi
# Too old problem
TOCHANGELOG=
if [ "$MDISTR" = "M23" ] ; then
if grep "%configure" $SPECNAME >/dev/null && ! grep "^autoreconf" $i >/dev/null && ! grep "^%__autoreconf" $i >/dev/null ; then
RECONFT="%__autoreconf"
TOCHANGELOG="add __autoreconf macros in build section for fix so name problem (by script)"
fi
fi
LISTBUILDDEP=`print_buildreq $SPECNAME`
LISTREQDEP=`print_pkgreq $SPECNAME`
LISTDEP=`echo $LISTBUILDDEP $LISTREQDEP | xargs -n1 echo | sort -u`
LISTGROUP=`eval_spec $SPECNAME | grep Group | sed -e "s|^.*:||g" | xargs -n1 echo | sort -u`
# Build replacement rules for spec
ALLREPLRULES=""
[ -n "$VERBOSE" ] && echo "Checking req names for $LISTDEP"
export DISTRVERSION
for i in $LISTDEP ; do
tolocal_anyrepl $i `print_pkgrepl_list` || continue
#NRL="s!\(.*Req.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!g"
NRL="s!(.*Req.*)$ALTPKGNAME( |,|\$)!\1$TARGETPKGNAME\2!g"
[ -n "$VERBOSE" ] && echo "Use req rule $NRL"
ALLREPLRULES="$ALLREPLRULES $NRL;"
done
# Build replacement rules for spec
[ -n "$VERBOSE" ] && echo "Checking group names for $LISTGROUP"
ALLGRPREPLRULES=""
for i in $LISTGROUP ; do
tolocal_anyrepl $i `print_grprepl_list` || continue
#NRL="s!\(Group.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!g"
NRL="s!(Group.*)$ALTPKGNAME( |,|\$)!\1$TARGETPKGNAME\2!g"
[ -n "$VERBOSE" ] && echo "Use group name rule $NRL"
ALLGRPREPLRULES="$ALLGRPREPLRULES $NRL;"
done
#echo GRP: $LISTGROUP, ALLGRPREPLRULES: $ALLGRPREPLRULES
# Replace all packages names in source spec and add %defattr to files sections
# FIXME:
function awk_e1()
{
[ -n "$ADDDEF" ] && awk 'BEGIN{desk=0}{print;if(/^%files/){printf("%s\n", text)}}' text="$ADDDEF" || cat
}
# add clean before %files
function awk_e2()
{
[ -n "$CLEANTEXT" ] && awk 'BEGIN{desk=0}{if(/^%files/&&desk==0){printf("%s\n\n", text);desk++};print}' text="$CLEANTEXT" || cat
}
# add rpm-build-compat buildreq
function awk_e3()
{
[ -n "$BUILDREQ" ] && awk 'BEGIN{desk=0}{if(/^%description/&&desk==0){printf("%s\n\n", text);desk++};print}' text="$BUILDREQ" || cat
}
# add reconf for M23 after %build
function awk_e4()
{
[ -n "$RECONFT" ] && awk 'BEGIN{desk=0}{print;if(/^%build/&&desk==0){printf("%s\n", text);desk++}}' text="$RECONFT" || cat
}
# fix mktemp param for MCBC after %build
function awk_e5()
{
[ -n "$FIXMKTEMP" ] && awk 'BEGIN{desk=0}{print;if(/^%build/&&desk==0){printf("%s\n", text);desk++}}' text="$FIXMKTEMP" || cat
}
# apply replacement rules
repl_reqs()
{
local PREGE
PREGE="perl -p -e"
[ -n "$ALLREPLRULES" ] && $PREGE "$ALLREPLRULES" || cat
}
# apply replacement rules
repl_groups()
{
local PREGE
PREGE="perl -p -e"
[ -n "$ALLGRPREPLRULES" ] && $PREGE "$ALLGRPREPLRULES" || cat
}
if [ -n "$VERBOSE" ] ; then
echo "Requires rules: $ALLREPLRULES"
echo "Group rules: $ALLGRPREPLRULES"
fi
# apply all rules, awk excludes, remove empty tag lines
mv $SPECNAME $SPECNAME.old &&
cat $SPECNAME.old | \
repl_reqs | repl_groups | \
awk_e1 | awk_e2 | awk_e3 | awk_e4 | awk_e5 | \
sed -e "s|^BuildRequires: *\$||g" | \
sed -e "s|^BuildPreReq: *\$||g" | \
sed -e "s|^Requires: *\$||g" | \
sed -e "s|^Conflicts: *\$||g" | \
sed -e "s|^Provides: *\$||g" | \
sed -e "s|^Obsoletes: *\$||g" | \
cat > $SPECNAME
#TODO:
#%if %{undefined buildroot}
#BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
#%endif
#TODO:
#%clean section
rm -f $SPECNAME.old
if [ "$VENDOR" = "alt" ] ; then
subst "1i#" $SPECNAME
# use old compress method for the src.rpm
#subst "1i%define _source_payload w9.gzdio" $SPECNAME
# FIXME: only for M40 and older?
export USE_LEGACY_COMPRESSION=1
subst "1i# This spec is backported to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- backport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)"
DISTRARG="-$MDISTR"
else
subst "1i# This spec is autoported from ALT Linux Sisyphus to `distr_vendor -d` $DISTRVERSION automatically by rpmbph script. Do not edit it." $SPECNAME
ENTRY="- autoport to `distr_vendor -d` $DISTRVERSION (by rpmbph script)"
DISTRARG=""
fi
test -n "$TOCHANGELOG" && ENTRY=`echo -e "$ENTRY\n- $TOCHANGELOG"`
add_changelog $SPECNAME -e "$ENTRY"
$BUILDCOMMAND $LISTRPMARGS $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't build"
}
#############################
Usage="Usage: $name [-r -u -U -n -i -m -v] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - backports spec and rebuild it"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -r - remote build"
# echog " -m - send result via e-mail"
echog " -u/-U - sign and upload after build"
echog " -n - do not build in hasher"
echog " -i - install built packages in test hasher"
echog " -v - more verbose"
}
while getopts :hniv opt; do
case $opt in
h) phelp; exit 0;;
n) BUILDCOMMAND="rpmbs";;
v) VERBOSE=1;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
# pass other options to RPM:
LISTRPMARGS=$@
}
parse_cmd_pre "$@"
mygetopts $LISTARGS
test -z "$LISTNAMES" && fatal "Error: no such file"
if [ "$VENDOR" = "alt" ] ; then
MDISTR=$MENV
test -z "$MDISTR" && fatal "missed backport version (f.i. run with -M24 param for Master 2.4)"
DISTRVERSION=`echo $MDISTR | sed -e "s|M\([0-9]\)\([0-9]\)|\1\.\2|g" | sed -e "s|SS|Sisyphus|g"`
# read man bash QUOTING and see /bin/shell-quote (libshell)
# due incompatible changes scince rpm-4.0.4-alt94 (15 Jun 2008)
#LISTRPMARGS="$LISTRPMARGS --define='_source_payload w9.gzdio'"
else
MDISTR=LOCAL
fi
[ -n "$VERBOSE" ] && echo "DISTRVERSION=$DISTRVERSION LISTRPMARGS=$LISTRPMARGS"
unset MENV MENVARG
mkdir -p $RPMDIR/SPECS/$MDISTR
for i in $LISTNAMES ; do
DEST=`basename $i`
cp $i $RPMDIR/SPECS/$MDISTR/$DEST || fatal "Can't copy spec"
cd $RPMDIR/SPECS/$MDISTR || fatal "Error"
alt_tolocal $DEST
cd -
done
#!/bin/bash
# (c) Etersoft 2003-2006
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# BS - build source
# 14.12.03, 04.01.04, 14.01.04, 14.03.04, 25.05.04, 30.05.04, 19.12.04, 06.02.05
# 15.04.05 upload
# 29.05.05 gettext
#
# :
# - -
# -
# -s,
# --nodeps,
# -u, incoming
# -d, incoming
# -n,
# TODO: -r
. /etc/rpm/etersoft-build-functions
SIGN=
UPLOADNOW=
CHECKONLY=
NOSOURCE=
NOCHECK=
UPDATES=
DELETENOW=
#############################
Usage="Usage: $name [-s -u -c -n --nodeps] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - make src.rpm from spec"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -s - sign package(s) and move it to upload dir"
echog " -c - only sign package(s) with checking"
echog " -u - sign package(s) and upload it to Incoming (backports)"
echog " -U - sign package(s) and upload it to Incoming (updates)"
echog " -d - remove package(s) from SRPMS and Incoming"
echog " -n - do not check with sisyphus_check before upload"
echog " -o - create nosrc.rpm package"
echog " -z - create src.rpm with compatible gzip compression"
}
while getopts :hscuUdnoz opt; do
case $opt in
h) phelp; exit 0;;
s) SIGN=1 ;;
c) CHECKONLY=1 ; SIGN=1 ;;
u) UPLOADNOW=1 ; SIGN=1 ;;
U) UPLOADNOW=1 ; SIGN=1 ; UPDATES=1 ;;
n) NOCHECK=1; ;;
o) NOSOURCE=1; ;;
z) export USE_LEGACY_COMPRESSION=1;
;;
d) DELETENOW=1 ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
## remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
LISTRPMARGS=$@
}
parse_cmd_pre "$@"
# quotes brokes option handling
mygetopts $LISTARGS
#############################
LISTBUILT=""
CURDIR=`pwd`
if [ -n "$NOSOURCE" ] ; then
$RPMBUILD -bs --nosource 0 $LISTNAMES
exit $?
fi
# src.rpm
# FIXME: -s can be in name... (but not in option!)
#LISTRPMARGS=
#LISTRPMARGS=${LISTRPMARGS/-m/}
#echo "@@ - $LISTRPMARGS - '$MENV'"
pack_src_rpm ${LISTRPMARGS}
#LISTARGS=${LISTARGS/-s/}
if [ -n "$REMOTEBUILD" ] ; then
fatal "Do not realized yet"
check_key
REMCOM="ssh $BUILDSERVER"
echo
echog "############ Build at build server `$BUILDSERVER` ############"
echo
echog "==== Copying to build server ====="
#echog "It is recommended to rename old version at server for save traffic during rsync"
rsync -vay --partial --progress --checksum \
-e ssh $LISTBUILT $BUILDSERVER:/$RPMDIR/SRPMS/ || exit 1
$REMCOM rpmbs --helper $MENVARG $LISTRPMARGS $LISTBUILT
exit 0
fi
# TODO: include in sisyphus_check
# , MENV
function release_check()
{
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do
if [ -z "${i/*alt0.M[0-9][0-9]*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for Sisyphus"
fi
done
return
fi
for i in $@ ; do
if [ -n "${i/*alt0.$MENV*/}" ] ; then
#
fatal "Incorrect release in $i package: was prepared for $MENV"
fi
done
}
[ -n "$UPDATES" ] && set_incoming_updates $MENV || set_incoming $MENV
if [ -n "${DELETENOW}" ]; then
echog "Removing from '$RSYNCINCOMING/$INCOMING/'"
check_key
cd $RPMDIR/SRPMS
for i in $LISTBUILT ; do
> $i
done
rsync -vay --partial --progress --delete \
-e ssh $LISTBUILT $RSYNCINCOMING/$INCOMING/
echo "$i REMOVED from Incoming/$INCOMING ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log
exit 0
fi
if [ -n "$SIGN" ]; then
release_check $LISTBUILT
echog "Will try to sign follow packages with GPG: \$LISTBUILT"
cd $RPMDIR/SRPMS
# 1. only rpm command has --addsign 2. do 3 retries
rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT || rpm --addsign $LISTBUILT
RET=$?
############################################
echog "Changing permissions..."
chmod 644 -- $LISTBUILT || fatal "can't chmod"
echog -n "Checking with sisyphus_check..."
test -n "$NOCHECK" || sisyphus_check --files $LISTBUILT || fatal "sisyphus check failed"
echog "OK"
# rpm's find-req do not find rpmlint :)
RPMLINT=rpmlint
if which $RPMLINT >/dev/null ; then
echog -n "Checking with rpmlint..."
echo
$RPMLINT $LISTBUILT
else
echog "It is recommended to install rpmlint package for additional checking"
fi
test -n "$CHECKONLY" && exit 0
############################################
if [ "$RET" = "0" ]
then
if [ -n "${UPLOADNOW}" ] ; then
echog "Uploading to '$RSYNCINCOMING/$INCOMING/'"
check_key
#set_incoming $MENV
#uploadOLD=$(basename `mktemp -d $UPLOADDIR.old.XXX`)
#rmdir $uploadOLD
rsync -vay --partial --progress $CHECKSUM \
-e ssh $LISTBUILT $RSYNCINCOMING/$INCOMING/ && \
echo "---------------------" && \
echog "All files synced" || fatal "Error during rsync"
#mv $UPLOADDIR $uploadOLD && mkdir $UPLOADDIR
for i in $LISTBUILT ; do
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo >>$LOGFILE
date >>$LOGFILE
echo "uploaded">>$LOGFILE
echo "$i uploaded to Incoming/$INCOMING ($MENV) at `date "+%c"`" >>$RPMDIR/uploaded.log
done
else
test -z "$ETERDESTSRPM" && ETERDESTSRPM=$UPLOADDIR${MENVARG/-/.}
mkdir -p $ETERDESTSRPM || echog "Error mkdir $ETERDESTSRPM"
echog "Copying package(s) in \$ETERDESTSRPM"
cp -fv $LISTBUILT $ETERDESTSRPM || echog "Error during copying"
fi
echog "Removing buildroot after upload..."
for i in $LISTNAMES ; do
if [ -z ${i/*.src.rpm/} ] ; then
echo " skipping for $i"
continue
fi
#DDIR=$BUILDROOT/${i/.spec/-buildroot}
# Hack about paths
test -f "$i" && NAME=$i || NAME=$CURDIR/$i
build_rpms_name $NAME
#build_buildroot
echo -n " $BUILDROOT "
if [ -d "$BUILDROOT" ] ; then
rm -rf "$BUILDROOT" && echo $"DONE" || echo $"failed"
else
echo $"missed"
fi
done
else
echog "Impossible to sign package. Check your password and try again."
echog "Wait for ten seconds."
sleep 10
exit 1
fi
fi
#!/bin/sh
# 2003-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# BSH - build source; use hasher
# 06.02.05
# 15.04.05 add other repository support
# 05.09.05 major rewrite code
# () hasher
# ̣ ( -r)
# ( -m)
# TODO:
# TODO: ??
. /etc/rpm/etersoft-build-functions
RESULT=0
REMCOM=
#############################
Usage="Usage: $name [-r -s -u -m -i -c] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - BSH - build source; use hasher"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -r - remote build"
echog " -m - sent result via email"
echog " -u/-U - sign and upload after build"
echog " -s - sign and and copy to upload after build"
echog " -i - install built packages in test hasher"
echog " -c - build without stuff (previous built packages)"
}
while getopts :hrusim opt; do
case $opt in
h) phelp; exit 0;;
r) REMOTEBUILD=1 ;;
# i) TESTINSTALL=1 ;;
# u) UPLOADNOW="-u" ;;
# s) UPLOADNOW="-s" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
## remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
LISTRPMARGS=$@
}
#############################
parse_cmd_pre "$@"
mygetopts $LISTARGS
# If fail, we already has correct changelog
add_changelog_helper "- new version" $LISTNAMES
#echo ${LISTRPMARGS/\-m/} @ ${LISTRPMARGS} @${LISTNAMES}
# We do not not pass args for myhsh here...
# FIXME:
pack_src_rpm $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g")
if [ -n "$REMOTEBUILD" ] ; then
check_key
test -n "$BUILDSERVER" || fatal "Please set BUILDSERVER in config file"
test -n "$REMOTERPMDIR" || REMOTERPMDIR=`ssh $BUILDSERVER echo $HOME`/RPM
echo
echog "############ Build at build server '$BUILDSERVER' (with $LISTRPMARGS options) ############"
echo
echog "==== Copying to build server ====="
#echog "It is recommended to rename old version at server for save traffic during rsync"
cd $RPMDIR/SRPMS && rsync -vay --partial --progress --checksum \
-e ssh $LISTBUILT $BUILDSERVER:$REMOTERPMDIR/SRPMS/ || fatal "Error with rsync"
ssh -t $BUILDSERVER "cd $REMOTERPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT"
RESULT=$?
date
echo "-------------------------------"
test "$RESULT" = "0" && echog "It was remote build at $BUILDSERVER" || echog "There is error during remote build at $BUILDSERVER"
else
cd $RPMDIR/SRPMS && time myhsh $MENVARG $LISTRPMARGS $LISTBUILT
RESULT=$?
date
echo "-------------------------------"
fi
cd -
exit $RESULT
#!/bin/sh
# 2005-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
#
# :
# rpmbugs - | | -qf ,
# TODO: ( ?)
# TODO:
. /etc/rpm/etersoft-build-functions
[ -n "$BROWSER" ] || BROWSER=url_handler.sh
show_bugs()
{
URL=$1
if [ -z "$TEXT" ] ; then
echog "Opening URL '$URL' in browser $BROWSER"
$BROWSER $URL &
else
echo "@Fetching from '$URL'..."
$BROWSER -dump -no-numbering -no-references -dump-width $COLUMNS $URL
fi
}
show_bugbyid()
{
URL="https://bugzilla.altlinux.org/show_bug.cgi?id=$1"
# TEXT=1
show_bugs $URL
}
#parse_cmd_pre "$@"
if [ "$1" = "-h" ]; then
echog "rpmbugs [-t] spec | bug number | package name | -qf command | /path/to/file - open bugs in BROWSER"
exit 0
fi
if [ "${1}" = "-n" ] ; then
shift
NEWBUG=1
fi
if [ "${1}" = "-t" ] ; then
shift
TEXT=1
which links >/dev/null && BROWSER=links
fi
test -z "$DISPLAY" && TEXT=1
SPECLIST=$@
if [ "${1}" = "-qf" ]
then
shift
SPECLIST=$1
if [ -e $SPECLIST ] ; then
SPECLIST=`rpm -qf --queryformat "%{NAME} " $SPECLIST`
else
SPECLIST=`rpmqf $SPECLIST`
fi
fi
# if param is number
if [ -z `echo ${1} | sed -e "s/[0-9]*//"` ] ; then
show_bugbyid $1
exit 0
fi
for i in $SPECLIST
do
if [ -f $i ]
then
if [ -z ${i/*rpm/} ]
then
# it is rpm package
PKGNAME=`rpm -qp --queryformat "%{NAME}" $i`
else
PKGNAME=$(eval_spec $i | get_var "Name")
test -z ${PKGNAME} && fatal "Cannot get package name"
fi
else
PKGNAME=`rpm -q --queryformat "%{NAME}" $i` || PKGNAME=$i
fi
PRODUCT=Sisyphus
URL="https://bugzilla.altlinux.org/buglist.cgi?product=$PRODUCT&component=$PKGNAME&component_type=equals&simple=1"
if [ -n "$NEWBUG" ] ; then
fatal "Do not realized yet. Welcome to developing!"
#URL=""
echog "Enter Summary for package $PKGNAME and press Enter:"
read SUMMARY
echog "Enter description (finish with Ctrl-D):"
ID=`altbug --pkg "$PKGNAME" --subj "$SUMMARY" | tail -n 1 | sed -e "s|^.*#||" -e "s|:.*$||"`
#altbug --pkg "$PKGNAME" --subj "$SUMMARY"
show_bugbyid $ID
else
show_bugs $URL | grep "@"
fi
done
#!/bin/sh
# 2005-2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# CS -- cleanup spec (like cleanup_spec command)
# :
# - -
. /etc/rpm/etersoft-build-functions
dummy_spec()
{
grep "^Name" $1
grep "^Version" $1
grep "^Release" $1
grep "^Packager" $1
cat <<EOF
Summary: dummy
License: dummy
Group: dummy
%description
EOF
}
# Get replacement rule for some package in $1 to ALT
toalt_pkgrepl()
{
local i
WARULES="s/^ //g
s/ \$//g
s/ |/|/g
s/| /|/g"
for i in $PKGREPLBASE/pkgrepl.fedora $PKGREPLBASE/pkgrepl.* ; do
#echo $i - $1
REPLRULE=`grep -v "^#" "$i" 2>/dev/null | grep -- "$1\$" | sed -e "$WARULES" | sed -e "s/^\(.*\)|\(.*\)\$/\2|\1/g" | head -n1`
# For broken rule
echo $REPLRULE | grep "^|" >/dev/null && REPLRULE=""
echo $REPLRULE | grep "|\$" >/dev/null && REPLRULE=""
REPLRULE1=`echo $REPLRULE | cut -d"|" -f1`
REPLRULE2=`echo $REPLRULE | cut -d"|" -f2`
test -n "$REPLRULE" && return 0
done
return 1
}
parse_cmd_pre "$@"
if [ "$1" = "-h" ]; then
echog "rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT"
exit 0
fi
for i in $LISTNAMES
do
if [ -z ${i/*rpm/} ] ; then
fatal "'$i' is not not spec file"
fi
# Make backup copy
cp -f $i ${i}~
# Unneeded on ALT
subst "s|^Prefix:.*$||" $i
subst "s|^BuildRoot:.*$||i" $i
# Add packager
if ! grep "^Packager" $i ; then
PACKAGT="Packager: $($RPMBUILD --eval %packager $i)"
cat $i | awk 'BEGIN{desk=0}{if(/^Source/&&desk==0){printf("%s\n\n", text);desk++};print}' text="$PACKAGT" >$i.tmp && mv -f $i.tmp $i
fi
# If non alt release, set initial alt release
if get_release $i | grep -v "^alt" >/dev/null ; then
set_release $i "alt1"
fi
# If it was PLD spec
if grep "^%define date" $i ; then
# with dummy spec we can't have any parsing problems
if false ; then
dummy_spec $i >$i.dummy
subst "s|^%changelog.*|`stamp_spec $i.dummy`|" $i
rm -f $i.dummy
subst "s|^%define date.*|%changelog|" $i
subst "s|* %{date} PLD Team\(.*\)|- initial build for ALT Linux Sisyphus (spec from PLD Team)|" $i
else
echo "PLD spec..."
awk '{if ( ! /^%define date/){print}else{exit}}' $i > $i.tmp && mv -f $i.tmp $i
add_changelog $i -e "- initial build for ALT Linux Sisyphus (spec from PLD)"
fi
fi
echog "cleanup_spec for $i..."
cleanup_spec $i
# convert from PLD's cases
subst "s|%if %{with \(.*\)}|%if_with \1|g" $i
subst "s|%if %{without \(.*\)}|%if_without \1|g" $i
# replaces with and without too
subst "s|^%bcond_with|%def_with|g" $i
#subst "s|%{?with_\(.*\):|%{subst_with
echog "fix name and release..."
build_rpms_name "$i"
# For case if name was macros
test -n "$BASENAME" && set_var $i Name $BASENAME
echog -n "fix obsoleted constructions..."
subst "s|Source0:|Source:|" $i
subst "s|Patch0:|Patch:|" $i
SPECDIR=`dirname $i`
if ! is_git $SPECDIR && [ -n "$RENAME_SOURCE_TARBALL" ] ; then
# Use tar.bz2 for tarball if not git case.
subst "s|\(Source:.*\).tar.gz|\1.tar.bz2|" $i
subst "s|\(Source:.*\).tgz|\1.tar.bz2|" $i
fi
subst "s|\(%post.*-p *\)/sbin/ldconfig|\1%post_ldconfig|g" $i
subst "s|\(%postun.*-p *\)/sbin/ldconfig|\1%postun_ldconfig|g" $i
subst "s|\$RPM_BUILD_ROOT/%|%buildroot%|g" $i
subst "s|\$RPM_BUILD_ROOT|%buildroot|g" $i
#subst "s|%buildrootetc|%buildroot/etc|g" $i
# Fix groups to ALT's
subst "s|Group: *Libraries|Group: System/Libraries|g" $i
# It is not recommended to use macroses for commands (__subst is unique in this)
subst "s|%__install |install |g
s|%__cp |cp |g
s|%__rm -f |rm -f |g
s|%__mv |mv |g
s|%__mkdir_p|mkdir -p|g
s|%__mkdir |mkdir |g
s|%__make|make|g
s|%__awk|gawk|g
s|%__bzip2|bzip2|g
s|%__cat|cat|g
s|%__chgrp|chgrp|g
s|%__chmod|chmod|g
s|%__chown|chown|g
s|%__cpio|cpio|g
s|%__file|file|g
s|%__gpg|gpg|g
s|%__grep|grep|g
s|%__gzip|gzip|g
s|%__id|id|g
s|%__install|install|g
s|%__install_info|install-info|g
s|%__ln_s|ln -s|g
s|%__patch|patch|g
s|%__perl|perl|g
s|%__pgp|pgp|g
s|%__python|python|g
s|%__rm|rm|g
s|%__rsh|rsh|g
s|%__sed|sed|g
s|%__ssh|ssh|g
s|%__subst|sed -i|g
s|%__tar|tar|g
s|%__unzip|unzip|g
s|%__ar|ar|g
s|%__as|as|g
s|%__cc|gcc|g
s|%__cpp|gcc -E|g
s|%__cxx|g++|g
s|%__ld|ld|g
s|%__nm|nm|g
s|%__objcopy|objcopy|g
s|%__objdump|objdump|g
s|%__ranlib|ranlib|g
s|%__strip|strip|g
s|%__libtoolize|libtoolize|g
s|%__aclocal|aclocal|g
s|%__autoheader|autoheader|g
s|%__automake|automake|g
s|%__autoconf|autoconf|g
s|%__tar |tar |g" $i
subst "s|%__make *install|%make_install install|g
s|^make *install|%make_install install|g
s|^make %{?_smp_mflags}|%make_build|g
s|%make_install *install *DESTDIR=%buildroot|%makeinstall_std|g
s|%make_install *DESTDIR=%buildroot *install|%makeinstall_std|g
s|^make *DESTDIR=%buildroot *install|%makeinstall_std|g" $i
subst "s|/etc/|%_sysconfdir/|g
s|%_sysconfdir/rc.d/init.d|%_initdir/|g
s|%_sysconfdir/rc.d/init.d/|%_initrddir/|g
s|%_sysconfdir/init.d/|%_initrddir/|g
s|%_sysconfdir/X11/fontpath.d|%_fontpathdir|g" $i
subst "s|%_libdir/mono/gac|%_monogacdir|g
s|%_libdir/mono|%_monodir|g" $i
subst "s|%prefix/lib|%_libdir|g
s|%prefix/include|%_includedir|g
s|/usr/include|%_includedir|g
s|/usr/src|%_usrsrc|g
s|%prefix/share|%_datadir|g" $i
subst "s|Requires(post): /sbin/install-info|Requires(post): %install_info|g" $i
subst "s|Requires(preun): /sbin/install-info|Requires(preun): %uninstall_info|g" $i
# also clean_scrollkeeper exists
#subst "s|^scrollkeeper-update|%update_scrollkeeper|g" $i
# FIXME: only in rpm-build-compat
#subst "s|^%_datadir/aclocal/|%_aclocaldir/|g" $i
#subst "s|^%_datadir/gtk-doc/html/|%_gtkdocdir/|g" $i
# TODO: not in expressions
subst "s|/usr/sbin/|%_sbindir/|g
s|/usr/bin/|%_bindir/|g
s|/usr/lib/|%_libdir/|g
s|/usr/share/|%_datadir/|g
s|%_datadir/games|%_gamesdatadir|g" $i
subst "s|%pear_phpdir|%pear_dir|g" $i
# changes for rpm-build-pear 0.3
# FIXME: remove pear_install replacing in future
subst "s|%pear_install\$|%register_pear_module|g
s|%pear_uninstall|%unregister_pear_module|g
s|%pear_prepare_module|%pear_build|g
s|%pear_install_module|%pear_install_std|g" $i
# subst normalize
subst "s|^sed -i -e |%__subst |g
s|^subst |%__subst |g
s|perl -pi -e *|%__subst |g" $i
subst "s|^python |%__python |g
s|%py_sitescriptdir|%python_sitelibdir|g
s|%python_version|%__python_version|g
s|%python_sitelib/|%python_sitelibdir/|g
s|%py_sitedir/|%python_sitelibdir/|g
s|%python_sitearch|%python_sitelibdir|g
s|\(%pyrequires_eq.*\)|#\1|g" $i
subst "s|ruby setup.rb config|%ruby_config|g
s|ruby setup.rb setup|%ruby_setup|g" $i
subst "s|^%__python setup.py build|%python_build|g" $i
subst "s|^%__python setup.py install --root %buildroot|%python_install|g" $i
subst "s|^%__python setup.py install -O2 --root %buildroot|%python_install|g" $i
subst "s|^%__python setup.py install --optimize --root %buildroot|%python_install|g" $i
subst "s|%_datadir/man/|%_mandir/|g" $i
subst "s|%_mandir/man\([0-9]\)|%_man\1dir|g" $i
subst "s|%_libdir/pkgconfig|%_pkgconfigdir|g" $i
subst "s|%_datadir/pixmaps|%_pixmapsdir|g" $i
subst "s|%_datadir/applications|%_desktopdir|g" $i
subst "s|%update_desktop_database|%update_desktopdb|g" $i
subst "s|%clean_desktop_database|%clean_desktopdb|g" $i
subst "s|%gconf_schema_install \(.*\)\.schemas|%gconf2_install \1|g" $i
subst "s|%_browserpluginsdir|%browser_plugins_path|g" $i
subst "s|%_iconsdir/hicolor/48x48/apps|%_icons48dir|g
s|%_iconsdir/hicolor/32x32/apps|%_niconsdir|g
s|%_iconsdir/hicolor/16x16/apps|%_icons16dir|g
s|%_iconsdir/mini|%_miconsdir|g
s|%_iconsdir/large|%_liconsdir|g
s|%_datadir/icons|%_iconsdir|g" $i
# remove MDK compatibility macroses
subst "s|%perl_vendorlib|%perl_vendor_privlib|g
s|%perl_vendorarch|%perl_vendor_archlib|g" $i
subst "s|%_datadir/doc|%_docdir|g" $i
subst "s|%_datadir/omf|%_omfdir|g" $i
subst "s|%_defaultdocdir|%_docdir|g" $i
subst "s|%__autoreconf|%autoreconf|g" $i
subst "s|%rpmcflags|%optflags|g" $i
subst "s|^%clean$||g" $i
subst "s|^rm -rf %buildroot$||g" $i
subst "s|^%defattr(-,root,root)||g" $i
subst "s|^%defattr(644,root,root,755)||g" $i
#subst "s|^%attr(.*)\(.*\)$|\1|g" $i
subst "s|^ *%|%|g" $i
echog "DONE"
# TODO use perl -pe
echog -n "fix requires..."
ALLREPLRULES=""
for n in `print_buildreq $i` ; do
toalt_pkgrepl $n && ALLREPLRULES="$ALLREPLRULES
s|(.*Req.*)$REPLRULE1|\1$REPLRULE2|g"
#echo REPLRULE: $REPLRULE
done
#echo ALL: $ALLREPLRULES
# Replace package names in source spec
mv $i $i.old.cs.txt && cat $i.old.cs.txt | \
sed -r -e "$ALLREPLRULES" > $i || mv $i.old.cs.txt $i
rm -f $i.old.cs.txt
echog "DONE"
done
#!/bin/sh
# 2004-2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# src.rpm- ( ALT Linux) .
#
# apt-get source
# -c - checkonline
# -n - do not install
. /etc/rpm/etersoft-build-functions
# path to ALT Linux's repositories
REPOSITORY="files/SRPMS obsolete orphaned"
# Name of systems
SYSNAME[0]="alt"
SYSNAME[1]="fedora"
SYSNAME[2]="fedora-ccrma"
SYSNAME[3]="mandriva"
SYSNAME[4]="mandriva-contrib"
SYSNAME[5]="suse"
SYSNAME[6]="suse-edu1"
SYSNAME[7]="suse-edu2"
SYSNAME[8]="alt-obsolete"
SYSNAME[9]="alt-orphaned"
SYSNAME[10]="pld"
# Urls
SYSURL[0]="ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS"
SYSURL[1]="ftp://mirror.yandex.ru/fedora/linux/releases/9/Everything/source/SRPMS"
SYSURL[2]="http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/9/SRPMS"
SYSURL[3]="ftp://mirror.yandex.ru/mandriva/official/2008.1/SRPMS/main/release"
SYSURL[4]="ftp://mirror.yandex.ru/mandriva/official/2008.1/SRPMS/contrib/release"
SYSURL[5]="ftp://mirror.yandex.ru/opensuse/distribution/11.0/repo/src-oss/suse/src"
SYSURL[6]="http://opensuse.unixheads.net/repositories/Education:/desktop/openSUSE_10.3/src"
SYSURL[7]="http://www.opensuse-education.org/download/repos/1.0/11.0/suse/src"
SYSURL[8]="ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/obsolete"
SYSURL[9]="ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/orphaned"
SYSURL[10]="ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS"
list_systems()
{
echo "Known systems:"
for ((i=0; i < ${#SYSNAME[*]}; i++)) ; do
printf "[%-17s] %s\n" ${SYSNAME[$i]} ${SYSURL[$i]}
done
}
print_list()
{
local i
for i in $@ ; do
echo -e "\t$i"
done
}
html_filter()
{
grep "src.rpm" | sed -e "s|.*href=\"||g" | sed -e "s|\".*||g"
}
list_filter()
{
sed -e "s|.src.rpm$||g"
}
# Using: git_list idx [force]
# set LIST variable to list file
get_list()
{
[ -n "$VERBOSE" ] && echo "get_list for $1"
local URL=${SYSURL[$1]}
local FORCE=$2
local SYS=${SYSNAME[$1]}
LIST=$OURTMPDIR/tmp-rpmgpall-$SYS
if [ ! -f "$LIST" ] || [ "$FORCE" = "force" ] ; then
echo "Get list for $SYS from $URL"
#curl -l $URL/ >$LIST
# suitable for ftp and http lists
curl -l $URL/ | html_filter >$LIST
else
echo "List for $SYS"
fi
}
get_system_idx()
{
for ((i=0; i < ${#SYSNAME[*]}; i++)) ; do
if [ ${SYSNAME[$i]} = "$1" ] ; then
echo $i
return 0
fi
done
return 1
}
check_name()
{
if [ -z "$1" ] ; then
echo "Error: missed package param"
exit 1
fi
NLIST=`cat $LIST | grep -i $1`
if [ `cat $LIST | list_filter | grep -i $1 | wc -l` -gt 1 ] ; then
#echo "Please type a full name of the package"
print_list $NLIST
return 1
fi
if [ -z "$NLIST" ] ; then
echo "$1: Not found"
return 1
fi
return 0
}
check_system()
{
local IDX=$1
local URL=${SYSURL[$IDX]}
#echo "Check for $SYSTEM"
get_list $IDX $FORCEUPDATE
#ls -l $LIST
check_name $NAME && wget -c $URL/$NLIST
}
if [ "$1" = "-h" ]; then
echog "Using:"
echog "rpmgp [-a -c -n] [system] pkgname - download src.rpm from 'system' repository to RPM/SRPMS and install it"
echog " name - installed package name or src.rpm"
echog " system - name of system (ALT Linux by default if -a missed too)"
echog " -a check for pkgname in all known repositories"
echog " -c check for exist the package in ALT Linux repository"
echog " -b install packages needed for build (installs with sudo apt-get)"
echog " -l lists packages needed for build (in local pkg system notation) (experimental)"
echog " -n do not install in RPM after download, download in current dir"
echog " -r refresh package list (download it again)"
echog " -s lists all known systems"
exit 0
fi
TRYINST="1"
if [ "$1" = "-n" ] ; then
shift
TRYINST=""
fi
# list systems
if [ "$1" = "-s" ] ; then
list_systems
exit 0
fi
# update cache list
if [ "$1" = "-r" ] ; then
FORCEUPDATE=force
shift
# if followed by system name
IDX=`get_system_idx "$2"`
if [ -n "$IDX" ] ; then
get_list $IDX $FORCEUPDATE
shift
exit 0
fi
fi
# check for all repos
if [ "$1" = "-a" ] ; then
ALLSYSTEM=1
shift
fi
test -z "$1" && fatal "Please run with spec/package name"
# Check concrete system
# two params: system, package
if [ -n "$2" ] ; then
NAME=$2
IDX=`get_system_idx "$1"`
if [ -n "$IDX" ] ; then
check_system $IDX
else
fatal "Unknown system '$1', use rpmgp -s for get list"
fi
exit 0
else
NAME=$1
fi
# Check all systems
if [ -n "$ALLSYSTEM" ] ; then
# search throw all systems
for ((i=0; i < ${#SYSNAME[*]}; i++)) ; do
echo
check_system $i
done
exit 0
fi
#
# , ( ?),
# -
#
#
# - []
# install binary packages
if [ "$1" = "-b" ] ; then
shift
parse_cmd_pre "$@"
pack_src_rpm $LISTRPMARGS
echog "Running apt-get for install needed packages for $LISTBUILT"
cd $RPMDIR/SRPMS
# FIXME: ALT Specific
$SUDO apt-get build-dep $LISTBUILT
cd -
exit 0
fi
# lists packages for build
if [ "$1" = "-l" ] ; then
shift
print_target_buildreq $1
exit 0
fi
# Check online
if [ "$1" = "-c" ] ; then
shift
CHECKONLINE=1
if [ -f $1 ] ; then
build_rpms_name "$1"
SRCRPM=$NAMESRPMIN
else
echo $1 | grep rpm 2>/dev/null && SRCRPM=$1 ||
SRCRPM=`rpm -q $1 --queryformat "%{SOURCERPM}\n" | tail -n 1`
fi
RET="MISSED"
for i in $REPOSITORY ; do
echog "Checking in repository $i ..."
rsync -n --progress $RSYNCSISYPHUS/$i/$SRCRPM >/dev/null 2>&1 && { RET=$i; break; }
done
echog "Repository Filename"
printf "%-12s %30s\n" $RET $SRCRPM
exit 0
fi
echo
echo "########################################"
if [ -z "${1/*src.rpm/}" ]
then
# it is src.rpm package
SRCRPM=$1
else
if [ -z "${1/*rpm/}" ] ; then
# it is rpm package (locale placed?)
SRCRPM=`rpm -qp $1 --queryformat "%{SOURCERPM}\n"`
else
SRCRPM=`rpm -q $1 --queryformat "%{SOURCERPM}\n"`
fi
fi
test -z "$SRCRPM" && fatal "Cannon find package for $1"
echog "Try to download $SRCRPM"
test -z ${TRYINST} || { mkdir -p $RPMDIR/SRPMS && cd $RPMDIR/SRPMS ; }
echog "Downloading in $(pwd)"
for i in $REPOSITORY
do
echo "--------Check in $i-----------"
rsync -vay --partial --checksum --copy-links \
--delete-after --progress $RSYNCSISYPHUS/$i/$SRCRPM ./$SRCRPM && break
done
test -z ${TRYINST} && exit 0
echo
echog "Installing..."
rpm -iv $SRCRPM
#!/bin/sh
# 2005-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# GS - get source
# 18.08.05, 03.09.05
# , gz/bz2/tgz/zip
# :
# - -
# TODO: -h (build in hasher), -s (sign for upload)
# -a - get all source
# check for the same file with other compression
. /etc/rpm/etersoft-build-functions
WEXT=""
GETSOURCE=""
LOADLIST="0"
#############################
Usage="Usage: $name [-a -r ] spec..."
function mygetopts()
{
name=${0##*/}
Descr="$name - get sources for spec"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -a - get all source (not only 0)"
echog " -f - force download (remove source before download)"
}
while getopts :haf opt; do
case $opt in
h) phelp; exit 0;;
a) LOADLIST=" 0 1 2 3 4 5 6 7 8" ;;
f) FORCEDOWNLOAD=1 ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
esac
done
# remove args that were options
shift $((OPTIND - 1))
LISTRPMARGS=$@
}
get_tarball()
{
# use wget with try=1 and timeout = 30 sec
wget -c -t 1 -T 30 "$1"
}
get_archive()
{
#TODO: check for gz
URL=${GETSOURCE/.tar.bz2/}
get_tarball "$URL.$1" || return
WEXT=`basename $URL`
echog -n "Converting to $WEXT.tar.bz2..."
}
get_archive1()
{
#TODO: check for gz
URL=${GETSOURCE/.bz2/}
get_tarball "$URL$1" || return
WEXT=`basename $URL`
echog -n "Converting to $WEXT.bz2..."
}
bzipit()
{
locale PBZIPIT
PBZIPIT=`which pbzip2 2>/dev/null`
if [ -n "$PBZIPIT" ] ; then
echog -n " with pzip2..."
$PBZIPIT -9 -f $1
return $?
else
echog -n " with bzip2..."
bzip -f --best $1
return $?
fi
}
get_bzip()
{
get_tarball "$GETSOURCE" || return $?
TARBALL=`basename $GETSOURCE`
bzip -t $TARBALL
return $?
}
function get_gz()
{
get_archive1 .gz || return
gunzip $WEXT.gz && bzipit $WEXT
}
function get_raw()
{
get_archive1 "" || return
test -f $WEXT && bzipit $WEXT
}
function get_targz()
{
get_archive tar.gz || return
#gzip -t $WEXT.tar.gz || return
gunzip $WEXT.tar.gz && bzipit $WEXT.tar
}
function get_tar()
{
get_archive tar || return
bzipit $WEXT.tar
}
function get_tgz()
{
get_archive tgz || return
gunzip $WEXT.tgz && bzipit $WEXT.tar
}
function get_tbz2()
{
get_archive tbz2 || return
mv $WEXT.tbz2 $WEXT.tar.bz2
}
function get_zip()
{
get_archive zip || return
mkdir $WEXT.zip.dir || return
cd $WEXT.zip.dir
unzip -q ../$WEXT.zip && tar cf ../$WEXT.tar . && bzipit ../$WEXT.tar
cd ..
rm -rf $WEXT.zip.dir
}
function dir_name()
{
rm .listing
#wget `dirname $MAINSOURCE` --dont-remove-listing
}
function get_source()
{
GETSOURCE=$(eval_spec $1 | get_var "$2")
}
function print_error()
{
echog "You have no spec files as arg"
echog "Please use for spec files only. If you wish to download src.rpm, use rpmgp script."
exit 1
}
parse_cmd_pre "$@"
mygetopts $LISTARGS
#echo $LISTNAMES @ $LISTARGS
test -z "$LISTNAMES" && print_error
for i in $LISTNAMES
do
if [ -n "${i/*spec/}" ] ; then
print_error
fi
for nn in "" $LOADLIST
do
get_source $i "Source$nn"
test -z "$GETSOURCE" && { echog "Skip Source${nn} from $i" ; continue ; }
FTB=`basename $GETSOURCE`
build_rpms_name $i
[ -n "$FORCEDOWNLOAD" ] && rm -f "$RPMSOURCEDIR/$FTB"
# was: test -f
bzip -t "$RPMSOURCEDIR/$FTB" && { echog "Tarball $FTB already exists in SOURCES dir, skipping." ; continue ; }
mkdir -p $RPMSOURCEDIR/ && pushd $RPMSOURCEDIR/ || fatal "Can't create/chdir..."
echog "Try to load $GETSOURCE for $i"
if [ -n "${GETSOURCE/*.bz2/}" ] ; then
warning "It is recommended to use .bz2 tarballs for sources"
get_tarball "$GETSOURCE"
elif [ -n "${GETSOURCE/*.tar.bz2/}" ] ; then
warning "It is not tarball..."
get_bzip || get_gz || get_raw || fatal "Error: Cannot retrieve $GETSOURCE"
else
get_bzip || get_targz || get_tbz2 || get_tgz || get_zip || get_tar || dir_name || fatal "Error: Cannot retrieve $GETSOURCE"
fi
echo "DONE"
popd
add_changelog_helper "- new version ($VERSION)" $i
done
done
exit 0
#!/bin/sh
# 2003-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# , , which
# :
# -
# TODO not -i only, we need any key
#. /etc/rpm/etersoft-build-functions
if [ "$1" = "-h" ]; then
echo "rpmqf - the same as rpm -qf"
exit 0
fi
if [ "$1" = "-i" ]; then
ARG=$1
shift
fi
TOFILE=`which $1 2>/dev/null`
if [ -z "$TOFILE" ] ; then
#echo "$1 is missed in PATH"
#exit 1
TOFILE=$1
fi
if [ -L "$TOFILE" ] ; then
LINKTO=`readlink "$TOFILE"`
if [ -L "$LINKTO" ] ; then
LINKTO1=`readlink "$LINKTO"`
echo "Note: $TOFILE is link to $LINKTO, that is link to $LINKTO1"
TOFILE="$LINKTO1"
else
echo "Note: $TOFILE is link to $LINKTO"
TOFILE="$LINKTO"
fi
fi
rpm -qf $ARG "$TOFILE"
#!/bin/sh
# 2006, 2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# , ,
# , :
# rpmrb []
# 2.6.1 (), 2.6 (major) .1 (minor)
REMOTE=
if [ "$1" = "-r" ] ; then
REMOTE=$1
shift
fi
SPEC=$1
VER=$2
REL=$3
if [ "$1" = "-h" ]; then
echo "rpmrb spec [vermajor][.verminor] [rel] - update spec to vermajor.verminor version, build %rel release"
exit 0
fi
. /etc/rpm/etersoft-build-functions
test -e "$SPEC" || fatal "use with spec"
if [ -n "$VER" ] ; then
test -n "$REL" || REL=alt1
set_version $SPEC $VER
set_release $SPEC $REL
add_changelog -e "- new version $VER (with rpmrb script)" $SPEC || echog "Changelog entry already exists"
fi
rpmgs $SPEC || fatal "Error with get source"
rpmbsh $REMOTE -i $SPEC || fatal "Error with build in hasher"
rpmbs -u $SPEC || fatal "Error with upload"
#!/bin/sh
# 2008 (c) Etersoft www.etersoft.ru
# Public domain
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Thanks Alexey Gladkov <legion@altlinux.ru> for the instructions
#
# See http://www.freesource.info/wiki/ALTLinux/Sisyphus/devel/Unmets
# $Id: rpmunmets,v 1.6 2008/07/17 13:36:51 lav Exp $
#
# Tests unmets in built int hasher packages
if [ ! -f /etc/rpm/etersoft-build-functions ] ; then
echog "NOTE: /etc/rpm/etersoft-build-functions does not exist"
echog "Please fix this path in $0 file if you are using local install"
exit 1
fi
. /etc/rpm/etersoft-build-functions
make_ordinalbox()
{
mkdir -p $ORDINALWORKDIR
echo "Build aptbox in $ORDINALWORKDIR ..."
#rm -rf $ORDINALWORKDIR
mkaptbox -f --apt-config=$ORDINALAPTCONF $ORDINALWORKDIR
}
make_testingbox()
{
mkdir -p $TESTINGWORKDIR
echo "Build aptbox in $TESTINGWORKDIR ..."
#rm -rf $TESTINGWORKDIR
mkaptbox -f --apt-config=$TESTINGAPTCONF $TESTINGWORKDIR
}
Usage="Usage: $name [-M24 -M40]"
function mygetopts()
{
name=${0##*/}
Descr="$name - tests unmets in build packages"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -s - get all unmets"
echog " -M40 - test for distro ALT Linux 4.0"
}
SKIPTST=
while getopts :hs opt; do
case $opt in
h) phelp; exit 0;;
s) SKIPTST=1 ;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
# pass other options to RPM:
LISTRPMARGS=$@
}
# FIXME: needs no args now
parse_cmd_pre "" "$@"
mygetopts $LISTARGS
# Prepare our variables
ORDINALWORKDIR=$OURTMPDIR/WD1
TESTINGWORKDIR=$OURTMPDIR/WD2
ORDINALAPTCONF=$APTCONF
TESTINGAPTCONF=$OURTMPDIR/apt.conf
# Hack: subst patch to sources.list
cat $ORDINALAPTCONF | \
sed -e "s|\"/etc/apt/.*\"|\"$OURTMPDIR/sources.list\"|g" >$TESTINGAPTCONF
cat /etc/apt/sources.list.$MENV >$OURTMPDIR/sources.list || fatal ""
HASHERDIR=$HASHERDIR$MENVARG
if [ ! -d $HASHERDIR/repo ] || [ -n "$SKIPTST" ] ; then
[ -z "$SKIPTST" ] && fatal "Can't find repo in hasher '$HASHERDIR' dir, use -s for overall check"
make_ordinalbox
echo
echo "All unmets in repo $MENV"
$ORDINALWORKDIR/aptbox/apt-cache unmet
rm -rf $ORDINALWORKDIR
exit 0
fi
echo "rpm file:$HASHERDIR/repo/ $DEFAULTARCH hasher" >>$OURTMPDIR/sources.list
make_ordinalbox
make_testingbox
echo "Calculate unmets..."
$ORDINALWORKDIR/aptbox/apt-cache unmet > $OURTMPDIR/unmets.old
$TESTINGWORKDIR/aptbox/apt-cache unmet > $OURTMPDIR/unmets.new
echo
echo "New unmets:"
diff -U0 $OURTMPDIR/unmets.{old,new}
#!/bin/sh
# 2005-2006 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# Open package Url in BROWSER
# :
# - -
#
. /etc/rpm/etersoft-build-functions
[ -n "$BROWSER" ] || BROWSER=url_handler.sh
# (command from perl-libwww)
which GET &>/dev/null && GET=GET || GET=false
#############################
Usage="Usage: $name [-c -f -p -s] spec or package..."
function mygetopts()
{
name=${0##*/}
Descr="$name - open package Url in browser"
phelp()
{
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -c - check URL"
echog " -f - print failed URL only"
echog " -p - open package page at sisyphus.ru"
echog " -s - open source dir in browser"
}
while getopts :hcfsp opt; do
case $opt in
h) phelp; exit 0;;
c) CHECKONLY=1 ;;
s) ABOUTDIR=1 ;;
p) SISYPHUSRU=1 ;;
f) FAILEDONLY=1; CHECKONLY=1 ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break;
esac
done
# remove args that were options
if [ $# -gt 0 ]; then
shift $((OPTIND - 1))
fi
# pass other options to RPM:
LISTRPMARGS=$@
}
parse_cmd_pre "$@"
mygetopts $LISTARGS
#TODO: fix
# $LISTNAMES | wc -w
if [ -n "$2" ] ; then
echo
# more than 1 arg
#PARALL=1
#test `ps a | wc -l` -gt 70 && sleep 3
fi
get_pkginfo()
{
local i=${1}
if [ -f ${i} ]
then
if [ -z ${i/*rpm/} ]
then
# it is rpm package
RPM_URL=`rpm -qp --queryformat "%{URL}" ${i}`
SOURCE=
else
RPM_URL=$(eval_spec ${i} | get_var "Url")
SOURCE=$(eval_spec ${i} | get_var "Source")
fi
else
# will it package name
RPM_URL=`rpm -q --queryformat "%{URL}" ${i}`
SOURCE=`rpm -q --queryformat "%{SOURCE}" ${i}`
fi
}
PAGEURL="http://sisyphus.ru/srpm/Sisyphus"
get_pagepkginfo()
{
local i=${1}
local PKGNAME
if [ -f ${i} ]
then
if [ -z ${i/*rpm/} ]
then
# it is rpm package
PKGNAME=`rpm -qp --queryformat "%{Name}" ${i}`
else
PKGNAME=$(eval_spec ${i} | get_var "Name")
fi
else
# will it package name
PKGNAME=`rpm -q --queryformat "%{Name}" ${i}`
fi
RPM_URL=$PAGEURL/$PKGNAME
}
for i in $LISTNAMES $LISTRPMARGS
do
if [ -n "$SISYPHUSRU" ] ; then
get_pagepkginfo $i
if [ -n "$ABOUTDIR" ] ; then
RPM_URL=$RPM_URL/get
fi
else
get_pkginfo $i
if [ -n "$ABOUTDIR" ] ; then
RPM_URL=`dirname $SOURCE`
fi
fi
test -z "$ABOUTDIR" && test -z ${RPM_URL} && fatal "Cannot get package Url from spec $i"
if [ -z "$CHECKONLY" ] ; then
if [ -n "$RPM_URL" ] && [ "$RPM_URL" != "(none)" ] ; then
echog "Opening URL '$RPM_URL' with browser '$BROWSER'"
$BROWSER $RPM_URL &
else
echog "The package '$i' has not URL"
fi
else
if [ -z "$PARALL" ] ; then
echog -n "Checking URL '$RPM_URL' from package $i ..."
$GET $RPM_URL -s -d
else
( RESULT=`$GET $RPM_URL -s -d` ;
if [ -n "$FAILEDONLY" ] ; then
test ${RESULT/ *} = "200" || printf "%-40s %s %s\n" $i $RPM_URL "${RESULT}"
else
echog "Checking URL '$RPM_URL' from package $i ... $RESULT" ;
fi
) &
fi
fi
done
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::sourcelist "/etc/apt/sources.list.DD";
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::SourceList "/etc/apt/sources.list.M23";
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::sourcelist "/etc/apt/sources.list.M24";
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::sourcelist "/etc/apt/sources.list.M30";
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::sourcelist "/etc/apt/sources.list.M40";
/*
* This is the main configuration file for the APT suite of tools,
* see apt.conf(5) for details.
*/
Dir::Etc::main "/dev/null";
Dir::Etc::parts "/var/empty";
Dir::Etc::SourceParts "/var/empty";
Dir::Etc::sourcelist "/etc/apt/sources.list.SS";
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/Sisyphus/i586 classic
rpm file:/var/ftp/ pub/ALTLinux/Sisyphus/noarch classic
rpm file:/var/ftp/ pub/ALTLinux/Daedalus/i586 classic
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/Compact/2.3 main contribs
#rpm file:/var/ftp/ pub/ALTLinux/Updates/Junior/2.3/i586 updates
rpm file:/var/ftp/ pub/ALTLinux/Updates/Compact/2.3/i586 updates
rpm file:/var/ftp/ pub/ALTLinux/backports/2.3/i586 backports
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/Master/2.4/i586 main contrib
rpm file:/var/ftp/ pub/ALTLinux/Updates/Master/2.4/i586 updates
rpm file:/var/ftp/ pub/ALTLinux/backports/2.4/i586 backports
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/Compact/3.0/i586 main contrib
rpm file:/var/ftp/ pub/ALTLinux/Updates/3.0/i586 updates
rpm file:/var/ftp/ pub/ALTLinux/backports/3.0/i586 backports
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/4.0/branch/i586 classic
rpm file:/var/ftp/ pub/ALTLinux/4.0/branch/noarch classic
rpm file:/var/ftp/ pub/ALTLinux/updates/4.0/i586 updates
rpm file:/var/ftp/ pub/ALTLinux/backports/4.0/i586 backports
# Package repository URLs
#
# You can add [alt] after rpm for digital signature check
rpm file:/var/ftp/ pub/ALTLinux/Sisyphus/i586 classic
rpm file:/var/ftp/ pub/ALTLinux/Sisyphus/noarch classic
#!/bin/sh
# 2003-2006 Etersoft www.etersoft.ru
# Public domain
# 20.06.04, 15.01.05, 28.02.05, 07.03.05, 07.09.05, 09.04.06
#
# Config file for etersoft-build-utils
# You can copy this file as ~/.ebconfig for per user settings
# and uncomment any setting line
# hasher:
#HASHERDIR=~/hasher
#HASHER_ARG=""
# ̣ ssh
#BUILDSERVER="builder"
# TODO:
#BUILDSERVERPATH=$HASHERDIR/repo/i586/RPMS.hasher
# ޣ,
#OWNERMAIL="Vitaly Lipatov <lav@altlinux.ru>"
#
#DEBUG="-v"
# , %_tmppath .rpmmacros
#BUILDROOT=
# You can uncomment it:
#DEFAULTARCH=i586
#RPMDIR=$HOME/RPM
#APTCONF=/etc/apt/apt.conf
#REMOTERPMDIR="~/RPM"
# ,
#UPLOADDIR=$RPMDIR/upload
#
#LOGDIR=$RPMDIR/log
#RSYNCSISYPHUS=rsync.altlinux.org::ALTLinux/Sisyphus
# SSH-
#RSYNCINCOMING=incoming:/incoming
# ,
#SSH_KEYFILE=~/.ssh/id_dsa
# See sisyphus_check --help for other options
#HASHER_NOCHECK=nvr,gpg,packager,buildtime
# Rename source tarball to tar.bz2 in rpmcs command
#RENAME_SOURCE_TARBALL=0
# Always pack src.rpm by legacy gzip compression
#USE_LEGACY_COMPRESSION=0
Development/Documentation|Development/C
System/Libraries|System Environment/Libraries
System/Libraries/Python|Development/Python
Development/Other|Development/Libraries
Development/Other|Development/Tools
Sound|Applications/Sound
X11/Applications/Games|Games/Other
Development/Libraries|Development/C
Applications/Databases|Databases
System/Kernel and hardware|System/Hardware
System Environment/Base|System/Base
Development/Tools|Development/Other
#libstdc++3.4-devel-precompiled|
pkg-config|pkgconfig
postgresql8.0|postgresql
postgresql8.1|postgresql
libpq4|libpq3
libSDL_sound-devel|libSDL-devel
%python-dev|
%python-base|
xorg-cf-files|
linux-libc-headers|glibc-kernheaders
libcairo-devel|cairo-devel
%__python_version|2.3
gcc3.4|gcc3.2
libfreetype-devel|freetype2-devel
libncursesw-devel|
libgnomeoffice-devel|
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libmesa-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
libcairo-devel|cairo-devel
kernel-headers-modules-wks-smp|
kernel-headers-modules-ovz-smp|
kernel-headers-modules-std-pae|kernel-headers-modules-std26-smp
kernel-headers-modules-std-smp|kernel-headers-modules-std26-up
%__python_version|2.3
gcc3.4|gcc3.3
libfreetype-devel|freetype2-devel
libncursesw-devel|
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libmesa-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
kernel-headers-modules-ovz-smp|
kernel-headers-modules-std-pae|kernel-headers-modules-std26-smp
kernel-headers-modules-std-smp|kernel-headers-modules-std26-up
libfreetype|freetype2
libfreetype-devel|freetype2-devel
libncursesw-devel|
libgnomeoffice-devel|
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libmesa-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
xorg-proto-devel|xorg-x11-proto-devel
libslang2-devel|libslang-devel
perl-devel|perl
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libmesa-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
perl-devel|perl
jackit-devel|jackit-libs-devel
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libmesa-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
perl-devel|perl
jackit-devel|
# XOrg
xorg-x11-devel|
# Debian replacements (do not works during rpm build)
libe2fs|e2fslibs
libe2fs-devel|e2fslibs-dev
libgphoto2-devel|libgphoto2-2-dev
libgphoto2|libgphoto2-2
liblcms-devel|liblcms1-dev
liblcms|liblcms1
libsane-devel|libsane-dev
libldap-devel|libldap2-dev
libldap|libldap2
libieee1284-devel|libieee1284-dev
glibc-devel|libc6-dev
libfreetype-devel|libfreetype6-dev
libfreetype|libfreetype6
libxslt-devel|libxslt1-dev
libncurses-devel|libncurses5-dev
libncursesw-devel|libncursesw5-dev
libldap-devel|libldap2-dev
libjpeg-devel|libjpeg62-dev
libcups-devel|libcupsys2-dev
libasound-devel|libasound2-dev
libicu-devel|libicu-dev
libreadline-devel|libreadline5-dev
libreadline|libreadline5
libXext-devel|libxext-dev
#libmesa-devel|libglu1-mesa-dev
libmesa-devel|mesa-common-dev
#libGL-devel|libgl1-mesa-dev
gcc-c++|g++
libstdc++6-devel|libstdc++6-dev
tcl-devel|tcl8.4-dev
perl-devel|libperl-dev
python-devel|python-dev
libpopt-devel|libpopt-dev
libpopt|libpopt0
libgtkmm2-devel|libgtkmm-2.4-dev
libpng12|libpng
libpng-devel|libpng-dev
liblcms-devel|
jackit-devel|
perl-devel|perl
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libmesa-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
jackit-devel|
perl-devel|perl
sysvinit-utils|SysVinit
# LinuxXP replacements rules
gpm-devel|
libungif-devel|
perl-devel|perl
# LinuxXP replacements rules
jackit-devel|
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libmesa-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
libusb-devel|
liblcms-devel|
libieee1284-devel|
libGLU-devel|
jackit-devel|
libldap-devel|
libxslt-devel|
libgphoto2-devel|
libsane-devel|
perl-devel|perl
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libmesa-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxorgconfig-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
# Mandriva base replacements rules
libreadline-devel|libreadline5-devel
libreadline|libreadline5
rpm-build-compat|rpm-build-altlinux-compat
libntfs|ntfsprogs
libntfs-devel|ntfsprogs-devel
libe2fs|libext2fs2
libe2fs-devel|libext2fs2-devel
libncurses|ncurses
libncurses-devel|ncurses-devel
libtinfo|ncurses
libtinfo-devel|ncurses-devel
libfreetype|libfreetype6
libfreetype-devel|libfreetype6-devel
libxslt-devel|libxslt1-devel
libcups-devel|libcups2-devel
liblcms-devel|liblcms1-devel
liblcms|liblcms1
jackit-devel|libjack0-devel
libsane-devel|libsane1-devel
libsane|libsane1
# XOrg
xorg-x11-proto-devel|libxorg-x11-devel
libxorg-x11-devel|libxorg-x11-devel
libICE-devel|libice-devel
libFS-devel|libfs-devel
libSM-devel|libsm-devel
libX11-devel|libx11-devel
libXau-devel|libxau-devel
libXaw-devel|libxaw-devel
libXrandr-devel|libxrandr-devel
libXdmcp-devel|libxdmcp-devel
libXfixes-devel|libxfixes-devel
libXfont-devel|libxfont-devel
libXft-devel|libxft-devel
libXext-devel|libxext6-devel
libXext|libxext6
libXi-devel|libxi-devel
libXxf86misc-devel|libxxf86misc-devel
libXmu-devel|libxmu-devel
libXp-devel|libxp-devel
libXpm-devel|libxpm-devel
libXrender-devel|libxrender-devel
libXres-devel|libxres-devel
libXScrnSaver-devel|libxscrnsaver1-devel
libXinerama-devel|libxinerama-devel
libXt-devel|libxt-devel
libXtst-devel|libxtst-devel
libXxf86dga-devel|libxxf86dga-devel
libXcomposite-devel|libxcomposite-devel
libXxf86vm-devel|libxxf86vm-devel
libdmx-devel|libdmx-devel
libdmx|libdmx1
libfontenc-devel|libfontenc1-devel
libfontenc|libfontenc1
libXdamage-devel|libxdamage-devel
libxkbfile-devel|libxkbfile-devel
libxkbui-devel|libxkbui-devel
libXTrap-devel|libxtrap-devel
libXvMC-devel|libxvmc-devel
libXcursor-devel|libxcursor-devel
libXevie-devel|libxevie-devel
libXv-devel|libxv1-devel
libmesa-devel|libmesagl1-devel
libGLU-devel|libmesaglu1-devel
libmesa|libmesagl1
libGLU|libmesaglu1
# Mandriva base replacements rules
libldap-devel|libldap2.2_7-devel
libldap|libldap2.2_7
# XOrg
libICE-devel|libxorg-x11-devel
libFS-devel|libxorg-x11-devel
libSM-devel|libxorg-x11-devel
libX11-devel|libxorg-x11-devel
libXau-devel|libxorg-x11-devel
libXaw-devel|libxorg-x11-devel
libXrandr-devel|libxorg-x11-devel
libXdmcp-devel|libxorg-x11-devel
libXfixes-devel|libxorg-x11-devel
libXfont-devel|libxorg-x11-devel
libXft-devel|libxorg-x11-devel
libXi-devel|libxorg-x11-devel
libXext-devel|libxorg-x11-devel
libXxf86misc-devel|libxorg-x11-devel
libXmu-devel|libxorg-x11-devel
libXp-devel|libxorg-x11-devel
libXpm-devel|libxorg-x11-devel
libXrender-devel|libxorg-x11-devel
libXres-devel|libxorg-x11-devel
libXScrnSaver-devel|libxorg-x11-devel
libXinerama-devel|libxorg-x11-devel
libXt-devel|libxorg-x11-devel
libXtst-devel|libxorg-x11-devel
libXxf86dga-devel|libxorg-x11-devel
libXcomposite-devel|libxorg-x11-devel
libXxf86vm-devel|libxorg-x11-devel
libdmx-devel|libxorg-x11-devel
libfontenc-devel|libxorg-x11-devel
libXdamage-devel|libxorg-x11-devel
libxorgconfig-devel|libxorg-x11-devel
libxkbfile-devel|libxorg-x11-devel
libxkbui-devel|libxorg-x11-devel
libXTrap-devel|libxorg-x11-devel
libXvMC-devel|libxorg-x11-devel
libXcursor-devel|libxorg-x11-devel
libXevie-devel|libxorg-x11-devel
libXv-devel|libxorg-x11-devel
libmesa-devel|libMesaGLU1-devel
libGLU-devel|libMesaGLU1-devel
libmesa|libMesaGLU1
libGLU|libMesaGLU1
# Mandriva base replacements rules
python-devel|libpython2.4-devel
# XOrg
libICE-devel|libxorg-x11-devel
libFS-devel|libxorg-x11-devel
libSM-devel|libxorg-x11-devel
libX11-devel|libxorg-x11-devel
libXau-devel|libxorg-x11-devel
libXaw-devel|libxorg-x11-devel
libXrandr-devel|libxorg-x11-devel
libXdmcp-devel|libxorg-x11-devel
libXfixes-devel|libxorg-x11-devel
libXfont-devel|libxorg-x11-devel
libXft-devel|libxorg-x11-devel
libXi-devel|libxorg-x11-devel
libXext-devel|libxorg-x11-devel
libXxf86misc-devel|libxorg-x11-devel
libXmu-devel|libxorg-x11-devel
libXp-devel|libxorg-x11-devel
libXpm-devel|libxorg-x11-devel
libXrender-devel|libxorg-x11-devel
libXres-devel|libxorg-x11-devel
libXScrnSaver-devel|libxorg-x11-devel
libXinerama-devel|libxorg-x11-devel
libXt-devel|libxorg-x11-devel
libXtst-devel|libxorg-x11-devel
libXxf86dga-devel|libxorg-x11-devel
libXcomposite-devel|libxorg-x11-devel
libXxf86vm-devel|libxorg-x11-devel
libdmx-devel|libxorg-x11-devel
libfontenc-devel|libxorg-x11-devel
libXdamage-devel|libxorg-x11-devel
libxorgconfig-devel|libxorg-x11-devel
libxkbfile-devel|libxorg-x11-devel
libxkbui-devel|libxorg-x11-devel
libXTrap-devel|libxorg-x11-devel
libXvMC-devel|libxorg-x11-devel
libXcursor-devel|libxorg-x11-devel
libXevie-devel|libxorg-x11-devel
libXv-devel|libxorg-x11-devel
libmesa-devel|libMesaGLU1-devel
libGLU-devel|libMesaGLU1-devel
libmesa|libMesaGLU1
libGLU|libMesaGLU1
python-devel|libpython2.4-devel
libldap-devel|libldap2.3_0-devel
libldap|libldap2.3_0
# XOrg
libICE-devel|libxorg-x11-devel
libFS-devel|libxorg-x11-devel
libSM-devel|libxorg-x11-devel
libX11-devel|libxorg-x11-devel
libXau-devel|libxorg-x11-devel
libXaw-devel|libxorg-x11-devel
libXrandr-devel|libxorg-x11-devel
libXdmcp-devel|libxorg-x11-devel
libXfixes-devel|libxorg-x11-devel
libXfont-devel|libxorg-x11-devel
libXft-devel|libxorg-x11-devel
libXi-devel|libxorg-x11-devel
libXext-devel|libxorg-x11-devel
libXxf86misc-devel|libxorg-x11-devel
libXmu-devel|libxorg-x11-devel
libXp-devel|libxorg-x11-devel
libXpm-devel|libxorg-x11-devel
libXrender-devel|libxorg-x11-devel
libXres-devel|libxorg-x11-devel
libXScrnSaver-devel|libxorg-x11-devel
libXinerama-devel|libxorg-x11-devel
libXt-devel|libxorg-x11-devel
libXtst-devel|libxorg-x11-devel
libXxf86dga-devel|libxorg-x11-devel
libXcomposite-devel|libxorg-x11-devel
libXxf86vm-devel|libxorg-x11-devel
libdmx-devel|libxorg-x11-devel
libfontenc-devel|libxorg-x11-devel
libXdamage-devel|libxorg-x11-devel
libxorgconfig-devel|libxorg-x11-devel
libxkbfile-devel|libxorg-x11-devel
libxkbui-devel|libxorg-x11-devel
libXTrap-devel|libxorg-x11-devel
libXvMC-devel|libxorg-x11-devel
libXcursor-devel|libxorg-x11-devel
libXevie-devel|libxorg-x11-devel
libXv-devel|libxorg-x11-devel
libssl-devel|libopenssl-devel
libgphoto2-devel|libgphoto-devel
libxslt-devel|libxslt-devel
libcups|libcups2
libcups-devel|libcups2-devel
python-devel|libpython2.5-devel
rpm-build|rpm
libfreetype|freetype2
libfreetype-devel|freetype2-devel
libusb-devel|libusb
jackit-devel|
libgif-devel|
liblcms-devel|liblcms-devel
liblcms|liblcms
libldap-devel|openldap2-devel
libldap|openldap2-client
libsane|sane
libsane-devel|sane
# one package
libgphoto2-devel|libgphoto2
# missed
libieee1284-devel|
perl-devel|perl
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
libmesa-devel|XFree86-Mesa-devel
libGLU-devel|XFree86-Mesa-devel
# PCLinux base replacements rules (the same as for Mandriva)
tcl-devel|libtcl8.4-devel
tcl|libtcl8.4
libreadline-devel|libreadline5-devel
libreadline|libreadline5
autoconf|autoconf2.1
python-devel|libpython2.4-devel
rpm-build-compat|rpm-build-altlinux-compat
libntfs|ntfsprogs
libntfs-devel|ntfsprogs-devel
libe2fs|libext2fs2
libe2fs-devel|libext2fs2-devel
libncurses|ncurses
libncurses-devel|ncurses-devel
libtinfo|ncurses
libtinfo-devel|ncurses-devel
libfreetype|libfreetype6
libfreetype-devel|libfreetype6-devel
libldap-devel|libldap2.3_0-devel
libldap|libldap2.3_0
libsane-devel|libsane1-devel
libsane|libsane1
jackit-devel|libjack0-devel
arts-devel|libarts1-devel
# XOrg
xorg-x11-proto-devel|libxorg-x11-devel
xorg-x11-devel|libxorg-x11-devel
libICE-devel|libice-devel
libFS-devel|libfs-devel
libSM-devel|libsm-devel
libX11-devel|libx11-devel
libXau-devel|libxau-devel
libXaw-devel|libxaw-devel
libXrandr-devel|libxrandr-devel
libXdmcp-devel|libxdmcp-devel
libXfixes-devel|libxfixes-devel
libXfont-devel|libxfont-devel
libXft-devel|libxft-devel
libXext-devel|libxext6-devel
libXext|libxext6
libXi-devel|libxi-devel
libXxf86misc-devel|libxxf86misc-devel
libXmu-devel|libxmu-devel
libXp-devel|libxp-devel
libXpm-devel|libxpm-devel
libXrender-devel|libxrender-devel
libXres-devel|libxres-devel
libXScrnSaver-devel|libxscrnsaver1-devel
libXinerama-devel|libxinerama-devel
libXt-devel|libxt-devel
libXtst-devel|libxtst-devel
libXxf86dga-devel|libxxf86dga-devel
libXcomposite-devel|libxcomposite-devel
libXxf86vm-devel|libxxf86vm-devel
libdmx-devel|libdmx-devel
libdmx|libdmx1
libfontenc-devel|libfontenc1-devel
libfontenc|libfontenc1
libXdamage-devel|libxdamage-devel
libxkbfile-devel|libxkbfile-devel
libxkbui-devel|libxkbui-devel
libXTrap-devel|libxtrap-devel
libXvMC-devel|libxvmc-devel
libXcursor-devel|libxcursor-devel
libXevie-devel|libxevie-devel
libXv-devel|libxv1-devel
libmesa-devel|libmesagl1-devel
libmesa|libmesagl1
libGLU-devel|libmesaglu1-devel
libGLU|libmesaglu1
libstdc++-devel|libstdc++6-devel
# RedHat replacements rules
gpm-devel|
libungif-devel|
libcups|cups-libs
perl-devel|perl
# RedHat replacements rules
# http://web.mit.edu/afs/athena/system/rhlinux/redhat-9/RedHat/RPMS/
liblcms-devel|
jackit-devel|
libieee1284-devel|
perl-devel|perl
xterm|XFree86
xauth|XFree86
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
# some missed headers?
libGLU-devel|XFree86-devel
libmesa-devel|XFree86-devel
# Base replacements rules
# FIXME
makedepend|
foomatic-db-engine|
imake|
shadow-log|
w3c-markup-validator-libs|
xorg-cf-files|
netcat|nc
login|util-linux
su|coreutils
groff-base|groff
libarts-devel|arts-devel
# Uwaga! use first matching rule, write devel package first
pkg-config|pkgconfig
rpm-build-compat|rpm-build-altlinux-compat
libntfs-devel|ntfsprogs-devel
libntfs|ntfsprogs
libe2fs-devel|e2fsprogs-devel
libe2fs|e2fsprogs
libncurses-devel|ncurses-devel
libncurses|ncurses
libncursesw-devel|ncurses-devel
libncursesw|ncurses
libtinfo-devel|ncurses-devel
libtinfo|ncurses
packages-info-i18n-common|
# Check on Fedora
libpam-devel|pam-devel
libpam0-devel|pam-devel
libssl|openssl
libssl-devel|openssl-devel
libfreetype|freetype
freetype2-devel|freetype-devel
freetype2|freetype
libfreetype-devel|freetype-devel
libcups-devel|cups-devel
libcups|cups
libalsa-devel|alsa-lib-devel
# TODO: Check for ALL system
#libicu-devel|
# for ISDN
libcapi-devel|
prelink|
libldap-devel|openldap-devel
libldap|openldap
liblcms-devel|lcms-devel
liblcms|lcms
libgphoto2-devel|gphoto2-devel
libgphoto2|gphoto2
libsane-devel|sane-backends-devel
libsane|sane-backends
jackit-devel|jack-audio-connection-kit-devel
kernel-build-tools|
libreadline-devel|readline-devel
# Xorg dependencies
#xorg-x11-proto-devel|xorg-x11-devel
# FIXME: xpm-devel is override by libXpm-devel since xorg
#libXpm-devel|libXpm-devel
#libGLU-devel|libMesaGLU1-devel
#libGLU-devel|xorg-x11-devel
#libXext-devel|xorg-x11-devel
#libICE-devel|XFree86-devel
#libXrandr-devel|XFree86-devel
#libXrender-devel|XFree86-devel
#libXi-devel|XFree86-devel
#libSM-devel|XFree86-devel
libpopt-devel|popt
libpopt|popt
libgtkmm2-devel|gtkmm24-devel
libpng12|libpng
sysvinit-utils|SysVinit
liblcms-devel|
liblcms|
jackit-devel|
perl-devel|perl
# XOrg
xorg-x11-proto-devel|XFree86-devel
xorg-x11-devel|XFree86-devel
libICE-devel|XFree86-devel
libFS-devel|XFree86-devel
libSM-devel|XFree86-devel
libX11-devel|XFree86-devel
libXau-devel|XFree86-devel
libXaw-devel|XFree86-devel
libXrandr-devel|XFree86-devel
libXdmcp-devel|XFree86-devel
libXfixes-devel|XFree86-devel
libXfont-devel|XFree86-devel
libXft-devel|XFree86-devel
libXi-devel|XFree86-devel
libXext-devel|XFree86-devel
libXxf86misc-devel|XFree86-devel
libXmu-devel|XFree86-devel
libXp-devel|XFree86-devel
libXpm-devel|XFree86-devel
libXrender-devel|XFree86-devel
libXres-devel|XFree86-devel
libXScrnSaver-devel|XFree86-devel
libXinerama-devel|XFree86-devel
libXt-devel|XFree86-devel
libXtst-devel|XFree86-devel
libXxf86dga-devel|XFree86-devel
libXcomposite-devel|XFree86-devel
libXxf86vm-devel|XFree86-devel
libdmx-devel|XFree86-devel
libfontenc-devel|XFree86-devel
libmesa-devel|XFree86-devel
libXdamage-devel|XFree86-devel
libxkbfile-devel|XFree86-devel
libxkbui-devel|XFree86-devel
libXTrap-devel|XFree86-devel
libXvMC-devel|XFree86-devel
libXcursor-devel|XFree86-devel
libXevie-devel|XFree86-devel
libXv-devel|XFree86-devel
rpm-build|rpm
xauth|xorg-x11-libs
groff-base|groff
libarts-devel|arts-devel
login|pwdutils
passwd|pwdutils
su|su-wrapper
libfreetype-devel|freetype2-devel
libfreetype|freetype2
libusb-devel|libusb
gpm-devel|
libungif-devel|
libalsa-devel|alsa-devel
libldap-devel|openldap2-devel
libldap|openldap2-client
libieee1284-devel|libieee1284
libsane|sane
libsane-devel|sane
jackit-devel|jack-devel
jackit|jack
liblcms-devel|liblcms-devel
liblcms|liblcms
libgphoto2-devel|libgphoto2
libgphoto2|libgphoto2
perl-devel|perl
# XOrg
xorg-x11-proto-devel|xorg-x11-devel
xorg-x11-devel|xorg-x11-devel
libICE-devel|xorg-x11-devel
libFS-devel|xorg-x11-devel
libSM-devel|xorg-x11-devel
libX11-devel|xorg-x11-devel
libXau-devel|xorg-x11-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-devel
libXfixes-devel|xorg-x11-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libXmu-devel|xorg-x11-devel
libXp-devel|xorg-x11-devel
libXpm-devel|xorg-x11-devel
libXrender-devel|xorg-x11-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-devel
libXtst-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libdmx-devel|xorg-x11-devel
libfontenc-devel|xorg-x11-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-devel
libxkbui-devel|xorg-x11-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-devel
libmesa-devel|xorg-x11-Mesa-devel
libGLU-devel|xorg-x11-Mesa-devel
jackit|libjack
# XOrg
xorg-x11-proto-devel|xorg-x11-proto-devel
libICE-devel|xorg-x11-libICE-devel
libFS-devel|xorg-x11-libFS-devel
libSM-devel|xorg-x11-libSM-devel
libX11-devel|xorg-x11-libX11-devel
libXau-devel|xorg-x11-libXau-devel
libXaw-devel|xorg-x11-devel
libXrandr-devel|xorg-x11-devel
libXdmcp-devel|xorg-x11-libXdmcp-devel
libXfixes-devel|xorg-x11-libXfixes-devel
libXfont-devel|xorg-x11-devel
libXft-devel|xorg-x11-devel
libXi-devel|xorg-x11-devel
libXext-devel|xorg-x11-libXext-devel
libXext|xorg-x11-libXext
libXmu-devel|xorg-x11-libXmu-devel
libXp-devel|xorg-x11-libXp-devel
libXpm-devel|xorg-x11-libXpm-devel
libXrender-devel|xorg-x11-libXrender-devel
libXres-devel|xorg-x11-devel
libXScrnSaver-devel|xorg-x11-devel
libXinerama-devel|xorg-x11-devel
libXt-devel|xorg-x11-libXt-devel
libXtst-devel|xorg-x11-devel
libXcomposite-devel|xorg-x11-devel
libXxf86dga-devel|xorg-x11-devel
libXxf86vm-devel|xorg-x11-devel
libXxf86misc-devel|xorg-x11-devel
libdmx-devel|xorg-x11-libdmx-devel
libfontenc-devel|xorg-x11-libfontenc-devel
libXdamage-devel|xorg-x11-devel
libxkbfile-devel|xorg-x11-libxkbfile-devel
libxkbui-devel|xorg-x11-libxkbui-devel
libXTrap-devel|xorg-x11-devel
libXvMC-devel|xorg-x11-devel
libXcursor-devel|xorg-x11-devel
libXevie-devel|xorg-x11-devel
libXv-devel|xorg-x11-libXv-devel
libmesa-devel|Mesa
libGLU-devel|Mesa
libgtkmm2-devel|gtkmm2-devel
#!/bin/bash
# 2006-2007 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# 20.07.08
############# Project build & publish section ##############################
# Use only it this order:
# Update from CVS
update_from_cvs()
{
local REP ROT
if [ -d CVS ] ; then
REP=`cat CVS/Repository`
ROT=`cat CVS/Root`
echo "Update from CVS... $ROT/$REP"
cvs -z3 update -dPR || fatal $"Fail during update from CVS..."
else
fatal $"CVS dir not found"
fi
}
# Run inside project dir (named as name) (arg: local for noncvs build)
prepare_tarball()
{
local LOCALBUILD WDPROJECT TMPWDIR REP ROT
test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
build_rpms_name $SPECNAME
test -z "$BASENAME" && fatal "BASENAME is empty"
# If someone overrides version
test -n "$TARBALLVERSION" && VERSION=$TARBALLVERSION
# project name-version
NAMEVER=$BASENAME-$VERSION
WDPROJECT=$(pwd)
# If local build or configure no exists in orig work dir
if [ "$1" = "local" ] || [ ! -f configure ]; then
LOCALBUILD=1
fi
[ -f configure ] && ! [ -d CVS ] && fatal "Can't work with configure without CVS"
if [ -d CVS ] ; then
REP=`cat CVS/Repository`
ROT=`cat CVS/Root`
fi
[ -z "$CVSTAGFLAG" ] && CVSTAGFLAG=`cvs status VERSION | grep "Sticky Tag" | sed -e "s|(.*||g" | sed -e "s|^.*:[ ]*||g"`
[ -n "$CVSTAGFLAG" ] && CVSTAGFLAG="-r $CVSTAGFLAG"
#echo "Project work dir: $WDPROJECT"
pushd ..
# Set as name-version if not get from spec
[ -z "$TARBALLNAME" ] && TARBALLNAME=$NAMEVER.tar.bz2
# Prepare temp dir/files for build
TMPWDIR=$(TMPDIR= mktemp -d -p $(readlink -f $WDPROJECT/../))
test -z "$TMPWDIR" && fatal "TMPWDIR is empty"
cd $TMPWDIR || fatal "$TMPWDIR is not accessible"
# if configure present, do checkout
if [ -z "$LOCALBUILD" ] ; then
#test -d $TMPWDIR && fatal "$TMPWDIR is already exists"
#mkdir -p $TMPWDIR
echo "Checkout with cvs $CVSTAGFLAG $ROT/$REP into $TMPWDIR"
CVSROOT=$ROT cvs checkout $CVSTAGFLAG $REP || fatal "Error during checkout"
mv $REP $NAMEVER || fatal "Can't move to $NAMEVER"
cd $NAMEVER
if [ -e ./autogen.sh ] ; then
./autogen.sh
else
autoreconf -fisv
fi
# TODO remove CVS dirs
#find ./ -type d -name CVS -print 0 | xargs -0 rm
else
#test -L $NAMEVER && rm -f $NAMEVER
#ln -s $WDPROJECT $NAMEVER || fatal "Can't ln"
mkdir -p $NAMEVER && cd $NAMEVER || fatal "Can't cd"
cp -rl $WDPROJECT/* ./ || fatal "Can't create hard links"
test -e ./Makefile && make distclean
fi
# remove unneeded files
rm -rf autom4te.cache/
cd -
echo "Make tarball $TARBALLNAME ... from $(pwd)/$NAMEVER"
mkdir -p $RPMSOURCEDIR/
if [ -z "$SKIPTARBALLINTERNALDIR" ] ; then
$NICE tar cfj $RPMSOURCEDIR/$TARBALLNAME $NAMEVER/* $ETERTARPARAM || fatal "Can't create tarball"
else
echo "Skip internal dir in tarball"
cd $NAMEVER >/dev/null
$NICE tar cfj $RPMSOURCEDIR/$TARBALLNAME * $ETERTARPARAM || fatal "Can't create tarball"
cd - >/dev/null
fi
# Remove temp. dirs/files from tmpdir
test -d $NAMEVER && rm -rf $NAMEVER
rmdir $TMPWDIR
popd
}
# Publish tarball to Inet (need PUBLICSERVER/PUBLICPATH, TARNAME)
publish_tarball()
{
echo "Publish $TARNAME to $PUBLICSERVER:$PUBLICPATH "
if [ -n "$PUBLICSERVER" ] ; then
ssh $PUBLICSERVER mkdir -p $PUBLICPATH/
rsync --progress $RPMSOURCEDIR/$TARNAME $PUBLICSERVER:$PUBLICPATH/$TARNAME || fatal "Can't rsync"
ssh $PUBLICSERVER ln -sf $TARNAME $PUBLICPATH/$BASENAME-current.tar.bz2
fi
}
#!/bin/bash
# 2008 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# 20.07.08
# Get replacement rule for ALT package to local in $1 (scan for files in $@)
# set ALTPKGNAME, TARGETPKGNAME variable
tolocal_anyrepl()
{
local i REPLRULE WARULES
local GREP=$1
shift
# TODO: fix space removing
WARULES="s/^ *//g
s/ *\$//g
s/ *|/|/g
s/| */|/g"
for i in $@ ; do
REPLRULE=`grep -v "^#" "$i" 2>/dev/null | grep -- "^ *$GREP *|" | sed -e "$WARULES" | head -n1`
# For broken rule
echo $REPLRULE | grep "|" >/dev/null || REPLRULE=""
#REPLRULE=`echo $REPLRULE | sed -r -e 's,|,!,g'`
ALTPKGNAME=`echo $REPLRULE | cut -d"|" -f1`
TARGETPKGNAME=`echo $REPLRULE | cut -d"|" -f2`
# for compatibility
REPLRULE1=$ALTPKGNAME
REPLRULE2=$TARGETPKGNAME
test -n "$REPLRULE" && return 0
done
return 1
}
# Clean require names from various stuffs
clean_pkgreq()
{
local i VAR
VAR=`cat`
for i in $VAR ; do
echo "$i" | grep "[()<=>]" >/dev/null && continue
echo "$i" | grep "^ *[0-9]\.[0-9]" >/dev/null && continue
echo -n "$i "
done
}
# Print list of all build requires in ALT notation
print_buildreq()
{
eval_spec ${1} | grep "Build.*Req" | sed -e "s|^.*:||g" | clean_pkgreq
}
# Print list of all pkg requires
print_pkgreq()
{
eval_spec ${1} | grep "Requires" | sed -e "s|^.*:||g" | clean_pkgreq
}
print_pkgrepl_list()
{
local REPLBASE=$PKGREPLBASE/pkgrepl.
# VENDOR, TARGET is defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v`
# Get list of replacement rules files
echo -n "$REPLBASE$VENDOR.$DISTRVERSION $REPLBASE$VENDOR "
[ "$VENDOR" != "alt" ] && echo -n "$REPLBASE$TARGET"
}
print_grprepl_list()
{
local REPLBASE=$PKGREPLBASE/../grprepl/grprepl.
# VENDOR, TARGET is defined in detect_target_env() func
[ -z "$DISTRVERSION" ] && DISTRVERSION=`distr_vendor -v`
# Get list of replacement rules files
echo -n "$REPLBASE$VENDOR.$DISTRVERSION $REPLBASE$VENDOR "
[ "$VENDOR" != "alt" ] && echo -n "$REPLBASE$TARGET"
}
# Prints out buildreqs in target notation for SPEC
print_target_buildreq()
{
# Build list in target ($VENDOR) notation for package's buildreqs
for i in `print_buildreq ${1}` ; do
# get target name or just print out original one
tolocal_anyrepl $i `print_pkgrepl_list` || echo -n "$i "
echo -n "$TARGETPKGNAME "
done
}
#!/bin/sh
# : - .*
#
check()
{
local REPL
echo
echo "Source line: '$TEST1'"
#REPL=`echo $TEST1 | sed -r -e $NRL`
REPL=`echo $TEST1 | perl -pi "$NRL"`
[ "$REPL1" != "$REPL" ] && echo "FATAL with '$NRL' with result '$REPL'" || echo "OK with '$REPL'"
}
ALTPKGNAME="rpm-build"
TARGETPKGNAME="rpm"
NRL="-e s!(.*Req.*?)$ALTPKGNAME( |,|\$)!\1$TARGETPKGNAME\2!g;
-e s!(.*Req.*?)$ALTPKGNAME( |,|\$)!\1$TARGETPKGNAME\2!g;
"
##NRL="s!\(.*Req.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!
TEST1="BuildPreReq: rpm-build-altlinux-compat"
REPL1="BuildPreReq: rpm-build-altlinux-compat"
check
TEST1="BuildPreReq: rpm-build rpm-build-altlinux-compat"
REPL1="BuildPreReq: rpm rpm-build-altlinux-compat"
check
TEST1="BuildPreReq: rpm-build-altlinux-compat rpm rpm-build"
REPL1="BuildPreReq: rpm-build-altlinux-compat rpm rpm"
check
TEST1="BuildPreReq: rpm-build-altlinux-compat, rpm, rpm-build"
REPL1="BuildPreReq: rpm-build-altlinux-compat, rpm, rpm"
check
#!/bin/sh
# copy specs to separate tree, make rpmcs and printout diff
. /etc/rpm/etersoft-build-functions
cd $RPMDIR
TMPSPEC=`mktemp -d`
OTMPSPEC=`mktemp -d`
cp -r SPECS/* $TMPSPEC
cp -r SPECS/* $OTMPSPEC
find $TMPSPEC -type f -name "*.spec" | xargs -n 1 rpmcs 2>&1 | tee $0.r.out
find $TMPSPEC -type f -name "*~" | xargs rm -f
find $OTMPSPEC -type f -name "*~" | xargs rm -f
diff -urN $OTMPSPEC $TMPSPEC >$0.out
rm -rf $TMPSPEC $OTMPSPEC
#!/bin/sh -x
# Vitaly Lipatov (c) 2005
# TODO: DONER is not set :(
# in - request letter
# out - no
# 24.09.05 fixed file attaching
export EMAIL="Vitaly Lipatov <lav@etersoft.ru>"
export LANG=ru_RU.KOI8-R
export RPMDIR=$HOME/RPM
DONER=""
function prepare_mail()
{
formail -r -k -t -A"X-Loop: lav@etersoft.ru"
if [ -z "$PACKAGE" ] ; then
cat <<EOF
Please fill request letter with one line:
spec package_name
or
spec full_name_of_package_file.src.rpm
or
nosrc name/fullname for nosrc.rpm retrieve
--
Your spec bash robot from Sisyphus repository
EOF
else
cat <<EOF
Request accepted for package(s) '$PACKAGE'
and will send to '${ASKER}' in next mail.
EOF
cd "$upload" || exit 1
for i in $PACKAGE ; do
echo "Package: $i"
rpmgp -n $i
cat ${i}* | rpm2cpio | cpio -i "*.spec"
if [ -n "${PACKAGESRC}" ] ; then
rpm -i ${i/\.rpm/}*.rpm
for n in $RPMDIR/SPECS/*.spec ; do
rpmbuild -bs --nosource '0' --nodeps $n
done
fi
done
cd -
fi
export DONER
}
upload=`mktemp -d $HOME/tmp/getspec.XXX`
cat > $HOME/getspec.ask
PACKAGE=`cat $HOME/getspec.ask | grep "^spec " | sed -e "s|^spec ||g"`
PACKAGESRC=`cat $HOME/getspec.ask | grep "^nosrc " | sed -e "s|^nosrc ||g"`
test -n "$PACKAGESRC" && PACKAGE=$PACKAGESRC
ASKER=`cat $HOME/getspec.ask | grep "^From: " | sed -e "s|^From: ||g"`
cat $HOME/getspec.ask | prepare_mail | mutt -H -
# -s "Answer to spec request from Sisyphus"
#echo $DONER $ASKER $PACKAGE
if [ -n "$PACKAGE" ] ; then
LF=""
for i in $upload/*.spec ; do
test -f "$i" && LF="$LF -a $i"
done
test -z "$PACKAGESRC" && test -n "$LF" && mutt "$ASKER" -s "Requested spec for $PACKAGE" $LF
fi
if [ -n "$PACKAGESRC" ] ; then
LF=""
# TODO: races
for i in $RPMDIR/SRPMS/*.nosrc.rpm ; do
test -f "$i" && LF="$LF -a $i"
done
test -n "$LF" && mutt "$ASKER" -s "Requested nosrc.rpm for $PACKAGE" $LF
fi
echo "`date` asked $PACKAGE from $ASKER, sent '$LF'" >>getspec.log
#rm -rf "$upload"
rm -rf "$RPMDIR/SRPMS/"
rm -rf "$RPMDIR/SOURCES/"
rm -rf "$RPMDIR/SPECS/"
#!/bin/sh
. ./etersoft-build-functions
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
PROJECTNAME=$(basename `pwd`)
ssh git.alt git-init-db $PROJECTNAME.git
#!/bin/sh
. /etc/rpm/etersoft-build-functions
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
PROJECTNAME=$(basename `pwd`)
git push --all git.alt:packages/$PROJECTNAME.git
git push --tags git.alt:packages/$PROJECTNAME.git
#> $ git commit -a; A='0.23-alt1'; git tag -s $A; \
#> git tag -s -f -m 'Sisyphus release $A' sisyphus $A
\ No newline at end of file
#!/bin/sh
. /etc/rpm/etersoft-build-functions
FILES=
for i in $@ ; do
# FILES="$FILES $i/$i.spec"
#done
#rpmbsh -u $FILES
cd $i || exit 1
rpmbs -u $i.spec || exit 1
cd -
done
#!/bin/sh
. /etc/rpm/etersoft-build-functions
FILES=
for i in $@ ; do
# FILES="$FILES $i/$i.spec"
#done
#rpmbsh -u $FILES
cd $i || exit 1
rpmbsh $i.spec || exit 1
cd -
done
#!/bin/sh
# Lists incoming dir
# Use -M23 and so on
. /etc/rpm/etersoft-build-functions
parse_cmd_pre -- "$@"
echog "Checking for private key..."
ssh-add -l || ssh-add
set_incoming $MENV
rsync -n -e ssh $RSYNCINCOMING/$INCOMING/
echog "Ls from $RSYNCINCOMING/$INCOMING"
#!/bin/sh
# 2003-2005 (c) Etersoft www.etersoft.ru
# Public domain
# Upload files from upload dir to alt
# 25.01.2005 upload.old.xxx
# 04.11.2005 use arg for set destination (-M23 and so on)
. /etc/rpm/etersoft-build-functions
build_list_and_args -- "$@"
test -n "$MENV" && UPLOADDIR=${UPLOADDIR}.$MENV
set_incoming $MENV
echog "Changing permissions..."
chmod 644 -- $UPLOADDIR/*.rpm || exit 1
echog "Upload to incoming/$INCOMING from $UPLOADDIR"
echog "Checking for sisyphus compliance..."
CHECKSUM="--checksum"
sisyphus_check $UPLOADDIR || exit 1
echo "Checking for private key..."
ssh-add -l || ssh-add
rsync -va --partial --progress $CHECKSUM \
-e ssh $UPLOADDIR/* $RSYNCINCOMING/$INCOMING/
RES=$?
NSD="old"
uploadOLD=$(basename `mktemp -d $UPLOADDIR.${NSD}.XXX`)
rmdir $uploadOLD
test $RES && mv $UPLOADDIR $uploadOLD
mkdir $UPLOADDIR
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment