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
2c5d0be3
Commit
2c5d0be3
authored
Jun 08, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some get source issues
parent
9d3a8989
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
rpmgs
bin/rpmgs
+9
-5
branch
share/eterbuild/functions/branch
+1
-0
gear
share/eterbuild/functions/gear
+8
-5
spec
share/eterbuild/functions/spec
+1
-1
No files found.
bin/rpmgs
View file @
2c5d0be3
...
...
@@ -68,7 +68,7 @@ check_tarball()
get_ext
()
{
rhas
"
$1
"
"
\.
"
&&
echo
"
$1
"
|
sed
-e
"s|.*
\.
||"
rhas
"
$1
"
"
\.
"
&&
echo
"
$1
"
|
sed
-e
"s|.*
\.
||"
|
grep
-v
"/"
}
# Args: URL TARGET
...
...
@@ -130,8 +130,9 @@ function source_ext()
# Fake replace for correct subst variables
NEWSOURCE
=
"
$(
echo
"
$NEWSOURCE
"
|
sed
-e
's|\&|\\&|g'
)
"
# TODO: use special field before %build
cat
$1
|
sed
-e
"s|^Summary:.*|
Summary:
$NEWSOURCE
|g"
>
$TMPSPEC
cat
$1
|
sed
-e
"s|^Summary:.*|
|g"
|
sed
-e
"s|^
\(\%
description.*
\)
|Summary:
$NEWSOURCE
\n\1
|g"
>
$TMPSPEC
GETSOURCEEXT
=
$(
eval_spec
"
$TMPSPEC
"
| get_var
"Summary"
)
#rhas "$GETSOURCEEXT" "%" && fatal "some macro unexpanded in URL. Check $TMPSPEC"
rm
-f
"
$TMPSPEC
"
fi
...
...
@@ -158,6 +159,7 @@ function get_source_git()
function
get_source_url
()
{
GETSOURCEURL
=
$(
source_ext
"
$1
"
url
"
$2
"
)
#rhas "$GETSOURCEURL" "%" && fatal "some macro unexpanded in URL. Check $TMPSPEC"
}
function
print_error
()
...
...
@@ -208,6 +210,7 @@ commit_tarball_to_dir()
gear_update_from_tarball
"
$TARBALL
"
"
$CURNAME
"
$FORCEDOWNLOAD
||
{
warning
"Error with update tarball in repo"
;
return
1
;
}
# force commit ever files from .gitignore
docmd git add
-f
"
$CURNAME
"
# TODO: add GETSOURCEURL url
docmd git commit
-m
"just import
$(
basename
$TARBALL
)
with rpmgs script"
rm
-fv
"
$TARBALL
"
else
...
...
@@ -246,7 +249,7 @@ update_post_git_submodules()
info
"Detected post git submodules hook"
cat
$(
get_root_git_dir
)
/.gear/rules |
grep
-q
"tar:.*-postsubmodules"
||
fatal
"missed tar:.gear/
$BASENAME
-posmodules in
$(
get_root_git_dir
)
/.gear/rules"
cat
$(
get_root_git_dir
)
/.gear/rules |
grep
-q
"tar:.*-postsubmodules"
||
fatal
"missed tar:.gear/
$BASENAME
-pos
t
modules in
$(
get_root_git_dir
)
/.gear/rules"
[
-s
$(
get_root_git_dir
)
/.gitmodules
]
||
fatal
"there is no .gitmodules file in repo root"
docmd git submodule init
...
...
@@ -365,7 +368,7 @@ do
# Test for eterbuild extensions (will set GETSOURCEURL or GETSOURCESVN)
get_source_url
$spec
$SN
||
get_source_git
$spec
$SN
||
get_source_svn
$spec
$SN
#[ "$SN" = "Source1" ] && exit
#if ! rhas "$GETSOURCE" ".tar$" ; then
# warning "It is recommended to use .tar tarballs for sources ($FTB now)"
#fi
...
...
@@ -391,7 +394,8 @@ do
continue
else
# only for main source
fatal
"
$SN
$GETSOURCE
has no URL"
warning
"
$SN
$GETSOURCE
has no URL"
continue
fi
fi
download_any_tarball
"
$GETSOURCE
"
"
$FTB
"
...
...
share/eterbuild/functions/branch
View file @
2c5d0be3
...
...
@@ -72,6 +72,7 @@ checkout_bpbranch()
if
!
git branch
-a
|
grep
-q
"remotes/
$PGEAR
/
$USEBRANCH
"
;
then
# if we have no fetched branch
docmd gremote
$GIRARHOST
-o
docmd git fetch
$PGEAR
fi
# if we successful with gear
if
git branch
-a
|
grep
-q
"remotes/
$PGEAR
/
$USEBRANCH
"
;
then
...
...
share/eterbuild/functions/gear
View file @
2c5d0be3
...
...
@@ -48,18 +48,21 @@ get_tardir_from_rules()
local tar
=
"
$1
"
local
packname
=
"
$(
basename
"
$2
"
.
$tar
)
"
local dir
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
|
grep
"name=
$packname
"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
)
if
[
-z
"
$dir
"
]
;
then
if
!
print_gear_rules |
grep
"
$tar
*:"
|
grep
-q
"name="
;
then
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
)
if
print_gear_rules |
grep
"
$tar
*:"
|
grep
-q
-v
"name="
;
then
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
else
dir
=
$(
print_gear_rules |
grep
"
$tar
*:"
|
grep
"name=
$packname
"
|
sed
-e
"s|
$tar
*: *||g"
|
sed
-e
"s| .*||g"
|
head
-n1
)
fi
if
[
-z
"
$dir
"
]
;
then
fatal
"no
$tar
rules found in
$(
get_gear_rules
)
between
$(
print_gear_rules |
grep
"
$tar
*:"
)
"
fi
fi
if
[
"
$dir
"
=
"."
]
||
[
-z
"
$dir
"
]
||
echo
"
$dir
"
|
grep
-q
":"
;
then
return
1
fi
realpath
"
$(
get_root_git_dir
)
/
$dir
"
}
...
...
share/eterbuild/functions/spec
View file @
2c5d0be3
...
...
@@ -229,7 +229,7 @@ add_changelog_helper()
return
1
fi
[
-z
"
$SPECS
"
]
&&
fatal
"run add_changelog without spec(s)"
add_changelog
-e
"
$DESC
"
$SPECS
LANG
=
C
add_changelog
-e
"
$DESC
"
$SPECS
R
=
$?
[
-n
"
$QUIET
"
]
&&
return
...
...
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