Commit ff8f8301 authored by Yuri Fil's avatar Yuri Fil

Merge branch 'master' of git.eter:/people/lav/packages/etersoft-build-utils

parents 6996f554 e2f0991f
etersoft-build-utils-1.7.0: 03 Jan 2010
- check_publish.sh: add check for exist git repo, list acl for package if it in git
- config: add GEAR_USER
- rpmgp: add git checking
- print_*req: use only start line field
- clean_pkgreq: skip gcc/cpp general packages
- rpmgs: add rar archive support
- rpmbsh: disable cd to SRPMS dir (will need fix?)
- spec: fix url (altbug #22476)
etersoft-build-utils-1.6.9: 21 Nov 2009
- fix GIRARHOST for subcommand
- drop rpm-build-compat require
......
lib, %files:
%post -p %post_ldconfig
%postun -p %postun_ldconfig
- 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
......
......@@ -70,6 +70,7 @@ fi
parse_cmd_pre "$@"
mygetopts $LISTARGS
# TODO: skip for prev. packed src.rpm
# If fail, we already has correct changelog
add_changelog_helper "- new version" $LISTNAMES
......@@ -78,6 +79,7 @@ add_changelog_helper "- new version" $LISTNAMES
# FIXME:
pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g")
# TODO: skip for prev. packed src.rpm
set_specdir $LISTNAMES
if [ -n "$REMOTEBUILD" ] ; then
......@@ -88,8 +90,9 @@ if [ -n "$REMOTEBUILD" ] ; then
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 $RPMTOPDIR/SRPMS && rsync -vay --partial --progress --checksum \
# FIXME: do not change dir? Why LISTBUILT is not full path?
#cd $RPMTOPDIR/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=$?
......@@ -99,13 +102,12 @@ if [ -n "$REMOTEBUILD" ] ; then
else
cd $RPMTOPDIR/SRPMS && time $ETERBUILDBIN/myhsh $MENVARG $LISTRPMARGS $LISTBUILT
RESULT=$?
cd -
date
echo "-------------------------------"
fi
cd -
# make src.rpm if build OK and we have options for rpmbs
if [ "$RESULT" = "0" ] && [ -n "$LISTRPMARGS" ]; then
......
......@@ -288,14 +288,18 @@ do
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/doc/|%_docdir/|g" $i
subst "s|%_datadir/omf|%_omfdir|g" $i
subst "s|%_defaultdocdir|%_docdir|g" $i
subst "s|%__autoreconf|%autoreconf|g" $i
# TODO for cleanup_spec:
subst "s|%_datadir/doc$|%_docdir|g
s|%_datadir/doc/|%_docdir/|g
s|%_datadir/omf|%_omfdir|g
s|%_defaultdocdir|%_docdir|g
s|%_var/log|%_logdir|g
s|%_var/lib|%_localstatedir|g
s|%__autoreconf|%autoreconf|g" $i
subst "s|%rpmcflags|%optflags|g" $i
# drop useless construction
subst "s|^%clean$||g" $i
subst "s|^%debug_package$||g" $i
subst "s|^rm -rf %buildroot$||g" $i
......
......@@ -11,7 +11,7 @@
# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common
load_mod rpm repl
load_mod rpm repl git
# path to ALT Linux's repositories
REPOSITORY="files/SRPMS obsolete orphaned"
......@@ -237,20 +237,42 @@ fi
# Check online
if [ -n "$CHECKONLINE" ] ; then
# possible it is spec
if [ -f $1 ] ; then
build_rpms_name "$1"
SRCRPM=$NAMESRPMIN
PKGNAME=$(get_pkgname_from_filename $SRCRPM)
else
if echo $1 | grep -q rpm ; then
SRCRPM=$1
PKGNAME=$(get_pkgname_from_filename $SRCRPM)
else
echo $1 | grep rpm 2>/dev/null && SRCRPM=$1 ||
SRCRPM=`rpm -q $1 --queryformat "%{SOURCERPM}\n" | tail -n 1`
PKGNAME=$1
SRCRPM=`rpm -q $PKGNAME --queryformat "%{SOURCERPM}\n" | tail -n 1`
fi
fi
if [ -n "$GIRAR_USER" ] ; then
GITURL="http://git.altlinux.org/people/$GIRAR_USER/packages/$PKGNAME.git"
if GET -d $GITURL ; then
echog "Published at $GITURL by $GIRAR_USER"
else
echog "There is no git repo $GITURL"
fi
fi
list_git_package $PKGNAME
RET="MISSED"
if [ -n "$SRCRPM" ] ; then
for i in $REPOSITORY ; do
echog "Checking in repository $i ..."
echog "Checking '$SRCRPM' 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
fi
if [ "$RET" = "MISSED" ] ; then
exit 1
fi
......
......@@ -151,6 +151,17 @@ function get_zip()
}
# TODO: use external converter
function get_rar()
{
get_archive rar || return $?
mkdir $WEXT.rar.dir || return $?
cd $WEXT.rar.dir
unrar x ../$WEXT.rar && tar cf ../$WEXT.tar . || return
cd ..
rm -rf $WEXT.rar.dir
}
# TODO: use external converter
function get_7z()
{
BIN7ZIP=/usr/bin/7z
......@@ -257,7 +268,7 @@ do
echo "Get tarball for gear"
FORGEAR=1
fi
get_tarbz2 || get_targz || get_tgz || get_7z || get_zip || get_tbz2 || get_tbz || get_tar || dir_name || fatal "Error: Cannot retrieve $GETSOURCE"
get_tarbz2 || get_targz || get_tgz || get_7z || get_zip || get_tbz2 || get_tbz || get_tar || get_rar || dir_name || fatal "Error: Cannot retrieve $GETSOURCE"
fi
if [ -z "$FORGEAR" ] ; then
......
......@@ -70,3 +70,6 @@
# set dir for ccache cache
# export CCACHE_DIR=$OURTMPDIR/ccache
# username on $GIRARHOST host
# GIRAR_USER=lav
......@@ -22,3 +22,6 @@ pld ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS
fedoraf http://download1.rpmfusion.org/free/fedora/releases/10/Everything/source/SRPMS/
rpmfusion http://download1.rpmfusion.org/free/fedora/development/source/SRPMS/
asp http://mirror.yandex.ru/asplinux/sources/SRPMS.14/
elrepo http://elrepo.org/linux/elrepo/el5/SRPMS/
elrepo-testing http://elrepo.org/linux/testing/el5/SRPMS/
elrepo-fasttrack http://elrepo.org/linux/fasttrack/el5/SRPMS/
Name: etersoft-build-utils
Version: 1.6.9
Version: 1.7.0
Release: alt1
Summary: A set of build rpm utilities
......@@ -64,6 +64,14 @@ RECOMMENDED packages: gcc-c++ perl-libwww ccache elinks mutt hasher curl
%config(noreplace) %_sysconfdir/eterbuild/repos
%changelog
* Sun Jan 03 2010 Vitaly Lipatov <lav@altlinux.ru> 1.7.0-alt1
- check_publish.sh: add check for exist git repo, list acl for package if it in git
- config: add GEAR_USER
- rpmgp: add git checking
- clean_pkgreq: skip gcc/cpp general packages
- rpmgs: add rar archive support
- spec: fix url (fix alt bug #22476)
* Fri Nov 27 2009 Vitaly Lipatov <lav@altlinux.ru> 1.6.9-alt1
- fix GIRARHOST for subcommand
- drop rpm-build-compat requires
......
......@@ -25,3 +25,19 @@ is_girar_name()
{
echo "$1" | grep -q "^git\."
}
_list_git_package()
{
while [ -n "$1" ] ; do
printf "%50s " $GIRARHOST:$1
shift
date -d@$1
shift
done
}
# TODO: make world better, please
list_git_package()
{
_list_git_package $(ssh $GIRARHOST find-package $1)
}
......@@ -43,6 +43,7 @@ clean_pkgreq()
local i VAR
VAR=`cat`
for i in $VAR ; do
echo "$i" | egrep "gcc|cpp|gcc-c++" >/dev/null && continue
echo "$i" | grep "[()<=>]" >/dev/null && continue
echo "$i" | grep "^ *[0-9]\.[0-9]" >/dev/null && continue
echo -n "$i "
......@@ -52,13 +53,13 @@ clean_pkgreq()
# Print list of all build requires in ALT notation
print_buildreq()
{
eval_spec ${1} | grep "Build.*Req" | sed -e "s|^.*:||g" | clean_pkgreq
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
eval_spec ${1} | grep "^Requires" | sed -e "s|^.*:||g" | clean_pkgreq
}
# internal
......
......@@ -63,6 +63,12 @@ build_rpms_name()
build_buildroot
}
# pkg-source-1.0.src.rpm -> pkg-source
get_pkgname_from_filename()
{
echo ${1/-[0-9]*/}
}
# build binary package list (1st - repo dir, 2st - pkgname)
# algorithm: list all files in PKGDIR, print packages with our source pkg name
......
Development/Tools|Development/Other
......@@ -78,7 +78,9 @@ xorg-xextproto-devel|x11-proto-devel
xorg-sdk|x11-server-devel
libICE-devel|libice6-devel
libarts-devel|libkdemultimedia1-arts-devel
libarts-devel|libarts1-devel
libopensc-devel|libopensc-devel
wxGTK-devel|libwxgtk2.8-devel
netcat|netcat
libgtkmm2-devel|libgtkmm2.4-devel
libopenal-devel|libopenal-devel
\ No newline at end of file
......@@ -2,3 +2,4 @@
libXext-devel|lib64xext6-devel
libreadline-devel|lib64readline-devel
libreadline|lib64readline6
libgtkmm2-devel|lib64gtkmm2.4-devel
# Mandriva 64bit base replacements rules
libXext-devel|lib64xext6-devel
libreadline-devel|lib64readline5-devel
libreadline-devel|lib64readline-devel
libreadline|lib64readline5
libgtkmm2-devel|lib64gtkmm2.4-devel
libfreetype-devel|lib64freetype6-devel
libsane-devel|lib64sane1-devel
libieee1284-devel|lib64ieee1284-devel
libldap-devel|lib64ldap2.4_2-devel
libncurses-devel|lib64ncurses-devel
libncursesw-devel|lib64ncursesw-devel
libssl-devel|lib64openssl0.9.8-devel
libxslt-devel|lib64xslt-devel
xorg-x11-proto-devel|lib64xorg-x11-devel
libcups-devel|lib64cups2-devel
jackit-devel|lib64jack-devel
libGLU-devel|lib64mesaglu1-devel
libhal-devel|lib64hal-devel
libXScrnSaver-devel|lib64xscrnsaver1-devel
libfontenc-devel|lib64fontenc1-devel
libXv-devel|lib64xv1-devel
\ No newline at end of file
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
load_mod spec rpm
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$2' do not match with '$3'" || echo "OK for '$1' with '$2'"
}
check_pkg()
{
check "$1" $(get_pkgname_from_filename "$1") "$2"
}
check_pkg pkg-1.0.spec pkg
check_pkg pkg-source-1.0.spec pkg-source
check_pkg pkg-source-less-1.0.spec pkg-source-less
check_pkg pkg123-1.0.spec pkg123
. `dirname $0`/../share/eterbuild/functions/common
load_mod git
list_git_package libmathgl
......@@ -3,6 +3,7 @@
# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common
load_mod git
get_wd()
{
......@@ -28,6 +29,20 @@ print_usedby()
done
}
if_file_empty()
{
NL=$(grep -v "^\$" "$1" | wc -l)
test "$NL" -eq "0"
}
remove_if_empty()
{
if if_file_empty "$1" ; then
rm -f "$1"
fi
}
[ -n "$SPECLIST" ] || SPECLIST=`find $RPMDIR/SPECS -type f -name "*.spec"`
......@@ -53,14 +68,27 @@ for i in $SPECLIST ; do
rpmbugs -t $i | grep -v "CLO.*FIX" | grep "@altlinux" >$i.bugs
test -s $i.bugs || rm -f $i.bugs
if rpmgp -c $i | grep -q MISSED ; then
rpmgp -c $i >$i.missed
else
rm -f $i.$missed
# if missed on ftp
rpmgp -c $i | grep -q MISSED >$i.missed
remove_if_empty $i.missed
list_git_package $PKGNAME > $i.GIT.PUBLISHED
# if present in git
if [ -n "$GIRAR_USER" ] ; then
GITURL="http://git.altlinux.org/people/$GIRAR_USER/packages/$PKGNAME.git"
if GET -d $GITURL ; then
echo
echog "Published at $GITURL by $GIRAR_USER" >> $i.GIT.PUBLISHED
echog "Please check this spec and move work to git" >> $i.GIT.PUBLISHED
fi
fi
remove_if_empty $i.GIT.PUBLISHED
if [ -r "$i.GIT.PUBLISHED" ] ; then
ssh $GIRARHOST acl sisyphus $PKGNAME show 2>> $i.GIT.PUBLISHED
fi
# TODO:
#ssh git.alt acl sisyphus $PKGNAME show > $i.acl
#grep " $USER\$" $i.acl
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