Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
alpine
abuild
Commits
ee52fee1
Commit
ee52fee1
authored
May 28, 2017
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: rootbld: always require repo template
parent
e3a2e14f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
34 deletions
+22
-34
abuild.in
abuild.in
+22
-34
No files found.
abuild.in
View file @
ee52fee1
...
@@ -1997,29 +1997,6 @@ checksum() {
...
@@ -1997,29 +1997,6 @@ checksum() {
echo
"sha512sums=
\"
$sha512sums
\"
"
>>
"$APKBUILD"
echo
"sha512sums=
\"
$sha512sums
\"
"
>>
"$APKBUILD"
}
}
subst
()
{
(
for
key
in
$(
git
config
--
list
--
name
-
only
);
do
k
=${
key
#
abuild
.}
[
$
k
!= $key ] && \
eval
"export $k=
\"
$(git config --get $key)
\"
"
done
export
mirror
version
[
"$mirror"
]
||
mirror
=
http
://
dl
-
cdn
.
alpinelinux
.
org
/
alpine
if
[
-
z
"$version"
];
then
version
=$(
git
symbolic
-
ref
--
short
HEAD
)
[
"$version"
]
&&
\
version
=$(
expr
"$version"
:
'\([0-9]\+\(\.[0-9]\+\)*\)-'
)
&&
\
version
=
v
${
version
}
[
"$version"
]
||
version
=
edge
fi
envsubst
)
}
rootbld
()
{
rootbld
()
{
if
apk_up2date
&&
[
-
z
"$force"
];
then
if
apk_up2date
&&
[
-
z
"$force"
];
then
msg
"Package is up to date"
msg
"Package is up to date"
...
@@ -2060,17 +2037,28 @@ rootbld() {
...
@@ -2060,17 +2037,28 @@ rootbld() {
cp
/
etc
/
apk
/
keys
/*
"$BUILD_ROOT/etc/apk/keys"
cp
/
etc
/
apk
/
keys
/*
"$BUILD_ROOT/etc/apk/keys"
local
repo_template
=$
aportsgit
/$
repo
/.
rootbld
-
repositories
local
repo_template
=$
aportsgit
/$
repo
/.
rootbld
-
repositories
local
repofile
=$
BUILD_ROOT
/
etc
/
apk
/
repositories
[
-
s
"$repo_template"
]
||
die
"rootbld: $repo_template does not exist"
if
[
-
s
"$repo_template"
];
then
(
subst
<
"$repo_template"
for
key
in
$(
git
config
--
list
--
name
-
only
);
do
else
k
=${
key
#
abuild
.}
local
prefix
=
'$mirror/$version'
[
$
k
!= $key ] && \
subst
<<-
EOF
eval
"export $k=
\"
$(git config --get $key)
\"
"
$
prefix
/
main
done
$
prefix
/
community
EOF
export
mirror
version
fi
>
"$repofile"
[
"$mirror"
]
||
mirror
=
http
://
dl
-
cdn
.
alpinelinux
.
org
/
alpine
echo
"$REPODEST/$repo"
>>
"$repofile"
if
[
-
z
"$version"
];
then
version
=$(
git
symbolic
-
ref
--
short
HEAD
)
[
"$version"
]
&&
\
version
=$(
expr
"$version"
:
'\([0-9]\+\(\.[0-9]\+\)*\)-'
)
&&
\
version
=
v
${
version
}
[
"$version"
]
||
version
=
edge
fi
envsubst
echo
"$REPODEST/$repo"
)
<
"$repo_template"
>
"$BUILD_ROOT/etc/apk/repositories"
calcdeps
calcdeps
$
SUDO_APK
add
--
initdb
--
root
"$BUILD_ROOT"
--
update
\
$
SUDO_APK
add
--
initdb
--
root
"$BUILD_ROOT"
--
update
\
...
...
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