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
6a9b8686
Commit
6a9b8686
authored
Sep 22, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs code refactoring
parent
4b72ea04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
89 deletions
+90
-89
rpmbs
bin/rpmbs
+89
-88
rpmgs
bin/rpmgs
+1
-1
No files found.
bin/rpmbs
View file @
6a9b8686
...
@@ -232,102 +232,103 @@ if [ -n "${DELETENOW}" ]; then
...
@@ -232,102 +232,103 @@ if [ -n "${DELETENOW}" ]; then
exit
0
exit
0
fi
fi
test
-z
"
$ETERDESTSRPM
"
&&
ETERDESTSRPM
=
$UPLOADDIR
${
MENVARG
/-/.
}
# if just packing
if
[
-z
"
$SIGN
"
]
;
then
rpmbs_copying_built
exit
$?
fi
# Sign src.rpm and upload it
# Sign src.rpm and upload it
if
[
-n
"
$SIGN
"
]
;
then
release_check
$LISTBUILT
release_check
$LISTBUILT
if
[
-r
"
$LISTBUILT
"
]
;
then
if
[
-r
"
$LISTBUILT
"
]
;
then
check_gear_and_tag
check_gear_and_tag
fi
fi
echog
"Will try to sign follow packages with GPG:
\$
LISTBUILT"
echog
"Will try to sign follow packages with GPG:
\$
LISTBUILT"
# 1. only rpm command has --addsign 2. do 3 retries
# 1. only rpm command has --addsign 2. do 3 retries
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
||
rpm
--addsign
$LISTBUILT
RET
=
$?
RET
=
$?
if
[
!
"
$RET
"
=
"0"
]
;
then
############################################
echog
"Impossible to sign package. Check your password and try again."
echog
"Changing permissions..."
echog
"Wait for ten seconds."
chmod
644
--
$LISTBUILT
||
fatal
"can't chmod"
sleep
10
echog
-n
"Checking with sisyphus_check..."
exit
1
test
-n
"
$NOCHECK
"
||
sisyphus_check
--files
$LISTBUILT
||
fatal
"sisyphus check failed"
fi
echog
"OK"
# rpm's find-req do not find rpmlint :)
RPMLINT
=
rpmlint
if
which
$RPMLINT
>
/dev/null
;
then
echog
-n
"Checking with rpmlint..."
echo
$RPMLINT
$LISTBUILT
else
echog
"It is recommended to install rpmlint package for additional checking"
fi
test
-n
"
$CHECKONLY
"
&&
exit
0
############################################
if
[
"
$RET
"
=
"0"
]
then
if
[
-n
"
${
UPLOADNOW
}
"
]
;
then
echog
"Uploading to
$GIRARHOST
"
check_key
# TODO: rsync foo.src.rpm git.alt: && ssh git.alt build srpm foo.src.rpm
# git.alt build -b 4.0 srpm foo.src.rpm
rsync
-vay
--partial
--progress
$CHECKSUM
\
-e
ssh
$LISTBUILT
$GIRARHOST
:
&&
\
echo
"---------------------"
&&
\
echog
"All files synced"
||
fatal
"Error during rsync"
TASKLIST
=
""
for
i
in
$LISTBUILT
;
do
TASKLIST
=
"
$TASKLIST
srpm
$(
basename
$i
)
"
done
if
[
-n
"
$TASKNUMBER
"
]
;
then
echo
"Add
$TASKLIST
to task
$TASKNUMBER
"
[
-n
"
$VERBOSE
"
]
&&
echo
"...with command ssh
$GIRARHOST
task add
$TASKNUMBER
$TASKLIST
"
ssh
$GIRARHOST
task add
$TASKNUMBER
$TASKLIST
else
echo
"Create task for
$TASKLIST
"
[
-n
"
$VERBOSE
"
]
&&
echo
"...with command ssh
$GIRARHOST
build -b
$BINARYREPO
$TASKLIST
"
ssh
$GIRARHOST
build
-b
$BINARYREPO
$TASKLIST
fi
for
i
in
$LISTBUILT
;
do
############################################
LOGFILE
=
"
$LOGDIR
/
`
basename
$i
.src.rpm
`
$MENVARG
.log"
echog
"Changing permissions..."
echo
>>
$LOGFILE
chmod
644
--
$LISTBUILT
||
fatal
"can't chmod"
date
>>
$LOGFILE
echog
-n
"Checking with sisyphus_check..."
echo
"uploaded"
>>
$LOGFILE
test
-n
"
$NOCHECK
"
||
sisyphus_check
--files
$LISTBUILT
||
fatal
"sisyphus check failed"
echo
"
$(
basename
$i
)
run build src.rpm at
$GIRARHOST
(
$MENV
) at
`
date
"+%c"
`
"
>>
$RPMDIR
/uploaded.log
echog
"OK"
done
# rpm's find-req do not find rpmlint :)
RPMLINT
=
rpmlint
if
which
$RPMLINT
>
/dev/null
;
then
echog
-n
"Checking with rpmlint..."
echo
$RPMLINT
$LISTBUILT
else
echog
"It is recommended to install rpmlint package for additional checking"
fi
else
test
-n
"
$CHECKONLY
"
&&
exit
0
test
-z
"
$ETERDESTSRPM
"
&&
ETERDESTSRPM
=
$UPLOADDIR
${
MENVARG
/-/.
}
############################################
rpmbs_copying_built
fi
echog
"Removing buildroot after upload..."
# If upload signed package is not needed
for
i
in
$LISTNAMES
;
do
if
[
-z
"
${
UPLOADNOW
}
"
]
;
then
if
[
-z
${
i
/*.src.rpm/
}
]
;
then
rpmbs_copying_built
echo
" skipping for
$i
"
exit
$?
continue
fi
fi
#DDIR=$BUILDROOT/${i/.spec/-buildroot}
# Hack about paths
test
-f
"
$i
"
&&
NAME
=
$i
||
NAME
=
$CURDIR
/
$i
build_rpms_name
$NAME
echo
-n
"
$BUILDROOT
"
if
[
-d
"
$BUILDROOT
"
]
;
then
rm
-rf
"
$BUILDROOT
"
&&
echog
"DONE"
||
echog
"failed"
else
echog
"missed"
fi
done
echog
"Uploading to
$GIRARHOST
"
check_key
# TODO: rsync foo.src.rpm git.alt: && ssh git.alt build srpm foo.src.rpm
# git.alt build -b 4.0 srpm foo.src.rpm
rsync
-vay
--partial
--progress
$CHECKSUM
\
-e
ssh
$LISTBUILT
$GIRARHOST
:
&&
\
echo
"---------------------"
&&
\
echog
"All files synced"
||
fatal
"Error during rsync"
TASKLIST
=
""
for
i
in
$LISTBUILT
;
do
TASKLIST
=
"
$TASKLIST
srpm
$(
basename
$i
)
"
done
if
[
-n
"
$TASKNUMBER
"
]
;
then
echo
"Add
$TASKLIST
to task
$TASKNUMBER
"
[
-n
"
$VERBOSE
"
]
&&
echo
"...with command ssh
$GIRARHOST
task add
$TASKNUMBER
$TASKLIST
"
ssh
$GIRARHOST
task add
$TASKNUMBER
$TASKLIST
else
echo
"Create task for
$TASKLIST
"
[
-n
"
$VERBOSE
"
]
&&
echo
"...with command ssh
$GIRARHOST
build -b
$BINARYREPO
$TASKLIST
"
ssh
$GIRARHOST
build
-b
$BINARYREPO
$TASKLIST
fi
for
i
in
$LISTBUILT
;
do
LOGFILE
=
"
$LOGDIR
/
`
basename
$i
.src.rpm
`
$MENVARG
.log"
echo
>>
$LOGFILE
date
>>
$LOGFILE
echo
"uploaded"
>>
$LOGFILE
echo
"
$(
basename
$i
)
run build src.rpm at
$GIRARHOST
(
$MENV
) at
`
date
"+%c"
`
"
>>
$RPMDIR
/uploaded.log
done
echog
"Removing buildroot after upload..."
for
i
in
$LISTNAMES
;
do
if
[
-z
${
i
/*.src.rpm/
}
]
;
then
echo
" skipping for
$i
"
continue
fi
#DDIR=$BUILDROOT/${i/.spec/-buildroot}
# Hack about paths
test
-f
"
$i
"
&&
NAME
=
$i
||
NAME
=
$CURDIR
/
$i
build_rpms_name
$NAME
echo
-n
"
$BUILDROOT
"
if
[
-d
"
$BUILDROOT
"
]
;
then
rm
-rf
"
$BUILDROOT
"
&&
echog
"DONE"
||
echog
"failed"
else
else
echog
"Impossible to sign package. Check your password and try again."
echog
"missed"
echog
"Wait for ten seconds."
sleep
10
exit
1
fi
fi
else
done
rpmbs_copying_built
fi
bin/rpmgs
View file @
6a9b8686
...
@@ -82,7 +82,7 @@ get_archive1()
...
@@ -82,7 +82,7 @@ get_archive1()
echog
-n
"Converting to
$WEXT
.bz2..."
echog
-n
"Converting to
$WEXT
.bz2..."
}
}
TODO: use functions from tarball
#
TODO: use functions from tarball
get_tarbz2
()
get_tarbz2
()
{
{
get_archive tar.bz2
get_archive tar.bz2
...
...
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