Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adélie Linux
abuild
Commits
5ecfc84b
Verified
Commit
5ecfc84b
authored
Jun 19, 2018
by
Max Rees
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial removal of bashisms
parent
efc67921
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
20 deletions
+28
-20
abuild.in
abuild.in
+20
-13
apkgrel.in
apkgrel.in
+2
-1
bootchartd
bootchartd
+1
-1
run-tests.sh
run-tests.sh
+4
-4
tests/abuild/checkroot1/APKBUILD
tests/abuild/checkroot1/APKBUILD
+1
-1
No files found.
abuild.in
View file @
5ecfc84b
...
...
@@ -269,7 +269,8 @@ sumcheck() {
fetch
||
return
1
msg
"Checking ${algo}sums..."
cd
"$srcdir"
||
return
1
IFS
=$
'\n'
IFS
=
"
"
endreturnval
=
0
for
src
in
$
sums
;
do
origin
=$
1
;
shift
...
...
@@ -277,7 +278,7 @@ sumcheck() {
endreturnval
=
1
is_remote
$
origin
||
continue
local
csum
=
"$
{src:0:8}
"
local
csum
=
"$
(printf '%s' "
$
src
" | awk '{ print substr($0, 1, 8) }' )
"
local
file
=
"$SRCDEST/$(filename_from_uri $origin)"
echo
"Because the remote file above failed the ${algo}sum check it will be renamed."
...
...
@@ -514,7 +515,8 @@ cleanpkg() {
rm
-
f
"$REPODEST/$repo/src/$pkgname-$pkgver-r$pkgrel.src.tar.gz"
for
i
in
$
allpackages
;
do
subpkg_set
"$i"
rm
-
f
"$REPODEST/$repo/${subpkgarch/noarch/$CARCH}/$subpkgname-$pkgver-r$pkgrel.apk"
[
"$subpkgarch"
=
"noarch"
]
&&
subpkgarch
=
"$CARCH"
rm
-
f
"$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk"
done
subpkg_unset
...
...
@@ -870,9 +872,9 @@ check_secfixes_comment() {
fi
#
check
if
there
are
tabs
if
echo
"$invalid"
|
grep
-
q
$
'\t'
;
then
if
echo
"$invalid"
|
grep
-
q
"$(printf '
\t
')"
;
then
error
"secfixes comment must not have tabs:"
echo
"$c"
|
grep
$
'\t'
>&
2
echo
"$c"
|
grep
"$(printf '
\t
')"
>&
2
return
1
fi
...
...
@@ -998,7 +1000,8 @@ prepare_metafiles() {
local
f
=${
i
%=*}
local
dirs
=${
i
#*=}
[
"${f%.trigger}"
!= "$name" ] && continue
echo
"triggers = ${dirs//:/ }"
>>
"$pkginfo"
dirs
=
"$(printf '%s' "
$
dirs
" | sed 's/:/ /g')"
echo
"triggers = $dirs"
>>
"$pkginfo"
done
if
[
-
n
"$install_if"
];
then
echo
"install_if = $(echo $install_if)"
>>
"$pkginfo"
...
...
@@ -1392,7 +1395,7 @@ scan_shared_objects() {
#
path
(
2
nd
arg
).
normalize_target_path
()
{
local
path
=$
1
[
"${path:0:1}"
=
/
]
||
path
=$(
dirname
"$2"
)/$
path
(
printf
'%s'
"$path"
|
grep
-
q
'^/'
)
||
path
=$(
dirname
"$2"
)/$
path
local
oifs
=
"$IFS"
pathstr
=
i
=
IFS
=
'/'
...
...
@@ -1510,8 +1513,9 @@ create_apks() {
abuild
-
sign
-
q
control
.
tar
.
gz
||
exit
1
msg
"Create $apk"
mkdir
-
p
"$REPODEST"
/$
repo
/${
subpkgarch
/
noarch
/$
CARCH
}
cat
control
.
tar
.
gz
data
.
tar
.
gz
>
"$REPODEST"
/$
repo
/${
subpkgarch
/
noarch
/$
CARCH
}/$
apk
[
"$subpkgarch"
=
"noarch"
]
&&
subpkgarch
=
"$CARCH"
mkdir
-
p
"$REPODEST"
/$
repo
/$
subpkgarch
cat
control
.
tar
.
gz
data
.
tar
.
gz
>
"$REPODEST"
/$
repo
/$
subpkgarch
/$
apk
)
done
}
...
...
@@ -1840,7 +1844,8 @@ apk_up2date() {
local
i
s
for
i
in
$
allpackages
;
do
subpkg_set
"$i"
if
[
! -f "$REPODEST/$repo/${subpkgarch/noarch/$CARCH}/$subpkgname-$pkgver-r$pkgrel.apk" ]; then
[
"$subpkgarch"
=
"noarch"
]
&&
subpkgarch
=
"$CARCH"
if
[
! -f "$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk" ]; then
subpkg_unset
return
1
fi
...
...
@@ -1855,7 +1860,8 @@ apk_up2date() {
else
s
=
"$startdir/${i##*/}"
fi
if
[
"$s"
-
nt
"$REPODEST/$repo/${pkgarch/noarch/$CARCH}/$pkgname-$pkgver-r$pkgrel.apk"
];
then
[
"$pkgarch"
=
"noarch"
]
&&
pkgarch
=
"$CARCH"
if
[
"$s"
-
nt
"$REPODEST/$repo/$pkgarch/$pkgname-$pkgver-r$pkgrel.apk"
];
then
return
1
fi
done
...
...
@@ -1868,7 +1874,8 @@ abuildindex_up2date() {
for
i
in
$
allpackages
;
do
subpkg_set
"$i"
local
dir
=
"$REPODEST"
/$
repo
/${
subpkgarch
/
noarch
/$
CARCH
}
[
"$subpkgarch"
=
"noarch"
]
&&
subpkgarch
=
"$CARCH"
local
dir
=
"$REPODEST"
/$
repo
/$
subpkgarch
local
idx
=
"$dir"
/
APKINDEX
.
tar
.
gz
local
file
=
"$dir"
/$
subpkgname
-$
pkgver
-
r
$
pkgrel
.
apk
...
...
@@ -2187,7 +2194,7 @@ rootbld() {
local
version
=
"edge"
buildhost
=
"edge"
gitref
if
gitref
=
"$(expr "
$(
git
symbolic
-
ref
--
short
HEAD
)
" : '\([0-9]\+\(\.[0-9]\+\)*\)-')"
;
then
version
=
v
${
gitref
}
buildhost
=
${
gitref
/./-}
buildhost
=
"$(printf '%s' "
$
gitref
" | sed 's/[.]/-/')"
fi
local
repo_template
=$
aportsgit
/$
repo
/.
rootbld
-
repositories
...
...
apkgrel.in
View file @
5ecfc84b
...
...
@@ -130,7 +130,8 @@ fi
args
=
$(
for
a
;
do
p
=
$(
any_buildscript
"
$a
"
)
||
die
"can't find APKBUILD for
$a
"
;
echo
"
$p
"
;
done
)
[
$?
-eq
0
]
||
exit
1
oldifs
=
$IFS
IFS
=
$'
\n
'
IFS
=
"
"
set
--
$args
IFS
=
$oldifs
...
...
bootchartd
View file @
5ecfc84b
...
...
@@ -81,7 +81,7 @@ do_logging()
# Log the command output
eval
$cmd
echo
}
>
&
$fd
}
>
$fd
2>&1
i
=
$((
$i
+
1
))
done
fi
...
...
run-tests.sh
View file @
5ecfc84b
...
...
@@ -141,7 +141,7 @@ newapkbuild_simple_test() {
shift
pattern
=
$1
shift
pushd
"tests/newapkbuild"
1>/dev/null
cd
"tests/newapkbuild"
[
-d
$name
]
&&
rm
-r
$name
newapkbuild
-n
$name
$@
if
[
$?
-ne
0
]
;
then
...
...
@@ -150,7 +150,7 @@ newapkbuild_simple_test() {
fi
grep
$pattern
$name
/APKBUILD 1>/dev/null
expect_success
$name
popd
1>/dev/null
cd
"
$OLDPWD
"
}
...
...
@@ -163,10 +163,10 @@ newapkbuild_simple_test simplever 'pkgver=1.0' simplever-1.0
# $1 - test name (test-autoconf-pkg, etc)
# $2 - the invocation expected ("./configure", "cmake", etc)
newapkbuild_pkg_test
()
{
pushd
"tests/newapkbuild"
1>/dev/null
cd
"tests/newapkbuild"
[
-d
$1
]
&&
rm
-r
$1
newapkbuild
"https://distfiles.adelielinux.org/source/newapkbuild-tests/
$1
-1.0.tar.xz"
1>/dev/null 2>/dev/null
popd
1>/dev/null
cd
"
$OLDPWD
"
if
[
$?
-ne
0
]
;
then
fail
"
$1
: newapkbuild failed"
else
...
...
tests/abuild/checkroot1/APKBUILD
View file @
5ecfc84b
...
...
@@ -13,7 +13,7 @@ subpackages=""
source
=
""
check
()
{
[
$UID
-ne
0
]
||
return
1
[
"
$(
id
-u
)
"
-ne
0
]
||
return
1
}
package
()
{
...
...
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