Commit 94a8c51c authored by Vitaly Lipatov's avatar Vitaly Lipatov

Merge branch 'master' of git.alt:packages/etersoft-build-utils

Conflicts: bin/rpmbs
parents 65035d05 8fa3cd7f
- upload.SS rpmbs -u
http://git.altlinux.org/people/kharpost/packages/gitalt-tasker.git?p=gitalt-tasker.git;a=blob;f=gitalt-tasker/git-task;h=81e0261813a9fe2be230fb0c47b4ff4efd9a2675;hb=bfcc80b9af49b8ea0629db80d4c2f29a024d574e
korinf korinf
: :
# etersoft-build-utils repack DIR - DIR NAME-VERSION # etersoft-build-utils repack DIR - DIR NAME-VERSION
# etersoft-build-utils remove DIR/FILE [DIR/FILE] - # etersoft-build-utils remove DIR/FILE [DIR/FILE] -
: :
ssh git.alt task new ssh git.alt task new
ssh git.alt task add del PACKAGE ssh git.alt task add del PACKAGE
ssh git.alt task run ssh git.alt task run
...@@ -19,8 +23,6 @@ task #9430: queued, result will be emailed to lav@altlinux.org ...@@ -19,8 +23,6 @@ task #9430: queued, result will be emailed to lav@altlinux.org
: :
fonts-ttf-%fname-1.04-alt1.src.rpm fonts-ttf-%fname-1.04-alt1.src.rpm
rpmbph: --define _specdir --define _sourcedir
apt-cache list-extras apt-cache list-extras
BuildArch: noarch BuildArch: noarch
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod git
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec #test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
...@@ -12,9 +13,12 @@ if [ "$1" = "-h" ] ; then ...@@ -12,9 +13,12 @@ if [ "$1" = "-h" ] ; then
exit 1 exit 1
fi fi
[ -n "$1" ] && GIRARHOST=$1 if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
PROJECTNAME=$(basename `pwd`) PROJECTNAME=$(basename `pwd`)
echo "Create remote $PROJECTNAME repo" echo "Create remote $PROJECTNAME repo in $GIRARHOST:"
ssh $GIRARHOST git-init-db $PROJECTNAME.git ssh $GIRARHOST git-init-db $PROJECTNAME.git
git remote add origin $GIRARHOST:packages/$PROJECTNAME.git git remote add origin $GIRARHOST:packages/$PROJECTNAME.git
...@@ -2,11 +2,18 @@ ...@@ -2,11 +2,18 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod git
if [ "$1" = "-h" ] ; then if [ "$1" = "-h" ] ; then
echo "gpull [args] - do git pull --rebase" echo "gpull [args] - do git pull --rebase"
echo "Use: ginit without parameters" echo "Use: gpull without parameters"
exit 1 exit 1
fi fi
if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
echo "Pull repo from $GIRARHOST"
git pull --rebase $@ git pull --rebase $@
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod git
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec #test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
if [ "$1" = "-h" ] ; then if [ "$1" = "-h" ] ; then
echo "gpush - publish current project repo to $GIRARHOST" echo "gpush - publish current project repo remote git repo"
echo "Use: gpush [-f|--force] [-a|--all] [project name] [target branch]" echo "Use: gpush [-f|--force] [-a|--all] [project name] [target branch]"
exit 1 exit 1
fi fi
...@@ -23,6 +24,11 @@ if [ "$1" = "-a" ] || [ "$1" = "--all" ] ; then ...@@ -23,6 +24,11 @@ if [ "$1" = "-a" ] || [ "$1" = "--all" ] ; then
shift shift
fi fi
if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
# use as project name # use as project name
if [ -n "$1" ] ; then if [ -n "$1" ] ; then
PROJECTNAME=$1 PROJECTNAME=$1
...@@ -49,6 +55,7 @@ else ...@@ -49,6 +55,7 @@ else
#[ -n "$PUSHALL" ] || TARGETBRANCH=master #[ -n "$PUSHALL" ] || TARGETBRANCH=master
fi fi
echo "Push $PROJECTNAME.git to $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH"
git push $PUSHALL $PUSHFORCE $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH git push $PUSHALL $PUSHFORCE $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH
git push --tags $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH git push --tags $GIRARHOST:packages/$PROJECTNAME.git $TARGETBRANCH
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm tarball alt load_mod rpm tarball alt git
SIGN= SIGN=
UPLOADNOW= UPLOADNOW=
...@@ -135,6 +135,11 @@ rpmbs_copying_built() ...@@ -135,6 +135,11 @@ rpmbs_copying_built()
fi fi
} }
if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
parse_cmd_pre "$@" parse_cmd_pre "$@"
# quotes brokes option handling # quotes brokes option handling
mygetopts $LISTARGS mygetopts $LISTARGS
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod rpm load_mod rpm git
RESULT=0 RESULT=0
REMCOM= REMCOM=
...@@ -62,6 +62,11 @@ LISTRPMARGS=$@ ...@@ -62,6 +62,11 @@ LISTRPMARGS=$@
} }
############################# #############################
if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
parse_cmd_pre "$@" parse_cmd_pre "$@"
mygetopts $LISTARGS mygetopts $LISTARGS
......
...@@ -148,42 +148,42 @@ do ...@@ -148,42 +148,42 @@ do
s|%__mv |mv |g s|%__mv |mv |g
s|%__mkdir_p|mkdir -p|g s|%__mkdir_p|mkdir -p|g
s|%__mkdir |mkdir |g s|%__mkdir |mkdir |g
s|%__make|make|g s|%__make |make |g
s|%__awk|gawk|g s|%__awk |gawk |g
s|%__bzip2|bzip2|g s|%__bzip2 |bzip2 |g
s|%__cat|cat|g s|%__cat |cat |g
s|%__chgrp|chgrp|g s|%__chgrp |chgrp |g
s|%__chmod|chmod|g s|%__chmod |chmod |g
s|%__chown|chown|g s|%__chown |chown |g
s|%__cpio|cpio|g s|%__cpio |cpio |g
s|%__file|file|g s|%__file |file |g
s|%__gpg|gpg|g s|%__gpg |gpg |g
s|%__grep|grep|g s|%__grep |grep |g
s|%__gzip|gzip|g s|%__gzip |gzip |g
s|%__id|id|g s|%__id |id |g
s|%__install |install |g s|%__install |install |g
s|%__install_info|install-info|g s|%__install_info |install-info |g
s|%__ln_s|ln -s|g s|%__ln_s |ln -s |g
s|%__patch|patch|g s|%__patch |patch |g
s|%__perl |perl |g s|%__perl |perl |g
s|%__pgp|pgp|g s|%__pgp |pgp |g
s|%__python |python |g s|%__python |python |g
s|%__rm|rm|g s|%__rm |rm |g
s|%__rsh|rsh|g s|%__rsh |rsh |g
s|%__sed|sed|g s|%__sed |sed |g
s|%__ssh|ssh|g s|%__ssh |ssh |g
s|%__tar|tar|g s|%__tar |tar |g
s|%__unzip|unzip|g s|%__unzip |unzip |g
s|%__ar|ar|g s|%__ar |ar |g
s|%__as|as|g s|%__as |as |g
s|%__cc|gcc|g s|%__cc |gcc |g
s|%__cpp|gcc -E|g s|%__cpp |gcc -E |g
s|%__cxx|g++|g s|%__cxx |g++ |g
s|%__ld|ld|g s|%__ld |ld |g
s|%__nm|nm|g s|%__nm |nm |g
s|%__objcopy|objcopy|g s|%__objcopy |objcopy |g
s|%__objdump|objdump|g s|%__objdump |objdump |g
s|%__ranlib|ranlib|g s|%__ranlib |ranlib |g
s|%__tar |tar |g" $i s|%__tar |tar |g" $i
# CHECK ME: # CHECK ME:
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod spec load_mod spec git
REMOTE= REMOTE=
if [ "$1" = "-r" ] ; then if [ "$1" = "-r" ] ; then
...@@ -18,6 +18,11 @@ if [ "$1" = "-r" ] ; then ...@@ -18,6 +18,11 @@ if [ "$1" = "-r" ] ; then
shift shift
fi fi
if is_girar_name $1 ; then
GIRARHOST=$1
shift
fi
SPEC=$1 SPEC=$1
VER=$2 VER=$2
# need for rpmgs # need for rpmgs
......
...@@ -102,14 +102,14 @@ get_pagepkginfo() ...@@ -102,14 +102,14 @@ get_pagepkginfo()
then then
# it is rpm package # it is rpm package
PKGVERSION=`rpm -qp --queryformat "%{VERSION}" ${i}` PKGVERSION=`rpm -qp --queryformat "%{VERSION}" ${i}`
PKGNAME=`rpm -qp --queryformat "%{sourcerpm}" ${i} | sed -e "s|-$VERSION.*||g"` PKGNAME=`rpm -qp --queryformat "%{sourcerpm}" ${i} | sed -e "s|-$PKGVERSION.*||g"`
else else
PKGNAME=$(eval_spec ${i} | get_var "Name") PKGNAME=$(eval_spec ${i} | get_var "Name")
fi fi
else else
# installed package name # installed package name
PKGVERSION=`rpm -q --queryformat "%{VERSION}" ${i}` PKGVERSION=`rpm -q --queryformat "%{VERSION}" ${i}`
PKGNAME=`rpm -q --queryformat "%{sourcerpm}" ${i} | sed -e "s|-$VERSION.*||g"` PKGNAME=`rpm -q --queryformat "%{sourcerpm}" ${i} | sed -e "s|-$PKGVERSION.*||g"`
fi fi
if [ -z "$PKGNAME" ] ; then if [ -z "$PKGNAME" ] ; then
PKGNAME="$i" PKGNAME="$i"
......
# see whohas package too # see whohas package too
# all known src.rpm repositories (for rpmgp command) # all known src.rpm repositories (for rpmgp command)
alt ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS alt ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS
fedora ftp://mirror.yandex.ru/fedora/linux/releases/11/Fedora/source/SRPMS/ fedora ftp://mirror.yandex.ru/fedora/linux/releases/12/Fedora/source/SRPMS/
fedora-devel ftp://mirror.yandex.ru/fedora/linux/development/source/SRPMS fedora-devel ftp://mirror.yandex.ru/fedora/linux/development/source/SRPMS
fedora-updates ftp://mirror.yandex.ru/fedora/linux/updates/11/SRPMS/ fedora-updates ftp://mirror.yandex.ru/fedora/linux/updates/12/SRPMS/
fedora-ccrma http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/9/SRPMS fedora-ccrma http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/9/SRPMS
fedora-epel http://download.fedora.redhat.com/pub/epel/5/SRPMS fedora-epel http://download.fedora.redhat.com/pub/epel/5/SRPMS
mandriva ftp://mirror.yandex.ru/mandriva/official/2009.0/SRPMS/main/release edumandriva ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.1/SRCRPM/free/
mandriva-contrib ftp://mirror.yandex.ru/mandriva/official/2009.0/SRPMS/contrib/release mandriva ftp://mirror.yandex.ru/mandriva/official/2010.0/SRPMS/main/release
mandriva-contrib ftp://mirror.yandex.ru/mandriva/official/2010.0/SRPMS/contrib/release
mandriva-cooker-contrib ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/contrib/release mandriva-cooker-contrib ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/contrib/release
mandriva-cooker-main ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/main/release mandriva-cooker-main ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/main/release
mandriva-cooker-non-free ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/non-free/release mandriva-cooker-non-free ftp://mirror.yandex.ru/mandriva/devel/cooker/SRPMS/non-free/release
suse ftp://mirror.yandex.ru/opensuse/distribution/11.0/repo/src-oss/suse/src suse ftp://mirror.yandex.ru/opensuse/distribution/11.2/repo/src-oss/suse/src
suse-edu1 http://opensuse.unixheads.net/repositories/Education:/desktop/openSUSE_10.3/src suse-edu1 http://opensuse.unixheads.net/repositories/Education:/desktop/openSUSE_10.3/src
suse-edu2 http://www.opensuse-education.org/download/repos/1.0/11.0/suse/src suse-edu2 http://www.opensuse-education.org/download/repos/1.0/11.1/suse/src
alt-obsolete ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/obsolete alt-obsolete ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/obsolete
alt-orphaned ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/orphaned alt-orphaned ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/orphaned
pld ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS pld ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS
......
...@@ -20,3 +20,8 @@ get_current_branch() ...@@ -20,3 +20,8 @@ get_current_branch()
git branch | grep '^\*' | sed 's/^..//' | tr -d "\n" git branch | grep '^\*' | sed 's/^..//' | tr -d "\n"
} }
# Check if $1 like git.alt or git.eter, git.something
is_girar_name()
{
echo "$1" | grep -q "^git\."
}
...@@ -13,13 +13,15 @@ get_var() ...@@ -13,13 +13,15 @@ get_var()
# #
eval_spec() eval_spec()
{ {
# Hack: just print spec if -bE failed
# TODO: use rpm -showrc instead -bE for get main variables? # TODO: use rpm -showrc instead -bE for get main variables?
#if is_alt ; then
# $RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ || fatal "Check spec's fields" # Hack: just print spec if -bE failed
#else if is_alt ; then
# on ALT we have to done without errors
$RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ || fatal "Check spec's fields"
else
$RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ 2>/dev/null || cat $1 $RPMBUILD -bE --target $DEFAULTARCH $RPMBUILDARG $@ 2>/dev/null || cat $1
#fi fi
} }
get_release() get_release()
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
get_wd() get_wd()
{ {
apt-cache whatdepends $1 | grep "^ [a-zA-Z]" | sed -e "s|^ *||g" apt-cache whatdepends $1 | grep "^ [a-zA-Z]" | sed -e "s|^ *||g" | grep -v $1
} }
list_wd() list_wd()
{ {
...@@ -38,7 +38,8 @@ for i in $SPECLIST ; do ...@@ -38,7 +38,8 @@ for i in $SPECLIST ; do
echo $i echo $i
#LANG=C rpmgp -c $i 2>&1 | grep -v "^Note" | grep -v "^Checking" | grep -v "^Repository" #LANG=C rpmgp -c $i 2>&1 | grep -v "^Note" | grep -v "^Checking" | grep -v "^Repository"
USEDBY=$(get_wd `basename $i .spec`) PKGNAME=`basename $i .spec`
USEDBY=$(get_wd $PKGNAME)
if [ -n "$USEDBY" ] ; then if [ -n "$USEDBY" ] ; then
print_usedby $i $USEDBY >$i.usedby print_usedby $i $USEDBY >$i.usedby
#[ -n "`cat $i.usedby`" ] || #[ -n "`cat $i.usedby`" ] ||
...@@ -57,5 +58,9 @@ for i in $SPECLIST ; do ...@@ -57,5 +58,9 @@ for i in $SPECLIST ; do
else else
rm -f $i.$missed rm -f $i.$missed
fi fi
# TODO:
#ssh git.alt acl sisyphus $PKGNAME show > $i.acl
#grep " $USER\$" $i.acl
done done
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