1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
--- src/abuild.in 2017-09-19 07:02:57.000000000 -0500
+++ src/abuild.in 2017-09-23 22:34:32.534221312 -0500
@@ -1,4 +1,4 @@
-#!/bin/ash -e
+#!/bin/sh -e
# abuild - build apk packages (light version of makepkg)
# Copyright (c) 2008-2015 Natanael Copa <ncopa@alpinelinux.org>
@@ -425,11 +425,11 @@
tar -C "$srcdir" --lzip -xf "$s" || return 1;;
*.tar.lzma)
msg "Unpacking $s..."
- unlzma -c "$s" | tar -C "$srcdir" -x \
+ unlzma -c "$s" | tar -C "$srcdir" -f - -x \
|| return 1;;
*.tar.xz)
msg "Unpacking $s..."
- unxz -c "$s" | tar -C "$srcdir" -x || return 1;;
+ unxz -c "$s" | tar -C "$srcdir" -f - -x || return 1;;
*.zip)
msg "Unpacking $s..."
unzip -n -q "$s" -d "$srcdir" || return 1;;
@@ -476,7 +476,7 @@
subpkgarch=${_splitarch#*:}
if [ "$subpkgarch" = "$_splitarch" -o -z "$subpkgarch" ]; then
case "$subpkgname" in
- *-doc | *-lang | *-lang-*) subpkgarch="noarch" ;;
+ *-doc | *-lang | *-lang-* | *-openrc) subpkgarch="noarch" ;;
*) subpkgarch="$pkgarch" ;;
esac
fi
@@ -1395,7 +1395,7 @@
touch .dummy
set -- .dummy
fi
- tar --xattrs -f - -c "$@" | abuild-tar --hash | gzip -9 >"$dir"/data.tar.gz
+ tar --format pax --xattrs -f - -c "$@" | abuild-tar --hash | gzip -9 >"$dir"/data.tar.gz
msg "Create checksum..."
# append the hash for data.tar.gz
@@ -1404,7 +1404,7 @@
# control.tar.gz
cd "$dir"
- tar -f - -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
+ tar --format pax -f - -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
| gzip -9 > control.tar.gz
abuild-sign -q control.tar.gz || exit 1
@@ -1483,9 +1483,7 @@
# predefined function check
default_check() {
- warning "APKBUILD does not run any tests!"
- msg2 "Alpine policy will soon require that packages have any relevant testsuites run during the build process."
- msg2 "To fix, either define a check() function, or declare !check in \$options to indicate the package does not have a testsuite."
+ die "APKBUILD does not run any tests!"
}
check() {
@@ -2337,6 +2335,7 @@
}
usage() {
+ echo "$program $program_version"
cat <<-EOF
usage: $program [options] [-P REPODEST] [-s SRCDEST] [-D DESCRIPTION] [cmd] ...
$program [-c] -n PKGNAME[-PKGVER]
|