Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
d863e9a7
Commit
d863e9a7
authored
17 years ago
by
Marcel Loose
Browse files
Options
Downloads
Patches
Plain Diff
Bug 1104: Merged changes on autoconf_share-Bug1104-task-branch with the trunk.
Rub now supports Subversion by default.
parent
72a94e6c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
autoconf_share/dorubbuild
+26
-4
26 additions, 4 deletions
autoconf_share/dorubbuild
autoconf_share/rub
+134
-70
134 additions, 70 deletions
autoconf_share/rub
autoconf_share/rub1
+115
-32
115 additions, 32 deletions
autoconf_share/rub1
autoconf_share/rubbuild
+1
-1
1 addition, 1 deletion
autoconf_share/rubbuild
with
276 additions
and
107 deletions
autoconf_share/dorubbuild
+
26
−
4
View file @
d863e9a7
...
...
@@ -155,14 +155,36 @@ do
fi
echo
" *** Building package
$pkg
***"
|
tee
-a
$logfile
# Create the build directory as needed.
pkgb
=
`
basename
$pkg
`
if
[
"
$builddir
"
=
"."
]
;
then
initcmd
=
"cd
$pkg
&& mkdir -p build/
$variant
&& cd build/
$variant
"
(
cd
$pkg
&&
mkdir
-p
build/
$variant
)
>>
$logfile
2>&1
if
[
$?
!=
0
]
;
then
exit
1
fi
blddir
=
$srcdir
/
$pkg
/build/
$variant
else
initcmd
=
"cd
$builddir
/build/
$variant
&& mkdir -p
$pkg
&& cd
$pkg
"
(
cd
$builddir
/build/
$variant
&&
mkdir
-p
$pkg
)
>>
$logfile
2>&1
if
[
$?
!=
0
]
;
then
exit
1
fi
blddir
=
$builddir
/build/
$variant
/
$pkg
fi
initcmd
=
"cd
$blddir
"
# Determine new md5sum of files affecting the configure.
md5sum
$srcdir
/autoconf_share/variants
>
$blddir
/conf.md5
lfr_host
=
`
uname
-n
|
sed
-e
"s%
\.
.*%%"
`
if
[
-f
$srcdir
/autoconf_share/variants.
$lfr_host
]
;
then
md5sum
$srcdir
/autoconf_share/variants.
$lfr_host
>>
$blddir
/conf.md5
fi
if
[
-f
$srcdir
/
$pkg
/boot.md5
]
;
then
md5sum
$srcdir
/
$pkg
/boot.md5
>>
$blddir
/conf.md5
fi
if
[
$conf
=
1
]
;
then
confcmd
=
"
$srcdir
/
$pkg
/lofarconf
$confopt
&& "
#
if
[
$conf
!=
0
]
;
then
confcmd
=
"(chg=1; if [
$conf
= 2 -a -f conf.md5-check ]; then md5sum --check conf.md5-check > /dev/null 2>&1; chg="
'$?'
"; fi; if [ "
'$chg'
" = 0 ]; then echo ' package '"
$pkg
"' needs no configuring; md5sum has not changed'; else rm -f conf.md5-check;
$srcdir
/
$pkg
/lofarconf
$confopt
&& md5sum conf.md5 > conf.md5-check; fi) && "
fi
if
[
$clean
=
2
]
;
then
premake
=
"make distclean &&
$srcdir
/
$pkg
/lofarconf
$confopt
&& "
...
...
This diff is collapsed.
Click to expand it.
autoconf_share/rub
+
134
−
70
View file @
d863e9a7
...
...
@@ -24,12 +24,13 @@
# This script is useful to checkout all code needed for a package.
# CVS and SVN are supported.
# It checks out the package itself, looks in its configure.in file which
# other packages it needs, checks those out, etc..
# If the package already exists in the code tree, the package is updated,
# otherwise the package is checked out. The
cvs
log output is written
# otherwise the package is checked out. The log output is written
# to the file rub.log. The script generates a warning if it finds
#
that there are cvs
update conflicts.
# update conflicts.
# Furthermore it generates a lofarconf.in.private file which makes it possible
# to bootstrap, configure and build all those packages (in the correct order).
#
...
...
@@ -61,16 +62,15 @@ do
done
# Set default options.
cvsdefault
=
cvs
cvscomm
=
$cvsdefault
updq
=
cvstag
=
usesvn
=
1
command
=
svn
cutag
=
kopt
=
jobsopt
=
variants
=
buildmake
=
1
boot
=
2
conf
=
0
conf
=
2
confopt
=
clean
=
0
distclean
=
0
...
...
@@ -97,17 +97,27 @@ fi
# Handle possible options.
while
[
$#
!=
0
]
do
# Special cvs command?
if
[
"
$1
"
=
"-h"
-o
"
$1
"
=
"-help"
-o
"
$1
"
=
"--help"
]
;
then
help
=
1
break
elif
[
"
$1
"
=
"-cvs"
]
;
then
shift
cvscomm
=
"
$1
"
command
=
"
$1
"
usesvn
=
0
shift
elif
[
"
$1
"
=
"-nocvs"
]
;
then
shift
cvscomm
=
$cvsdefault
command
=
"svn"
usesvn
=
1
elif
[
"
$1
"
=
"-svn"
]
;
then
shift
command
=
"
$1
"
usesvn
=
1
shift
elif
[
"
$1
"
=
"-nosvn"
]
;
then
shift
command
=
"cvs"
usesvn
=
0
elif
[
"
$1
"
=
-update
]
;
then
shift
update
=
1
...
...
@@ -119,22 +129,14 @@ do
elif
[
"
$1
"
=
-noupdas
]
;
then
shift
updas
=
0
# cvs update qualifiers?
elif
[
"
$1
"
=
-updq
]
;
then
shift
updq
=
"
$1
"
shift
elif
[
"
$1
"
=
-noupdq
]
;
then
shift
updq
=
# cvs tag?
# tag?
elif
[
"
$1
"
=
-r
]
;
then
shift
c
vs
tag
=
"
$1
"
c
u
tag
=
"
$1
"
shift
elif
[
"
$1
"
=
-nor
]
;
then
shift
c
vs
tag
=
c
u
tag
=
# continue after error?
elif
[
"
$1
"
=
-k
]
;
then
shift
...
...
@@ -298,7 +300,7 @@ do
exit
1
;;
-r
*
)
c
vs
tag
=
`
echo
$1
|
sed
-e
's/-r//'
`
c
u
tag
=
`
echo
$1
|
sed
-e
's/-r//'
`
shift
;;
-j
*
)
...
...
@@ -321,14 +323,28 @@ if [ $distclean = 1 ]; then
clean
=
2
conf
=
1
fi
if
[
$boot
=
2
-a
$conf
=
1
]
;
then
boot
=
1
if
[
$boot
=
2
-a
"
$variants
"
=
""
]
;
then
boot
=
0
fi
if
[
$boot
=
1
]
;
then
conf
=
1
fi
if
[
$usesvn
=
1
]
;
then
updcomm
=
"
$command
update"
chocomm
=
"
$command
update"
else
updcomm
=
"
$command
update -dP"
chocomm
=
"
$command
checkout"
# svn -N is sticky; in v1.5 the --recursive flag gets supported
## updcommf="$svncomm update --recursive"
## updcomm="$svncomm update -N"
## chocomm="$svncomm update -N"
fi
if
[
$help
=
1
]
;
then
echo
''
echo
'rub stands for recursive update and build.'
echo
'It check out
s
/updates LOFAR packages and the packages they depend on.'
echo
'It check
s
out/updates LOFAR packages and the packages they depend on.'
echo
'It uses the .spec.in or configure.in files to find out if specific'
echo
'package versions are to be used.'
echo
'If -build is given, the packages are configured, cleaned, built,'
...
...
@@ -336,7 +352,7 @@ if [ $help = 1 ]; then
echo
'using the script rubbuild.'
echo
''
echo
'Run as:'
echo
' rub [-cvs cvs-command] [-
update] [-updq string
] [-r<
cvs
tag>]'
echo
' rub [-cvs cvs-command] [-
svn svn-command] [-update
] [-r<tag>]'
echo
' [-recur[sive]] [-release=option] [-build variants]] [-skipbuilt]'
echo
' [-system] [-boot] [-conf] [-confopt string] [-k] [-j<option>]'
echo
' [-[dist]clean] [-make] [-test] [-check] [-checktool tool] [-install]'
...
...
@@ -345,27 +361,31 @@ if [ $help = 1 ]; then
echo
''
echo
' -cvs cvs-command is an optional cvs command making it possible to'
echo
' specify (for example) the root.'
echo
' It defaults to cvs.'
echo
' It also tells to use cvs instead of svn'
echo
' -nocvs tells to use svn instead of cvs.'
echo
' Default is -nocvs.'
echo
' -svn svn-command is an optional svn command making it possible to'
echo
' specify (for example) the root.'
echo
' It also tells to use svn instead of cvs'
echo
' -nosvn tells to use cvs instead of svn.'
echo
' -update checkout/update autoconf_share and the source tree.'
echo
' -noupdate prevents it all.'
echo
' -noupdas prevents updating autoconf_share.'
echo
' Default is -update.'
echo
' -updq string is a string containing qualifiers for the cvs update'
echo
' command (default is empty)'
echo
' -r<cvstag> cvs tag of the given package(s) to be updated/checked out'
echo
' -r<tag> tag of the given package(s) to be updated/checked out'
echo
' If given, the tag will be used for all packages'
echo
' (excluding autoconf_share).'
echo
' -recur[sive] Do everything recursively, thus also for all'
echo
' packages used by the given packages.'
echo
' Default is -recur.'
echo
' -release=option defines which
CVS
release to check out depending on'
echo
' -release=option defines which release to check out depending on'
echo
' the version given in the LOFAR_INTERNAL macros in'
echo
' configure.in or the Requires line in PKG.spec.in.'
echo
' exact Use the versions as given and check if they'
echo
' match if a package is used from multiple packages.'
echo
' max Use the maximum package version given if'
echo
' used from multiple packages.'
echo
' latest Use latest package release version in
CVS
.'
echo
' latest Use latest package release version in
repository
.'
echo
' main Always use the MAIN for all packages.'
echo
' Default = -release=max.'
echo
' -build variants one or more variants to be built (e.g. "gnu_debug gnu_opt")'
...
...
@@ -378,7 +398,7 @@ if [ $help = 1 ]; then
echo
' rooting in buildroot. /build is added if not present. E.g.'
echo
' gnu_opt::/adir builds in /adir/build/gnu_opt/LCS/Common).'
echo
' -skipbuilt Skip packages built in the previous build run to'
echo
' speed up the build process (especially with -c
onf
).'
echo
' speed up the build process (especially with -c
heck
).'
echo
' It can be used after an unsuccesful built to start'
echo
' the build at the package that failed.'
echo
' It can also be used when building another package'
...
...
@@ -388,15 +408,17 @@ if [ $help = 1 ]; then
echo
' -skipbuilt sets -noupdate, which is undone'
echo
' if -update is given thereafter.'
echo
' Default is -noskipbuilt'
.
echo
' Note that it is not checked if source files have'
echo
' changed, so it should be used with care.'
echo
' -system Do system build for given variants (using buildsys).'
echo
' Options like -make, -conf, etc. are ignored. Implies -k.'
echo
' Default is -nosystem.'
echo
' -boot do bootstrap before build.'
echo
' Default is -boot if -conf is given, otherwise -noboot.'
echo
' -conf do configure before build.'
echo
' Default is -noconf.'
echo
' -boot Always do a bootstrap before the build.'
echo
' It forces -conf.'
echo
' -noboot means do not bootstrap.'
echo
' Default is to only do a bootstrap when needed.'
echo
' If no build is done, the default is -noboot.'
echo
' -conf Always do a configure before the build.'
echo
' -noconf means do not configure.'
echo
' Default is to only do a configure when needed.'
echo
' -confopt string configure options.'
echo
' -k continue after an error?'
echo
' Default is -nok.'
...
...
@@ -437,7 +459,11 @@ if [ $help = 1 ]; then
echo
' Each package can be followed by -v<version>, where'
echo
' <version> gives the version of the package to be'
echo
' checked out/updated.'
echo
' -v is ignored if -r is given.'
echo
' A LOFAR release name looks like LCS-Common-2_1'
.
echo
' A version can be given fully, but also like'
echo
' 2_1 or 2.1 (where . is replaced by _)'
echo
' in which case it is prepended with the package name.'
echo
' -v cannot be used if -r is given.'
echo
''
echo
'All options can be undone by preceeding them with no (e.g. -nobuild).'
echo
'If an option is given multiple times, only the last value takes effect.'
...
...
@@ -462,14 +488,20 @@ if test $install = 1 -o $clean != 0 -o $check = 1 -o $conf = 1 -o $bldte
fi
if
[
"
$verstype
"
=
""
]
;
then
verstype
=
m
if
[
"
$c
vs
tag
"
!=
""
]
;
then
if
[
"
$c
u
tag
"
!=
""
]
;
then
verstype
=
"tag"
fi
elif
[
"
$c
vs
tag
"
!=
""
]
;
then
elif
[
"
$c
u
tag
"
!=
""
]
;
then
"Error: no -release option can be given if a specific -r tag is used"
exit
1
fi
# Get the URL of svn.
if
[
"
$usesvn
"
=
1
]
;
then
svnurl
=
`
svn info |
grep
'URL: '
|
sed
-e
's/URL: *//'
-e
's%/LOFAR/.*%/LOFAR%'
`
export
svnurl
fi
# Get and check the package names and versions.
pkg
=
vers
=
...
...
@@ -478,7 +510,7 @@ while [ $# != 0 ]
do
case
"
$1
"
in
-v
*
)
if
[
"
$c
vs
tag
"
!=
""
]
;
then
if
[
"
$c
u
tag
"
!=
""
]
;
then
echo
"Error: -v cannot be used if a specific -r tag is used"
exit
1
fi
...
...
@@ -508,6 +540,11 @@ do
esac
# Substitute . by _ on the version.
vers
=
`
echo
$vers
|
sed
-e
's/\./_/g'
`
# If needed, prepend by package name.
evers
=
`
echo
$vers
|
sed
-e
's/[0-9_]*//g'
`
if
[
"
$evers
"
=
""
]
;
then
vers
=
`
echo
$pkg
|
sed
-e
's%/%-%g'
`
-
$vers
fi
PKGS
=
"
$PKGS
$pkg
#-v
$vers
"
pkg
=
;;
...
...
@@ -560,12 +597,12 @@ echo "" >> rub.log
if
[
$updas
!=
0
]
;
then
if
[
-f
bootstrap
]
;
then
echo
"Update of LOFAR/bootstrap"
$
cvs
comm
update
bootstrap
>>
rub.log 2>&1
$
upd
comm
bootstrap
>>
rub.log 2>&1
else
echo
"Checkout of LOFAR/bootstrap"
(
cd
..
&&
$c
vs
comm
checkout
LOFAR/bootstrap
)
>>
rub.log 2>&1
(
cd
..
&&
$c
ho
comm
LOFAR/bootstrap
)
>>
rub.log 2>&1
fi
$pgmpath
/rub1 autoconf_share 2 h
""
""
"
$updas
"
"
$recur
"
"
$
cvscomm
"
"
$updq
"
||
exit
1
$pgmpath
/rub1 autoconf_share 2 h
""
""
"
$updas
"
"
$recur
"
"
$
usesvn
"
"
$command
"
||
exit
1
fi
\r
m
-f
allpkg.tmp
touch
allpkg.tmp
...
...
@@ -575,7 +612,7 @@ for PKG in $PKGS
do
pkg
=
`
echo
$PKG
|
sed
-e
's%#-v.*%%'
`
vers
=
`
echo
$PKG
|
sed
-e
's%.*#-v%%'
`
$pgmpath
/rub1
$pkg
1
"
$verstype
"
"
$vers
"
"
$c
vs
tag
"
"
$update
"
"
$recur
"
"
$
cvscomm
"
"
$updq
"
||
exit
1
$pgmpath
/rub1
$pkg
1
"
$verstype
"
"
$vers
"
"
$c
u
tag
"
"
$update
"
"
$recur
"
"
$
usesvn
"
"
$command
"
||
exit
1
done
# Convert allpkg.tmp to lofarconf.in.private
...
...
@@ -601,7 +638,7 @@ do
done
\r
m
-f
allpkg.tmp
# Now
check out/
update the full package and show its name.
# Now update the full package and show its name.
for
PKG
in
$PKGS
do
pkg
=
`
echo
$PKG
|
sed
-e
's%#-v.*%%'
`
...
...
@@ -609,23 +646,35 @@ do
rtag
=
tagstr
=
if
[
"
$vers
"
!=
""
]
;
then
rtag
=
-r
$vers
tagstr
=
",
cvs
tag
$vers
"
rtag
=
"
-r
$vers
"
tagstr
=
", tag
$vers
"
fi
if
[
$update
=
0
]
;
then
echo
"Uses package
$pkg$tagstr
"
else
echo
"Full update of package
$pkg$tagstr
"
echo
"
$cvscomm
update -dP
$rtag
$updq
$pkg
"
>>
rub.log 2>&1
$cvscomm
update
-dP
$rtag
$updq
$pkg
>>
rub.log 2>&1
status
=
$?
if
[
"
$usesvn
"
!=
1
]
;
then
echo
"
$updcomm
$rtag
$pkg
"
>>
rub.log 2>&1
$updcomm
$rtag
$pkg
>>
rub.log 2>&1
status
=
$?
else
# Use the switch command to do this.
part
=
"trunk"
if
[
"
$vers
"
!=
""
]
;
then
part
=
"tags/
$vers
"
fi
echo
"(cd
$pkg
&&
$command
switch
$svnurl
/
$part
/
$pkg
)"
>>
rub.log 2>&1
(
cd
$pkg
&&
$command
switch
$svnurl
/
$part
/
$pkg
)
>>
rub.log 2>&1
status
=
$?
fi
if
[
$status
!=
0
]
;
then
echo
"Exiting; update/checkout returned with an error status ..."
exit
1
fi
fi
done
if
[
$update
!=
0
]
;
then
echo
"See rub.log for the
cvs
update/checkout details"
echo
"See rub.log for the update/checkout details"
egrep
"^C "
rub.log
>
greplog.tmp 2>&1
if
[
$?
=
0
]
;
then
echo
"Error: there seem to be UPDATE CONFLICTS"
...
...
@@ -672,7 +721,7 @@ touch build.result
# Do bootstrap if needed.
# Make sure bootstrap is executable; Eclipse does not set x bit.
# Remove the cache, because sometimes it keeps old data.
if
[
$boot
=
1
]
;
then
if
[
$boot
!
=
0
]
;
then
for
pkg
in
$pkgs
do
if
[
$skipbuilt
=
1
]
;
then
...
...
@@ -682,27 +731,40 @@ if [ $boot = 1 ]; then
continue
fi
fi
echo
""
>>
build.log
echo
" bootstrapping package
$pkg
..."
(
cd
$curwd
/
$pkg
pwd
>>
$curwd
/build.log 2>&1
(
cd
$curwd
/
$pkg
# Determine new md5sum of files affecting the bootstrap.
md5sum
configure.in
$pgmpath
/
*
.m4
>
boot.md5
# Check if boot.md5 has changed.
chg
=
1
if
[
$boot
=
2
-a
-f
boot.md5-check
]
;
then
md5sum
--check
boot.md5-check
>
/dev/null 2>&1
chg
=
$?
fi
if
[
$chg
=
0
]
;
then
echo
" package
$pkg
needs no bootstrapping; md5sum has not changed"
|
tee
-a
$curwd
/build.log
else
echo
" bootstrapping package
$pkg
..."
pwd
>>
$curwd
/build.log
rm
-rf
autom4te.cache
>>
$curwd
/build.log 2>&1
# Try to set execution permissions, ignore failure.
chmod
+x bootstrap
>>
$curwd
/build.log 2>&1
# Try to run bootstrap
# Try to run bootstrap.
# First remove md5, so if bootstrap fails it will always be redone.
rm
-f
boot.md5-check
./bootstrap
>>
$curwd
/build.log 2>&1
if
[
$?
!=
0
]
;
then
echo
" bootstrap of package
$pkg
failed, check file permissions..."
exit
1
echo
" bootstrap of package
$pkg
failed, check file permissions..."
exit
1
fi
)
pwd
>>
$curwd
/build.log 2>&1
echo
$pkg
'# bootstrapped at'
`
date
`
>>
$curwd
/build.result
;
>>
$curwd
/build.log 2>&1
# Keep the current md5sum.
md5sum
boot.md5 configure
>
boot.md5-check
pwd
>>
$curwd
/build.log
fi
)
echo
$pkg
'# bootstrapped at'
`
date
`
>>
$curwd
/build.result
done
echo
""
>>
build.log
fi
...
...
@@ -721,7 +783,9 @@ if [ $skipbuilt = 1 ]; then
fi
if
[
$conf
=
1
]
;
then
bopt
=
"
$bopt
-conf"
echo
" Packages will be configured"
echo
" Packages will always be configured"
elif
[
$conf
=
2
]
;
then
echo
" Packages will be configured when needed"
fi
if
[
$clean
=
1
]
;
then
bopt
=
"
$bopt
-clean"
...
...
This diff is collapsed.
Click to expand it.
autoconf_share/rub1
+
115
−
32
View file @
d863e9a7
...
...
@@ -27,7 +27,7 @@
# See rub for more details.
#
# Use as:
# rub1 package verstype version c
vs
tag checkout recur
cvscomm updq
# rub1 package verstype version c
u
tag checkout recur
usesvn command
#
# package name of package to checkout/update
# conftype 0 = configure.in must be present
...
...
@@ -37,14 +37,15 @@
# (is used for autoconf_share)
# verstype version type (e, m, l, t, tag)
# version version of package to check out
# c
vs
tag tag of package to checkout/update (blank = no tag)
# c
u
tag
tag of package to checkout/update (blank = no tag)
# checkout 1 = do actual checkout/update if not done yet
# 0 = do not checkout/update, but only write used
# packages in allpkg.tmp. This is needed for rub
# to get the correct build order.
# recur 0 = do not rub recursively
# cvscomm cvs command to be used
# updq cvs update qualifiers (e.g. -dAP)
# usesvn 0 = use cvs
# 1 = use svn
# command cvs or svn command to be used
# Get package name (without trailing /), version, etc.
...
...
@@ -53,23 +54,28 @@ conftype="$2"
verstype
=
"
$3
"
getvers
=
"
$4
"
curvers
=
""
c
vs
tag
=
"
$5
"
c
u
tag
=
"
$5
"
# Does an actual checkout/update need to be done.
checkout
=
"
$6
"
# Does it need to be done recursively?
recur
=
"
$7
"
# Get cvs command (defaults to cvs).
cvscomm
=
"
$8
"
if
[
"
$cvscomm
"
=
""
]
;
then
cvscomm
=
"cvs"
# Use cvs or svn?
usesvn
=
"
$8
"
# Get command (defaults is cvs or svn).
command
=
"
$9
"
if
[
"
$command
"
=
""
]
;
then
command
=
"cvs"
if
[
"
$usesvn
"
=
1
]
;
then
command
=
"svn"
fi
fi
#
Get cvs update flags
.
updq
=
"
$9
"
#
Keep current working directory
.
curwd
=
`
pwd
`
# Always use a specific tag if given.
# Set version to blank for types t and l.
if
[
"
$c
vs
tag
"
!=
""
]
;
then
getvers
=
$c
vs
tag
if
[
"
$c
u
tag
"
!=
""
]
;
then
getvers
=
$c
u
tag
elif
[
$verstype
=
t
-o
$verstype
=
l
]
;
then
getvers
=
fi
...
...
@@ -93,17 +99,22 @@ if [ "$pkgline" = "" ]; then
fi
elif
[
$verstype
=
l
]
;
then
# Find the highest released version.
# Check out the package if not existing yet.
if
[
-d
$pkgname
]
;
then
(
cd
..
&&
$cvscomm
checkout
-l
LOFAR/
$pkgname
)
>>
rub.log 2>&1
if
[
"
$usesvn
"
!=
1
]
;
then
# Check out the package if not existing yet.
if
[
-d
$pkgname
]
;
then
(
cd
..
&&
$command
checkout
-l
LOFAR/
$pkgname
)
>>
rub.log 2>&1
fi
# Remove the part '-release-branch' leaving the CVS tag name.
getvers
=
`
cvs log
$pkgname
/configure.in 2>&1 |
grep
release-branch |
head
-1
|
sed
-e
's/[ \t]*\(.*\)-release-branch.*/\1/'
`
else
pkgnm1
=
`
echo
$pkgname
|
sed
-e
's%/%-%g'
`
getvers
=
`
svn list
$svnurl
/tags 2>&1 |
grep
$pkgnm1
|
grep
release-root |
tail
-1
|
sed
-e
's/[ \t]*\(.*\)-release-root.*/\1/'
`
fi
# Remove the part '-release-branch' leaving the CVS tag name.
getvers
=
`
cvs log
$pkgname
/configure.in 2>&1 |
grep
release-branch |
head
-1
|
sed
-e
's/[ \t]*\(.*\)-release-branch.*/\1/'
`
fi
# The package was already updated.
elif
[
"
$c
vs
tag
"
!=
""
]
;
then
curvers
=
$c
vs
tag
elif
[
"
$c
u
tag
"
!=
""
]
;
then
curvers
=
$c
u
tag
else
# Check wanted version and possibly already checked out version.
# verstypes t and l are already handled when the package was retrieved
...
...
@@ -143,21 +154,93 @@ fi
# Checkout/update if needed.
rtag
=
if
[
"
$getvers
"
!=
""
]
;
then
rtag
=
"-r
$getvers
"
tagstr
=
",
cvs
tag
$getvers
"
rtag
=
"-r
$getvers
"
tagstr
=
", tag
$getvers
"
fi
if
[
"
$pkgline
"
=
""
-o
"
$getvers
"
!=
"
$curvers
"
]
;
then
if
[
$checkout
=
1
]
;
then
if
[
-d
$pkgname
]
;
then
status
=
0
if
[
-e
$pkgname
]
;
then
if
[
!
-d
$pkgname
]
;
then
echo
"Cannot checkout
$pkgname
: it exists, but is no package directory"
exit
1
fi
# Package already exists, so update it.
echo
"Toplevel update of package
$pkgname$tagstr
"
echo
"(cd
$pkgname
&&
$cvscomm
update -ldP
$rtag
$updq
)"
>>
rub.log 2>&1
(
cd
$pkgname
&&
$cvscomm
update
-ldP
$rtag
$updq
)
>>
rub.log 2>&1
status
=
$?
if
[
"
$usesvn
"
!=
1
]
;
then
# Use local update for cvs.
echo
"(cd
$pkgname
&&
$command
update -ldP
$rtag
$updq
)"
>>
rub.log 2>&1
(
cd
$pkgname
&&
$command
update
-ldP
$rtag
$updq
)
>>
rub.log 2>&1
status
=
$?
else
# Local update does not work well for svn, so need to do full update.
# Use the switch command to do this, because in that way a change
# in version is also handled.
part
=
"trunk"
if
[
"
$getvers
"
!=
""
]
;
then
part
=
"tags/
$getvers
"
fi
echo
"(cd
$pkgname
&&
$command
switch
$svnurl
/
$part
/
$pkgname
)"
>>
rub.log 2>&1
(
cd
$pkgname
&&
$command
switch
$svnurl
/
$part
/
$pkgname
)
>>
rub.log 2>&1
status
=
$?
fi
else
echo
"Toplevel checkout of package
$pkgname$tagstr
"
echo
"(cd .. &&
$cvscomm
checkout -l
$rtag
LOFAR/
$pkgname
)"
>>
rub.log 2>&1
(
cd
..
&&
$cvscomm
checkout
-l
$rtag
LOFAR/
$pkgname
)
>>
rub.log 2>&1
status
=
$?
# Package does not exist yet.
if
[
"
$usesvn
"
!=
1
]
;
then
# Use simple checkout for cvs.
echo
"(cd .. &&
$command
checkout -l
$rtag
LOFAR/
$pkgname
)"
>>
rub.log 2>&1
(
cd
..
&&
$command
checkout
-l
$rtag
LOFAR/
$pkgname
)
>>
rub.log 2>&1
status
=
$?
else
# With svn the check out needs to be done package by package.
# It is done locally to avoid that e.g. all of LCS is checked out
# when LCS/Common needs to be checked out.
# Only the leaf is checked out fully.
leafnm
=
`
basename
$pkgname
`
nms
=
`
echo
$pkgname
|
sed
-e
"s%
$leafnm$%
%"
-e
's%/% %g'
`
for
nm
in
$nms
do
# Check out locally if not existing yet.
local
=
"-N"
;
if
[
-e
$nm
]
;
then
if
[
!
-d
$nm
]
;
then
echo
"Cannot checkout
$pkgname
: file
$nm
exists, but is no directory"
exit
1
fi
local
=
fi
echo
"
$command
update
$local
$nm
"
>>
$curwd
/rub.log 2>&1
$command
update
$local
$nm
>>
$curwd
/rub.log 2>&1
status
=
$?
if
[
$status
=
0
]
;
then
cd
$nm
>
/dev/null 2>&1
||
exit
1
fi
done
# Check out the leaf.
part
=
trunk
if
[
"
$getvers
"
!=
""
]
;
then
part
=
"tags/
$getvers
"
fi
# Find out if it is a leaf package or super package by testing
# if it has a configure.in file.
# A super package is checked out locally only.
local
=
svn list
$svnurl
/
$part
/
$pkgname
/configure.in
>
/dev/null 2>&1
if
[
$?
!=
0
]
;
then
local
=
"-N"
# no leaf package
fi
if
[
"
$getvers
"
!=
""
]
;
then
echo
"
$command
checkout
$local
$svnurl
/
$part
/
$pkgname
$leafnm
"
>>
$curwd
/rub.log 2>&1
$command
checkout
$local
$svnurl
/
$part
/
$pkgname
$leafnm
>>
$curwd
/rub.log 2>&1
status
=
$?
else
echo
"
$command
update
$local
$leafnm
"
>>
$curwd
/rub.log 2>&1
$command
update
$local
$leafnm
>>
$curwd
/rub.log 2>&1
status
=
$?
fi
cd
$curwd
>
/dev/null 2>&1
fi
fi
if
[
$status
!=
0
]
;
then
echo
"Exiting; update/checkout returned with an error status ..."
...
...
@@ -201,7 +284,7 @@ if [ -f $pgkname/$pkgname.spec.in ]; then
# Replace a . in the version by _.
vers
=
`
echo
$pkg
|
awk
-F
=
'{ print $2 }'
|
sed
-e
's/\./_/g'
`
# Check out the package.
$0
$nm
0
"
$verstype
"
"
$vers
"
"
$c
vs
tag
"
$checkout
$recur
"
$
cvscomm
"
"
$updq
"
||
exit
1
$0
$nm
0
"
$verstype
"
"
$vers
"
"
$c
u
tag
"
$checkout
$recur
"
$
usesvn
"
"
$command
"
||
exit
1
done
elif
[
-f
$pkgname
/configure.in
]
;
then
if
[
-f
$pkgname
/lofarconf.in
-o
-f
$pkgname
/lofarconf.in.private
]
;
then
...
...
@@ -223,7 +306,7 @@ elif [ -f $pkgname/configure.in ]; then
# Possible third name is the version. Replace possible . by _.
vers
=
`
echo
$nma
|
awk
-F
,
'{ print $3 }'
|
sed
-e
's/\./_/g'
`
# Check out the package.
$0
$nm
0
"
$verstype
"
"
$vers
"
"
$c
vs
tag
"
$checkout
$recur
"
$
cvscomm
"
"
$updq
"
||
exit
1
$0
$nm
0
"
$verstype
"
"
$vers
"
"
$c
u
tag
"
$checkout
$recur
"
$
usesvn
"
"
$command
"
||
exit
1
done
fi
else
...
...
@@ -246,7 +329,7 @@ else
vers
=
`
echo
$PKG
|
sed
-e
's%.*#-v%%'
`
fi
# Check out the package.
$0
$pkgname
/
$pkg
1
"
$verstype
"
"
$vers
"
"
$c
vs
tag
"
$checkout
$recur
"
$
cvscomm
"
"
$updq
"
||
exit
1
$0
$pkgname
/
$pkg
1
"
$verstype
"
"
$vers
"
"
$c
u
tag
"
$checkout
$recur
"
$
usesvn
"
"
$command
"
||
exit
1
done
fi
fi
This diff is collapsed.
Click to expand it.
autoconf_share/rubbuild
+
1
−
1
View file @
d863e9a7
...
...
@@ -38,7 +38,7 @@ pgmpath=`cd $pgmpath > /dev/null 2>&1 && pwd`
kopt
=
0
jobsopt
=
buildmake
=
1
conf
=
0
conf
=
2
confopt
=
clean
=
0
distclean
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment