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
9c68689b
Commit
9c68689b
authored
Aug 04, 2011
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move build srpm, check log in separate modules
parent
dc22a254
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
161 additions
and
96 deletions
+161
-96
myhsh
bin/myhsh
+1
-1
rpmbb
bin/rpmbb
+1
-1
rpmbph
bin/rpmbph
+1
-1
rpmbs
bin/rpmbs
+1
-1
rpmbsh
bin/rpmbsh
+1
-1
rpmgp
bin/rpmgp
+1
-1
rpmgs
bin/rpmgs
+1
-1
build
share/eterbuild/functions/build
+0
-89
buildsrpm
share/eterbuild/functions/buildsrpm
+120
-0
check
share/eterbuild/functions/check
+34
-0
No files found.
bin/myhsh
View file @
9c68689b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,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 hasher
load_mod hasher
check
WITHSTUFF
=
"--with-stuff"
WITHSTUFF
=
"--with-stuff"
...
...
bin/rpmbb
View file @
9c68689b
...
@@ -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
load_mod rpm
check
# Start as helper
# Start as helper
if
[
"
$1
"
=
"--helper"
]
;
then
if
[
"
$1
"
=
"--helper"
]
;
then
...
...
bin/rpmbph
View file @
9c68689b
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,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 repl rpm git
load_mod repl rpm git
buildsrpm
DISTRVERSION
=
`
$DISTRVENDOR
-v
`
DISTRVERSION
=
`
$DISTRVENDOR
-v
`
...
...
bin/rpmbs
View file @
9c68689b
...
@@ -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 git web
load_mod rpm tarball alt git web
buildsrpm
SIGN
=
SIGN
=
SIGNTAG
=
SIGNTAG
=
...
...
bin/rpmbsh
View file @
9c68689b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,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 git
load_mod rpm git
buildsrpm
RESULT
=
0
RESULT
=
0
REMCOM
=
REMCOM
=
...
...
bin/rpmgp
View file @
9c68689b
...
@@ -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 rpm repl git rpm web repos
load_mod rpm repl git rpm web repos
buildsrpm
# loads repos file and fill SYSNAME and SYSURL arrays
# loads repos file and fill SYSNAME and SYSURL arrays
load_systems_list
()
load_systems_list
()
...
...
bin/rpmgs
View file @
9c68689b
...
@@ -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 tarball web
load_mod rpm tarball web
buildsrpm
WEXT
=
""
WEXT
=
""
GETSOURCE
=
""
GETSOURCE
=
""
...
...
share/eterbuild/functions/build
View file @
9c68689b
...
@@ -135,92 +135,3 @@ uni_rpmrm()
...
@@ -135,92 +135,3 @@ uni_rpmrm()
$RPMBUILD
"
$TWOPARAM
"
--rmsource
--rmspec
--nodeps
$@
$RPMBUILD
"
$TWOPARAM
"
--rmsource
--rmspec
--nodeps
$@
}
}
# LISTNAMES, options in arg
# build LISTBUILT list with src.rpm full path
pack_src_rpm
()
{
local
i COMMIT
if
[
"
$1
"
=
"--commit"
]
;
then
shift
COMMIT
=
"--commit"
fi
ARGS
=
$@
[
-n
"
$VERBOSE
"
]
&&
echo
"LISTNAMES=
$LISTNAMES
ARGS=
$ARGS
"
||
:
ARGS
=
"
$ARGS
--nodeps"
for
i
in
$LISTNAMES
do
if
[
-z
${
i
/*rpm/
}
]
;
then
# if rpm not spec, guess it is src.rpm
#NAMESRPMIN=$(basename $i)
if
[
-f
"
$i
"
]
;
then
LISTBUILT
=
"
$LISTBUILT
$(
realpath
$i
)
"
build_rpms_name_by_srpm
"
$i
"
$ARGS
else
fatal
"pack_src_rpm: Can't find '
$i
'"
fi
else
# Получаем названия пакетов по спеку
# BASENAME, RELEASE, VERSION, NAMESRPMIN, NAMERPMIN
build_rpms_name
"
$i
"
$ARGS
if
[
-n
"
${
SIGN
}
"
]
;
then
echog
"Try to packing
\$
NAMESRPMIN package for sign"
add_changelog
$i
if
[
$?
=
"0"
]
;
then
echog
"Spec file
\$
i had not ChangeLog entry. It have added now, check it and enter your command again."
echog
"Wait for ten seconds."
sleep
10
exit
1
fi
uni_rpmbuild
$COMMIT
$i
-bs
$ARGS
$NODEPS
--target
$SYSARCH
else
echog
"Just packing
\$
NAMESRPMIN"
uni_rpmbuild
$COMMIT
$i
-bs
$ARGS
$NODEPS
--target
$SYSARCH
||
fatal
"Error with rpmbuild"
fi
# Check the package really built
if
[
-f
"
$RPMTOPDIR
/SRPMS/
$NAMESRPMIN
"
]
;
then
LISTBUILT
=
"
$LISTBUILT
$RPMTOPDIR
/SRPMS/
$NAMESRPMIN
"
else
fatal
"Can't find '
$NAMESRPMIN
' in '
$RPMTOPDIR
/SRPMS'"
fi
fi
done
LISTBUILT
=
$(
strip_spaces
"
$LISTBUILT
"
)
test
-z
"
$LISTBUILT
"
&&
fatal
"Error: List for build is empty. Check if file is exist."
#LISTRPMARGS=`echo ${LISTRPMARGS} | sed -e "s/--nodeps//g"`
}
check_log
()
{
local
LOGFILE i RES
echo
echo
"-------------------------------------------------------"
echog
"Check log for..."
LOGFILE
=
$1
if
grep
-q
'ld: warning: libstdc++\.so\.5, needed by [^ ]\+, may conflict with libstdc++\.so\.6'
$LOGFILE
;
then
echog
"Error found: libstdc++.so.5/6 conflicts. Check the log."
return
1
fi
if
grep
-q
'will always overflow destination buffer'
$LOGFILE
;
then
echog
"Error found: will always overflow destination buffer. Check the log."
return
1
fi
grep
'python-strict'
$LOGFILE
&&
warning
"python-strict used!!!"
NC1
=
"command not found"
NC2
=
"-march=athlon -mtune=athlon-xp"
#for i in ${NC1} ; do
grep
--
'$NC1'
$LOGFILE
&&
warning
"'
$NC1
' in build output (some errors in a scripts)"
grep
--
'$NC2'
$LOGFILE
&&
warning
"'
$NC2
' in build output (forbidden) "
#done
return
0
}
share/eterbuild/functions/buildsrpm
0 → 100644
View file @
9c68689b
#!/bin/bash
# 2008, 2011 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# 1st: spec name(s) (only one if git, we will skip it)
# other parameters
uni_rpmbuildsrpm
()
{
local
RET
=
0
local
COMMIT
=
""
local
COMMANDAFTER
=
""
if
[
"
$1
"
=
"--commit"
]
;
then
shift
COMMIT
=
"--commit"
COMMANDAFTER
=
"git reset"
fi
local
SPECNAME
=
"
$1
"
local
SPECDIR
=
`
dirname
$SPECNAME
`
local
GEAR
=
gear
local
ONEPARAM
=
"--quiet"
[
-n
"
$USE_LEGACY_COMPRESSION
"
]
&&
ONEPARAM
=
"--define=_source_payload w9.gzdio"
local
TWOPARAM
=
"--quiet"
[
-n
"
$RPMTOPDIR
"
]
&&
TWOPARAM
=
"--define=_topdir
$RPMTOPDIR
"
local
THRPARAM
=
"--quiet"
[
-n
"
$USE_VENDOR
"
]
&&
THRPARAM
=
"--define=_vendor
$USE_VENDOR
"
if
is_gear
$SPECDIR
;
then
[
-f
"
$SPECNAME
"
]
||
fatal
"run uni_rpmbuild with spec as 2nd parameter"
shift
# skip spec name
# FIXME: use spec name as project name
GEARRULES
=
$(
get_gear_rules
"
$SPECNAME
"
)
# build package without MENV checking
if
true
||
[
"
$MENV
"
=
"SS"
]
;
then
showcmd
$GEAR
$COMMIT
$GEARRULES
--rpmbuild
--
$RPMBUILD
"
$ONEPARAM
"
"
$TWOPARAM
"
"
$THRPARAM
"
$@
$NICE
$GEAR
$COMMIT
$GEARRULES
--rpmbuild
--
$RPMBUILD
"
$ONEPARAM
"
"
$TWOPARAM
"
"
$THRPARAM
"
$@
||
RET
=
$?
[
-z
"
$COMMANDAFTER
"
]
||
docmd
$COMMANDAFTER
else
fatal
"Build backported src.rpm from git is unsupported now"
# build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
#docmd $NICE $GEAR --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@ || RET=$?
fi
else
mkdir
-p
$RPMTOPDIR
/BUILD
$RPMTOPDIR
/SRPMS
showcmd
$RPMBUILD
"
$ONEPARAM
"
"
$TWOPARAM
"
"
$THRPARAM
"
$@
$NICE
$RPMBUILD
"
$ONEPARAM
"
"
$TWOPARAM
"
"
$THRPARAM
"
$@
||
RET
=
$?
fi
return
$RET
}
# LISTNAMES, options in arg
# build LISTBUILT list with src.rpm full path
pack_src_rpm
()
{
local
i COMMIT
if
[
"
$1
"
=
"--commit"
]
;
then
shift
COMMIT
=
"--commit"
fi
ARGS
=
$@
[
-n
"
$VERBOSE
"
]
&&
echo
"LISTNAMES=
$LISTNAMES
ARGS=
$ARGS
"
||
:
ARGS
=
"
$ARGS
--nodeps"
for
i
in
$LISTNAMES
do
if
[
-z
${
i
/*rpm/
}
]
;
then
# if rpm not spec, guess it is src.rpm
#NAMESRPMIN=$(basename $i)
if
[
-f
"
$i
"
]
;
then
LISTBUILT
=
"
$LISTBUILT
$(
realpath
$i
)
"
build_rpms_name_by_srpm
"
$i
"
$ARGS
else
fatal
"pack_src_rpm: Can't find '
$i
'"
fi
else
# Получаем названия пакетов по спеку
# BASENAME, RELEASE, VERSION, NAMESRPMIN, NAMERPMIN
build_rpms_name
"
$i
"
$ARGS
if
[
-n
"
${
SIGN
}
"
]
;
then
echog
"Try to packing
\$
NAMESRPMIN package for sign"
add_changelog
$i
if
[
$?
=
"0"
]
;
then
echog
"Spec file
\$
i had not ChangeLog entry. It have added now, check it and enter your command again."
echog
"Wait for ten seconds."
sleep
10
exit
1
fi
else
echog
"Just packing
\$
NAMESRPMIN"
fi
uni_rpmbuildsrpm
$COMMIT
$i
-bs
$ARGS
$NODEPS
--target
$SYSARCH
||
fatal
"Error with rpmbuild"
# Check the package really built
if
[
-f
"
$RPMTOPDIR
/SRPMS/
$NAMESRPMIN
"
]
;
then
LISTBUILT
=
"
$LISTBUILT
$RPMTOPDIR
/SRPMS/
$NAMESRPMIN
"
else
fatal
"Can't find '
$NAMESRPMIN
' in '
$RPMTOPDIR
/SRPMS'"
fi
fi
done
LISTBUILT
=
$(
strip_spaces
"
$LISTBUILT
"
)
test
-z
"
$LISTBUILT
"
&&
fatal
"Error: List for build is empty. Check if file is exist."
}
share/eterbuild/functions/check
0 → 100644
View file @
9c68689b
#!/bin/bash
# 2008, 2011 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
check_log
()
{
local
LOGFILE i RES
echo
echo
"-------------------------------------------------------"
echog
"Check log for..."
LOGFILE
=
$1
if
grep
-q
'ld: warning: libstdc++\.so\.5, needed by [^ ]\+, may conflict with libstdc++\.so\.6'
$LOGFILE
;
then
echog
"Error found: libstdc++.so.5/6 conflicts. Check the log."
return
1
fi
if
grep
-q
'will always overflow destination buffer'
$LOGFILE
;
then
echog
"Error found: will always overflow destination buffer. Check the log."
return
1
fi
grep
'python-strict'
$LOGFILE
&&
warning
"python-strict used!!!"
NC1
=
"command not found"
NC2
=
"-march=athlon -mtune=athlon-xp"
#for i in ${NC1} ; do
grep
--
'$NC1'
$LOGFILE
&&
warning
"'
$NC1
' in build output (some errors in a scripts)"
grep
--
'$NC2'
$LOGFILE
&&
warning
"'
$NC2
' in build output (forbidden) "
#done
return
0
}
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