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
974b2509
Commit
974b2509
authored
Aug 26, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: initial support for Source-git
parent
f5d9fc3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
rpmgs
bin/rpmgs
+24
-8
No files found.
bin/rpmgs
View file @
974b2509
#!/bin/bash
# 2005-2006, 2009, 2014, 2015 (c) Etersoft www.etersoft.ru
# 2005-201
5
Author: Vitaly Lipatov <lav@etersoft.ru>
# 2005-2006, 2009, 2014, 2015
, 2016
(c) Etersoft www.etersoft.ru
# 2005-201
6
Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
# GS - get source
...
...
@@ -123,7 +123,7 @@ function get_source_svn()
# Source-git: http://git.altlinux.org/people/lav/packages/rpm-build-fonts.git
function
get_source_git
()
{
fatal
"realize me"
GETSOURCEGIT
=
$(
source_ext
"
$1
"
git
"
$2
"
)
}
# Source-url: ftp://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft/last/sources/tarball/%name-%version.tar.gz
...
...
@@ -229,7 +229,7 @@ do
mkdir
-p
$RPMSOURCEDIR
/
&&
pushd
$RPMSOURCEDIR
/
>
/dev/null
||
fatal
"Can't create/chdir..."
# Test for eterbuild extensions (will set GETSOURCEURL or GETSOURCESVN)
get_source_url
$spec
$nn
||
get_source_svn
$spec
$nn
get_source_url
$spec
$nn
||
get_source_
git
$spec
$nn
||
get_source_
svn
$spec
$nn
if
!
rhas
"
$GETSOURCE
"
".tar$"
;
then
warning
"It is recommended to use .tar tarballs for sources (
$FTB
now)"
...
...
@@ -237,7 +237,8 @@ do
if
[
-n
"
${
GETSOURCESVN
}
"
]
;
then
is_gear
$SPECDIR
||
fatal
"Source-svn works only with gear repo"
# TODO: GETSOURCEGIT
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
;
then
is_gear
$SPECDIR
||
fatal
"Source-git works only with gear repo"
# TODO: rewrite code to use original file format and temp. download dir
elif
[
-n
"
${
GETSOURCEURL
}
"
]
;
then
echog
"Try to load
${
GETSOURCEURL
}
for
$spec
"
...
...
@@ -275,13 +276,28 @@ do
docmd git svn clone
$GETSOURCESVN
$GITROOT
echo
"Run svn rebase from
$GETSOURCESVN
"
docmd git svn rebase
elif
[
-n
"
${
GETSOURCEGIT
}
"
]
;
then
echog
"Try to fetch
${
GETSOURCEGIT
}
for
$spec
"
#TODO check upstream
#TODO error if incompatible
docmd git remote add upstream
$GETSOURCEGIT
docmd git fetch upstream
||
fatal
#TODO check tag: v%version or %version
docmd git merge v
$GSSETVERSION
||
docmd git merge
$GSSETVERSION
#docmd git commit -m "mergejust import $FTB with rpmgs script"
elif
is_gear
;
then
CURNAME
=
$(
get_tardir_from_rules
)
||
fatal
"There is no 'tar:' line in gear rules file or 'tar: .' used"
# FIXME: hack to unpack to correct place.
[
$(
basename
`
pwd
`
)
=
".gear"
]
&&
cd
..
test
-d
"
$CURNAME
"
||
CURNAME
=
$(
get_tarballname
"
$spec
"
)
test
-d
"
$CURNAME
"
||
CURNAME
=
$BASENAME
gear_update_from_tarball
"
$RPMSOURCEDIR
/
$FTB
"
"
$CURNAME
"
$FORCEDOWNLOAD
rm
-f
"
$RPMSOURCEDIR
/
$FTB
"
docmd git commit
-m
"just import
$FTB
with rpmgs script"
if
[
-d
"
$RPMSOURCEDIR
"
]
&&
[
-f
"
$RPMSOURCEDIR
/
$FTB
"
]
;
then
gear_update_from_tarball
"
$RPMSOURCEDIR
/
$FTB
"
"
$CURNAME
"
$FORCEDOWNLOAD
rm
-f
"
$RPMSOURCEDIR
/
$FTB
"
docmd git commit
-m
"just import
$FTB
with rpmgs script"
else
echo
"Skip missed tarball commiting"
fi
fi
else
is_gear
&&
echo
"Skip tarball committing (run with version or with -f option)."
...
...
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