Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tools
development-tools
manjaro-tools
Commits
0c9d8dab
Commit
0c9d8dab
authored
Oct 14, 2014
by
artoo
Browse files
rm useless features
parent
4168e583
Changes
4
Hide whitespace changes
Inline
Side-by-side
bin/build-set.in
View file @
0c9d8dab
...
...
@@ -22,25 +22,23 @@ fi
run
(){
eval_profile
if
${
pretend
}
;
then
if
${
clean
_rundir
}
;
then
if
${
wipe_
clean
}
;
then
git_clean
"n"
fi
display_settings
exit
1
else
if
${
clean_rundir
}
;
then
if
${
wipe_clean
}
;
then
msg
"Cleaning up ..."
git_clean
"q"
clean_dir
"
${
pkgdir
}
"
fi
display_settings
chroot_init
prepare_dir
"
${
pkgdir
}
"
chroot_build
ch_owner
"
$(
dirname
${
pkgdir
}
)
"
if
${
repo
}
;
then
prepare_dir
"
${
repodir
}
"
repo_create
ch_owner
"
$(
dirname
${
repodir
}
)
"
fi
if
${
sign
}
;
then
sign_pkgs
fi
...
...
@@ -49,9 +47,11 @@ run(){
export
LC_MESSAGES
=
C
arch
=
$(
uname
-m
)
manjaro_tools_conf
=
'@sysconfdir@/manjaro-tools.conf'
if
[[
-
f
${
manjaro_tools_conf
}
]]
;
then
if
[[
-
r
${
manjaro_tools_conf
}
]]
;
then
source
${
manjaro_tools_conf
}
fi
...
...
@@ -67,8 +67,6 @@ else
profile
=
'default'
fi
arch
=
$(
uname
-m
)
if
[[
-n
${
branch
}
]]
;
then
branch
=
${
branch
}
else
...
...
@@ -81,21 +79,13 @@ else
chroots
=
'/srv/manjarobuild'
fi
if
[[
-n
${
repodir
}
]]
;
then
repodir
=
${
repodir
}
/
${
arch
}
else
repodir
=
"/srv/build-repo/
${
arch
}
"
fi
pacman_conf_arch
=
'default'
clean_first
=
false
clean
_rundir
=
false
wipe_
clean
=
false
namcap
=
false
nosystemd
=
false
pretend
=
false
is_profile
=
false
repo
=
false
sign
=
false
base_packages
=(
'base-devel'
)
...
...
@@ -110,21 +100,18 @@ usage() {
echo
" -a <arch> Set arch [default:
${
arch
}
]"
echo
" -b <branch> Set branch [default:
${
branch
}
]"
echo
" -r <dir> Chroots directory [default:
${
chroots
}
]"
echo
' -c Clean chroot and pkg cache'
echo
' -c Clean chroot'
echo
' -w Wipe clean pkgbuild and pkg directory'
echo
' -n Run namcap check'
echo
' -w Wipe clean pkgbuild directory'
echo
' -y Add packages to repo'
echo
' -s Sign packages'
echo
' -q Query settings and pretend build'
echo
' -x Use classic chroot instead of systemd-nspawn'
echo
' Useful for testing if systemd is running to bypass autodetection'
echo
' -h This help'
echo
''
echo
''
exit
1
}
opts
=
'p:a:b:r:cn
wy
sq
x
h'
opts
=
'p:a:b:r:c
w
nsqh'
while
getopts
"
${
opts
}
"
arg
;
do
case
"
${
arg
}
"
in
...
...
@@ -133,12 +120,10 @@ while getopts "${opts}" arg; do
b
)
branch
=
"
$OPTARG
"
;;
r
)
chroots
=
"
$OPTARG
"
;;
c
)
clean_first
=
true
;;
w
)
wipe_clean
=
true
;;
n
)
namcap
=
true
;
mkchrootpkg_args+
=(
-n
)
;;
x
)
nosystemd
=
true
;
mkchroot_args+
=(
-x
)
;;
q
)
pretend
=
true
;;
w
)
clean_rundir
=
true
;;
y
)
repo
=
true
;;
s
)
sign
=
true
;;
q
)
pretend
=
true
;;
h
)
usage
;;
esac
done
...
...
bin/mkchroot.in
View file @
0c9d8dab
...
...
@@ -47,12 +47,11 @@ usage() {
echo
' -n Do not copy config files into the chroot'
echo
' -c <dir> Set pacman cache'
echo
' -b <branch> Set repository branch'
echo
' -x Use classic chroot instead of systemd-nspawn'
echo
' -h This message'
exit
1
}
while
getopts
'r:ufn
x
hC:M:S:c:b:'
arg
;
do
while
getopts
'r:ufnhC:M:S:c:b:'
arg
;
do
case
"
${
arg
}
"
in
r
)
RUN
=
"
$OPTARG
"
;;
u
)
RUN
=
'pacman -Syu --noconfirm'
;;
...
...
@@ -62,7 +61,6 @@ while getopts 'r:ufnxhC:M:S:c:b:' arg; do
c
)
cache_dir
=
"
$OPTARG
"
;;
b
)
branch
=
"
$OPTARG
"
;;
S
)
mirrors_conf
=
"
$OPTARG
"
;;
x
)
nosystemd
=
true
;;
h|?
)
usage
;;
*
)
error
"invalid argument '
${
arg
}
'"
;
usage
;;
esac
...
...
conf/manjaro-tools.conf
View file @
0c9d8dab
#
build-set
config
#
manjaro-tools
config
# path to sets
# profiledir=/etc/manjaro-tools/sets
...
...
@@ -9,11 +9,8 @@
# default branch
# branch=stable
# pkgdir where to
copy
pkgs
# pkgdir where to
move built
pkgs
# pkgdir=/var/cache/manjaro-tools/pkg
# default set; name without .set
suffix
# default set; name without .set
extension
# profile=default
# default repo dir
# repodir=/srv/build-repo
lib/build-api.sh
View file @
0c9d8dab
...
...
@@ -22,17 +22,6 @@ ch_owner(){
chown
-R
"
$(
get_user
)
:users"
"
$1
"
}
repo_create
(){
msg
"Creating repo [
${
repodir
}
] ..."
local
ext
=
'pkg.tar.xz'
for
pkg
in
${
pkgdir
}
/
*
.
${
ext
}
;
do
cp
$pkg
${
repodir
}
/
done
cd
${
repodir
}
local
parent
=
$(
dirname
${
repodir
}
)
repo-add
${
repodir
}
/
${
parent
##*/
}
.db.tar.xz
*
.
${
ext
}
}
sign_pkgs
(){
cd
$pkgdir
su
$(
get_user
)
<<
'
EOF
'
...
...
@@ -87,7 +76,7 @@ clean_dir(){
}
git_clean
(){
msg
"Cleaning
$
{
rundir
}
..."
msg
2
"Cleaning
$
(
pwd
)
..."
git clean
-dfx
$1
}
...
...
@@ -109,10 +98,6 @@ chroot_init(){
elif
${
clean_first
}
;
then
msg
"Creating chroot for [
${
branch
}
] (
${
arch
}
)..."
chroot_clean
clean_dir
${
pkgdir
}
# if ${repo};then
# clean_dir ${repodir}
# fi
chroot_create
else
msg
"Updating chroot for [
${
branch
}
] (
${
arch
}
)..."
...
...
@@ -164,7 +149,6 @@ display_settings(){
msg2
"chrootdir:
${
chrootdir
}
"
msg2
"profiledir:
${
profiledir
}
"
msg2
"pkgdir:
${
pkgdir
}
"
msg2
"repodir:
${
repodir
}
"
msg2
"pacman_conf:
${
pacman_conf
}
"
msg2
"makepkg_conf:
${
makepkg_conf
}
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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