Compare commits

...

165 commits

Author SHA1 Message Date
5e29909aec Update lib/util-iso-boot.sh 2024-01-28 12:47:00 +01:00
Frede Hundewadt
99d8f267bf shell check remove dangling ]] 2023-12-16 08:26:58 +01:00
Frede Hundewadt
aec896c90c added flag -n to disable multilib (override profile setting) 2023-12-16 08:26:01 +01:00
Frede Hundewadt
98eda6b062 remove deprecated community repo
enable ParallelDownloads
2023-12-16 08:24:09 +01:00
Frede Hundewadt
8129e5d45a change to array from "" to () 2023-12-16 08:23:10 +01:00
Frede Hundewadt
78765ee17c adding check-yaml to make clean 2023-12-16 08:22:00 +01:00
Philip Mueller
71f34308c6 Revert "[util-yaml] try to fix locale on gaming edition"
This reverts commit e41edc365f.
2023-12-13 15:59:01 +07:00
Philip Mueller
e41edc365f [util-yaml] try to fix locale on gaming edition 2023-12-13 15:58:13 +07:00
Philip Mueller
0bb4097092 [util] update default mirror 2023-08-29 08:15:42 +02:00
Philip Mueller
4e13703bf0 [util-iso] mask some systemd services
- create dir if not given
2023-08-08 08:39:06 +02:00
Philip Mueller
d7e97d48c9 [util-iso] mask some systemd services 2023-08-08 08:34:10 +02:00
Philip Mueller
65a84879e8 [data] remove community repo 2023-07-31 07:56:50 +02:00
Philip Mueller
263d64006e [util-iso-image] adopt to 3.3 branding 2023-07-02 14:50:11 +02:00
Philip Mueller
18b975da7f [util-iso-image] fix codename with space 2023-06-22 19:54:29 +02:00
Philip Mueller
488315a4ed [buildiso] be more verbose with systemd timers 2023-06-08 09:52:25 +02:00
Philip Mueller
a35c94d4b9 [util-yaml] update script 2023-05-26 13:09:47 +02:00
Philip Mueller
95b66c254d [util-yaml] update script 2023-05-26 13:02:47 +02:00
Philip Mueller
0f27b81f10 [util-yaml] update script 2023-05-26 12:20:28 +02:00
Philip Mueller
3de332a3f0 [util-yaml] add support for Calames 3.3 2023-05-26 11:53:15 +02:00
Philip Mueller
18b93d69db [util-yaml] update if routines 2023-04-21 09:39:42 +07:00
Philip Müller
18ce522cab [util-yaml] fix if routine 2023-04-10 15:43:56 +07:00
Philip Müller
8325693818 [util-yaml] make timers optional 2023-04-09 15:41:19 +07:00
Philip Müller
7cabd74e60 [util-yaml] fix services.conf 2023-04-06 10:45:14 +07:00
Philip Müller
2ddcc62973 [util-yaml] add timers support 2023-04-02 14:51:17 +07:00
Philip Müller
dc48e4e43c [initcpio] fix shutdown hook
- see also: https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/-/merge_requests/155
2022-12-19 19:41:52 +07:00
Philip Müller
1838316b51 [util] change default server
- moson.eu seems to be offline
2022-10-25 12:24:09 +02:00
Philip Müller
7ef0b3dc2b [util] fix typo 2022-10-13 18:38:21 +02:00
Philip Müller
fe9bd56896 [util-yaml] add set_oem_user 2022-10-13 18:11:54 +02:00
Philip Müller
caf60645ce [util-iso] fix branding in live 2022-08-29 15:45:01 +02:00
Philip Müller
62db7160d5 [release] 0.15.14 2022-08-27 08:52:42 +00:00
Philip Müller
a30c5c5b47 [util-iso-image] fix echo 2022-08-26 11:13:04 +02:00
Philip Müller
5f1c35e045 [util-iso] enable new branding 2022-08-26 10:27:35 +02:00
Philip Müller
d3ab09123c [util-yaml] don't allow empty passwords
- see also: https://forum.manjaro.org/t/91745
2021-11-22 22:03:00 +00:00
Philip Müller
d422be22df [util-iso-image] fix MHWD 2021-11-19 14:01:11 +01:00
Philip Müller
55b596daad [util-iso-boot] GPL2 licence got removed
- memtest doesn't ship the license as file anymore
2021-11-09 10:57:00 +01:00
Philip Müller
5350029b7c Revert "[util.sh] use mirrors.manjaro.org"
This reverts commit 25bc6cafb4.
2021-09-24 11:35:13 +02:00
Philip Müller
25bc6cafb4 [util.sh] use mirrors.manjaro.org 2021-09-21 22:26:03 +02:00
Philip Müller
65911fa712 [release] 0.15.13 2021-09-11 13:48:25 +00:00
Philip Müller
48e2b429cd [data] adjust to pacman 6.0 2021-08-17 19:59:35 +02:00
Philip Müller
46e558d4b2 [util-yaml] revert back to original way
- see issue in manjaro-iso-action: 85832bf08e
2021-08-15 00:24:50 +00:00
Philip Müller
d85b80b766 [util-yaml] use variable dist_name for efiBootloaderId 2021-08-14 22:50:05 +00:00
Matti Hyttinen
6502ac4753 set bootloader name for efi to avoid problems with Luks 2021-08-14 21:59:51 +00:00
Philip Müller
f0557b5eea [util-yaml.sh] reverting back to ext4 by default 2021-08-01 18:40:26 +00:00
Philip Müller
29f5030440 [util-yaml.sh] make btrfs default and add xfs as option 2021-08-01 11:58:31 +00:00
Philip Müller
53a46f255b Update util-iso-mount.sh 2021-07-20 12:08:18 +00:00
Philip Müller
a44862c96c Update util-mount.sh 2021-07-20 12:07:16 +00:00
Philip Müller
7bcbc518f1 Update util-iso-mount.sh 2021-07-20 11:30:00 +00:00
Philip Müller
6c127f06f8 Update util-iso-mount.sh 2021-07-20 11:27:26 +00:00
Philip Müller
90d7cd8301 Update util-iso-mount.sh 2021-07-20 11:09:23 +00:00
Philip Müller
4e6e583a7d Update util-iso-mount.sh 2021-07-20 10:12:29 +00:00
Philip Müller
9a99817285 Update util-iso-mount.sh 2021-07-20 09:40:31 +00:00
Philip Müller
9e9b793aab Update util-iso-mount.sh 2021-07-20 09:07:52 +00:00
Philip Müller
7a6459172e Update util-iso-mount.sh 2021-07-20 09:02:21 +00:00
Philip Müller
5c372f07c6 Update util-iso-mount.sh 2021-07-20 08:46:08 +00:00
Philip Müller
4018148768 Update util-iso-mount.sh
- try with check
2021-07-20 08:39:28 +00:00
Philip Müller
4362959570 Update util-iso-mount.sh 2021-07-20 08:19:08 +00:00
Philip Müller
3ac95787c5 Update util-iso-mount.sh 2021-07-20 07:58:50 +00:00
Philip Müller
3736289745 Update util-iso-mount.sh 2021-07-20 07:39:59 +00:00
Philip Müller
1f7a1bbdb4 Update util-iso-mount.sh 2021-07-20 07:13:41 +00:00
Philip Müller
6cbf8f7f02 Update util-mount.sh 2021-07-19 22:51:29 +00:00
Philip Müller
7d4a0081d4 Update util-iso-mount.sh 2021-07-19 22:49:42 +00:00
Philip Müller
ac648310e2 Update util-iso-mount.sh 2021-07-19 22:25:50 +00:00
Philip Müller
933a3dc249 Update util-iso-mount.sh 2021-07-19 22:06:02 +00:00
Philip Müller
562867eeba Update util-iso-mount.sh 2021-07-19 21:50:38 +00:00
Philip Müller
343fea66e3 Update util-iso-mount.sh
- try different approach
2021-07-19 21:02:47 +00:00
Philip Müller
f905232812 Update util-iso-mount.sh 2021-07-19 20:26:02 +00:00
Philip Müller
2dd93535d7 Update util-iso-mount.sh
- more debug
2021-07-19 20:08:49 +00:00
Philip Müller
3eee06d65d Update util-mount.sh
- better debug
2021-07-19 19:35:55 +00:00
Philip Müller
55603df916 Update util-mount.sh
- more debug
2021-07-19 19:06:23 +00:00
Philip Müller
b7b4f48e3a Update util-iso-mount.sh
- add more debug
2021-07-19 18:03:59 +00:00
Philip Müller
2d0a4ead94 Update util-mount.sh 2021-07-19 18:02:23 +00:00
Philip Müller
2e8d4e71d4 Update util-mount.sh
- add more debug info
2021-07-19 17:29:57 +00:00
Philip Müller
8f0633468d [util-mount] try with force umount. 2021-07-19 15:45:55 +00:00
Philip Müller
c0f75a6247 [util-mount] use lazy umount for now 2021-07-19 13:59:47 +00:00
Philip Müller
786abcbcb3 [util-yaml] fix typo 2021-07-14 17:13:23 +02:00
Philip Müller
f1ac7301b2 [util-yaml] adding default Manjaro settings for partition.conf 2021-07-14 17:03:21 +02:00
Philip Müller
bc23dce4a7 [util-iso-boot.sh] make license install of ucode more flexible 2021-06-30 11:27:57 +00:00
Philip Müller
b1fb15af1b [util-iso] enhance gnupg removal of pacman.d 2021-06-12 00:07:42 +02:00
Philip Müller
ceacbe0dcc [yaml] remove GIS code 2021-05-29 19:16:39 +02:00
Philip Müller
4d9c804384 [util-yaml] fix path 2021-05-29 18:51:48 +02:00
Philip Müller
fb7ec401fd [util-yaml] fix GIS check 2021-05-29 18:14:36 +02:00
Philip Müller
e66c9c0f61 [util-yaml] check for gis 2021-05-29 15:37:28 +02:00
Philip Müller
c10c4d5e8f [util-yaml] prepare for GIS 2021-05-28 10:50:36 +02:00
Stefano Capitani
4bdb473250 Improve code
Signed-off-by: Stefano Capitani <stefano@manjaro.org>
2021-05-21 18:57:37 +02:00
Stefano Capitani
7ef53f1daf Merge branch 'security' into 'master'
Improve remove

See merge request tools/development-tools/manjaro-tools!316
2021-05-20 21:46:19 +00:00
Stefano Capitani
70b5d07ca9 Improve remove
Signed-off-by: Stefano Capitani <stefano@manjaro.org>
2021-05-20 23:44:49 +02:00
Stefano Capitani
5a5195cb87 Merge branch 'security' into 'master'
Purge pacman-keys from ISO

See merge request tools/development-tools/manjaro-tools!315
2021-05-20 19:46:43 +00:00
Stefano Capitani
511f4f2fcb Purge pacman-key from Iso
Signed-off-by: Stefano Capitani <stefano@manjaro.org>
2021-05-17 23:19:47 +02:00
Stefano Capitani
8b38859828 try to remove pacman-keyring
Signed-off-by: Stefano Capitani <stefano@manjaro.org>
2021-05-16 17:40:09 +02:00
Philip Müller
39f8daf70a [util-iso] fix typo 2021-03-31 09:50:20 +02:00
Philip Müller
b99d489ef5 [util-iso] enable os-prober by default 2021-03-31 09:50:04 +02:00
Philip Müller
b12ff4a491 [release] 0.15.12 2021-03-15 10:59:35 +01:00
Philip Müller
abfb256279 [mkchroot] generate locales only when needed 2021-03-15 10:58:46 +01:00
Bernhard Landauer
1408d2ce4b [util-iso-image.sh] missing closing bracket 2021-01-24 20:18:36 +01:00
Philip Müller
41242f4d5c [util-iso] fix polkit user rules call
- see also: https://gitlab.manjaro.org/profiles-and-settings/iso-profiles/-/merge_requests/180
2020-12-21 10:23:29 +01:00
Philip Müller
35f27fc4f3 [util-iso] add polkit user rules
- see also: https://gitlab.manjaro.org/profiles-and-settings/iso-profiles/-/merge_requests/180
2020-12-21 10:22:03 +01:00
Philip Müller
c579446076 [util-iso-image] proper fix #326
- fix array
2020-11-20 12:25:17 +01:00
Philip Müller
2f7fadaa70 [util-iso-image] proper fix #326 2020-11-20 12:25:04 +01:00
Philip Müller
5a28432745 Revert "fix #326"
This reverts commit 1eb51d062f.
2020-11-20 12:24:48 +01:00
Bernhard Landauer
1eb51d062f fix https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/-/issues/326 2020-11-12 22:34:01 +01:00
Matti Hyttinen
181675fe0e Merge branch 'robin0800-patch' into 'master'
patch to add user_shell to -qv argument

See merge request tools/development-tools/manjaro-tools!314
2020-10-31 14:54:49 +01:00
Frede Hundewadt
1dd62d180a Added user_shell to -q -v 2020-10-31 09:52:14 +01:00
Frede Hundewadt
110b26747b adding user_shell to display with -q -v 2020-10-31 09:49:32 +01:00
Bernhard Landauer
15406d86f4 Merge branch 'disable_systemd_live' into 'master'
add 'disable_systemd_live'

See merge request tools/development-tools/manjaro-tools!313
2020-10-22 12:41:20 +02:00
Bernhard Landauer
3ae4799ee6 add disable_systemd_live; https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/-/issues/326 2020-10-21 14:21:28 +02:00
Philip Müller
204ae9004f [util-mount] fix chroot -a
- patch by Christian Finnberg
2020-09-02 20:33:52 +02:00
Bernhard Landauer
ce4a92f362 fix netinstall_label check 2020-06-29 14:11:31 +02:00
Philip Müller
4a800db62c [util] add 'netinstall_label' value 2020-06-21 22:52:04 +02:00
Philip Müller
2276d19058 [util-yaml] fix last commit 2020-06-21 22:49:24 +02:00
Philip Müller
37d862971b [util-yaml] fix last commit 2020-06-21 22:47:57 +02:00
Philip Müller
043fc489d8 [util-yaml] add 'netinstall_label' value 2020-06-21 22:46:35 +02:00
Philip Müller
d3de31b7f1 [util] update 'netgroups' value 2020-06-21 22:15:45 +02:00
Philip Müller
c4f2f75d78 Merge branch 'master' of ssh://gitlab.manjaro.org:22277/tools/development-tools/manjaro-tools 2020-06-21 21:44:23 +02:00
Philip Müller
398fc3d6d6 [util-yaml] use 'needs_internet' 2020-06-21 21:44:18 +02:00
Philip Müller
0b8624d064 [util] add value 'needs_internet' 2020-06-21 21:33:35 +02:00
Philip Müller
df09a5f3ba Merge branch 'master' of ssh://gitlab.manjaro.org:22277/tools/development-tools/manjaro-tools 2020-06-21 21:12:10 +02:00
Philip Müller
5b7275a28f [util-yaml] update write_packages_conf 2020-06-21 21:09:46 +02:00
Bernhard Landauer
f332cfd9ee [util-publish] fix sed for date 2020-06-12 22:29:03 +02:00
Philip Müller
fa815e8bab [hooks] fix typos in miso 2020-06-11 17:50:35 +02:00
Philip Müller
61f1373d95 [hooks] check for path in miso 2020-06-11 17:37:58 +02:00
Philip Müller
fb176e8a77 [release] 0.15.10 2020-05-20 18:08:19 +02:00
Philip Müller
2949a54e95 [util-iso-image] add missing API value 2020-05-20 17:37:39 +02:00
Philip Müller
c1ad19e8db [util-iso-image] add missing API value 2020-05-20 17:31:55 +02:00
Vitor Lopes
34b9a4ee30 add fastest compression rate 2020-05-14 15:56:29 +02:00
Philip Müller
65c1322551 Merge branch 'master' of ssh://gitlab.manjaro.org:22277/tools/development-tools/manjaro-tools 2020-05-09 13:21:39 +02:00
Philip Müller
36134e5b91 [util-iso-image] extend function to allow also timer 2020-05-09 13:21:25 +02:00
Philip Müller
d2d6d8f596 Merge branch 'office-installer-config' into 'master'
Office installer config

See merge request tools/development-tools/manjaro-tools!311
2020-05-08 10:48:18 +02:00
Frede Hundewadt
9932f4b8d0
Merge branch 'master' into office-installer-config
# Conflicts:
#	lib/util.sh
2020-04-07 11:12:05 +02:00
Philip Müller
3806b31b04 [util] higher window size 2020-04-06 20:14:22 +02:00
Philip Müller
be6f82ab91 [util-yaml] update write_settings_conf 2020-04-06 13:31:23 +02:00
Frede Hundewadt
3917a6818e
rm trailing whitespace 2020-03-27 08:54:41 +01:00
Philip Müller
02a8b7c90d Revert "[util-yaml] don't set locale, users and keyboard layouts for Gnome"
This reverts commit 76f4b723f5.
2020-03-26 14:21:22 +01:00
Philip Müller
e492a858be Revert "[yaml-utils] also don't set users module for Gnome"
This reverts commit b2a36142a3.
2020-03-26 14:20:56 +01:00
Philip Müller
024d0ba921 Revert "[util-yaml] run localecfg with gnome"
This reverts commit 7f6da6af34.
2020-03-26 14:20:35 +01:00
Philip Müller
7f6da6af34 [util-yaml] run localecfg with gnome 2020-03-26 13:05:21 +01:00
Philip Müller
b2a36142a3 [yaml-utils] also don't set users module for Gnome 2020-03-26 06:59:31 +01:00
Philip Müller
76f4b723f5 [util-yaml] don't set locale, users and keyboard layouts for Gnome 2020-03-26 05:58:19 +01:00
Bernhard Landauer
dee5a38dea [util-publish] fix dl_file official 2020-03-24 16:39:47 +01:00
Frede Hundewadt
6054f09efc
Merge remote-tracking branch 'upstream/master' into office-installer-config 2020-03-15 11:12:22 +01:00
Bernhard Landauer
514eafa341 fix https://gitlab.manjaro.org/webpage/manjaro-homepage/issues/157 2020-03-15 00:37:51 +01:00
Bernhard Landauer
1dcb41da57 [deployiso] option -w to update download page 2020-03-01 18:40:24 +01:00
Frede Hundewadt
f4dd5b3bd0
forgot to remove 2020-03-01 12:29:59 +01:00
Frede Hundewadt
76d6d697e1
reset variables
rename to office_installer
updated pacman-mirrors.conf
2020-03-01 12:11:44 +01:00
Frede Hundewadt
25b3bc1d61
Adding office_installer to profile.conf - default to false
Added `-o` to buildiso to activate office_installer per build
Modified `util-yaml.sh` to handle setting
Modified `util.sh` to handle the setting
2020-03-01 11:50:56 +01:00
Bernhard Landauer
6d1bb50b44 typo 2020-03-01 09:49:06 +01:00
Bernhard Landauer
7ce5288a8c fix latest minimal filenames 2020-03-01 09:42:14 +01:00
Bernhard Landauer
2238d824e0 [sync_latest*] use scp -p 2020-03-01 09:21:14 +01:00
Bernhard Landauer
34345bf8f3 [util-publish] do not rm local files 2020-03-01 09:11:36 +01:00
Bernhard Landauer
f9f8b11280 Merge branch 'patch__latest_minimal' into 'master'
Added arguments to buildiso and deployiso

See merge request tools/development-tools/manjaro-tools!309
2020-02-29 18:43:40 +01:00
Frede Hundewadt
5a889a8058
set permissions on uploaded file
use sftp -p to transfer the file
2020-02-29 17:42:20 +01:00
Frede Hundewadt
4180b449cb
removed limitation on which latest to build
buildiso -l - create permalink for iso
deployiso -z - create and upload permalinks
2020-02-29 10:59:50 +01:00
Philip Müller
ca5034d06e [util-iso] add rock and joliet 2020-02-28 10:51:23 +01:00
Philip Müller
0ca7be157f [util.sh] set branch only for rootfs 2020-02-25 10:47:04 +01:00
Philip Müller
465bc8937d [util.sh] enable 'stable-staging' branch 2020-02-25 10:33:16 +01:00
Bernhard Landauer
b4038736dd Merge branch 'more_latest_links' into 'master'
more perma links

See merge request tools/development-tools/manjaro-tools!308
2020-02-23 14:31:49 +01:00
Frede Hundewadt
a9e23cd7c1
removed not needed functions 2020-02-19 21:40:42 +01:00
Frede Hundewadt
4d164fc0ed
removed link generation 2020-02-19 21:29:50 +01:00
Frede Hundewadt
407fbaa4e9
removed index.html generation - no need for it 2020-02-19 21:15:43 +01:00
Frede Hundewadt
228aa3faa8
minor formatting 2020-02-19 21:08:30 +01:00
Frede Hundewadt
f44df5bb5f
added .idea 2020-02-19 20:29:39 +01:00
Frede Hundewadt
d25e4ba870
more perma links 2020-02-19 20:26:23 +01:00
Philip Müller
0a420b5818 [miso_loop_mnt] update checks 2020-02-13 23:32:21 +01:00
Philip Müller
5e36d2d206 [merge] volid branch 2020-02-13 20:15:08 +01:00
Philip Müller
bda1c943ca [util-iso] add M when Minimal for volid 2020-02-13 20:12:48 +01:00
Philip Müller
ed9b77b2fe [util-iso] only edit branding when file exists 2020-02-12 00:21:49 +01:00
23 changed files with 862 additions and 244 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.idea
*~
*.tar.gz
*.tar.xz

View file

@ -1,4 +1,4 @@
Version=0.15.9
Version=0.15.14
PREFIX = /usr/local
SYSCONFDIR = /etc
@ -13,7 +13,8 @@ BIN_BASE = \
bin/manjaro-chroot \
bin/fstabgen \
bin/signfile \
bin/chroot-run
bin/chroot-run \
bin/check-yaml
LIBS_BASE = \
lib/util.sh \

View file

@ -69,7 +69,7 @@ overriding
# log_dir='/var/log/manjaro-tools'
# custom build mirror server
# build_mirror=https://mirror.netzspielplatz.de/manjaro/packages
# build_mirror=https://manjaro.moson.eu
################ buildtree ###############
@ -95,13 +95,13 @@ overriding
# build_list_iso=default
# the dist release; default: auto
# dist_release=17.1
# dist_release=auto
# the branding; default: auto
# dist_branding="MJRO"
# dist_branding="MANJARO"
# unset defaults to given value
# kernel="linux414"
# kernel="linux54"
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
@ -240,7 +240,9 @@ Usage: buildiso [options]
-h This help
-k <name> Kernel to use
[default: linux49]
-l Create permalink
-m Set SquashFS image mode to persistence
-o Enable office installer
-p <profile> Buildset or profile [default: default]
-q Query settings and pretend build
-r <dir> Chroots directory
@ -405,6 +407,7 @@ Usage: deployiso [options]
-t Create ISO torrent
-u Update remote directory
-v Verbose output
-z Upload permalinks (shell.osdn.net)
~~~
###### * upload official build list, ie all built iso defined in a build list
@ -418,3 +421,7 @@ deployiso -p official
~~~
deployiso -p xfce -std
~~~
##### Fast compression
Lz4 Is very fast but not a good compression ratio, good for testing

44
bin/buildiso.in Executable file → Normal file
View file

@ -29,6 +29,8 @@ show_profile(){
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
msg2 "extra: %s" "${extra}"
msg2 "office_installer: %s" "${office_installer}"
msg2 "permalink: %s" "${permalink}"
msg2 "netinstall: %s" "${netinstall}"
msg2 "chrootcfg: %s" "${chrootcfg}"
@ -42,11 +44,13 @@ show_profile(){
msg2 "hostname: %s" "${hostname}"
msg2 "username: %s" "${username}"
msg2 "password: %s" "${password}"
msg2 "user_shell: %s" "${user_shell}"
msg2 "login_shell: %s" "${login_shell}"
msg2 "addgroups: %s" "${addgroups}"
[[ -n ${smb_workgroup} ]] && msg2 "smb_workgroup: %s" "${smb_workgroup}"
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_timers: %s" "${enable_systemd_timers[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
@ -62,7 +66,7 @@ display_settings(){
show_config
msg "PROFILE:"
msg2 "gitlab brach: %s" "${branch}"
msg2 "gitlab branch: %s" "${branch}"
msg2 "build_lists: %s" "$(show_build_lists ${list_dir_iso})"
msg2 "build_list_iso: %s" "${build_list_iso}"
msg2 "is_build_list: %s" "${is_build_list}"
@ -78,6 +82,9 @@ display_settings(){
msg2 "images_only: %s" "${images_only}"
msg2 "iso_only: %s" "${iso_only}"
msg2 "persist: %s" "${persist}"
msg2 "extra: %s" "${full_iso}"
msg2 "permalink: %s" "${permalink}"
msg2 "office_installer: %s" "${office_installer}"
msg "DIST SETTINGS:"
msg2 "dist_name: %s" "${dist_name}"
@ -107,31 +114,35 @@ iso_only=false
verbose=false
persist=false
initialize=false
permalink=false
usage() {
echo "Usage: ${0##*/} [options]"
echo " -i Initialize iso-profiles repo [default: ${branch}]"
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
echo " -a <arch> Arch [default: ${target_arch}]"
echo " -b <branch> Branch [default: ${target_branch}]"
echo ' -c Disable clean work dir'
echo ' -d <comp> Compression used for build ISO: gzip, lzma, lz4, lzo, xz, zstd'
echo " [default: ${iso_compression}]"
echo ' -f Build full ISO (extra=true)'
echo ' -g <key> The gpg key for sfs signing'
echo " [default: ${gpgkey}]"
echo " -i Initialize iso-profiles repo [default: ${branch}]"
echo ' -k <name> Kernel to use'
echo " [default: ${kernel}]"
echo ' -l Create permalink'
echo ' -m Set SquashFS image mode to persistence'
echo ' -n Disable multilib'
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
echo ' -o Enable office installer module'
echo ' -q Query settings and pretend build'
echo ' -r <dir> Chroots directory'
echo " [default: ${chroots_iso}]"
echo ' -t <dir> Target directory'
echo " [default: ${cache_dir_iso}]"
echo ' -k <name> Kernel to use'
echo " [default: ${kernel}]"
echo ' -g <key> The gpg key for sfs signing'
echo " [default: ${gpgkey}]"
echo ' -m Set SquashFS image mode to persistence'
echo ' -c Disable clean work dir'
echo ' -f Build full ISO (extra=true)'
echo ' -d <comp> Compression used for build ISO: gzip, lzma, lz4, lzo, xz, zstd'
echo " [default: ${iso_compression}]"
echo ' -v Verbose output to log file, show profile detail (-q)'
echo ' -x Build images only'
echo ' -z Generate iso only'
echo ' Requires pre built images (-x)'
echo ' -v Verbose output to log file, show profile detail (-q)'
echo ' -q Query settings and pretend build'
echo ' -h This help'
echo ''
echo ''
@ -140,7 +151,7 @@ usage() {
orig_argv=("$@")
opts='p:a:b:r:t:k:g:d:cfzxmvqhi'
opts='p:a:b:r:t:k:g:d:cfzxmnvqhilo'
while getopts "${opts}" arg; do
case "${arg}" in
@ -153,6 +164,7 @@ while getopts "${opts}" arg; do
g) gpgkey="$OPTARG" ;;
k) kernel="$OPTARG" ;;
m) persist=true ;;
n) no_multilib=true ;; # only exist if set here
p) build_list_iso="$OPTARG" ;;
q) pretend=true ;;
r) chroots_iso="$OPTARG" ;;
@ -160,6 +172,8 @@ while getopts "${opts}" arg; do
v) verbose=true ;;
x) images_only=true ;;
z) iso_only=true ;;
l) permalink=true ;;
o) office_installer=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac

View file

@ -45,6 +45,8 @@ display_settings(){
msg2 "verbose: %s" "${verbose}"
msg2 "signiso: %s" "${sign}"
msg2 "torrent: %s" "${torrent}"
msg2 "shell_upload: %s" "${shell_upload}"
msg2 "upd_homepage: %s" "${upd_homepage}"
if ${torrent}; then
msg2 "tracker_url: %s" "${tracker_url}"
@ -75,6 +77,8 @@ update=false
verbose=false
sign=false
alt_storage=false
shell_upload=false
upd_homepage=false
rsync_args=(-aP -e ssh)
@ -90,12 +94,14 @@ usage() {
echo ' -t Create ISO torrent'
echo ' -u Update remote directory'
echo ' -v Verbose output'
echo ' -w Update download page on manjaro.org'
echo ' -z Upload permalinks (shell.osdn.net)'
echo ''
echo ''
exit $1
}
opts='adhl:p:qstuv'
opts='adhl:p:qstuvwz'
while getopts "${opts}" arg; do
case "${arg}" in
@ -108,6 +114,8 @@ while getopts "${opts}" arg; do
t) torrent=true ;;
u) update=true; rsync_args+=(-u) ;;
v) verbose=true; rsync_args+=(-v --stats) ;;
w) upd_homepage=true; shell_upload=true ;;
z) shell_upload=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac

View file

@ -115,11 +115,12 @@ if ${build_locales}; then
printf '%s.UTF-8 UTF-8\n' en_US > "$working_dir/etc/locale.gen"
printf 'LANG=%s.UTF-8\n' en_US > "$working_dir/etc/locale.conf"
printf 'LC_MESSAGES=C\n' >> "$working_dir/etc/locale.conf"
chroot_args=(${pac_conf:+-C "$pac_conf"} ${makepkg_conf:+-M "$makepkg_conf"} \
${mirrors_conf:+-S "$mirrors_conf"} ${build_mirror:+-B "$build_mirror"} \
${cache_dir:+-c "$cache_dir"} ${keep_flag})
exec chroot-run \
${chroot_args[*]} \
"$working_dir" locale-gen
fi
chroot_args=(${pac_conf:+-C "$pac_conf"} ${makepkg_conf:+-M "$makepkg_conf"} ${mirrors_conf:+-S "$mirrors_conf"} ${build_mirror:+-B "$build_mirror"} ${cache_dir:+-c "$cache_dir"} ${keep_flag})
exec chroot-run \
${chroot_args[*]} \
"$working_dir" locale-gen

View file

@ -1,3 +1,3 @@
MODULES="loop dm-snapshot"
HOOKS="base udev miso_shutdown miso miso_loop_mnt miso_pxe_common miso_pxe_http miso_pxe_nbd miso_pxe_nfs miso_kms modconf block filesystems keyboard keymap"
MODULES=(loop dm-snapshot)
HOOKS=(base udev miso_shutdown miso miso_loop_mnt miso_pxe_common miso_pxe_http miso_pxe_nbd miso_pxe_nfs miso_kms modconf block filesystems keyboard keymap)
COMPRESSION="xz"

View file

@ -18,7 +18,7 @@
HoldPkg = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
@ -34,10 +34,11 @@ Architecture = auto
# Misc options
#UseSyslog
#Color
#TotalDownload
#NoProgressBar
# We cannot check disk space from within a chroot environment
#CheckSpace
#VerbosePkgLists
ParallelDownloads = 4
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
@ -80,13 +81,8 @@ Include = /etc/pacman.d/mirrorlist
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View file

@ -15,7 +15,7 @@
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
@ -30,9 +30,10 @@ Architecture = auto
# Misc options
#UseSyslog
#UseDelta
#TotalDownload
#NoProgressBar
CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5
# PGP signature checking
# NOTE: None of this will work without running `pacman-key --init` first.

View file

@ -10,6 +10,10 @@ Branch = stable
## 2) random - randomly generate the output mirrorlist
# Method = rank
## Filename to use when ranking mirrors
## The file must be present in core repo
# TestFile = core.db.tar.gz
## Define protocols and priority
## separated by comma 'https,http' or 'http,https'
## ATM available protocols are: http, https, ftp

View file

@ -18,7 +18,7 @@
HoldPkg = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
@ -34,10 +34,11 @@ Architecture = auto
# Misc options
#UseSyslog
#Color
#TotalDownload
#NoProgressBar
# We cannot check disk space from within a chroot environment
#CheckSpace
#VerbosePkgLists
ParallelDownloads = 4
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
@ -80,10 +81,6 @@ Include = /etc/pacman.d/mirrorlist
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

View file

@ -8,6 +8,9 @@
# use extra packages as defined in pkglist to activate a full profile
# extra="false"
# use office installer module
# office_installer="false"
################ install ################
# default displaymanager: none
@ -74,3 +77,5 @@
# names must match systemd service names
# services in enable_systemd array don't need to be listed here
# enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
# disable_systemd_live=()

View file

@ -117,12 +117,54 @@ _verify_signature() {
return ${_status}
}
_find_dev_by_path () {
local path="${1}"
local tmp_mnt=/tmp_mnt
local _mnt
local a d
local device
[[ "$path" ]] || return 1
mkdir -p "${tmp_mnt}"
for a in 1 2 3; do
for d in $(awk '{ print "/dev/"$4 }' /proc/partitions); do
# If the device is already mounted, it shouldn't be
# unmounted after the check.
grep -q "^$d " /proc/mounts && {
_mnt=$(grep "^$d " /proc/mounts | cut -d ' ' -f 2)
unmount=
} || {
mount -r -t auto "${d}" "${tmp_mnt}" 2> /dev/null || continue
_mnt="${tmp_mnt}"
unmount=true
}
# File exists in $d. Save $d on $device.
[[ -f "${_mnt}/${path}" ]] && device="${d}"
[[ "${unmount}" ]] && umount "${tmp_mnt}" 2> /dev/null || true
[[ "${device}" ]] && {
echo "${device}"
return
}
done
sleep 1
done
return 1
}
run_hook() {
[[ -z "${arch}" ]] && arch="$(uname -m)"
[[ -z "${copytoram_size}" ]] && copytoram_size="75%"
[[ -z "${misobasedir}" ]] && misobasedir="manjaro"
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="arch"
[[ -z "${dm_snap_prefix}" ]] && dm_snap_prefix="manjaro"
misodevice=$(_find_dev_by_path /.miso)
[[ -z "${misodevice}" ]] && misodevice="/dev/disk/by-label/${misolabel}"
[[ -z "${cow_spacesize}" ]] && cow_spacesize="256M"
[[ -z "${overlay_root_size}" ]] && overlay_root_size="75%"

View file

@ -45,6 +45,12 @@ run_hook () {
[[ -z "${img_flags}" ]] && img_flags="defaults"
if [[ "${img_loop}" ]]; then
img_dev=$(find_dev_by_path "${img_loop}")
if [[ -z "${img_dev}" ]]; then
[[ -b "/dev/disk/by-label/${img_label}" ]] &&
img_dev="/dev/disk/by-label/${img_label}"
fi
mount_handler="miso_loop_mount_handler"
fi
}

View file

@ -1,6 +1,6 @@
run_cleanuphook() {
rm -rf /usr/lib/modules
cp -ax / /run/initramfs
cp -ax /. /run/initramfs
}
# vim: set ft=sh ts=4 sw=4 et:

View file

@ -18,7 +18,7 @@ prepare_initcpio(){
prepare_initramfs(){
cp ${DATADIR}/mkinitcpio.conf $1/etc/mkinitcpio-${iso_name}.conf
local _kernver=$(cat $1/usr/lib/modules/*/version)
local _kernver=$(cat $1/usr/lib/modules/*/kernelbase | awk -F'-' '{print $1}')
if [[ -n ${gpgkey} ]]; then
su ${OWNER} -c "gpg --export ${gpgkey} >${USERCONFDIR}/gpgkey"
exec 17<>${USERCONFDIR}/gpgkey
@ -39,10 +39,9 @@ prepare_initramfs(){
prepare_boot_extras(){
cp $1/boot/amd-ucode.img $2/amd_ucode.img
cp $1/boot/intel-ucode.img $2/intel_ucode.img
cp $1/usr/share/licenses/amd-ucode/LICENSE $2/amd_ucode.LICENSE
cp $1/usr/share/licenses/intel-ucode/LICENSE $2/intel_ucode.LICENSE
cp $1/usr/share/licenses/amd-ucode/LIC* $2/amd_ucode.LICENSE
cp $1/usr/share/licenses/intel-ucode/LIC* $2/intel_ucode.LICENSE
cp $1/boot/memtest86+/memtest.bin $2/memtest
cp $1/usr/share/licenses/common/GPL2/license.txt $2/memtest.COPYING
}
prepare_grub(){

View file

@ -33,6 +33,11 @@ add_svc_sd(){
msg2 "Setting %s ..." "$2"
chroot $1 systemctl enable $2 &>/dev/null
fi
if [[ -f $1/etc/systemd/system/$2 ]] || \
[[ -f $1/usr/lib/systemd/system/$2 ]]; then
msg2 "Setting %s ..." "$2"
chroot $1 systemctl enable $2 &>/dev/null
fi
}
set_xdm(){
@ -46,19 +51,6 @@ configure_mhwd_drivers(){
local path=$1${mhwd_repo}/ \
drv_path=$1/var/lib/mhwd/db/pci/graphic_drivers
info "Configuring mhwd db ..."
if [ -z "$(ls $path | grep catalyst-utils 2> /dev/null)" ]; then
msg2 "Disabling Catalyst driver"
mkdir -p $drv_path/catalyst/
echo "" > $drv_path/catalyst/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-340xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 340xx driver"
mkdir -p $drv_path/nvidia-340xx/
echo "" > $drv_path/nvidia-340xx/MHWDCONFIG
msg2 "Disabling Nvidia 340xx Bumblebee driver"
mkdir -p $drv_path/hybrid-intel-nvidia-340xx-bumblebee/
echo "" > $drv_path/hybrid-intel-nvidia-340xx-bumblebee/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-390xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 390xx driver"
mkdir -p $drv_path/nvidia-390xx/
@ -67,47 +59,27 @@ configure_mhwd_drivers(){
mkdir -p $drv_path/hybrid-intel-nvidia-390xx-bumblebee/
echo "" > $drv_path/hybrid-intel-nvidia-390xx-bumblebee/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-418xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 418xx driver"
mkdir -p $drv_path/nvidia-418xx/
echo "" > $drv_path/nvidia-418xx/MHWDCONFIG
msg2 "Disabling Nvidia 418xx Bumblebee driver"
mkdir -p $drv_path/hybrid-intel-nvidia-418xx-bumblebee/
echo "" > $drv_path/hybrid-intel-nvidia-418xx-bumblebee/MHWDCONFIG
if [ -z "$(ls $path | grep nvidia-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia driver"
mkdir -p $drv_path/nvidia/
echo "" > $drv_path/nvidia/MHWDCONFIG
msg2 "Disabling Nvidia AMD Prime driver"
mkdir -p $drv_path/hybrid-amd-nvidia-prime/
echo "" > $drv_path/hybrid-amd-nvidia-prime/MHWDCONFIG
msg2 "Disabling Nvidia Intel Prime driver"
mkdir -p $drv_path/hybrid-intel-nvidia-prime/
echo "" > $drv_path/hybrid-intel-nvidia-prime/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-430xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 430xx driver"
mkdir -p $drv_path/nvidia-430xx/
echo "" > $drv_path/nvidia-430xx/MHWDCONFIG
msg2 "Disabling Nvidia 430xx Bumblebee driver"
mkdir -p $drv_path/hybrid-intel-nvidia-430xx-bumblebee/
echo "" > $drv_path/hybrid-intel-nvidia-430xx-bumblebee/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-435xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 435xx driver"
mkdir -p $drv_path/nvidia-435xx/
echo "" > $drv_path/nvidia-435xx/MHWDCONFIG
msg2 "Disabling Nvidia 435xx Prime driver"
mkdir -p $drv_path/hybrid-intel-nvidia-435xx-prime/
echo "" > $drv_path/hybrid-intel-nvidia-435xx-prime/MHWDCONFIG
fi
if [ -z "$(ls $path | grep nvidia-440xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 440xx driver"
mkdir -p $drv_path/nvidia-440xx/
echo "" > $drv_path/nvidia-440xx/MHWDCONFIG
msg2 "Disabling Nvidia 440xx Prime driver"
mkdir -p $drv_path/hybrid-intel-nvidia-440xx-prime/
echo "" > $drv_path/hybrid-intel-nvidia-440xx-prime/MHWDCONFIG
fi
if [ -z "$(ls $path | grep xf86-video-amdgpu 2> /dev/null)" ]; then
msg2 "Disabling AMD gpu driver"
mkdir -p $drv_path/xf86-video-amdgpu/
echo "" > $drv_path/xf86-video-amdgpu/MHWDCONFIG
fi
if [ -z "$(ls $path | grep virtualbox-guest-modules 2> /dev/null)" ]; then
msg2 "Disabling VirtualBox guest driver"
mkdir -p $drv_path/virtualbox/
echo "" > $drv_path/virtualbox/MHWDCONFIG
if [ -z "$(ls $path | grep nvidia-470xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 470xx driver"
mkdir -p $drv_path/nvidia-470xx/
echo "" > $drv_path/nvidia-470xx/MHWDCONFIG
msg2 "Disabling Nvidia 470xx AMD Prime driver"
mkdir -p $drv_path/hybrid-amd-nvidia-470xx-prime/
echo "" > $drv_path/hybrid-amd-nvidia-470xx-prime/MHWDCONFIG
msg2 "Disabling Nvidia 470xx Intel Prime driver"
mkdir -p $drv_path/hybrid-intel-nvidia-470xx-prime/
echo "" > $drv_path/hybrid-intel-nvidia-470xx-prime/MHWDCONFIG
fi
local drv_path=$1/var/lib/mhwd/db/pci/network_drivers
if [ -z "$(ls $path | grep broadcom-wl 2> /dev/null)" ]; then
@ -130,12 +102,12 @@ configure_mhwd_drivers(){
configure_lsb(){
if [ -e $1/etc/lsb-release ] ; then
msg2 "Configuring lsb-release"
sed -i -e "s/^.*DISTRIB_RELEASE.*/DISTRIB_RELEASE=${dist_release}/" $1/etc/lsb-release
sed -i -e "s/^.*DISTRIB_CODENAME.*/DISTRIB_CODENAME=${dist_codename}/" $1/etc/lsb-release
sed -i -e "s/^.*DISTRIB_RELEASE.*/DISTRIB_RELEASE=\"${dist_release}\"/" $1/etc/lsb-release
sed -i -e "s/^.*DISTRIB_CODENAME.*/DISTRIB_CODENAME=\"${dist_codename}\"/" $1/etc/lsb-release
fi
}
configure_branding(){
configure_branding_old(){
msg2 "Configuring branding"
echo "---
componentName: manjaro
@ -217,6 +189,17 @@ images:
# installer is actually writing to disk and doing other slow things).
slideshow: "show.qml"
# There are two available APIs for the slideshow:
# - 1 (the default) loads the entire slideshow when the installation-
# slideshow page is shown and starts the QML then. The QML
# is never stopped (after installation is done, times etc.
# continue to fire).
# - 2 loads the slideshow on startup and calls onActivate() and
# onLeave() in the root object. After the installation is done,
# the show is stopped (first by calling onLeave(), then destroying
# the QML components).
slideshowAPI: 1
# Colors for text and background components.
#
# - sidebarBackground is the background of the sidebar
@ -232,6 +215,261 @@ style:
sidebarTextHighlight: "\"${sidebartexthighlight}"\"" > $1/usr/share/calamares/branding/manjaro/branding.desc
}
configure_branding(){
msg2 "Configuring branding"
echo "# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Product branding information. This influences some global
# user-visible aspects of Calamares, such as the product
# name, window behavior, and the slideshow during installation.
#
# Additional styling can be done using the stylesheet.qss
# file, also in the branding directory.
---
componentName: manjaro
### WELCOME / OVERALL WORDING
#
# These settings affect some overall phrasing and looks,
# which are most visible in the welcome page.
# This selects between different welcome texts. When false, uses
# the traditional "Welcome to the %1 installer.", and when true,
# uses "Welcome to the Calamares installer for %1." This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: ${welcomestyle}
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: ${welcomelogo}
### WINDOW CONFIGURATION
#
# The settings here affect the placement of the Calamares
# window through hints to the window manager and initial
# sizing of the Calamares window.
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", don't expand automatically, use *windowSize*
windowExpanding: ${windowexp}
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: ${windowsize}
# Placement of Calamares window. Either "center" or "free".
# Whether "center" actually works does depend on the window
# manager in use (and only makes sense if you're not using
# *windowExpanding* set to "fullscreen").
windowPlacement: ${windowplacement}
### PANELS CONFIGURATION
#
# Calamares has a main content area, and two panels (navigation
# and progress / sidebar). The panels can be controlled individually,
# or switched off. If both panels are switched off, the layout of
# the main content area loses its margins, on the assumption that
# you're doing something special.
# Kind of sidebar (panel on the left, showing progress).
# - "widget" or unset, use traditional sidebar (logo, items)
# - "none", hide it entirely
# - "qml", use calamares-sidebar.qml from branding folder
# In addition, you **may** specify a side, separated by a comma,
# from the kind. Valid sides are:
# - "left" (if not specified, uses this)
# - "right"
# - "top"
# - "bottom"
# For instance, "widget,right" is valid; so is "qml", which defaults
# to putting the sidebar on the left. Also valid is "qml,top".
# While "widget,top" is valid, the widgets code is **not** flexible
# and results will be terrible.
sidebar: qml
# Kind of navigation (button panel on the bottom).
# - "widget" or unset, use traditional navigation
# - "none", hide it entirely
# - "qml", use calamares-navigation.qml from branding folder
# In addition, you **may** specify a side, separated by a comma,
# from the kind. The same sides are valid as for *sidebar*,
# except the default is *bottom*.
navigation: widget
### STRINGS, IMAGES AND COLORS
#
# This section contains the "branding proper" of names
# and images, rather than global-look settings.
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
#
# These strings support substitution from /etc/os-release
# if KDE Frameworks 5.58 are available at build-time. When
# enabled, @{var-name} is replaced by the equivalent value
# from os-release. All the supported var-names are in all-caps,
# and are listed on the FreeDesktop.org site,
# https://www.freedesktop.org/software/systemd/man/os-release.html
# Note that ANSI_COLOR and CPE_NAME don't make sense here, and
# are not supported (the rest are). Remember to quote the string
# if it contains substitutions, or you'll get YAML exceptions.
#
# The *Url* entries are used on the welcome page, and they
# are visible as buttons there if the corresponding *show* keys
# are set to "true" (they can also be overridden).
strings:
productName: ${dist_name} Linux
shortProductName: ${dist_name}
version: ${dist_release}
shortVersion: ${dist_release}
versionedName: ${dist_name} Linux ${dist_release} "\"${dist_codename}"\"
shortVersionedName: ${dist_name} ${dist_release}
bootloaderEntryName: ${dist_name}
# These images are loaded from the branding module directory.
#
# productBanner is an optional image, which if present, will be shown
# on the welcome page of the application, above the welcome text.
# It is intended to have a width much greater than height.
# It is displayed at 64px height (also on HiDPI).
# Recommended size is 64px tall, and up to 460px wide.
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWallpaper is an optional image, which if present, will replace
# the normal solid background on every page of the application.
# It can be any size and proportion,
# and will be tiled to fit the entire window.
# For a non-tiled wallpaper, the size should be the same as
# the overall window, see *windowSize* above (800x520).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use 'welcomeExpandingLogo' to make it non-scaled.
# Recommended size is 320x150.
#
# These filenames can also use substitutions from os-release (see above).
images:
# productBanner: "banner.png"
productIcon: "logo_small.svg"
productLogo: "logo.svg"
# productWallpaper: "wallpaper.png"
productWelcome: "welcome/mascot.svg"
# Colors for text and background components.
#
# - SidebarBackground is the background of the sidebar
# - SidebarText is the (foreground) text color
# - SidebarBackgroundCurrent sets the background of the current step.
# Optional, and defaults to the application palette.
# - SidebarTextCurrent is the text color of the current step.
#
# These colors can **also** be set through the stylesheet, if the
# branding component also ships a stylesheet.qss. Then they are
# the corresponding CSS attributes of #sidebarApp.
style:
sidebarBackground: "\"${sidebarbackground}"\"
sidebarText: "\"${sidebartext}"\"
sidebarTextSelect: "\"${sidebartextselect}"\"
sidebarTextHighlight: "\"${sidebartexthighlight}"\"
SidebarBackground: "\"${sidebarbackground}"\"
SidebarText: "\"${sidebartext}"\"
SidebarTextSelect: "\"${sidebartextselect}"\"
SidebarBackgroundCurrent: "\"${sidebartexthighlight}"\"
### SLIDESHOW
#
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
# The slideshow can be a QML file (recommended) which can display
# arbitrary things -- text, images, animations, or even play a game --
# during the execution step. The QML **is** abruptly stopped when the
# execution step is done, though, so maybe a game isn't a great idea.
#
# The slideshow can also be a sequence of images (not recommended unless
# you don't want QML at all in your Calamares). The images are displayed
# at a rate of 1 every 2 seconds during the execution step.
#
# To configure a QML file, list a single filename:
# slideshow: "show.qml"
# To configure images, like the filenames (here, as an inline list):
# slideshow: [ "/etc/calamares/slideshow/0.png", "/etc/logo.png" ]
slideshow: "slideshow/SlideShow.qml"
# There are two available APIs for a QML slideshow:
# - 1 (the default) loads the entire slideshow when the installation-
# slideshow page is shown and starts the QML then. The QML
# is never stopped (after installation is done, times etc.
# continue to fire).
# - 2 loads the slideshow on startup and calls onActivate() and
# onLeave() in the root object. After the installation is done,
# the show is stopped (first by calling onLeave(), then destroying
# the QML components).
#
# An image slideshow does not need to have the API defined.
slideshowAPI: 2
# These options are to customize online uploading of logs to pastebins:
# - type : Defines the kind of pastebin service to be used. Currently
# it accepts two values:
# - none : disables the pastebin functionality
# - fiche : use fiche pastebin server
# - url : Defines the address of pastebin service to be used.
# Takes string as input. Important bits are the host and port,
# the scheme is not used.
# - sizeLimit : Defines maximum size limit (in KiB) of log file to be pasted.
# The option must be set, to have the log option work.
# Takes integer as input. If < 0, no limit will be forced,
# else only last (approximately) 'n' KiB of log file will be pasted.
# Please note that upload size may be slightly over the limit (due
# to last minute logging), so provide a suitable value.
uploadServer :
type : "fiche"
url : "http://termbin.com:9999"
sizeLimit : -1" > $1/usr/share/calamares/branding/manjaro/branding.desc
}
configure_polkit_user_rules(){
msg2 "Configuring polkit user rules"
echo "/* Stop asking the user for a password while they are in a live session
*/
polkit.addRule(function(action, subject) {
if (subject.user == \"${username}\")
{
return polkit.Result.YES;
}
});" > $1/etc/polkit-1/rules.d/49-nopasswd-live.rules
}
configure_logind(){
msg2 "Configuring logind ..."
local conf=$1/etc/systemd/logind.conf
@ -246,14 +484,20 @@ configure_journald(){
sed -i 's/#\(Storage=\)auto/\1volatile/' "$conf"
}
disable_srv_live(){
for srv in ${disable_systemd_live[@]}; do
enable_systemd_live=(${enable_systemd_live[@]//*$srv*})
done
}
configure_services(){
info "Configuring services"
use_apparmor="false"
apparmor_boot_args=""
for svc in ${enable_systemd[@]}; do
add_svc_sd "$1" "$svc"
[[ "$svc" == "apparmor" ]] && use_apparmor="true"
done
enable_systemd_live=(${enable_systemd_live[@]} ${enable_systemd[@]})
[[ ! -z $disable_systemd_live ]] && disable_srv_live
for svc in ${enable_systemd_live[@]}; do
add_svc_sd "$1" "$svc"
[[ "$svc" == "apparmor" ]] && use_apparmor="true"

View file

@ -59,11 +59,29 @@ mount_fs_net(){
track_fs -t overlay overlay -olowerdir="${work_dir}/livefs":"${work_dir}/rootfs",upperdir="$1",workdir="${mnt_dir}/work" "$1"
}
check_umount() {
if mountpoint -q "$1"
then
umount -l "$1"
fi
}
umount_fs(){
if [[ -n ${FS_ACTIVE_MOUNTS[@]} ]]; then
info "overlayfs umount: [%s]" "${FS_ACTIVE_MOUNTS[@]}"
umount "${FS_ACTIVE_MOUNTS[@]}"
#umount "${FS_ACTIVE_MOUNTS[@]}"
for i in "${FS_ACTIVE_MOUNTS[@]}"
do
info "umount overlayfs: [%s]" "$i"
check_umount $i
done
unset FS_ACTIVE_MOUNTS
rm -rf "${mnt_dir}/work"
fi
mount_folders=$(grep "${work_dir}" /proc/mounts | awk '{print$2}' | sort -r)
for i in $mount_folders
do
info "umount folder: [%s]" "$i"
check_umount $i
done
}

View file

@ -187,7 +187,7 @@ assemble_iso(){
-e --interval:appended_partition_2:all:: \
-no-emul-boot \
-full-iso9660-filenames \
-iso-level 3 \
-iso-level 3 -rock -joliet \
-o ${iso_dir}/${iso_file} \
${iso_root}/
}
@ -198,6 +198,10 @@ make_iso() {
touch "${iso_root}/.miso"
for sfs_dir in $(find "${work_dir}" -maxdepth 1 -type d); do
if [[ "${sfs_dir}" != "${work_dir}" ]]; then
if [[ -e "${sfs_dir}"/etc/pacman.d/gnupg ]]; then
msg2 "Removing '/etc/pacman.d/gnupg' folder from ${sfs_dir}"
rm -rf "${sfs_dir}"/etc/pacman.d/gnupg
fi
make_sfs "${sfs_dir}"
fi
done
@ -215,31 +219,38 @@ make_iso() {
fi
assemble_iso
[[ ${target_branch} == "stable" ]] && [[ ${extra} == "true" ]] && gen_latest_html
${permalink} && gen_permalink
msg "Done [Build ISO]"
}
gen_latest_html(){
gen_permalink(){
if [[ ${edition} == "community" ]] || [[ ${edition} == "manjaro" ]]; then
if [[ -f "${iso_dir}/${iso_file}" ]]; then
msg2 "Creating download link ..."
if [[ -f "${iso_dir}/${iso_file}" ]]; then
msg2 "Creating download link ..."
direct_url="https://osdn.net/dl/${edition}/${iso_file}"
[[ ${edition} == "community" ]] && direct_url="https://osdn.net/dl/manjaro-${edition}/${iso_file}"
html_doc="<!DOCTYPE HTML>"
html_doc+="<meta charset=\"UTF-8\">"
html_doc+="<meta http-equiv=\"refresh\" content=\"1; url=${direct_url}\">"
html_doc+="<script>window.location.href=\"${direct_url}\"</script>"
html_doc+="<title>Download Redirection</title>"
html_doc+="If you are not redirected automatically, follow the <a href=\"${direct_url}\">link to latest iso</a>"
echo ${html_doc} > "${iso_dir}/.latest"
[[ ${edition} == "community" ]] && direct_url="https://osdn.net/dl/manjaro-${edition}/${iso_file}"
## html permalink
html_doc="<!DOCTYPE HTML>"
html_doc+="<meta charset=\"UTF-8\">"
html_doc+="<meta http-equiv=\"refresh\" content=\"1; url=${direct_url}\">"
html_doc+="<script>window.location.href=\"${direct_url}\"</script>"
html_doc+="<title>Download Redirection</title>"
html_doc+="If you are not redirected automatically, follow the <a href=\"${direct_url}\">link to latest iso</a>"
## php permalink
php_doc="<?php "
php_doc+="header('Location: ' . '${direct_url}', true, 303); "
php_doc+="die(); "
php_doc+="?>"
echo ${php_doc} > "${iso_dir}/.latest.php"
fi
## write files
if [[ ${extra} == "true" ]]; then
echo ${html_doc} > "${iso_dir}/.latest"
echo ${php_doc} > "${iso_dir}/.latest.php"
else
echo ${html_doc} > "${iso_dir}/.latest-minimal"
echo ${php_doc} > "${iso_dir}/.latest-minimal.php"
fi
fi
fi
}
@ -347,15 +358,21 @@ make_image_desktop() {
cp "${path}/desktopfs-pkgs.txt" ${iso_dir}/$(gen_iso_fn)-pkgs.txt
[[ -e ${profile_dir}/desktop-overlay ]] && copy_overlay "${profile_dir}/desktop-overlay" "${path}"
if [[ ${profile} != "architect" && ${oem_used} != "false" ]]; then
if [[ -e "${path}/usr/share/calamares/branding/manjaro/calamares-sidebar.qml" ]]; then
configure_branding "${path}"
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
elif [[ -e "${path}/usr/share/calamares/branding/manjaro/show.qml" ]]; then
configure_branding_old "${path}"
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
fi
reset_pac_conf "${path}"
seed_snaps ${path}
echo "Enable os-prober"
sed -i -e 's,.*GRUB_DISABLE_OS_PROBER=.*,GRUB_DISABLE_OS_PROBER=false,' "${path}/etc/default/grub"
umount_fs
clean_up_image "${path}"
: > ${work_dir}/build.${FUNCNAME}
@ -385,17 +402,27 @@ make_image_live() {
copy_overlay "${profile_dir}/live-overlay" "${path}"
configure_live_image "${path}"
if [[ ${profile} != "architect" ]]; then
# mask some systemd targets on live-session
mkdir -p "${path}"/etc/systemd/system
ln -sfv /dev/null "${path}"/etc/systemd/system/sleep.target
ln -sfv /dev/null "${path}"/etc/systemd/system/suspend.target
ln -sfv /dev/null "${path}"/etc/systemd/system/hibernate.target
ln -sfv /dev/null "${path}"/etc/systemd/system/hybrid-sleep.target
if [[ -e "${path}/usr/share/calamares/branding/manjaro/calamares-sidebar.qml" ]]; then
configure_branding "${path}"
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
elif [[ -e "${path}/usr/share/calamares/branding/manjaro/show.qml" ]]; then
configure_branding_old "${path}"
msg "Done [Distribution: Release ${dist_release} Codename ${dist_codename}]"
fi
configure_polkit_user_rules "${path}"
reset_pac_conf "${path}"
umount_fs
# Clean up GnuPG keys
rm -rf "${path}/etc/pacman.d/gnupg"
clean_up_image "${path}"
: > ${work_dir}/build.${FUNCNAME}
msg "Done [Live installation] (livefs)"
@ -612,7 +639,8 @@ load_profile(){
iso_file=$(gen_iso_fn).iso
iso_label=$(get_iso_label "${dist_branding}_${profile}_${dist_release//.}")
[[ ${extra} == 'false' ]] && _edition=("m")
iso_label=$(get_iso_label "${dist_branding}_${profile}${_edition}_${dist_release//.}")
mkchroot_args+=(-C ${pacman_conf} -S ${mirrors_conf} -B "${build_mirror}/${target_branch}" -K)
work_dir=${chroots_iso}/${profile}/${target_arch}

View file

@ -45,33 +45,31 @@ chroot_part_mount() {
}
select_os(){
local os_list=( $(detect) ) count=${#os_list[@]}
local detected_os_list=( $(detect) ) os_list=() count select os_str os_root
for os in ${detected_os_list[@]}; do
case ${os##*:} in
'linux') os_list+=($os)
esac
done
count=${#os_list[@]}
if [[ ${count} < 1 ]]; then
die "No Linux partitions detected!"
fi
if [[ ${count} > 1 ]]; then
msg "Detected systems:"
local i=0
for os in ${os_list[@]}; do
local last=${os##*:}
case $last in
'efi') count=$((count-1)) ;;
*) info "$i) $(get_os_name $os)"; i=$((i+1)) ;;
esac
done
i=0
msg "Detected systems:"
local i=0
for os in ${os_list[@]}; do
info "$i) $(get_os_name $os)"; i=$((i+1))
done
msg "Select system to mount [0-%s] : " "$((count-1))"
read select
else
read select
else
select=0
fi
local os_str=${os_list[$select]} type
type=$os_str
root=${os_str%%:*}
type=${type##*:}
if [[ "${type##*:}" == 'linux' ]]; then
msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$root"
chroot_mount_partitions "$1" "$root"
else
die "You can't mount %s!" "$select"
fi
os_str=${os_list[$select]}
os_root=${os_str%%:*}
msg "Mounting (%s) [%s]" "$(get_os_name $os_str)" "$os_root"
chroot_mount_partitions "$1" "$os_root"
}
chroot_mount_partitions(){

View file

@ -9,22 +9,25 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
local MINIMAL
connect(){
${alt_storage} && server="storage-in" || server="storage"
local storage="@${server}.osdn.net:/storage/groups/m/ma/"
echo "${account}${storage}${project}"
}
connect_webserver(){
local webserver="@shell.osdn.net:/home/groups/m/ma/"
echo "${account}${webserver}${project}"
connect_shell(){
local shell="@shell.osdn.net:/home/groups/m/ma/"
echo "${account}${shell}${project}"
}
make_torrent(){
find ${src_dir} -type f -name "*.torrent" -delete
if [[ -n $(find ${src_dir} -type f -name "*.iso") ]]; then
for iso in $(ls ${src_dir}/*.iso); do
isos=$(ls ${src_dir}/*.iso)
for iso in ${isos}; do
local seed=https://${host}/dl/${project}/${iso##*/}
local mktorrent_args=(-c "${torrent_meta}" -p -l ${piece_size} -a ${tracker_url} -w ${seed})
${verbose} && mktorrent_args+=(-v)
@ -41,6 +44,9 @@ prepare_transfer(){
[[ -z ${project} ]] && project="$(get_project)"
server=$(connect)
webshell=$(connect_shell)
htdocs="htdocs/${profile}"
target_dir="${profile}/${dist_release}"
src_dir="${run_dir}/${edition}/${target_dir}"
@ -80,15 +86,17 @@ sync_dir(){
msg "Start upload [%s] to [%s] ..." "$1" "${project}"
while [[ $count -le $max_count ]]; do
rsync ${rsync_args[*]} --exclude '.latest*' ${src_dir}/ ${server}/${target_dir}/
rsync ${rsync_args[*]} --exclude '.latest*' --exclude 'index.html' --exclude 'links.txt' ${src_dir}/ ${server}/${target_dir}/
if [[ $? != 0 ]]; then
count=$(($count + 1))
msg "Upload failed. retrying (%s/%s) ..." "$count" "$max_count"
sleep 2
else
count=$(($max_count + 1))
[[ -f "${src_dir}/.latest" ]] && sync_latest_html
[[ -f "${src_dir}/.latest.php" ]] && sync_latest_php
${upd_homepage} && pull_hp_repo
${shell_upload} && upload_permalinks
msg "Done upload [%s]" "$1"
show_elapsed_time "${FUNCNAME}" "${timer_start}"
fi
@ -96,20 +104,158 @@ sync_dir(){
}
sync_latest_html(){
msg2 "Uploading url redirector ..."
local webserver=$(connect_webserver)
local htdocs="htdocs/${profile}"
local html="latest"
scp "${src_dir}/.${html}" "${webserver}/${htdocs}/${html}"
rm -f "${src_dir}/.${html}"
upload_permalinks(){
## permalinks for full ISO
if [[ -f "${src_dir}/.latest" ]]; then
msg "Uploading permalinks ..."
LATEST_ISO=$(sed -e 's/\"/\n/g' < "${src_dir}/.latest" | grep -Eo 'http.*iso$' -m1 | awk '{split($0,x,"/"); print x[6]}')
PKGLIST="${LATEST_ISO/.iso/-pkgs.txt}"
## upload redirector files
[[ -f "${src_dir}/.latest" ]] && sync_latest_html
[[ -f "${src_dir}/.latest.php" ]] && sync_latest_php
## upload verification files, torrent and package list
[[ -f "${src_dir}/${LATEST_ISO}.torrent" ]] && sync_latest_torrent
[[ -f "${src_dir}/${LATEST_ISO}.sig" ]] && sync_latest_signature
[[ -f "${src_dir}/${LATEST_ISO}.sha1" ]] && sync_latest_checksum_sha1
[[ -f "${src_dir}/${LATEST_ISO}.sha256" ]] && sync_latest_checksum_sha256
[[ -f "${src_dir}/${PKGLIST}" ]] && sync_latest_pkg_list
${upd_homepage} && upd_dl_checksum
fi
## permalinks for minimal ISO
if [[ -f "${src_dir}/.latest-minimal" ]]; then
msg "Uploading permalinks (minimal) ..."
MINIMAL="yes"
LATEST_ISO=$(sed -e 's/\"/\n/g' < "${src_dir}/.latest-minimal" | grep -Eo 'http.*iso$' -m1 | awk '{split($0,x,"/"); print x[6]}')
PKGLIST="${LATEST_ISO/.iso/-pkgs.txt}"
## upload redirector files
[[ -f "${src_dir}/.latest-minimal" ]] && sync_latest_html
[[ -f "${src_dir}/.latest-minimal.php" ]] && sync_latest_php
## upload verification files, torrent and package list
[[ -f "${src_dir}/${LATEST_ISO}.torrent" ]] && sync_latest_torrent
[[ -f "${src_dir}/${LATEST_ISO}.sig" ]] && sync_latest_signature
[[ -f "${src_dir}/${LATEST_ISO}.sha1" ]] && sync_latest_checksum_sha1
[[ -f "${src_dir}/${LATEST_ISO}.sha256" ]] && sync_latest_checksum_sha256
[[ -f "${src_dir}/${PKGLIST}" ]] && sync_latest_pkg_list
${upd_homepage} && upd_dl_checksum_minimal
fi
${upd_homepage} && upd_dl_version && push_hp_repo
}
sync_latest_pkg_list(){
msg2 "Uploading package list ..."
local pkglist="latest-pkgs.txt"
[[ ${MINIMAL} == "yes" ]] && pkglist="latest-minimal-pkgs.txt"
chmod g+w "${src_dir}/${PKGLIST}"
scp -p "${src_dir}/${PKGLIST}" "${webshell}/${htdocs}/${pkglist}"
}
sync_latest_checksum_sha256(){
msg2 "Uploading sha256 checksum file ..."
local filename="${LATEST_ISO}.sha256"
local checksum_file="latest.sha256"
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha256"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
}
sync_latest_checksum_sha1(){
msg2 "Uploading sha1 checksum file ..."
local filename="${LATEST_ISO}.sha1"
local checksum_file="latest.sha1"
[[ ${MINIMAL} == "yes" ]] && checksum_file="latest-minimal.sha1"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${checksum_file}"
}
sync_latest_signature(){
msg2 "Uploading signature file ..."
local filename="${LATEST_ISO}.sig"
local signature="latest.sig"
[[ ${MINIMAL} == "yes" ]] && signature="latest-minimal.sig"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${signature}"
}
sync_latest_torrent(){
msg2 "Uploading torrent file ..."
local filename="${LATEST_ISO}.torrent"
local torrent="latest.torrent"
[[ ${MINIMAL} == "yes" ]] && torrent="latest-minimal.torrent"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/${filename}" "${webshell}/${htdocs}/${torrent}"
}
sync_latest_php(){
msg2 "Uploading php redirector ..."
local webserver=$(connect_webserver)
local htdocs="htdocs/${profile}"
local filename=".latest.php"
local php="latest.php"
scp "${src_dir}/.${php}" "${webserver}/${htdocs}/${php}"
rm -f "${src_dir}/.${php}"
[[ ${MINIMAL} == "yes" ]] && filename=".latest-minimal.php" && php="latest-minimal.php"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/.${php}" "${webshell}/${htdocs}/${php}"
}
sync_latest_html(){
msg2 "Uploading url redirector ..."
local filename=".latest"
local html="latest"
[[ ${MINIMAL} == "yes" ]] && filename=".latest-minimal" && html="latest-minimal"
chmod g+w "${src_dir}/${filename}"
scp -p "${src_dir}/.${html}" "${webshell}/${htdocs}/${html}"
}
pull_hp_repo(){
load_vars "$USER_HOME/.makepkg.conf" || load_vars /etc/makepkg.conf
[[ -z $SRCDEST ]] && SRCDEST=${cache_dir}
hp_repo=manjaro-homepage
[[ ${edition} == "manjaro" ]] && _edition="official" || _edition=${edition}
dl_file="${SRCDEST}/${hp_repo}/site/content/downloads/${_edition}/${profile}.md"
cd "${SRCDEST}"
if [[ ! -d "${hp_repo}" ]]; then
msg "Cloning manjaro.org"
git clone "ssh://git@gitlab.manjaro.org:22277/webpage/${hp_repo}.git"
else
cd "${hp_repo}"
msg "Pulling manjaro.org"
git pull
fi
}
push_hp_repo(){
cd "${SRCDEST}/${hp_repo}"
msg "Updating manjaro.org"
git add ${dl_file}
git commit -m "update download ${profile}"
git push
}
upd_dl_checksum(){
local checksum=$(cat "${src_dir}/${LATEST_ISO}.sha1" | cut -d' ' -f1)
msg "Updating download page:"
msg2 "checksum > ${checksum}"
sed -i "/Download_x64_Checksum/c\Download_x64_Checksum = \"${checksum}\"" ${dl_file}
}
upd_dl_checksum_minimal(){
local checksum=$(cat "${src_dir}/${LATEST_ISO}.sha1" | cut -d' ' -f1)
msg "Updating download page:"
msg2 "checksum_minimal > ${checksum}"
sed -i "/Download_Minimal_x64_Checksum/c\Download_Minimal_x64_Checksum = \"${checksum}\"" ${dl_file}
}
upd_dl_version(){
timestamp=$(date -u +%Y-%m-%dT%T%Z)
msg2 "Version > ${dist_release}"
sed -i "/Version/c\Version = \"${dist_release}\"" ${dl_file}
msg2 "date > ${timestamp}"
sed -i "/^date/c\date = \"${timestamp}\"" ${dl_file}
}

View file

@ -10,7 +10,7 @@
# GNU General Public License for more details.
write_machineid_conf(){
local conf="${modules_dir}/machineid.conf"
local conf="${etc_config_dir}/machineid.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
echo "systemd: true" >> $conf
@ -20,7 +20,7 @@ write_machineid_conf(){
write_finished_conf(){
msg2 "Writing %s ..." "finished.conf"
local conf="${modules_dir}/finished.conf" cmd="systemctl reboot"
local conf="${etc_config_dir}/finished.conf" cmd="systemctl reboot"
echo '---' > "$conf"
echo 'restartNowEnabled: true' >> "$conf"
echo 'restartNowChecked: false' >> "$conf"
@ -42,7 +42,7 @@ get_preset(){
}
write_bootloader_conf(){
local conf="${modules_dir}/bootloader.conf"
local conf="${etc_config_dir}/bootloader.conf"
msg2 "Writing %s ..." "${conf##*/}"
source "$(get_preset)"
echo '---' > "$conf"
@ -63,7 +63,7 @@ write_bootloader_conf(){
}
write_servicescfg_conf(){
local conf="${modules_dir}/servicescfg.conf"
local conf="${etc_config_dir}/servicescfg.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
echo '' >> "$conf"
@ -72,30 +72,67 @@ write_servicescfg_conf(){
}
write_services_conf(){
local conf="${modules_dir}/services.conf"
local conf="${etc_config_dir}/services.conf"
local check="${modules_dir}/services.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
echo '' >> "$conf"
echo 'services:' > "$conf"
for s in ${enable_systemd[@]}; do
echo " - name: $s" >> "$conf"
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
echo 'targets:' >> "$conf"
echo ' - name: "graphical"' >> "$conf"
if [ ! ${#enable_systemd[@]} -eq 0 ]; then
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
echo 'services:' >> "$conf"
else
echo 'units:' >> "$conf"
fi
for s in ${enable_systemd[@]}; do
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
echo " - name: $s" >> "$conf"
else
echo " - name: $s.service" >> "$conf"
echo ' action: "enable"' >> "$conf"
fi
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
fi
if [ ! ${#enable_systemd_timers[@]} -eq 0 ]; then
[ ! $(grep "timers:" ${check} | wc -l) -eq 0 ] && echo 'timers:' >> "$conf"
for s in ${enable_systemd_timers[@]}; do
if [ ! $(grep "timers:" ${check} | wc -l) -eq 0 ]; then
echo " - name: $s" >> "$conf"
else
echo " - name: $s.timer" >> "$conf"
echo ' action: "enable"' >> "$conf"
fi
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
fi
[ ! $(grep "targets:" ${check} | wc -l) -eq 0 ] && echo 'targets:' >> "$conf"
if [ ! $(grep "targets:" ${check} | wc -l) -eq 0 ]; then
echo ' - name: "graphical"' >> "$conf"
else
echo ' - name: "graphical.target"' >> "$conf"
echo ' action: "set-default"' >> "$conf"
fi
echo ' mandatory: true' >> "$conf"
echo '' >> "$conf"
echo 'disable:' >> "$conf"
for s in ${disable_systemd[@]}; do
echo " - name: $s" >> "$conf"
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
if [ ! ${#disable_systemd[@]} -eq 0 ]; then
[ ! $(grep "disable:" ${check} | wc -l) -eq 0 ] && echo 'disable:' >> "$conf"
for s in ${disable_systemd[@]}; do
if [ ! $(grep "services:" ${check} | wc -l) -eq 0 ]; then
echo " - name: $s" >> "$conf"
else
echo " - name: $s.service" >> "$conf"
echo ' action: "disable"' >> "$conf"
fi
echo ' mandatory: false' >> "$conf"
echo '' >> "$conf"
done
fi
}
write_displaymanager_conf(){
local conf="${modules_dir}/displaymanager.conf"
local conf="${etc_config_dir}/displaymanager.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "displaymanagers:" >> "$conf"
@ -110,14 +147,14 @@ write_displaymanager_conf(){
}
write_initcpio_conf(){
local conf="${modules_dir}/initcpio.conf"
local conf="${etc_config_dir}/initcpio.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "kernel: ${kernel}" >> "$conf"
}
write_unpack_conf(){
local conf="${modules_dir}/unpackfs.conf"
local conf="${etc_config_dir}/unpackfs.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "unpack:" >> "$conf"
@ -132,7 +169,7 @@ write_unpack_conf(){
}
write_users_conf(){
local conf="${modules_dir}/users.conf"
local conf="${etc_config_dir}/users.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "defaultGroups:" >> "$conf"
@ -144,6 +181,8 @@ write_users_conf(){
echo "autologinGroup: autologin" >> "$conf"
echo "doAutologin: false" >> "$conf" # can be either 'true' or 'false'
echo "sudoersGroup: wheel" >> "$conf"
echo "passwordRequirements:" >> "$conf"
echo " nonempty: true" >> "$conf" # can be either 'true' or 'false'
echo "setRootPassword: true" >> "$conf" # must be true, else some options get hidden
echo "doReusePassword: false" >> "$conf" # only used in old 'users' module
echo "availableShells: /bin/bash, /bin/zsh" >> "$conf" # only used in new 'users' module
@ -153,17 +192,42 @@ write_users_conf(){
fi
}
write_partition_conf(){
local conf="${etc_config_dir}/partition.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "efiSystemPartition: \"/boot/efi\"" >> "$conf"
echo "userSwapChoices:" >> "$conf"
echo " - none # Create no swap, use no swap" >> "$conf"
echo " - small # Up to 4GB" >> "$conf"
echo " - suspend # At least main memory size" >> "$conf"
echo " - file # To swap file instead of partition" >> "$conf"
echo "alwaysShowPartitionLabels: true" >> "$conf"
echo "# There are four options: erase, replace, alongside, manual)," >> "$conf"
echo "# the default is \"none\"." >> "$conf"
echo "initialPartitioningChoice: erase" >> "$conf"
echo "initialSwapChoice: none" >> "$conf"
echo "defaultFileSystemType: \"ext4\"" >> "$conf"
echo "availableFileSystemTypes: [\"ext4\",\"btrfs\",\"f2fs\",\"xfs\"]" >> "$conf"
}
write_packages_conf(){
local conf="${modules_dir}/packages.conf"
local conf="${etc_config_dir}/packages.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "backend: pacman" >> "$conf"
echo '' >> "$conf"
if ${needs_internet}; then
echo "skip_if_no_internet: false" >> "$conf"
else
echo "skip_if_no_internet: true" >> "$conf"
fi
echo "update_db: true" >> "$conf"
echo "update_system: true" >> "$conf"
}
write_welcome_conf(){
local conf="${modules_dir}/welcome.conf"
local conf="${etc_config_dir}/welcome.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf" >> "$conf"
echo "showSupportUrl: true" >> "$conf"
@ -184,7 +248,7 @@ write_welcome_conf(){
echo " - storage" >> "$conf"
echo " - ram" >> "$conf"
echo " - root" >> "$conf"
if ${netinstall}; then
if ${needs_internet}; then
echo " - internet" >> "$conf"
fi
if ${geoip}; then
@ -196,7 +260,7 @@ write_welcome_conf(){
}
write_mhwdcfg_conf(){
local conf="${modules_dir}/mhwdcfg.conf"
local conf="${etc_config_dir}/mhwdcfg.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "bus:" >> "$conf"
@ -223,7 +287,7 @@ write_mhwdcfg_conf(){
}
write_postcfg_conf(){
local conf="${modules_dir}/postcfg.conf"
local conf="${etc_config_dir}/postcfg.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "keyrings:" >> "$conf"
@ -251,14 +315,16 @@ get_yaml(){
}
write_netinstall_conf(){
local conf="${modules_dir}/netinstall.conf"
local conf="${etc_config_dir}/netinstall.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf"
echo "label:" >> "$conf"
echo " sidebar: \"${netinstall_label}\"" >> "$conf"
}
write_locale_conf(){
local conf="${modules_dir}/locale.conf"
local conf="${etc_config_dir}/locale.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo "---" > "$conf"
echo "localeGenPath: /etc/locale.gen" >> "$conf"
@ -288,21 +354,21 @@ write_settings_conf(){
echo " - locale" >> "$conf" && write_locale_conf
echo " - keyboard" >> "$conf"
fi
echo " - partition" >> "$conf"
echo " - partition" >> "$conf" && write_partition_conf
if ${oem_used}; then
msg2 "Skipping to show users module."
else
echo " - users" >> "$conf" && write_users_conf
fi
# WIP - OfficeChooser
if ${extra}; then
if ${oem_used}; then
msg2 "Skipping enabling PackageChooser module."
else
msg2 "Enabling PackageChooser module."
echo " - packagechooser" >> "$conf"
fi
if ${oem_used} || ! ${office_installer}; then
msg2 "Skipping enabling PackageChooser module."
else
msg2 "Enabling PackageChooser module."
echo " - packagechooser" >> "$conf"
fi
if ${netinstall}; then
echo " - netinstall" >> "$conf" && write_netinstall_conf
fi
@ -338,7 +404,10 @@ write_settings_conf(){
echo " - initcpio" >> "$conf" && write_initcpio_conf
if ${oem_used}; then
msg2 "Skipping to set users module."
echo " - oemuser" >> "$conf"
if ${set_oem_user}; then
msg2 "Setup OEM user."
echo " - oemuser" >> "$conf"
fi
else
echo " - users" >> "$conf"
fi
@ -370,12 +439,22 @@ write_settings_conf(){
fi
echo '' >> "$conf"
echo "dont-chroot: false" >> "$conf"
if ${oem_used}; then
echo "oem-setup: true" >> "$conf"
echo "disable-cancel: true" >> "$conf"
else
echo "oem-setup: false" >> "$conf"
echo "disable-cancel: false" >> "$conf"
fi
echo "disable-cancel-during-exec: true" >> "$conf"
echo "quit-at-end: false" >> "$conf"
}
configure_calamares(){
info "Configuring [Calamares]"
modules_dir=$1/etc/calamares/modules
prepare_dir "${modules_dir}"
etc_config_dir=$1/etc/calamares/modules
modules_dir=$1/usr/share/calamares/modules
prepare_dir "${etc_config_dir}"
write_settings_conf "$1"
info "Done configuring [Calamares]"
}

View file

@ -196,8 +196,10 @@ get_branch(){
# $1: chroot
# $2: branch
set_branch(){
info "Setting mirrorlist branch: %s" "$2"
sed -e "s|/stable|/$2|g" -i "$1/etc/pacman.d/mirrorlist"
if [[ $1 =~ "rootfs" ]]; then
info "Setting mirrorlist branch: %s" "$2"
sed -e "s|/stable|/$2|g" -i "$1/etc/pacman.d/mirrorlist"
fi
}
init_common(){
@ -211,7 +213,7 @@ init_common(){
[[ -z ${log_dir} ]] && log_dir='/var/log/manjaro-tools'
[[ -z ${build_mirror} ]] && build_mirror='https://manjaro.moson.eu'
[[ -z ${build_mirror} ]] && build_mirror='https://mirror.easyname.at/manjaro'
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
}
@ -339,7 +341,7 @@ init_calamares(){
[[ -z ${windowexp} ]] && windowexp=noexpand
[[ -z ${windowsize} ]] && windowsize="800px,520px"
[[ -z ${windowsize} ]] && windowsize="800px,560px"
[[ -z ${windowplacement} ]] && windowplacement="center"
@ -407,6 +409,7 @@ load_profile_config(){
[[ -z ${snap_channel} ]] && snap_channel="stable"
[[ -z ${multilib} ]] && multilib="true"
[[ ${no_multilib} == 'true' ]] && multilib="false"
[[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true"
@ -418,6 +421,8 @@ load_profile_config(){
[[ -z ${password} ]] && password="manjaro"
[[ -z ${user_shell} ]] && user_shell='/bin/bash'
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
if [[ -z ${addgroups} ]]; then
@ -438,15 +443,18 @@ load_profile_config(){
enable_systemd+=("${displaymanager}")
fi
[[ -z ${needs_internet} ]] && needs_internet='false'
[[ -z ${netinstall} ]] && netinstall='false'
[[ -z ${netinstall_label} ]] && netinstall_label='Package selection'
[[ -z ${mhwd_used} ]] && mhwd_used='true'
[[ -z ${oem_used} ]] && oem_used='false'
[[ -z ${set_oem_user} ]] && set_oem_user='true'
[[ -z ${chrootcfg} ]] && chrootcfg='false'
netgroups="https://raw.githubusercontent.com/manjaro/calamares-netgroups/master"
netgroups="https://gitlab.manjaro.org/applications/calamares-netgroups/-/raw/master/"
[[ -z ${geoip} ]] && geoip='true'
@ -458,6 +466,8 @@ load_profile_config(){
basic='true'
[[ ${extra} == 'true' ]] && basic='false'
[[ -z ${office_installer} ]] && office_installer="false"
return 0
}
@ -496,14 +506,18 @@ reset_profile(){
unset enable_systemd
unset disable_systemd
unset enable_systemd_live
unset disable_systemd_live
unset packages_desktop
unset packages_mhwd
unset user_shell
unset login_shell
unset netinstall
unset chrootcfg
unset geoip
unset extra
unset full_iso
unset office_installer
unset no_multilib
}
check_profile(){
@ -620,6 +634,13 @@ load_pkgs(){
;;
esac
local _office _office_rm
if ${office_installer}; then
_office="s|>office||g"
else
_office_rm="s|>office.*||g"
fi
local _blacklist="s|>blacklist.*||g" \
_kernel="s|KERNEL|$kernel|g" \
_used_kernel=${kernel:5:2} \
@ -647,6 +668,8 @@ load_pkgs(){
| sed "$_basic_rm" \
| sed "$_extra" \
| sed "$_extra_rm" \
| sed "$_office" \
| sed "$_office_rm" \
| sed "$_clean")
if [[ $1 == "${packages_mhwd}" ]]; then
@ -763,7 +786,7 @@ is_valid_arch_iso(){
is_valid_branch(){
case $1 in
'stable'|'testing'|'unstable') return 0 ;;
'stable'|'stable-staging'|'testing'|'unstable') return 0 ;;
*) return 1 ;;
esac
}
@ -811,24 +834,24 @@ create_chksums() {
}
init_profiles() {
_workdir='/usr/share/manjaro-tools'
if [[ -d ${_workdir}/iso-profiles ]]; then
rm -Rf ${_workdir}/iso-profiles ]]
fi
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
_workdir='/usr/share/manjaro-tools'
if [[ -d ${_workdir}/iso-profiles ]]; then
rm -Rf ${_workdir}/iso-profiles
fi
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
#Check if git clone is done
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
#Check if git clone is done
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
rm -f $i
done
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
rm -f $i
done
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
rm -Rf $i
done
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
exit 1
fi
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
rm -Rf $i
done
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
exit 1
fi
}