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
f2d646b3
Commit
f2d646b3
authored
Sep 18, 2016
by
udeved
Browse files
Merge branch 'master' of github.com:manjaro/manjaro-tools into stable-0.13.x
parents
b4389f1c
e3ce3e27
Changes
63
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
f2d646b3
...
...
@@ -64,18 +64,15 @@ LIST_ISO = \
BIN_ISO
=
\
bin/buildiso
\
bin/testiso
\
bin/deployiso
\
bin/check-yaml
bin/deployiso
LIBS_ISO
=
\
lib/util-iso.sh
\
lib/util-iso-aufs.sh
\
lib/util-iso-overlayfs.sh
\
lib/util-iso-image.sh
\
lib/util-iso-calamares.sh
\
lib/util-iso-boot.sh
\
lib/util-publish.sh
\
lib/util-iso-yaml.sh
lib/util-publish.sh
SHARED_ISO
=
\
data/pacman-mhwd.conf
\
...
...
@@ -106,7 +103,43 @@ MAN_XML = \
manjaro-tools.conf.xml
\
profile.conf.xml
all
:
$(BIN_BASE) $(BIN_PKG) $(BIN_ISO) doc
BIN_YAML
=
\
bin/check-yaml
LIBS_YAML
=
\
lib/util-yaml.sh
SHARED_YAML
=
\
data/schemas/bootloader.schema.yaml
\
data/schemas/chrootcfg.schema.yaml
\
data/schemas/displaymanager.schema.yaml
\
data/schemas/finished.schema.yaml
\
data/schemas/fstab.schema.yaml
\
data/schemas/grubcfg.schema.yaml
\
data/schemas/initcpio.schema.yaml
\
data/schemas/keyboard.schema.yaml
\
data/schemas/license.schema.yaml
\
data/schemas/locale.schema.yaml
\
data/schemas/luksopenswaphookcfg.schema.yaml
\
data/schemas/machineid.schema.yaml
\
data/schemas/mhwdcfg.schema.yaml
\
data/schemas/mount.schema.yaml
\
data/schemas/netgroups.schema.yaml
\
data/schemas/netinstall.schema.yaml
\
data/schemas/packages.schema.yaml
\
data/schemas/partition.schema.yaml
\
data/schemas/plymouthcfg.schema.yaml
\
data/schemas/postcfg.schema.yaml
\
data/schemas/removeuser.schema.yaml
\
data/schemas/services.schema.yaml
\
data/schemas/servicescfg.schema.yaml
\
data/schemas/settings.schema.yaml
\
data/schemas/umount.schema.yaml
\
data/schemas/unpackfs.schema.yaml
\
data/schemas/users.schema.yaml
\
data/schemas/welcome.schema.yaml
all
:
$(BIN_BASE) $(BIN_PKG) $(BIN_ISO) $(BIN_YAML) doc
edit
=
sed
-e
"s|@datadir[@]|
$(DESTDIR)$(PREFIX)
/share/manjaro-tools|g"
\
-e
"s|@sysconfdir[@]|
$(DESTDIR)$(SYSCONFDIR)
/manjaro-tools|g"
\
...
...
@@ -190,6 +223,16 @@ install_iso:
gzip
-c
man/manjaro-tools.conf.5
>
$(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
gzip
-c
man/profile.conf.5
>
$(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
install_yaml
:
install
-dm0755
$(DESTDIR)$(PREFIX)
/bin
install
-m0755
${BIN_YAML}
$(DESTDIR)$(PREFIX)
/bin
install
-dm0755
$(DESTDIR)$(PREFIX)/lib/manjaro-tools
install
-m0644
${LIBS_YAML}
$(DESTDIR)$(PREFIX)/lib/manjaro-tools
install
-dm0755
$(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
install
-m0644
${SHARED_YAML}
$(DESTDIR)$(PREFIX)/share/manjaro-tools/schemas
uninstall_base
:
for
f
in
${SYSCONF}
;
do
rm
-f
$(DESTDIR)$(SYSCONFDIR)
/manjaro-tools/
$$
f
;
done
for
f
in
${BIN_BASE}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/bin/
$$
f
;
done
...
...
@@ -210,6 +253,7 @@ uninstall_iso:
for
f
in
${LIST_ISO}
;
do
rm
-f
$(DESTDIR)$(SYSCONFDIR)
/manjaro-tools/iso.list.d/
$$
f
;
done
for
f
in
${BIN_ISO}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/bin/
$$
f
;
done
for
f
in
${SHARED_ISO}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/share/manjaro-tools/
$$
f
;
done
for
f
in
${LIBS_ISO};
do
rm
-f
$(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f;
done
for
f
in
${CPIOHOOKS};
do
rm
-f
$(DESTDIR)$(PREFIX)/lib/initcpio/hooks/$$f;
done
for
f
in
${CPIOINST};
do
rm
-f
$(DESTDIR)$(PREFIX)/lib/initcpio/install/$$f;
done
...
...
@@ -218,9 +262,14 @@ uninstall_iso:
rm
-f
$(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
rm
-f
$(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
install
:
install_base install_pkg install_iso
uninstall_yaml
:
for
f
in
${BIN_YAML}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/bin/
$$
f
;
done
for
f
in
${LIBS_YAML}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/lib/manjaro-tools/
$$
f
;
done
for
f
in
${SHARED_YAML}
;
do
rm
-f
$(DESTDIR)$(PREFIX)
/share/manjaro-tools/schemas/
$$
f
;
done
install
:
install_base install_pkg install_iso install_yaml
uninstall
:
uninstall_base uninstall_pkg uninstall_iso
uninstall
:
uninstall_base uninstall_pkg uninstall_iso
uninstall_yaml
dist
:
git archive
--format
=
tar
--prefix
=
manjaro-tools-
$(Version)
/
$(Version)
|
gzip
-9
>
manjaro-tools-
$(Version)
.tar.gz
...
...
bin/basestrap.in
View file @
f2d646b3
...
...
@@ -28,19 +28,19 @@ copymirrorlist=true
usage
()
{
echo
"usage:
${
0
##*/
}
[options] root [packages...]"
echo
" -C config Use an alternate config file for pacman"
echo
" -c Use the package cache on the host, rather than the target"
echo
" -d Allow installation to a non-mountpoint directory"
echo
" -G Avoid copying the host's pacman keyring to the target"
echo
" -i Avoid auto-confirmation of package selections"
echo
" -M Avoid copying the host's mirrorlist to the target"
echo
" -h Print this help message"
echo
''
echo
' basestrap installs packages to the specified new root directory.'
echo
' If no packages are given, basestrap defaults to the "base" group.'
echo
''
echo
''
exit
$1
echo
" -C config Use an alternate config file for pacman"
echo
" -c Use the package cache on the host, rather than the target"
echo
" -d Allow installation to a non-mountpoint directory"
echo
" -G Avoid copying the host's pacman keyring to the target"
echo
" -i Avoid auto-confirmation of package selections"
echo
" -M Avoid copying the host's mirrorlist to the target"
echo
" -h Print this help message"
echo
''
echo
' basestrap installs packages to the specified new root directory.'
echo
' If no packages are given, basestrap defaults to the "base" group.'
echo
''
echo
''
exit
$1
}
# if [[ -z $1 || $1 = @(-h|--help) ]]; then
...
...
@@ -54,16 +54,16 @@ orig_argv=("$@")
opts
=
':C:cdGiM'
while
getopts
${
opts
}
arg
;
do
case
"
${
arg
}
"
in
C
)
pacman_config
=
$OPTARG
;;
d
)
directory
=
true
;;
c
)
hostcache
=
true
;;
i
)
interactive
=
true
;;
G
)
copykeyring
=
false
;;
M
)
copymirrorlist
=
false
;;
:
)
echo
"invalid argument
${
arg
}
:
$OPTARG
"
;
usage 1
;;
?
)
usage 0
;;
esac
case
"
${
arg
}
"
in
C
)
pacman_config
=
$OPTARG
;;
d
)
directory
=
true
;;
c
)
hostcache
=
true
;;
i
)
interactive
=
true
;;
G
)
copykeyring
=
false
;;
M
)
copymirrorlist
=
false
;;
:
)
echo
"invalid argument
${
arg
}
:
$OPTARG
"
;
usage 1
;;
?
)
usage 0
;;
esac
done
shift
$((
OPTIND
-
1
))
...
...
@@ -82,7 +82,7 @@ ${interactive} && pacman_args+=(--noconfirm)
[[
-d
$newroot
]]
||
die
"%s is not a directory"
"
$newroot
"
if
!
mountpoint
-q
"
$newroot
"
&&
!
${
directory
}
;
then
die
'%s is not a mountpoint!'
"
$newroot
"
die
'%s is not a mountpoint!'
"
$newroot
"
fi
# create obligatory directories
...
...
@@ -93,17 +93,17 @@ chroot_api_mount "$newroot" || die "failed to setup API filesystems in new root"
msg2
'Installing packages to %s'
"
$newroot
"
if
!
pacman
-r
"
$newroot
"
-Sy
"
${
pacman_args
[@]
}
"
;
then
die
'Failed to install packages to new root'
die
'Failed to install packages to new root'
fi
# kill chroot process if needed (TODO: check if needed at all)
kill_chroot_process
"
$newroot
"
if
${
copykeyring
}
;
then
copy_keyring
"
$newroot
"
copy_keyring
"
$newroot
"
fi
if
${
copymirrorlist
}
;
then
copy_mirrorlist
"
$newroot
"
copy_mirrorlist
"
$newroot
"
fi
bin/buildiso.in
View file @
f2d646b3
...
...
@@ -20,92 +20,93 @@ SYSCONFDIR='@sysconfdir@'
import
${
LIBDIR
}
/util.sh
show_profile
(){
prepare_profile
"
$1
"
msg2
"pacman_conf: %s"
"
${
pacman_conf
}
"
if
${
verbose
}
;
then
msg2
"work_dir: %s"
"
${
work_dir
}
"
msg2
"iso_dir: %s"
"
${
iso_dir
}
"
msg2
"iso_file: %s"
"
${
iso_file
}
"
msg2
"autologin: %s"
"
${
autologin
}
"
msg2
"nonfree_mhwd: %s"
"
${
nonfree_mhwd
}
"
msg2
"pxe_boot: %s"
"
${
pxe_boot
}
"
msg2
"plymouth_boot: %s"
"
${
plymouth_boot
}
"
${
plymouth_boot
}
&&
msg2
"plymouth_theme: %s"
"
${
plymouth_theme
}
"
[[
${
target_arch
}
==
'x86_64'
]]
&&
msg2
"multilib: %s"
"
${
multilib
}
"
msg2
"netinstall: %s"
"
${
netinstall
}
"
${
netinstall
}
&&
msg2
"netgroups: %s"
"
$(
get_yaml
)
"
msg2
"unpackfs: %s"
"
${
unpackfs
}
"
msg2
"efi_boot_loader: %s"
"
${
efi_boot_loader
}
"
msg2
"hostname: %s"
"
${
hostname
}
"
msg2
"username: %s"
"
${
username
}
"
msg2
"password: %s"
"
${
password
}
"
msg2
"login_shell: %s"
"
${
login_shell
}
"
msg2
"addgroups: %s"
"
${
addgroups
}
"
[[
-n
${
smb_workgroup
}
]]
&&
msg2
"smb_workgroup: %s"
"
${
smb_workgroup
}
"
if
[[
${
initsys
}
==
'systemd'
]]
;
then
msg2
"enable_systemd: %s"
"
${
enable_systemd
[*]
}
"
msg2
"enable_systemd_live: %s"
"
${
enable_systemd_live
[*]
}
"
[[
-n
${
disable_systemd
[*]
}
]]
&&
msg2
"disable_systemd: %s"
"
${
disable_systemd
[*]
}
"
else
msg2
"enable_openrc: %s"
"
${
enable_openrc
[*]
}
"
msg2
"enable_openrc_live: %s"
"
${
enable_openrc_live
[*]
}
"
[[
-n
${
disable_openrc
[*]
}
]]
&&
msg2
"disable_openrc: %s"
"
${
disable_openrc
[*]
}
"
fi
if
${
torrent
}
;
then
msg2
"tracker_url: %s"
"
${
tracker_url
}
"
msg2
"piece_size: %s"
"
${
piece_size
}
"
fi
fi
reset_profile
prepare_profile
"
$1
"
msg2
"pacman_conf: %s"
"
${
pacman_conf
}
"
if
${
verbose
}
;
then
msg2
"work_dir: %s"
"
${
work_dir
}
"
msg2
"iso_dir: %s"
"
${
iso_dir
}
"
msg2
"iso_file: %s"
"
${
iso_file
}
"
msg2
"autologin: %s"
"
${
autologin
}
"
msg2
"nonfree_mhwd: %s"
"
${
nonfree_mhwd
}
"
msg2
"pxe_boot: %s"
"
${
pxe_boot
}
"
msg2
"plymouth_boot: %s"
"
${
plymouth_boot
}
"
${
plymouth_boot
}
&&
msg2
"plymouth_theme: %s"
"
${
plymouth_theme
}
"
[[
${
target_arch
}
==
'x86_64'
]]
&&
msg2
"multilib: %s"
"
${
multilib
}
"
msg2
"netinstall: %s"
"
${
netinstall
}
"
${
netinstall
}
&&
msg2
"netgroups: %s"
"
$(
get_yaml
)
"
msg2
"unpackfs: %s"
"
${
unpackfs
}
"
msg2
"geoip: %s"
"
${
geoip
}
"
msg2
"efi_boot_loader: %s"
"
${
efi_boot_loader
}
"
msg2
"hostname: %s"
"
${
hostname
}
"
msg2
"username: %s"
"
${
username
}
"
msg2
"password: %s"
"
${
password
}
"
msg2
"login_shell: %s"
"
${
login_shell
}
"
msg2
"addgroups: %s"
"
${
addgroups
}
"
[[
-n
${
smb_workgroup
}
]]
&&
msg2
"smb_workgroup: %s"
"
${
smb_workgroup
}
"
if
[[
${
initsys
}
==
'systemd'
]]
;
then
msg2
"enable_systemd: %s"
"
${
enable_systemd
[*]
}
"
msg2
"enable_systemd_live: %s"
"
${
enable_systemd_live
[*]
}
"
[[
-n
${
disable_systemd
[*]
}
]]
&&
msg2
"disable_systemd: %s"
"
${
disable_systemd
[*]
}
"
else
msg2
"enable_openrc: %s"
"
${
enable_openrc
[*]
}
"
msg2
"enable_openrc_live: %s"
"
${
enable_openrc_live
[*]
}
"
[[
-n
${
disable_openrc
[*]
}
]]
&&
msg2
"disable_openrc: %s"
"
${
disable_openrc
[*]
}
"
fi
if
${
torrent
}
;
then
msg2
"tracker_url: %s"
"
${
tracker_url
}
"
msg2
"piece_size: %s"
"
${
piece_size
}
"
fi
fi
reset_profile
}
display_settings
(){
show_version
show_config
msg
"PROFILE:"
msg2
"list_dir_iso: %s"
"
${
list_dir_iso
}
"
msg2
"build_lists: %s"
"
$(
show_build_lists
${
list_dir_iso
}
)
"
msg2
"build_list_iso: %s"
"
${
build_list_iso
}
"
msg2
"is_build_list: %s"
"
${
is_build_list
}
"
msg2
"build_mirror: %s"
"
${
build_mirror
}
/
${
target_branch
}
"
${
verbose
}
&&
msg2
"run_dir: %s"
"
${
run_dir
}
"
msg
"OPTIONS:"
msg2
"arch: %s"
"
${
target_arch
}
"
msg2
"branch: %s"
"
${
target_branch
}
"
msg2
"chroots_iso: %s"
"
${
chroots_iso
}
"
msg2
"initsys: %s"
"
${
initsys
}
"
msg2
"kernel: %s"
"
${
kernel
}
"
msg
"ARGS:"
msg2
"clean_first: %s"
"
${
clean_first
}
"
msg2
"images_only: %s"
"
${
images_only
}
"
msg2
"iso_only: %s"
"
${
iso_only
}
"
msg2
"sign: %s"
"
${
sign
}
"
msg2
"torrent: %s"
"
${
torrent
}
"
msg
"DIST SETTINGS:"
msg2
"dist_name: %s"
"
${
dist_name
}
"
msg2
"dist_release: %s"
"
${
dist_release
}
"
msg2
"dist_codename: %s"
"
${
dist_codename
}
"
msg
"ISO SETTINGS:"
msg2
"iso_label: %s"
"
${
iso_label
}
"
msg2
"iso_publisher: %s"
"
${
iso_publisher
}
"
msg2
"iso_app_id: %s"
"
${
iso_app_id
}
"
msg2
"iso_compression: %s"
"
${
iso_compression
}
"
msg2
"iso_checksum: %s"
"
${
iso_checksum
}
"
msg2
"use_overlayfs: %s"
"
${
use_overlayfs
}
"
${
verbose
}
&&
msg2
"iso_fs: %s"
"
${
iso_fs
}
"
msg
"BUILD QUEUE:"
run show_profile
"
${
build_list_iso
}
"
show_version
show_config
msg
"PROFILE:"
msg2
"list_dir_iso: %s"
"
${
list_dir_iso
}
"
msg2
"build_lists: %s"
"
$(
show_build_lists
${
list_dir_iso
}
)
"
msg2
"build_list_iso: %s"
"
${
build_list_iso
}
"
msg2
"is_build_list: %s"
"
${
is_build_list
}
"
msg2
"build_mirror: %s"
"
${
build_mirror
}
/
${
target_branch
}
"
${
verbose
}
&&
msg2
"run_dir: %s"
"
${
run_dir
}
"
msg
"OPTIONS:"
msg2
"arch: %s"
"
${
target_arch
}
"
msg2
"branch: %s"
"
${
target_branch
}
"
msg2
"chroots_iso: %s"
"
${
chroots_iso
}
"
msg2
"initsys: %s"
"
${
initsys
}
"
msg2
"kernel: %s"
"
${
kernel
}
"
msg
"ARGS:"
msg2
"clean_first: %s"
"
${
clean_first
}
"
msg2
"images_only: %s"
"
${
images_only
}
"
msg2
"iso_only: %s"
"
${
iso_only
}
"
msg2
"sign: %s"
"
${
sign
}
"
msg2
"torrent: %s"
"
${
torrent
}
"
msg
"DIST SETTINGS:"
msg2
"dist_name: %s"
"
${
dist_name
}
"
msg2
"dist_release: %s"
"
${
dist_release
}
"
msg2
"dist_codename: %s"
"
${
dist_codename
}
"
msg
"ISO SETTINGS:"
msg2
"iso_label: %s"
"
${
iso_label
}
"
msg2
"iso_publisher: %s"
"
${
iso_publisher
}
"
msg2
"iso_app_id: %s"
"
${
iso_app_id
}
"
msg2
"iso_compression: %s"
"
${
iso_compression
}
"
msg2
"iso_checksum: %s"
"
${
iso_checksum
}
"
msg2
"use_overlayfs: %s"
"
${
use_overlayfs
}
"
${
verbose
}
&&
msg2
"iso_fs: %s"
"
${
iso_fs
}
"
msg
"BUILD QUEUE:"
run show_profile
"
${
build_list_iso
}
"
}
load_user_info
...
...
@@ -126,30 +127,30 @@ sign=false
torrent
=
false
usage
()
{
echo
"Usage:
${
0
##*/
}
[options]"
echo
" -p <profile> Buildset or profile [default:
${
build_list_iso
}
]"
echo
" -a <arch> Arch [default:
${
target_arch
}
]"
echo
" -b <branch> Branch [default:
${
target_branch
}
]"
echo
' -r <dir> Chroots directory'
echo
" [default:
${
chroots_iso
}
]"
echo
' -t <dir> Target directory'
echo
" [default:
${
cache_dir_iso
}
]"
echo
' -k <name> Kernel to use'
echo
" [default:
${
kernel
}
]"
echo
' -i <name> Init system to use'
echo
" [default:
${
initsys
}
]"
echo
' -s Sign the iso'
echo
' -c Disable clean work dir'
echo
' -x Build images only'
echo
' -z Generate iso only'
echo
' Requires pre built images (-x)'
echo
' -w Create iso torrent'
echo
' -v Verbose output to log file, show profile detail (-q)'
echo
' -q Query settings and pretend build'
echo
' -h This help'
echo
''
echo
''
exit
$1
echo
"Usage:
${
0
##*/
}
[options]"
echo
" -p <profile> Buildset or profile [default:
${
build_list_iso
}
]"
echo
" -a <arch> Arch [default:
${
target_arch
}
]"
echo
" -b <branch> Branch [default:
${
target_branch
}
]"
echo
' -r <dir> Chroots directory'
echo
" [default:
${
chroots_iso
}
]"
echo
' -t <dir> Target directory'
echo
" [default:
${
cache_dir_iso
}
]"
echo
' -k <name> Kernel to use'
echo
" [default:
${
kernel
}
]"
echo
' -i <name> Init system to use'
echo
" [default:
${
initsys
}
]"
echo
' -s Sign the iso'
echo
' -c Disable clean work dir'
echo
' -x Build images only'
echo
' -z Generate iso only'
echo
' Requires pre built images (-x)'
echo
' -w Create iso torrent'
echo
' -v Verbose output to log file, show profile detail (-q)'
echo
' -q Query settings and pretend build'
echo
' -h This help'
echo
''
echo
''
exit
$1
}
orig_argv
=(
"
$@
"
)
...
...
@@ -157,24 +158,24 @@ orig_argv=("$@")
opts
=
'p:a:b:r:t:k:i:czxswvqh'
while
getopts
"
${
opts
}
"
arg
;
do
case
"
${
arg
}
"
in
p
)
build_list_iso
=
"
$OPTARG
"
;;
a
)
target_arch
=
"
$OPTARG
"
;;
b
)
target_branch
=
"
$OPTARG
"
;;
r
)
chroots_iso
=
"
$OPTARG
"
;;
t
)
cache_dir_iso
=
"
$OPTARG
"
;;
k
)
kernel
=
"
$OPTARG
"
;;
i
)
initsys
=
"
$OPTARG
"
;;
s
)
sign
=
true
;;
c
)
clean_first
=
false
;;
x
)
images_only
=
true
;;
z
)
iso_only
=
true
;;
w
)
torrent
=
true
;;
v
)
verbose
=
true
;;
q
)
pretend
=
true
;;
h|?
)
usage 0
;;
*
)
echo
"invalid argument '
${
arg
}
'"
;
usage 1
;;
esac
case
"
${
arg
}
"
in
p
)
build_list_iso
=
"
$OPTARG
"
;;
a
)
target_arch
=
"
$OPTARG
"
;;
b
)
target_branch
=
"
$OPTARG
"
;;
r
)
chroots_iso
=
"
$OPTARG
"
;;
t
)
cache_dir_iso
=
"
$OPTARG
"
;;
k
)
kernel
=
"
$OPTARG
"
;;
i
)
initsys
=
"
$OPTARG
"
;;
s
)
sign
=
true
;;
c
)
clean_first
=
false
;;
x
)
images_only
=
true
;;
z
)
iso_only
=
true
;;
w
)
torrent
=
true
;;
v
)
verbose
=
true
;;
q
)
pretend
=
true
;;
h|?
)
usage 0
;;
*
)
echo
"invalid argument '
${
arg
}
'"
;
usage 1
;;
esac
done
shift
$((
$OPTIND
-
1
))
...
...
@@ -194,7 +195,7 @@ import ${LIBDIR}/util-iso.sh
check_requirements
for
sig
in
TERM HUP QUIT
;
do
trap
"trap_exit
$sig
\"
$(
gettext
"%s signal caught. Exiting..."
)
\"
\"
$sig
\"
"
"
$sig
"
trap
"trap_exit
$sig
\"
$(
gettext
"%s signal caught. Exiting..."
)
\"
\"
$sig
\"
"
"
$sig
"
done
trap
'trap_exit INT "$(gettext "Aborted by user! Exiting...")"'
INT
trap
'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"'
ERR
...
...
bin/buildpkg.in
View file @
f2d646b3
...
...
@@ -23,52 +23,52 @@ import ${LIBDIR}/util.sh
import
${
LIBDIR
}
/util-pkg.sh
show_pkg
(){
check_build
"
$1
"
cd
$1
source
PKGBUILD
for
n
in
${
pkgname
[@]
}
;
do
msg2
"%s"
"
$n
"
done
cd
..
check_build
"
$1
"
cd
$1
source
PKGBUILD
for
n
in
${
pkgname
[@]
}
;
do
msg2
"%s"
"
$n
"
done
cd
..
}
display_settings
(){
show_version
show_config
msg
"PROFILE:"
msg2
"list_dir_pkg: %s"
"
${
list_dir_pkg
}
"
msg2
"build_lists: %s"
"
$(
show_build_lists
${
list_dir_pkg
}
)
"
msg2
"build_list_pkg: %s"
"
${
build_list_pkg
}
"
msg2
"is_build_list: %s"
"
${
is_build_list
}
"
msg2
"build_mirror: %s"
"
${
build_mirror
}
/
${
target_branch
}
"
show_version
show_config
msg
"PROFILE:"
msg2
"list_dir_pkg: %s"
"
${
list_dir_pkg
}
"
msg2
"build_lists: %s"
"
$(
show_build_lists
${
list_dir_pkg
}
)
"
msg2
"build_list_pkg: %s"
"
${
build_list_pkg
}
"
msg2
"is_build_list: %s"
"
${
is_build_list
}
"
msg2
"build_mirror: %s"
"
${
build_mirror
}
/
${
target_branch
}
"
# msg2 "make_conf_dir: %s" "${make_conf_dir}"
# msg2 "build_profiles: %s" "$(show_build_profiles ${make_conf_dir})"
msg
"OPTIONS:"
msg2
"arch: %s"
"
${
target_arch
}
"
msg2
"branch: %s"
"
${
target_branch
}
"
msg2
"chroots_pkg: %s"
"
${
chroots_pkg
}
"
msg
"OPTIONS:"
msg2
"arch: %s"
"
${
target_arch
}
"
msg2
"branch: %s"
"
${
target_branch
}
"
msg2
"chroots_pkg: %s"
"
${
chroots_pkg
}
"
msg
"ARGS:"
msg2
"clean_first: %s"
"
${
clean_first
}
"
msg2
"wipe_clean: %s"
"
${
wipe_clean
}
"
msg2
"namcap: %s"
"
${
namcap
}
"
msg2
"sign: %s"
"
${
sign
}
"
msg2
"udev_root: %s"
"
${
udev_root
}
"
msg
"ARGS:"
msg2
"clean_first: %s"
"
${
clean_first
}
"
msg2
"wipe_clean: %s"
"
${
wipe_clean
}
"
msg2
"namcap: %s"
"
${
namcap
}
"
msg2
"sign: %s"
"
${
sign
}
"
msg2
"udev_root: %s"
"
${
udev_root
}
"
msg
"PATHS:"
msg2
"work_dir: %s"
"
${
work_dir
}
"
msg2
"pkg_dir: %s"
"
${
pkg_dir
}
"
msg
"PATHS:"
msg2
"work_dir: %s"
"
${
work_dir
}
"
msg2
"pkg_dir: %s"
"
${
pkg_dir
}
"
if
${
clean_first
}
;
then
msg
"PKG:"
msg2
"base_packages: %s"
"
${
base_packages
[*]
}
"
fi
if
${
clean_first
}
;
then
msg
"PKG:"
msg2
"base_packages: %s"
"
${
base_packages
[*]
}
"
fi
msg
"BUILD QUEUE:"
run show_pkg
"
${
build_list_pkg
}
"
msg
"BUILD QUEUE:"
run show_pkg
"
${
build_list_pkg
}
"
}
load_user_info
...
...
@@ -88,23 +88,23 @@ udev_root=false
is_multilib
=
false
usage
()
{
echo
"Usage:
${
0
##*/
}
[options]"
echo
" -p <pkg> Build list or pkg [default:
${
build_list_pkg
}
]"
echo
" -a <arch> Arch [default:
${
target_arch
}
]"
echo
" -b <branch> Branch [default:
${
target_branch
}
]"
echo
' -r <dir> Chroots directory'
echo
" [default:
${
chroots_pkg
}
]"
echo
' -i <pkg> Install a package into the working copy of the chroot'
echo
' -c Recreate chroot'
echo
' -w Clean up cache and sources'
echo
' -n Install and run namcap check'
echo
' -s Sign packages'
echo
' -u Udev base-devel group (no systemd)'
echo
' -q Query settings and pretend build'
echo
' -h This help'
echo
''
echo
''
exit
$1
echo
"Usage:
${
0
##*/
}
[options]"
echo
" -p <pkg> Build list or pkg [default:
${
build_list_pkg
}
]"
echo
" -a <arch> Arch [default:
${
target_arch
}
]"
echo
" -b <branch> Branch [default:
${
target_branch
}
]"
echo
' -r <dir> Chroots directory'
echo
" [default:
${
chroots_pkg
}
]"
echo
' -i <pkg> Install a package into the working copy of the chroot'
echo
' -c Recreate chroot'
echo
' -w Clean up cache and sources'
echo
' -n Install and run namcap check'
echo
' -s Sign packages'
echo
' -u Udev base-devel group (no systemd)'
echo
' -q Query settings and pretend build'
echo
' -h This help'
echo
''
echo
''
exit
$1
}
orig_argv
=(
"
$@
"
)
...
...
@@ -112,21 +112,21 @@ orig_argv=("$@")
opts
=
'p:a:b:r:i:cwnsuqh'
while
getopts
"
${
opts
}
"
arg
;
do
case
"
${
arg
}
"
in
p
)
build_list_pkg
=
"
$OPTARG
"
;;
a
)
target_arch
=
"
$OPTARG
"
;;
b
)
target_branch
=
"
$OPTARG
"
;;
r
)
chroots_pkg
=
"
$OPTARG
"
;;