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
6cf8f1da
Commit
6cf8f1da
authored
Jan 15, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.alt:packages/etersoft-build-utils
parents
2df405c5
041104c6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
52 deletions
+60
-52
loginhsh
bin/loginhsh
+3
-4
rpmbs
bin/rpmbs
+14
-13
rpmbsh
bin/rpmbsh
+1
-6
rpmgs
bin/rpmgs
+9
-7
rpmqf
bin/rpmqf
+25
-18
rpmrb
bin/rpmrb
+4
-2
common
share/eterbuild/functions/common
+1
-1
rpm
share/eterbuild/functions/rpm
+3
-1
No files found.
bin/loginhsh
View file @
6cf8f1da
...
...
@@ -87,7 +87,7 @@ if [ ! -d $HASHERDIR -o "$INITIALIZE" = "1" ]; then
mkdir
-p
$HASHERDIR
&&
$HSH
--initroot-only
$HASHERDIR
||
fatal
"mkdir"
fi
HASHERARG
=
"
$HASHERARG
--mountpoints=/proc"
SHELLHASHERARG
=
"
--mountpoints=/proc"
check_locking
...
...
@@ -100,13 +100,12 @@ if [ -n "$TESTMODE" ] ; then
else
UTILPKG
=
"
$UTILPKG
etersoft-build-utils"
fi
$HSH
-install
$HASHERDIR
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
$HSH
-install
$HASHERDIR
--wait-lock
$UTILPKG
$LISTRPMARGS
$LISTNAMES
||
fatal
"Error with install"
echog
"You are in hasher shell"
$HSH
-shell
$HASHERDIR
-Y
--shell
$HSH
-shell
$HASHERDIR
$SHELLHASHERARG
-Y
--shell
if
[
-n
"
$TESTMODE
"
]
;
then
echo
"Remove package for test preun scripts"
$HSH
-run
--rooter
$HASHERDIR
--
rpm
-e
$(
drop_pkg_extensions
$LISTNAMES
)
echo
"Cleanup hasher..."
$HSH
--cleanup-only
$HASHERDIR
fi
# $HASHERARG
bin/rpmbs
View file @
6cf8f1da
...
...
@@ -151,39 +151,40 @@ if [ -n "${DELETENOW}" ]; then
exit
0
fi
check_gear
()
# create tag according to package release
check_gear_and_tag
()
{
local
SPECDIR
=
$1
local
GEARCTAG
=
gear-create-tag
# create tag according to package release
# workaround about spaces in LISTNAMES
if
[
-r
"
$(
echo
$LISTNAMES
)
"
]
;
then
#echo wait SPECDIR from rpmbsh
#echo 1 $SPECDIR
# set SPECDIR from LISTNAMES if empty
if
[
-r
"
$LISTNAMES
"
]
;
then
[
-n
"
$SPECDIR
"
]
||
SPECDIR
=
`
dirname
$LISTNAMES
`
#echo 2 $SPECDIR
#pwd
fi
if
is_gear
$SPECDIR
;
then
# needed corrent user.name/user.email for get GPG id
pushd
$SPECDIR
$GEARCTAG
--force
popd
popd
>
/dev/null
# git push ?
fi
}
if
[
-n
"
$SIGN
"
]
;
then
release_check
$LISTBUILT
# workaround about spaces in LISTBUILT
if
[
-r
"
$(
echo
$LISTBUILT
)
"
]
;
then
cd
$RPMDIR
/SRPMS
if
[
-r
"
$LISTBUILT
"
]
;
then
echo
if
one spec, check gear
check_gear
check_gear
_and_tag
$SPECDIR
fi
echog
"Will try to sign follow packages with GPG:
\$
LISTBUILT"
cd
$RPMDIR
/SRPMS
# 1. only rpm command has --addsign 2. do 3 retries
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
RET
=
$?
############################################
echog
"Changing permissions..."
chmod
644
--
$LISTBUILT
||
fatal
"can't chmod"
...
...
bin/rpmbsh
View file @
6cf8f1da
...
...
@@ -73,13 +73,8 @@ add_changelog_helper "- new version" $LISTNAMES
pack_src_rpm
$(
echo
$LISTRPMARGS
|
sed
-e
"s|-[suUic]||g"
)
# Hack to pass SPECDIR to rpmbs
# workaround about spaces in LISTNAMES
if
[
-r
"
$(
echo
$LISTNAMES
)
"
]
;
then
if
[
-r
"
$LISTNAMES
"
]
;
then
export
SPECDIR
=
`
dirname
$LISTNAMES
`
#echo 0 $SPECDIR
if
[
"
$SPECDIR
"
=
"."
]
;
then
SPECDIR
=
$(
pwd
)
fi
fi
if
[
-n
"
$REMOTEBUILD
"
]
;
then
...
...
bin/rpmgs
View file @
6cf8f1da
...
...
@@ -173,23 +173,25 @@ function print_error()
parse_cmd_pre
"
$@
"
mygetopts
$LISTARGS
test
-z
"
$VERBOSE
"
||
echo
"'
$LISTNAMES
' @ '
$LISTARGS
'"
test
-z
"
$VERBOSE
"
||
echo
"'
$LISTNAMES
' @ '
$LIST
RPM
ARGS
'"
if
[
-n
"
$LISTARGS
"
]
;
then
if
[
-z
"
${
LISTARGS
/*spec/
}
"
]
;
then
fatal
"run with incorrect filename
$LISTARGS
"
if
[
-n
"
$LIST
RPM
ARGS
"
]
;
then
if
[
-z
"
${
LIST
RPM
ARGS
/*spec/
}
"
]
;
then
fatal
"run with incorrect filename
$LIST
RPM
ARGS
"
fi
if
[
!
-f
"
$LISTNAMES
"
]
;
then
fatal
"set version permitted only for one file"
fi
if
[
"
${
LIST
ARGS
/ /
}
"
!=
"
$LIST
ARGS
"
]
;
then
if
[
"
${
LIST
RPMARGS
/ /
}
"
!=
"
$LISTRPM
ARGS
"
]
;
then
fatal
"you run rpmgs with more than one version"
fi
GSSETVERSION
=
$LISTARGS
GSSETVERSION
=
$LIST
RPM
ARGS
fi
test
-z
"
$LISTNAMES
"
&&
print_error
[
-z
"
$GSSETRELEASE
"
]
||
GSSKIPADDCHANGELOG
=
1
for
i
in
$LISTNAMES
do
if
[
-n
"
${
i
/*spec/
}
"
]
;
then
...
...
@@ -201,7 +203,7 @@ do
CURVER
=
$(
get_version
$i
)
set_version
$i
$GSSETVERSION
if
[
"
$CURVER
"
!=
"
$GSSETVERSION
"
]
;
then
[
-n
"
$GSSETRELEASE
"
]
&&
GSSKIPADDCHANGELOG
=
1
||
GSSETRELEASE
=
alt1
[
-n
"
$GSSETRELEASE
"
]
||
GSSETRELEASE
=
alt1
set_release
$i
$GSSETRELEASE
echo
"Set new
$GSSETVERSION
-
$GSSETRELEASE
version for
$i
"
else
...
...
bin/rpmqf
View file @
6cf8f1da
#!/bin/sh
# 2003-2006 (c) Etersoft www.etersoft.ru
# 2003-2006
, 2009
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -18,24 +18,31 @@ if [ "$1" = "-i" ]; then
shift
fi
TOFILE
=
`
which
$1
2>/dev/null
`
if
[
-z
"
$TOFILE
"
]
;
then
#echo "$1 is missed in PATH"
#exit 1
TOFILE
=
$1
fi
if
[
-L
"
$TOFILE
"
]
;
then
LINKTO
=
`
readlink
"
$TOFILE
"
`
if
[
-L
"
$LINKTO
"
]
;
then
LINKTO1
=
`
readlink
"
$LINKTO
"
`
echo
"Note:
$TOFILE
is link to
$LINKTO
, that is link to
$LINKTO1
"
TOFILE
=
"
$LINKTO1
"
# use and modify TOFILE recursively
real_file
()
{
local
LINKTO1 LINKTO
local
TOFILE
# get canonical path
if
[
-e
"
$1
"
]
;
then
TOFILE
=
$1
else
TOFILE
=
`
which
$1
2>/dev/null
||
echo
$1
`
if
[
"
$TOFILE
"
!=
"
$1
"
]
;
then
echo
"Note:
$1
is placed as
$TOFILE
"
fi
fi
# get value of symbolic link
if
[
-L
"
$TOFILE
"
]
;
then
LINKTO
=
`
readlink
"
$TOFILE
"
`
echo
"Note:
$TOFILE
is link to
$LINKTO
"
TOFILE
=
"
$LINKTO
"
real_file
"
$LINKTO
"
fi
fi
FULLFILEPATH
=
`
readlink
-f
$TOFILE
`
}
real_file
"
$1
"
rpm
-qf
$ARG
"
$
TOFILE
"
rpm
-qf
$ARG
"
$
FULLFILEPATH
"
bin/rpmrb
View file @
6cf8f1da
...
...
@@ -10,6 +10,7 @@
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec
REMOTE
=
if
[
"
$1
"
=
"-r"
]
;
then
...
...
@@ -21,6 +22,8 @@ SPEC=$1
VER
=
$2
# need for rpmgs
GSSETRELEASE
=
$3
test
-n
"
$GSSETRELEASE
"
||
GSSETRELEASE
=
alt1
export
GSSETRELEASE
if
[
"
$1
"
=
"-h"
]
;
then
echo
"rpmrb spec [vermajor][.verminor] [rel] - update spec to vermajor.verminor version, build %rel release"
...
...
@@ -29,9 +32,8 @@ fi
test
-e
"
$SPEC
"
||
fatal
"use with spec"
test
-n
"
$REL
"
||
REL
=
alt1
rpmgs
$SPEC
$VER
||
fatal
"Error with get source"
add_changelog_helper
"- new version
$
VER
(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"
rpmbsh
$REMOTE
-i
$SPEC
||
fatal
"Error with build in hasher"
rpmbs
-u
$SPEC
||
fatal
"Error with upload"
share/eterbuild/functions/common
View file @
6cf8f1da
...
...
@@ -134,7 +134,7 @@ for i in "$@"
do
# , , .
if
[
-f
"
$i
"
]
;
then
LISTNAMES
=
"
$LISTNAMES
$
i
"
LISTNAMES
=
"
$LISTNAMES
$
(
readlink
-f
$i
)
"
else
set_target_type
${
i
/-/
}
||
LISTARGS
=
"
$LISTARGS
$i
"
fi
...
...
share/eterbuild/functions/rpm
View file @
6cf8f1da
...
...
@@ -145,11 +145,13 @@ do
fi
fi
if
[
-f
$RPMDIR
/SRPMS/
$NAMESRPMIN
]
;
then
LISTBUILT
=
"
$LISTBUILT
$NAMESRPMIN
"
LISTBUILT
=
"
$LISTBUILT
$NAMESRPMIN
"
else
fatal
"Can't find '
$NAMESRPMIN
' in '
$RPMDIR
/SRPMS'"
fi
done
# remove extra space before list
LISTBUILT
=
$(
echo
"
$LISTBUILT
"
|
sed
-e
"s|^ ||"
)
test
-z
"
$LISTBUILT
"
&&
fatal
"Error: List for build is empty. Check if file is exist."
#LISTRPMARGS=`echo ${LISTRPMARGS} | sed -e "s/--nodeps//g"`
}
...
...
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