remove optional xorg overlays

This commit is contained in:
udeved 2014-12-20 14:15:27 +01:00
parent 20aade9825
commit a09a6aab1e
2 changed files with 75 additions and 82 deletions

View file

@ -44,8 +44,6 @@ display_settings(){
msg2 "clean_first: ${clean_first}" msg2 "clean_first: ${clean_first}"
msg2 "auto_svc_conf: ${auto_svc_conf}" msg2 "auto_svc_conf: ${auto_svc_conf}"
msg2 "high_compression: ${high_compression}" msg2 "high_compression: ${high_compression}"
msg2 "xorg_overlays: ${xorg_overlays}"
msg2 "kde_lng_packages: ${kde_lng_packages}"
msg2 "clean_cache_pkgs: ${clean_cache_pkgs}" msg2 "clean_cache_pkgs: ${clean_cache_pkgs}"
msg2 "clean_cache_lng: ${clean_cache_lng}" msg2 "clean_cache_lng: ${clean_cache_lng}"
msg2 "images_only: ${images_only}" msg2 "images_only: ${images_only}"
@ -117,8 +115,6 @@ clean_cache_lng=true
pretend=false pretend=false
verbose=false verbose=false
xorg_overlays=false
kde_lng_packages=false
images_only=false images_only=false
iso_only=false iso_only=false
@ -141,8 +137,6 @@ usage() {
echo ' -c Disable clean work dir and target dir iso' echo ' -c Disable clean work dir and target dir iso'
echo ' -z Disable high compression' echo ' -z Disable high compression'
echo ' -A Disable auto configure services' echo ' -A Disable auto configure services'
echo ' -X Xorg overlays'
echo ' -K kde lng packages'
echo ' -B Build images only' echo ' -B Build images only'
echo ' -G Generate iso only' echo ' -G Generate iso only'
echo ' Requires pre built images' echo ' Requires pre built images'
@ -156,7 +150,7 @@ usage() {
orig_argv=("$@") orig_argv=("$@")
opts='a:b:r:t:i:cvzqXKABGPLh' opts='a:b:r:t:i:cvzqABGPLh'
while getopts "${opts}" arg; do while getopts "${opts}" arg; do
case "${arg}" in case "${arg}" in
@ -166,8 +160,6 @@ while getopts "${opts}" arg; do
t) target_dir="$OPTARG" ;; t) target_dir="$OPTARG" ;;
i) pacman_conf="$OPTARG" ;; i) pacman_conf="$OPTARG" ;;
v) verbose=true; iso_args+=(-v) ;; v) verbose=true; iso_args+=(-v) ;;
X) xorg_overlays=true ;;
K) kde_lng_packages=true ;;
B) images_only=true ;; B) images_only=true ;;
G) iso_only=true ;; G) iso_only=true ;;
q) pretend=true ;; q) pretend=true ;;

View file

@ -504,7 +504,7 @@ make_de_image() {
mkdir -p ${work_dir}/${desktop}-image mkdir -p ${work_dir}/${desktop}-image
if [ ! -z "$(mount -l | grep ${desktop}-image)" ]; then if [[ -n "$(mount -l | grep ${desktop}-image)" ]]; then
umount -l ${work_dir}/${desktop}-image umount -l ${work_dir}/${desktop}-image
fi fi
@ -579,66 +579,6 @@ make_livecd_image() {
fi fi
} }
make_free_image(){
msg "Prepare [pkgs-free-image]"
mkdir -p ${work_dir}/pkgs-free-image
if [ ! -z "$(mount -l | grep pkgs-free-image)" ]; then
umount -l ${work_dir}/pkgs-free-image
fi
msg2 "mount root-image"
mount -t aufs -o br=${work_dir}/pkgs-free-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-free-image
if [ ! -z "${desktop}" ] ; then
msg2 "mount ${desktop}-image"
mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-free-image
fi
mkiso ${create_args[*]} -i "pkgs-free-image" -p "${packages_free}" create "${work_dir}"
# Clean up GnuPG keys
rm -rf "${work_dir}/pkgs-free-image/etc/pacman.d/gnupg"
umount -l ${work_dir}/pkgs-free-image
if [ -e ${work_dir}/pkgs-free-image/etc/modules-load.d/*virtualbox*conf ] ; then
rm ${work_dir}/pkgs-free-image/etc/modules-load.d/*virtualbox*conf
fi
rm -R ${work_dir}/pkgs-free-image/.wh*
msg "Done [pkgs-free-image]"
}
make_non_free_image(){
msg "Prepare [pkgs-nonfree-image]"
mkdir -p ${work_dir}/pkgs-nonfree-image
if [ ! -z "$(mount -l | grep pkgs-nonfree-image)" ]; then
umount -l ${work_dir}/pkgs-nonfree-image
fi
msg2 "mount root-image"
mount -t aufs -o br=${work_dir}/pkgs-nonfree-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-nonfree-image
if [ ! -z "${desktop}" ] ; then
msg2 "mount ${desktop}-image"
mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-nonfree-image
fi
mkiso ${create_args[*]} -i "pkgs-nonfree-image" -p "${packages_nonfree}" create "${work_dir}"
rm -rf "${work_dir}/pkgs-nonfree-image/etc/pacman.d/gnupg"
umount -l ${work_dir}/pkgs-nonfree-image
if [ -e ${work_dir}/pkgs-nonfree-image/etc/modules-load.d/*virtualbox*conf ] ; then
rm ${work_dir}/pkgs-nonfree-image/etc/modules-load.d/*virtualbox*conf
fi
rm -R ${work_dir}/pkgs-nonfree-image/.wh*
msg "Done [pkgs-nonfree-image]"
}
configure_xorg_drivers(){ configure_xorg_drivers(){
# Disable Catalyst if not present # Disable Catalyst if not present
if [ -z "$(ls ${work_dir}/pkgs-image/opt/livecd/pkgs/ | grep catalyst-utils 2> /dev/null)" ]; then if [ -z "$(ls ${work_dir}/pkgs-image/opt/livecd/pkgs/ | grep catalyst-utils 2> /dev/null)" ]; then
@ -678,14 +618,14 @@ make_pkgs_image() {
msg "Prepare [pkgs-image]" msg "Prepare [pkgs-image]"
mkdir -p ${work_dir}/pkgs-image/opt/livecd/pkgs mkdir -p ${work_dir}/pkgs-image/opt/livecd/pkgs
if [ ! -z "$(mount -l | grep pkgs-image)" ]; then if [[ -n "$(mount -l | grep pkgs-image)" ]]; then
umount -l ${work_dir}/pkgs-image umount -l ${work_dir}/pkgs-image
fi fi
msg2 "mount root-image" msg2 "mount root-image"
mount -t aufs -o br=${work_dir}/pkgs-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-image mount -t aufs -o br=${work_dir}/pkgs-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-image
if [ ! -z "${desktop}" ] ; then if [[ -n "${desktop}" ]] ; then
msg2 "mount ${desktop}-image" msg2 "mount ${desktop}-image"
mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-image mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-image
fi fi
@ -693,7 +633,7 @@ make_pkgs_image() {
download_to_cache "${work_dir}/pkgs-image" "${cache_pkgs}" "${packages_xorg}" download_to_cache "${work_dir}/pkgs-image" "${cache_pkgs}" "${packages_xorg}"
copy_cache_pkgs copy_cache_pkgs
if [ ! -z "${packages_xorg_cleanup}" ]; then if [[ -n "${packages_xorg_cleanup}" ]]; then
for xorg_clean in ${packages_xorg_cleanup}; do for xorg_clean in ${packages_xorg_cleanup}; do
rm ${work_dir}/pkgs-image/opt/livecd/pkgs/${xorg_clean} rm ${work_dir}/pkgs-image/opt/livecd/pkgs/${xorg_clean}
done done
@ -709,10 +649,10 @@ make_pkgs_image() {
umount -l ${work_dir}/pkgs-image umount -l ${work_dir}/pkgs-image
rm -R ${work_dir}/pkgs-image/.wh* rm -R ${work_dir}/pkgs-image/.wh*
if ${xorg_overlays}; then # if ${xorg_overlays}; then
make_free_image # make_free_image
make_non_free_image # make_non_free_image
fi # fi
: > ${work_dir}/build.${FUNCNAME} : > ${work_dir}/build.${FUNCNAME}
msg "Done [pkgs-image]" msg "Done [pkgs-image]"
fi fi
@ -723,19 +663,19 @@ make_lng_image() {
msg "Prepare [lng-image]" msg "Prepare [lng-image]"
mkdir -p ${work_dir}/lng-image/opt/livecd/lng mkdir -p ${work_dir}/lng-image/opt/livecd/lng
if [ -n "$(mount -l | grep lng-image)" ]; then if [[ -n "$(mount -l | grep lng-image)" ]]; then
umount -l ${work_dir}/lng-image umount -l ${work_dir}/lng-image
fi fi
msg2 "mount root-image" msg2 "mount root-image"
mount -t aufs -o br=${work_dir}/lng-image:${work_dir}/root-image=ro none ${work_dir}/lng-image mount -t aufs -o br=${work_dir}/lng-image:${work_dir}/root-image=ro none ${work_dir}/lng-image
if [ -n "${desktop}" ] ; then if [[ -n "${desktop}" ]] ; then
msg2 "mount ${desktop}-image" msg2 "mount ${desktop}-image"
mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/lng-image mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/lng-image
fi fi
if ${packages_lng_kde}; then if [[ -n ${packages_lng_kde} ]]; then
download_to_cache "${work_dir}/lng-image" "${cache_lng}" "${packages_lng} ${packages_lng_kde}" download_to_cache "${work_dir}/lng-image" "${cache_lng}" "${packages_lng} ${packages_lng_kde}"
copy_cache_lng copy_cache_lng
else else
@ -743,7 +683,7 @@ make_lng_image() {
copy_cache_lng copy_cache_lng
fi fi
if [ -n "${packages_lng_cleanup}" ]; then if [[ -n "${packages_lng_cleanup}" ]]; then
for lng_clean in ${packages_lng_cleanup}; do for lng_clean in ${packages_lng_cleanup}; do
rm ${work_dir}/lng-image/opt/livecd/lng/${lng_clean} rm ${work_dir}/lng-image/opt/livecd/lng/${lng_clean}
done done
@ -1022,3 +962,64 @@ 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') 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 fi
} }
# make_free_image(){
# msg "Prepare [pkgs-free-image]"
# mkdir -p ${work_dir}/pkgs-free-image
# if [ ! -z "$(mount -l | grep pkgs-free-image)" ]; then
# umount -l ${work_dir}/pkgs-free-image
# fi
#
# msg2 "mount root-image"
# mount -t aufs -o br=${work_dir}/pkgs-free-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-free-image
#
# if [ ! -z "${desktop}" ] ; then
# msg2 "mount ${desktop}-image"
# mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-free-image
# fi
#
# mkiso ${create_args[*]} -i "pkgs-free-image" -p "${packages_free}" create "${work_dir}"
#
# # Clean up GnuPG keys
# rm -rf "${work_dir}/pkgs-free-image/etc/pacman.d/gnupg"
#
# umount -l ${work_dir}/pkgs-free-image
#
# if [ -e ${work_dir}/pkgs-free-image/etc/modules-load.d/*virtualbox*conf ] ; then
# rm ${work_dir}/pkgs-free-image/etc/modules-load.d/*virtualbox*conf
# fi
#
# rm -R ${work_dir}/pkgs-free-image/.wh*
# msg "Done [pkgs-free-image]"
# }
#
# make_non_free_image(){
# msg "Prepare [pkgs-nonfree-image]"
# mkdir -p ${work_dir}/pkgs-nonfree-image
#
# if [ ! -z "$(mount -l | grep pkgs-nonfree-image)" ]; then
# umount -l ${work_dir}/pkgs-nonfree-image
# fi
#
# msg2 "mount root-image"
# mount -t aufs -o br=${work_dir}/pkgs-nonfree-image:${work_dir}/root-image=ro none ${work_dir}/pkgs-nonfree-image
#
# if [ ! -z "${desktop}" ] ; then
# msg2 "mount ${desktop}-image"
# mount -t aufs -o remount,append:${work_dir}/${desktop}-image=ro none ${work_dir}/pkgs-nonfree-image
# fi
#
# mkiso ${create_args[*]} -i "pkgs-nonfree-image" -p "${packages_nonfree}" create "${work_dir}"
#
# rm -rf "${work_dir}/pkgs-nonfree-image/etc/pacman.d/gnupg"
#
# umount -l ${work_dir}/pkgs-nonfree-image
#
# if [ -e ${work_dir}/pkgs-nonfree-image/etc/modules-load.d/*virtualbox*conf ] ; then
# rm ${work_dir}/pkgs-nonfree-image/etc/modules-load.d/*virtualbox*conf
# fi
#
# rm -R ${work_dir}/pkgs-nonfree-image/.wh*
# msg "Done [pkgs-nonfree-image]"
# }