Commit df49ac86 authored by udeved's avatar udeved
Browse files

Merge branch 'devel'

parents da8865a9 0049e3d4
V=0.9.5.1
V=0.9.5.3
PREFIX = $(PREFIX)/local
......
......@@ -29,17 +29,14 @@ display_settings(){
else
msg2 "manjaro_tools_conf: ${manjaro_tools_conf}"
fi
msg2 "iso_profile: ${iso_profile}"
msg "OPTIONS:"
msg2 "arch: ${arch}"
msg2 "branch: ${branch}"
msg2 "work_dir: ${work_dir}"
msg2 "target_dir: ${target_dir}"
msg2 "cache_pkgs: ${cache_pkgs}"
msg2 "cache_lng: ${cache_lng}"
msg2 "pacman_conf: ${pacman_conf}"
msg2 "pacman_mirrors: ${mirrors_conf}"
msg "ARGS:"
msg2 "clean_first: ${clean_first}"
msg2 "auto_svc_conf: ${auto_svc_conf}"
......@@ -48,6 +45,13 @@ display_settings(){
msg2 "clean_cache_lng: ${clean_cache_lng}"
msg2 "images_only: ${images_only}"
msg2 "iso_only: ${iso_only}"
msg2 "custom_pac_conf: ${custom_pac_conf}"
msg "PATHS:"
msg2 "cache_pkgs: ${cache_pkgs}"
msg2 "cache_lng: ${cache_lng}"
msg2 "pacman_conf: ${pacman_conf}"
msg2 "pacman_mirrors: ${mirrors_conf}"
msg "IMAGES SETTINGS:"
msg2 "manjaro_kernel: ${manjaro_kernel}"
......@@ -117,6 +121,7 @@ pretend=false
verbose=false
images_only=false
iso_only=false
custom_pac_conf=false
pacman_conf_arch='default'
......@@ -130,8 +135,6 @@ usage() {
echo " [default: ${work_dir}]"
echo ' -t <dir> Target iso directory'
echo " [default: ${target_dir}]"
echo " -i <file> Config file for pacman"
echo " [default: ${PKGDATADIR}/pacman-${pacman_conf_arch}.conf]"
echo ' -v Verbose iso compression'
echo ' -q Query settings and pretend build'
echo ' -c Disable clean work dir and target dir iso'
......@@ -142,6 +145,7 @@ usage() {
echo ' Requires pre built images'
echo ' -P Disable clean pkgs cache'
echo ' -L Disable clean lng cache'
echo " -C Use custom pacman.conf in iso profile"
echo ' -h This help'
echo ''
echo ''
......@@ -150,7 +154,7 @@ usage() {
orig_argv=("$@")
opts='a:b:r:t:i:cvzqABGPLh'
opts='a:b:r:t:cvzqABGPLCh'
while getopts "${opts}" arg; do
case "${arg}" in
......@@ -158,11 +162,11 @@ while getopts "${opts}" arg; do
b) branch="$OPTARG" ;;
r) work_dir="$OPTARG" ;;
t) target_dir="$OPTARG" ;;
i) pacman_conf="$OPTARG" ;;
v) verbose=true; iso_args+=(-v) ;;
B) images_only=true ;;
G) iso_only=true ;;
q) pretend=true ;;
C) custom_pac_conf=true ;;
P) clean_cache_pkgs=false ;;
L) clean_cache_lng=false ;;
c) clean_first=false ;;
......@@ -180,8 +184,11 @@ if [[ "$arch" == 'x86_64' ]]; then
pacman_conf_arch='multilib'
fi
load_pacman_conf "${pacman_conf}"
load_pacman_conf "${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
if ${custom_pac_conf};then
pacman_conf="${PWD}/pacman-${pacman_conf_arch}.conf"
else
pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
fi
mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf"
create_args+=(-v -a ${arch} -D ${install_dir} -C ${pacman_conf} -M ${mirrors_conf})
......@@ -197,41 +204,12 @@ ${clean_first} && iso_args+=(-f)
check_root "$0" "${orig_argv[@]}"
get_pkglist
if [ -e Packages-Xorg ] ; then
get_pkglist_xorg
fi
if [ -e Packages-Lng ] ; then
get_pkglist_lng
fi
if [ -e "${pkgsfile}" ] ; then
get_pkglist_de
fi
if [[ -f Packages-Livecd ]]; then
get_pkglist_livecd
fi
load_packages
${pretend} && display_settings && exit 1
compress_images(){
# install common
make_boot
if [ "${arch}" == "x86_64" ]; then
make_efi
make_efiboot
fi
make_isolinux
make_isomounts
make_iso
}
if ${iso_only}; then
[[ ! -d ${work_dir} ]] && die "You need to create images first eg buildiso -B"
[[ ! -d ${work_dir} ]] && die "You need to create images first eg. buildiso -B"
compress_images
exit 1
fi
......@@ -243,31 +221,6 @@ ${clean_cache_lng} && clean_cache "${cache_lng}"
prepare_buildiso
make_images(){
# install basic
make_root_image
# install DE(s)
if [ -e "${pkgsfile}" ] ; then
make_de_image
fi
# install xorg-drivers
if [ -e Packages-Xorg ] ; then
make_pkgs_image
fi
# install translations
if [ -e Packages-Lng ] ; then
make_lng_image
fi
# install overlay
if [[ -f Packages-Livecd ]]; then
make_livecd_image
fi
}
if ${images_only}; then
make_images
warning "Continue with eg. buildiso -Gv ..."
......
......@@ -167,11 +167,11 @@ chrootdir=${chroots}/${branch}/${arch}
pkg_dir_loaded=${pkg_dir}
pkg_dir="${pkg_dir}/${branch}/${arch}"
load_pacman_conf "${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf"
makepkg_conf="${PKGDATADIR}/makepkg-${arch}.conf"
mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf"
mkchroot_args+=(-C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf})
mkchroot_args+=(-L -C ${pacman_conf} -M ${makepkg_conf} -S ${mirrors_conf})
mkchrootpkg_args+=(-r ${chrootdir})
......
......@@ -15,6 +15,7 @@ version=@version@
[[ -r @libdir@/util.sh ]] && source @libdir@/util.sh
working_dir=''
build_locales=false
usage() {
echo "Usage: ${0##*/} [options] working-dir package-list..."
......@@ -23,18 +24,20 @@ usage() {
echo ' -M <file> Location of a makepkg config file'
echo ' -S <file> Location of a pacman-mirrors config file'
echo ' -c <dir> Set pacman cache'
echo ' -L Use build locale.gen en/de'
echo ' -h This message'
exit 1
}
orig_argv=("$@")
while getopts 'hC:M:S:c:' arg; do
while getopts 'hLC:M:S:c:' arg; do
case "$arg" in
C) pac_conf="$OPTARG" ;;
M) makepkg_conf="$OPTARG" ;;
S) mirrors_conf="$OPTARG" ;;
c) cache_dir="$OPTARG" ;;
L) build_locales=true ;;
h|?) usage ;;
*) error "invalid argument '$arg'"; usage ;;
esac
......@@ -76,8 +79,8 @@ fi
basestrap -GMcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
echo 'LANG=C' > "$working_dir/etc/locale.conf"
${build_locales} && printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
${build_locales} && echo 'LANG=C' > "$working_dir/etc/locale.conf"
echo "$version" > "$working_dir/.manjaro-tools"
exec chroot-run \
......
......@@ -13,8 +13,7 @@
################################################
# path to sets
# uncomment if you use a manjaro-tools.conf in your $HOME/.config
# profiledir=/etc/manjaro-tools/sets
profiledir=/etc/manjaro-tools/sets
# default chroot path
# chroots=/srv/manjarobuild
......@@ -45,10 +44,6 @@
# if unset, it defaults to the iso config dir
# target_dir=/srv/manjaro-release-iso
# custom pacman.conf
# needed for custom repos, or use buildiso <args> -i /path/to/pacman.conf
# pacman_conf="/usr/share/manjaro-tools/pacman-default.conf"
# use custom cache, accessible with buildiso <args> -L
# cache_lng=/var/cache/manjaro-tools/lng
......@@ -95,7 +90,6 @@
# names must match openrc service names
# start_openrc=('cronie' 'cupsd' 'metalog')
########### livecd setup #############
# unset defaults to given value
......@@ -108,7 +102,7 @@
# password="manjaro"
# unset defaults to given values
# addgroups="video,audio,power,disk,storage,optical,network,lp,scanner,wheel"
# addgroups="video,audio,power,disk,storage,optical,network,lp,scanner"
# unset defaults to given values
# names must match systemd service names
......
......@@ -936,3 +936,61 @@ get_pkglist_livecd(){
livecd_packages=$(sed "s|#.*||g" "Packages-Livecd" | sed "s| ||g" | sed "s|>dvd.*||g" | sed "s|>blacklist.*||g" | sed "s|>i686.*||g" | sed "s|>x86_64||g" | sed "s|KERNEL|$manjaro_kernel|g" | sed ':a;N;$!ba;s/\n/ /g')
fi
}
load_packages(){
get_pkglist
if [ -e Packages-Xorg ] ; then
get_pkglist_xorg
fi
if [ -e Packages-Lng ] ; then
get_pkglist_lng
fi
if [ -e "${pkgsfile}" ] ; then
get_pkglist_de
fi
if [[ -f Packages-Livecd ]]; then
get_pkglist_livecd
fi
}
compress_images(){
# install common
make_boot
if [ "${arch}" == "x86_64" ]; then
make_efi
make_efiboot
fi
make_isolinux
make_isomounts
make_iso
}
make_images(){
# install basic
make_root_image
# install DE(s)
if [ -e "${pkgsfile}" ] ; then
make_de_image
fi
# install xorg-drivers
if [ -e Packages-Xorg ] ; then
make_pkgs_image
fi
# install translations
if [ -e Packages-Lng ] ; then
make_lng_image
fi
# install overlay
if [[ -f Packages-Livecd ]]; then
make_livecd_image
fi
}
......@@ -368,16 +368,3 @@ load_config(){
return 0
}
load_pacman_conf(){
[[ -f $1 ]] || return 1
if [[ -n ${pacman_conf} ]];then
pacman_conf=${pacman_conf}
else
pacman_conf="$1"
fi
return 0
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment