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
1
Merge Requests
1
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
e59a65df
You need to sign in or sign up before continuing.
Commit
e59a65df
authored
Mar 06, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop RSYNCSISYPHUS var, rewrite -c handling, add support for any branch
parent
bcbf3020
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
37 deletions
+27
-37
rpmgp
bin/rpmgp
+27
-34
config
etc/config
+0
-3
No files found.
bin/rpmgp
View file @
e59a65df
...
@@ -10,10 +10,7 @@
...
@@ -10,10 +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
load_mod rpm repl git rpm web repos
# path to ALT Linux's repositories
REPOSITORY
=
"files/SRPMS obsolete orphaned"
# loads repos file and fill SYSNAME and SYSURL arrays
# loads repos file and fill SYSNAME and SYSURL arrays
load_systems_list
()
load_systems_list
()
...
@@ -264,7 +261,7 @@ if [ -n "$CLONEGIT" ] ; then
...
@@ -264,7 +261,7 @@ if [ -n "$CLONEGIT" ] ; then
ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
fi
fi
git clone
git.alt
:packages/
$PKGNAME
.git
git clone
$GIRARHOST
:packages/
$PKGNAME
.git
if
cd
$PKGNAME
;
then
if
cd
$PKGNAME
;
then
CURRENTBRANCH
=
$(
get_current_branch
)
CURRENTBRANCH
=
$(
get_current_branch
)
# create all branches
# create all branches
...
@@ -294,7 +291,8 @@ if [ -n "$CHECKONLINE" ] ; then
...
@@ -294,7 +291,8 @@ if [ -n "$CHECKONLINE" ] ; then
SRCRPM
=
$NAMESRPMIN
SRCRPM
=
$NAMESRPMIN
PKGNAME
=
$(
get_pkgname_from_filename
$SRCRPM
)
PKGNAME
=
$(
get_pkgname_from_filename
$SRCRPM
)
else
else
if
echo
$PKGNAME
|
grep
-q
rpm
;
then
if
echo
$PKGNAME
|
grep
-q
"
\.
rpm"
;
then
# possible it is rpm package name
SRCRPM
=
$PKGNAME
SRCRPM
=
$PKGNAME
PKGNAME
=
$(
get_pkgname_from_filename
$SRCRPM
)
PKGNAME
=
$(
get_pkgname_from_filename
$SRCRPM
)
else
else
...
@@ -310,24 +308,35 @@ if [ -n "$CHECKONLINE" ] ; then
...
@@ -310,24 +308,35 @@ if [ -n "$CHECKONLINE" ] ; then
echog
"There is no git repo
$GITURL
"
echog
"There is no git repo
$GITURL
"
fi
fi
fi
fi
echo
"Get repositories at
$GIRARHOST
:"
list_git_package
$PKGNAME
list_git_package
$PKGNAME
set_binaryrepo
$MENV
set_binaryrepo
$MENV
echo
-n
"ACL list for
$BINARYREPO
: "
echo
-n
"ACL list for
$
GIRARHOST
$
BINARYREPO
: "
ssh
$GIRARHOST
acl
$BINARYREPO
$PKGNAME
show
ssh
$GIRARHOST
acl
$BINARYREPO
$PKGNAME
show
RET
=
"MISSED"
RET
=
"MISSED"
if
[
-n
"
$SRCRPM
"
]
;
then
if
[
-n
"
$SRCRPM
"
]
;
then
for
i
in
$REPOSITORY
;
do
RSYNCPATH
=
$(
get_rsync_path
$GIRARHOST
$BINARYREPO
)
echog
"Checking '
$SRCRPM
' in repository
$i
..."
echog
"Checking '
$PKGNAME
' in '
$RSYNCPATH
' ..."
rsync
-n
--progress
$RSYNCSISYPHUS
/
$i
/
$SRCRPM
>
/dev/null 2>&1
&&
{
RET
=
$i
;
break
;
}
if
$RSYNC
-n
$RSYNCPATH
/files/SRPMS/
$SRCRPM
2>/dev/null |
grep
$PKGNAME
;
then
done
RET
=
OK
echog
"Repository Filename"
echo
"Package
$SRCRPM
is the latest version from
$RSYNCPATH
"
printf
"%-12s %30s
\n
"
$RET
$SRCRPM
else
# upstream version difference, just printout list
RSYNCPATH
=
$(
get_rsync_path
$GIRARHOST
$BINARYREPO
)
$RSYNC
-n
"
$RSYNCPATH
/files/SRPMS/
$PKGNAME
-[0-9]*"
2>/dev/null |
grep
$PKGNAME
||
echo
"Package
$PKGNAME
is missed"
echo
"Local package
$SRCRPM
differs from the latest version from
$RSYNCPATH
"
fi
fi
else
if
[
"
$RET
"
=
"MISSED"
]
;
then
SRCRPM
=
"
$PKGNAME
-[0-9]*"
exit
1
RSYNCPATH
=
$(
get_rsync_path
$GIRARHOST
$BINARYREPO
)
echog
"Checking '
$SRCRPM
' in '
$RSYNCPATH
' ..."
$RSYNC
-n
$RSYNCPATH
/files/SRPMS/
$SRCRPM
2>/dev/null |
grep
$PKGNAME
echo
"Package '
$PKGNAME
' is not installed locally"
fi
fi
exit
0
[
"
$RET
"
=
"OK"
]
exit
fi
fi
# FIXME: use mygetopts (LISTRPMARGS and so)
# FIXME: use mygetopts (LISTRPMARGS and so)
...
@@ -366,20 +375,4 @@ if [ -n "$ALLSYSTEM" ] ; then
...
@@ -366,20 +375,4 @@ if [ -n "$ALLSYSTEM" ] ; then
exit
0
exit
0
fi
fi
if
[
-z
"
${
1
/*src.rpm/
}
"
]
fatal
"Support for get src.rpm from ALT rsync removed. Use rpmgp with -g option"
then
# it is src.rpm package
SRCRPM
=
$1
else
SRCRPM
=
$(
querypackage
$1
""
"%{SOURCERPM}
\n
"
)
fi
test
-z
"
$SRCRPM
"
&&
fatal
"Cannon find package for
$1
"
echog
"Try to download
$SRCRPM
to
$(
pwd
)
"
for
i
in
$REPOSITORY
do
echo
"--------Check in
$i
-----------"
rsync
-vay
--partial
--checksum
--copy-links
\
--delete-after
--progress
$RSYNCSISYPHUS
/
$i
/
$SRCRPM
./
$SRCRPM
&&
break
done
etc/config
View file @
e59a65df
...
@@ -50,9 +50,6 @@
...
@@ -50,9 +50,6 @@
# Каталог для записи протоколов сборки
# Каталог для записи протоколов сборки
#LOGDIR=$RPMDIR/log
#LOGDIR=$RPMDIR/log
# Rsync path for get packages from Sisyphus
#RSYNCSISYPHUS=rsync.altlinux.org::ALTLinux/Sisyphus
# Базовый SSH-путь для отправки пакетов
# Базовый SSH-путь для отправки пакетов
#RSYNCINCOMING=incoming:/incoming
#RSYNCINCOMING=incoming:/incoming
...
...
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