Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakub Panek
aports
Commits
d500aac0
Commit
d500aac0
authored
14 years ago
by
Matt Smith
Browse files
Options
Downloads
Patches
Plain Diff
buildlab: added apk caching option (-k)
parent
d68c2e29
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildlab.in
+11
-3
11 additions, 3 deletions
buildlab.in
with
11 additions
and
3 deletions
buildlab.in
+
11
−
3
View file @
d500aac0
...
@@ -88,6 +88,7 @@ prepare_chroot() {
...
@@ -88,6 +88,7 @@ prepare_chroot() {
local
version
=
"
$2
"
local
version
=
"
$2
"
local
mirror
=
"
$3
"
local
mirror
=
"
$3
"
local arch
=
"
$4
"
local arch
=
"
$4
"
local
enablecache
=
"
$5
"
msg
"Setting up repositories for mirror
$mirror
with version
$version
at
$path
..."
msg
"Setting up repositories for mirror
$mirror
with version
$version
at
$path
..."
...
@@ -95,6 +96,11 @@ prepare_chroot() {
...
@@ -95,6 +96,11 @@ prepare_chroot() {
echo
"http://
$mirror
/alpine/
$version
/packages/
$arch
/main"
>>
"
$path
"
/etc/apk/repositories
echo
"http://
$mirror
/alpine/
$version
/packages/
$arch
/main"
>>
"
$path
"
/etc/apk/repositories
echo
"http://
$mirror
/alpine/
$version
/packages/
$arch
/testing"
>>
"
$path
"
/etc/apk/repositories
echo
"http://
$mirror
/alpine/
$version
/packages/
$arch
/testing"
>>
"
$path
"
/etc/apk/repositories
if
[
!
-z
"
$enablecache
"
]
;
then
mkdir
-p
"
$path
"
/var/cache/apk
ln
-s
/var/cache/apk
"
$path
"
/etc/apk/cache
fi
mkdir
-p
"
$path
"
/var/lib/apk
mkdir
-p
"
$path
"
/var/lib/apk
echo
"alpine-base"
>
"
$path
"
/var/lib/apk/world
echo
"alpine-base"
>
"
$path
"
/var/lib/apk/world
...
@@ -187,6 +193,7 @@ usage() {
...
@@ -187,6 +193,7 @@ usage() {
echo
" -m APK repository mirror"
echo
" -m APK repository mirror"
echo
" -v APK distribution version"
echo
" -v APK distribution version"
echo
" -a APK repository architecture"
echo
" -a APK repository architecture"
echo
" -k Enable APK caching"
echo
" "
echo
" "
echo
"Updating build roots (buildlab -u):"
echo
"Updating build roots (buildlab -u):"
echo
" "
echo
" "
...
@@ -205,7 +212,7 @@ usage() {
...
@@ -205,7 +212,7 @@ usage() {
unset
force
unset
force
unset
recursive
unset
recursive
while
getopts
"chqCp:v:m:a:b:u"
opt
;
do
while
getopts
"chqC
k
p:v:m:a:b:u"
opt
;
do
case
$opt
in
case
$opt
in
'c'
)
default_colors
'c'
)
default_colors
color_opt
=
"-c"
;;
color_opt
=
"-c"
;;
...
@@ -215,7 +222,8 @@ while getopts "chqCp:v:m:a:b:u" opt; do
...
@@ -215,7 +222,8 @@ while getopts "chqCp:v:m:a:b:u" opt; do
'p'
)
buildpath
=
"
$OPTARG
"
;;
'p'
)
buildpath
=
"
$OPTARG
"
;;
'm'
)
buildmirror
=
"
$OPTARG
"
;;
'm'
)
buildmirror
=
"
$OPTARG
"
;;
'v'
)
buildver
=
"
$OPTARG
"
;;
'v'
)
buildver
=
"
$OPTARG
"
;;
'a'
)
buildarch
=
"
$OPTARG
"
;;
'a'
)
buildarch
=
"
$OPTARG
"
;;
'k'
)
enablecache
=
1
;;
'b'
)
buildpkg
=
"
$OPTARG
"
;;
'b'
)
buildpkg
=
"
$OPTARG
"
;;
'u'
)
update
=
"-u"
;;
'u'
)
update
=
"-u"
;;
esac
esac
...
@@ -224,7 +232,7 @@ shift $(( $OPTIND - 1 ))
...
@@ -224,7 +232,7 @@ shift $(( $OPTIND - 1 ))
if
[
!
-z
"
$create
"
]
;
then
if
[
!
-z
"
$create
"
]
;
then
msg
"Creating new chroot at
$buildpath
..."
msg
"Creating new chroot at
$buildpath
..."
prepare_chroot
$buildpath
$buildver
$buildmirror
$buildarch
prepare_chroot
$buildpath
$buildver
$buildmirror
$buildarch
$enablecache
exit
0
exit
0
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment