Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
0bc9a52b
Commit
0bc9a52b
authored
Jan 26, 2010
by
Yuri Fil
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.eter:/people/lav/packages/etersoft-build-utils
parents
563b3559
5cfa9ea7
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
178 additions
and
73 deletions
+178
-73
NEWS
NEWS
+9
-0
QuickHelp.koi8-r.txt
QuickHelp.koi8-r.txt
+17
-9
QuickHelp.txt
QuickHelp.txt
+17
-9
TODO
TODO
+5
-12
myhsh
bin/myhsh
+6
-3
rpmbb
bin/rpmbb
+1
-1
rpmbph
bin/rpmbph
+2
-4
rpmbs
bin/rpmbs
+4
-1
rpmbsh
bin/rpmbsh
+15
-17
rpmgp
bin/rpmgp
+29
-9
rpmgs
bin/rpmgs
+4
-3
rpmrb
bin/rpmrb
+1
-2
etersoft-build-utils.spec
etersoft-build-utils.spec
+7
-1
config
share/eterbuild/functions/config
+1
-1
git
share/eterbuild/functions/git
+7
-0
repl
share/eterbuild/functions/repl
+1
-1
rpm
share/eterbuild/functions/rpm
+28
-0
test_quote.sh
tests/test_quote.sh
+24
-0
No files found.
NEWS
View file @
0bc9a52b
etersoft-build-utils-1.7.5: 22 Jan 2010
- rpmbs/rpmbsh: add -l option for lazy-cleanup after build
- rpmgs: check dir with the same as package name firstly
- version up to 175
- repl: make required packages list unique
- rpmgp: add -m option for migrate spec to gear support
- rpmgp: fix -b option (install buildreqs packages) to work in distro independent manner
- rpmgp: fix get remote branches and main branch selecting
etersoft-build-utils-1.7.4: 14 Jan 2010
etersoft-build-utils-1.7.4: 14 Jan 2010
- rpmbph: support for branches like 5.1 if exists, instead M51
- rpmbph: support for branches like 5.1 if exists, instead M51
- rpmgp: clone all branches locally
- rpmgp: clone all branches locally
...
...
QuickHelp.koi8-r.txt
View file @
0bc9a52b
---------------------------
---------------------------
ginit [GEAR] - initialize repo in git.
eter
for current project
ginit [GEAR] - initialize repo in git.
alt
for current project
Use: ginit without parameters
Use: ginit without parameters
ginit git.eter - for init in git.eter gear repo
ginit git.eter - for init in git.eter gear repo
---------------------------
---------------------------
gpull [args] - do git pull --rebase
gpull [args] - do git pull --rebase
Use: g
init
without parameters
Use: g
pull
without parameters
---------------------------
---------------------------
gpush - publish current project repo
to git.eter
gpush - publish current project repo
remote git repo
Use: gpush [-f|--force] [-a|--all] [project name] [target branch]
Use: gpush [-f|--force] [-a|--all] [project name] [target branch]
---------------------------
---------------------------
jmake - make with ccache using and parallel build enabled
---------------------------
loginhsh - install package in hasher / take shell
loginhsh - install package in hasher / take shell
Usage: [-t -i -h -r] bin.rpm...
Usage: [-t -i -h -r
-c] [-M51
] bin.rpm...
:
:
-i - hasher ( )
-i - hasher ( )
-c - cleanup hasher
-c - cleanup hasher
-o - log in as root user
-t - hasher,
-t - hasher,
-r - hasher ̣
-r - hasher ̣
-M?? - branch name
---------------------------
---------------------------
...
@@ -39,22 +45,23 @@ Usage: [-m -s -u -i -c] src.rpm...
...
@@ -39,22 +45,23 @@ Usage: [-m -s -u -i -c] src.rpm...
---------------------------
---------------------------
rpmbb - build binary rpm from spec
rpmbb - build binary rpm from spec
Usage: [-c -p -i -r] spec...
Usage: [-c -p -i -r
-R
] spec...
:
:
-c - start from compile stage
-c - start from compile stage
-i -
-i -
-p - packaging installed files into package
-p - packaging installed files into package
-r - (buildreq)
-r - (buildreq)
-R - find build requires with -bi
---------------------------
---------------------------
rpmbph - backports spec and rebuild it
rpmbph - backports spec and rebuild it
Usage: [-r -u -U -n -i -m -v] [-M
??
] spec...
Usage: [-r -u -U -n -i -m -v] [-M
51
] spec...
Use rpmbph -M
40 for backport to ALT 4.0
and so on
Use rpmbph -M
51 for backport to ALT M51
and so on
:
:
-r - ̣
-r - ̣
-u/-U - sign and upload after build
-u/-U - sign and upload after build
-n -
hasher
-n -
do not build in hasher (use first in the list)
-i - install built packages in test hasher
-i - install built packages in test hasher
-v - more verbose
-v - more verbose
...
@@ -96,13 +103,14 @@ rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
...
@@ -96,13 +103,14 @@ rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
rpmgp - various package download operations
rpmgp - various package download operations
Usage: [options] [system] pkgname
Usage: [options] [system] pkgname
:
:
rpmgp [
-a -c -n
] [system] pkgname - download src.rpm from 'system' repository to RPM/SRPMS and install it
rpmgp [
options
] [system] pkgname - download src.rpm from 'system' repository to RPM/SRPMS and install it
name - src.rpm
name - src.rpm
system - name of system (ALT Linux by default if -a missed too)
system - name of system (ALT Linux by default if -a missed too)
-a search pkgname in all known repositories
-a search pkgname in all known repositories
-b install packages needed for build (use sudo apt-get) (need spec not package name)
-b install packages needed for build (use sudo apt-get) (need spec not package name)
-c check if this package exists in the ALT Linux repository
-c check if this package exists in the ALT Linux repository
-d download all matched packages
-d download all matched packages
-g remote clone repo to USER/packages and clone it locally
-l list packages needed for build (in local pkg system notation) (experimental)
-l list packages needed for build (in local pkg system notation) (experimental)
-n do not install after download, just download in current dir
-n do not install after download, just download in current dir
-r refresh package list (download it again)
-r refresh package list (download it again)
...
...
QuickHelp.txt
View file @
0bc9a52b
---------------------------
---------------------------
ginit [GEAR] - initialize repo in git.
eter
for current project
ginit [GEAR] - initialize repo in git.
alt
for current project
Use: ginit without parameters
Use: ginit without parameters
ginit git.eter - for init in git.eter gear repo
ginit git.eter - for init in git.eter gear repo
---------------------------
---------------------------
gpull [args] - do git pull --rebase
gpull [args] - do git pull --rebase
Use: g
init
without parameters
Use: g
pull
without parameters
---------------------------
---------------------------
gpush - publish current project repo
to git.eter
gpush - publish current project repo
remote git repo
Use: gpush [-f|--force] [-a|--all] [project name] [target branch]
Use: gpush [-f|--force] [-a|--all] [project name] [target branch]
---------------------------
---------------------------
jmake - make with ccache using and parallel build enabled
---------------------------
loginhsh - install package in hasher / take shell
loginhsh - install package in hasher / take shell
Usage: [-t -i -h -r] bin.rpm...
Usage: [-t -i -h -r
-c] [-M51
] bin.rpm...
Options:
Options:
-i - initialize hasher
-i - initialize hasher
-c - cleanup hasher
-c - cleanup hasher
-o - log in as root user
-t - use test hasher dir
-t - use test hasher dir
-r - remote login to hasher
-r - remote login to hasher
-M?? - branch name
---------------------------
---------------------------
...
@@ -39,22 +45,23 @@ Options:
...
@@ -39,22 +45,23 @@ Options:
---------------------------
---------------------------
rpmbb - build binary rpm from spec
rpmbb - build binary rpm from spec
Usage: [-c -p -i -r] spec...
Usage: [-c -p -i -r
-R
] spec...
Options:
Options:
-c - start from compile stage
-c - start from compile stage
-i - install and package
-i - install and package
-p - packaging installed files into package
-p - packaging installed files into package
-r - find build requires
-r - find build requires
-R - find build requires with -bi
---------------------------
---------------------------
rpmbph - backports spec and rebuild it
rpmbph - backports spec and rebuild it
Usage: [-r -u -U -n -i -m -v] [-M
??
] spec...
Usage: [-r -u -U -n -i -m -v] [-M
51
] spec...
Use rpmbph -M
40 for backport to ALT 4.0
and so on
Use rpmbph -M
51 for backport to ALT M51
and so on
Options:
Options:
-r - remote build
-r - remote build
-u/-U - sign and upload after build
-u/-U - sign and upload after build
-n - do not build in hasher
-n - do not build in hasher
(use first in the list)
-i - install built packages in test hasher
-i - install built packages in test hasher
-v - more verbose
-v - more verbose
...
@@ -96,13 +103,14 @@ rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
...
@@ -96,13 +103,14 @@ rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
rpmgp - various package download operations
rpmgp - various package download operations
Usage: [options] [system] pkgname
Usage: [options] [system] pkgname
Options:
Options:
rpmgp [
-a -c -n
] [system] pkgname - download src.rpm from 'system' repository to RPM/SRPMS and install it
rpmgp [
options
] [system] pkgname - download src.rpm from 'system' repository to RPM/SRPMS and install it
name - installed package name or src.rpm
name - installed package name or src.rpm
system - name of system (ALT Linux by default if -a missed too)
system - name of system (ALT Linux by default if -a missed too)
-a search pkgname in all known repositories
-a search pkgname in all known repositories
-b install packages needed for build (use sudo apt-get) (need spec not package name)
-b install packages needed for build (use sudo apt-get) (need spec not package name)
-c check if this package exists in the ALT Linux repository
-c check if this package exists in the ALT Linux repository
-d download all matched packages
-d download all matched packages
-g remote clone repo to USER/packages and clone it locally
-l list packages needed for build (in local pkg system notation) (experimental)
-l list packages needed for build (in local pkg system notation) (experimental)
-n do not install after download, just download in current dir
-n do not install after download, just download in current dir
-r refresh package list (download it again)
-r refresh package list (download it again)
...
...
TODO
View file @
0bc9a52b
rpmgp -b - apt-get build-dep,
lib, %files:
lib, %files:
%post -p %post_ldconfig
%post -p %post_ldconfig
%postun -p %postun_ldconfig
%postun -p %postun_ldconfig
backports
- upload.SS rpmbs -u
- 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
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
:
:
gear
# 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] -
...
@@ -45,11 +48,7 @@ exec time rpmbuild --target="\$target" $nodeps -bs "\$@"
...
@@ -45,11 +48,7 @@ exec time rpmbuild --target="\$target" $nodeps -bs "\$@"
( ). , ,
( ). , ,
.
.
rpmbb git
Req ( )
Req ( )
, hasher
src.rpm SRPMS
:
:
ALT -
ALT -
...
@@ -58,7 +57,6 @@ pkgrepl.pclinux -
...
@@ -58,7 +57,6 @@ pkgrepl.pclinux -
pkgrepl.pclinux.2007 -
pkgrepl.pclinux.2007 -
, ( ALT)
, ( ALT)
-x ̣ x86_64?
%homedir tmp ?
%homedir tmp ?
rpm -bE rpm --showrc ?
rpm -bE rpm --showrc ?
...
@@ -81,7 +79,7 @@ pkgrepl.pclinux.2007 -
...
@@ -81,7 +79,7 @@ pkgrepl.pclinux.2007 -
- / ?
- / ?
=== 1.8 ===
=== 1.8 ===
-
how to use --build-args= for hsh? - myhsh rpm
+
how to use --build-args= for hsh? - myhsh rpm
- ?
- ?
- , ޣ (diff )
- , ޣ (diff )
- .pot
- .pot
...
@@ -96,11 +94,6 @@ pkgrepl.pclinux.2007 -
...
@@ -96,11 +94,6 @@ pkgrepl.pclinux.2007 -
- ( )?
- ( )?
( )
alias
alias hsh="hsh --build='--define \"_unpackaged_files_terminate_build 1\"'"
~/.rpmmacros
Unpackaged:
Unpackaged:
awk '
awk '
on { if (/^ +\//) print $0; else on=0 }
on { if (/^ +\//) print $0; else on=0 }
...
...
bin/myhsh
View file @
0bc9a52b
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
load_mod hasher
load_mod hasher
#############################
#############################
Usage
=
"Usage:
$name
[-m -s -u -i -c] src.rpm..."
Usage
=
"Usage:
$name
[-m -s -u -i -c
-l
] src.rpm..."
function
mygetopts
()
function
mygetopts
()
{
{
name
=
${
0
##*/
}
name
=
${
0
##*/
}
...
@@ -24,13 +24,16 @@ phelp()
...
@@ -24,13 +24,16 @@ phelp()
echog
"Options:"
echog
"Options:"
echog
" -i - install built packages in test hasher"
echog
" -i - install built packages in test hasher"
echog
" -c - build without stuff (previous built packages)"
echog
" -c - build without stuff (previous built packages)"
echog
" -l - lazy cleanup (before build, not after)"
}
}
while
getopts
:hmic opt
;
do
while
getopts
:hmic
l
opt
;
do
case
$opt
in
case
$opt
in
h
)
phelp
;
exit
0
;;
h
)
phelp
;
exit
0
;;
i
)
TESTINSTALL
=
1
;;
i
)
TESTINSTALL
=
1
;;
c
)
HASHERARG
=
"--without-stuff
$HASHERARG
"
;;
l
)
HASHERARG
=
"
$HASHERARG
--lazy-cleanup"
;;
c
)
HASHERARG
=
"
$HASHERARG
--without-stuff"
;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
+?
)
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;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
...
...
bin/rpmbb
View file @
0bc9a52b
...
@@ -87,7 +87,7 @@ if [ -n "$BUILDREQ" ] ; then
...
@@ -87,7 +87,7 @@ if [ -n "$BUILDREQ" ] ; then
fi
fi
if
[
-n
"
$BUILDOPT
"
]
;
then
if
[
-n
"
$BUILDOPT
"
]
;
then
is_alt
||
fatal
"Sorry, only ALT Linux
systems support
--short-circuit correctly"
is_alt
||
fatal
"Sorry, only ALT Linux
rpm supports
--short-circuit correctly"
for
it
in
$BUILDOPT
for
it
in
$BUILDOPT
do
do
uni_rpmbuild
--commit
$LISTNAMES
-b
$it
$LISTRPMARGS
--target
$DEFAULTARCH
--short-circuit
uni_rpmbuild
--commit
$LISTNAMES
-b
$it
$LISTRPMARGS
--target
$DEFAULTARCH
--short-circuit
...
...
bin/rpmbph
View file @
0bc9a52b
...
@@ -363,11 +363,9 @@ if [ "$VENDOR" = "alt" ] ; then
...
@@ -363,11 +363,9 @@ if [ "$VENDOR" = "alt" ] ; then
fatal
"User cancelled. You are still in
$USEBRANCH
branch with modified spec"
fatal
"User cancelled. You are still in
$USEBRANCH
branch with modified spec"
fi
fi
git add
$SPEC
git add
$SPEC
if
!
git
commit
-a
-m
"backported to
$USEBRANCH
by rpmbph script as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
"
;
then
if
!
git
_commit_ignore_nothing
-a
-m
"backported to
$USEBRANCH
as
$(
get_version
$SPEC
)
-
$(
get_release
$SPEC
)
(with rpmbph script
)"
;
then
#git checkout $CURBRANCH
#git checkout $CURBRANCH
#fatal "Commit error. You are still in $MDISTR branch with modified and uncommitted spec"
fatal
"Commit error. You are still in
$MDISTR
branch with modified and uncommitted spec"
# FIXME: git commit returns error if no commit needed
echo
fi
fi
[
-n
"
$NOBUILD
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbs"
[
-n
"
$NOBUILD
"
]
&&
BUILDCOMMAND
=
"
$ETERBUILDBIN
/rpmbs"
$BUILDCOMMAND
$LISTRPMARGS
$REMOTEBUILD
$DISTRARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
$BUILDCOMMAND
$LISTRPMARGS
$REMOTEBUILD
$DISTRARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
...
...
bin/rpmbs
View file @
0bc9a52b
...
@@ -41,12 +41,13 @@ phelp()
...
@@ -41,12 +41,13 @@ phelp()
echog
"
$Descr
"
echog
"
$Descr
"
echog
"
$Usage
"
echog
"
$Usage
"
echog
"Options:"
echog
"Options:"
echog
" -s - sign package(s) and move it to upload dir"
echog
" -s - sign package(s) and move it to upload dir
(ETERDESTSRPM)
"
echog
" -c - only sign package(s) with checking"
echog
" -c - only sign package(s) with checking"
echog
" -u - sign package(s), upload it and run build"
echog
" -u - sign package(s), upload it and run build"
echog
" -a TASK - sign package(s), update it and add to task TASK"
echog
" -a TASK - sign package(s), update it and add to task TASK"
# echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -d - remove package(s) from SRPMS and Incoming"
# echog " -d - remove package(s) from SRPMS and Incoming"
echog
" -l - lazy cleanup (before build, not after)"
echog
" -n - do not check with sisyphus_check before upload"
echog
" -n - do not check with sisyphus_check before upload"
echog
" -o - create nosrc.rpm package"
echog
" -o - create nosrc.rpm package"
echog
" -z - create src.rpm with compatible gzip compression"
echog
" -z - create src.rpm with compatible gzip compression"
...
@@ -179,6 +180,8 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
...
@@ -179,6 +180,8 @@ if [ -n "$UPLOADNOW" ] && is_gear $SPECDIR ; then
check_gear_and_tag
check_gear_and_tag
$ETERBUILDBIN
/gpush
$GIRARHOST
$BASENAME
||
fatal
"Git push via gpush failed. Possibly you need to run ginit for create remote repo."
$ETERBUILDBIN
/gpush
$GIRARHOST
$BASENAME
||
fatal
"Git push via gpush failed. Possibly you need to run ginit for create remote repo."
TAG
=
$VERSION
-
$RELEASE
TAG
=
$VERSION
-
$RELEASE
echo
echo
"Run build
$BASENAME
at
$GIRARHOST
"
if
[
-n
"
$TASKNUMBER
"
]
;
then
if
[
-n
"
$TASKNUMBER
"
]
;
then
ssh
$GIRARHOST
task add
$TASKNUMBER
repo
$BASENAME
$TAG
ssh
$GIRARHOST
task add
$TASKNUMBER
repo
$BASENAME
$TAG
else
else
...
...
bin/rpmbsh
View file @
0bc9a52b
...
@@ -33,19 +33,18 @@ phelp()
...
@@ -33,19 +33,18 @@ phelp()
echog
"Options:"
echog
"Options:"
echog
" -r - remote build"
echog
" -r - remote build"
echog
" -t - make temporary commit before build (rpmbb like behavior)"
echog
" -t - make temporary commit before build (rpmbb like behavior)"
echog
" -u
/-U
- sign and upload after build"
echog
" -u - sign and upload after build"
echog
" -s - sign and and copy to upload after build"
echog
" -s - sign and and copy to upload
dir (ETERDESTSRPM)
after build"
echog
" -i - install built packages in test hasher"
echog
" -i - install built packages in test hasher"
echog
" -l - lazy cleanup (before build, not after)"
echog
" -c - build without stuff (previous built packages)"
echog
" -c - build without stuff (previous built packages)"
}
}
while
getopts
:hrusimt opt
;
do
while
getopts
:hru
l
simt opt
;
do
case
$opt
in
case
$opt
in
h
)
phelp
;
exit
0
;;
h
)
phelp
;
exit
0
;;
r
)
REMOTEBUILD
=
1
;;
r
)
REMOTEBUILD
=
1
;;
t
)
COMMIT
=
--commit
;;
t
)
COMMIT
=
"--commit"
;;
# u) UPLOADNOW="-u" ;;
# s) UPLOADNOW="-s" ;;
+?
)
echog
"
$name
: options should not be preceded by a '+'."
1>&2
;
exit
2
;;
+?
)
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;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
?
)
OPTIND
=
$((
OPTIND-1
))
;
break
;
...
@@ -70,14 +69,15 @@ fi
...
@@ -70,14 +69,15 @@ fi
parse_cmd_pre
"
$@
"
parse_cmd_pre
"
$@
"
mygetopts
$LISTARGS
mygetopts
$LISTARGS
[
-n
"
$LISTNAMES
"
]
||
fatal
"Run with exists specs as arg"
# TODO: skip for prev. packed src.rpm
# TODO: skip for prev. packed src.rpm
# If fail, we already has correct changelog
# If fail, we already has correct changelog
add_changelog_helper
"- new version"
$LISTNAMES
add_changelog_helper
"- new version"
$LISTNAMES
#echo ${LISTRPMARGS/\-m/} @ ${LISTRPMARGS} @${LISTNAMES}
# We do not not pass args for myhsh here...
# We do not not pass args for myhsh here...
# FIXME:
# FIXME:
pack_src_rpm
$COMMIT
$(
echo
$LISTRPMARGS
|
sed
-e
"s|-[suUic]||g"
)
pack_src_rpm
$COMMIT
$(
echo
$LISTRPMARGS
|
sed
-e
"s|-[suUic
l
]||g"
)
# TODO: skip for prev. packed src.rpm
# TODO: skip for prev. packed src.rpm
set_specdir
$LISTNAMES
set_specdir
$LISTNAMES
...
@@ -100,9 +100,8 @@ if [ -n "$REMOTEBUILD" ] ; then
...
@@ -100,9 +100,8 @@ if [ -n "$REMOTEBUILD" ] ; then
echo
"-------------------------------"
echo
"-------------------------------"
test
"
$RESULT
"
=
"0"
&&
echog
"It was remote build at
$BUILDSERVER
"
||
echog
"There is error during remote build at
$BUILDSERVER
"
test
"
$RESULT
"
=
"0"
&&
echog
"It was remote build at
$BUILDSERVER
"
||
echog
"There is error during remote build at
$BUILDSERVER
"
else
else
cd
$RPMTOPDIR
/SRPMS
&&
time
$ETERBUILDBIN
/myhsh
$MENVARG
$LISTRPMARGS
$LISTBUILT
time
$ETERBUILDBIN
/myhsh
$MENVARG
$LISTRPMARGS
$LISTBUILT
RESULT
=
$?
RESULT
=
$?
cd
-
date
date
echo
"-------------------------------"
echo
"-------------------------------"
...
@@ -110,12 +109,11 @@ fi
...
@@ -110,12 +109,11 @@ fi
# make src.rpm if build OK and we have options for rpmbs
# make src.rpm if build OK and we have options for rpmbs
if
[
"
$RESULT
"
=
"0"
]
&&
[
-n
"
$LISTRPMARGS
"
]
;
then
if
[
!
"
$RESULT
"
=
"0"
]
||
[
-z
"
$LISTRPMARGS
"
]
;
then
if
is_gear
$SPECDIR
;
then
exit
$RESULT
$ETERBUILDBIN
/rpmbs
$GIRARHOST
$MENVARG
$LISTRPMARGS
$LISTNAMES
else
$ETERBUILDBIN
/rpmbs
$GIRARHOST
$MENVARG
$LISTRPMARGS
$LISTBUILT
fi
fi
fi
exit
$RESULT
is_gear
$SPECDIR
&&
TSKLIST
=
$LISTNAMES
||
TSKLIST
=
$LISTBUILT
$ETERBUILDBIN
/rpmbs
$GIRARHOST
$MENVARG
$LISTRPMARGS
$TSKLIST
bin/rpmgp
View file @
0bc9a52b
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,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 repl git
load_mod rpm repl git
rpm
# path to ALT Linux's repositories
# path to ALT Linux's repositories
REPOSITORY
=
"files/SRPMS obsolete orphaned"
REPOSITORY
=
"files/SRPMS obsolete orphaned"
...
@@ -160,6 +160,7 @@ phelp()
...
@@ -160,6 +160,7 @@ phelp()
echog
" -c check if this package exists in the ALT Linux repository"
echog
" -c check if this package exists in the ALT Linux repository"
echog
" -d download all matched packages"
echog
" -d download all matched packages"
echog
" -g remote clone repo to USER/packages and clone it locally"
echog
" -g remote clone repo to USER/packages and clone it locally"
echog
" -m migrate to gear from spec"
echog
" -l list packages needed for build (in local pkg system notation) (experimental)"
echog
" -l list packages needed for build (in local pkg system notation) (experimental)"
echog
" -n do not install after download, just download in current dir"
echog
" -n do not install after download, just download in current dir"
echog
" -r refresh package list (download it again)"
echog
" -r refresh package list (download it again)"
...
@@ -168,7 +169,7 @@ phelp()
...
@@ -168,7 +169,7 @@ phelp()
}
}
TRYINST
=
"1"
TRYINST
=
"1"
while
getopts
:habcdglnrs opt
;
do
while
getopts
:habcdgl
m
nrs opt
;
do
case
$opt
in
case
$opt
in
h
)
phelp
;
exit
0
;;
h
)
phelp
;
exit
0
;;
a
)
ALLSYSTEM
=
1
;;
a
)
ALLSYSTEM
=
1
;;
...
@@ -177,6 +178,7 @@ while getopts :habcdglnrs opt; do
...
@@ -177,6 +178,7 @@ while getopts :habcdglnrs opt; do
d
)
DOWNLOADALL
=
1
;;
d
)
DOWNLOADALL
=
1
;;
g
)
CLONEGIT
=
1
;;
g
)
CLONEGIT
=
1
;;
l
)
LISTREQS
=
1
;;
l
)
LISTREQS
=
1
;;
m
)
MIGRATEGEAR
=
1
;;
n
)
TRYINST
=
""
;;
n
)
TRYINST
=
""
;;
r
)
UPDATECACHE
=
1
;;
r
)
UPDATECACHE
=
1
;;
s
)
load_systems_list
s
)
load_systems_list
...
@@ -221,30 +223,48 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name"
...
@@ -221,30 +223,48 @@ test -z "$LISTARGS" && fatal "Please run with spec/package name"
#
#
# - []
# - []
# install binary packages
# install
required for build
binary packages
if
[
-n
"
$INSTALLBINARY
"
]
;
then
if
[
-n
"
$INSTALLBINARY
"
]
;
then
parse_cmd_pre
"
$@
"
parse_cmd_pre
"
$@
"
pack_src_rpm
$LISTRPMARGS
pack_src_rpm
$LISTRPMARGS
echog
"Running apt-get build-dep for install needed packages for
$LISTBUILT
"
LISTPKG
=
$(
rpmquery
--requires
-p
$LISTBUILT
| clean_pkgreq |
sed
-e
"s|rpm-build-altlinux-compat||g"
)
# FIXME: ALT Specific
DISTRVENDOR
=
$(
distr_vendor
-d
)
$SUDO
apt-get build-dep
$LISTBUILT
CMD
=
$(
get_install_package_command
$DISTRVENDOR
interactive
)
echog
"Running
$SUDO
$CMD
$LISTPKG
..."
$SUDO
$CMD
$LISTPKG
fi
if
[
-n
"
$MIGRATEGEAR
"
]
;
then
parse_cmd_pre
"
$@
"
pack_src_rpm
$LISTRPMARGS
for
PKGNAME
in
$LISTBUILT
;
do
echo
"Create gear repo"
GITALT
=
~/Projects/git-alt
GEARDIR
=
$GITALT
/
$BASENAME
test
-d
"
$GEARDIR
"
&&
fatal
"repo
$GEARDIR
already exits"
mkdir
-p
"
$GEARDIR
"
||
fatal
"can't create dir
$GEARDIR
"
cd
$GEARDIR
||
fatal
"can't cd to
$GEARDIR
"
git init-db
||
fatal
"can't init db"
gear-srpmimport
$PKGNAME
||
fatal
"can't import srpm
$PKGNAME
"
rm
-vf
$PKGNAME
done
exit
0
exit
0
fi
fi
# clone remote git
# clone remote git
if
[
-n
"
$CLONEGIT
"
]
;
then
if
[
-n
"
$CLONEGIT
"
]
;
then
PKGNAME
=
$1
PKGNAME
=
$1
INITLETTER
=
$(
echo
$PKGNAME
|
sed
"s/^
\(
.
\)
.*/
\1
/g"
)
INITLETTER
=
$(
echo
$PKGNAME
|
cut
-c1
)
# http://git.altlinux.org/srpms/N/NAME.git
# http://git.altlinux.org/srpms/N/NAME.git
echo
"Remote clone from /srpms/
$INITLETTER
/
$PKGNAME
.git ..."
echo
"Remote clone from /srpms/
$INITLETTER
/
$PKGNAME
.git ..."
ssh
$GIRARHOST
clone /srpms/
$INITLETTER
/
$PKGNAME
.git packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
ssh
$GIRARHOST
clone /srpms/
$INITLETTER
/
$PKGNAME
.git packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
git clone git.alt:packages/
$PKGNAME
.git
git clone git.alt:packages/
$PKGNAME
.git
if
cd
$PKGNAME
;
then
if
cd
$PKGNAME
;
then
CURRENTBRANCH
=
$(
get_current_branch
)
CURRENTBRANCH
=
$(
get_current_branch
)
for
i
in
$(
git branch
-a
|
grep
"remotes/origin/.*[0-9]
\$
"
)
;
do
for
i
in
$(
git branch
-a
|
grep
-v
"/HEAD"
|
grep
"remotes/origin/
"
)
;
do
git checkout
-b
$(
echo
$i
|
sed
-e
"s|remotes.*/||g"
)
$i
git checkout
-b
$(
echo
$i
|
sed
-e
"s|remotes.*/||g"
)
$i
done
done
git checkout
$CURRENTBRANCH
git checkout
sisyphus
||
git checkout master
||
git checkout
$CURRENTBRANCH
cd
-
>
/dev/null
cd
-
>
/dev/null
fi
fi
echo
"See other repos at
$GIRARHOST
:"
echo
"See other repos at
$GIRARHOST
:"
...
...
bin/rpmgs
View file @
0bc9a52b
...
@@ -290,10 +290,11 @@ do
...
@@ -290,10 +290,11 @@ do
add_changelog_helper
"- new version (
$CURVER
)
$EGEARME
"
$i
||
echog
"Changelog entry for
$CURVER
-
$CURREL
already exists"
add_changelog_helper
"- new version (
$CURVER
)
$EGEARME
"
$i
||
echog
"Changelog entry for
$CURVER
-
$CURREL
already exists"
fi
fi
if
[
-n
"
$GSSETVERSION
"
]
&&
is_gear
;
then
if
[
-n
"
$GSSETVERSION
"
]
&&
is_gear
;
then
CURNAME
=
$(
get_tarballname
$i
)
CURNAME
=
$BASENAME
test
-d
"
$CURNAME
"
||
CURNAME
=
$(
get_tarballname
$i
)
echo
"Commit tarball
$RPMSOURCEDIR
/
$FTB
to git subdir '
$CURNAME
'..."
echo
"Commit tarball
$RPMSOURCEDIR
/
$FTB
to git subdir '
$CURNAME
'..."
gear-update
"
$RPMSOURCEDIR
/
$FTB
"
"
$CURNAME
"
gear-update
"
$RPMSOURCEDIR
/
$FTB
"
"
$CURNAME
"
&&
rm
-f
"
$RPMSOURCEDIR
/
$FTB
"
git commit
-m
"just import
$(
basename
$RPMSOURCEDIR
/
$FTB
)
"
git commit
-m
"just import
$(
basename
$RPMSOURCEDIR
/
$FTB
)
with rpmgs script
"
else
else
is_gear
&&
echo
"Run without version. Skip tarball commiting."
is_gear
&&
echo
"Run without version. Skip tarball commiting."
fi
fi
...
...
bin/rpmrb
View file @
0bc9a52b
...
@@ -40,10 +40,9 @@ test -e "$SPEC" || fatal "use with spec"
...
@@ -40,10 +40,9 @@ test -e "$SPEC" || fatal "use with spec"
$ETERBUILDBIN
/rpmgs
$SPEC
$VER
||
fatal
"Error with get source"
$ETERBUILDBIN
/rpmgs
$SPEC
$VER
||
fatal
"Error with get source"
add_changelog_helper
"- new version
$(
get_version
$SPEC
)
(with rpmrb script)"
$SPEC
||
echog
"Changelog entry already exists"
add_changelog_helper
"- new version
$(
get_version
$SPEC
)
(with rpmrb script)"
$SPEC
||
echog
"Changelog entry already exists"
# TODO
if
is_gear
`
pwd
`
;
then
if
is_gear
`
pwd
`
;
then
#git diff $SPEC
#git diff $SPEC
git
commit
$SPEC
-m
"update spec to new build
"
||
exit
1
git
_commit_ignore_nothing
$SPEC
-m
"update spec to new build
$(
get_version
$SPEC
)
(with rpmrb script)
"
||
exit
1
fi
fi
$ETERBUILDBIN
/rpmbsh
$REMOTE
-i
$SPEC
||
fatal
"Error with build in hasher"
$ETERBUILDBIN
/rpmbsh
$REMOTE
-i
$SPEC
||
fatal
"Error with build in hasher"
...
...
etersoft-build-utils.spec
View file @
0bc9a52b
Name: etersoft-build-utils
Name: etersoft-build-utils
Version: 1.7.
4
Version: 1.7.
5
Release: alt1
Release: alt1
Summary: A set of build rpm utilities
Summary: A set of build rpm utilities
...
@@ -64,6 +64,12 @@ RECOMMENDED packages: gcc-c++ perl-libwww ccache elinks mutt hasher curl
...
@@ -64,6 +64,12 @@ RECOMMENDED packages: gcc-c++ perl-libwww ccache elinks mutt hasher curl
%config(noreplace) %_sysconfdir/eterbuild/repos
%config(noreplace) %_sysconfdir/eterbuild/repos
%changelog
%changelog
* Fri Jan 22 2010 Vitaly Lipatov <lav@altlinux.ru> 1.7.5-alt1
- rpmbs/rpmbsh: add -l option for lazy-cleanup after build
- rpmgp: add -m option for migrate spec to gear support
- rpmgp: fix -b option (install buildreqs packages) to work in distro independent manner
- rpmgp: fix get remote branches and main branch selecting
* Thu Jan 14 2010 Vitaly Lipatov <lav@altlinux.ru> 1.7.4-alt1
* Thu Jan 14 2010 Vitaly Lipatov <lav@altlinux.ru> 1.7.4-alt1
- rpmbph: support for branches like 5.1 if exists, instead M51
- rpmbph: support for branches like 5.1 if exists, instead M51
- rpmgp: clone all branches locally
- rpmgp: clone all branches locally
...
...
share/eterbuild/functions/config
View file @
0bc9a52b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# Public domain
ETERBUILDVERSION
=
1
67
ETERBUILDVERSION
=
1
75
# SUDO
# SUDO
SUDO
=
"sudo"
SUDO
=
"sudo"
...
...
share/eterbuild/functions/git
View file @
0bc9a52b
...
@@ -62,3 +62,10 @@ list_git_package()
...
@@ -62,3 +62,10 @@ list_git_package()
{
{
_list_git_package
$(
ssh
$GIRARHOST
find-package
$1
)
_list_git_package
$(
ssh
$GIRARHOST
find-package
$1
)
}
}
git_commit_ignore_nothing
()
{
git commit
"
$@
"
&&
return
git commit
"
$@
"
2>&1 |
grep
"nothing to commit"
&&
return
0
return
1
}
share/eterbuild/functions/repl
View file @
0bc9a52b
...
@@ -41,7 +41,7 @@ tolocal_anyrepl()
...
@@ -41,7 +41,7 @@ tolocal_anyrepl()
clean_pkgreq
()
clean_pkgreq
()
{
{
local
i VAR
local
i VAR
VAR
=
`
cat
`
VAR
=
`
cat
|
sort
-u
`
for
i
in
$VAR
;
do
for
i
in
$VAR
;
do
echo
"
$i
"
| egrep
"gcc|cpp|gcc-c++"
>
/dev/null
&&
continue
echo
"
$i
"
| egrep
"gcc|cpp|gcc-c++"
>
/dev/null
&&
continue
echo
"
$i
"
|
grep
"[()<=>]"
>
/dev/null
&&
continue
echo
"
$i
"
|
grep
"[()<=>]"
>
/dev/null
&&
continue
...
...
share/eterbuild/functions/rpm
View file @
0bc9a52b
...
@@ -88,3 +88,31 @@ drop_pkg_extensions()
...
@@ -88,3 +88,31 @@ drop_pkg_extensions()
done
done
}
}
# distr_vendor [interactive]
get_install_package_command
()
{
local
DISTRVENDOR
=
$1
local
INAC
=
$2
local
CMD
local
RET
=
0
case
$DISTRVENDOR
in
"ALTLinux"
|
"Ubuntu"
|
"Debian"
|
"PCLinux"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"apt-get install"
||
CMD
=
"apt-get -y --force-yes install"
;;
"LinuxXP"
|
"Fedora"
|
"ASPLinux"
|
"CentOS"
|
"RHEL"
|
"Scientific"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"yum install"
||
CMD
=
"yum -y install"
;;
"Mandriva"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"urpmi --no-verify-rpm"
||
CMD
=
"urpmi --auto --no-verify-rpm"
;;
"SUSE"
)
[
-n
"
$INAC
"
]
&&
CMD
=
"zypper --non-interactive install"
||
CMD
=
"yes | zypper --non-interactive install"
;;
*
)
RET
=
1
CMD
=
"echo
\"
Do not known install command for DISTRVENDOR
$DISTRVENDOR
\"
"
;;
esac
echo
$CMD
return
$RET
}
tests/test_quote.sh
0 → 100755
View file @
0bc9a52b
#!/bin/sh
# see libshell
.
shell-quote
test1
()
{
echo
"run with
\'
$@
\'
"
echo
1 -
$1
echo
2 -
$2
echo
3 -
$3
test
"
$2
"
=
"test string"
||
echo
ERROR with
$2
}
func
()
{
#test1 "$(quote_shell "$@")"
cmd
=
"
$(
quote_shell
"
$@
"
)
"
test1
"
$cmd
"
test1
"
$@
"
test1
$@
}
func
-m
"test string"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment