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
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
6c52b391
Commit
6c52b391
authored
Feb 08, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: improve sanitycheck
- check that md5sums correspond to source - warn if maintainer is missing
parent
0e9c2e70
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
TODO
TODO
+0
-4
abuild
abuild
+23
-4
No files found.
TODO
View file @
6c52b391
- Better saintycheck:
* check that number of md5sums is correct
* verify that there is a Maintainer
- Automatically add $install to $source
- Fetch sources from a specified mirror
...
...
abuild
View file @
6c52b391
...
...
@@ -71,6 +71,7 @@ die() {
# check if apkbuild is basicly sane
sanitycheck
()
{
local
i
msg
"Checking sanity of
$APKBUILD
..."
[
-z
"
$pkgname
"
]
&&
die
"Missing pkgname in APKBUILD"
[
-z
"
${
pkgname
##* *
}
"
]
&&
die
"pkgname contains spaces"
...
...
@@ -82,24 +83,30 @@ sanitycheck() {
[
-z
"
$url
"
]
&&
die
"Missing url in APKBUILD"
[
-z
"
$license
"
]
&&
die
"Missing license in APKBULID"
if
[
"
$(
echo
$source
|
wc
-l
)
"
-ne
"
$(
echo
$md5sums
|
wc
-l
)
"
]
;
then
die
"Number of md5sums does not correspond to number of sources"
fi
for
i
in
$source
;
do
md5sums_has
${
i
##*/
}
||
die
"
${
i
##*/
}
is missing in md5sums"
done
for
i
in
$(
echo
"
$md5sums
"
|
awk
'{ print $2 }'
)
;
do
source_has
$i
||
die
"
$i
is missing in source"
done
# common spelling errors
[
-n
"
$depend
"
]
&&
die
"APKBUILD contains 'depend'. It should be depends"
[
-n
"
$makedepend
"
]
&&
die
"APKBUILD contains 'makedepend'. It should be makedepends"
grep
'^# Maintainer:'
$APKBUILD
>
/dev/null
||
warning
"No maintainer"
return
0
}
md5check
()
{
local
dummy f
if
[
-z
"
$source
"
]
;
then
return
0
fi
if
[
-z
"
$md5sums
"
]
;
then
die
"Use 'abuild checksum' to generate/update the checksum(s)"
fi
if
[
"
$(
echo
$source
|
wc
-l
)
"
-ne
"
$(
echo
$md5sums
|
wc
-l
)
"
]
;
then
die
"Number of md5sums does not correspond to number of sources"
fi
...
...
@@ -550,6 +557,14 @@ listpkg() {
done
}
source_has
()
{
local
i
for
i
in
$source
;
do
[
"
$1
"
=
"
${
i
##*/
}
"
]
&&
return
0
done
return
1
}
subpackages_has
()
{
local
i
for
i
in
$subpackages
;
do
...
...
@@ -573,6 +588,10 @@ options_has() {
list_has
"
$1
"
$options
}
md5sums_has
()
{
list_has
"
$1
"
$md5sums
}
# install package after build
post_add
()
{
local
pkgf
=
"
$PKGDEST
/
$1
-
$pkgver
-r
$pkgrel
.apk"
...
...
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