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
c6263bae
Commit
c6263bae
authored
Feb 17, 2012
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: remove dependency of sudo
use the abuild-sudo tool instead fixes #951
parent
442e8042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
abuild.in
abuild.in
+14
-12
No files found.
abuild.in
View file @
c6263bae
...
...
@@ -18,9 +18,12 @@ abuild_path=$(readlink -f $0)
# defaults
BUILD_BASE
=
"build-base"
SUDO
=
${
SUDO
:-
"sudo"
}
FAKEROOT
=
${
FAKEROOT
:-
"fakeroot"
}
APK
=
${
APK
:-
apk
}
:
${
APK
:
=abuild-apk
}
:
${
ADDUSER
:
=abuild-adduser
}
:
${
ADDGROUP
:
=abuild-addgroup
}
apk_opt_wait
=
"--wait 30"
# read config
...
...
@@ -100,7 +103,7 @@ cleanup() {
set_xterm_title
""
if
[
-z
"
$install_after
"
]
&&
[
-n
"
$uninstall_after
"
]
;
then
msg
"Uninstalling dependencies..."
$
SUDO
$
APK
del
--quiet
$apk_opt_wait
$uninstall_after
$APK
del
--quiet
$apk_opt_wait
$uninstall_after
fi
if
[
-n
"
$CLEANUP_FILES
"
]
;
then
rm
-f
$CLEANUP_FILES
...
...
@@ -485,13 +488,13 @@ mkusers() {
if
getent group
$i
>
/dev/null
;
then
gopt
=
"-G
$i
"
fi
$
SUDO
adduser
-S
-D
-H
$gopt
$i
||
return
1
$
ADDUSER
-S
-D
-H
$gopt
$i
||
return
1
fi
done
for
i
in
$pkggroups
;
do
if
!
getent group
$i
>
/dev/null
;
then
msg
"Creating group
$i
"
$
SUDO
addgroup
-S
$i
||
return
1
$
ADDGROUP
-S
$i
||
return
1
fi
done
}
...
...
@@ -1289,10 +1292,10 @@ builddeps() {
if
[
-n
"
$install_deps
"
]
&&
[
-z
"
$recursive
"
]
&&
[
-n
"
$deps
"
]
;
then
# make a --simluate run first to detect missing deps
# apk-tools --virtual is no goot at reporting those.
$
SUDO
$
APK
add
--repository
"
$abuildrepo
"
\
$APK
add
--repository
"
$abuildrepo
"
\
$apk_opt_wait
\
--simulate
--quiet
$deps
||
return
1
$
SUDO
$
APK
add
--repository
"
$abuildrepo
"
\
$APK
add
--repository
"
$abuildrepo
"
\
$apk_opt_wait
\
--virtual
.makedepends-
$pkgname
$deps
\
&&
return
0
...
...
@@ -1324,7 +1327,7 @@ builddeps() {
cd
"
$dir
"
&&
$0
$forceroot
$keep
$quiet
$install_deps
\
$recursive
$upgrade
$color_opt
abuildindex
||
return
1
done
$
SUDO
$
APK
add
-u
--repository
"
$abuildrepo
"
\
$APK
add
-u
--repository
"
$abuildrepo
"
\
$apk_opt_wait
\
--virtual
.makedepends-
$pkgname
$deps
}
...
...
@@ -1439,18 +1442,18 @@ post_add() {
post_add
$i
||
return
1
fi
done
$
SUDO
$
APK
add
$apk_opt_wait
-u
"
$pkgf
"
||
die
"Failed to install
$1
"
$APK
add
$apk_opt_wait
-u
"
$pkgf
"
||
die
"Failed to install
$1
"
}
installdeps
()
{
local
deps i
$
SUDO
$
APK
add
$apk_opt_wait
--repository
"
$abuildrepo
"
\
$APK
add
$apk_opt_wait
--repository
"
$abuildrepo
"
\
--virtual
.makedepends-
$pkgname
\
$makedepends
}
uninstalldeps
(){
$
SUDO
$
APK
del
$apk_opt_wait
.makedepends-
$pkgname
$APK
del
$apk_opt_wait
.makedepends-
$pkgname
}
all
()
{
...
...
@@ -1540,7 +1543,6 @@ shift $(( $OPTIND - 1 ))
# check so we are not root
if
[
"
$(
whoami
)
"
=
"root"
]
&&
[
-z
"
$FAKEROOTKEY
"
]
;
then
[
-z
"
$forceroot
"
]
&&
die
"Do not run abuild as root"
SUDO
=
FAKEROOT
=
fi
...
...
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