Commit 66d4a341 authored by Frede Hundewadt's avatar Frede Hundewadt

Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x

parents 15da548f 9f16f6ee
Version=0.15.8
Version=0.15.9
PREFIX = /usr/local
SYSCONFDIR = /etc
SYSCONF = \
data/manjaro-tools.conf
data/manjaro-tools.conf \
data/branding.desc.d
BIN_BASE = \
bin/mkchroot \
......
......@@ -88,6 +88,9 @@ overriding
################ buildiso ################
#default branch for iso-profiles repo: v17.1>current release | master>development release
# branch=v17.1
# default iso build list; name without .list extension
# build_list_iso=default
......@@ -103,6 +106,36 @@ overriding
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
########## calamares preferences ##########
#See branding.desc.d for reference
# welcome style for calamares: true="Welcome to the %1 installer." ; false="Welcome to the Calamares installer for %1." (default)
# welcomestyle=false
# welcome image scaled (productWelcome)
# welcomelogo=true
# size and expansion policy for Calamares (possible value: normal,fullscreen,noexpand)
# windowexp=noexpand
# size of Calamares window, expressed as w,h.
# (possible units: pixel (px) or font-units (em))
# windowsize="800px,520px"
# colors for text and background components:
# background of the sidebar
# sidebarbackground=#454948
# text color
# sidebartext=#efefef
# background of the selected step
# sidebartextselect=#4d915e
# text color of the selected step
# sidebartexthighlight=#1a1c1b
################ deployiso ################
# the server user
......@@ -197,6 +230,7 @@ buildiso is used to build manjaro-iso-profiles. It is run insde the profiles fol
~~~
$ buildiso -h
Usage: buildiso [options]
-i Initialize iso-profiles repo [default: v17.1]"
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
-c Disable clean work dir
......@@ -221,6 +255,14 @@ Usage: buildiso [options]
###### * build xfce iso profile for both arches and branch testing on x86_64 build system
* Remember: if you run buildiso for the first time you need to do:
~~~
buildiso -i
~~~
for download in /usr/share/manjaro-tools/iso-profiles our manjaro profiles. You can override in manjaro-tools.conf what branch use with buildiso: v17.1 or master ( development profiles ). The previous command can be used to refresh the profiles as needed in your local.
* i686 (buildsystem is x86_64)
~~~
......
......@@ -16,7 +16,6 @@ DATADIR='@datadir@'
SYSCONFDIR='@sysconfdir@'
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
show_profile(){
......@@ -56,6 +55,7 @@ display_settings(){
show_config
msg "PROFILE:"
msg2 "gitlab brach: %s" "${branch}"
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}"
......@@ -100,9 +100,11 @@ images_only=false
iso_only=false
verbose=false
persist=false
initialize=false
usage() {
echo "Usage: ${0##*/} [options]"
echo " -i Initialize iso-profiles repo [default: ${branch}]"
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
echo " -a <arch> Arch [default: ${target_arch}]"
echo " -b <branch> Branch [default: ${target_branch}]"
......@@ -132,10 +134,11 @@ usage() {
orig_argv=("$@")
opts='p:a:b:r:t:k:i:g:d:cfzxmvqh'
opts='p:a:b:r:t:k:g:d:cfzxmvqhi'
while getopts "${opts}" arg; do
case "${arg}" in
i) initialize=true ;;
a) target_arch="$OPTARG" ;;
b) target_branch="$OPTARG" ;;
c) clean_first=false ;;
......@@ -158,6 +161,13 @@ done
shift $(($OPTIND - 1))
if ${initialize}; then
msg "Initialize iso profiles ${branch}"
init_profiles
msg2 "Done: iso profiles are stored in /usr/share/manjaro-tools/iso-profiles"
exit 1
fi
timer_start=$(get_timer)
check_root "$0" "${orig_argv[@]}"
......
......@@ -23,7 +23,7 @@ display_settings(){
show_config
msg "ARGS:"
msg2 "sync: %s" "${sync}"
# msg2 "sync: %s" "${sync}"
msg2 "abs: %s" "${abs}"
msg2 "clean: %s" "${clean}"
......@@ -38,14 +38,14 @@ load_user_info
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
sync=false
#sync=false
pretend=false
abs=false
clean=false
usage() {
echo "Usage: ${0##*/} [options]"
echo " -s Sync manjaro tree"
#echo " -s Sync manjaro tree"
echo " -a Sync arch abs"
echo ' -c Clean package tree'
echo ' -q Query settings'
......@@ -57,14 +57,14 @@ usage() {
orig_argv=("$@")
opts='sacqh'
opts='acqh'
while getopts "${opts}" arg; do
case "${arg}" in
a) abs=true ;;
c) clean=true ;;
q) pretend=true ;;
s) sync=true ;;
#s) sync=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
......@@ -80,6 +80,6 @@ ${pretend} && display_settings && exit 1
${clean} && clean_dir "${tree_dir}"
${sync} && sync_tree_manjaro
#${sync} && sync_tree_manjaro
${abs} && sync_tree_abs
---
componentName: manjaro
# This selects between different welcome texts. When false, uses
# the traditional "Welcome to the %1 installer.", and when true,
# uses "Welcome to the Calamares installer for %1." This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: ${welcomestyle}
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: ${welcomelogo}
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", never expand, use *windowSize*
windowExpanding: ${windowexp}
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: ${windowsize}
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
strings:
productName: ${dist_name} Linux
shortProductName: ${dist_name}
version: ${dist_release}
shortVersion: ${dist_release}
versionedName: ${dist_name} Linux ${dist_release} "${dist_codename}"
shortVersionedName: ${dist_name} ${dist_release}
bootloaderEntryName: ${dist_name}
# These images are loaded from the branding module directory.
#
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use `welcomeExpandingLogo` to make it non-scaled.
# Recommended size is 320x150.
images:
productLogo: "logo.png"
productIcon: "logo.png"
productWelcome: "languages.png"
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
slideshow: "show.qml"
# Colors for text and background components.
#
# - sidebarBackground is the background of the sidebar
# - sidebarText is the (foreground) text color
# - sidebarTextHighlight sets the background of the selected (current) step.
# Optional, and defaults to the application palette.
# - sidebarSelect is the text color of the selected step.
#
style:
sidebarBackground: "${sidebackground}"
sidebarText: "${sidebartext}"
sidebarTextSelect: "${sidebartextselect}"
sidebarTextHighlight: "${sidebartexthighlight}"
......@@ -37,14 +37,20 @@
################ buildiso ################
#default branch for iso-profiles repo: v18.0 Illyria master>development release
# branch=v18.0
# default iso build list; name without .list extension
# build_list_iso=default
# the dist release; default: auto
# dist_release=17.1
# dist_release=18.0
# the dist codename; default: auto
# dist_codename=Hakoila
# dist_codename=Illyria
# the OS branding; default: auto
# dist_name
# the branding; default: auto
# dist_branding="MJRO"
......@@ -54,11 +60,41 @@
# iso_compression=xz
# unset defaults to given value
# kernel="linux414"
# kernel="linux419"
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
########## calamares preferences ##########
#See branding.desc.d for reference
# welcome style for calamares: true="Welcome to the %1 installer." ; false="Welcome to the Calamares installer for %1." (default)
# welcomestyle=false
# welcome image scaled (productWelcome)
# welcomelogo=true
# size and expansion policy for Calamares (possible value: normal,fullscreen,noexpand)
# windowexp=noexpand
# size of Calamares window, expressed as w,h.
# (possible units: pixel (px) or font-units (em))
# windowsize="800px,520px"
# colors for text and background components:
# background of the sidebar
# sidebarbackground=#454948
# text color
# sidebartext=#efefef
# background of the selected step
# sidebartextselect=#4d915e
# text color of the selected step
# sidebartexthighlight=#1a1c1b
################ deployiso ################
# the server user
......
......@@ -85,6 +85,22 @@ configure_mhwd_drivers(){
mkdir -p $drv_path/virtualbox/
echo "" > $drv_path/virtualbox/MHWDCONFIG
fi
local drv_path=$1/var/lib/mhwd/db/pci/network_drivers
if [ -z "$(ls $path | grep broadcom-wl 2> /dev/null)" ]; then
msg2 "Disabling broadcom-wl driver"
mkdir -p $drv_path/broadcom-wl/
echo "" > $drv_path/broadcom-wl/MHWDCONFIG
fi
if [ -z "$(ls $path | grep rt3562sta 2> /dev/null)" ]; then
msg2 "Disabling rt3562sta driver"
mkdir -p $drv_path/rt3562sta/
echo "" > $drv_path/rt3562sta/MHWDCONFIG
fi
if [ -z "$(ls $path | grep r8168 2> /dev/null)" ]; then
msg2 "Disabling r8168 driver"
mkdir -p $drv_path/r8168/
echo "" > $drv_path/r8168/MHWDCONFIG
fi
}
configure_lsb(){
......@@ -95,6 +111,97 @@ configure_lsb(){
fi
}
configure_branding(){
msg2 "Configuring branding"
echo "---
componentName: manjaro
# This selects between different welcome texts. When false, uses
# the traditional 'Welcome to the %1 installer.', and when true,
# uses 'Welcome to the Calamares installer for %1.'. This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: ${welcomestyle}
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: ${welcomelogo}
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", never expand, use *windowSize*
windowExpanding: ${windowexp}
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: ${windowsize}
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
strings:
productName: ${dist_name} Linux
shortProductName: ${dist_name}
version: ${dist_release}
shortVersion: ${dist_release}
versionedName: ${dist_name} Linux ${dist_release} "\"${dist_codename}"\"
shortVersionedName: ${dist_name} ${dist_release}
bootloaderEntryName: ${dist_name}
# These images are loaded from the branding module directory.
#
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use 'welcomeExpandingLogo' to make it non-scaled.
# Recommended size is 320x150.
images:
productLogo: "logo.png"
productIcon: "logo.png"
productWelcome: "languages.png"
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
slideshow: "show.qml"
# Colors for text and background components.
#
# - sidebarBackground is the background of the sidebar
# - sidebarText is the (foreground) text color
# - sidebarTextHighlight sets the background of the selected (current) step.
# Optional, and defaults to the application palette.
# - sidebarSelect is the text color of the selected step.
#
style:
sidebarBackground: "\"${sidebarbackground}"\"
sidebarText: "\"${sidebartext}"\"
sidebarTextSelect: "\"${sidebartextselect}"\"
sidebarTextHighlight: "\"${sidebartexthighlight}"\"" > $1/usr/share/calamares/branding/manjaro/branding.desc
}
configure_logind(){
msg2 "Configuring logind ..."
local conf=$1/etc/systemd/logind.conf
......@@ -183,9 +290,9 @@ configure_thus(){
echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf"
echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf"
if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]]; then
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
fi
# if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]]; then
# sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
# fi
}
configure_live_image(){
......@@ -194,7 +301,7 @@ configure_live_image(){
configure_system "$1"
configure_services "$1"
configure_calamares "$1"
[[ ${edition} == "sonar" ]] && configure_thus "$1"
# [[ ${edition} == "sonar" ]] && configure_thus "$1"
write_live_session_conf "$1"
msg "Done configuring [livefs]"
}
......
......@@ -311,6 +311,9 @@ make_image_live() {
copy_overlay "${profile_dir}/live-overlay" "${path}"
configure_live_image "${path}"
configure_branding "${path}"
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
reset_pac_conf "${path}"
umount_fs
......
......@@ -316,12 +316,43 @@ init_buildiso(){
iso_label=$(get_iso_label "${dist_branding}${dist_release//.}")
[[ -z ${kernel} ]] && kernel="linux419"
load_run_dir "${profile_repo}"
if [[ -d ${run_dir}/.git ]]; then
current_path=$(pwd)
cd ${run_dir}
branch=$(git rev-parse --abbrev-ref HEAD)
cd ${current_path}
else
[[ -z ${branch} ]] && branch="v18.0" #current branch release
fi
[[ -z ${gpgkey} ]] && gpgkey=''
mhwd_repo="/opt/pkg"
}
init_calamares(){
[[ -z ${welcomestyle} ]] && welcomestyle=false
[[ -z ${welcomelogo} ]] && welcomelogo=true
[[ -z ${windowexp} ]] && windowexp=noexpand
[[ -z ${windowsize} ]] && windowsize="800px,520px"
[[ -z ${sidebarbackground} ]] && sidebarbackground=#454948
[[ -z ${sidebartext} ]] && sidebartext=#efefef
[[ -z ${sidebartextselect} ]] && sidebartextselect=#4d915e
[[ -z ${sidebartexthighlight} ]] && sidebartexthighlight=#1a1c1b
}
init_deployiso(){
host="osdn.net"
......@@ -353,6 +384,8 @@ load_config(){
init_buildiso
init_calamares
init_deployiso
return 0
......@@ -568,7 +601,8 @@ load_pkgs(){
fi
;;
esac
# We can reuse this code
local _edition _edition_rm
case "${edition}" in
'sonar')
......@@ -763,3 +797,26 @@ create_chksums() {
sha1sum $1 > $1.sha1
sha256sum $1 > $1.sha256
}
init_profiles() {
_workdir='/usr/share/manjaro-tools'
if [[ -d ${_workdir}/iso-profiles ]]; then
rm -Rf ${_workdir}/iso-profiles ]]
fi
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
#Check if git clone is done
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
rm -f $i
done
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
rm -Rf $i
done
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
exit 1
fi
}
Markdown is supported
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