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
9e6ef3cc
Commit
9e6ef3cc
authored
Dec 13, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgp: use giter, drop girar functions
parent
1040a295
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
50 deletions
+5
-50
rpmgp
bin/rpmgp
+5
-5
girar
share/eterbuild/functions/girar
+0
-45
No files found.
bin/rpmgp
View file @
9e6ef3cc
...
...
@@ -10,7 +10,7 @@
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod rpm repl git rpm web repos buildsrpm
girar
load_mod rpm repl git rpm web repos buildsrpm
# loads repos file and fill SYSNAME and SYSURL arrays
load_systems_list
()
...
...
@@ -294,7 +294,7 @@ git_clone()
{
local
RREPO
=
"
$1
"
# Test if ssh access is available
if
[
-z
"
$PUBLICACCESS
"
]
&&
has_ssh_girar_
access
;
then
if
[
-z
"
$PUBLICACCESS
"
]
&&
giter check girar
access
;
then
docmd git clone
$GIRARHOST
:
$RREPO
else
docmd git clone
$GIRARURL
/
$RREPO
...
...
@@ -306,7 +306,7 @@ if [ -n "$CLONEGIT" ] ; then
# http://git.altlinux.org/gears/N/NAME.git
REPOPATH
=
"
$(
initial_letter
$PKGNAME
)
/
$PKGNAME
.git"
RREPO
=
"/gears/
$REPOPATH
"
# FIXME: use g
et_girar_
repo?
# FIXME: use g
iter print girar
repo?
# TODO: check appropriate repo with exist_git_repo
if
[
-z
"
$MIGRATEGIRAR
"
]
;
then
if
!
git_clone
$RREPO
;
then
...
...
@@ -322,7 +322,7 @@ if [ -n "$CLONEGIT" ] ; then
fi
else
[
-z
"
$PUBLICACCESS
"
]
||
fatal
"Can't remote clone via public access"
RREPO
=
$(
g
et_girar_
repo
$PKGNAME
)
||
fatal
"
$PKGNAME
does not exists in
$GIRARHOST
:/gears, nor in
$GIRARHOST
:/srpms. Can't clone."
RREPO
=
$(
g
iter print girar
repo
$PKGNAME
)
||
fatal
"
$PKGNAME
does not exists in
$GIRARHOST
:/gears, nor in
$GIRARHOST
:/srpms. Can't clone."
echo
"Remote clone from
$RREPO
..."
docmd ssh
$GIRARHOST
clone
$RREPO
packages/
$PKGNAME
.git
||
warning
"Can't remote clone."
...
...
@@ -399,7 +399,7 @@ if [ -n "$CHECKONLINE" ] ; then
if
[
-n
"
$GIRAR_USER
"
]
;
then
# FIXME: we have a function to get correct url
GITURL
=
"
http://git.altlinux.org
/people/
$GIRAR_USER
/packages/
$PKGNAME
.git"
GITURL
=
"
$GIRARURL
/people/
$GIRAR_USER
/packages/
$PKGNAME
.git"
if
$GET
-d
$GITURL
;
then
echog
"Published at
$GITURL
by
$GIRAR_USER
"
else
...
...
share/eterbuild/functions/girar
deleted
100644 → 0
View file @
1040a295
#!/bin/bash
# 2013 Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
load_mod repos
# Is allow connect with ssh to the GIRARHOST server?
has_ssh_girar_access
()
{
ssh
$GIRARHOST
help
>
/dev/null 2>&1
}
check_http_status
()
{
a
=
curl
-s
-I
"
$1
"
|
grep
HTTP |
grep
-q
"200 OK"
}
# Returns true if repo with path from first arg is exits on the remote GIRARHOST server
is_exist_git_repo
()
{
if
has_ssh_girar_access
;
then
ssh
$GIRARHOST
ls
$1
>
/dev/null 2>&1
&&
return
fi
# TODO: this is workaround for ALT bug #22745
# https://bugzilla.altlinux.org/show_bug.cgi?id=22745
check_http_status
$(
get_git_url
$GIRARHOST
)
$1
}
# get gear repo for package name
get_girar_repo
()
{
assert_var GIRARHOST
local
PKGNAME
=
"
$1
"
# http://git.altlinux.org/gears/N/NAME.git
local
REPOPATH
=
"
$(
initial_letter
$PKGNAME
)
/
$PKGNAME
.git"
local
RREPO
=
"/gears/
$REPOPATH
"
if
!
is_exist_git_repo
$RREPO
;
then
RREPO
=
"/srpms/
$REPOPATH
"
is_exist_git_repo
$RREPO
||
return
fi
echo
"
$RREPO
"
}
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