Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
99ffea8a
Commit
99ffea8a
authored
Mar 30, 2011
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: use $repo/$arch for abuildrepo
This is so apk-tools-2.1 works
parent
3af17782
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
23 deletions
+57
-23
abuild.in
abuild.in
+57
-23
No files found.
abuild.in
View file @
99ffea8a
...
...
@@ -359,7 +359,7 @@ cleanpkg() {
for
i
in
$(
listpkgnames
)
;
do
local
p
=
"
${
i
%
:
*
}
-
$pkgver
-r
$pkgrel
"
rm
-f
"
$PKGDEST
/
$p
.apk"
"
$PKGDEST
/
$p
.src.tar.gz"
\
"
$abuildrepo
"
/
$p
.apk
"
$abuildrepo
"
/
$p
.apk
"
$abuildrepo
"
/
*
/
$p
.apk
done
# remove given packages from index
}
...
...
@@ -370,9 +370,11 @@ cleanoldpkg() {
getpkgver
||
return
1
msg
"Cleaning all packages except
$pkgver
-r
$pkgrel
..."
for
i
in
$(
listpkgnames
)
;
do
for
j
in
"
$PKGDEST
"
/
${
i
%
:
*
}
-[0-9]
*
.apk
;
do
[
"
$j
"
!=
"
$PKGDEST
/
${
i
%
:
*
}
-
$pkgver
-r
$pkgrel
.apk"
]
\
&&
rm
-f
"
$j
"
local
pn
=
${
i
%
:
*
}
for
j
in
"
$PKGDEST
"
/
$pn
-[0-9]
*
.apk
;
do
[
"
$j
"
=
"
$PKGDEST
/
$pn
-
$pkgver
-r
$pkgrel
.apk"
]
\
&&
continue
rm
-f
"
$j
"
"
$abuildrepo
"
/
*
/
${
j
##*/
}
done
done
return
0
...
...
@@ -769,41 +771,67 @@ create_apks() {
done
}
update_abuildrepo
()
{
if
!
apk_up2date
||
[
-n
"
$force
"
]
;
then
sanitycheck
&&
builddeps
&&
clean
&&
fetch
&&
unpack
\
&&
prepare
&&
mkusers
&&
rootpkg
||
return
1
fi
# fish out the arch from an apk file
apk_arch_prefix
()
{
apk index
-q
"
$1
"
|
tar
-zxO
|
awk
-F
:
'$1 == "A" { print $2 }'
}
clean_abuildrepo
()
{
local
apk
mkdir
-p
"
$abuildrepo
"
||
return
1
cd
"
$abuildrepo
"
cd
"
$abuildrepo
"
||
return
1
# remove compat symlink
for
d
in
"
$abuildrepo
/
$CARCH
"
"
$abuildrepo
"
/noarch
;
do
[
-L
"
$d
"
]
&&
rm
"
$d
"
done
# remove broken links
for
apk
in
*
.apk
;
do
# remove broken links
from abuildrepo
for
apk
in
*
.apk
*
/
*
.apk
;
do
if
[
-L
"
$apk
"
]
&&
[
!
-f
"
$apk
"
]
;
then
rm
-f
"
$apk
"
fi
done
}
mklinks_abuildrepo
()
{
local
apk
mkdir
-p
"
$abuildrepo
"
cd
"
$abuildrepo
"
||
return
1
# create links for this package
for
apk
in
$(
listpkg
)
;
do
ln
-sf
"
$PKGDEST
"
/
$apk
"
$abuildrepo
"
/
$apk
[
-f
"
$PKGDEST
"
/
$apk
]
||
continue
local
prefix
=
$(
apk_arch_prefix
"
$PKGDEST
"
/
$apk
)
mkdir
-p
"
$abuildrepo
"
/
$prefix
ln
-sf
"
$PKGDEST
"
/
$apk
"
$abuildrepo
"
/
$prefix
/
$apk
done
}
update_abuildrepo
()
{
local
d apk
if
!
apk_up2date
||
[
-n
"
$force
"
]
;
then
sanitycheck
&&
builddeps
&&
clean
&&
fetch
&&
unpack
\
&&
prepare
&&
mkusers
&&
rootpkg
||
return
1
fi
clean_abuildrepo
mklinks_abuildrepo
cd
"
$abuildrepo
"
local
index
=
$CARCH
/APKINDEX.tar.gz
msg
"Updating the cached abuild repository index..."
local
sign
=
".SIGN.RSA.
${
SIGN_PUBLIC_KEY
##*/
}
"
local
oldindex
=
if
[
-f
APKINDEX.tar.gz
]
;
then
oldindex
=
"--index
APKINDEX.tar.gz
"
if
[
-f
"
$index
"
]
;
then
oldindex
=
"--index
$index
"
fi
$APK
index
$oldindex
--output
APKINDEX.tar.gz
.unsigned
\
$APK
index
--quiet
$oldindex
--output
"
$index
"
.unsigned
\
--description
"
$repo
$(
cd
$startdir
&&
git describe
)
"
\
*
.apk
||
exit
1
noarch/
*
.apk
$CARCH
/
*
.apk
||
exit
1
msg
"Signing the index..."
abuild-sign
-q
APKINDEX.tar.gz
.unsigned
||
exit
1
mv
APKINDEX.tar.gz.unsigned APKINDEX.tar.gz
chmod
644
APKINDEX.tar.gz
abuild-sign
-q
"
$index
"
.unsigned
||
exit
1
mv
"
$index
"
.unsigned
"
$index
"
chmod
644
"
$index
"
}
# predefined splitfunc doc
...
...
@@ -969,11 +997,17 @@ apk_up2date() {
}
abuildindex_up2date
()
{
local
i apk
local
i
j
apk
getpkgver
||
return
1
for
i
in
$pkgname
$subpackages
;
do
apk
=
"
${
i
%
:
*
}
-
$pkgver
-r
$pkgrel
.apk"
[
"
$abuildrepo
"
/APKINDEX.tar.gz
-nt
"
$abuildrepo
"
/
$apk
]
||
return
1
for
j
in
"
$abuildrepo
"
/
*
/
$apk
;
do
[
-r
"
$j
"
]
||
continue
# ignore missing files
local
idx
=
"
${
j
%/*
}
"
/APKINDEX.tar.gz
if
!
[
"
$idx
"
-nt
"
$j
"
]
;
then
return
1
fi
done
done
return
0
}
...
...
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