From cb984070b945b804842a392e76b0058c893b7c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 20 Mar 2015 05:19:40 +0100 Subject: [PATCH 001/127] Add buildiso and profile.conf manpages. --- man/buildiso.xml | 172 +++++++++++++++++++++++++++++++++++++ man/profile.conf.xml | 199 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 371 insertions(+) create mode 100644 man/buildiso.xml create mode 100644 man/profile.conf.xml diff --git a/man/buildiso.xml b/man/buildiso.xml new file mode 100644 index 0000000..ea0f08e --- /dev/null +++ b/man/buildiso.xml @@ -0,0 +1,172 @@ + + + + + + + + + buildiso-+ + manjaro-tools + + + + + + + + + + + + + buildiso + 1 + + + + buildiso + buildiso is used to build a particular ISO or a set of ISOs. + + + + + buildiso + OPTIONS + + + + + Description + + buildiso is used to build a particular ISO or a set of ISOs. + + With buildiso you can build ISOs suitable to be booted from a removable media + like a DVD o a USB Stick, it will automatically create the necessary files to + install this ISO using calamares or the cli installer. + + + + + Options + + The following options are understood: + + + + + + Name of the buildset or name of the directory + you will build. It needs to cantains a existing buildset or a + folder with a valid profile. + + + + + + Architecture that the iso will be built. Can be i686 or x86_64. + + + + + + Branch where the mirrors in the iso will point. + + + + + + Root working directory where the iso will be built. + + + + + + Disable clean iso cache step. + + + + + + Disable clean working directory step. + + + + + + Disable cleaning the xorg packages cache. Xorg packages + are the packages listed in Packages-Xorg file within each profile and are + used for the + mhwd1 tool. + + + + + + Disable cleaning the language packages cache. Language + packages cache are listed in Packages-Lng and are used to bundle multiple + language packages with the iso. + + + + + + Only build images, without creating an ISO file. + + + + + + Generate iso from already created images, for example created with the -i option. + + + + + + Query settings and pretend build. + + + + + + Help. + + + + + + + + See Also + + manjaro-tools.conf5, + profiles.conf5, + + + + + diff --git a/man/profile.conf.xml b/man/profile.conf.xml new file mode 100644 index 0000000..8bda341 --- /dev/null +++ b/man/profile.conf.xml @@ -0,0 +1,199 @@ + + + + + + + + + profile.conf-+ + manjaro-tools + + + + + + + + + + + + + profile.conf + 1 + + + + profile.conf + configuration file for the individual profiles + + + + profile.conf + + + + Description + + profile.conf is a configuration file used to modify how the ISO will be built. + + By default all the options in the file are commented, with a value equal to the + default value. To change it just uncomment and put the desired value. + + + + + Options + + The following options are understood: + + + + initsys= + + Takes (the default) + or . Selecting and option will change + how the hostname, the displaymanager and services will be configured. + For services also controls if buildiso will use start_systemd... or + start_openrc... to determine the default services that will be enabled + automatically. + + + + displaymanager= + + Takes a value of + lightdm, + sddm, + gdm, + mdm, + lxdm. Defaults to empty value, + which wont configure any display manager. + + + + + kernel= + + Takes a string corresponding to a + manjaro kernel package (ex: linu310 or linux 310). + + + + + efi_boot_loader= + + Takes grub or gummibot. Configures + calamares to use that bootloader. + + + + + plymouth_theme= + + Takes the name of the plymouth + theme. It should be the directory of a valid + plymouth theme installed in /usr/share/plymouth/themes/ + + + + + start_systemd= + + Array of services that will be + enabled in systemd systems. It has to match + the names of .service systemd files. + + + + + start_openrc= + + Array of services that will be + enabled in openrc systems. + + + + + hostname= + + Hostname for the ISO. + + + + + username= + + Username of the default user + that will be created in the live-cd. + + + + + password= + + Password of the default user + that will be created in the live-cd. + + + + + addgroups= + + Default groups of the default user + in the live-cd and the user created while installing + the iso using calamares. + + + + + start_systemd_live= + + Array of services that will be + enabled in the systemd live-cd. It has to match + the names of .service systemd files. + + + + + start_openrc_live= + + Array of services that will be + enabled in the openrc live-cd. + + + + + + + + + See Also + + manjaro-tools.conf5, + buildiso1, + + + + + + From 2dc62efb97811646c76f4eb472121e225fed736d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Thu, 2 Apr 2015 07:15:14 +0200 Subject: [PATCH 002/127] Use same xorg keyboard configuration file for openrc and systemd --- lib/util-livecd.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/util-livecd.sh b/lib/util-livecd.sh index 562498c..6dda748 100644 --- a/lib/util-livecd.sh +++ b/lib/util-livecd.sh @@ -80,12 +80,7 @@ write_x11_config(){ # create X11 keyboard layout config mkdir -p "$1/etc/X11/xorg.conf.d" - - if [[ -f $1/usr/bin/openrc ]]; then - local XORGKBLAYOUT="$1/etc/X11/xorg.conf.d/20-keyboard.conf" - else - local XORGKBLAYOUT="$1/etc/X11/xorg.conf.d/00-keyboard.conf" - fi + local XORGKBLAYOUT="$1/etc/X11/xorg.conf.d/00-keyboard.conf" echo "" >> "$XORGKBLAYOUT" echo "Section \"InputClass\"" > "$XORGKBLAYOUT" From c638683a9c6730dbb93b1c28f9b6033b1f41c8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 15 May 2015 17:15:24 +0200 Subject: [PATCH 003/127] [man: buildiso] Fix typo. --- man/buildiso.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/buildiso.xml b/man/buildiso.xml index ea0f08e..8480662 100644 --- a/man/buildiso.xml +++ b/man/buildiso.xml @@ -137,9 +137,9 @@ Generate iso from already created images, for example created with the -i option. - + - + Query settings and pretend build. From 80dd0fdf7881eddc97526d2ef8f762046f9040f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 15 May 2015 17:16:50 +0200 Subject: [PATCH 004/127] [man: profile.conf] change wording, add new configuration options. --- man/profile.conf.xml | 98 +++++++++++++++++++++++++++++++++----------- 1 file changed, 75 insertions(+), 23 deletions(-) diff --git a/man/profile.conf.xml b/man/profile.conf.xml index 8bda341..12f4daa 100644 --- a/man/profile.conf.xml +++ b/man/profile.conf.xml @@ -73,32 +73,74 @@ Takes (the default) or . Selecting and option will change how the hostname, the displaymanager and services will be configured. - For services also controls if buildiso will use start_systemd... or - start_openrc... to determine the default services that will be enabled - automatically. + For services also controls if buildiso will use start_systemd and + start_systemd_live or start_openrc and start_openrc_live to determine + the default services that will be enabled automatically. + - + displaymanager= - Takes a value of - lightdm, - sddm, - gdm, - mdm, - lxdm. Defaults to empty value, - which wont configure any display manager. - + Takes a value of + , + , + , + , + . Defaults to "none" value, + which won't configure any display manager. + - + + + default_desktop_executable= + default_desktop_file= + + Executable and desktop file used to set witch + desktop environment the display manager will run by default. + default_desktop_executable= defines a binary in /usr/bin and + default_desktop_file a .desktop file in /usr/share/xsessions, + skipping the .desktop part. + + default_desktop_executable=startxfce4 + default_desktop_file=xfce + + If one or both values are not set or "none" (the default) buildiso + will try to autodetect the desktop environment. + + + Incomplete list of possible values: + + + Desktop Desktop executable Desktop file + -------------------------------------------------------- + Budgie budgie-session budgie-session + Cinnamon cinnamon-session cinnamon-session + Enlightenment enlightenment_start enlightenment + Gnome gnome-session gnome + i3 i3 i3 + KDE Plasma 4 startkde kde-plasma + KDE Plasma 5 startkde plasma + LXDE lxsession LXDE + LXDE startlxde LXDE + LXQt lxqt-session lxqt + Mate mate-session mate + Openbox openbox-session openbox + Pantheon pantheon-session pantheon + PekWM pekwm pekwm + Xfce startxfce4 xfce + + + + kernel= Takes a string corresponding to a - manjaro kernel package (ex: linu310 or linux 310). + manjaro kernel package (ex: linux318 for linux 3.18). - + efi_boot_loader= @@ -106,7 +148,17 @@ calamares to use that bootloader. - + + + efi_part_size= + + Size in MiB of the fat partition where + the kernel is. This is useful if you add extra hooks + in the mkinitcpio.conf and it's to big to fit in the + partition. The default is "32M". + + + plymouth_theme= @@ -115,7 +167,7 @@ plymouth theme installed in /usr/share/plymouth/themes/ - + start_systemd= @@ -124,7 +176,7 @@ the names of .service systemd files. - + start_openrc= @@ -132,14 +184,14 @@ enabled in openrc systems. - + hostname= Hostname for the ISO. - + username= @@ -147,7 +199,7 @@ that will be created in the live-cd. - + password= @@ -155,7 +207,7 @@ that will be created in the live-cd. - + addgroups= @@ -164,7 +216,7 @@ the iso using calamares. - + start_systemd_live= From d2907fc234d996c227cbc3687fca5c7b2a2633bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 15 May 2015 20:04:54 +0200 Subject: [PATCH 005/127] [man] move xml pages to docbook directory --- {man => docbook}/buildiso.xml | 0 {man => docbook}/profile.conf.xml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {man => docbook}/buildiso.xml (100%) rename {man => docbook}/profile.conf.xml (100%) diff --git a/man/buildiso.xml b/docbook/buildiso.xml similarity index 100% rename from man/buildiso.xml rename to docbook/buildiso.xml diff --git a/man/profile.conf.xml b/docbook/profile.conf.xml similarity index 100% rename from man/profile.conf.xml rename to docbook/profile.conf.xml From 0e7de55d88432cbcb213e3831d53ce81dffedfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 15 May 2015 20:10:49 +0200 Subject: [PATCH 006/127] [man] Update Makefile --- Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 657b6ee..40d4b6f 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,15 @@ EFISHELL = \ efi_shell/shellx64_v1.efi \ efi_shell/shellx64_v2.efi -all: $(BINPROGS) #bin/bash_completion bin/zsh_completion +MAN_XML = \ + profile.conf.xml \ + buildiso.xml + +MAN = \ + profile.conf.1 \ + buildiso.1 + +all: $(BINPROGS) doc #bin/bash_completion bin/zsh_completion edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ -e "s|@bindir[@]|$(DESTDIR)$(PREFIX)/bin|g" \ @@ -93,8 +101,13 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ @chmod a-w "$@" @chmod +x "$@" +doc: + mkdir -p man + $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;) + clean: rm -f $(BINPROGS) #bin/bash_completion bin/zsh_completion + rm -rf man install: install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools @@ -118,6 +131,7 @@ install: install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell install -m0644 ${EFISHELL} $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell + for f in ${MAN}; do gzip -c man/$$f > $(DESTDIR)$(PREFIX)/share/man/man1/$$f.gz; done # install -Dm0644 bin/bash_completion $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools # install -Dm0644 bin/zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools @@ -134,6 +148,8 @@ uninstall: for f in ${CPIOINST}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/install/$$f; done for f in ${SCRIPTS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts/$$f; done for f in ${EFISHELL}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell/$$f; done + for f in ${MAN}; do rm -f $(DESTDIR)$(PREFIX)/share/man/man1/$$f.gz; done + # rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools # rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools From dc78a96682dda84c107df85acc18826a7b8df250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 25 May 2015 11:57:45 +0200 Subject: [PATCH 007/127] Add manjaro-tools manpage --- docbook/manjaro-tools.conf.xml | 307 +++++++++++++++++++++++++++++++++ docbook/profile.conf.xml | 2 +- 2 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 docbook/manjaro-tools.conf.xml diff --git a/docbook/manjaro-tools.conf.xml b/docbook/manjaro-tools.conf.xml new file mode 100644 index 0000000..e38e2f7 --- /dev/null +++ b/docbook/manjaro-tools.conf.xml @@ -0,0 +1,307 @@ + + + + + + + + + profile.conf-+ + manjaro-tools + + + + + + + + + + + + + manjaro-tools.conf + 5 + + + + manjaro-tools.conf + general configuration file for manjaro-tools + + + + manjaro-tools.conf + + + + Description + + manjaro-tools.conf is a general configuration file for all manjaro-tools binaries. + + By default all the options in the file are commented, with a value equal to the + default value. To change it just uncomment and put the desired value. + + + + + General options for all tools + + The following options are understood and used for various tools: + + + + branch= + + Takes (the default), + or . It defines + against which repository will be used when compilling packages + with buildpkg. + + + + + arch= + + Takes or . + By default it will try to autodetect the current architecture. + It defines in witch architecture the packages will be built with + buildpkg. + + + + + cache_dir= + + Cache dir where buildpkg and buildise will cache + packages. Default is "/var/cache/manjaro-tools". + + + + + + chroots_dir= + + Build dir where buildpkg or buildiso chroot + environment will be created. Default is "/var/lib/manjaro-tools". + + + + + sets_dir= + + Directory where buildpkg and buildiso will + search for sets. Default is "/etc/manjaro-tools/sets". + + + + + + + Options for buildtree + + The following options are understood: + + + + repo_tree= + + Manjaro package tree. Default is + "('core' 'extra' 'community' 'multilib' 'openrc')". + + + + + host_tree= + + Host tree. Default is "https://github.com/manjaro". + + + + + + host_tree_abs= + + Host tree for abs. Default is + "https://projects.archlinux.org/git/svntogit". + + + + + + + Options for buildpkg + + The following options are understood: + + + + buildset_pkg= + + Default set for buildpkg without the .set + extension. + + + + + build_mirror= + + Default mirror to be used when building + packages. + + + + + + blacklist_trigger= + + Only useful when compiling packages against + eudev. List of packages that will trigger a package blacklist + defined with "blacklist=" when creating a chroot. By default + they are "('eudev' 'upower-pm-utils' 'eudev-systemdcompat')" + + + + + blacklist= + + List of packages that will be blacklisted when + creating a chroot. This list is only triggered when compiling + a packages in the "blacklist_trigger=" option. By default + "('libsystemd')" is blacklisted. + + + + + + + Options for buildiso + + The following options are understood: + + + + buildset_iso= + + Default set for buildiso without the .set + extension. + + + + + + dist_name= + + Name of the distribution. + + + + + + + dist_release= + + Release of the distribution. + + + + + dist_codename= + + Codename of this release. It's the value + of DISTRIB_CODENAME in /etc/lsb-release. + + + + + + dist_branding= + + Branding of the distribution. + + + + + + dist_version= + + Version of the distributions. It defaults to + the current date "date +%Y.%m". Example: 15.04 + + + + + + iso_name= + + Name of the iso. + + + + + + iso_publisher= + + Publisher of the iso. + + + + + + iso_app_id= + + Application ID of the iso. + + + + + + iso_compression= + + Defaults compression that will be used + when creating the various images. Defaults to xz. + + + + + iso_checksum= + + Checksum that will be created against the + final .iso file. Can be (the default), + , , + or . + + + + + + + + See Also + + profiles.conf5, + buildiso1, + buildpkg1 + + + + + + diff --git a/docbook/profile.conf.xml b/docbook/profile.conf.xml index 12f4daa..aacdc6a 100644 --- a/docbook/profile.conf.xml +++ b/docbook/profile.conf.xml @@ -39,7 +39,7 @@ profile.conf - 1 + 5 From 50cbad2e3436ad6c707eb20e88040e9386bdf0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 25 May 2015 12:15:46 +0200 Subject: [PATCH 008/127] Update Makefile --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 40d4b6f..573073e 100644 --- a/Makefile +++ b/Makefile @@ -79,12 +79,9 @@ EFISHELL = \ efi_shell/shellx64_v2.efi MAN_XML = \ - profile.conf.xml \ - buildiso.xml - -MAN = \ - profile.conf.1 \ - buildiso.1 + buildiso.xml \ + manjaro-tools.conf.xml \ + profile.conf.xml all: $(BINPROGS) doc #bin/bash_completion bin/zsh_completion @@ -103,7 +100,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ doc: mkdir -p man - $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;) + $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml ---output-dir man ;) clean: rm -f $(BINPROGS) #bin/bash_completion bin/zsh_completion @@ -131,7 +128,11 @@ install: install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell install -m0644 ${EFISHELL} $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell - for f in ${MAN}; do gzip -c man/$$f > $(DESTDIR)$(PREFIX)/share/man/man1/$$f.gz; done + mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 + gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz + mkdir -p $(DESTDIR)$(PREFIX)/share/man/man5 + 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 -Dm0644 bin/bash_completion $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools # install -Dm0644 bin/zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools @@ -148,7 +149,9 @@ uninstall: for f in ${CPIOINST}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/install/$$f; done for f in ${SCRIPTS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts/$$f; done for f in ${EFISHELL}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell/$$f; done - for f in ${MAN}; do rm -f $(DESTDIR)$(PREFIX)/share/man/man1/$$f.gz; done + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/manjaro-tools.conf.5.gz + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/profiles.conf.5.gz # rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools # rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools From 1c55c81950f6e23ef1d6d403e30f7cb48e884f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 25 May 2015 12:17:40 +0200 Subject: [PATCH 009/127] Fix typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 573073e..f722753 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ doc: mkdir -p man - $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml ---output-dir man ;) + $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;) clean: rm -f $(BINPROGS) #bin/bash_completion bin/zsh_completion From 9515ca2dee2f7a686d167265c1ce079d4950638d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 25 May 2015 12:15:46 +0200 Subject: [PATCH 010/127] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f722753..573073e 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ doc: mkdir -p man - $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;) + $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml ---output-dir man ;) clean: rm -f $(BINPROGS) #bin/bash_completion bin/zsh_completion From ce920dd4466fe97ccbb2b06f5ec05761803478db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 25 May 2015 12:17:40 +0200 Subject: [PATCH 011/127] Fix typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 573073e..f722753 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \ doc: mkdir -p man - $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml ---output-dir man ;) + $(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;) clean: rm -f $(BINPROGS) #bin/bash_completion bin/zsh_completion From 901941d2d544a4e2ea576b89239936a7a3f992d7 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 21 Mar 2015 22:50:13 +0100 Subject: [PATCH 012/127] [util-livecd] change AutomaticLogin username based on conf file also for gdm --- lib/util-livecd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util-livecd.sh b/lib/util-livecd.sh index 6dda748..75d3963 100644 --- a/lib/util-livecd.sh +++ b/lib/util-livecd.sh @@ -431,5 +431,7 @@ configure_displaymanager(){ sed -i -e "s|^User=.*|User=${username}|" /etc/sddm.conf elif [[ -f /usr/bin/lxdm ]];then sed -i -e "s/^.*autologin=.*/autologin=${username}/" /etc/lxdm/lxdm.conf + elif [[ -f /usr/bin/gdm ]];then + sed -i -e "s/^.*AutomaticLogin=.*/AutomaticLogin=${username}/" /etc/gdm/custom.conf fi } From 6122fd8e1c6c8f81297a826d716a0bce21c10689 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 21 Mar 2015 23:27:38 +0100 Subject: [PATCH 013/127] [util-iso-calamares] fix thus.conf --- lib/util-iso-calamares.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index a220523..62bff8d 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -135,10 +135,16 @@ configure_thus(){ if [[ -f $1/usr/bin/thus ]];then msg2 "Configuring Thus ..." local conf="$1/etc/thus.conf" - sed -i "s|_version_|$dist_release|g" $conf - sed -i "s|_kernel_|$kernel|g" $conf - sed -i "s|_root-image_|/bootmnt/${iso_name}/${arch}/root-image.sqfs|g" $conf - sed -i "s|_desktop-image_|/bootmnt/${iso_name}/${arch}/${custom}-image.sqfs|g" $conf + echo "[distribution]" > "$conf" + echo "DISTRIBUTION_NAME = \"${dist_name} Linux\"" >> "$conf" + echo "DISTRIBUTION_VERSION = \"${dist_release}\"" >> "$conf" + echo "SHORT_NAME = \"${dist_name}\"" >> "$conf" + echo "[install]" >> "$conf" + echo "LIVE_MEDIA_SOURCE = \"/bootmnt/${iso_name}/${arch}/root-image.sqfs\"" >> "$conf" + echo "LIVE_MEDIA_DESKTOP = \"/bootmnt/${iso_name}/${arch}/${custom}-image.sqfs\"" >> "$conf" + echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf" + echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" + echo "KERNEL = \"${kernel}\"" >> "$conf" mkdir -p $1/home/${username}/Desktop cp $1/usr/share/applications/thus.desktop $1/home/${username}/Desktop/thus.desktop chmod a+x $1/home/${username}/Desktop/thus.desktop From 805a5d626556c1a6d5166c2ec69f4e1bcf1292e5 Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 22 Mar 2015 11:19:50 +0100 Subject: [PATCH 014/127] [util-iso-calamares] use kdesu in kde based editions - fixes theme issue --- lib/util-iso-calamares.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 62bff8d..92d4346 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -126,6 +126,9 @@ configure_calamares(){ write_calamares_users_conf $1 mkdir -p $1/home/${username}/Desktop + if [[ -f $1/usr/bin/kdesu ]];then + sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/calamares.desktop + fi cp $1/usr/share/applications/calamares.desktop $1/home/${username}/Desktop/calamares.desktop chmod a+x $1/home/${username}/Desktop/calamares.desktop fi @@ -146,6 +149,9 @@ configure_thus(){ echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" echo "KERNEL = \"${kernel}\"" >> "$conf" mkdir -p $1/home/${username}/Desktop + if [[ -f $1/usr/bin/kdesu ]];then + sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop + fi cp $1/usr/share/applications/thus.desktop $1/home/${username}/Desktop/thus.desktop chmod a+x $1/home/${username}/Desktop/thus.desktop fi From c129c46595bfee5ca741b8d90e2eeb45f9062f53 Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 28 Mar 2015 06:54:13 +0100 Subject: [PATCH 015/127] [util-iso-calamares] use edition branding for calamares --- lib/util-iso-calamares.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 92d4346..8e25a01 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -110,6 +110,14 @@ write_calamares_users_conf(){ echo "sudoersGroup: wheel" >> "$conf" } +brand_calamares_settings_conf(){ + local conf="$1/usr/share/calamares/settings.conf" + local branding="$1/usr/share/calamares/branding/manjaro-${custom}" + if [[ -d $branding ]];then + sed -i -e "s|branding: manjaro|branding: manjaro-${custom}|g" "$conf" + fi +} + configure_calamares(){ if [[ -f $1/usr/bin/calamares ]];then msg2 "Configuring Calamares ..." @@ -118,6 +126,7 @@ configure_calamares(){ write_calamares_unpack_conf $1 write_calamares_dm_conf $1 write_calamares_initcpio_conf $1 + brand_calamares_settings_conf $1 if [[ ${initsys} == 'openrc' ]];then write_calamares_machineid_conf $1 write_calamares_finished_conf $1 From 90684e6a576bc52b8c243078550ea3eb20da3b94 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 15 Apr 2015 09:53:25 +0200 Subject: [PATCH 016/127] [util-iso-boot] make intel_ucode.img optional --- lib/util-iso-boot.sh | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index b9214c9..a11d000 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -52,7 +52,9 @@ copy_boot_images(){ msg2 "Copying boot images ..." cp $1/x86_64/${iso_name} $2/${iso_name}.efi cp $1/x86_64/${iso_name}.img $2/${iso_name}.img - cp $1/intel_ucode.img $2/intel_ucode.img + if [[ -f $1/intel_ucode.img ]] ; then + cp $1/intel_ucode.img $2/intel_ucode.img + fi } copy_initcpio(){ @@ -92,7 +94,9 @@ write_dvd_conf(){ msg2 "Writing ${fn} ..." echo "title ${dist_name} Linux ${arch} UEFI DVD (default)" > ${conf} echo "linux /EFI/miso/${iso_name}.efi" >> ${conf} - echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} + fi echo "initrd /EFI/miso/${iso_name}.img" >> ${conf} echo "options misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free" >> ${conf} } @@ -103,7 +107,9 @@ write_dvd_nonfree_conf(){ msg2 "Writing ${fn} ..." echo "title ${dist_name} Linux ${arch} UEFI DVD (nonfree)" > ${conf} echo "linux /EFI/miso/${iso_name}.efi" >> ${conf} - echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} + fi echo "initrd /EFI/miso/${iso_name}.img" >> ${conf} echo "options misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=nonfree nonfree=yes" >> ${conf} } @@ -114,7 +120,9 @@ write_usb_conf(){ msg2 "Writing ${fn} ..." echo "title ${dist_name} Linux ${arch} UEFI USB (default)" > ${conf} echo "linux /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} - echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} + fi echo "initrd /${iso_name}/boot/${arch}/${iso_name}.img" >> ${conf} echo "options misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free" >> ${conf} } @@ -125,7 +133,9 @@ write_usb_nonfree_conf(){ msg2 "Writing ${fn} ..." echo "title ${dist_name} Linux ${arch} UEFI USB (nonfree)" > ${conf} echo "linux /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} - echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} + fi echo "initrd /${iso_name}/boot/${arch}/${iso_name}.img" >> ${conf} echo "options misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=nonfree nonfree=yes" >> ${conf} } @@ -170,11 +180,19 @@ write_isolinux_cfg(){ echo '' >> ${conf} echo "label start" >> ${conf} echo " kernel /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} - echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts" >> ${conf} + else + echo " append initrd=/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts" >> ${conf} + fi echo '' >> ${conf} echo "label nonfree" >> ${conf} echo " kernel /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} - echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts" >> ${conf} + if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts" >> ${conf} + else + echo " append initrd=/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts" >> ${conf} + fi echo '' >> ${conf} echo "label harddisk" >> ${conf} echo " com32 whichsys.c32" >> ${conf} From 3021382c93b1976bf336fe56e8968e4afc1042a2 Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 15 Apr 2015 10:10:29 +0200 Subject: [PATCH 017/127] [util-iso-boot] echo out when using intel_ucode.img --- lib/util-iso-boot.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index a11d000..7e84752 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -53,6 +53,7 @@ copy_boot_images(){ cp $1/x86_64/${iso_name} $2/${iso_name}.efi cp $1/x86_64/${iso_name}.img $2/${iso_name}.img if [[ -f $1/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." cp $1/intel_ucode.img $2/intel_ucode.img fi } @@ -95,6 +96,7 @@ write_dvd_conf(){ echo "title ${dist_name} Linux ${arch} UEFI DVD (default)" > ${conf} echo "linux /EFI/miso/${iso_name}.efi" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} fi echo "initrd /EFI/miso/${iso_name}.img" >> ${conf} @@ -108,6 +110,7 @@ write_dvd_nonfree_conf(){ echo "title ${dist_name} Linux ${arch} UEFI DVD (nonfree)" > ${conf} echo "linux /EFI/miso/${iso_name}.efi" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo "initrd /EFI/miso/intel_ucode.img" >> ${conf} fi echo "initrd /EFI/miso/${iso_name}.img" >> ${conf} @@ -121,6 +124,7 @@ write_usb_conf(){ echo "title ${dist_name} Linux ${arch} UEFI USB (default)" > ${conf} echo "linux /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} fi echo "initrd /${iso_name}/boot/${arch}/${iso_name}.img" >> ${conf} @@ -134,6 +138,7 @@ write_usb_nonfree_conf(){ echo "title ${dist_name} Linux ${arch} UEFI USB (nonfree)" > ${conf} echo "linux /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo "initrd /${iso_name}/boot/intel_ucode.img" >> ${conf} fi echo "initrd /${iso_name}/boot/${arch}/${iso_name}.img" >> ${conf} @@ -181,6 +186,7 @@ write_isolinux_cfg(){ echo "label start" >> ${conf} echo " kernel /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts" >> ${conf} else echo " append initrd=/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts" >> ${conf} @@ -189,6 +195,7 @@ write_isolinux_cfg(){ echo "label nonfree" >> ${conf} echo " kernel /${iso_name}/boot/${arch}/${iso_name}" >> ${conf} if [[ -f ${path_iso}/${iso_name}/boot/intel_ucode.img ]] ; then + msg2 "Using intel_ucode.img ..." echo " append initrd=/${iso_name}/boot/intel_ucode.img,/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts" >> ${conf} else echo " append initrd=/${iso_name}/boot/${arch}/${iso_name}.img misobasedir=${iso_name} misolabel=${iso_label} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts" >> ${conf} From ba9021ea46cf0cbf30598519d83ed43e6db77a3b Mon Sep 17 00:00:00 2001 From: Philip Date: Wed, 15 Apr 2015 10:13:49 +0200 Subject: [PATCH 018/127] v0.9.7.3 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4f05c3f..89baba0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=0.9.7.2 +V=0.9.7.3 PREFIX = $(PREFIX)/local From 211011de84bf4ee856c3460b95e5aebfa618e391 Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Wed, 15 Apr 2015 20:01:39 +0530 Subject: [PATCH 019/127] [util-livecd]: use same keyboard config for both systemd and openrc Forum: https://forum.manjaro.org/index.php?topic=21681.0 --- lib/util-livecd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util-livecd.sh b/lib/util-livecd.sh index 75d3963..74251a7 100644 --- a/lib/util-livecd.sh +++ b/lib/util-livecd.sh @@ -80,6 +80,7 @@ write_x11_config(){ # create X11 keyboard layout config mkdir -p "$1/etc/X11/xorg.conf.d" + local XORGKBLAYOUT="$1/etc/X11/xorg.conf.d/00-keyboard.conf" echo "" >> "$XORGKBLAYOUT" From c255022d1fca5bc68f0b8fe09cad9e241a4fbe17 Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Fri, 17 Apr 2015 12:27:55 +0530 Subject: [PATCH 020/127] [util-iso] make intel_ucode.img optional --- lib/util-iso.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 6b608e3..7df6f64 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -348,8 +348,10 @@ make_image_boot() { copy_initcpio "${path}" gen_boot_image "${path}" mv ${path}/boot/${iso_name}.img ${path_iso}/${arch}/${iso_name}.img - cp ${path}/boot/intel-ucode.img ${path_iso}/intel_ucode.img - cp ${path}/usr/share/licenses/intel-ucode/LICENSE ${path_iso}/intel_ucode.LICENSE + if [[ -f ${path}/boot/intel-ucode.img ]]; then + cp ${path}/boot/intel-ucode.img ${path_iso}/intel_ucode.img + cp ${path}/usr/share/licenses/intel-ucode/LICENSE ${path_iso}/intel_ucode.LICENSE + fi umount_image_handler rm -R ${path} : > ${work_dir}/build.${FUNCNAME} From 5bf813c78d2b235e652a5c04a5e376ef7c67ebdb Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 20 Apr 2015 22:16:56 +0200 Subject: [PATCH 021/127] [util-iso-calamares] source kernel preset --- lib/util-iso-calamares.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 8e25a01..069484a 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -146,6 +146,7 @@ configure_calamares(){ configure_thus(){ if [[ -f $1/usr/bin/thus ]];then msg2 "Configuring Thus ..." + source "$1/etc/mkinitcpio.d/${kernel}.preset" local conf="$1/etc/thus.conf" echo "[distribution]" > "$conf" echo "DISTRIBUTION_NAME = \"${dist_name} Linux\"" >> "$conf" From b89cf8cc55e9506174bac67dddfc4fd9590addc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Fri, 17 Apr 2015 15:13:55 +0200 Subject: [PATCH 022/127] Add support for pantheon --- lib/util-iso-image.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index b6c05f8..af1fb39 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -186,6 +186,9 @@ configure_displaymanager(){ if [ -e "$1/usr/bin/i3" ] ; then sed -i -e 's/^.*user-session=.*/user-session=i3/' ${conf} fi + if [ -e "$1/usr/bin/pantheon-session" ] ; then + sed -i -e 's/^.*user-session=.*/user-session=pantheon/' ${conf} + fi if [[ ${initsys} == 'openrc' ]];then sed -i -e 's/^.*minimum-vt=.*/minimum-vt=7/' ${conf} fi From a44c67e1101400d88aa5c87c52e1fbe51714c2fd Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 21:05:56 +0200 Subject: [PATCH 023/127] [util-pkg] only add log files --- lib/util-pkg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 2211085..27dd241 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -80,9 +80,9 @@ move_pkg(){ archive_logs(){ local ext='log.tar.xz' if [[ -n $pkgbase ]];then - tar -cJf $PWD/$pkgbase-$pkgver-$pkgrel-${CARCH}.${ext} *.log + tar -cJf $PWD/$pkgbase-$pkgver-$pkgrel-${CARCH}.${ext} *${CARCH}*.log else - tar -cJf $PWD/$pkgname-$pkgver-$pkgrel-${CARCH}.${ext} *.log + tar -cJf $PWD/$pkgname-$pkgver-$pkgrel-${CARCH}.${ext} *${CARCH}*.log fi find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null } From c778a19367e5c3727bb6acf94ef86be92d2daeb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 20 Apr 2015 15:29:09 +0200 Subject: [PATCH 024/127] Provide vmlinuz, initramfs and fallback for thus configuration. --- lib/util-iso-calamares.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 8e25a01..f08bda4 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -156,7 +156,10 @@ configure_thus(){ echo "LIVE_MEDIA_DESKTOP = \"/bootmnt/${iso_name}/${arch}/${custom}-image.sqfs\"" >> "$conf" echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf" echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" - echo "KERNEL = \"${kernel}\"" >> "$conf" + echo "KERNEL = ${kernel}" >> "$conf" + echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot||')\"" >> "$conf" + echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot||')\"" >> "$conf" + echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot||')\"" >> "$conf" mkdir -p $1/home/${username}/Desktop if [[ -f $1/usr/bin/kdesu ]];then sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop From e61b68e995bbe8b2156fdbf91b1596ac0562be4b Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 21:49:06 +0200 Subject: [PATCH 025/127] [util-pkg] create only one archive per pkgver/rel --- lib/util-pkg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 27dd241..0d7f0f7 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -80,9 +80,9 @@ move_pkg(){ archive_logs(){ local ext='log.tar.xz' if [[ -n $pkgbase ]];then - tar -cJf $PWD/$pkgbase-$pkgver-$pkgrel-${CARCH}.${ext} *${CARCH}*.log + tar -cJf $PWD/$pkgbase-$pkgver-$pkgrel.${ext} $pkgbase-$pkgver-$pkgrel*.log else - tar -cJf $PWD/$pkgname-$pkgver-$pkgrel-${CARCH}.${ext} *${CARCH}*.log + tar -cJf $PWD/$pkgname-$pkgver-$pkgrel.${ext} $pkgname-$pkgver-$pkgrel*.log fi find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null } From 08998c81eb9d64a5711feb5fe074743067d2a03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 20 Apr 2015 15:37:09 +0200 Subject: [PATCH 026/127] Readd " --- lib/util-iso-calamares.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index f08bda4..1d952cb 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -156,7 +156,7 @@ configure_thus(){ echo "LIVE_MEDIA_DESKTOP = \"/bootmnt/${iso_name}/${arch}/${custom}-image.sqfs\"" >> "$conf" echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf" echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" - echo "KERNEL = ${kernel}" >> "$conf" + echo "KERNEL = \"${kernel}\"" >> "$conf" echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot||')\"" >> "$conf" echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot||')\"" >> "$conf" echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot||')\"" >> "$conf" From 3d6f596024406877fd711ccc123cbdb97a0164a2 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 22:00:07 +0200 Subject: [PATCH 027/127] [util-pkg] simplify and fix split build --- lib/util-pkg.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 0d7f0f7..987b2b6 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -78,12 +78,13 @@ move_pkg(){ } archive_logs(){ - local ext='log.tar.xz' + local ext='log.tar.xz' logfile if [[ -n $pkgbase ]];then - tar -cJf $PWD/$pkgbase-$pkgver-$pkgrel.${ext} $pkgbase-$pkgver-$pkgrel*.log + logfile=$PWD/$pkgbase-$pkgver-$pkgrel.${ext} else - tar -cJf $PWD/$pkgname-$pkgver-$pkgrel.${ext} $pkgname-$pkgver-$pkgrel*.log + logfile=$PWD/$pkgname-$pkgver-$pkgrel.${ext} fi + tar -cJf ${logfile} $pkgname-$pkgver-$pkgrel*.log find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null } From 76de983db7ba549fb072f851653016e35dc9155b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ramon=20Buld=C3=B3?= Date: Mon, 20 Apr 2015 15:59:49 +0200 Subject: [PATCH 028/127] thus doesnt want the initial "/" --- lib/util-iso-calamares.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util-iso-calamares.sh b/lib/util-iso-calamares.sh index 1d952cb..b9c7830 100644 --- a/lib/util-iso-calamares.sh +++ b/lib/util-iso-calamares.sh @@ -157,9 +157,9 @@ configure_thus(){ echo "LIVE_MEDIA_TYPE = \"squashfs\"" >> "$conf" echo "LIVE_USER_NAME = \"${username}\"" >> "$conf" echo "KERNEL = \"${kernel}\"" >> "$conf" - echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot||')\"" >> "$conf" - echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot||')\"" >> "$conf" - echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot||')\"" >> "$conf" + echo "VMLINUZ = \"$(echo ${ALL_kver} | sed s'|/boot/||')\"" >> "$conf" + echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf" + echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf" mkdir -p $1/home/${username}/Desktop if [[ -f $1/usr/bin/kdesu ]];then sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop From 41ad2dbff1753cd324b51c0dd7b2c42374b733ae Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 22:27:40 +0200 Subject: [PATCH 029/127] bump version; add iso/pkg chroot check version functions --- Makefile | 2 +- lib/util-iso.sh | 10 ++++++++++ lib/util-pkg.sh | 11 +++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f5351f..45ac51c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=0.9.7.4 +V=0.9.7.5 PREFIX = $(PREFIX)/local diff --git a/lib/util-iso.sh b/lib/util-iso.sh index ddc0dfd..f8b2cd9 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -503,6 +503,16 @@ load_profile(){ done } +get_chroot_iso_version(){ + echo $(cat ${work_dir}/root-image/.manjaro-tools) +} + +check_chroot_iso_version(){ + if [[ ${version} != $(get_chroot_iso_version) ]];then + msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." + fi +} + compress_images(){ local timer=$(get_timer) make_iso diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 987b2b6..2eccae3 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -9,6 +9,17 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. +get_chroot_pkg_version(){ + echo $(cat ${work_dir}/root/.manjaro-tools) +} + + +check_chroot_pkg_version(){ + if [[ ${version} != $(get_chroot_iso_version) ]];then + msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." + fi +} + chroot_create(){ msg "Creating chroot for [${branch}] (${arch})..." mkdir -p "${work_dir}" From c88ea477f917a0db89c9dd80c43f0439228ffd82 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 22:31:14 +0200 Subject: [PATCH 030/127] [util-pkg] fix check_chroot_pkg_version call --- lib/util-pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 2eccae3..48d3605 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -15,7 +15,7 @@ get_chroot_pkg_version(){ check_chroot_pkg_version(){ - if [[ ${version} != $(get_chroot_iso_version) ]];then + if [[ ${version} != $(get_chroot_pkg_version) ]];then msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." fi } From ccb5675d6e95cde4b2ab8ede8ac16629ceae2ad4 Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Sat, 2 May 2015 13:03:13 +0530 Subject: [PATCH 031/127] [util-iso] try to keep only latest lang and xorg packages --- lib/util-iso.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 7df6f64..ddc0dfd 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -73,11 +73,15 @@ copy_livecd_helpers(){ copy_cache_lng(){ msg2 "Copying lng cache ..." cp ${cache_dir_lng}/* ${work_dir}/lng-image/opt/livecd/lng + msg2 "Trimming lng pkgs ..." + paccache -rv -k1 -c ${work_dir}/lng-image/opt/livecd/lng } copy_cache_xorg(){ msg2 "Copying xorg pkgs cache ..." cp ${cache_dir_xorg}/* ${work_dir}/pkgs-image/opt/livecd/pkgs + msg2 "Trimming xorg pkgs ..." + paccache -rv -k1 -c ${work_dir}/pkgs-image/opt/livecd/pkgs } prepare_cachedirs(){ From 322a79d3c52f0abf8a467dcc25776a32e051c6fa Mon Sep 17 00:00:00 2001 From: Philip Date: Sat, 2 May 2015 10:38:31 +0200 Subject: [PATCH 032/127] v0.9.7.4 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 89baba0..6f5351f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=0.9.7.3 +V=0.9.7.4 PREFIX = $(PREFIX)/local From 1068b2c07a21da845de70bfad235f6fef4b54e68 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 23:11:12 +0200 Subject: [PATCH 033/127] [util-pkg] simplify check chroot version --- lib/util-pkg.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 48d3605..8844df9 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -9,14 +9,11 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -get_chroot_pkg_version(){ - echo $(cat ${work_dir}/root/.manjaro-tools) -} - - check_chroot_pkg_version(){ - if [[ ${version} != $(get_chroot_pkg_version) ]];then - msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." + local chroot_version=$(cat ${work_dir}/root/.manjaro-tools) + msg "chroot version: $chroot_version" + if [[ ${version} != $chroot_version ]];then + clean_first=true fi } From e007c42c61a91f52a5591c6c4899da2efa187618 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 23:12:27 +0200 Subject: [PATCH 034/127] [buildpkg] use check_chroot_pkg_version --- bin/buildpkg.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/buildpkg.in b/bin/buildpkg.in index c72ed07..44846bf 100644 --- a/bin/buildpkg.in +++ b/bin/buildpkg.in @@ -184,6 +184,8 @@ ${pretend} && display_settings && exit ${wipe_clean} && clean_up +[[ -d ${work_dir}/root ]] && check_chroot_pkg_version + chroot_init chroot_build From 33932a13df4dd69e052007a4fcf8769bf66175f0 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 3 May 2015 23:32:21 +0200 Subject: [PATCH 035/127] [util-iso] make sure chroot is recreated if outdated --- lib/util-iso.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index f8b2cd9..1d256eb 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -473,6 +473,13 @@ load_pkgs_lng(){ packages_lng_kde=$(sed "s|#.*||g" Packages-Lng | grep kde | sed "s|>kde||g" | sed ':a;N;$!ba;s/\n/ /g') } +check_chroot_iso_version(){ + local chroot_version=$(cat ${work_dir}/root-image/.manjaro-tools) + if [[ ${version} != $chroot_version ]];then + clean_first=true + fi +} + # $1: profile load_profile(){ msg3 "Profile: [$1]" @@ -501,16 +508,7 @@ load_profile(){ is_plymouth=true fi done -} - -get_chroot_iso_version(){ - echo $(cat ${work_dir}/root-image/.manjaro-tools) -} - -check_chroot_iso_version(){ - if [[ ${version} != $(get_chroot_iso_version) ]];then - msg "Your chroot version is outdated. please use the -c switch to recreate the chroot." - fi + [[ -d ${work_dir}/root-image ]] && check_chroot_iso_version } compress_images(){ From 6bd9126094091d66c210ff496f2f171b3469ba47 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 4 May 2015 01:15:52 +0200 Subject: [PATCH 036/127] [util-iso] try #77 --- lib/util-iso.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 1d256eb..343df44 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -548,6 +548,27 @@ build_images(){ msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } +check_profile(){ + local keyfiles=(profile.conf mkinitcpio.con Packages Packages-Livecd) + local keydirs=(overlay overlay-livecd isolinux) + local has_keyfiles=false has_keydirs=false + for f in ${keyfiles[@]}; do + if [[ -f $1/$f ]] + has_keyfiles=true + fi + done + for d in ${keydirs[@]}; do + if [[ -d $1/$d ]] + has_keydirs=true + fi + done + if ${has_keyfiles} && ${has_keydirs};then + msg3 "Profile sanity check passed." + else + eval $2 + fi +} + make_profile(){ msg "Start building [$1]" cd $1 @@ -576,11 +597,11 @@ make_profile(){ build_iso(){ if ${is_buildset};then for prof in $(cat ${sets_dir_iso}/${buildset_iso}.set); do - check_sanity "$prof/profile.conf" "break" + check_profile "$prof" "break" make_profile "$prof" done else - check_sanity "${buildset_iso}/profile.conf" 'die "Not a valid iso-profile!"' + check_profile "${buildset_iso}" 'die "Profile sanity check failed."' make_profile "${buildset_iso}" fi } From 47201be88f5ae32767f00b3663aa3db005b7721a Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 4 May 2015 01:51:45 +0200 Subject: [PATCH 037/127] [util-iso] try2 #77 --- lib/util-iso.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 343df44..93c9c7f 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -553,13 +553,19 @@ check_profile(){ local keydirs=(overlay overlay-livecd isolinux) local has_keyfiles=false has_keydirs=false for f in ${keyfiles[@]}; do - if [[ -f $1/$f ]] + if [[ -f $1/$f ]];then has_keyfiles=true + else + has_keyfiles=false + break fi done for d in ${keydirs[@]}; do - if [[ -d $1/$d ]] + if [[ -d $1/$d ]];then has_keydirs=true + else + has_keydirs=false + break fi done if ${has_keyfiles} && ${has_keydirs};then From 6a71a2ee85ed9353a2d26b80f7550a7426fc86b8 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 4 May 2015 02:09:45 +0200 Subject: [PATCH 038/127] [util-iso] try3 #77; fix typo; add some msg --- lib/util-iso.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 93c9c7f..257b6ff 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -549,9 +549,10 @@ build_images(){ } check_profile(){ - local keyfiles=(profile.conf mkinitcpio.con Packages Packages-Livecd) - local keydirs=(overlay overlay-livecd isolinux) + local keyfiles=('profile.conf' 'mkinitcpio.conf' 'Packages' 'Packages-Livecd') + local keydirs=('overlay' 'overlay-livecd' 'isolinux') local has_keyfiles=false has_keydirs=false + msg "Checking profile [$1]" for f in ${keyfiles[@]}; do if [[ -f $1/$f ]];then has_keyfiles=true @@ -568,6 +569,8 @@ check_profile(){ break fi done + msg2 "has_keyfiles: ${has_keyfiles}" + msg2 "has_keydirs: ${has_keydirs}" if ${has_keyfiles} && ${has_keydirs};then msg3 "Profile sanity check passed." else From b1730c1aa978f8518a1baaa375095c8f1a9b3ac7 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 4 May 2015 21:32:04 +0200 Subject: [PATCH 039/127] [util-iso*] add possible approach to PXE #84 --- lib/util-iso-boot.sh | 5 +++++ lib/util-iso.sh | 24 +++++++++++++++++------- lib/util.sh | 4 ++++ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 7e84752..9e8b25a 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -65,6 +65,11 @@ copy_initcpio(){ cp mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf } +add_kernel_modules(){ + local conf='MODULES="'${kernel_modules}'"' + sed -e "s|^.*MODULES=.*|${conf}|" -i $1/etc/mkinitcpio-${iso_name}.conf +} + write_loader_conf(){ local fn=loader.conf local conf=$1/${fn} diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 257b6ff..7aac83f 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -350,6 +350,10 @@ make_image_boot() { aufs_mount_root_image "${path}" fi copy_initcpio "${path}" + + # possible approach to PXE boot + #add_kernel_modules "${path}" + gen_boot_image "${path}" mv ${path}/boot/${iso_name}.img ${path_iso}/${arch}/${iso_name}.img if [[ -f ${path}/boot/intel-ucode.img ]]; then @@ -480,6 +484,16 @@ check_chroot_iso_version(){ fi } +check_plymouth(){ + is_plymouth=false + source mkinitcpio.conf + for h in ${HOOKS[@]};do + if [[ $h == 'plymouth' ]];then + is_plymouth=true + fi + done +} + # $1: profile load_profile(){ msg3 "Profile: [$1]" @@ -501,13 +515,9 @@ load_profile(){ fi create_args+=(-C ${pacman_conf}) work_dir=${chroots_iso}/$1/${arch} - is_plymouth=false - source mkinitcpio.conf - for h in ${HOOKS[@]};do - if [[ $h == 'plymouth' ]];then - is_plymouth=true - fi - done + + check_plymouth + [[ -d ${work_dir}/root-image ]] && check_chroot_iso_version } diff --git a/lib/util.sh b/lib/util.sh index e7f273d..fa595c4 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -363,6 +363,10 @@ load_profile_config(){ displaymanager="none" fi +# if [[ -z ${kernel_modules} ]];then +# kernel_modules="" +# fi + return 0 } From 52da127cc19e3fdb0cb62088af62ecca6ba4eaa2 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 4 May 2015 21:32:58 +0200 Subject: [PATCH 040/127] [conf] add kernel_modules to profile.conf #84 --- conf/profile.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/profile.conf b/conf/profile.conf index 4a8dab9..e70adc0 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -12,6 +12,8 @@ # unset defaults to given value # kernel="linux319" +# kernel_modules="e100 e1000 e1000e" + # unset defaults to given value # efi_boot_loader="grub" From f5363d7d53dd5333e47c54dba0b51454bbdb32b7 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 20:17:14 +0200 Subject: [PATCH 041/127] revert changes for #84 --- conf/profile.conf | 2 -- lib/util-iso-boot.sh | 5 ----- lib/util-iso.sh | 3 --- lib/util.sh | 4 ---- 4 files changed, 14 deletions(-) diff --git a/conf/profile.conf b/conf/profile.conf index e70adc0..4a8dab9 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -12,8 +12,6 @@ # unset defaults to given value # kernel="linux319" -# kernel_modules="e100 e1000 e1000e" - # unset defaults to given value # efi_boot_loader="grub" diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index 9e8b25a..7e84752 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -65,11 +65,6 @@ copy_initcpio(){ cp mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf } -add_kernel_modules(){ - local conf='MODULES="'${kernel_modules}'"' - sed -e "s|^.*MODULES=.*|${conf}|" -i $1/etc/mkinitcpio-${iso_name}.conf -} - write_loader_conf(){ local fn=loader.conf local conf=$1/${fn} diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 7aac83f..e972d49 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -351,9 +351,6 @@ make_image_boot() { fi copy_initcpio "${path}" - # possible approach to PXE boot - #add_kernel_modules "${path}" - gen_boot_image "${path}" mv ${path}/boot/${iso_name}.img ${path_iso}/${arch}/${iso_name}.img if [[ -f ${path}/boot/intel-ucode.img ]]; then diff --git a/lib/util.sh b/lib/util.sh index fa595c4..e7f273d 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -363,10 +363,6 @@ load_profile_config(){ displaymanager="none" fi -# if [[ -z ${kernel_modules} ]];then -# kernel_modules="" -# fi - return 0 } From d10e37cebbbe99738b76ef142a4eeee59b3c1589 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 20:21:55 +0200 Subject: [PATCH 042/127] [util-iso] increase fat size, otherwise a net config will have space problems with 31M --- lib/util-iso.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index e972d49..746455b 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -390,7 +390,7 @@ make_efiboot() { msg "Prepare [${iso_name}/iso/EFI]" local path_iso="${work_dir}/iso" mkdir -p ${path_iso}/EFI/miso - truncate -s 31M ${path_iso}/EFI/miso/${iso_name}.img + truncate -s 48M ${path_iso}/EFI/miso/${iso_name}.img mkfs.vfat -n MISO_EFI ${path_iso}/EFI/miso/${iso_name}.img mkdir -p ${work_dir}/efiboot mount ${path_iso}/EFI/miso/${iso_name}.img ${work_dir}/efiboot @@ -579,7 +579,7 @@ check_profile(){ msg2 "has_keyfiles: ${has_keyfiles}" msg2 "has_keydirs: ${has_keydirs}" if ${has_keyfiles} && ${has_keydirs};then - msg3 "Profile sanity check passed." + msg "Profile sanity check passed." else eval $2 fi From e5365e5dc2c0103a10f4868617f5226f35bcccf3 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 21:05:12 +0200 Subject: [PATCH 043/127] [buildiso] add efi_part_size to profile.conf --- bin/buildiso.in | 3 ++- conf/profile.conf | 3 +++ lib/util-iso.sh | 2 +- lib/util.sh | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 9f20a42..8f464cb 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -31,7 +31,8 @@ show_profile(){ msg2 "displaymanager: ${displaymanager}" msg2 "kernel: ${kernel}" msg2 "efi_boot_loader: ${efi_boot_loader}" - + msg2 "efi_part_size: ${efi_part_size}" + ${is_plymouth} && msg2 "plymouth_theme: ${plymouth_theme}" msg2 "hostname: ${hostname}" diff --git a/conf/profile.conf b/conf/profile.conf index 4a8dab9..578c910 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -15,6 +15,9 @@ # unset defaults to given value # efi_boot_loader="grub" +# set uefi partition size +# efi_part_size=36M + # unset defaults to given value # plymouth_theme=manjaro-elegant diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 746455b..f697e77 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -390,7 +390,7 @@ make_efiboot() { msg "Prepare [${iso_name}/iso/EFI]" local path_iso="${work_dir}/iso" mkdir -p ${path_iso}/EFI/miso - truncate -s 48M ${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 mkdir -p ${work_dir}/efiboot mount ${path_iso}/EFI/miso/${iso_name}.img ${work_dir}/efiboot diff --git a/lib/util.sh b/lib/util.sh index e7f273d..9f03f73 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -319,6 +319,10 @@ load_profile_config(){ efi_boot_loader="grub" fi + if [[ -z ${efi_part_size} ]]; then + efi_part_size="36M" + fi + if [[ -z ${hostname} ]];then hostname="manjaro" fi From c305383d1cd0ca1ecb6b70d34556bc5e6c876b25 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 21:48:15 +0200 Subject: [PATCH 044/127] [util] set efi_part_size 32M default --- lib/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.sh b/lib/util.sh index 9f03f73..81cccc8 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -320,7 +320,7 @@ load_profile_config(){ fi if [[ -z ${efi_part_size} ]]; then - efi_part_size="36M" + efi_part_size="32M" fi if [[ -z ${hostname} ]];then From fe4cf867a64b66124188508e3a0a3af821954555 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 23:03:08 +0200 Subject: [PATCH 045/127] [util-iso] rename check function --- lib/util-iso.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index f697e77..3ed6ae5 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -474,7 +474,7 @@ load_pkgs_lng(){ packages_lng_kde=$(sed "s|#.*||g" Packages-Lng | grep kde | sed "s|>kde||g" | sed ':a;N;$!ba;s/\n/ /g') } -check_chroot_iso_version(){ +check_chroot_version(){ local chroot_version=$(cat ${work_dir}/root-image/.manjaro-tools) if [[ ${version} != $chroot_version ]];then clean_first=true @@ -515,7 +515,7 @@ load_profile(){ check_plymouth - [[ -d ${work_dir}/root-image ]] && check_chroot_iso_version + [[ -d ${work_dir}/root-image ]] && check_chroot_version } compress_images(){ From 2e8cb53ef0239ac41bbb99a112aae6e55807fefb Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 23:03:21 +0200 Subject: [PATCH 046/127] [util-pkg] rename check function --- lib/util-pkg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 8844df9..c1ca69e 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -9,7 +9,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -check_chroot_pkg_version(){ +check_chroot_version(){ local chroot_version=$(cat ${work_dir}/root/.manjaro-tools) msg "chroot version: $chroot_version" if [[ ${version} != $chroot_version ]];then From 2710c9d6c1e3953184e4adaea352f430a09bdee2 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 23:03:53 +0200 Subject: [PATCH 047/127] [buildpkg] use new func name --- bin/buildpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/buildpkg.in b/bin/buildpkg.in index 44846bf..d28d5f1 100644 --- a/bin/buildpkg.in +++ b/bin/buildpkg.in @@ -184,7 +184,7 @@ ${pretend} && display_settings && exit ${wipe_clean} && clean_up -[[ -d ${work_dir}/root ]] && check_chroot_pkg_version +[[ -d ${work_dir}/root ]] && check_chroot_version chroot_init From 897322112d048ce0d49d0732ba1e206b6104ab82 Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 23:04:08 +0200 Subject: [PATCH 048/127] update readme --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f90592f..ecdbce0 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,9 @@ Each iso profile must have these files or symlinks to shared: # unset defaults to given value # efi_boot_loader="grub" +# set uefi partition size +# efi_part_size=32M + # unset defaults to given value # plymouth_theme=manjaro-elegant @@ -175,21 +178,21 @@ Each iso profile must have these files or symlinks to shared: # start_openrc_live=('livecd' 'mhwd-live' 'pacman-init' 'pacman-boot') ~~~ -######* Packages +######* Packages Contains root image packages ideally no xorg -######* Packages-Custom/desktop +######* Packages-Custom/desktop Contains the custom image packages desktop environment packages go here -######* Packages-Xorg +######* Packages-Xorg Contains the Xorg package repo -######* Packages-Lng +######* Packages-Lng Contains the language packages repo -######* Packages-Livecd +######* Packages-Livecd Contains packages you only want on livecd but not installed on the target system with installer default files are in shared folder and can be symlinked or defined in a real file @@ -248,11 +251,11 @@ buildpkg -p sysvinit -a i686 -b testing -cwsn buildpkg -p sysvinit -b testing -cswn ~~~ -You can drop the branch arg if you set the branch in manjaro-tools.conf +You can drop the branch arg if you set the branch in manjaro-tools.conf The arch can also be set in manjaro-tools.conf, but under normal conditions, it is better to specify the non native arch by -a parameter. ######* -c -Removes the chroot dir +Removes the chroot dir If the -c parameter is not used, buildpkg will update the existing chroot or create a new one if none is present. ######* -w Cleans pkgcache, and logfiles From 715e594e4a5ddbacb1a9a88c638ab6890a1aa88f Mon Sep 17 00:00:00 2001 From: udeved Date: Wed, 6 May 2015 23:04:41 +0200 Subject: [PATCH 049/127] [conf] set uefi 32M default --- conf/profile.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/profile.conf b/conf/profile.conf index 578c910..c854637 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -16,7 +16,7 @@ # efi_boot_loader="grub" # set uefi partition size -# efi_part_size=36M +# efi_part_size=32M # unset defaults to given value # plymouth_theme=manjaro-elegant From 85c4882e084515f8b047bfce076fc897a97950ae Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Sat, 2 May 2015 23:43:11 +0530 Subject: [PATCH 050/127] [util-iso] allow configuring xorg and lng pkg cache cleanup via config --- bin/buildiso.in | 2 -- conf/manjaro-tools.conf | 6 ++++++ lib/util.sh | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 9f20a42..0e11541 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -118,8 +118,6 @@ load_config "${USER_CONFIG}/manjaro-tools.conf" load_config "${SYSCONFDIR}/manjaro-tools.conf" clean_first=true -clean_cache_xorg=true -clean_cache_lng=true clean_cache_iso=true pretend=false diff --git a/conf/manjaro-tools.conf b/conf/manjaro-tools.conf index c20214e..acb1d57 100644 --- a/conf/manjaro-tools.conf +++ b/conf/manjaro-tools.conf @@ -53,6 +53,12 @@ # default iso buildset; name without .set extension # buildset_iso=default +# clean xorg cache before building +# clean_cache_xorg=true + +# clean lng cache before building +# clean_cache_lng=true + # unset defaults to given value # dist_name="Manjaro" diff --git a/lib/util.sh b/lib/util.sh index e7f273d..e8162e3 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -258,6 +258,14 @@ load_config(){ buildset_iso='default' fi + if [[ -z ${clean_cache_xorg} ]];then + clean_cache_xorg='true' + fi + + if [[ -z ${clean_cache_lng} ]];then + clean_cache_lng='true' + fi + ##### iso settings ##### if [[ -z ${dist_release} ]];then From 999a8d899401e69962989f81db6edc43fb0978fd Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 7 May 2015 22:41:56 +0200 Subject: [PATCH 051/127] [util-pkg] test run_post_build() --- lib/util-pkg.sh | 90 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 24 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index c1ca69e..9ab18b7 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -69,32 +69,73 @@ prepare_cachedir(){ chown -R "${OWNER}:users" "${cache_dir_pkg}" } -move_pkg(){ - local ext='pkg.tar.xz' +sign_pkg(){ + su ${OWNER} -c "signpkg ${cache_dir_pkg}/$1" +} + +run_post_build(){ + source PKGBUILD + # we need a different varnane for arch to make it to work + # with sourced PKGBUILD $arch -> see globalvars branch + local ext='pkg.tar.xz' pinfo loglist=() lname + if [[ ${arch} == "any" ]]; then + pinfo=${pkgver}-${pkgrel}-any + else + pinfo=${pkgver}-${pkgrel}-${arch} + fi if [[ -n $PKGDEST ]];then - if [[ -n $pkgbase ]];then + if [[ -n ${pkgbase} ]];then for p in ${pkgname[@]};do - mv $PKGDEST/$p*.${ext} ${cache_dir_pkg}/ + mv $PKGDEST/${p}-${pinfo}.${ext} ${cache_dir_pkg}/ + ${sign} && sign_pkg ${p}-${pinfo}.${ext} + loglist+=("*$p*.log") + lname=${pkgbase} done else - mv $PKGDEST/$pkgname*.${ext} ${cache_dir_pkg}/ + mv $PKGDEST/${pkgname}-${pinfo}.${ext} ${cache_dir_pkg}/ + ${sign} && sign_pkg ${pkgname}-${pinfo}.${ext} + loglist+=("*${pkgname}*.log") + lname=${pkgname} fi else mv *.${ext} ${cache_dir_pkg} + ${sign} && sign_pkg ${pkgname}-${pinfo}.${ext} + loglist+=("*${pkgname}*.log") + lname=${pkgname} fi chown -R "${OWNER}:users" "${cache_dir_pkg}" + if [[ -z $LOGDEST ]];then + tar -cjf ${lname}-${pinfo}.log.tar.xz ${loglist[@]} + find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null + fi } -archive_logs(){ - local ext='log.tar.xz' logfile - if [[ -n $pkgbase ]];then - logfile=$PWD/$pkgbase-$pkgver-$pkgrel.${ext} - else - logfile=$PWD/$pkgname-$pkgver-$pkgrel.${ext} - fi - tar -cJf ${logfile} $pkgname-$pkgver-$pkgrel*.log - find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null -} +# move_pkg(){ +# local ext='pkg.tar.xz' +# if [[ -n $PKGDEST ]];then +# if [[ -n $pkgbase ]];then +# for p in ${pkgname[@]};do +# mv $PKGDEST/$p*.${ext} ${cache_dir_pkg}/ +# done +# else +# mv $PKGDEST/$pkgname*.${ext} ${cache_dir_pkg}/ +# fi +# else +# mv *.${ext} ${cache_dir_pkg} +# fi +# chown -R "${OWNER}:users" "${cache_dir_pkg}" +# } +# +# archive_logs(){ +# local ext='log.tar.xz' logfile +# if [[ -n $pkgbase ]];then +# logfile=$PWD/$pkgbase-$pkgver-$pkgrel.${ext} +# else +# logfile=$PWD/$pkgname-$pkgver-$pkgrel.${ext} +# fi +# tar -cJf ${logfile} $pkgname-$pkgver-$pkgrel*.log +# find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null +# } make_pkg(){ msg "Start building [$1]" @@ -104,9 +145,10 @@ make_pkg(){ done setarch "${arch}" \ mkchrootpkg ${mkchrootpkg_args[*]} -- ${makepkg_args[*]} || eval "$2" - source PKGBUILD - move_pkg - [[ -z $LOGDEST ]] && archive_logs + run_post_build + #source PKGBUILD + #move_pkg + #[[ -z $LOGDEST ]] && archive_logs cd .. msg "Finished building [$1]" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes" @@ -137,9 +179,9 @@ chroot_init(){ msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } -sign_pkgs(){ - cd ${cache_dir_pkg} - su "${OWNER}" <<'EOF' -signpkgs -EOF -} +# sign_pkgs(){ +# cd ${cache_dir_pkg} +# su "${OWNER}" <<'EOF' +# signpkgs +# EOF +# } From 81cf7e27f86a4a14ff05e8d596684b984de47369 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 7 May 2015 22:42:43 +0200 Subject: [PATCH 052/127] [buildpkg] comment out signing, done in util-pkg --- bin/buildpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/buildpkg.in b/bin/buildpkg.in index d28d5f1..4176433 100644 --- a/bin/buildpkg.in +++ b/bin/buildpkg.in @@ -190,4 +190,4 @@ chroot_init chroot_build -${sign} && sign_pkgs +#${sign} && sign_pkgs From 885648908cc3c54086580e623090093f6a07e26e Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Sun, 3 May 2015 02:34:24 +0530 Subject: [PATCH 053/127] [util-iso] try to remove custom repo in pacman.conf, unless specified otherwise --- bin/buildiso.in | 5 ++++- conf/manjaro-tools.conf | 3 +++ lib/util-iso.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 0e11541..4f4a76a 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -81,6 +81,7 @@ display_settings(){ msg2 "arch: ${arch}" msg2 "branch: ${branch}" msg2 "chroots_iso: ${chroots_iso}" + msg2 "custom repo to keep: ${keep_repo}" msg "ARGS:" msg2 "clean_first: ${clean_first}" @@ -132,6 +133,7 @@ usage() { echo " -a Arch [default: ${arch}]" echo " -b Branch [default: ${branch}]" echo ' -r Chroots directory' + echo ' -k Custom repo to keep from pacman.conf' echo " [default: ${chroots_iso}]" echo ' -w Disable clean iso cache' echo ' -c Disable clean work dir' @@ -149,7 +151,7 @@ usage() { orig_argv=("$@") -opts='p:a:b:r:cxlisqwLh' +opts='p:a:b:r:k:cxlisqwLh' while getopts "${opts}" arg; do case "${arg}" in @@ -157,6 +159,7 @@ while getopts "${opts}" arg; do a) arch="$OPTARG" ;; b) branch="$OPTARG" ;; r) chroots_iso="$OPTARG" ;; + k) keep_repo="$OPTARG" ;; c) clean_first=false ;; w) clean_cache_iso=false;; x) clean_cache_xorg=false ;; diff --git a/conf/manjaro-tools.conf b/conf/manjaro-tools.conf index acb1d57..2130a7c 100644 --- a/conf/manjaro-tools.conf +++ b/conf/manjaro-tools.conf @@ -59,6 +59,9 @@ # clean lng cache before building # clean_cache_lng=true +# custom pacman repo to keep +# keep_repo="" + # unset defaults to given value # dist_name="Manjaro" diff --git a/lib/util-iso.sh b/lib/util-iso.sh index ddc0dfd..8fa2640 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -510,6 +510,32 @@ compress_images(){ msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } +clean_pacman_conf(){ + REPOS=() # set default value + # Get repos from pacman_conf + # sed is being used for filtering comments and repo brackets [] + REPOS=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//')) + # Set valid repos + if [[ $arch = x86_64 ]]; then + VALID=('options' 'core' 'extra' 'community' 'multilib') + else + VALID=('options' 'core' 'extra' 'community') + fi + # Remove extra repos from pacman.conf + for repo in "${REPOS[@]}"; do + if [[ ! $(echo "${VALID[*]}" | grep "$repo") ]] && [[ ! $(echo "$keep_repo" | grep "$repo") ]]; then + # Remove custom repo + for file in $work_dir/{livecd,root,$custom}-image/etc/pacman.conf; do + if [[ -f $file ]]; then + msg2 "Editing $file" + sed -i "/^\[$repo/,/^Server/d" "$file" || exit 1 + fi + done + msg "Custom repo $repo removed from pacman.conf" + fi + done +} + build_images(){ local timer=$(get_timer) load_pkgs "Packages" @@ -554,10 +580,12 @@ make_profile(){ fi if ${images_only}; then build_images + clean_pacman_conf warning "Continue compress: buildiso -p ${buildset_iso} -sc ..." exit 1 else build_images + clean_pacman_conf compress_images fi cd .. From da3a3618b8159748eb06ef5991e51b40d7595638 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 7 May 2015 23:10:13 +0200 Subject: [PATCH 054/127] [util-pkg] ad workaround arch var --- lib/util-pkg.sh | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index 9ab18b7..b295f70 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -74,14 +74,13 @@ sign_pkg(){ } run_post_build(){ + local _arch=${arch} source PKGBUILD - # we need a different varnane for arch to make it to work - # with sourced PKGBUILD $arch -> see globalvars branch local ext='pkg.tar.xz' pinfo loglist=() lname if [[ ${arch} == "any" ]]; then pinfo=${pkgver}-${pkgrel}-any else - pinfo=${pkgver}-${pkgrel}-${arch} + pinfo=${pkgver}-${pkgrel}-${_arch} fi if [[ -n $PKGDEST ]];then if [[ -n ${pkgbase} ]];then @@ -108,35 +107,9 @@ run_post_build(){ tar -cjf ${lname}-${pinfo}.log.tar.xz ${loglist[@]} find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null fi + arch=$_arch } -# move_pkg(){ -# local ext='pkg.tar.xz' -# if [[ -n $PKGDEST ]];then -# if [[ -n $pkgbase ]];then -# for p in ${pkgname[@]};do -# mv $PKGDEST/$p*.${ext} ${cache_dir_pkg}/ -# done -# else -# mv $PKGDEST/$pkgname*.${ext} ${cache_dir_pkg}/ -# fi -# else -# mv *.${ext} ${cache_dir_pkg} -# fi -# chown -R "${OWNER}:users" "${cache_dir_pkg}" -# } -# -# archive_logs(){ -# local ext='log.tar.xz' logfile -# if [[ -n $pkgbase ]];then -# logfile=$PWD/$pkgbase-$pkgver-$pkgrel.${ext} -# else -# logfile=$PWD/$pkgname-$pkgver-$pkgrel.${ext} -# fi -# tar -cJf ${logfile} $pkgname-$pkgver-$pkgrel*.log -# find $PWD -maxdepth 1 -name '*.log' -delete #&> /dev/null -# } - make_pkg(){ msg "Start building [$1]" cd $1 @@ -178,10 +151,3 @@ chroot_init(){ fi msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } - -# sign_pkgs(){ -# cd ${cache_dir_pkg} -# su "${OWNER}" <<'EOF' -# signpkgs -# EOF -# } From a59438bf66e82efaf0aa058e9590a0bd69601cb1 Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Sun, 3 May 2015 02:41:09 +0530 Subject: [PATCH 055/127] [buildiso] (minor) slightly help text --- bin/buildiso.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 4f4a76a..cc7ea66 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -133,7 +133,7 @@ usage() { echo " -a Arch [default: ${arch}]" echo " -b Branch [default: ${branch}]" echo ' -r Chroots directory' - echo ' -k Custom repo to keep from pacman.conf' + echo ' -k Custom pacman repo to keep' echo " [default: ${chroots_iso}]" echo ' -w Disable clean iso cache' echo ' -c Disable clean work dir' From 3e24e72bcafc81ac37a593481e01a1a2485b8fff Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 7 May 2015 23:10:41 +0200 Subject: [PATCH 056/127] [buildpkg] rm signing here --- bin/buildpkg.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/buildpkg.in b/bin/buildpkg.in index 4176433..c4a54cb 100644 --- a/bin/buildpkg.in +++ b/bin/buildpkg.in @@ -189,5 +189,3 @@ ${wipe_clean} && clean_up chroot_init chroot_build - -#${sign} && sign_pkgs From 1cac46b4af00e31d3e24a7a54e560dd4962bdfbb Mon Sep 17 00:00:00 2001 From: Aaditya Bagga Date: Sun, 3 May 2015 09:28:39 +0530 Subject: [PATCH 057/127] [util-iso] (clean_pacman_conf) use flag variable --- lib/util-iso.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 8fa2640..11b4bc2 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -511,9 +511,11 @@ compress_images(){ } clean_pacman_conf(){ - REPOS=() # set default value + # set default values + REPOS=() + flag=0 # Get repos from pacman_conf - # sed is being used for filtering comments and repo brackets [] + # sed is being used for removing comments and repo brackets [] REPOS=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//')) # Set valid repos if [[ $arch = x86_64 ]]; then @@ -528,10 +530,12 @@ clean_pacman_conf(){ for file in $work_dir/{livecd,root,$custom}-image/etc/pacman.conf; do if [[ -f $file ]]; then msg2 "Editing $file" - sed -i "/^\[$repo/,/^Server/d" "$file" || exit 1 + sed -i "/^\[$repo/,/^Server/d" "$file" && flag=1 || return 1 fi done - msg "Custom repo $repo removed from pacman.conf" + if [[ $flag -eq 1 ]]; then + msg "Custom repo $repo removed from pacman.conf" + fi fi done } From 2c57c439779d5c732d67a974f22a076b61b09d77 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 7 May 2015 23:20:32 +0200 Subject: [PATCH 058/127] [util-pkg] clean up unused --- lib/util-pkg.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/util-pkg.sh b/lib/util-pkg.sh index b295f70..9af1cd4 100644 --- a/lib/util-pkg.sh +++ b/lib/util-pkg.sh @@ -119,9 +119,6 @@ make_pkg(){ setarch "${arch}" \ mkchrootpkg ${mkchrootpkg_args[*]} -- ${makepkg_args[*]} || eval "$2" run_post_build - #source PKGBUILD - #move_pkg - #[[ -z $LOGDEST ]] && archive_logs cd .. msg "Finished building [$1]" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer_start}) minutes" From 62d50ee54faf59a724198721e25ec75f65ce6731 Mon Sep 17 00:00:00 2001 From: ppatpat Date: Fri, 8 May 2015 07:44:37 -0600 Subject: [PATCH 059/127] Update miso If we retrieved the squashed files by HTTP we consider the "device" is found.... --- initcpio/hooks/miso | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/initcpio/hooks/miso b/initcpio/hooks/miso index b09c0ea..9ebff4c 100644 --- a/initcpio/hooks/miso +++ b/initcpio/hooks/miso @@ -126,6 +126,12 @@ testdevice() { } probedevice() { + + if [[ -n "${ip}" && -n "${miso_http_srv}" && -f "${isomounts}" ]]; then + found="yes" + return + fi + # Loop device test every second up to some limit if [ "x${usbdelay}" != "x" ]; then waittime=${usbdelay} From 3020585e3325c84687a018184d9b7211af27664f Mon Sep 17 00:00:00 2001 From: ppatpat Date: Fri, 8 May 2015 07:46:27 -0600 Subject: [PATCH 060/127] Create miso_pxe_common --- initcpio/hooks/miso_pxe_common | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 initcpio/hooks/miso_pxe_common diff --git a/initcpio/hooks/miso_pxe_common b/initcpio/hooks/miso_pxe_common new file mode 100644 index 0000000..d8ac709 --- /dev/null +++ b/initcpio/hooks/miso_pxe_common @@ -0,0 +1,50 @@ +# vim: set ft=sh: + +run_hook () { + local i net_mac bootif_mac bootif_dev + # These variables will be parsed from /tmp/net-*.conf generated by ipconfig + local DEVICE + local IPV4ADDR IPV4BROADCAST IPV4NETMASK IPV4GATEWAY IPV4DNS0 IPV4DNS1 + local HOSTNAME DNSDOMAIN NISDOMAIN ROOTSERVER ROOTPATH + local filename + # /tmp/net-*.conf + + if [[ -n "${ip}" ]]; then + if [[ -n "${BOOTIF}" ]]; then + bootif_mac=${BOOTIF#01-} + bootif_mac=${bootif_mac//-/:} + for i in /sys/class/net/*/address; do + read net_mac < ${i} + if [[ "${bootif_mac}" == "${net_mac}" ]]; then + bootif_dev=${i#/sys/class/net/} + bootif_dev=${bootif_dev%/address} + break + fi + done + ip="${ip}::${bootif_dev}" + fi + + # setup network and save some values + ipconfig "ip=${ip}" + + . /tmp/net-*.conf + + pxeserver=${ROOTSERVER} + + # setup DNS resolver + if [[ "${IPV4DNS0}" != "0.0.0.0" ]]; then + echo "nameserver ${IPV4DNS0}" > /etc/resolv.conf + fi + if [[ "${IPV4DNS1}" != "0.0.0.0" ]]; then + echo "nameserver ${IPV4DNS1}" >> /etc/resolv.conf + fi + fi +} + +run_latehook () { + [[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y" + + if [[ "${copy_resolvconf}" != "n" && -f /etc/resolv.conf ]]; then + cp /etc/resolv.conf /new_root/etc/resolv.conf + fi +} From 3d86ee39cde1ce2aab442a6995a19b87ebdce315 Mon Sep 17 00:00:00 2001 From: ppatpat Date: Fri, 8 May 2015 07:47:11 -0600 Subject: [PATCH 061/127] Create miso_pxe_http --- initcpio/hooks/miso_pxe_http | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 initcpio/hooks/miso_pxe_http diff --git a/initcpio/hooks/miso_pxe_http b/initcpio/hooks/miso_pxe_http new file mode 100644 index 0000000..cf699c8 --- /dev/null +++ b/initcpio/hooks/miso_pxe_http @@ -0,0 +1,47 @@ +# vim: set ft=sh: + +run_hook() { + if [[ -n "${ip}" && -n "${miso_http_srv}" ]]; then + + miso_http_srv=$(eval echo ${miso_http_srv}) + [[ -z "${miso_http_spc}" ]] && miso_http_spc="75%" + + mount_handler="miso_pxe_http_mount_handler" + fi +} + +# Fetch a file with CURL +# +# $1 URL +# $2 Destination directory inside httpspace/${misobasedir} +_curl_get() { + local _url="${1}" + local _dst="${2}" + + msg ":: Downloading '${_url}'" + if ! curl -L -f -o "${_dst}" --create-dirs "${_url}"; then + echo "ERROR: Downloading '${_url}'" + echo " Falling back to interactive prompt" + echo " You can try to fix the problem manually, log out when you are finished" + launch_interactive_shell + fi +} + +miso_pxe_http_mount_handler () { + newroot="${1}" + + _curl_get "${miso_http_srv}${misobasedir}/isomounts" "${isomounts}" + + msg ":: Retrieving images" + while read img imgarch mountpoint type kernelarg; do + # check if this line is a comment (starts with #) + [ "${img#"#"}" != "${img}" ] && continue + + [ "$imgarch" != "$arch" ] && continue + + _curl_get "${miso_http_srv}${misobasedir}/${img}" "/bootmnt/${misobasedir}/${img}" + + done < "${isomounts}" + + miso_mount_handler ${newroot} +} From 66ffc146cbac60d27327e460efb07452b0a53d00 Mon Sep 17 00:00:00 2001 From: ppatpat Date: Fri, 8 May 2015 08:22:11 -0600 Subject: [PATCH 062/127] Create miso_pxe_common --- initcpio/inst/miso_pxe_common | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 initcpio/inst/miso_pxe_common diff --git a/initcpio/inst/miso_pxe_common b/initcpio/inst/miso_pxe_common new file mode 100644 index 0000000..1f458c1 --- /dev/null +++ b/initcpio/inst/miso_pxe_common @@ -0,0 +1,12 @@ +#!/bin/bash + +build() { + + add_runscript +} + +help() { +cat< Date: Fri, 8 May 2015 08:23:03 -0600 Subject: [PATCH 063/127] Create miso_pxe_http --- initcpio/inst/miso_pxe_http | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 initcpio/inst/miso_pxe_http diff --git a/initcpio/inst/miso_pxe_http b/initcpio/inst/miso_pxe_http new file mode 100644 index 0000000..287f185 --- /dev/null +++ b/initcpio/inst/miso_pxe_http @@ -0,0 +1,12 @@ +#!/bin/bash + +build() { + + add_runscript +} + +help() { +cat< Date: Fri, 8 May 2015 20:30:22 +0200 Subject: [PATCH 064/127] [makefile] adopt to pxe changes --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 45ac51c..58ac8be 100644 --- a/Makefile +++ b/Makefile @@ -61,11 +61,15 @@ LIBS = \ CPIOHOOKS = \ initcpio/hooks/miso \ initcpio/hooks/miso_loop_mnt \ + initcpio/hooks/miso_pxe_common \ + initcpio/hooks/miso_pxe_http \ initcpio/hooks/miso_pxe_nbd CPIOINST = \ initcpio/inst/miso \ initcpio/inst/miso_loop_mnt \ + initcpio/inst/miso_pxe_common \ + initcpio/inst/miso_pxe_http \ initcpio/inst/miso_pxe_nbd \ initcpio/inst/miso_kms From 73d6b469e539f93e7ebcd992d4834440d2a2dbb4 Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 9 May 2015 01:37:24 +0200 Subject: [PATCH 065/127] [util-livecd] use pam-autologin for lightdm on openrc --- lib/util-livecd.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/util-livecd.sh b/lib/util-livecd.sh index 74251a7..50474ab 100644 --- a/lib/util-livecd.sh +++ b/lib/util-livecd.sh @@ -421,18 +421,21 @@ configure_user_root(){ configure_displaymanager(){ if [[ -f /usr/bin/lightdm ]];then gpasswd -a ${username} autologin &> /dev/null -# sed -i -e 's/^.*autologin-user-timeout=.*/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf + # hopefully fixes autologin on openrc livecd + if [[ -d /run/openrc ]];then + sed -i -e 's/^.*pam-autologin-service=.*/pam-autologin-service=lightdm-autologin/' /etc/lightdm/lightdm.conf + fi sed -i -e "s/^.*autologin-user=.*/autologin-user=${username}/" /etc/lightdm/lightdm.conf - elif [[ -f /usr/bin/kdm ]];then + elif [[ -f /usr/bin/kdm ]];then sed -i -e "s/^.*AutoLoginUser=.*/AutoLoginUser=${username}/" /usr/share/config/kdm/kdmrc sed -i -e "s/^.*AutoLoginPass=.*/AutoLoginPass=${password}/" /usr/share/config/kdm/kdmrc xdg-icon-resource forceupdate --theme hicolor &> /dev/null [[ -e "/usr/bin/update-desktop-database" ]] && update-desktop-database -q - elif [[ -f /usr/bin/sddm ]];then + elif [[ -f /usr/bin/sddm ]];then sed -i -e "s|^User=.*|User=${username}|" /etc/sddm.conf - elif [[ -f /usr/bin/lxdm ]];then + elif [[ -f /usr/bin/lxdm ]];then sed -i -e "s/^.*autologin=.*/autologin=${username}/" /etc/lxdm/lxdm.conf - elif [[ -f /usr/bin/gdm ]];then + elif [[ -f /usr/bin/gdm ]];then sed -i -e "s/^.*AutomaticLogin=.*/AutomaticLogin=${username}/" /etc/gdm/custom.conf fi } From 658fe508a7913074a28b067564525a622931aa5e Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 9 May 2015 10:35:05 +0200 Subject: [PATCH 066/127] [conf] move keep_repos to profile.conf --- conf/manjaro-tools.conf | 9 --------- conf/profile.conf | 3 +++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/conf/manjaro-tools.conf b/conf/manjaro-tools.conf index 2130a7c..c20214e 100644 --- a/conf/manjaro-tools.conf +++ b/conf/manjaro-tools.conf @@ -53,15 +53,6 @@ # default iso buildset; name without .set extension # buildset_iso=default -# clean xorg cache before building -# clean_cache_xorg=true - -# clean lng cache before building -# clean_cache_lng=true - -# custom pacman repo to keep -# keep_repo="" - # unset defaults to given value # dist_name="Manjaro" diff --git a/conf/profile.conf b/conf/profile.conf index c854637..7ec6d0c 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -7,6 +7,9 @@ # displaymanager="lightdm" +# custom pacman repos to keep +# keep_repos=() + ################ install ################ # unset defaults to given value From d16aa0ae11a6e0f2a4364c671c7365ad56da9f07 Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 9 May 2015 10:36:47 +0200 Subject: [PATCH 067/127] [buildiso] reintroduce cache switches; the now default to false ie cleaning to be done with -x or -l switch --- bin/buildiso.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 4d5d2d7..c6a1ea9 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -26,13 +26,14 @@ show_profile(){ msg2 "work_dir: ${work_dir}" msg2 "iso_file: ${iso_file}" msg2 "pacman_conf: ${pacman_conf}" + [[ -n ${keep_repos} ]] && msg2 "keep_repos: ${keep_repos[*]}" msg2 "initsys: ${initsys}" msg2 "displaymanager: ${displaymanager}" msg2 "kernel: ${kernel}" msg2 "efi_boot_loader: ${efi_boot_loader}" msg2 "efi_part_size: ${efi_part_size}" - + ${is_plymouth} && msg2 "plymouth_theme: ${plymouth_theme}" msg2 "hostname: ${hostname}" @@ -82,7 +83,6 @@ display_settings(){ msg2 "arch: ${arch}" msg2 "branch: ${branch}" msg2 "chroots_iso: ${chroots_iso}" - msg2 "custom repo to keep: ${keep_repo}" msg "ARGS:" msg2 "clean_first: ${clean_first}" @@ -122,6 +122,9 @@ load_config "${SYSCONFDIR}/manjaro-tools.conf" clean_first=true clean_cache_iso=true +clean_cache_xorg=false +clean_cache_lng=false + pretend=false images_only=false iso_only=false @@ -138,8 +141,8 @@ usage() { echo " [default: ${chroots_iso}]" echo ' -w Disable clean iso cache' echo ' -c Disable clean work dir' - echo ' -x Disable clean xorg cache' - echo ' -l Disable clean lng cache' + echo ' -x Clean xorg cache' + echo ' -l Clean lng cache' echo ' -i Build images only' echo ' -s Generate iso only' echo ' Requires pre built images (-i)' @@ -163,8 +166,8 @@ while getopts "${opts}" arg; do k) keep_repo="$OPTARG" ;; c) clean_first=false ;; w) clean_cache_iso=false;; - x) clean_cache_xorg=false ;; - l) clean_cache_lng=false ;; + x) clean_cache_xorg=true ;; + l) clean_cache_lng=true ;; i) images_only=true ;; s) iso_only=true ;; q) pretend=true ;; From 6f579af32d22dfbce40622d4a62a749edbed41fd Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 9 May 2015 10:37:23 +0200 Subject: [PATCH 068/127] [util] comment out bool switches --- lib/util.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/util.sh b/lib/util.sh index 9099d0a..9758148 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -258,13 +258,13 @@ load_config(){ buildset_iso='default' fi - if [[ -z ${clean_cache_xorg} ]];then - clean_cache_xorg='true' - fi - - if [[ -z ${clean_cache_lng} ]];then - clean_cache_lng='true' - fi +# if [[ -z ${clean_cache_xorg} ]];then +# clean_cache_xorg='true' +# fi +# +# if [[ -z ${clean_cache_lng} ]];then +# clean_cache_lng='true' +# fi ##### iso settings ##### @@ -375,6 +375,10 @@ load_profile_config(){ displaymanager="none" fi + if [[ -z ${keep_repos} ]];then + keep_repos=() + fi + return 0 } From 955c743ae4ee8c2f42c3101ea7f9325f94e42321 Mon Sep 17 00:00:00 2001 From: udeved Date: Sat, 9 May 2015 10:38:44 +0200 Subject: [PATCH 069/127] [util-iso] redo clean_pacman_conf to use keep_repos array so to define more than one repo to keep; some cosmetics --- lib/util-iso.sh | 57 ++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index fdd3489..95e44a1 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -350,7 +350,6 @@ make_image_boot() { aufs_mount_root_image "${path}" fi copy_initcpio "${path}" - gen_boot_image "${path}" mv ${path}/boot/${iso_name}.img ${path_iso}/${arch}/${iso_name}.img if [[ -f ${path}/boot/intel-ucode.img ]]; then @@ -527,31 +526,42 @@ compress_images(){ clean_pacman_conf(){ # set default values - REPOS=() - flag=0 + #local repos=() #valid_repos=() + #flag=0 # Get repos from pacman_conf # sed is being used for removing comments and repo brackets [] - REPOS=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//')) + local repos=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//')) # Set valid repos - if [[ $arch = x86_64 ]]; then - VALID=('options' 'core' 'extra' 'community' 'multilib') - else - VALID=('options' 'core' 'extra' 'community') - fi +# case ${arch} in +# 'x86_64') valid_repos==('options' 'core' 'extra' 'community' 'multilib') ;; +# *) valid_repos=('options' 'core' 'extra' 'community') ;; +# esac + # Remove extra repos from pacman.conf - for repo in "${REPOS[@]}"; do - if [[ ! $(echo "${VALID[*]}" | grep "$repo") ]] && [[ ! $(echo "$keep_repo" | grep "$repo") ]]; then - # Remove custom repo - for file in $work_dir/{livecd,root,$custom}-image/etc/pacman.conf; do - if [[ -f $file ]]; then - msg2 "Editing $file" - sed -i "/^\[$repo/,/^Server/d" "$file" && flag=1 || return 1 - fi - done - if [[ $flag -eq 1 ]]; then - msg "Custom repo $repo removed from pacman.conf" - fi - fi + for repo in "${repos[@]}"; do + case $repo in + 'options'|'core'|'extra'|'community'|'multilib') continue ;; + *) + for kr in "${keep_repos[@]}"; do + if [[ ${repo} != ${kr} ]]; then + msg2 "Removing custom repo ${repo} ..." + sed -i "/^\[$repo/,/^Server/d" $1/etc/pacman.conf + fi + done + ;; + esac +# if [[ ! $(echo "${valid_repos[*]}" | grep "$repo") ]] && [[ ! $(echo "$keep_repo" | grep "$repo") ]]; then +# # Remove custom repo +# for file in $work_dir/root-image/etc/pacman.conf; do +# if [[ -f $file ]]; then +# msg2 "Editing $file" +# sed -i "/^\[$repo/,/^Server/d" "$file" && flag=1 || return 1 +# fi +# done +# if [[ $flag -eq 1 ]]; then +# msg "Custom repo $repo removed from pacman.conf" +# fi +# fi done } @@ -582,6 +592,7 @@ build_images(){ fi make_isolinux make_isomounts + [[ -n ${keep_repos} ]] && clean_pacman_conf "${work_dir}/root-image" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } @@ -629,12 +640,10 @@ make_profile(){ fi if ${images_only}; then build_images - clean_pacman_conf warning "Continue compress: buildiso -p ${buildset_iso} -sc ..." exit 1 else build_images - clean_pacman_conf compress_images fi cd .. From a8c0e2195e017651289cb47a28de5bac33042fd5 Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 10 May 2015 11:26:42 +0200 Subject: [PATCH 070/127] [util] update defaults --- lib/util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util.sh b/lib/util.sh index 9758148..2ba49cb 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -320,7 +320,7 @@ load_profile_config(){ [[ -r ${profile_conf} ]] && source ${profile_conf} if [[ -z ${kernel} ]];then - kernel="linux319" + kernel="linux318" fi if [[ -z ${efi_boot_loader} ]];then @@ -328,7 +328,7 @@ load_profile_config(){ fi if [[ -z ${efi_part_size} ]]; then - efi_part_size="32M" + efi_part_size="42M" fi if [[ -z ${hostname} ]];then From 27e4752ea9fc8b9a6bc3bcdb6bc6c004e4014c4d Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 20:22:46 +0200 Subject: [PATCH 071/127] [util-iso] set a flag for custom pacman.conf --- lib/util-iso.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 95e44a1..e076b76 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -490,6 +490,16 @@ check_plymouth(){ done } +check_custom_pacman_conf(){ + if [[ -f pacman-${pacman_conf_arch}.conf ]]; then + pacman_conf="pacman-${pacman_conf_arch}.conf" + is_custom_pac_conf=true + else + pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf" + is_custom_pac_conf=false + fi +} + # $1: profile load_profile(){ msg3 "Profile: [$1]" @@ -504,11 +514,9 @@ load_profile(){ custom=${packages_custom#*-} custom=${custom,,} iso_file="${iso_name}-${custom}-${dist_release}-${arch}.iso" - if [[ -f pacman-${pacman_conf_arch}.conf ]]; then - pacman_conf="pacman-${pacman_conf_arch}.conf" - else - pacman_conf="${PKGDATADIR}/pacman-${pacman_conf_arch}.conf" - fi + + check_custom_pacman_conf + create_args+=(-C ${pacman_conf}) work_dir=${chroots_iso}/$1/${arch} @@ -592,7 +600,7 @@ build_images(){ fi make_isolinux make_isomounts - [[ -n ${keep_repos} ]] && clean_pacman_conf "${work_dir}/root-image" + ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/root-image" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } From efb502425e5bee1b45f3f984a4107aea02024f94 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 22:13:12 +0200 Subject: [PATCH 072/127] [util-iso] remove any local repo from a custom pacman.conf --- lib/util-iso.sh | 90 ++++++++++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 34 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index e076b76..106e335 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -532,44 +532,64 @@ compress_images(){ msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } -clean_pacman_conf(){ - # set default values - #local repos=() #valid_repos=() - #flag=0 - # Get repos from pacman_conf - # sed is being used for removing comments and repo brackets [] - local repos=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//')) - # Set valid repos -# case ${arch} in -# 'x86_64') valid_repos==('options' 'core' 'extra' 'community' 'multilib') ;; -# *) valid_repos=('options' 'core' 'extra' 'community') ;; -# esac +# $1: section +parse_section() { + local is_section=0 + while read line; do + [[ $line =~ ^\ {0,}# ]] && continue + [[ -z "$line" ]] && continue + if [ $is_section == 0 ]; then + if [[ $line =~ ^\[.*?\] ]]; then + line=${line:1:$((${#line}-2))} + section=${line// /} + if [[ $section == $1 ]]; then + is_section=1 + continue + fi + continue + fi + elif [[ $line =~ ^\[.*?\] && $is_section == 1 ]]; then + break + else + pc_key=${line%%=*} + pc_key=${pc_key// /} + pc_value=${line##*=} + pc_value=${pc_value## } + eval "$pc_key='$pc_value'" + fi + done < "${pacman_conf}" +} - # Remove extra repos from pacman.conf - for repo in "${repos[@]}"; do - case $repo in +get_repos() { + local section repos=() filter='^\ {0,}#' + while read line; do + [[ $line =~ "${filter}" ]] && continue + [[ -z "$line" ]] && continue + if [[ $line =~ ^\[.*?\] ]]; then + line=${line:1:$((${#line}-2))} + section=${line// /} + case ${section} in + "options") continue ;; + *) repos+=("${section}") ;; + esac + fi + done < "${pacman_conf}" + echo ${repos[@]} +} + +clean_pacman_conf(){ + local repositories=$(get_repos) uri='file://' + for repo in ${repositories[@]}; do + case ${repo} in 'options'|'core'|'extra'|'community'|'multilib') continue ;; *) - for kr in "${keep_repos[@]}"; do - if [[ ${repo} != ${kr} ]]; then - msg2 "Removing custom repo ${repo} ..." - sed -i "/^\[$repo/,/^Server/d" $1/etc/pacman.conf - fi - done + parse_section ${repo} + if [[ ${pc_value} == $uri* ]]; then + msg2 "Removing local repo ${repo} ..." + sed -i "/^\[${repo}/,/^SigLevel/,/^Server/d" $1/etc/pacman.conf + fi ;; esac -# if [[ ! $(echo "${valid_repos[*]}" | grep "$repo") ]] && [[ ! $(echo "$keep_repo" | grep "$repo") ]]; then -# # Remove custom repo -# for file in $work_dir/root-image/etc/pacman.conf; do -# if [[ -f $file ]]; then -# msg2 "Editing $file" -# sed -i "/^\[$repo/,/^Server/d" "$file" && flag=1 || return 1 -# fi -# done -# if [[ $flag -eq 1 ]]; then -# msg "Custom repo $repo removed from pacman.conf" -# fi -# fi done } @@ -577,13 +597,16 @@ build_images(){ local timer=$(get_timer) load_pkgs "Packages" make_image_root + ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/root-image" if [[ -f "${packages_custom}" ]] ; then load_pkgs "${packages_custom}" make_image_custom + ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/${custom}-image" fi if [[ -f Packages-Livecd ]]; then load_pkgs "Packages-Livecd" make_image_livecd + ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/livecd-image" fi if [[ -f Packages-Xorg ]] ; then load_pkgs_xorg @@ -600,7 +623,6 @@ build_images(){ fi make_isolinux make_isomounts - ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/root-image" msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } From 6c6e07b58c46f3064b6f904beb55a957e1b75377 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 22:14:20 +0200 Subject: [PATCH 073/127] [conf] rm unused keep_repos from sample profile.conf #54 Auf Branch devel --- conf/profile.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/profile.conf b/conf/profile.conf index 7ec6d0c..c854637 100644 --- a/conf/profile.conf +++ b/conf/profile.conf @@ -7,9 +7,6 @@ # displaymanager="lightdm" -# custom pacman repos to keep -# keep_repos=() - ################ install ################ # unset defaults to given value From 2c6d0bfb6ebcfecb88f68678bf132c539f265d16 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 22:22:00 +0200 Subject: [PATCH 074/127] [util-iso] fix sed --- lib/util-iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 106e335..696d24e 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -586,7 +586,7 @@ clean_pacman_conf(){ parse_section ${repo} if [[ ${pc_value} == $uri* ]]; then msg2 "Removing local repo ${repo} ..." - sed -i "/^\[${repo}/,/^SigLevel/,/^Server/d" $1/etc/pacman.conf + sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf fi ;; esac From 770e0876e235e0ada9ee4cf3b5f23ad42aa17c6c Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 22:26:39 +0200 Subject: [PATCH 075/127] [util-iso] add some info msg #54 --- lib/util-iso.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 696d24e..51448c9 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -579,11 +579,14 @@ get_repos() { clean_pacman_conf(){ local repositories=$(get_repos) uri='file://' + msg "Cleaning custom pacman.conf ..." for repo in ${repositories[@]}; do case ${repo} in 'options'|'core'|'extra'|'community'|'multilib') continue ;; *) + msg2 "parsing [${repo}] ..." parse_section ${repo} + msg2 "is_custom_pac_conf: ${is_custom_pac_conf}" if [[ ${pc_value} == $uri* ]]; then msg2 "Removing local repo ${repo} ..." sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf From 108273a2e9e4295be6be866c67d9de36f78a8a37 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 22:27:27 +0200 Subject: [PATCH 076/127] [buildiso] display just is_custom_pac_conf instead of full path --- bin/buildiso.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index c6a1ea9..fe99cc6 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -25,9 +25,9 @@ show_profile(){ load_profile "$1" msg2 "work_dir: ${work_dir}" msg2 "iso_file: ${iso_file}" - msg2 "pacman_conf: ${pacman_conf}" - [[ -n ${keep_repos} ]] && msg2 "keep_repos: ${keep_repos[*]}" - + #msg2 "pacman_conf: ${pacman_conf}" + msg2 "is_custom_pac_conf: ${is_custom_pac_conf}" + msg2 "initsys: ${initsys}" msg2 "displaymanager: ${displaymanager}" msg2 "kernel: ${kernel}" From 8974fe20c9b458b259e93701d8867b746b2f5251 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 23:09:36 +0200 Subject: [PATCH 077/127] [util-iso] cosmetics, put clean_pacman_conf in right place --- lib/util-iso.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 51448c9..0292d9e 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -217,6 +217,7 @@ make_image_root() { pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" configure_lsb "${path}" copy_overlay_root "${path}" + ${is_custom_pac_conf} && clean_pacman_conf "${path}" : > ${work_dir}/build.${FUNCNAME} msg "Done [Base installation] (root-image)" fi @@ -234,6 +235,7 @@ make_image_custom() { cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt [[ -d ${custom}-overlay ]] && copy_overlay_custom configure_custom_image "${path}" + ${is_custom_pac_conf} && clean_pacman_conf "${path}" umount_image_handler find ${path} -name '.wh.*' -delete &>/dev/null : > ${work_dir}/build.${FUNCNAME} @@ -260,6 +262,7 @@ make_image_livecd() { copy_livecd_helpers "${path}/opt/livecd" copy_startup_scripts "${path}/usr/bin" configure_livecd_image "${path}" + ${is_custom_pac_conf} && clean_pacman_conf "${path}" # Clean up GnuPG keys? rm -rf "${path}/etc/pacman.d/gnupg" umount_image_handler @@ -579,14 +582,13 @@ get_repos() { clean_pacman_conf(){ local repositories=$(get_repos) uri='file://' - msg "Cleaning custom pacman.conf ..." + msg "Cleaning [$1/pacman.conf] ..." for repo in ${repositories[@]}; do case ${repo} in 'options'|'core'|'extra'|'community'|'multilib') continue ;; *) msg2 "parsing [${repo}] ..." parse_section ${repo} - msg2 "is_custom_pac_conf: ${is_custom_pac_conf}" if [[ ${pc_value} == $uri* ]]; then msg2 "Removing local repo ${repo} ..." sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf @@ -594,22 +596,20 @@ clean_pacman_conf(){ ;; esac done + msg "Done cleaning [$1/pacman.conf]" } build_images(){ local timer=$(get_timer) load_pkgs "Packages" make_image_root - ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/root-image" if [[ -f "${packages_custom}" ]] ; then load_pkgs "${packages_custom}" make_image_custom - ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/${custom}-image" fi if [[ -f Packages-Livecd ]]; then load_pkgs "Packages-Livecd" make_image_livecd - ${is_custom_pac_conf} && clean_pacman_conf "${work_dir}/livecd-image" fi if [[ -f Packages-Xorg ]] ; then load_pkgs_xorg From 05548b6348fc244119e2fa789c03e578ac338648 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 23:23:04 +0200 Subject: [PATCH 078/127] [util-iso] more cosmetics, forgot one brackets, fix msg path --- lib/util-iso.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 0292d9e..ae69e24 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -582,7 +582,7 @@ get_repos() { clean_pacman_conf(){ local repositories=$(get_repos) uri='file://' - msg "Cleaning [$1/pacman.conf] ..." + msg "Cleaning [$1/etc/pacman.conf] ..." for repo in ${repositories[@]}; do case ${repo} in 'options'|'core'|'extra'|'community'|'multilib') continue ;; @@ -590,13 +590,13 @@ clean_pacman_conf(){ msg2 "parsing [${repo}] ..." parse_section ${repo} if [[ ${pc_value} == $uri* ]]; then - msg2 "Removing local repo ${repo} ..." + msg2 "Removing local repo [${repo}] ..." sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf fi ;; esac done - msg "Done cleaning [$1/pacman.conf]" + msg "Done cleaning [$1/etc/pacman.conf]" } build_images(){ From 59014e232e8a9b841d0760cf689d0b8193615f8a Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 10 May 2015 23:34:38 +0200 Subject: [PATCH 079/127] [Makefile] bump to 0.9.8 -> next release --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 58ac8be..d6c9c70 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -V=0.9.7.5 +V=0.9.8 PREFIX = $(PREFIX)/local From b27c32caa48247cd99db4215d32dca8785c61456 Mon Sep 17 00:00:00 2001 From: Philip Date: Sun, 10 May 2015 23:36:17 +0200 Subject: [PATCH 080/127] [initcpio] remove miso_pxe_nbd - this script is outdated and broken --- initcpio/hooks/miso_pxe_nbd | 90 ------------------------------------- initcpio/inst/miso_pxe_nbd | 18 -------- 2 files changed, 108 deletions(-) delete mode 100644 initcpio/hooks/miso_pxe_nbd delete mode 100644 initcpio/inst/miso_pxe_nbd diff --git a/initcpio/hooks/miso_pxe_nbd b/initcpio/hooks/miso_pxe_nbd deleted file mode 100644 index c61330c..0000000 --- a/initcpio/hooks/miso_pxe_nbd +++ /dev/null @@ -1,90 +0,0 @@ -# vim: set ft=sh: -run_hook () { - local line i address netmask gateway dns0 dns1 rootserver rootpath filename - - : > /ip_opts - - if [ -n "${ip}" ]; then - if [ -n "${BOOTIF}" ]; then - bootif_mac=${BOOTIF#01-} - bootif_mac=${bootif_mac//-/:} - bootif_dev=$(grep -l $bootif_mac /sys/class/net/*/address) - bootif_dev=${bootif_dev#/sys/class/net/} - bootif_dev=${bootif_dev%/address} - ip="$ip::$bootif_dev" - fi - - # setup network and save some values - ipconfig "ip=${ip}" | while read line; do - # echo ":: ${line}" - if [ "${line#"IP-Config:"}" != "${line}" ]; then - continue - fi - line="$(echo ${line} | sed -e 's/ :/:/g;s/: /=/g')" - for i in ${line}; do - case "${i}" in - address=*) - echo "${i}" >> /ip_opts - ;; - netmask=*) - echo "${i}" >> /ip_opts - ;; - gateway=*) - echo "${i}" >> /ip_opts - ;; - dns0=*) - echo "${i}" >> /ip_opts - ;; - dns1=*) - echo "${i}" >> /ip_opts - ;; - rootserver=*) - echo "${i}" >> /ip_opts - ;; - rootpath=*) - echo "${i}" >> /ip_opts - ;; - esac - done - done - - . /ip_opts - - echo "IP-Config: ${address}/${netmask}" - echo "IP-Config: gw: ${gateway} dns0: ${dns0} dns1: ${dns1}" - - nbdserver=${rootserver} - - mount_handler="miso_pxe_nbd_mount_handler" - fi -} - -miso_pxe_nbd_mount_handler () { - newroot="${1}" - - # Module autoloading like with loop devices does not work, doing manually... - modprobe nbd 2> /dev/null - msg ":: Waiting for boot device..." - while ! poll_device /dev/nbd0 30; do - echo "ERROR: boot device didn't show up after 30 seconds..." - echo " Falling back to interactive prompt" - echo " You can try to fix the problem manually, log out when you are finished" - launch_interactive_shell - done - - msg "::: Setup NBD from ${nbdserver} at /dev/nbd0" - if [ "${copytoram}" = "y" ]; then - nbd-client ${nbdserver} -N miso /dev/nbd0 - else - nbd-client ${nbdserver} -N miso /dev/nbd0 -persist - fi - - root=/dev/nbd0 - - miso_mount_handler ${newroot} - - if [ "${copytoram}" = "y" ]; then - msg "::: Disconnect NBD from ${nbdserver} at /dev/nbd0" - nbd-client -d /dev/nbd0 - fi -} diff --git a/initcpio/inst/miso_pxe_nbd b/initcpio/inst/miso_pxe_nbd deleted file mode 100644 index f44bc54..0000000 --- a/initcpio/inst/miso_pxe_nbd +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -build() { - add_module "nbd" - - add_runscript - - add_binary nbd-client -} - -help() { -cat< Date: Sun, 10 May 2015 23:53:21 +0200 Subject: [PATCH 081/127] [Makefile] remove ntd --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d6c9c70..cbd0abe 100644 --- a/Makefile +++ b/Makefile @@ -62,15 +62,13 @@ CPIOHOOKS = \ initcpio/hooks/miso \ initcpio/hooks/miso_loop_mnt \ initcpio/hooks/miso_pxe_common \ - initcpio/hooks/miso_pxe_http \ - initcpio/hooks/miso_pxe_nbd + initcpio/hooks/miso_pxe_http CPIOINST = \ initcpio/inst/miso \ initcpio/inst/miso_loop_mnt \ initcpio/inst/miso_pxe_common \ initcpio/inst/miso_pxe_http \ - initcpio/inst/miso_pxe_nbd \ initcpio/inst/miso_kms SCRIPTS = \ From 4cfe0041d1ac1b6fce3128eef3a4a3bba4ac6640 Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 11 May 2015 00:12:30 +0200 Subject: [PATCH 082/127] [initcpio] proper pxe inst hooks --- initcpio/inst/miso_pxe_common | 12 ++++++++++++ initcpio/inst/miso_pxe_http | 1 + 2 files changed, 13 insertions(+) diff --git a/initcpio/inst/miso_pxe_common b/initcpio/inst/miso_pxe_common index 1f458c1..8e38170 100644 --- a/initcpio/inst/miso_pxe_common +++ b/initcpio/inst/miso_pxe_common @@ -1,8 +1,20 @@ #!/bin/bash build() { + add_checked_modules -f "(irda|phy|wimax|wireless|ppp_|plip|pppoe)" "/drivers/net/" add_runscript + + add_binary /usr/lib/initcpio/ipconfig /bin/ipconfig + + # Add hosts support files+dns + add_symlink /usr/lib/libnss_files.so.2 $(readlink /usr/lib/libnss_files.so.2) + add_binary $(readlink -f /usr/lib/libnss_files.so.2) + add_symlink /usr/lib/libnss_dns.so.2 $(readlink /usr/lib/libnss_dns.so.2) + add_binary $(readlink -f /usr/lib/libnss_dns.so.2) + + add_dir /etc + echo "hosts: files dns" > $BUILDROOT/etc/nsswitch.conf } help() { diff --git a/initcpio/inst/miso_pxe_http b/initcpio/inst/miso_pxe_http index 287f185..dbd635b 100644 --- a/initcpio/inst/miso_pxe_http +++ b/initcpio/inst/miso_pxe_http @@ -1,6 +1,7 @@ #!/bin/bash build() { + add_binary "/usr/bin/curl" "/bin/curl" add_runscript } From d4913d113477795127bf71c9ae397085368f0f89 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 12:47:02 +0200 Subject: [PATCH 083/127] [buildiso] integrate mkiso; WIP --- bin/buildiso.in | 8 +- conf/manjaro-tools.conf | 6 ++ lib/util-iso-image.sh | 21 +++++ lib/util-iso-log.sh | 46 ++++++++++ lib/util-iso.sh | 199 +++++++++++++++++++++++++--------------- lib/util.sh | 81 ++++++++++++++-- 6 files changed, 278 insertions(+), 83 deletions(-) create mode 100644 lib/util-iso-log.sh diff --git a/bin/buildiso.in b/bin/buildiso.in index fe99cc6..0559d1a 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -27,7 +27,7 @@ show_profile(){ msg2 "iso_file: ${iso_file}" #msg2 "pacman_conf: ${pacman_conf}" msg2 "is_custom_pac_conf: ${is_custom_pac_conf}" - + msg2 "initsys: ${initsys}" msg2 "displaymanager: ${displaymanager}" msg2 "kernel: ${kernel}" @@ -190,11 +190,11 @@ cache_dir_iso="${cache_dir}/iso" mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf" -create_args+=(-v -a ${arch} -D ${iso_name} -M ${mirrors_conf}) +# create_args+=(-v -a ${arch} -D ${iso_name} -M ${mirrors_conf}) -iso_args+=(-v -x -a ${arch} -D ${iso_name} -L ${iso_label} -c ${iso_compression}) +# iso_args+=(-v -x -a ${arch} -D ${iso_name} -L ${iso_label} -c ${iso_compression}) -${clean_cache_iso} && iso_args+=(-f) +# ${clean_cache_iso} && iso_args+=(-f) check_root "$0" "${orig_argv[@]}" diff --git a/conf/manjaro-tools.conf b/conf/manjaro-tools.conf index c20214e..d1d5197 100644 --- a/conf/manjaro-tools.conf +++ b/conf/manjaro-tools.conf @@ -71,6 +71,12 @@ # unset defaults to given value # iso_name=manjaro +# publisher +# iso_publisher="Manjaro Linux " + +# iso_app_id +# iso_app_id="Manjaro Linux Live/Rescue CD" + # unset defaults to given value # iso_compression=xz diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index af1fb39..c5a099e 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -338,3 +338,24 @@ configure_xorg_drivers(){ touch $1/var/lib/mhwd/db/pci/graphic_drivers/nvidia-340xx/MHWDCONFIG fi } + +# $1: image path +clean_up_image(){ + msg2 "Cleaning up [$1]" + if [ -d "$1/boot/" ]; then + # remove the initcpio images that were generated for the host system + find "$1/boot" -name 'initramfs*.img' -delete &>/dev/null + fi + + [[ -f "$1/etc/locale.gen.bak" ]] \ + && mv "$1/etc/locale.gen.bak" "$1/etc/locale.gen" + [[ -f "$1/etc/locale.conf.bak" ]] \ + && mv "$1/etc/locale.conf.bak" "$1/etc/locale.conf" + + find "$1/var/lib/pacman" -maxdepth 1 -type f -delete &>/dev/null + find "$1/var/lib/pacman/sync" -delete &>/dev/null + find "$1/var/cache/pacman/pkg" -type f -delete &>/dev/null + find "$1/var/log" -type f -delete &>/dev/null + find "$1/var/tmp" -mindepth 1 -delete &>/dev/null + find "$1/tmp" -mindepth 1 -delete &>/dev/null +} diff --git a/lib/util-iso-log.sh b/lib/util-iso-log.sh new file mode 100644 index 0000000..9d95264 --- /dev/null +++ b/lib/util-iso-log.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +error_function() { + if [[ -p $logpipe ]]; then + rm "$logpipe" + fi + # first exit all subshells, then print the error + if (( ! BASH_SUBSHELL )); then + error "A failure occurred in %s()." "$1" + plain "Aborting..." + fi + exit 2 +} + +run_safe() { + local restoretrap + set -e + set -E + restoretrap=$(trap -p ERR) + trap 'error_function $1' ERR + run_log "$1" + eval $restoretrap + set +E + set +e +} + +# $1: function +run_log(){ + local logfile=${work_dir}/${imgname}.log + logpipe=$(mktemp -u "/tmp/logpipe.XXXXXXXX") + mkfifo "$logpipe" + tee "$logfile" < "$logpipe" & + local teepid=$! + $1 &> "$logpipe" + wait $teepid + rm "$logpipe" +} diff --git a/lib/util-iso.sh b/lib/util-iso.sh index ae69e24..64312ae 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -148,11 +148,128 @@ download_to_cache(){ --cache $2 -Syw $3 --noconfirm } +# $1: image path +# $2: packages +make_chroot(){ + #set locale.gen + local flag + if [ "$1" == "${work_dir}/root-image" ]; then + flag="-L" + fi + + setarch "${ARCH}" \ + mkchroot -C ${pacman_conf} \ + -S ${mirrors_conf} \ + ${flag} \ + "$1" $2 || die "Failed to retrieve one or more packages!" + fi + + # Cleanup + find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete +} + + +# $1: image path +squash_image_dir() { + if [ ! -d "$1" ]; then + error "$1 is not a directory" + return 1 + fi + + local sq_img="${work_dir}/iso/${INSTALL_DIR}/${ARCH}/$(basename ${1}).sqfs" + msg "Generating SquashFS image for '${1}'" + if [ -e "${sq_img}" ]; then + dirhaschanged=$(find ${1} -newer ${sqimg}) + msg2 "Possible changes for ${1}..." >> /tmp/buildiso.debug + msg2 "${dirhaschanged}" >> /tmp/buildiso.debug + if [ ! -z "${dirhaschanged}" ]; then + msg2 "SquashFS image '${sq_img}' is not up to date, rebuilding..." + rm "${sqimg}" + else + msg2 "SquashFS image '${sq_img}' is up to date, skipping." + return + fi + fi + + msg2 "Creating SquashFS image. This may take some time..." + start=$(date +%s) + + mksquashfs "${1}" "${sqimg}" -noappend -comp "${COMPRESSION}" ${HIGHCOMP} + + minutes=$(echo $start $(date +%s) | awk '{ printf "%0.2f",($2-$1)/60 }') + msg "Image creation done in $minutes minutes." +} + # Build ISO make_iso() { msg "Start [Build ISO]" - touch "${work_dir}/iso/.miso" - mkiso ${iso_args[*]} iso "${work_dir}" "${cache_dir_iso}/${iso_file}" || mkiso_error_handler + touch "${work_dir}/iso/.buildiso" +# mkiso ${iso_args[*]} iso "${work_dir}" "${cache_dir_iso}/${iso_file}" || mkiso_error_handler + + for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do + if [ "$d" != "${work_dir}/iso" -a \ + "$(basename "$d")" != "iso" -a \ + "$(basename "$d")" != "efiboot" -a \ + "$d" != "${work_dir}" ]; then + squash_image_dir "$d" + fi + done + + msg "Making bootable image" + + # Sanity checks + [[ ! -d "${work_dir}/iso" ]] && die "${work_dir}/iso doesn't exist. What did you do?!" + + if [[ -f "${cache_dir_iso}/${iso_file}" ]]; then + msg2 "Removing existing bootable image..." + rm -rf "${cache_dir_iso}/${iso_file}" + fi + +# if [[ ! -f ${work_dir}/iso/isolinux/isolinux.cfg ]]; then +# die "${work_dir}/iso/isolinux/isolinux.cfg, doesn't exist." +# fi +# +# if [ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]; then +# die "${work_dir}/iso/isolinux/isolinux.bin, doesn't exist." +# fi +# if [ ! -f "${work_dir}/iso/isolinux/isohdpfx.bin" ]; then +# die "${work_dir}/iso/isolinux/isohdpfx.bin, doesn't exist." +# fi + + local efi_boot_args="" + + # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image. + if [[ -f "${work_dir}/iso/EFI/miso/${iso_name}.img" ]]; then + msg2 "Setting efi args. El Torito detected." + efi_boot_args=("-eltorito-alt-boot" \ + "-e EFI/miso/${iso_name}.img" \ + "-isohybrid-gpt-basdat" \ + "-no-emul-boot") + fi + + msg "Creating ISO image..." + ## Generate the BIOS+ISOHYBRID CD image using xorriso (extra/libisoburn package) in mkisofs emulation mode + #_qflag="" +# if ${QUIET}; then +# _qflag="-quiet" +# fi + xorriso -as mkisofs \ + -iso-level 3 -rock -joliet \ + -max-iso9660-filenames -omit-period \ + -omit-version-number \ + -relaxed-filenames -allow-lowercase \ + -volid "${iso_label}" \ + -appid "${iso_app_id}" \ + -publisher "${iso_publisher}" \ + -preparer "Prepared by manjaro-tools/${0##*/}" \ + -eltorito-boot isolinux/isolinux.bin \ + -eltorito-catalog isolinux/boot.cat \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + -isohybrid-mbr "${work_dir}/iso/isolinux/isohdpfx.bin" \ + ${efi_boot_args[@]} \ + -output "${cache_dir_iso}/${iso_file}" \ + "${work_dir}/iso/" + chown -R "${OWNER}:users" "${cache_dir_iso}" msg "Done [Build ISO]" } @@ -203,17 +320,17 @@ umount_image_handler(){ aufs_remove_image "${work_dir}/boot-image" } -mkiso_error_handler(){ - umount_image_handler - die "Exiting..." -} +# mkiso_error_handler(){ +# umount_image_handler +# die "Exiting..." +# } # Base installation (root-image) make_image_root() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then msg "Prepare [Base installation] (root-image)" local path="${work_dir}/root-image" - mkiso ${create_args[*]} -p "${packages}" -i "root-image" create "${work_dir}" || mkiso_error_handler +# mkiso ${create_args[*]} -p "${packages}" -i "root-image" create "${work_dir}" || mkiso_error_handler pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" configure_lsb "${path}" copy_overlay_root "${path}" @@ -230,7 +347,7 @@ make_image_custom() { mkdir -p ${path} umount_image_handler aufs_mount_root_image "${path}" - mkiso ${create_args[*]} -i "${custom}-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler +# mkiso ${create_args[*]} -i "${custom}-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler pacman -Qr "${path}" > "${path}/${custom}-image-pkgs.txt" cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt [[ -d ${custom}-overlay ]] && copy_overlay_custom @@ -255,7 +372,7 @@ make_image_livecd() { else aufs_mount_root_image "${path}" fi - mkiso ${create_args[*]} -i "livecd-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler +# mkiso ${create_args[*]} -i "livecd-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler pacman -Qr "${path}" > "${path}/livecd-image-pkgs.txt" copy_overlay_livecd "${path}" # copy over setup helpers and config loader @@ -535,70 +652,6 @@ compress_images(){ msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } -# $1: section -parse_section() { - local is_section=0 - while read line; do - [[ $line =~ ^\ {0,}# ]] && continue - [[ -z "$line" ]] && continue - if [ $is_section == 0 ]; then - if [[ $line =~ ^\[.*?\] ]]; then - line=${line:1:$((${#line}-2))} - section=${line// /} - if [[ $section == $1 ]]; then - is_section=1 - continue - fi - continue - fi - elif [[ $line =~ ^\[.*?\] && $is_section == 1 ]]; then - break - else - pc_key=${line%%=*} - pc_key=${pc_key// /} - pc_value=${line##*=} - pc_value=${pc_value## } - eval "$pc_key='$pc_value'" - fi - done < "${pacman_conf}" -} - -get_repos() { - local section repos=() filter='^\ {0,}#' - while read line; do - [[ $line =~ "${filter}" ]] && continue - [[ -z "$line" ]] && continue - if [[ $line =~ ^\[.*?\] ]]; then - line=${line:1:$((${#line}-2))} - section=${line// /} - case ${section} in - "options") continue ;; - *) repos+=("${section}") ;; - esac - fi - done < "${pacman_conf}" - echo ${repos[@]} -} - -clean_pacman_conf(){ - local repositories=$(get_repos) uri='file://' - msg "Cleaning [$1/etc/pacman.conf] ..." - for repo in ${repositories[@]}; do - case ${repo} in - 'options'|'core'|'extra'|'community'|'multilib') continue ;; - *) - msg2 "parsing [${repo}] ..." - parse_section ${repo} - if [[ ${pc_value} == $uri* ]]; then - msg2 "Removing local repo [${repo}] ..." - sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf - fi - ;; - esac - done - msg "Done cleaning [$1/etc/pacman.conf]" -} - build_images(){ local timer=$(get_timer) load_pkgs "Packages" diff --git a/lib/util.sh b/lib/util.sh index 2ba49cb..5c90f7f 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -162,6 +162,71 @@ check_root() { fi } + +# $1: section +parse_section() { + local is_section=0 + while read line; do + [[ $line =~ ^\ {0,}# ]] && continue + [[ -z "$line" ]] && continue + if [ $is_section == 0 ]; then + if [[ $line =~ ^\[.*?\] ]]; then + line=${line:1:$((${#line}-2))} + section=${line// /} + if [[ $section == $1 ]]; then + is_section=1 + continue + fi + continue + fi + elif [[ $line =~ ^\[.*?\] && $is_section == 1 ]]; then + break + else + pc_key=${line%%=*} + pc_key=${pc_key// /} + pc_value=${line##*=} + pc_value=${pc_value## } + eval "$pc_key='$pc_value'" + fi + done < "${pacman_conf}" +} + +get_repos() { + local section repos=() filter='^\ {0,}#' + while read line; do + [[ $line =~ "${filter}" ]] && continue + [[ -z "$line" ]] && continue + if [[ $line =~ ^\[.*?\] ]]; then + line=${line:1:$((${#line}-2))} + section=${line// /} + case ${section} in + "options") continue ;; + *) repos+=("${section}") ;; + esac + fi + done < "${pacman_conf}" + echo ${repos[@]} +} + +clean_pacman_conf(){ + local repositories=$(get_repos) uri='file://' + msg "Cleaning [$1/etc/pacman.conf] ..." + for repo in ${repositories[@]}; do + case ${repo} in + 'options'|'core'|'extra'|'community'|'multilib') continue ;; + *) + msg2 "parsing [${repo}] ..." + parse_section ${repo} + if [[ ${pc_value} == $uri* ]]; then + msg2 "Removing local repo [${repo}] ..." + sed -i "/^\[${repo}/,/^Server/d" $1/etc/pacman.conf + fi + ;; + esac + done + msg "Done cleaning [$1/etc/pacman.conf]" +} + load_vars() { local var @@ -203,7 +268,7 @@ load_config(){ ################### if [[ -z ${repo_tree} ]];then - repo_tree=(core extra community multilib openrc) + repo_tree=('core' 'extra' 'community' 'multilib' 'openrc') fi if [[ -z ${host_tree} ]];then @@ -300,8 +365,16 @@ load_config(){ iso_label="${iso_label^^}" # all uppercase iso_label="${iso_label::8}" # limit to 8 characters + if [[ -z ${iso_publisher} ]];then + iso_publisher='Manjaro Linux ' + fi + + if [[ -z ${iso_app_id} ]];then + iso_app_id='Manjaro Linux Live/Rescue CD' + fi + if [[ -z ${iso_compression} ]];then - iso_compression=xz + iso_compression='xz' fi if [[ -z ${iso_checksum} ]];then @@ -375,10 +448,6 @@ load_profile_config(){ displaymanager="none" fi - if [[ -z ${keep_repos} ]];then - keep_repos=() - fi - return 0 } From 84c20f14d7a2e3c89651dea458cf10b368b5e4ae Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 18:31:41 +0200 Subject: [PATCH 084/127] [util*] do some cleaning --- lib/util-iso-image.sh | 3 ++ lib/util-iso.sh | 65 ++++++++++++------------------------------- 2 files changed, 21 insertions(+), 47 deletions(-) diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index c5a099e..ab0e754 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -358,4 +358,7 @@ clean_up_image(){ find "$1/var/log" -type f -delete &>/dev/null find "$1/var/tmp" -mindepth 1 -delete &>/dev/null find "$1/tmp" -mindepth 1 -delete &>/dev/null + +# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete + } diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 64312ae..be38c2f 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -151,53 +151,43 @@ download_to_cache(){ # $1: image path # $2: packages make_chroot(){ - #set locale.gen - local flag - if [ "$1" == "${work_dir}/root-image" ]; then - flag="-L" - fi - + [[ "$1" == "${work_dir}/root-image" ]] && local flag="-L" setarch "${ARCH}" \ mkchroot -C ${pacman_conf} \ -S ${mirrors_conf} \ ${flag} \ - "$1" $2 || die "Failed to retrieve one or more packages!" + "$1" "$2" || die "Failed to retrieve one or more packages!" fi - - # Cleanup - find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete } # $1: image path squash_image_dir() { - if [ ! -d "$1" ]; then + if [[ ! -d "$1" ]]; then error "$1 is not a directory" return 1 fi - local sq_img="${work_dir}/iso/${INSTALL_DIR}/${ARCH}/$(basename ${1}).sqfs" + local timer=$(get_timer) + local sq_img="${work_dir}/iso/${iso_name}/${arch}/$(basename ${1}).sqfs" msg "Generating SquashFS image for '${1}'" - if [ -e "${sq_img}" ]; then - dirhaschanged=$(find ${1} -newer ${sqimg}) + if [[ -f "${sq_img}" ]]; then + local has_changed_dir=$(find ${1} -newer ${sq_img}) msg2 "Possible changes for ${1}..." >> /tmp/buildiso.debug - msg2 "${dirhaschanged}" >> /tmp/buildiso.debug - if [ ! -z "${dirhaschanged}" ]; then + msg2 "${has_changed_dir}" >> /tmp/buildiso.debug + if [[ -n "${has_changed_dir}" ]]; then msg2 "SquashFS image '${sq_img}' is not up to date, rebuilding..." - rm "${sqimg}" + rm "${sq_img}" else msg2 "SquashFS image '${sq_img}' is up to date, skipping." return fi fi - + local highcomp=" -b 256K -Xbcj x86" + [[ "${iso_compression}" != "xz" ]] && highcomp="" msg2 "Creating SquashFS image. This may take some time..." - start=$(date +%s) - - mksquashfs "${1}" "${sqimg}" -noappend -comp "${COMPRESSION}" ${HIGHCOMP} - - minutes=$(echo $start $(date +%s) | awk '{ printf "%0.2f",($2-$1)/60 }') - msg "Image creation done in $minutes minutes." + mksquashfs "${1}" "${sq_img}" -noappend -comp "${iso_compression}" "${highcomp}" + msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } # Build ISO @@ -214,28 +204,15 @@ make_iso() { squash_image_dir "$d" fi done - msg "Making bootable image" - # Sanity checks - [[ ! -d "${work_dir}/iso" ]] && die "${work_dir}/iso doesn't exist. What did you do?!" + [[ ! -d "${work_dir}/iso" ]] && die "[${work_dir}/iso] doesn't exist. What did you do?!" if [[ -f "${cache_dir_iso}/${iso_file}" ]]; then msg2 "Removing existing bootable image..." rm -rf "${cache_dir_iso}/${iso_file}" fi -# if [[ ! -f ${work_dir}/iso/isolinux/isolinux.cfg ]]; then -# die "${work_dir}/iso/isolinux/isolinux.cfg, doesn't exist." -# fi -# -# if [ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]; then -# die "${work_dir}/iso/isolinux/isolinux.bin, doesn't exist." -# fi -# if [ ! -f "${work_dir}/iso/isolinux/isohdpfx.bin" ]; then -# die "${work_dir}/iso/isolinux/isohdpfx.bin, doesn't exist." -# fi - local efi_boot_args="" # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image. @@ -246,13 +223,7 @@ make_iso() { "-isohybrid-gpt-basdat" \ "-no-emul-boot") fi - msg "Creating ISO image..." - ## Generate the BIOS+ISOHYBRID CD image using xorriso (extra/libisoburn package) in mkisofs emulation mode - #_qflag="" -# if ${QUIET}; then -# _qflag="-quiet" -# fi xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ -max-iso9660-filenames -omit-period \ @@ -330,7 +301,7 @@ make_image_root() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then msg "Prepare [Base installation] (root-image)" local path="${work_dir}/root-image" -# mkiso ${create_args[*]} -p "${packages}" -i "root-image" create "${work_dir}" || mkiso_error_handler + make_chroot "${path}" "${packages}" pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" configure_lsb "${path}" copy_overlay_root "${path}" @@ -347,7 +318,7 @@ make_image_custom() { mkdir -p ${path} umount_image_handler aufs_mount_root_image "${path}" -# mkiso ${create_args[*]} -i "${custom}-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler + make_chroot "${path}" "${packages}" pacman -Qr "${path}" > "${path}/${custom}-image-pkgs.txt" cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt [[ -d ${custom}-overlay ]] && copy_overlay_custom @@ -372,7 +343,7 @@ make_image_livecd() { else aufs_mount_root_image "${path}" fi -# mkiso ${create_args[*]} -i "livecd-image" -p "${packages}" create "${work_dir}" || mkiso_error_handler + make_chroot "${path}" "${packages}" pacman -Qr "${path}" > "${path}/livecd-image-pkgs.txt" copy_overlay_livecd "${path}" # copy over setup helpers and config loader From 0cc726d24aa7df9f7ef08e94b135e4cb6e384eab Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 18:52:44 +0200 Subject: [PATCH 085/127] [Makefile] don't install mkiso --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index cbd0abe..32e4ad7 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ BINPROGS = \ bin/fstabgen \ bin/mkset \ bin/chroot-run \ - bin/mkiso \ bin/buildiso \ bin/testiso \ bin/buildtree From 838780e89456d5e2cd730279cc67b5216a29e2fc Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 18:55:04 +0200 Subject: [PATCH 086/127] [uti-iso] rm escaped 'fi' --- lib/util-iso.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index be38c2f..fb99d43 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -157,7 +157,6 @@ make_chroot(){ -S ${mirrors_conf} \ ${flag} \ "$1" "$2" || die "Failed to retrieve one or more packages!" - fi } From 3d2eb306cdce1abc356b0c431f887329f44d00e5 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 19:42:05 +0200 Subject: [PATCH 087/127] [util-iso] fix make_chroot args --- lib/util-iso.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index fb99d43..0d64247 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -152,11 +152,11 @@ download_to_cache(){ # $2: packages make_chroot(){ [[ "$1" == "${work_dir}/root-image" ]] && local flag="-L" - setarch "${ARCH}" \ + setarch "${arch}" \ mkchroot -C ${pacman_conf} \ -S ${mirrors_conf} \ ${flag} \ - "$1" "$2" || die "Failed to retrieve one or more packages!" + $@ || die "Failed to retrieve one or more packages!" } From 6113d3e4c694a1a9d514bb68818daddf79a10bab Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 20:59:05 +0200 Subject: [PATCH 088/127] [util-iso] fixes --- lib/util-iso.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 0d64247..66e2ccd 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -166,9 +166,9 @@ squash_image_dir() { error "$1 is not a directory" return 1 fi - local timer=$(get_timer) local sq_img="${work_dir}/iso/${iso_name}/${arch}/$(basename ${1}).sqfs" + mkdir -p ${work_dir}/iso/${iso_name}/${arch} msg "Generating SquashFS image for '${1}'" if [[ -f "${sq_img}" ]]; then local has_changed_dir=$(find ${1} -newer ${sq_img}) @@ -182,7 +182,7 @@ squash_image_dir() { return fi fi - local highcomp=" -b 256K -Xbcj x86" + local highcomp="-b 256K -Xbcj x86" [[ "${iso_compression}" != "xz" ]] && highcomp="" msg2 "Creating SquashFS image. This may take some time..." mksquashfs "${1}" "${sq_img}" -noappend -comp "${iso_compression}" "${highcomp}" @@ -213,8 +213,6 @@ make_iso() { fi local efi_boot_args="" - - # If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image. if [[ -f "${work_dir}/iso/EFI/miso/${iso_name}.img" ]]; then msg2 "Setting efi args. El Torito detected." efi_boot_args=("-eltorito-alt-boot" \ @@ -223,6 +221,12 @@ make_iso() { "-no-emul-boot") fi msg "Creating ISO image..." + # test msg2 + msg2 "iso_label: ${iso_label}" + msg2 "iso_label: ${iso_name}" + msg2 "iso_label: ${iso_publisher}" + msg2 "iso_label: ${iso_app_id}" + msg2 "iso_label: ${iso_file}" xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ -max-iso9660-filenames -omit-period \ From c2403a8a9cbb82c8ad618fa3da5690ae00c59dd7 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 21:02:14 +0200 Subject: [PATCH 089/127] [util-iso] fix msg --- lib/util-iso.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 66e2ccd..2ae9e63 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -185,7 +185,7 @@ squash_image_dir() { local highcomp="-b 256K -Xbcj x86" [[ "${iso_compression}" != "xz" ]] && highcomp="" msg2 "Creating SquashFS image. This may take some time..." - mksquashfs "${1}" "${sq_img}" -noappend -comp "${iso_compression}" "${highcomp}" + mksquashfs "${1}" "${sq_img}" -noappend -comp ${iso_compression} ${highcomp} msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } @@ -196,10 +196,10 @@ make_iso() { # mkiso ${iso_args[*]} iso "${work_dir}" "${cache_dir_iso}/${iso_file}" || mkiso_error_handler for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do - if [ "$d" != "${work_dir}/iso" -a \ + if [[ "$d" != "${work_dir}/iso" -a \ "$(basename "$d")" != "iso" -a \ "$(basename "$d")" != "efiboot" -a \ - "$d" != "${work_dir}" ]; then + "$d" != "${work_dir}" ]]; then squash_image_dir "$d" fi done @@ -223,10 +223,10 @@ make_iso() { msg "Creating ISO image..." # test msg2 msg2 "iso_label: ${iso_label}" - msg2 "iso_label: ${iso_name}" - msg2 "iso_label: ${iso_publisher}" - msg2 "iso_label: ${iso_app_id}" - msg2 "iso_label: ${iso_file}" + msg2 "iso_name: ${iso_name}" + msg2 "iso_publisher: ${iso_publisher}" + msg2 "iso_app_id: ${iso_app_id}" + msg2 "iso_file: ${iso_file}" xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ -max-iso9660-filenames -omit-period \ From c0973a0987f72174c591e4190e0d13c0352583f3 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 21:29:46 +0200 Subject: [PATCH 090/127] [util-iso] fix chroot creation --- lib/util-iso.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 2ae9e63..8a10530 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -166,9 +166,9 @@ squash_image_dir() { error "$1 is not a directory" return 1 fi - local timer=$(get_timer) - local sq_img="${work_dir}/iso/${iso_name}/${arch}/$(basename ${1}).sqfs" - mkdir -p ${work_dir}/iso/${iso_name}/${arch} + local timer=$(get_timer) path=${work_dir}/iso/${iso_name}/${arch} + local sq_img="${path}/$(basename ${1}).sqfs" + mkdir -p ${path} msg "Generating SquashFS image for '${1}'" if [[ -f "${sq_img}" ]]; then local has_changed_dir=$(find ${1} -newer ${sq_img}) @@ -189,18 +189,20 @@ squash_image_dir() { msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } +make_squash(){ + +} + # Build ISO make_iso() { msg "Start [Build ISO]" touch "${work_dir}/iso/.buildiso" -# mkiso ${iso_args[*]} iso "${work_dir}" "${cache_dir_iso}/${iso_file}" || mkiso_error_handler - for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do - if [[ "$d" != "${work_dir}/iso" -a \ - "$(basename "$d")" != "iso" -a \ - "$(basename "$d")" != "efiboot" -a \ - "$d" != "${work_dir}" ]]; then - squash_image_dir "$d" + if [[ "$d" != "${work_dir}/iso" ]] && \ + [[ "$(basename "$d")" != "iso" ]] && \ + [[ "$(basename "$d")" != "efiboot" ]] && \ + [[ "$d" != "${work_dir}" ]]; then + squash_image_dir "$d" || die "Exit ..." fi done msg "Making bootable image" @@ -304,6 +306,7 @@ make_image_root() { if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then msg "Prepare [Base installation] (root-image)" local path="${work_dir}/root-image" + mkdir -p ${path} make_chroot "${path}" "${packages}" pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" configure_lsb "${path}" @@ -568,7 +571,7 @@ load_pkgs_lng(){ } check_chroot_version(){ - local chroot_version=$(cat ${work_dir}/root-image/.manjaro-tools) + [[ -f ${work_dir}/root-image/.manjaro-tools ]] && local chroot_version=$(cat ${work_dir}/root-image/.manjaro-tools) if [[ ${version} != $chroot_version ]];then clean_first=true fi From bd1f7bf8fae6e40e7bbb0e03db6b6d8b790fbc75 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 23:32:40 +0200 Subject: [PATCH 091/127] [buildiso] drop unused code; some cosmetics --- bin/buildiso.in | 18 ++------- lib/util-iso-image.sh | 24 ----------- lib/util-iso.sh | 92 ++++++++++++++++++++++++------------------- lib/util.sh | 8 ---- 4 files changed, 55 insertions(+), 87 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 0559d1a..be2126b 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -25,7 +25,6 @@ show_profile(){ load_profile "$1" msg2 "work_dir: ${work_dir}" msg2 "iso_file: ${iso_file}" - #msg2 "pacman_conf: ${pacman_conf}" msg2 "is_custom_pac_conf: ${is_custom_pac_conf}" msg2 "initsys: ${initsys}" @@ -88,7 +87,6 @@ display_settings(){ msg2 "clean_first: ${clean_first}" msg2 "clean_cache_xorg: ${clean_cache_xorg}" msg2 "clean_cache_lng: ${clean_cache_lng}" - msg2 "clean_cache_iso: ${clean_cache_iso}" msg2 "images_only: ${images_only}" msg2 "iso_only: ${iso_only}" @@ -107,6 +105,8 @@ display_settings(){ msg "ISO SETTINGS:" msg2 "iso_label: ${iso_label}" msg2 "iso_name: ${iso_name}" + msg2 "iso_publisher: ${iso_publisher}" + msg2 "iso_app_id: ${iso_app_id}" msg2 "iso_compression: ${iso_compression}" msg2 "iso_checksum: ${iso_checksum}" @@ -120,7 +120,6 @@ load_config "${USER_CONFIG}/manjaro-tools.conf" load_config "${SYSCONFDIR}/manjaro-tools.conf" clean_first=true -clean_cache_iso=true clean_cache_xorg=false clean_cache_lng=false @@ -137,9 +136,7 @@ usage() { echo " -a Arch [default: ${arch}]" echo " -b Branch [default: ${branch}]" echo ' -r Chroots directory' - echo ' -k Custom pacman repo to keep' echo " [default: ${chroots_iso}]" - echo ' -w Disable clean iso cache' echo ' -c Disable clean work dir' echo ' -x Clean xorg cache' echo ' -l Clean lng cache' @@ -155,7 +152,7 @@ usage() { orig_argv=("$@") -opts='p:a:b:r:k:cxlisqwLh' +opts='p:a:b:r:cxlisqh' while getopts "${opts}" arg; do case "${arg}" in @@ -165,7 +162,6 @@ while getopts "${opts}" arg; do r) chroots_iso="$OPTARG" ;; k) keep_repo="$OPTARG" ;; c) clean_first=false ;; - w) clean_cache_iso=false;; x) clean_cache_xorg=true ;; l) clean_cache_lng=true ;; i) images_only=true ;; @@ -190,15 +186,9 @@ cache_dir_iso="${cache_dir}/iso" mirrors_conf="${PKGDATADIR}/pacman-mirrors-${branch}.conf" -# create_args+=(-v -a ${arch} -D ${iso_name} -M ${mirrors_conf}) - -# iso_args+=(-v -x -a ${arch} -D ${iso_name} -L ${iso_label} -c ${iso_compression}) - -# ${clean_cache_iso} && iso_args+=(-f) - check_root "$0" "${orig_argv[@]}" -check_run_dir +#check_run_dir eval_buildset "${buildset_iso}" "${sets_dir_iso}" diff --git a/lib/util-iso-image.sh b/lib/util-iso-image.sh index ab0e754..af1fb39 100644 --- a/lib/util-iso-image.sh +++ b/lib/util-iso-image.sh @@ -338,27 +338,3 @@ configure_xorg_drivers(){ touch $1/var/lib/mhwd/db/pci/graphic_drivers/nvidia-340xx/MHWDCONFIG fi } - -# $1: image path -clean_up_image(){ - msg2 "Cleaning up [$1]" - if [ -d "$1/boot/" ]; then - # remove the initcpio images that were generated for the host system - find "$1/boot" -name 'initramfs*.img' -delete &>/dev/null - fi - - [[ -f "$1/etc/locale.gen.bak" ]] \ - && mv "$1/etc/locale.gen.bak" "$1/etc/locale.gen" - [[ -f "$1/etc/locale.conf.bak" ]] \ - && mv "$1/etc/locale.conf.bak" "$1/etc/locale.conf" - - find "$1/var/lib/pacman" -maxdepth 1 -type f -delete &>/dev/null - find "$1/var/lib/pacman/sync" -delete &>/dev/null - find "$1/var/cache/pacman/pkg" -type f -delete &>/dev/null - find "$1/var/log" -type f -delete &>/dev/null - find "$1/var/tmp" -mindepth 1 -delete &>/dev/null - find "$1/tmp" -mindepth 1 -delete &>/dev/null - -# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete - -} diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 8a10530..62fe3d3 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -13,11 +13,11 @@ [[ -r ${LIBDIR}/util-iso-boot.sh ]] && source ${LIBDIR}/util-iso-boot.sh [[ -r ${LIBDIR}/util-iso-calamares.sh ]] && source ${LIBDIR}/util-iso-calamares.sh -check_run_dir(){ - if [[ ! -f shared/Packages-Systemd ]] || [[ ! -f shared/Packages-Openrc ]];then - die "${0##*/} is not run in a valid iso-profiles folder!" - fi -} +# check_run_dir(){ +# if [[ ! -f shared/Packages-Systemd ]] || [[ ! -f shared/Packages-Openrc ]];then +# die "${0##*/} is not run in a valid iso-profiles folder!" +# fi +# } copy_overlay_root(){ msg2 "Copying overlay ..." @@ -189,31 +189,8 @@ squash_image_dir() { msg3 "Time ${FUNCNAME}: $(elapsed_time ${timer}) minutes" } -make_squash(){ - -} - -# Build ISO -make_iso() { - msg "Start [Build ISO]" - touch "${work_dir}/iso/.buildiso" - for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do - if [[ "$d" != "${work_dir}/iso" ]] && \ - [[ "$(basename "$d")" != "iso" ]] && \ - [[ "$(basename "$d")" != "efiboot" ]] && \ - [[ "$d" != "${work_dir}" ]]; then - squash_image_dir "$d" || die "Exit ..." - fi - done - msg "Making bootable image" - # Sanity checks - [[ ! -d "${work_dir}/iso" ]] && die "[${work_dir}/iso] doesn't exist. What did you do?!" - - if [[ -f "${cache_dir_iso}/${iso_file}" ]]; then - msg2 "Removing existing bootable image..." - rm -rf "${cache_dir_iso}/${iso_file}" - fi - +run_xorriso(){ + msg "Creating ISO image..." local efi_boot_args="" if [[ -f "${work_dir}/iso/EFI/miso/${iso_name}.img" ]]; then msg2 "Setting efi args. El Torito detected." @@ -222,13 +199,7 @@ make_iso() { "-isohybrid-gpt-basdat" \ "-no-emul-boot") fi - msg "Creating ISO image..." - # test msg2 - msg2 "iso_label: ${iso_label}" - msg2 "iso_name: ${iso_name}" - msg2 "iso_publisher: ${iso_publisher}" - msg2 "iso_app_id: ${iso_app_id}" - msg2 "iso_file: ${iso_file}" + xorriso -as mkisofs \ -iso-level 3 -rock -joliet \ -max-iso9660-filenames -omit-period \ @@ -245,6 +216,30 @@ make_iso() { ${efi_boot_args[@]} \ -output "${cache_dir_iso}/${iso_file}" \ "${work_dir}/iso/" +} + +# Build ISO +make_iso() { + msg "Start [Build ISO]" + touch "${work_dir}/iso/.buildiso" + for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do + if [[ "$d" != "${work_dir}/iso" ]] && \ + [[ "$(basename "$d")" != "iso" ]] && \ + [[ "$(basename "$d")" != "efiboot" ]] && \ + [[ "$d" != "${work_dir}" ]]; then + squash_image_dir "$d" || die "Exit ..." + fi + done + + msg "Making bootable image" + # Sanity checks + [[ ! -d "${work_dir}/iso" ]] && die "[${work_dir}/iso] doesn't exist. What did you do?!" + if [[ -f "${cache_dir_iso}/${iso_file}" ]]; then + msg2 "Removing existing bootable image..." + rm -rf "${cache_dir_iso}/${iso_file}" + fi + + run_xorriso chown -R "${OWNER}:users" "${cache_dir_iso}" msg "Done [Build ISO]" @@ -296,10 +291,22 @@ umount_image_handler(){ aufs_remove_image "${work_dir}/boot-image" } -# mkiso_error_handler(){ -# umount_image_handler -# die "Exiting..." -# } +# $1: image path +clean_up_image(){ + msg2 "Cleaning up [$1]" + [[ -d "$1/boot/" ]] && find "$1/boot" -name 'initramfs*.img' -delete &>/dev/null + [[ -f "$1/etc/locale.gen.bak" ]] && mv "$1/etc/locale.gen.bak" "$1/etc/locale.gen" + [[ -f "$1/etc/locale.conf.bak" ]] && mv "$1/etc/locale.conf.bak" "$1/etc/locale.conf" + + find "$1/var/lib/pacman" -maxdepth 1 -type f -delete &>/dev/null + find "$1/var/lib/pacman/sync" -delete &>/dev/null + find "$1/var/cache/pacman/pkg" -type f -delete &>/dev/null + find "$1/var/log" -type f -delete &>/dev/null + find "$1/var/tmp" -mindepth 1 -delete &>/dev/null + find "$1/tmp" -mindepth 1 -delete &>/dev/null + +# find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete +} # Base installation (root-image) make_image_root() { @@ -308,6 +315,7 @@ make_image_root() { local path="${work_dir}/root-image" mkdir -p ${path} make_chroot "${path}" "${packages}" + clean_up_image "${path}" pacman -Qr "${path}" > "${path}/root-image-pkgs.txt" configure_lsb "${path}" copy_overlay_root "${path}" @@ -325,6 +333,7 @@ make_image_custom() { umount_image_handler aufs_mount_root_image "${path}" make_chroot "${path}" "${packages}" + clean_up_image "${path}" pacman -Qr "${path}" > "${path}/${custom}-image-pkgs.txt" cp "${path}/${custom}-image-pkgs.txt" ${cache_dir_iso}/${iso_name}-${custom}-${dist_release}-${arch}-pkgs.txt [[ -d ${custom}-overlay ]] && copy_overlay_custom @@ -350,6 +359,7 @@ make_image_livecd() { aufs_mount_root_image "${path}" fi make_chroot "${path}" "${packages}" + clean_up_image "${path}" pacman -Qr "${path}" > "${path}/livecd-image-pkgs.txt" copy_overlay_livecd "${path}" # copy over setup helpers and config loader diff --git a/lib/util.sh b/lib/util.sh index 5c90f7f..2ba523b 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -323,14 +323,6 @@ load_config(){ buildset_iso='default' fi -# if [[ -z ${clean_cache_xorg} ]];then -# clean_cache_xorg='true' -# fi -# -# if [[ -z ${clean_cache_lng} ]];then -# clean_cache_lng='true' -# fi - ##### iso settings ##### if [[ -z ${dist_release} ]];then From 8d53fbb74d2002b8574aed3f2f117859dd099434 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 11 May 2015 23:34:20 +0200 Subject: [PATCH 092/127] update readme --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ecdbce0..da9ed1c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ manjaro-tools ============= -Manjaro-tools-0.9.7 +Manjaro-tools-0.9.8 User manual @@ -107,6 +107,12 @@ Specifying args will override manjaro-tools.conf settings. # unset defaults to given value # iso_name=manjaro +# publisher +# iso_publisher="Manjaro Linux " + +# iso_app_id +# iso_app_id="Manjaro Linux Live/Rescue CD" + # unset defaults to given value # iso_compression=xz @@ -140,7 +146,7 @@ Each iso profile must have these files or symlinks to shared: # efi_boot_loader="grub" # set uefi partition size -# efi_part_size=32M +# efi_part_size=42M # unset defaults to given value # plymouth_theme=manjaro-elegant @@ -284,7 +290,6 @@ Usage: buildiso [options] -b Branch [default: stable] -r Chroots directory [default: /opt/buildiso] - -w Disable clean iso cache -c Disable clean work dir -x Disable clean xorg cache -l Disable clean lng cache From 0b0c84282ff140e35d5c3234a66008efbce63ce4 Mon Sep 17 00:00:00 2001 From: udeved Date: Tue, 12 May 2015 01:08:23 +0200 Subject: [PATCH 093/127] [uitl-iso] fix #92; set new efi_part_size back to 31M --- lib/util-iso.sh | 10 +++++----- lib/util.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 62fe3d3..a625333 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -191,12 +191,12 @@ squash_image_dir() { run_xorriso(){ msg "Creating ISO image..." - local efi_boot_args="" + local efi_boot_args=() if [[ -f "${work_dir}/iso/EFI/miso/${iso_name}.img" ]]; then msg2 "Setting efi args. El Torito detected." - efi_boot_args=("-eltorito-alt-boot" \ - "-e EFI/miso/${iso_name}.img" \ - "-isohybrid-gpt-basdat" \ + efi_boot_args=("-eltorito-alt-boot" + "-e EFI/miso/${iso_name}.img" + "-isohybrid-gpt-basdat" "-no-emul-boot") fi @@ -221,7 +221,7 @@ run_xorriso(){ # Build ISO make_iso() { msg "Start [Build ISO]" - touch "${work_dir}/iso/.buildiso" + touch "${work_dir}/iso/.miso" for d in $(find "${work_dir}" -maxdepth 1 -type d -name '[^.]*'); do if [[ "$d" != "${work_dir}/iso" ]] && \ [[ "$(basename "$d")" != "iso" ]] && \ diff --git a/lib/util.sh b/lib/util.sh index 2ba523b..47d539a 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -393,7 +393,7 @@ load_profile_config(){ fi if [[ -z ${efi_part_size} ]]; then - efi_part_size="42M" + efi_part_size="31M" fi if [[ -z ${hostname} ]];then From 10264018845785b9c331ee1cad148db7544e0902 Mon Sep 17 00:00:00 2001 From: udeved Date: Tue, 12 May 2015 19:56:56 +0200 Subject: [PATCH 094/127] [util-iso] some msg minor changes; rm mkiso --- bin/mkiso.in | 353 ------------------------------------------------ lib/util-iso.sh | 3 +- lib/util-msg.sh | 14 -- 3 files changed, 1 insertion(+), 369 deletions(-) delete mode 100755 bin/mkiso.in diff --git a/bin/mkiso.in b/bin/mkiso.in deleted file mode 100755 index 4ad248c..0000000 --- a/bin/mkiso.in +++ /dev/null @@ -1,353 +0,0 @@ -#!/bin/bash -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -version=@version@ - -[[ -r @libdir@/util-msg.sh ]] && source @libdir@/util-msg.sh -[[ -r @libdir@/util.sh ]] && source @libdir@/util.sh - -PKGLIST="" -QUIET=true -FORCE=false -PACCONFIG="/etc/pacman.conf" -export LABEL="MANJARO_$(date +%Y%m)" -PUBLISHER="Manjaro Linux " -APPLICATION="Manjaro Linux Live/Rescue CD" -COMPRESSION="xz" -CREATE_DEFAULT=false -INSTALL_DIR="manjaro" -IMAGE_FOLDER="root-image" -LOCALE="" -APPNAME=$(basename "${0}") -MIRRORS='' -LOG=false - -# usage: usage -usage (){ - echo "usage ${APPNAME} [options] command " - echo " general options:" - echo " -f Force overwrite of working files/squashfs image/bootable image" - echo " -p PACKAGE(S) Additional package(s) to install, can be used multiple times" - echo " -C Config file for pacman. Default $PACCONFIG" - echo " -L