Compare commits

...

19 commits

Author SHA1 Message Date
udeved
d33c5e61a6 buildiso: fix typo which prevents kernel version to load for installer 2016-06-06 20:08:20 +02:00
udeved
f729d6cc0e [util] die instead of abort 2016-05-23 07:38:02 +02:00
udeved
0b138d9132 buildiso: die on local repo usage #221 2016-05-23 07:37:51 +02:00
udeved
cd3938d41d buildiso: move user-repos.conf to profile_dir #221 2016-05-23 07:37:40 +02:00
udeved
ef2469e764 [util-iso] clean up set_pacman_conf() 2016-05-23 07:37:21 +02:00
Philip
6a8518dc0f [util-iso-calamares] only write barnding if file exists 2016-05-21 10:50:59 +02:00
Philip
aa9bc91f5e bump to v0.11.7 2016-05-21 08:36:03 +02:00
udeved
a7af8cfb35 buildiso: some tweaks #196 2016-05-21 08:35:29 +02:00
udeved
024a4fb7d0 buildiso: redo custom repo support 2016-05-21 08:35:20 +02:00
udeved
47095986af [util] tweak info msg when restoring pacman.conf 2016-05-21 08:35:12 +02:00
udeved
5ae0bd5f20 [util-iso] use reset_pac_conf() 2016-05-21 08:35:01 +02:00
udeved
cd376c8b4f [util]add reset_pac_conf() to be used in buildiso 2016-05-21 08:34:52 +02:00
Bernhard Landauer
c2d57e0529 docbook: add buildiso -s and little typo 2016-05-21 08:34:43 +02:00
Philip
118d70655f [util] remove audio group as pulse don't need it 2016-05-15 00:14:16 +02:00
Philip
32c9f536cc [util-iso-boot] use PreLoader.efi 2016-05-14 09:16:52 +02:00
Philip
c5bdff8471 [util-iso] Starting with dosfstools 4.0-1 the mkfs executable is called 'mkfs.fat' 2016-05-14 01:40:47 +02:00
Philip
6ff3c6804f [util-iso-boot] proper path 2016-05-14 01:40:31 +02:00
Philip
c71e40d847 [util-iso-boot] proper loader name 2016-05-14 01:40:11 +02:00
Philip
70b76db9fa [util-iso-boot] use efitools 2016-05-14 01:39:53 +02:00
7 changed files with 121 additions and 109 deletions

View file

@ -1,4 +1,4 @@
Version=0.11.6 Version=0.11.7
PREFIX = /usr/local PREFIX = /usr/local
SYSCONFDIR = /etc SYSCONFDIR = /etc

View file

@ -51,7 +51,6 @@ show_profile(){
msg2 "start_openrc_live: %s" "${start_openrc_live[*]}" msg2 "start_openrc_live: %s" "${start_openrc_live[*]}"
msg2 "disable_openrc: %s" "${disable_openrc[*]}" msg2 "disable_openrc: %s" "${disable_openrc[*]}"
fi fi
# msg2 "is_custom_pac_conf: %s" "${is_custom_pac_conf}"
fi fi
reset_profile reset_profile
} }
@ -95,6 +94,7 @@ display_settings(){
msg2 "iso_checksum: %s" "${iso_checksum}" msg2 "iso_checksum: %s" "${iso_checksum}"
msg2 "use_overlayfs: %s" "${use_overlayfs}" msg2 "use_overlayfs: %s" "${use_overlayfs}"
${verbose} && msg2 "iso_fs: %s" "${iso_fs}" ${verbose} && msg2 "iso_fs: %s" "${iso_fs}"
msg2 "pacman_conf: %s" "${pacman_conf}"
msg "BUILD QUEUE:" msg "BUILD QUEUE:"
run show_profile "${buildset_iso}" run show_profile "${buildset_iso}"

View file

@ -104,11 +104,17 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>-i systend|openrc</option></term> <term><option>-i systemd|openrc</option></term>
<listitem><para>The init system on the iso</para></listitem> <listitem><para>The init system on the iso</para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>-s</option></term>
<listitem><para>Sign the iso.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>-k linuxXXX</option></term> <term><option>-k linuxXXX</option></term>

View file

@ -59,8 +59,8 @@ gen_boot_image(){
copy_efi_loaders(){ copy_efi_loaders(){
msg2 "Copying efi loaders ..." msg2 "Copying efi loaders ..."
cp $1/usr/lib/prebootloader/PreLoader.efi $2/bootx64.efi cp $1/usr/share/efitools/efi/PreLoader.efi $2/bootx64.efi
cp $1/usr/lib/prebootloader/HashTool.efi $2/ cp $1/usr/share/efitools/efi/HashTool.efi $2/
cp $1/usr/lib/systemd/boot/efi/systemd-bootx64.efi $2/loader.efi cp $1/usr/lib/systemd/boot/efi/systemd-bootx64.efi $2/loader.efi
} }

View file

@ -11,28 +11,30 @@
write_calamares_branding_desc(){ write_calamares_branding_desc(){
local conf="$1/usr/share/calamares/branding/sonar/branding.desc" local conf="$1/usr/share/calamares/branding/sonar/branding.desc"
echo '---' > "$conf" if [[ -f "$conf" ]];then
echo "componentName: sonar" >> $conf echo '---' > "$conf"
echo '' >> $conf echo "componentName: sonar" >> "$conf"
echo 'strings:' >> $conf echo '' >> $conf
echo " productName: ${dist_name} GNU Linux" >> $conf echo 'strings:' >> $conf
echo " shortProductName: ${dist_name}" >> $conf echo " productName: ${dist_name} GNU Linux" >> "$conf"
echo " version: ${dist_release}" >> $conf echo " shortProductName: ${dist_name}" >> "$conf"
echo " shortVersion: ${dist_release}" >> $conf echo " version: ${dist_release}" >> "$conf"
echo " versionedName: ${dist_name} GNU Linux ${dist_release}" >> $conf echo " shortVersion: ${dist_release}" >> "$conf"
echo " shortVersionedName: ${dist_name} Linux ${dist_release}" >> $conf echo " versionedName: ${dist_name} GNU Linux ${dist_release}" >> "$conf"
echo " bootloaderEntryName: ${dist_name}" >> $conf echo " shortVersionedName: ${dist_name} Linux ${dist_release}" >> "$conf"
echo '' >> $conf echo " bootloaderEntryName: ${dist_name}" >> "$conf"
echo 'images:' >> $conf echo '' >> $conf
echo ' productLogo: "squid.png"' >> $conf echo 'images:' >> $conf
echo ' productIcon: "logo.png"' >> $conf echo ' productLogo: "squid.png"' >> "$conf"
echo ' productWelcome: "languages.png"' >> $conf echo ' productIcon: "logo.png"' >> "$conf"
echo '' >> $conf echo ' productWelcome: "languages.png"' >> "$conf"
echo 'slideshow: "show.qml"' >> $conf echo '' >> $conf
echo 'style:' >> $conf echo 'slideshow: "show.qml"' >> "$conf"
echo ' sidebarBackground: "#292F34"' >> $conf echo 'style:' >> $conf
echo ' sidebarText: "#FFFFFF"' >> $conf echo ' sidebarBackground: "#292F34"' >> "$conf"
echo ' sidebarTextSelect: "#292F34"' >> $conf echo ' sidebarText: "#FFFFFF"' >> "$conf"
echo ' sidebarTextSelect: "#292F34"' >> "$conf"
fi
} }
write_calamares_machineid_conf(){ write_calamares_machineid_conf(){
@ -201,7 +203,7 @@ write_cli_inst_conf(){
echo "iso_name=${iso_name}" >> ${conf} echo "iso_name=${iso_name}" >> ${conf}
echo '' >> ${conf} echo '' >> ${conf}
echo '# kernel' >> ${conf} echo '# kernel' >> ${conf}
echo "kernnel=${kernel}" >> ${conf} echo "kernel=${kernel}" >> ${conf}
} }
configure_cli_inst(){ configure_cli_inst(){

View file

@ -59,25 +59,6 @@ run_safe() {
set +e set +e
} }
# clean_pacman_conf(){
# local repositories=$(get_repos "${pacman_conf}") uri='file://'
# msg "Cleaning [%s/etc/pacman.conf] ..." "$1"
# for repo in ${repositories[@]}; do
# case ${repo} in
# 'options'|'core'|'extra'|'community'|'multilib') continue ;;
# *)
# msg2 "parsing [%s] ..." "${repo}"
# parse_section "${repo}" "${pacman_conf}"
# if [[ ${pc_value} == $uri* ]]; then
# msg2 "Removing local repo [%s] ..." "${repo}"
# sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf
# fi
# ;;
# esac
# done
# msg "Done cleaning [%s/etc/pacman.conf]" "$1"
# }
# $1: image path # $1: image path
make_sqfs() { make_sqfs() {
if [[ ! -d "$1" ]]; then if [[ ! -d "$1" ]]; then
@ -204,6 +185,13 @@ gen_iso_fn(){
echo $name echo $name
} }
reset_pac_conf(){
info "Restoring [%s/etc/pacman.conf] ..." "$1"
sed -e 's|^.*HoldPkg.*|HoldPkg = pacman glibc manjaro-system|' \
-e "s|^.*#CheckSpace|CheckSpace|" \
-i "$1/etc/pacman.conf"
}
# Base installation (root-image) # Base installation (root-image)
make_image_root() { make_image_root() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
@ -216,7 +204,9 @@ make_image_root() {
pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" pacman -Qr "${path}" > "${path}/root-image-pkgs.txt"
copy_overlay "${profile_dir}/root-overlay" "${path}" copy_overlay "${profile_dir}/root-overlay" "${path}"
configure_root_image "${path}" configure_root_image "${path}"
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
reset_pac_conf "${path}"
clean_up_image "${path}" clean_up_image "${path}"
: > ${work_dir}/build.${FUNCNAME} : > ${work_dir}/build.${FUNCNAME}
msg "Done [Base installation] (root-image)" msg "Done [Base installation] (root-image)"
@ -237,7 +227,8 @@ make_image_custom() {
cp "${path}/${profile}-image-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt cp "${path}/${profile}-image-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt
[[ -e ${profile_dir}/${profile}-overlay ]] && copy_overlay "${profile_dir}/${profile}-overlay" "${path}" [[ -e ${profile_dir}/${profile}-overlay ]] && copy_overlay "${profile_dir}/${profile}-overlay" "${path}"
configure_custom_image "${path}" configure_custom_image "${path}"
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
reset_pac_conf "${path}"
umount_image umount_image
clean_up_image "${path}" clean_up_image "${path}"
@ -267,7 +258,8 @@ make_image_live() {
pacman -Qr "${path}" > "${path}/live-image-pkgs.txt" pacman -Qr "${path}" > "${path}/live-image-pkgs.txt"
copy_overlay "${profile_dir}/live-overlay" "${path}" copy_overlay "${profile_dir}/live-overlay" "${path}"
configure_live_image "${path}" configure_live_image "${path}"
# ${is_custom_pac_conf} && clean_pacman_conf "${path}"
reset_pac_conf "${path}"
umount_image umount_image
@ -287,7 +279,7 @@ make_image_mhwd() {
mount_image_select "${path}" mount_image_select "${path}"
# ${is_custom_pac_conf} && clean_pacman_conf "${path}" reset_pac_conf "${path}"
download_to_cache "${path}" "${packages}" download_to_cache "${path}" "${packages}"
@ -363,7 +355,7 @@ make_efiboot() {
local path_iso="${work_dir}/iso" local path_iso="${work_dir}/iso"
mkdir -p ${path_iso}/EFI/miso mkdir -p ${path_iso}/EFI/miso
truncate -s ${efi_part_size} ${path_iso}/EFI/miso/${iso_name}.img truncate -s ${efi_part_size} ${path_iso}/EFI/miso/${iso_name}.img
mkfs.vfat -n MISO_EFI ${path_iso}/EFI/miso/${iso_name}.img mkfs.fat -n MISO_EFI ${path_iso}/EFI/miso/${iso_name}.img
mkdir -p ${work_dir}/efiboot mkdir -p ${work_dir}/efiboot
mount ${path_iso}/EFI/miso/${iso_name}.img ${work_dir}/efiboot mount ${path_iso}/EFI/miso/${iso_name}.img ${work_dir}/efiboot
local path_efi="${work_dir}/efiboot/EFI" local path_efi="${work_dir}/efiboot/EFI"
@ -526,16 +518,6 @@ load_pkgs(){
fi fi
} }
check_custom_pacman_conf(){
# if [[ -f ${profile_dir}/pacman-${pacman_conf_arch}.conf ]]; then
# pacman_conf="${profile_dir}/pacman-${pacman_conf_arch}.conf"
# is_custom_pac_conf=true
# else
pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf"
# is_custom_pac_conf=false
# fi
}
check_profile(){ check_profile(){
local keyfiles=("${profile_dir}/mkinitcpio.conf" local keyfiles=("${profile_dir}/mkinitcpio.conf"
"${profile_dir}/Packages-Root" "${profile_dir}/Packages-Root"
@ -663,15 +645,28 @@ make_profile(){
show_elapsed_time "${FUNCNAME}" "${timer_start}" show_elapsed_time "${FUNCNAME}" "${timer_start}"
} }
set_pacman_conf(){
local user_conf=${profile_dir}/user-repos.conf
if [[ -f ${user_conf} ]];then
info "detected: %s" "user-repos.conf"
check_user_repos_conf "${user_conf}"
local conf=/tmp/custom-pacman.conf
cat ${DATADIR}/pacman-${pacman_conf_arch}.conf > "$conf"
cat ${user_conf} >> "$conf"
pacman_conf="$conf"
else
pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf"
fi
}
load_profile(){ load_profile(){
conf="${profile_dir}/profile.conf" conf="${profile_dir}/profile.conf"
info "Profile: [%s]" "${profile}" info "Profile: [%s]" "${profile}"
load_profile_config "$conf" load_profile_config "$conf"
# check_custom_pacman_conf set_pacman_conf
pacman_conf="${DATADIR}/pacman-${pacman_conf_arch}.conf"
iso_file=$(gen_iso_fn).iso iso_file=$(gen_iso_fn).iso

View file

@ -9,49 +9,58 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# $1: section # $1: section
# parse_section() { parse_section() {
# local is_section=0 local is_section=0
# while read line; do while read line; do
# [[ $line =~ ^\ {0,}# ]] && continue [[ $line =~ ^\ {0,}# ]] && continue
# [[ -z "$line" ]] && continue [[ -z "$line" ]] && continue
# if [ $is_section == 0 ]; then if [ $is_section == 0 ]; then
# if [[ $line =~ ^\[.*?\] ]]; then if [[ $line =~ ^\[.*?\] ]]; then
# line=${line:1:$((${#line}-2))} line=${line:1:$((${#line}-2))}
# section=${line// /} section=${line// /}
# if [[ $section == $1 ]]; then if [[ $section == $1 ]]; then
# is_section=1 is_section=1
# continue continue
# fi fi
# continue continue
# fi fi
# elif [[ $line =~ ^\[.*?\] && $is_section == 1 ]]; then elif [[ $line =~ ^\[.*?\] && $is_section == 1 ]]; then
# break break
# else else
# pc_key=${line%%=*} pc_key=${line%%=*}
# pc_key=${pc_key// /} pc_key=${pc_key// /}
# pc_value=${line##*=} pc_value=${line##*=}
# pc_value=${pc_value## } pc_value=${pc_value## }
# eval "$pc_key='$pc_value'" eval "$pc_key='$pc_value'"
# fi fi
# done < "$2" done < "$2"
# } }
#
# get_repos() { get_repos() {
# local section repos=() filter='^\ {0,}#' local section repos=() filter='^\ {0,}#'
# while read line; do while read line; do
# [[ $line =~ "${filter}" ]] && continue [[ $line =~ "${filter}" ]] && continue
# [[ -z "$line" ]] && continue [[ -z "$line" ]] && continue
# if [[ $line =~ ^\[.*?\] ]]; then if [[ $line =~ ^\[.*?\] ]]; then
# line=${line:1:$((${#line}-2))} line=${line:1:$((${#line}-2))}
# section=${line// /} section=${line// /}
# case ${section} in case ${section} in
# "options") continue ;; "options") continue ;;
# *) repos+=("${section}") ;; *) repos+=("${section}") ;;
# esac esac
# fi fi
# done < "$1" done < "$1"
# echo ${repos[@]} echo ${repos[@]}
# } }
check_user_repos_conf(){
local repositories=$(get_repos "$1") uri='file://'
for repo in ${repositories[@]}; do
msg2 "parsing repo [%s] ..." "${repo}"
parse_section "${repo}" "$1"
[[ ${pc_value} == $uri* ]] && die "Using local repositories is not supported!"
done
}
read_set(){ read_set(){
local _space="s| ||g" \ local _space="s| ||g" \
@ -407,7 +416,7 @@ load_profile_config(){
[[ -z ${password} ]] && password="manjaro" [[ -z ${password} ]] && password="manjaro"
if [[ -z ${addgroups} ]];then if [[ -z ${addgroups} ]];then
addgroups="video,audio,power,disk,storage,optical,network,lp,scanner,wheel" addgroups="video,power,disk,storage,optical,network,lp,scanner,wheel"
fi fi
if [[ -z ${start_systemd[@]} ]];then if [[ -z ${start_systemd[@]} ]];then