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
7853a972
Commit
7853a972
authored
Jan 02, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix binary repo using (-b handling)
parent
d4060c66
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
20 deletions
+29
-20
myhsh
bin/myhsh
+2
-0
rpmbph
bin/rpmbph
+12
-14
rpmbps
bin/rpmbps
+4
-3
rpmbsh
bin/rpmbsh
+4
-0
alt
share/eterbuild/functions/alt
+6
-1
common
share/eterbuild/functions/common
+0
-2
config
share/eterbuild/functions/config
+1
-0
No files found.
bin/myhsh
View file @
7853a972
...
...
@@ -54,6 +54,8 @@ LISTRPMARGS=$@
parse_cmd_pre
"
$@
"
mygetopts
$LISTARGS
# see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo
$MENV
RESULT
=
0
...
...
bin/rpmbph
View file @
7853a972
...
...
@@ -39,17 +39,18 @@ phelp()
echog
" -q quiet"
echo
echog
"Examples:"
echog
"
$
rpmbph -b
p6 -n -u - backport to p6
and ask to build it"
echog
"
$
rpmbph -b
$EXAMPLEALTDISTRVERSION
-n -u - backport to
$EXAMPLEALTDISTRVERSION
and ask to build it"
# echog "Set ROOTDIR variable for backport to the other system"
# echog " -m - send result via e-mail"
}
# FIXME: has difference between
UPLOADARG
=
while
getopts
:hnvqb: opt
;
do
case
$opt
in
h
)
phelp
;
exit
0
;;
n
)
NOBUILD
=
1
;;
#
u) UPLOADARG="-$opt" ;;
u
)
UPLOADARG
=
"-
$opt
"
;;
v
)
VERBOSE
=
1
;;
b
)
BINARYREPONAME
=
$OPTARG
;;
q
)
QUIET
=
1
;;
...
...
@@ -64,7 +65,7 @@ if [ $# -gt 0 ]; then
fi
# pass other options to RPM (exclude -v):
LISTRPMARGS
=
$(
drop_args
"
$*
"
v
)
LISTRPMARGS
=
"
$UPLOADARG
$(
drop_args
"
$*
"
v n q
)
"
}
set_girar_host
$1
&&
shift
...
...
@@ -72,19 +73,16 @@ set_girar_host $1 && shift
parse_cmd_pre_spec
"
$@
"
mygetopts
$LISTARGS
# see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo
$MENV
test
-z
"
$LISTNAMES
"
&&
fatal
"file not found in '
$@
'"
if
[
"
$PKGVENDOR
"
=
"alt"
]
;
then
# FIXME: where we was detected MENV?
MDISTR
=
$MENV
if
[
-n
"
$BINARYREPONAME
"
]
;
then
MDISTR
=
$(
get_altdistr_mod
$BINARYREPONAME
)
else
BINARYREPONAME
=
$(
get_altdistr_version
$MDISTR
)
fi
[
"
$MDISTR
"
=
"SS"
]
&&
fatal
"It makes no sense to backport to Sisyphus (You need to try with -b
$EXAMPLEALTDISTRVERSION
)."
# override by defined target version
DISTRVERSION
=
$
(
get_altdistr_version
$MDISTR
)
DISTRVERSION
=
$
BINARYREPO
else
MDISTR
=
LOCAL
fi
...
...
@@ -104,7 +102,7 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
[
-f
"
$LISTNAMES
"
]
||
fatal
"Run with one spec inside gear repo"
# set branch name
USEBRANCH
=
$BINARYREPO
NAME
USEBRANCH
=
$BINARYREPO
SPEC
=
$LISTNAMES
BPSPEC
=
$SPEC
.
$USEBRANCH
...
...
@@ -138,7 +136,7 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
# Only one spec supported
cp
-f
$LISTNAMES
$BPSPEC
||
fatal
docmd
$ETERBUILDBIN
/rpmbps
-b
$BINARYREPO
NAME
$BPSPEC
||
fatal
docmd
$ETERBUILDBIN
/rpmbps
-b
$BINARYREPO
$BPSPEC
||
fatal
docmd git checkout
$USEBRANCH
||
fatal
"Can't checkout branch
$USEBRANCH
. Use
$BPSPEC
manually or remove it."
# TODO: check result message for merge?
...
...
@@ -155,7 +153,7 @@ if [ "$PKGVENDOR" = "alt" ] && is_gear $SPECDIR ; then
#git checkout $CURBRANCH
fatal
"Commit error. You are still in
$CURBRANCH
branch with modified and uncommitted spec file."
fi
docmd
$BUILDCOMMAND
$LISTRPMARGS
$UPLOADARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
docmd
$BUILDCOMMAND
$
MENVARG
$
LISTRPMARGS
$UPLOADARG
$SPEC
||
{
git checkout
$CURBRANCH
;
fatal
"Can't build"
;
}
docmd git checkout
$CURBRANCH
exit
$?
fi
...
...
@@ -179,7 +177,7 @@ for i in $LISTBUILT ; do
SPECNAME
=
$RPMTOPDIR
/SPECS/
$(
spec_by_srpm
$i
)
test
-f
"
$SPECNAME
"
||
fatal
"Spec
$SPECNAME
is not found"
docmd
$ETERBUILDBIN
/rpmbps
-b
$BINARYREPO
NAME
$SPECNAME
docmd
$ETERBUILDBIN
/rpmbps
-b
$BINARYREPO
$SPECNAME
docmd
$BUILDCOMMAND
$LISTRPMARGS
$UPLOADARG
$SPECNAME
||
fatal
"Can't build"
uni_rpmrm
$SPECNAME
||
true
...
...
bin/rpmbps
View file @
7853a972
...
...
@@ -32,7 +32,7 @@ phelp()
# echog " -q quiet"
echo
echog
"Examples:"
echog
"
$
rpmbps -b
p6 - backport spec to p6
form"
echog
"
$
rpmbps -b
$EXAMPLEALTDISTRVERSION
- backport spec to
$EXAMPLEALTDISTRVERSION
form"
}
# FIXME: has difference between
...
...
@@ -57,6 +57,8 @@ LISTRPMARGS=$(drop_args "$*" v)
parse_cmd_pre_spec
"
$@
"
mygetopts
$LISTARGS
# see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo
$MENV
# TODO
SPECNAME
=
"
$LISTNAMES
"
...
...
@@ -64,10 +66,9 @@ test -f "$SPECNAME" || fatal "file '$SPECNAME' is not found"
if
[
"
$PKGVENDOR
"
=
"alt"
]
;
then
MDISTR
=
$MENV
[
-n
"
$BINARYREPONAME
"
]
&&
MDISTR
=
$(
get_altdistr_mod
$BINARYREPONAME
)
[
"
$MDISTR
"
=
"SS"
]
&&
fatal
"It makes no sense to backport to Sisyphus (You need to try with -b
$EXAMPLEALTDISTRVERSION
)."
# override by defined target version
DISTRVERSION
=
$
(
get_altdistr_version
$MDISTR
)
DISTRVERSION
=
$
BINARYREPO
else
# then ROOTDIR is used?
MDISTR
=
LOCAL
...
...
bin/rpmbsh
View file @
7853a972
...
...
@@ -63,6 +63,8 @@ set_girar_host $1 && shift
parse_cmd_pre_spec
"
$@
"
mygetopts
$LISTARGS
# see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo
$MENV
[
-n
"
$LISTNAMES
"
]
||
fatal
"Run with exists specs as arg"
...
...
@@ -76,6 +78,8 @@ fi
# FIXME: не обрабатывает два пропускаемых вместе параметра
pack_src_rpm
$COMMIT
$(
drop_args
"
$LISTRPMARGS
"
s u i c l f a A
)
# TODO: use gear --hasher directly, drop myhsh
if
rhas
"
$LISTNAMES
"
spec
;
then
set_specdir
$LISTNAMES
fi
...
...
share/eterbuild/functions/alt
View file @
7853a972
...
...
@@ -65,10 +65,15 @@ set_binaryrepo()
BINARYREPO
=
"
$BINARYREPONAME
"
MENV
=
"
$(
get_altdistr_mod
$BINARYREPO
)
"
MENVARG
=
"-
$MENV
"
#
already was in parse_cmd_pre, but call in again for re
fill with updated $MENV
# fill with updated $MENV
detect_target_env
return
else
# parse MENV
detect_target_env
BINARYREPO
=
$(
get_altdistr_version
$MENV
)
fi
test
-z
"
$1
"
&&
return
BINARYREPO
=
"
`
get_altdistr_version
$1
`
"
...
...
share/eterbuild/functions/common
View file @
7853a972
...
...
@@ -429,8 +429,6 @@ do
done
LISTNAMES
=
$(
strip_spaces
"
$LISTNAMES
"
)
LISTARGS
=
$(
strip_spaces
"
$LISTARGS
"
)
# parse MENV
detect_target_env
[
-n
"
$VERBOSE
"
]
&&
echo
"LISTNAMES=
$LISTNAMES
LISTARGS=
$LISTARGS
"
||
:
}
...
...
share/eterbuild/functions/config
View file @
7853a972
...
...
@@ -56,6 +56,7 @@ EXAMPLEALTDISTRVERSION="p7"
CURRENTBRANCHNAME
=
"M70"
# Build for Sisyphus by default
# TODO: REMOVE IT
MENV
=
SS
[
-n
"
$DEBUG
"
]
&&
HASHERARG
=
"-v
$HASHERARG
"
...
...
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