Compare commits

...

477 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
Philip Müller
2c234febb8 [util-iso] volid: change order of iso_label 2020-02-09 11:28:35 +01:00
Philip Müller
ea3a53e9d8 [util] volid: don't replace '_' 2020-02-09 00:18:45 +01:00
Philip Müller
268f1dac17 [util] volid: move 'iso_label' to profile section 2020-02-09 00:08:08 +01:00
Philip Müller
5a6ad3f64b [util] volid: change default branding to MANJARO 2020-02-09 00:03:31 +01:00
Philip Müller
8f994ef0d2 [util] extend volid to 32 characters 2020-02-09 00:02:07 +01:00
Stefano Capitani
05722a2fa2 Merge branch 'patch-php-redirector' into 'master'
php redirector to download latest iso

See merge request tools/development-tools/manjaro-tools!307
2020-02-08 17:51:14 +01:00
Frede Hundewadt
808b25b6a7
php redirector to download latest iso 2020-01-24 14:33:30 +01:00
Philip Müller
628a79a715 [util-yaml] switch to ipapi.co 2020-01-24 09:20:20 +01:00
Philip Müller
be6d499cbd [calamares] add windows placement
- will be introduced in 3.2.18
2020-01-17 10:30:30 +01:00
Bernhard Landauer
37c8f8b5c6 fix https://gitlab.manjaro.org/packages/extra/manjaro-tools/issues/2#note_14562 2020-01-15 10:57:44 +01:00
Philip Müller
3ff82a8a63 [lib-iso-image] disable prime drivers as needed 2020-01-06 12:43:37 +01:00
Philip Müller
699d178f52 [util-iso-image] fix copy_from_cache 2019-12-29 09:50:29 +01:00
Philip Müller
8fcab05e66 [util-iso-image] fix make_repo cmd 2019-12-29 09:38:50 +01:00
Philip Müller
5ac3badadf [util-iso-image] fix sed cmd 2019-12-29 09:30:18 +01:00
Philip Müller
36b663cac0 [signpkgs] use regex 2019-12-29 00:12:26 +01:00
Bernhard Landauer
ff5acbe2bb use zst compression for pkgs 2019-12-28 19:24:48 +01:00
Stefano
e3712e4a60
Correct if statement for compression options and set zstd to 20 to test how decrease the ISO size .. ( now i building a Kyria Iso fo Gnome )
Signed-off-by: Stefano <stefano@manjaro.org>
2019-12-28 17:01:10 +01:00
Bernhard Landauer
b3ed15d0fe query oem and boot_args config 2019-12-15 00:34:37 +01:00
Bernhard Landauer
3c355c7093 set custom_boot_args in profile.conf 2019-12-15 00:33:49 +01:00
Bernhard Landauer
a1863f14e9 add option custom_boot_args 2019-12-11 15:44:30 +01:00
Bernhard Landauer
1bfa0725f5 [util-pkg-chroot] do not attempt to mv pkgs from $pkg_dir 2019-12-10 11:52:00 +01:00
Bernhard Landauer
4ac9dc3192 > LTS linux54 2019-12-10 11:29:59 +01:00
Bernhard Landauer
3983d1ffff Merge branch 'master' into 'master'
Utilize osdn to serve a *latest* url

See merge request tools/development-tools/manjaro-tools!306
2019-12-02 00:35:25 +01:00
Frede Hundewadt
ef6ee481a9 only generate link if manjaro or community
renamed to .latest
moved to iso location
ignore during sync_dir
use scp instead of rsync to send to shell.osdn.net
remove when done
2019-12-02 00:35:24 +01:00
Bernhard Landauer
7cb8ca20db typo 2019-11-17 11:00:09 +01:00
Bernhard Landauer
5c31cf102e upd check_requirements() 2019-11-17 10:55:27 +01:00
Bernhard Landauer
fee0b2cb18 [util-iso.sh] fix compression command 2019-11-17 10:43:33 +01:00
Bernhard Landauer
2329b76681 iso_compression default zstd 2019-11-17 10:23:44 +01:00
Bernhard Landauer
731b5e454f Revert "resolve conflict"
This reverts commit 55db3e7cb3.
2019-11-17 10:17:33 +01:00
Bernhard Landauer
55db3e7cb3 resolve conflict 2019-11-17 10:15:35 +01:00
Stefano
c21c9f140d
Cleaned
Signed-off-by: Stefano <stefano@manjaro.org>
2019-11-16 18:39:06 +01:00
Stefano
0102f31a88
Revert "zstd cosmetic support"
This reverts commit 331ed19659.

Signed-off-by: Stefano <stefano@manjaro.org>
2019-11-16 18:37:17 +01:00
Stefano
94491db6f0
Correct if statment
Signed-off-by: Stefano <stefano@manjaro.org>
2019-11-15 23:20:07 +01:00
Stefano
331ed19659
zstd cosmetic support
Signed-off-by: Stefano <stefano@manjaro.org>
2019-11-14 23:17:30 +01:00
Philip Müller
c64b5fde27 [manjaro-tools.conf] use https://manjaro.moson.eu 2019-10-31 12:43:06 +01:00
Philip Müller
43828be26e [util.sh] adjust buildserver url 2019-10-31 12:40:36 +01:00
Philip Müller
d64cf2f94f [util.sh] use https://manjaro.moson.eu/ as default buildserver 2019-10-31 12:39:28 +01:00
Philip Müller
d7c6bae83e [util-iso-image] make 440 Nvidia driver optional 2019-10-25 22:31:34 +02:00
Bernhard Landauer
e9833fcabf > linux53 2019-10-24 11:26:31 +02:00
Philip Müller
3748533c10 [util-iso] try to fix OEM branding 2019-10-10 17:27:05 +02:00
Philip Müller
ecc7b90bec [util-iso] try to fix OEM branding 2019-10-10 17:10:06 +02:00
Philip Müller
fb6af199e0 [util-yaml] skip packagechooser in OEM 2019-10-08 16:03:59 +02:00
Philip Müller
f30e3f17b2 [util-iso] oem needs branding config in desktopfs 2019-10-08 15:58:09 +02:00
Stefano Capitani
90a00d679f Merge branch 'patch-1' into 'master'
Add timestamp and kernel to iso-filename

See merge request tools/development-tools/manjaro-tools!304
2019-09-28 23:01:27 +02:00
Frede Hundewadt
4739b2cc98 Update util-iso.sh 2019-09-28 11:03:57 +02:00
Frede Hundewadt
4841509678 add architecture if i686
comments
2019-09-17 10:36:03 +02:00
Frede Hundewadt
b64dd4dfea Omit branch in iso-filename if branch is stable
Fix variable brackets
2019-09-16 23:04:34 +02:00
Frede Hundewadt
c4962833e8 Add timestamp and kernel to iso-filename 2019-09-16 20:53:01 +02:00
Philip Müller
f0494d3965 [util-yaml] update geoip 2019-09-02 14:52:43 -04:00
Philip Müller
8e37a24ac8 [util-yaml] use packagechooser 2019-09-02 11:50:34 -04:00
Philip Müller
6fe92d320e [data] adopt to '/opt/mhwd/pkg' folder 2019-09-01 16:41:10 -04:00
Philip Müller
007ce7d6f8 [iso] use 'opt/mhwd' 2019-08-31 05:32:58 -04:00
Bernhard Landauer
ac9e91cf52 [miso_loop_mnt] find loop devices by path; https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/issues/309 2019-08-26 09:29:18 +02:00
Philip Müller
6569d444cc [util-iso] update Nvidia drivers 2019-08-24 09:07:08 -04:00
Bernhard Landauer
881d137e14 Merge branch 'stable-0.15.x' into 'master'
Stable 0.15.x

See merge request tools/development-tools/manjaro-tools!303
2019-08-20 09:37:11 +02:00
Bernhard Landauer
8c14770c87 Merge branch 'patch-1' into 'master'
Typo

See merge request tools/development-tools/manjaro-tools!301
2019-08-20 09:17:35 +02:00
Bernhard Landauer
62780fd47c Merge branch 'stable-0.15.x' into 'stable-0.15.x'
added CLI -a argument for alt_storage

See merge request tools/development-tools/manjaro-tools!298
2019-08-20 09:17:02 +02:00
Ste74
3d29788c40
Set locale in testiso
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-08-19 22:54:49 +02:00
Ste74
c6dcaddec5
testiso add eof
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-08-19 16:33:20 +02:00
Ste74
64be09421b
Modified testiso to work with vbox. Now a vbox machine called Manjaro is created if not present, a 10GB of disk is attached at the machine and standard configuration is loaded: This mean 2GB of RAM, UEFI support and other. After run for first time testiso it create also the machine into Vbox gui so easy change the settings if needed. Since this function not work before i push directly in master and if anyone want use it is ready.
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-08-19 15:48:49 +02:00
Philip Müller
9ebf14dfcc Merge branch 'master' of ssh://gitlab.manjaro.org:22277/tools/development-tools/manjaro-tools 2019-08-17 04:20:46 -04:00
Philip Müller
2d968e31f5 [yaml] fix geoip 2019-08-17 04:20:40 -04:00
Frede Hundewadt
66d4a341f3
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2019-08-10 09:47:33 +02:00
Bernhard Landauer
0a314fd993 do not run configure_branding() for architect 2019-08-06 10:57:33 +02:00
Philip Müller
92e1bad570 [util-yaml] enable OfficeChooser on Extra 2019-08-04 10:17:02 +02:00
Philip Müller
a2e5200974 [data] update manjaro-tools.conf 2019-07-28 19:43:02 +02:00
Philip Müller
392a86bcfe [iso.list.d] update manjaro list 2019-07-28 19:40:40 +02:00
Philip Müller
d6b1eb7f6c [iso.list.d] remove sonar 2019-07-28 19:39:49 +02:00
Philip Müller
3ca0eadf41 [util.sh] use linux52 by default 2019-07-28 19:39:07 +02:00
Philip Müller
dfbcb1c2bd [util-yaml] adopt to CAL 3.2.11 2019-07-13 08:22:04 +02:00
Philip Müller
1b32aa25b8 [snaps] make it more optional 2019-06-30 09:10:11 +02:00
Philip Müller
ba2ffebf86 [torrent] use udp://tracker.opentrackr.org:1337 2019-06-29 07:17:18 +02:00
Philip Müller
10ae36e92f [util-iso] fix snap seed channel 2019-06-20 15:54:02 +02:00
Philip Müller
fde8147a72 [util-iso.sh] update snap seed 2019-06-13 23:54:37 +02:00
Philip Müller
2349c59e02 [util-iso.sh] fix snap seeding 2019-06-13 22:57:02 +02:00
Philip Müller
1dc0cc28ea [util-iso.sh] snapd seed needs to be run on host 2019-06-13 22:12:00 +02:00
Philip Müller
07742ab6e4 [util-iso.sh] fix folder creation for snap seed 2019-06-13 22:05:28 +02:00
Philip Müller
c2a1af3b61 [util-iso.sh] fix folder creation for snap seed 2019-06-13 22:02:10 +02:00
Philip Müller
dc241e9ae4 [util-iso.sh] fix last commit 2019-06-13 21:39:47 +02:00
Philip Müller
c478485648 [util-iso.sh] simplify creation of snap seed 2019-06-13 21:24:29 +02:00
Philip Müller
59242d2b4a [util.sh] fix snap values 2019-06-13 00:49:26 +02:00
Philip Müller
a90199a176 [util-iso.sh] fix snap_channel variable 2019-06-13 00:42:24 +02:00
Philip Müller
ebe6012dbe [util-iso.sh] run snap yaml outside of the container 2019-06-13 00:28:51 +02:00
Philip Müller
08aadaf5e1 [util-iso.sh] run snap cmds in chroot 2019-06-13 00:04:05 +02:00
Philip Müller
5ccd0e2167 [util-iso.sh] fix snap values 2019-06-12 22:16:42 +02:00
Philip Müller
11c328c79e [util-iso.sh] make snaps more visual 2019-06-12 22:00:36 +02:00
Philip Müller
68fdb9341c [buildiso] echo snap values 2019-06-12 21:52:16 +02:00
Philip Müller
5363189b87 [util-iso.sh] snap needs to run in a chroot 2019-06-12 21:48:25 +02:00
Philip Müller
0e9a1657b3 [util-iso.sh] set snap_boot_args 2019-06-12 19:26:59 +02:00
Philip Müller
fc4f4693aa [util.sh] unset values 2019-06-12 19:02:41 +02:00
Philip Müller
f004b99889 [profile example] add default snap support 2019-06-12 18:58:51 +02:00
Philip Müller
c9057e9524 [util-iso.sh] call seed_snaps 2019-06-12 18:49:40 +02:00
Philip Müller
b4f167d96a [util.sh] add default values for snaps 2019-06-12 18:47:52 +02:00
Philip Müller
1f4fda04dd [util-iso.sh] add snap support 2019-06-12 18:34:00 +02:00
Philip Müller
8c43a542d6 [util.sh] update default kernel to 5.1 series 2019-06-12 18:14:36 +02:00
Philip Müller
48c214ef6f Merge branch 'stable-0.15.x' 2019-06-12 18:12:26 +02:00
Philip Müller
9f16f6ee83 [util-iso-image] add option to disable network drivers 2019-05-23 20:27:08 +02:00
Philip Müller
cc80c4c1a8 Remove additional modules: part_msdos part_gpt fat ntfs 2019-05-09 06:44:28 +02:00
Philip Müller
b1e5a54f4b Revert changes made to prefix. 2019-05-08 09:24:19 +02:00
Ste74
3645f17c8f
Add grub prefix in live mode 2019-05-03 22:23:21 +02:00
Ste74
ba88b2ba63
Make manjaro-tools compatible with rufus and others
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-04-28 12:33:41 +02:00
Ste74
b6d9ee34b5
Fix double quote issue with yaml format
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-04-06 18:06:51 +02:00
Ste74
d6e7190e41
Typo error
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-24 20:18:06 -05:00
Ste74
99534efa3c
Funny how bash script read this bracket
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-24 18:01:20 -05:00
Ste74
bb04a599b6
Forgot to delete this line :p
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-24 17:45:22 -05:00
Ste74
c9784f056a
Correct configure_branding and README.md for the new options
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-24 17:36:31 -05:00
Ste74
c4cb48ddf9
Not sure this approach work
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-22 22:53:19 -05:00
Ste74
e1b179cd45
First commit calamares options into manjaro-tools.conf
Signed-off-by: Ste74 <stefano@manjaro.org>
2019-01-22 18:11:34 -05:00
Ste74
5ace583e7d
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2019-01-22 17:56:51 -05:00
Frede Hundewadt
15da548fb8
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2019-01-17 10:27:36 +01:00
Philip Müller
0674438df1 [lib] update geoip service 2019-01-03 19:18:23 +01:00
Ste74
cb28eefe2d
Cosmetic change
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-12-19 10:22:47 -05:00
Ste74
08ba08e846
Fix calamares branding
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-12-18 21:13:25 -05:00
Ste74
8d140615f6
First try to configure calamares branding via manjaro-tools
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-12-18 17:33:55 -05:00
Ste74
ec51e92bab
Adopt v18.0 branch by default
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-11-05 19:15:34 +01:00
Ste74
f67dd8fbe0
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-11-03 19:20:22 +01:00
Philip Müller
2559ff5bb2 [util.sh] use linux419 by default 2018-11-03 08:56:03 +01:00
Philip Müller
97e0601cb4 [util-iso] use full-iso9660-filenames 2018-11-03 08:48:50 +01:00
Philip Müller
f05c594db0 [util-iso] use full-iso9660-filenames 2018-11-03 08:48:20 +01:00
Philip Müller
af85a38ad1 [merge] with stable branch 2018-11-03 08:02:12 +01:00
Philip Müller
08427fd8ee Merge branch 'stable-0.15.x' 2018-11-03 08:01:13 +01:00
Philip Müller
a0ea27a565 [util-iso] update xorriso cmds for v1.4.8 2018-11-03 07:59:14 +01:00
Ste74
31249fa9fd
Adopt by default kernel 4.19 and master branch. Note when we decide to create a v18.0 branch we need to change it
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-11-02 18:41:23 +01:00
Ste74
8f4742cd4a
Removed from buildtree the manjaro stuff
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-11-01 18:14:19 +01:00
Ste74
2c76ba5d6c
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2018-10-29 18:26:39 +01:00
Philip Müller
61dafad585
[util-yaml] use kde.org service 2018-10-29 18:26:39 +01:00
Philip Müller
691bfbe4cb
[util-yaml] update ip path 2018-10-29 18:26:38 +01:00
Philip Müller
1a9ef7c5a4
[util-yaml] use different geoip service 2018-10-29 18:26:38 +01:00
Philip Müller
7106e97c77
[util-iso-boot] set grubenv for grub-quiet 2018-10-29 18:26:38 +01:00
Philip Müller
6c1636e9c2 [util-yaml] use kde.org service 2018-10-21 09:11:32 +02:00
Philip Müller
c6ec757f17 [util-yaml] update ip path 2018-10-21 08:52:19 +02:00
Philip Müller
0104b5c84d [util-yaml] use different geoip service 2018-10-15 21:24:04 +02:00
Philip Müller
e99949a700 [util-iso-boot] set grubenv for grub-quiet 2018-10-02 20:12:02 +02:00
papajoker
bbcf524883 same typo 2018-09-29 23:49:53 +02:00
papajoker
a6eeac142d Update manjaro-tools.conf 2018-09-29 23:46:12 +02:00
Ste74
84c70221ce
This commit solve the issue during buildpkg: set the right working tree path
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-28 22:21:21 +02:00
Ste74
4f94991a17
Add statment to parse right branch if we use git clone instead of buildiso -i
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-27 21:58:19 +02:00
Ste74
c411f5bf41
Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2018-09-27 19:52:52 +02:00
Ste74
867cf4cff2
Done -i flag > initialize iso-profiles folder as user request
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-23 17:46:34 +02:00
Ste74
63b4efcd25
Since i use silent mode in github i added a simple check to verify the presence of the profiles and if not a message inform the user to check the internet connection or browse the gitlab repository
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-20 19:06:17 +02:00
Ste74
26b1110acd
Change -0 in -I
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-19 22:20:46 +02:00
Ste74
5237a2cb4e
Add -0 flag to use for download our profiles. Now only when passed the flag the iso-profiles are created. Update also the README to describe this flag.
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-17 19:38:05 +02:00
Ste74
ee261705fb
Damn it missed also this
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-16 18:54:56 +02:00
Ste74
f3fb001d36
correct manjaro-tools.conf
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-16 18:38:36 +02:00
Ste74
68c1489d0c
Corrections
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-09-16 18:35:25 +02:00
Ste74
467a57b122
Add init profiles repo functions 2018-09-16 18:29:53 +02:00
Philip Müller
a58e94e15a [util-iso-image] nvidia-304xx driver got removed 2018-09-08 11:05:03 +02:00
Philip Müller
8542ed676f [version] 0.15.9 2018-09-06 19:38:53 +02:00
Philip Müller
428d95ebf9 [util-iso] honor multilib=false in profile.conf 2018-09-06 19:32:21 +02:00
Frede Hundewadt
200abe3832 Add empty file /etc/mhwd-x86_64.conf
File is required to avoid errors when multilib files is not present
2018-09-06 19:28:40 +02:00
Philip Müller
5cbc29af91 Merge branch 'mhwd-fix' into 'master'
Add empty file /etc/mhwd-x86_64.conf

See merge request tools/development-tools/manjaro-tools!300
2018-09-06 19:27:04 +02:00
Frede Hundewadt
ac6f97cb53 Add empty file /etc/mhwd-x86_64.conf
File is required to avoid errors when multilib files is not present
2018-09-06 17:33:17 +02:00
Philip Müller
86dae4f1e4 [buildpkg] simplify last commit 2018-09-06 01:19:26 +02:00
Philip Müller
83f8b3e23d [buildpkg] mkchrootpkg only supports one pkg per -I switch 2018-09-06 01:16:06 +02:00
Philip Müller
2106c3f7a1 [util-iso-boot] add license for amd-ucode 2018-08-26 16:43:54 +02:00
Philip Müller
d055b5571c [util-iso-boot] add amd-ucode 2018-08-26 16:21:28 +02:00
Philip Müller
2911866e64 [profile] add sys group by default 2018-08-22 03:20:38 +02:00
fhdk
f5e5980745 added CLI -a argument for alt_storage 2018-08-21 15:45:19 +02:00
Stefano Capitani
bbd9aaba24 removed sonar tips 2018-07-18 22:56:26 +02:00
Stefano Capitani
8271bb6e5c Add comment 2018-07-18 22:49:27 +02:00
Philip Müller
7f57aa3339 [version] v0.15.8 2018-06-30 08:55:00 +02:00
Philip Müller
28fb1521a6 [version] v0.15.8 2018-06-30 08:54:32 +02:00
Philip Müller
953b02cccb [merge] pull 0.15.x changes 2018-06-30 08:51:39 +02:00
Philip Müller
cc67d34b88 [util] remove pre-systemd groups 2018-06-30 08:45:45 +02:00
Bernhard Landauer
7d56c7a58a rm pcmcia hook 2018-06-25 12:36:12 +02:00
Bernhard Landauer
4303febfdb rm pcmcia hook 2018-06-25 12:11:02 +02:00
Philip Müller
d6ab170fba Merge branch 'stable-0.15.x' into 'stable-0.15.x'
[lib] write user_shell from profile if exist

See merge request tools/development-tools/manjaro-tools!296
2018-06-24 21:51:24 +02:00
fhdk
70f036cb5b Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2018-06-24 21:40:36 +02:00
Philip Müller
72f46f8aa8 Merge branch 'stable-0.15.x' into 'stable-0.15.x'
Introduce -d flag to set the compression level of the ISO ...

See merge request tools/development-tools/manjaro-tools!294
2018-06-24 21:32:54 +02:00
fhdk
05bee87e2d Merge remote-tracking branch 'upstream/stable-0.15.x' into stable-0.15.x 2018-06-24 15:00:09 +02:00
Frede Hundewadt
d21ff17799 removed whitespace 2018-06-24 14:55:34 +02:00
fhdk
7b067b22b3 [profile.conf.sample] update to show user_shell configuration 2018-06-24 13:56:41 +02:00
Philip Müller
16936b118e [data] remove pcmcia from mkinitcpio.conf 2018-06-24 11:05:51 +02:00
fhdk
039eacae82 [lib] write user_shell from profile if exist 2018-06-24 10:45:04 +02:00
Philip Müller
c207c3d428 [lig] util-yaml: support CAL-git bootloader updates 2018-06-24 10:03:17 +02:00
Bernhard Landauer
08b818ef92 small typo 2018-06-24 10:03:06 +02:00
Stefano Capitani
60a0a9433c Correct default value 2018-06-23 11:35:35 +02:00
Philip Müller
1a7923c21b [lig] util-yaml: support CAL-git bootloader updates 2018-06-22 23:18:47 +02:00
Ste74
e1eb050f64 Introduce -d flag to set the compression level of the ISO ... we can set -d lz4 to compress more fast the iso ( useful for debug purpose ) . Default is xz but in manjaro-tools.conf we can set the level in permanent way .. Reintroduce this option from the m-t 0.13.x series 2018-06-22 23:00:36 +02:00
Bernhard Landauer
67b6f1ea71 small typo 2018-06-04 12:46:09 +02:00
Philip
3e80462940 [mkchrootpkg] Upstream fixes
- makepkg 5.1 implements error codes, and 14 means that installing the
  packages after they were built has failed. We don't care about this
  error and would like makechrootpkg to succeed regardless, e.g. for split
  packages that are mutually exclusive.
- Do not assume the makechrootpkg user's groupname is the same as the username
2018-06-01 10:06:01 +02:00
Philip
6acdb40fed [mkchrootpkg] Upstream fixes
- makepkg 5.1 implements error codes, and 14 means that installing the
  packages after they were built has failed. We don't care about this
  error and would like makechrootpkg to succeed regardless, e.g. for split
  packages that are mutually exclusive.
- Do not assume the makechrootpkg user's groupname is the same as the username
2018-06-01 10:05:30 +02:00
Philip
02413245d4 [mkchrootpkg] check gpg keys again 2018-05-31 18:47:32 +02:00
Philip
72a1ae0722 [mkchrootpkg] check gpg keys again 2018-05-31 18:47:05 +02:00
Philip
96a3b52670 [mkchrootpkg] ignore signature checking 2018-05-30 20:08:22 +02:00
Philip
a049fc81d4 [mkchrootpkg] ignore signature checking 2018-05-30 20:07:56 +02:00
Philip
3711a00cf0 [bin] adopt pacman 5.1 changes for mkchrootpkg 2018-05-29 23:08:10 +02:00
Philip
fb0ae6bf1e [data] update makepkg.conf 2018-05-29 22:26:04 +02:00
Philip
e59152b7dd [data] update makepkg.conf 2018-05-29 22:23:07 +02:00
Bernhard Landauer
98aaa74bac adjust move_to_cache() 2018-05-29 18:23:50 +02:00
Ste74
bb83c3d4fe Add dist_codename in manjaro-tools.conf ( forgot to push also here yesterday )
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-05-29 18:13:31 +02:00
Bernhard Landauer
72c138728c adjust move_to_cache() 2018-05-29 16:43:19 +02:00
Bernhard Landauer
fc0adbcba3 pacman 5.1.0 update 2018-05-29 14:46:43 +02:00
Ste74
f87fa4be1e Funny: just realize now dist_codename array is missing from manjaro-tools.conf 2018-05-28 19:09:41 +02:00
Philip
f1b67449f7 makechrootpkg: add /etc/shadow entry for builduser
sudo: PAM account management error: Authentication
service cannot retrieve authentication info
2018-05-13 06:27:04 +02:00
Philip
b3bef8b2e3 makechrootpkg: add /etc/shadow entry for builduser
sudo: PAM account management error: Authentication
service cannot retrieve authentication info
2018-05-13 06:24:13 +02:00
Philip
51605c0d15 [util-iso-image] add support to disable nvidia drivers in profile 2018-05-04 09:03:28 +02:00
Bernhard Landauer
fdb222f32c [deployiso] modify rsync cmd 2018-04-29 14:29:27 +02:00
Bernhard Landauer
1262b50b71 [util-publish] webseed use shorturl 2018-04-27 11:19:36 +02:00
Philip
1a6e4a27b5 [util] fix if routine for basic flag 2018-04-22 10:08:28 +02:00
Philip
9dd40f8b9a [util-iso] correct if routine for extra flag 2018-04-22 10:06:05 +02:00
Philip
a731f04132 [util-iso] use extra flag instead of full_iso flag 2018-04-22 09:14:33 +02:00
Bernhard Landauer
4134a2db17 whitespaces 2018-04-19 23:24:19 +02:00
Philip
fdf797e2fb [mkchroot] update url or ftp.manjaro.org 2018-04-19 10:47:24 +02:00
Batuhan Osman Taşkaya
225ace7417 Indentation Fixment in bin/mkchroot.in
Indentation Fixment in bin/mkchroot.in
2018-04-16 00:50:00 +02:00
Bernhard Landauer
8c4e64d2da [util-publish] cleanup 2018-04-16 00:29:15 +02:00
Bernhard Landauer
4587df847d hide repo.manjaro url 2018-04-15 22:03:10 +02:00
Bernhard Landauer
6116773a23 cosmetics 2018-04-15 20:42:56 +02:00
Bernhard Landauer
dafd48a413 upd README and docbook 2018-04-15 20:23:02 +02:00
Bernhard Landauer
a8e8ba6039 [deployiso] add ssh-agent support 2018-04-15 20:10:20 +02:00
Bernhard Landauer
084ef4267d rm iso_mirrors 2018-04-15 19:41:45 +02:00
Bernhard Landauer
e89eb44971 corrections 2018-04-15 17:28:48 +02:00
Bernhard Landauer
358fee880c [deployiso] add sign/checksum option 2018-04-15 17:02:39 +02:00
Bernhard Landauer
d98639e344 upd docbook 2018-04-15 16:05:39 +02:00
Bernhard Landauer
4933bb3ce3 simplify 2018-04-15 15:59:44 +02:00
Bernhard Landauer
d9eefd0481 [deployiso] add option for alt storage server 2018-04-15 15:54:20 +02:00
Bernhard Landauer
4b334e4527 [deployiso] rm default bw-limit
[deployiso] limit isn't empty but zero

Revert "[deployiso] limit isn't empty but zero"

This reverts commit 8bb98a2b650f5d938bc3a039523f95e6d55ff072.

correction
2018-04-15 15:27:59 +02:00
Bernhard Landauer
f23a135b6c upd docbook 2018-04-15 15:04:46 +02:00
Bernhard Landauer
128db78545 [util-publish] fix torrent webseed 2018-04-15 12:19:15 +02:00
Bernhard Landauer
e6ae6aaa3f fix torrent seed url 2018-04-15 11:37:02 +02:00
Bernhard Landauer
1f00082bb6 [util-publish] correction 2018-04-15 03:36:45 +02:00
Bernhard Landauer
b3a7a431be [deployiso] add option to upload to hidden dir 2018-04-15 03:15:45 +02:00
Bernhard Landauer
6a711f4771 replace some tabs 2018-04-15 02:28:18 +02:00
Bernhard Landauer
1d92941420 [util-yaml] fix write_machineid_conf() 2018-04-15 01:58:47 +02:00
Bernhard Landauer
c3b82d4027 [deployiso] add rsync checksum flag 2018-04-15 01:34:08 +02:00
Bernhard Landauer
0aef777dd8 [util-publish] show target project 2018-04-14 20:11:30 +02:00
Bernhard Landauer
0688a642e8 upd docbook and default manjaro-tools.conf 2018-04-14 12:32:09 +02:00
Bernhard Landauer
4f74f8c9e1 [deployiso] osdn project based on profile 2018-04-14 12:26:49 +02:00
Bernhard Landauer
14ff48abe0 corrections and some sortings 2018-04-14 01:42:35 +02:00
Bernhard Landauer
9aefc30a38 rm openrc support 2018-04-14 01:09:07 +02:00
Bernhard Landauer
b6023bf92f whitespace pedantry 2018-04-14 00:07:43 +02:00
Bernhard Landauer
52e415f11d [util] /addgroups alphabetical order beauty 2018-04-14 00:00:18 +02:00
Philip
83db864d60 [util-yaml] use geoip-tools
- 120 requests per minute. Once reached subsequent requests will result in error 503 until your quota is cleared
2018-04-13 18:12:57 +02:00
Philip
aa74a8262e [util-yaml] update geoipUrl
freenode.net API endpoint is deprecated and will stop working on July 1st, 2018. For more information please visit: https://github.com/apilayer/freegeoip#readm
2018-04-13 17:09:03 +02:00
Philip
e1d27f6237 [util-yaml] use US/NY 2018-04-13 16:52:19 +02:00
Bernhard Landauer
57d1c9c146 upd docbook 2018-04-12 00:21:26 +02:00
Bernhard Landauer
8f1dae5863 upd profile defaults 2018-04-12 00:18:54 +02:00
Bernhard Landauer
318c0bcd31 upd default manjaro-tools.conf 2018-04-12 00:03:10 +02:00
Bernhard Landauer
564523fd2d [deployiso] adjust to osdn.net 2018-04-11 23:53:33 +02:00
Bernhard Landauer
cdc3d2e3e5 update iso lists 2018-04-11 23:48:14 +02:00
Philip
cb98a5549a [util] honor extra setting in profiles
- fixes #289
2018-03-31 11:38:12 +02:00
Stefano Capitani
672ecf850f
Correct identation in last commit 2018-03-24 19:10:25 +01:00
Ste74
2d1d8bc6b9 Update README.md file to reflect new flag ( -f ) in buildiso.
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-03-24 19:07:19 +01:00
Bernhard Landauer
321c4369ee
Merge pull request #287 from fhdk/stable-0.15.x
whitespace removal
2018-03-19 19:25:32 +01:00
fhdk
95ef8e2956 whitespace removal 2018-03-19 17:33:26 +01:00
Stefano Capitani
9d5526c1e2
Merge pull request #286 from fhdk/stable-0.15.x
Adding `-f` full_iso=true
2018-03-18 19:57:13 +01:00
fhdk
d266a28a0b Adding -f full_iso=true
Eliminating config entry extra=true
Adding minimal to iso filename
2018-03-18 19:45:29 +01:00
Philip
cfeefabcbc v0.15.5 2018-03-13 20:47:59 +01:00
Ste74
f910aaa2fe Corrections
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-03-11 18:09:29 +01:00
Ste74
050066781e [deployiso] : add function to reconnect
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-03-11 16:45:27 +01:00
Ste74
16e573d8ac Move build server to https protocol
Signed-off-by: Ste74 <stefano@manjaro.org>
2018-03-08 22:59:14 +01:00
Bernhard Landauer
bae607b8cd Revert "Merge branch 'stable-0.15.x' into stable-0.15.x"
This reverts commit 37730b9df6, reversing
changes made to 23a04cf757.
2018-02-15 11:52:53 +01:00
Bernhard Landauer
37730b9df6
Merge branch 'stable-0.15.x' into stable-0.15.x 2018-02-15 11:47:39 +01:00
Philip
23a04cf757 [buildpkg] proper ending slash patch 2018-02-05 00:13:00 +01:00
Philip
bf1403e355 [data] update pacman-mirrors.conf 2018-01-13 08:15:30 -05:00
Philip
e4d2ecae9e Merge branch 'stable-0.15.x' of github.com:manjaro/manjaro-tools into stable-0.15.x 2018-01-13 08:14:20 -05:00
Philip
96336c2ec9 [data] update pacman-mirrors.conf 2018-01-13 08:14:01 -05:00
Philip Müller
e173e717da
Merge pull request #278 from Ste74/stable-0.15.x
Set linux414 as default kernel
2018-01-02 09:06:51 +01:00
Stefano Capitani
43f49cd5fa
Set linux414 as default kernel
Since 17.1.0 is out we can set as default
2018-01-01 16:30:48 +01:00
Bernhard Landauer
d68f8eb61e [buildpkg] remove trailing slash from pkgnames 2017-12-14 23:49:21 +01:00
Bernhard Landauer
b6f8ba6dc2 [buildpkg] remove trailing slash from pkgnames 2017-12-14 23:39:28 +01:00
Bernhard Landauer
7bdac68017
Merge pull request #71 from manjaro/stable-0.15.x
[tag] v0.15.4
2017-11-28 00:05:53 +01:00
Philip
ebaa387072 [tag] v0.15.4 2017-11-01 14:20:08 -04:00
Bernhard Landauer
f4d62cb0d7
Merge pull request #70 from manjaro/stable-0.15.x
\$dist_codename configurable
2017-11-01 04:38:56 +01:00
Bernhard Landauer
b3187908f3 \$dist_codename configurable 2017-10-31 17:28:26 +01:00
Bernhard Landauer
c3de6b1137 Merge pull request #69 from manjaro/stable-0.15.x
0.15.x upstream rebase
2017-10-24 11:37:58 +02:00
Bernhard Landauer
7d89e9af6c indenting 2017-10-24 11:36:14 +02:00
Bernhard Landauer
22750ad6de user_own proper iso dir 2017-10-23 23:50:26 +02:00
Bernhard Landauer
e2f0a4600c add create_chksums 2017-10-23 23:47:35 +02:00
Bernhard Landauer
883944362c add signiso 2017-10-23 23:44:37 +02:00
Bernhard Landauer
e21f62276b user_own log dir 2017-10-23 23:34:21 +02:00
Bernhard Landauer
e5efe8b32d user_own log dirs 2017-10-23 23:31:50 +02:00
Bernhard Landauer
61ed9981be add missing newline 2017-10-21 18:16:12 +02:00
Bernhard Landauer
15c77b6666 [util-publish] adjust target_dir 2017-10-18 14:41:04 +02:00
Bernhard Landauer
c250d54e30 Merge pull request #68 from manjaro/stable-0.15.x
[util-yaml] revert oem-used change
2017-10-16 17:04:15 +02:00
Philip
473a294f6a [util-yaml] revert oem-used change 2017-09-15 08:15:16 -04:00
Bernhard Landauer
6c8b2ca33a Merge pull request #67 from manjaro/stable-0.15.x
Stable 0.15.x
2017-09-13 08:11:52 -04:00
Bernhard Landauer
b0cd0c481f [mkchrootpkg] export UTF-8 2017-09-13 08:09:16 -04:00
Philip
5f53d251c9 [util-yaml] update oem settings 2017-09-12 07:33:41 -04:00
Bernhard Landauer
ce942050b9 Merge pull request #66 from manjaro/stable-0.15.x
workaround locale errors
2017-09-04 05:09:34 +02:00
Bernhard Landauer
11dc24934a workaround locale errors 2017-09-04 05:08:40 +02:00
Bernhard Landauer
f5ef88c4dc Merge pull request #65 from manjaro/stable-0.15.x
Allow for site redirection
2017-09-03 00:27:26 +02:00
elishl
37c3daa526 Allow for site redirection
Sites (like sourceforge.com) use redirection.
The added parameter will take that into account.
2017-08-25 12:45:42 +01:00
Bernhard Landauer
f462434f98 Merge pull request #64 from manjaro/stable-0.15.x
merge manjaro Stable 0.15.x
2017-08-16 11:21:01 +02:00
Philip
ed0903bf3f [util{-yaml}] add oem_used function 2017-08-12 17:25:38 +01:00
Philip
21deb78026 [util] introduce mhwd_used 2017-07-30 13:42:53 +02:00
Bernhard Landauer
2bd080bd65 allow any iso_kernel 2017-07-19 18:01:26 +02:00
Bernhard Landauer
75b7e86b22 Merge pull request #63 from manjaro/stable-0.15.x
enable full RELRO and BIND_NOW
2017-07-17 18:59:43 +02:00
Philip
b8255e9e17 enable full RELRO and BIND_NOW 2017-07-15 12:02:13 +02:00
Bernhard Landauer
4201241c9c add PKGBUILD 2017-07-04 22:26:35 +02:00
Bernhard Landauer
321fd5a5b1 adjust deployiso 2017-07-04 22:20:30 +02:00
Bernhard Landauer
b0623173e9 add create_checksum() 2017-07-04 22:20:08 +02:00
Bernhard Landauer
382a20f5a8 add signiso 2017-07-04 22:08:20 +02:00
Bernhard Landauer
c529601087 fix user_own 2017-07-04 21:51:55 +02:00
Philip
afbae5e9ff tag v0.15.3 2017-07-03 10:58:51 +02:00
udeved
e080dd3dbe initcpio: add ca-certificates.crt for pxe http 2017-07-03 10:51:20 +02:00
elishl
4433351b95 Update miso 2017-07-03 10:50:47 +02:00
Bernhard Landauer
4b76f7fa83 rm existing .sig file to avoid corrupted signature
https://forum.manjaro.org/t/troubleshooting-signature-errors-with-boxit/26178/
2017-06-24 08:49:15 +02:00
Philip
965de2f5fc [util-iso-image] add support to disable VB-drv 2017-06-22 22:22:29 +02:00
Philip Müller
1e3795f8c3 Merge pull request #270 from manjaro/revert-268-patch-1
Revert "Update pacman-default.conf"
2017-06-11 09:28:45 +02:00
Philip Müller
62266058c2 Revert "Update pacman-default.conf" 2017-06-11 09:28:12 +02:00
Philip Müller
ff23abeed6 Merge pull request #268 from Ste74/patch-1
Adjust pacman-default.conf
2017-06-11 09:27:36 +02:00
Philip
a4f2fd33a4 [util.sh] update os-release path 2017-06-09 09:28:33 +02:00
Stefano Capitani
7744315f63 Update pacman-default.conf
manjaro-system-ng ;)
2017-06-06 17:30:33 +02:00
elishl
251f56befd Corrections for PXE boot (#266)
* Correction for a faulty condition

The current condition works for checking existence of the .sfs files on the local file system.
The proposed condition checks for the existence of the .sfs files on a remote server.

* Correction for NFS & NBD & HTTP boot

By default, Calamares searches for the .sfs files in the "bootmnt" directory.
When "copytoram==y" (relevant for NFS & NBD & HTTP boot), the .sfs files are stored in the "copytoram" directory.
The proposed code binds the "copytoram" dir with "bootmnt" so Calamares can "see" the .sfs. files.
2017-05-07 09:30:08 +02:00
Philip
7caeeb9638 [README] update format 2017-05-06 09:56:25 +02:00
Philip
fcd8e2a640 [util-iso-boot] really proper last commit 2017-05-06 09:53:23 +02:00
Philip
4e44c5f807 [util-iso-boot] proper last commit 2017-05-06 09:53:08 +02:00
Philip
83fc4866de [util-iso-boot] fix issue with i686 build on x86_64 host 2017-05-06 09:52:56 +02:00
artoo
8a6cb28be6 0.15.2 (#263)
* util-iso: try to fix uefi usb boot

* util-iso-*: put grub-theme in livefs

* util-iso-boot: reduce efi.img size

* util-iso: readd xorriso args

* util-iso: fox mod_date length

* util-iso: don't create mod_dte file for now

* [util-iso] try to fix issue with efi.img

* util-iso-boot: remove grub video dir

* util-iso: clean up assemble_iso()

* doc: remove obsolete entry from deployiso
util-yaml: formating fix

* util-iso: set the grub theme by $iso_name
2017-03-31 19:38:19 +02:00
udeved
feda1e7659 Merge branch 'master' of github.com:manjaro/manjaro-tools 2017-03-28 17:55:13 +02:00
artoo
42e0735b77 prepare 0.15.1 (#261)
* improve btrfs handling devtools patches

* buildios: drop ck on openrc

* data: update base-devel-udev

* util-iso-image: configure live logind on openrc too

* util-iso-image: fix logind cof path on openrc

* util-mount: always bind mount /etc/resolve.conf in chroot

* util: create empty /etc/resolv.conf on minimal requirement for pacman

* util: revert last 2 commits, default mirrorliust is now always generated

* util-iso-image: simplify logind config

* data: rm workaround from mlinitcpio.conf

* data: reenable workaround

* Unify grub (#262)

* initial commit testing unified grub

* buildiso: update to working grub version

* data: remove grub; move to own repo

* buildiso: adopt new grub-theme path

* clean up makefile

* buildiso: rm pxe_boot switch; always enabled now

* data: rm memdisk hook from initcpio

* util-iso-boot: clean up grub code

* initcpio_ back pxe hook arch patch

* buildiso:
* always clean entire chroot profile on -c
* tweak kernels.cfg

* util-iso-boot: fix efiboot mount path

* util-iso-boot: some corrections to efi.img

* buildiso: improve grub configuration

* util-iso-boot: add mhwd args in configure_grub()

* util-iso-boot: fix typo in mhwd args

* util-iso-boot: display proper grub image name for efi image
2017-03-26 18:54:45 +02:00
55 changed files with 2194 additions and 904 deletions

1
.gitignore vendored
View file

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

View file

@ -1,10 +1,11 @@
Version=0.15.0
Version=0.15.14
PREFIX = /usr/local
SYSCONFDIR = /etc
SYSCONF = \
data/manjaro-tools.conf
data/manjaro-tools.conf \
data/branding.desc.d
BIN_BASE = \
bin/mkchroot \
@ -12,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 \
@ -45,8 +47,7 @@ LIBS_PKG = \
$(wildcard lib/util-pkg*.sh)
SHARED_PKG = \
data/makepkg.conf \
data/base-devel-udev
data/makepkg.conf
LIST_ISO = \
$(wildcard data/iso.list.d/*.list)
@ -54,7 +55,8 @@ LIST_ISO = \
BIN_ISO = \
bin/buildiso \
bin/testiso \
bin/deployiso
bin/deployiso \
bin/signiso
LIBS_ISO = \
$(wildcard lib/util-iso*.sh) \

232
README.md
View file

@ -1,11 +1,11 @@
manjaro-tools
=============
Manjaro-tools-0.14
Manjaro-tools-0.15
User manual
###1. manjaro-tools.conf
### 1. manjaro-tools.conf
manjaro-tools.conf is the central configuration file for manjaro-tools.
By default, the config is installed in
@ -56,7 +56,7 @@ overriding
# default target branch
# target_branch=stable
# default taget arch: auto detect
# default target arch: auto detect
# target_arch=$(uname -m)
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
@ -69,12 +69,12 @@ overriding
# log_dir='/var/log/manjaro-tools'
# custom build mirror server
# build_mirror=http://mirror.netzspielplatz.de/manjaro/packages
# build_mirror=https://manjaro.moson.eu
################ buildtree ###############
# manjaro package tree
# repo_tree=('core' 'extra' 'community' 'multilib' 'openrc')
# repo_tree=('core' 'extra' 'community' 'multilib')
# host_tree=https://github.com/manjaro
@ -88,70 +88,106 @@ overriding
################ buildiso ################
#default branch for iso-profiles repo: v17.1>current release | master>development release
# branch=v17.1
# default iso build list; name without .list extension
# build_list_iso=default
# the dist release; default: auto
# dist_release=17.0
# dist_release=auto
# the branding; default: auto
# dist_branding="MJRO"
# possible values: openrc,systemd
# initsys="systemd"
# dist_branding="MANJARO"
# unset defaults to given value
# kernel="linux49"
# kernel="linux54"
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
########## calamares preferences ##########
#See branding.desc.d for reference
# welcome style for calamares: true="Welcome to the %1 installer." ; false="Welcome to the Calamares installer for %1." (default)
# welcomestyle=false
# welcome image scaled (productWelcome)
# welcomelogo=true
# size and expansion policy for Calamares (possible value: normal,fullscreen,noexpand)
# windowexp=noexpand
# size of Calamares window, expressed as w,h.
# (possible units: pixel (px) or font-units (em))
# windowsize="800px,520px"
# colors for text and background components:
# background of the sidebar
# sidebarbackground=#454948
# text color
# sidebartext=#efefef
# background of the selected step
# sidebartextselect=#4d915e
# text color of the selected step
# sidebartexthighlight=#1a1c1b
################ deployiso ################
# the server user
# account=[SetUser]
# Set to 'true' to use ssh-agent to store passphrase.
# ssh_agent=false
# use alternative storage server (one or the other might be more stable)
# alt_storage=false
# the server project: manjaro|manjaro-community
# determined automatically based on profile if unset
# project="[SetProject]"
# set upload bandwidth limit in kB/s
# limit=100
# limit=
# the torrent tracker urls, comma separated
# tracker_url='udp://mirror.strits.dk:6969'
# Piece size, 2^n
# piece_size=21
# iso mirrors
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
~~~
###2. buildpkg
### 2. buildpkg
buildpkg is the chroot build script of manjaro-tools.
It it run in a abs/pkgbuilds directory which contains directories with PKGBUILD.
######manjaro-tools.conf supports the makepkg.conf variables
###### manjaro-tools.conf supports the makepkg.conf variables
####Arguments
#### Arguments
~~~
$ buildpkg -h
Usage: buildpkg [options]
-p <pkg> Buildset or pkg [default: default]
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
-c Recreate chroot
-h This help
-i <pkg> Install a package into the working copy of the chroot
-n Install and run namcap check
-p <pkg> Buildset or pkg [default: default]
-q Query settings and pretend build
-r <dir> Chroots directory
[default: /var/lib/manjaro-tools/buildpkg]
-i <pkg> Install a package into the working copy of the chroot
-c Recreate chroot
-w Clean up cache and sources
-n Install and run namcap check
-s Sign packages
-u udev base-devel group (no systemd)
-q Query settings and pretend build
-h This help
-w Clean up cache and sources
~~~
######* build sysvinit package for both arches and branch testing:
###### * build sysvinit package for both arches and branch testing:
* i686(buildsystem is x86_64)
@ -168,60 +204,66 @@ buildpkg -p sysvinit -b testing -cswn
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
###### * -c
* 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
######* -s
* Signs the package when built
######* -n
###### * -n
* Installs the built package in the chroot and runs a namcap check
######* -u
* Create udev build root (for eudev builds)
###### * -s
* Signs the package when built
###3. buildiso
###### * -w
* Cleans pkgcache, and logfiles
### 3. buildiso
buildiso is used to build manjaro-iso-profiles. It is run insde the profiles folder.
#####Packages for livecd only:
##### Packages for livecd only:
* manjaro-livecd-openrc
* manjaro-livecd-systemd
####Arguments
#### Arguments
~~~
$ buildiso -h
Usage: buildiso [options]
-p <profile> Buildset or profile [default: default]
-i Initialize iso-profiles repo [default: v17.1]"
-a <arch> Arch [default: auto]
-b <branch> Branch [default: stable]
-c Disable clean work dir
-f Build full ISO (extra=true)
-g <key> The gpg key for sfs signing
[default: empty]
-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
[default: /var/lib/manjaro-tools/buildiso]
-t <dir> Target directory
[default: /var/cache/manjaro-tools/iso]
-k <name> Kernel to use
[default: linux49]
-i <name> Init system to use
[default: systemd]
-g <key> The gpg key for sfs signing
[default: empty]
-m Set SquashFS image mode to persistence
-c Disable clean work dir
-v Verbose output to log file, show profile detail (-q)
-x Build images only
-z Generate iso only
Requires pre built images (-x)
-v Verbose output to log file, show profile detail (-q)
-q Query settings and pretend build
-h This help
~~~
######* build xfce iso profile for both arches and branch testing on x86_64 build system
###### * build xfce iso profile for both arches and branch testing on x86_64 build system
* Remember: if you run buildiso for the first time you need to do:
~~~
buildiso -i
~~~
for download in /usr/share/manjaro-tools/iso-profiles our manjaro profiles. You can override in manjaro-tools.conf what branch use with buildiso: v17.1 or master ( development profiles ). The previous command can be used to refresh the profiles as needed in your local.
* i686 (buildsystem is x86_64)
@ -237,16 +279,16 @@ buildiso -p xfce -b testing
The branch can be defined also in manjaro-tools.conf, but a manual parameter will always override conf settings.
####Special parameters
#### Special parameters
######* -x
###### * -x
* Build images only
* will stop after all packages have been installed. No iso sqfs compression will be executed
######* -z
###### * -z
* Use this to sqfs compress the chroots if you previously used -x.
###4. check-yaml
### 4. check-yaml
check-yaml can be used to write profile package lists to yaml.
It is also possible to generate calamares conf file as buildiso would do.
@ -255,17 +297,16 @@ yaml files are used by calamares netinstall option from a specified url(netgroup
~~~
$ check-yaml -h
Usage: check-yaml [options]
-p <profile> Buildset or profile [default: default]
-a <arch> Arch [default: auto]
-k <name> Kernel to use[default: linux44]
-i <name> Init system to use [default: systemd]
-c Check also calamares yaml files generated for the profile
-g Enable pacman group accepted for -p
-v Validate by schema
-q Query settings
-h This help
-k <name> Kernel to use[default: linux44]
-p <profile> Buildset or profile [default: default]
-q Query settings
-v Validate by schema
~~~
######* build xfce iso profile for both arches and branch testing on x86_64 build system
###### * build xfce iso profile for both arches and branch testing on x86_64 build system
* i686 (buildsystem is x86_64)
@ -285,50 +326,50 @@ check-yaml -p xfce -c
check-yaml -p kdebase -gv
~~~
####Special parameters
#### Special parameters
######* -c
###### * -c
* generate calamares module and settings conf files per profile
######* -g
###### * -g
* generate a netgroup for specified pacman group
###5. buildtree
### 5. buildtree
buildtree is a little tools to sync arch abs and manjaro PKGBUILD git repos.
####Arguments
#### Arguments
~~~
$ buildtree -h
Usage: buildtree [options]
-s Sync manjaro tree
-a Sync arch abs
-c Clean package tree
-q Query settings
-h This help
-q Query settings
-s Sync manjaro tree
~~~
######* sync arch and manjaro trees
###### * sync arch and manjaro trees
~~~
buildtree -as
~~~
###6. manjaro-chroot
### 6. manjaro-chroot
manjaro-chroot is a little tool to quickly chroot into a second system installed on the host.
If the automount option is enabled, manjaro-chroot will detect installed systems with os-prober, and pops up a list with linux systems to select from.
If there is only 1 system installed besides the host system, no list will pop up and it will automatically mount the second system.
####Arguments
#### Arguments
~~~
$ manjaro-chroot -h
usage: manjaro-chroot -a [or] manjaro-chroot chroot-dir [command]
-a Automount detected linux system
-q Query settings and pretend
-h Print this help message
-q Query settings and pretend
If 'command' is unspecified, manjaro-chroot will launch /bin/sh.
@ -336,48 +377,51 @@ usage: manjaro-chroot -a [or] manjaro-chroot chroot-dir [command]
and /build/manjaro-tools/manjaro-chroot.
~~~
######* automount
###### * automount
~~~
manjaro-chroot -a
~~~
######* mount manually
###### * mount manually
~~~
manjaro-chroot /mnt /bin/bash
~~~
###7. deployiso
### 7. deployiso
deployiso is a script to upload a specific iso or a buiildset to SF.
It needs to be run inside the iso-profiles directory.
deployiso is a script to upload a specific iso or a buiildset to OSDN.
Ideally, you have a running ssh agent on the host, and your key added, and your public key provided to your SF account. You can then upload without being asked for ssh password.
####Arguments
#### Arguments
~~~
$ deployiso -h
Usage: deployiso [options]
-p Source folder to upload [default:default]
-l Limit bandwidth in kB/s [default:80]
-c Create new remote release directory
-u Update remote directory
-t Create iso torrent
-q Query settings and pretend upload
-v Verbose output
-d Use hidden remote directory
-h This help
-l Limit bandwidth in kB/s [default:]
-p Source folder to upload [default:default]
-q Query settings and pretend upload
-s Sign ISO and create checksums
-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
###### * upload official build list, ie all built iso defined in a build list
~~~
deployiso -p official -c
deployiso -p official
~~~
######* upload xfce
###### * upload sign xfce ISO file, create checksums, create torrent and upload to hidden directory
~~~
deployiso -p xfce -c
deployiso -p xfce -std
~~~
##### Fast compression
Lz4 Is very fast but not a good compression ratio, good for testing

View file

@ -55,11 +55,11 @@ opts=':C:cdGiM'
while getopts ${opts} arg; do
case "${arg}" in
c) hostcache=true ;;
C) pacman_config=$OPTARG ;;
d) directory=true ;;
c) hostcache=true ;;
i) interactive=true ;;
G) copykeyring=false ;;
i) interactive=true ;;
M) copymirrorlist=false ;;
:) echo "invalid argument ${arg}:$OPTARG"; usage 1;;
?) usage 0 ;;
@ -99,11 +99,11 @@ fi
# kill chroot process if needed (TODO: check if needed at all)
kill_chroot_process "$newroot"
if ${copykeyring};then
if ${copykeyring}; then
copy_keyring "$newroot"
fi
if ${copymirrorlist};then
if ${copymirrorlist}; then
copy_mirrorlist "$newroot"
fi

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

@ -16,43 +16,47 @@ DATADIR='@datadir@'
SYSCONFDIR='@sysconfdir@'
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
show_profile(){
prepare_profile "$1"
msg2 "iso_file: %s" "${iso_file}"
if ${verbose};then
msg2 "iso_label: %s" "${iso_label}"
if ${verbose}; then
msg2 "autologin: %s" "${autologin}"
msg2 "nonfree_mhwd: %s" "${nonfree_mhwd}"
[[ ${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}"
${netinstall} && msg2 "netgroups: %s" "$(get_yaml)"
msg2 "geoip: %s" "${geoip}"
msg2 "oem_used: %s" "${oem_used}"
msg2 "efi_boot_loader: %s" "${efi_boot_loader}"
msg2 "custom_boot_args: %s" "${custom_boot_args}"
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}"
if [[ ${initsys} == 'systemd' ]];then
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
else
msg2 "enable_openrc: %s" "${enable_openrc[*]}"
msg2 "enable_openrc_live: %s" "${enable_openrc_live[*]}"
[[ -n ${disable_openrc[*]} ]] && msg2 "disable_openrc: %s" "${disable_openrc[*]}"
fi
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[*]}"
msg2 "strict_snaps: %s" "${strict_snaps}"
msg2 "classic_snaps: %s" "${classic_snaps}"
msg2 "snap_channel: %s" "${snap_channel}"
fi
reset_profile
}
@ -62,6 +66,7 @@ display_settings(){
show_config
msg "PROFILE:"
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}"
@ -69,7 +74,6 @@ display_settings(){
msg "OPTIONS:"
msg2 "arch: %s" "${target_arch}"
msg2 "branch: %s" "${target_branch}"
msg2 "initsys: %s" "${initsys}"
msg2 "kernel: %s" "${kernel}"
[[ -n ${gpgkey} ]] && msg2 "gpgkey: %s" "${gpgkey}"
@ -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}"
@ -85,7 +92,7 @@ display_settings(){
msg2 "dist_codename: %s" "${dist_codename}"
msg "ISO INFO:"
msg2 "iso_label: %s" "${iso_label}"
msg2 "iso_compression: %s" "${iso_compression}"
msg "BUILD QUEUE:"
run show_profile "${build_list_iso}"
@ -106,29 +113,36 @@ images_only=false
iso_only=false
verbose=false
persist=false
initialize=false
permalink=false
usage() {
echo "Usage: ${0##*/} [options]"
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 ' -i <name> Init system to use'
echo " [default: ${initsys}]"
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 ' -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 ''
@ -137,24 +151,29 @@ usage() {
orig_argv=("$@")
opts='p:a:b:r:t:k:i:g:czxmvqh'
opts='p:a:b:r:t:k:g:d:cfzxmnvqhilo'
while getopts "${opts}" arg; do
case "${arg}" in
p) build_list_iso="$OPTARG" ;;
i) initialize=true ;;
a) target_arch="$OPTARG" ;;
b) target_branch="$OPTARG" ;;
c) clean_first=false ;;
f) full_iso=true ;;
d) iso_compression="$OPTARG" ;;
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" ;;
t) cache_dir_iso="$OPTARG" ;;
k) kernel="$OPTARG" ;;
i) initsys="$OPTARG" ;;
g) gpgkey="$OPTARG" ;;
c) clean_first=false ;;
v) verbose=true ;;
x) images_only=true ;;
z) iso_only=true ;;
m) persist=true ;;
v) verbose=true ;;
q) pretend=true ;;
l) permalink=true ;;
o) office_installer=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@ -162,12 +181,21 @@ done
shift $(($OPTIND - 1))
if ${initialize}; then
msg "Initialize iso profiles ${branch}"
init_profiles
msg2 "Done: iso profiles are stored in /usr/share/manjaro-tools/iso-profiles"
exit 1
fi
timer_start=$(get_timer)
check_root "$0" "${orig_argv[@]}"
prepare_dir "${log_dir}"
user_own "${log_dir}"
prepare_dir "${tmp_dir}"
eval_build_list "${list_dir_iso}" "${build_list_iso}"

View file

@ -53,12 +53,11 @@ display_settings(){
msg2 "wipe_clean: %s" "${wipe_clean}"
msg2 "namcap: %s" "${namcap}"
msg2 "sign: %s" "${sign}"
msg2 "udev_root: %s" "${udev_root}"
msg "PATHS:"
msg2 "pkg_dir: %s" "${pkg_dir}"
if ${clean_first};then
if ${clean_first}; then
msg "PKG:"
msg2 "base_packages: %s" "${base_packages[*]}"
fi
@ -72,32 +71,28 @@ load_user_info
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
load_vars "$USER_HOME/.makepkg.conf" || load_vars /etc/makepkg.conf
install_pkgs=()
clean_first=false
wipe_clean=false
namcap=false
pretend=false
is_build_list=false
sign=false
udev_root=false
is_multilib=false
usage() {
echo "Usage: ${0##*/} [options]"
echo " -p <pkg> Build list or pkg [default: ${build_list_pkg}]"
echo " -a <arch> Arch [default: ${target_arch}]"
echo " -b <branch> Branch [default: ${target_branch}]"
echo ' -c Recreate chroot'
echo ' -h This help'
echo ' -i <pkg> Install a package into the working copy of the chroot'
echo ' -n Install and run namcap check'
echo " -p <pkg> Build list or pkg [default: ${build_list_pkg}]"
echo ' -q Query settings and pretend build'
echo ' -r <dir> Chroots directory'
echo " [default: ${chroots_pkg}]"
echo ' -i <pkgs> Install packages into the working copy of the chroot'
echo ' -c Recreate chroot'
echo ' -w Clean up cache and sources'
echo ' -n Install and run namcap check'
echo ' -s Sign packages'
echo ' -u Udev base-devel group (no systemd)'
echo ' -q Query settings and pretend build'
echo ' -h This help'
echo ' -w Clean up cache and sources'
echo ''
echo ''
exit $1
@ -109,17 +104,16 @@ opts='p:a:b:r:i:cwnsuqh'
while getopts "${opts}" arg; do
case "${arg}" in
p) build_list_pkg="$OPTARG" ;;
a) target_arch="$OPTARG" ;;
b) target_branch="$OPTARG" ;;
r) chroots_pkg="$OPTARG" ;;
i) install_pkgs+=("$OPTARG"); mkchrootpkg_args+=(-I ${install_pkgs[*]}) ;;
c) clean_first=true ;;
w) wipe_clean=true ;;
i) mkchrootpkg_args+=(-I "$OPTARG") ;;
n) namcap=true; mkchrootpkg_args+=(-n) ;;
s) sign=true ;;
u) udev_root=true ;;
p) build_list_pkg="${OPTARG%/}" ;;
q) pretend=true ;;
r) chroots_pkg="$OPTARG" ;;
s) sign=true ;;
w) wipe_clean=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@ -131,6 +125,8 @@ check_root "$0" "${orig_argv[@]}"
prepare_dir "${log_dir}"
user_own "${log_dir}"
prepare_dir "${tmp_dir}"
prepare_conf "${target_arch}"

View file

@ -23,7 +23,7 @@ display_settings(){
show_config
msg "ARGS:"
msg2 "sync: %s" "${sync}"
# msg2 "sync: %s" "${sync}"
msg2 "abs: %s" "${abs}"
msg2 "clean: %s" "${clean}"
@ -38,14 +38,14 @@ load_user_info
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
sync=false
#sync=false
pretend=false
abs=false
clean=false
usage() {
echo "Usage: ${0##*/} [options]"
echo " -s Sync manjaro tree"
#echo " -s Sync manjaro tree"
echo " -a Sync arch abs"
echo ' -c Clean package tree'
echo ' -q Query settings'
@ -57,14 +57,14 @@ usage() {
orig_argv=("$@")
opts='sacqh'
opts='acqh'
while getopts "${opts}" arg; do
case "${arg}" in
s) sync=true ;;
a) abs=true ;;
c) clean=true ;;
q) pretend=true ;;
#s) sync=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac
@ -80,6 +80,6 @@ ${pretend} && display_settings && exit 1
${clean} && clean_dir "${tree_dir}"
${sync} && sync_tree_manjaro
#${sync} && sync_tree_manjaro
${abs} && sync_tree_abs

View file

@ -44,15 +44,9 @@ show_profile(){
msg2 "login_shell: %s" "${login_shell}"
msg2 "addgroups: %s" "${addgroups}"
if [[ ${initsys} == 'systemd' ]];then
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
else
msg2 "enable_openrc: %s" "${enable_openrc[*]}"
msg2 "enable_openrc_live: %s" "${enable_openrc_live[*]}"
[[ -n ${disable_openrc[*]} ]] && msg2 "disable_openrc: %s" "${disable_openrc[*]}"
fi
msg2 "enable_systemd: %s" "${enable_systemd[*]}"
msg2 "enable_systemd_live: %s" "${enable_systemd_live[*]}"
[[ -n ${disable_systemd[*]} ]] && msg2 "disable_systemd: %s" "${disable_systemd[*]}"
reset_profile
unset yaml_dir
@ -69,7 +63,6 @@ display_settings(){
msg "OPTIONS:"
msg2 "arch: %s" "${target_arch}"
msg2 "initsys: %s" "${initsys}"
msg2 "kernel: %s" "${kernel}"
msg "ARGS:"
@ -98,15 +91,14 @@ cache_dir_netinstall="${cache_dir}/netinstall"
usage() {
echo "Usage: ${0##*/} [options]"
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
echo " -a <arch> Arch [default: ${target_arch}]"
echo " -k <name> Kernel to use[default: ${kernel}]"
echo " -i <name> Init system to use [default: ${initsys}]"
echo ' -c Check also calamares yaml files generated for the profile'
echo ' -g Enable pacman group accepted for -p'
echo ' -v Validate by schema'
echo ' -q Query settings'
echo ' -h This help'
echo " -k <name> Kernel to use[default: ${kernel}]"
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
echo ' -q Query settings'
echo ' -v Validate by schema'
echo ''
echo ''
exit $1
@ -118,14 +110,13 @@ opts='p:a:i:k:gcvqh'
while getopts "${opts}" arg; do
case "${arg}" in
p) build_list_iso="$OPTARG" ;;
a) target_arch="$OPTARG" ;;
i) initsys="$OPTARG" ;;
k) kernel="$OPTARG" ;;
c) calamares=true ;;
g) group=true ;;
v) validate=true ;;
k) kernel="$OPTARG" ;;
p) build_list_iso="$OPTARG" ;;
q) pretend=true ;;
v) validate=true ;;
h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;;
esac

View file

@ -81,7 +81,7 @@ copy_hostconf () {
[[ -n $makepkg_conf ]] && cp $makepkg_conf "$1/etc/makepkg.conf"
[[ -n $mirrors_conf ]] && cp ${mirrors_conf} "$1/etc/pacman-mirrors.conf"
if [[ -n ${build_mirror} ]];then
if [[ -n ${build_mirror} ]]; then
build_mirror=${build_mirror}'/$repo/$arch'
if ${keep_mirrors}; then
set_branch "$1" "$(get_branch $1)"
@ -103,7 +103,7 @@ chroot_extra_umount() {
chroot_mount "$cache_dir" "$1${cache_dir}" -Br
done
if [[ -n ${mountargs_ro[@]} ]];then
if [[ -n ${mountargs_ro[@]} ]]; then
local IFS=','
for m in ${mountargs_ro[@]}; do
chroot_mount "${m%%:*}" "$1${m##*:}" -Br
@ -111,7 +111,7 @@ chroot_extra_umount() {
unset IFS
fi
if [[ -n ${mountargs_rw[@]} ]];then
if [[ -n ${mountargs_rw[@]} ]]; then
local IFS=','
for m in ${mountargs_rw[@]}; do
chroot_mount "${m%%:*}" "$1${m##*:}" -B

View file

@ -20,10 +20,11 @@ import ${LIBDIR}/util.sh
import ${LIBDIR}/util-publish.sh
show_profile(){
prepare_transfer "$1"
prepare_transfer "$1" "${hidden}"
info "Profile: [$1]"
msg2 "project: %s" "${project}"
msg2 "src_dir: ${src_dir}"
msg2 "target_dir: ${target_dir}"
msg2 "remote dir: ${url}/${target_dir}"
}
display_settings(){
@ -36,25 +37,28 @@ display_settings(){
msg2 "is_build_list: %s" "${is_build_list}"
msg "OPTIONS:"
msg2 "limit: %s kB/s" "${limit}"
[[ -z ${limit} ]] && msg2 "bandwidth limit: no" || msg2 "bandwidth limit: %s kB/s" "${limit}"
msg2 "dist_release: %s" "${dist_release}"
msg "ARGS:"
msg2 "update: %s" "${update}"
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
if ${torrent}; then
msg2 "tracker_url: %s" "${tracker_url}"
msg2 "piece_size: %s" "${piece_size}"
msg2 "iso_mirrors: %s" "${iso_mirrors[*]}"
msg2 "torrent_meta: %s" "${torrent_meta}"
fi
msg "REMOTE:"
msg2 "account: %s" "${account}"
msg2 "host: %s" "${host}"
msg2 "project: %s" "${project}"
msg2 "alt_storage: %s" "${alt_storage}"
msg2 "ssh_agent: %s" "${ssh_agent}"
msg "UPLOAD QUEUE:"
run show_profile "${build_list_iso}"
@ -66,37 +70,52 @@ load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/ma
run_dir=${cache_dir_iso}
hidden=false
pretend=false
torrent=false
update=false
verbose=false
torrent=false
sign=false
alt_storage=false
shell_upload=false
upd_homepage=false
rsync_args=(-aP --progress -e ssh)
rsync_args=(-aP -e ssh)
usage() {
echo "Usage: ${0##*/} [options]"
echo " -p Source folder to upload [default:${build_list_iso}]"
echo " -l Limit bandwidth in kB/s [default:${limit}]"
echo ' -u Update remote directory'
echo ' -t Create iso torrent'
echo ' -q Query settings and pretend upload'
echo ' -v Verbose output'
echo ' -a Use alternate storage server'
echo ' -d Use hidden remote directory'
echo ' -h This help'
echo " -l Limit bandwidth in kB/s [default: ${limit}]"
echo " -p Source folder to upload [default: ${build_list_iso}]"
echo ' -q Query settings and pretend upload'
echo ' -s Sign ISO and create checksums'
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='p:l:uvtqh'
opts='adhl:p:qstuvwz'
while getopts "${opts}" arg; do
case "${arg}" in
p) build_list_iso="$OPTARG" ;;
l) limit="$OPTARG" ;;
u) update=true; rsync_args+=(-u) ;;
t) torrent=true ;;
v) verbose=true; rsync_args+=(-v --stats) ;;
a) alt_storage=true ;;
d) hidden=true ;;
l) limit="$OPTARG"; rsync_args+=(--bwlimit=${limit}) ;;
p) build_list_iso="$OPTARG" ;;
q) pretend=true; rsync_args+=(-n) ;;
s) sign=true ;;
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
@ -108,8 +127,6 @@ timer_start=$(get_timer)
eval_build_list "${list_dir_iso}" "${build_list_iso}"
rsync_args+=(--bwlimit=${limit})
${pretend} && display_settings && exit 1
run sync_dir "${build_list_iso}"

View file

@ -43,8 +43,8 @@ pretend=false
usage() {
echo "usage: ${0##*/} -a [or] ${0##*/} chroot-dir [command]"
echo ' -a Automount detected linux system'
echo ' -q Query settings and pretend'
echo ' -h Print this help message'
echo ' -q Query settings and pretend'
echo ''
echo " If 'command' is unspecified, ${0##*/} will launch /bin/sh."
echo ''
@ -71,7 +71,7 @@ shift $(( OPTIND - 1 ))
check_root "$0" "${orig_argv[@]}"
if ${automount};then
if ${automount}; then
chrootdir=/mnt
run_args=/bin/bash

View file

@ -82,17 +82,18 @@ umask 0022
lock 9 "${working_dir}.lock" "Locking chroot"
if is_btrfs "$working_dir"; then
rmdir "$working_dir"
if ! btrfs subvolume create "$working_dir"; then
die "Couldn't create subvolume for '%s'" "$working_dir"
fi
chmod 0755 "$working_dir"
rmdir "$working_dir"
if ! btrfs subvolume create "$working_dir"; then
die "Couldn't create subvolume for '%s'" "$working_dir"
fi
chmod 0755 "$working_dir"
fi
# Workaround when creating a chroot in a branch different of the host
if [[ -n $pac_conf ]] && [[ -n $mirrors_conf ]] && [[ -n ${build_mirror} ]]; then
url=${build_mirror}'/$repo/$arch'
info "mirror: %s" "$url"
[[ ${build_mirror} = *ftp*repo.manjaro.org* ]] && show_mirror=repo.manjaro.org'/$repo/$arch' || show_mirror=$url
info "mirror: %s" "$show_mirror"
pac_base="$working_dir/pacman-basestrap.conf"
sed "s#Include = /etc/pacman.d/mirrorlist#Server = ${url}#g" $pac_conf > $pac_base
@ -107,18 +108,19 @@ fi
echo "$version" > "$working_dir/.manjaro-tools"
if ${build_locales};then
if ${build_locales}; then
info "Using build locales ..."
mv "$working_dir/etc/locale.gen" "$working_dir/etc/locale.gen.bak"
mv "$working_dir/etc/locale.conf" "$working_dir/etc/locale.conf.bak"
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

@ -191,9 +191,10 @@ prepare_chroot() {
# We can't use useradd without chrooting, otherwise it invokes PAM modules
# which we might not be able to load (i.e. when building i686 packages on
# an x86_64 host).
sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,group}
sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,shadow,group}
printf >>"$copydir/etc/group" 'builduser:x:%d:\n' $builduser_gid
printf >>"$copydir/etc/passwd" 'builduser:x:%d:%d:builduser:/build:/bin/bash\n' $builduser_uid $builduser_gid
printf >>"$copydir/etc/shadow" 'builduser:!!:%d::::::\n' "$(( $(date -u +%s) / 86400 ))"
$install -d "$copydir"/{build,build/.gnupg,startdir,{pkg,srcpkg,src,log}dest}
@ -235,11 +236,18 @@ EOF
# These functions aren't run in makechrootpkg,
# so no global variables
_chrootbuild() {
export LC_ALL=en_US.UTF-8
. /etc/profile
# export HOME=/build
# cd /startdir
# sudo -u builduser makepkg "$@"
sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
ret=$?
case $ret in
0|14) return 0;;
*) return $ret;;
esac
}
_chrootnamcap() {
@ -252,7 +260,7 @@ _chrootnamcap() {
download_sources() {
local builddir="$(mktemp -d)"
chmod 1777 "$builddir"
chown $SUDO_USER: "$builddir"
# Ensure sources are downloaded
if [[ -n $SUDO_USER ]]; then

View file

@ -26,4 +26,5 @@ if [ ! -e "$1" ]; then
fi
msg2 "Signing [%s] with key %s" "${1##*/}" "${GPGKEY}..."
[[ -e "$1".sig ]] && rm "$1".sig
gpg --detach-sign --use-agent -u "${GPGKEY}" "$1"

27
bin/signiso.in Normal file
View file

@ -0,0 +1,27 @@
#!/bin/bash
LIBDIR='/usr/lib/manjaro-tools'
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
[[ ! -z "$1" ]] && cd "$1"
for f in $(find . -maxdepth 1 -name '*.iso' | cut -d'/' -f2); do
if [[ ! -e $f.sha256 ]]; then
create_chksums $f
elif [[ $f -nt $f.sha256 ]]; then
create_chksums $f
else
info "checksums for [$f] already created"
fi
if [[ ! -e $f.sig ]]; then
signfile $f
elif [[ $f -nt $f.sig ]]; then
rm $f.sig
signfile $f
else
info "signature file for [$f] already created"
fi
done

View file

@ -11,4 +11,4 @@
version=@version@
find $PWD -maxdepth 1 -name '*.pkg.tar.xz' -exec signfile {} \;
find $PWD -maxdepth 1 -regex '.*\.pkg\.tar\.\(xz\|zst\)' -exec signfile {} \;

136
bin/testiso.in Executable file → Normal file
View file

@ -11,29 +11,123 @@
version=@version@
if [ $# -eq 0 ]; then
echo "
usage: testiso <isofile> [id|ic|sd|sc|vd|vc]
LIBDIR='@libdir@'
id boot iso as IDE disk
ic boot iso as IDE cd-rom
sd boot iso as SCSI disk
sc boot iso as SCSI cd-rom
vd boot iso as virtio disk
vc boot iso as virtio cd-rom
"
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
import ${LIBDIR}/util.sh
if [ $# -eq 0 ]; then
msg "No <profile>"
msg2 "Usage: testiso <profile>"
exit 1
fi
case "${2}" in
id) IF="ide"; MEDIA="disk";;
ic) IF="ide"; MEDIA="cdrom";;
sd) IF="scsi"; MEDIA="disk";;
sc) IF="scsi"; MEDIA="cdrom";;
vd) IF="virtio"; MEDIA="disk";;
vc) IF="virtio"; MEDIA="cdrom";;
*) IF="scsi"; MEDIA="cdrom";;
esac
vdi_size=10240 # 10GB size
#Check if already exist virtual disk and in case create it
if [[ -e ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox ]]; then
msg "Manjaro Virtual Machine Found"
else
msg "We create a new VirtualBox Machine called Manjaro"
msg2 "We create a new Virtual Disk Image ( vdi ) with ${vdi_size}GB"
VBoxManage createmedium disk --filename ~/VirtualBox\ VMs/Manjaro/Manjaro.vdi --size ${vdi_size} --format VDI --variant Fixed
UUID=$(VBoxManage showhdinfo ~/VirtualBox\ VMs/Manjaro/Manjaro.vdi | awk 'NR == 1 {print $2}') #uuid of vdi disk
gui_lang=$(awk -F'[.=]' '/LANG/ {print $2}' /etc/locale.conf)
echo '<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
<Machine uuid="{d5d29291-32e4-4c8e-9633-ecc0511966da}" name="Manjaro" OSType="ArchLinux_64" snapshotFolder="Snapshots" lastStateChange="2019-08-17T15:20:11Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{UUID}" location="Manjaro.vdi" format="VDI" type="Normal"/>
</HardDisks>
</MediaRegistry>
<Hardware>
<CPU>
<PAE enabled="false"/>
<LongMode enabled="true"/>
<X2APIC enabled="true"/>
<HardwareVirtExLargePages enabled="false"/>
</CPU>
<Memory RAMSize="2048"/>
<Firmware type="EFI"/>
<HID Pointing="USBTablet"/>
<Display VRAMSize="16" accelerate3D="true"/>
<VideoCapture file="." fps="25"/>
<BIOS>
<IOAPIC enabled="true"/>
</BIOS>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="080027967634" type="82540EM">
<NAT/>
</Adapter>
</Network>
<AudioAdapter codec="AD1980" driver="Pulse" enabled="true" enabledIn="false"/>
<RTC localOrUTC="UTC"/>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="gui_lang" timestamp="1566055357633717000" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
</StorageController>
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{UUID}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>' > ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
sed -i "s/UUID/$UUID/g" ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
sed -i "s/gui_lang/$gui_lang/g" ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox
VBoxManage registervm ~/VirtualBox\ VMs/Manjaro/Manjaro.vbox #register the manjaro vbox machine
fi
VBoxManage storageattach Manjaro --storagectl IDE --port 1 --device 0 --medium emptydrive #empty the dvd drive
sleep 1
load_user_info
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
run_dir=${cache_dir_iso}
dist_number=${dist_release}
iso_dir=$(find ${run_dir} -type d -iname $1)
iso=${iso_dir}/${dist_number}
if [[ -e $(ls ${iso}/*.iso) ]]; then
iso_name=$(ls ${iso}/*.iso)
else msg "No ISO to load present"
exit 1
fi
VBoxManage storageattach Manjaro --storagectl IDE --port 1 --device 0 --type dvddrive --medium $iso_name #attach dvd manjaro iso
sleep 1
msg2 "Run Vbox Manjaro with ${iso_name}"
sleep 2
VBoxManage startvm Manjaro #run vbox machine
echo qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on
qemu -m 256 -drive file=${1},if=${IF},media=${MEDIA},boot=on

View file

@ -1,29 +0,0 @@
autoconf
automake
binutils
bison
libeudev
fakeroot
file
findutils
flex
gawk
gcc
gettext
grep
groff
gzip
libtool
m4
make
pacman
patch
pkg-config
sed
sudo
texinfo
util-linux-nosystemd
which
>multilib gcc-multilib
>multilib lib32-fakeroot
>multilib lib32-libltdl

93
data/branding.desc.d Normal file
View file

@ -0,0 +1,93 @@
---
componentName: manjaro
# This selects between different welcome texts. When false, uses
# the traditional "Welcome to the %1 installer.", and when true,
# uses "Welcome to the Calamares installer for %1." This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: ${welcomestyle}
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: ${welcomelogo}
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", never expand, use *windowSize*
windowExpanding: ${windowexp}
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: ${windowsize}
# 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}
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
strings:
productName: ${dist_name} Linux
shortProductName: ${dist_name}
version: ${dist_release}
shortVersion: ${dist_release}
versionedName: ${dist_name} Linux ${dist_release} "${dist_codename}"
shortVersionedName: ${dist_name} ${dist_release}
bootloaderEntryName: ${dist_name}
# These images are loaded from the branding module directory.
#
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use `welcomeExpandingLogo` to make it non-scaled.
# Recommended size is 320x150.
images:
productLogo: "logo.png"
productIcon: "logo.png"
productWelcome: "languages.png"
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
slideshow: "show.qml"
# Colors for text and background components.
#
# - sidebarBackground is the background of the sidebar
# - sidebarText is the (foreground) text color
# - sidebarTextHighlight sets the background of the selected (current) step.
# Optional, and defaults to the application palette.
# - sidebarSelect is the text color of the selected step.
#
style:
sidebarBackground: "${sidebackground}"
sidebarText: "${sidebartext}"
sidebarTextSelect: "${sidebartextselect}"
sidebarTextHighlight: "${sidebartexthighlight}"

View file

@ -1,6 +1,12 @@
awesome
bspwm
bspwm-mate
budgie
cinnamon
deepin
i3
lxde
lxqt
mate
openbox
webdad

View file

@ -1,5 +1,5 @@
kde
xfce
architect
gnome
lxqt
kde
netinstall
xfce

View file

@ -1,2 +0,0 @@
gnome-edition
mate-edition

View file

@ -1,3 +1,3 @@
carch="i686"
chost="i686-pc-linux-gnu"
cflags="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
cflags="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"

View file

@ -1,3 +1,3 @@
carch="x86_64"
chost="x86_64-pc-linux-gnu"
cflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
cflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"

View file

@ -1,3 +1,3 @@
carch="x86_64"
chost="x86_64-pc-linux-gnu"
cflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong"
cflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"

View file

@ -1,3 +1,4 @@
#!/hint/bash
#
# /etc/makepkg.conf
#
@ -8,9 +9,10 @@
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
@ -34,12 +36,10 @@ CARCH="@CARCH@"
CHOST="@CHOST@"
#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="@CFLAGS@"
CXXFLAGS="@CFLAGS@"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
@ -50,7 +50,7 @@ DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign)
# Defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
@ -74,7 +74,7 @@ BUILDENV=(!distcc color !ccache check !sign)
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
@ -84,10 +84,9 @@ BUILDENV=(!distcc color !ccache check !sign)
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- upx: Compress binary executable files using UPX
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
@ -103,6 +102,8 @@ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
@ -130,9 +131,12 @@ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
#########################################################################
# EXTENSION DEFAULTS
@ -141,7 +145,5 @@ COMPRESSZ=(compress -c -f)
# WARNING: Do NOT modify these variables unless you know what you are
# doing.
#
PKGEXT='.pkg.tar.xz'
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'
# vim: set ft=sh ts=2 sw=2 et:

View file

@ -5,7 +5,7 @@
# default target branch
# target_branch=stable
# default taget arch: auto detect
# default target arch: auto detect
# target_arch=$(uname -m)
# cache dir where buildpkg, buildtree cache packages/pkgbuild, builiso iso files
@ -18,12 +18,12 @@
# log_dir='/var/log/manjaro-tools'
# custom build mirror server
# build_mirror=http://mirror.netzspielplatz.de/manjaro/packages
# build_mirror=https://manjaro.moson.eu/
################ buildtree ###############
# manjaro package tree
# repo_tree=('core' 'extra' 'community' 'multilib' 'openrc')
# repo_tree=('core' 'extra' 'community' 'multilib')
# host_tree=https://github.com/manjaro
@ -37,40 +37,86 @@
################ buildiso ################
# default branch for iso-profiles repo: v18.1 Juhraya master>development release
# branch=v18.1
# default iso build list; name without .list extension
# build_list_iso=default
# the dist release; default: auto
# dist_release=17.0
# dist_release=18.1
# the dist codename; default: auto
# dist_codename=Juhraya
# the OS branding; default: auto
# dist_name
# the branding; default: auto
# dist_branding="MJRO"
# possible values: openrc,systemd
# initsys="systemd"
# compression used, possible values gzip, lzma, lz4, lzo, xy, zstd (default)
# iso_compression=zstd
# unset defaults to given value
# kernel="linux49"
# kernel="linux54"
# gpg key; leave empty or commented to skip sfs signing
# gpgkey=""
########## calamares preferences ##########
#See branding.desc.d for reference
# welcome style for calamares: true="Welcome to the %1 installer." ; false="Welcome to the Calamares installer for %1." (default)
# welcomestyle=false
# welcome image scaled (productWelcome)
# welcomelogo=true
# size and expansion policy for Calamares (possible value: normal,fullscreen,noexpand)
# windowexp=noexpand
# size of Calamares window, expressed as w,h.
# (possible units: pixel (px) or font-units (em))
# windowsize="800px,520px"
# placement of Calamares window, either "center" or "free".
# windowplacement="center"
# colors for text and background components:
# background of the sidebar
# sidebarbackground=#454948
# text color
# sidebartext=#efefef
# background of the selected step
# sidebartextselect=#4d915e
# text color of the selected step
# sidebartexthighlight=#1a1c1b
################ deployiso ################
# the server user
# account=[SetUser]
# the server project
# Set to 'true' to use ssh-agent to store passphrase.
# ssh_agent=false
# use alternative storage server (one or the other might be more stable)
# alt_storage=false
# the server project: manjaro|manjaro-community
# determined automatically based on profile if unset
# project="[SetProject]"
# set upload bandwidth limit in kB/s
# limit=100
# limit=
# the torrent tracker urls, comma separated
# tracker_url='udp://mirror.strits.dk:6969'
# tracker_url='udp://tracker.opentrackr.org:1337'
# Piece size, 2^n
# piece_size=21
# iso mirrors
# iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')

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 pcmcia 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.
@ -68,4 +69,4 @@ SigLevel = Never
[mhwd]
#SigLevel = Optional TrustAll
Server = file:///opt/pkg
Server = file:///opt/mhwd/pkg

View file

@ -10,19 +10,18 @@ Branch = stable
## 2) random - randomly generate the output mirrorlist
# Method = rank
## Specify to use only mirrors from specific a country.
## Can add multiple countries separated by a comma (ex: Germany,France)
## Empty means all
# OnlyCountry =
## Filename to use when ranking mirrors
## The file must be present in core repo
# TestFile = core.db.tar.gz
## Mirrors directory
# MirrorlistsDir = /etc/pacman.d/mirrors
## Define protocols and priority
## separated by comma 'https,http' or 'http,https'
## ATM available protocols are: http, https, ftp
## Not specifying a protocol will ban the protocol from being used
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
# Protocols =
## Output file
# OutputMirrorlist = /etc/pacman.d/mirrorlist
## When set to True prevents the regeneration of the mirrorlist if
## pacman-mirrors is invoked with the --no-update argument.
## Useful if you don't want the mirrorlist regenerated after a
## pacman-mirrors package upgrade.
# NoUpdate = False
## When set to False - all certificates are accepted.
## Use only if you fully trust all ssl-enabled mirrors.
# SSLVerify = True

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,12 +8,22 @@
# 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
# supported; lightdm, sddm, gdm, lxdm, mdm
# displaymanager="none"
# add strict snaps: strict_snaps="core18 snap-store"
# strict_snaps=""
# add classic snaps: classic_snaps="code"
# classic_snaps=""
# choose the snap channel. Possible options are: stable, candidate, beta, edge
# snap_channel="stable"
# Set to false to disable autologin in the livecd
# autologin="true"
@ -23,6 +33,9 @@
# possible values: grub;systemd-boot
# efi_boot_loader="grub"
# kernel parameters (array); example: custom_boot_args="'acpi_osi=Linux'"
# custom_boot_args=
# configure calamares for netinstall
# netinstall="false"
@ -34,20 +47,21 @@
# unset defaults to given values
# names must match systemd service names
# enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
# disable_systemd=()
# unset defaults to given values,
# names must match openrc service names
# enable_openrc=('acpid' 'bluetooth' 'consolekit' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
# disable_openrc=()
# enable_systemd=('avahi-daemon' 'bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep' 'ufw')
# disable_systemd=('pacman-init')
# unset defaults to given values
# addgroups="video,power,disk,storage,optical,network,lp,scanner,wheel"
# addgroups="lp,network,power,sys, wheel"
# the same workgroup name if samba is used
# smb_workgroup="Manjaro"
# default system shell is bash
# '/etc/defaults/useradd': " "
# userShell : "/bin/zsh"
# empty value will not be used
#user_shell=
################# live-session #################
# unset defaults to given value
@ -64,7 +78,4 @@
# services in enable_systemd array don't need to be listed here
# enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
# unset defaults to given values,
# names must match openrc service names
# services in enable_openrc array don't need to be listed here
# enable_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
# disable_systemd_live=()

View file

@ -91,6 +91,48 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<listitem><para>Branch where the mirrors in the iso will point.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option></term>
<listitem><para>Disable clean working directory step.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option></term>
<listitem><para>Build full iso profile including packages with the >extra flag.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-g KEY</option></term>
<listitem><para>The GPG key to use to sign the sfs images.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-h</option></term>
<listitem><para>Help.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-k linuxXXX</option></term>
<listitem><para>The kernel on the iso</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem><para>Enable persistence mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-q</option></term>
<listitem><para>Query settings and pretend build.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-r DIR</option></term>
@ -104,33 +146,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</varlistentry>
<varlistentry>
<term><option>-i systemd|openrc</option></term>
<term><option>-v</option></term>
<listitem><para>The init system on the iso</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-g KEY</option></term>
<listitem><para>The GPG key to use to sign the sfs images.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-k linuxXXX</option></term>
<listitem><para>The kernel on the iso</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option></term>
<listitem><para>Disable clean working directory step.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem><para>Enable persistence mode.</para></listitem>
<listitem><para>Verbose output to log file, show profile detail in combination with pretend.</para></listitem>
</varlistentry>
<varlistentry>
@ -144,24 +162,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<listitem><para>Generate iso from already created images, for example created with the -x option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem><para>Verbose output to log file, show profile detail in combination with pretend.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-q</option></term>
<listitem><para>Query settings and pretend build.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-h</option></term>
<listitem><para>Help.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

View file

@ -81,12 +81,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<listitem><para>Architecture that the yaml will be created for. Can be i686 or x86_64.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-i systemd|openrc</option></term>
<listitem><para>The init system the yaml will be created for.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-k linuxXXX</option></term>

View file

@ -70,16 +70,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<variablelist>
<varlistentry>
<term><option>-p PROFILE...</option></term>
<term><option>-d</option></term>
<listitem><para>Name of the build list or name of the directory
you will upload.</para></listitem>
<listitem><para>Use hidden remote directory.
The target directory name will be prefaced with a dot.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-c</option></term>
<term><option>-h</option></term>
<listitem><para>Create new remote release.</para></listitem>
<listitem><para>Help.</para></listitem>
</varlistentry>
<varlistentry>
@ -89,21 +89,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</varlistentry>
<varlistentry>
<term><option>-u</option></term>
<term><option>-p PROFILE...</option></term>
<listitem><para>Update remote iso.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option></term>
<listitem><para>Create a torrent from iso file.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem><para>Verbose output.</para></listitem>
<listitem><para>Name of the build list or name of the directory
you will upload.</para></listitem>
</varlistentry>
<varlistentry>
@ -113,9 +102,27 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</varlistentry>
<varlistentry>
<term><option>-h</option></term>
<term><option>-s</option></term>
<listitem><para>Help.</para></listitem>
<listitem><para>Sign ISO and create checksums before uploading.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-t</option></term>
<listitem><para>Create a torrent from iso file.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-u</option></term>
<listitem><para>Update remote iso.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem><para>Verbose output.</para></listitem>
</varlistentry>
</variablelist>

View file

@ -132,7 +132,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<term><varname>repo_tree=</varname></term>
<listitem><para>Manjaro package tree. Default is
"('core' 'extra' 'community' 'multilib' 'openrc')".
"('core' 'extra' 'community' 'multilib')".
</para></listitem>
</varlistentry>
@ -208,18 +208,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>initsys=</varname></term>
<listitem><para>Takes <option>systemd</option> (the default)
or <option>openrc</option>. Selecting and option will change
how the hostname, the displaymanager and services will be configured.
For services also controls if buildiso will use enable_systemd and
enable_systemd_live or enable_openrc and enable_openrc_live to determine
the default services that will be enabled automatically.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>kernel=</varname></term>
@ -237,7 +225,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><varname>account=</varname></term>
@ -245,10 +232,29 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ssh_agent=true|false</varname></term>
<listitem><para>When set true, the ssh-agent will be used to store
the passphrase.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>alt_storage=true|false</varname></term>
<listitem><para>When set true deployiso will upload to OSDN's
alternative server. Under some circumstances and depending on your
location the connection might be more stable.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>project=</varname></term>
<listitem><para>Default SF project name to be used for upload.
<listitem><para>Default OSDN project name to be used for upload.
If unset, 'manjaro' or 'manjaro-community' will be determined
automatically based on profile.
</para></listitem>
</varlistentry>
@ -274,14 +280,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>iso_mirrors=</varname></term>
<listitem><para>Array of iso mirrors that will be
used for webseeds.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

View file

@ -152,14 +152,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>enable_openrc=</varname></term>
<listitem><para>Array of services that will be
enabled in openrc systems.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>hostname=</varname></term>
@ -209,14 +201,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>enable_openrc_live=</varname></term>
<listitem><para>Array of services that will be
enabled in the openrc live-cd.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

View file

@ -55,10 +55,11 @@ _mnt_sfs() {
local mnt="${2}"
local img_fullname="${img##*/}"
local sfs_dev
local oper=$( [[ -n "${ip}" && -n "${miso_http_srv}" ]] && echo "mv" || echo "cp" )
if [[ "${copytoram}" == "y" ]]; then
msg -n ":: Copying squashfs image to RAM..."
if ! cp "${img}" "/run/miso/copytoram/${img_fullname}" ; then
if ! "${oper}" "${img}" "/run/miso/copytoram/${img_fullname}" ; then
echo "ERROR: while copy '${img}' to '/run/miso/copytoram/${img_fullname}'"
launch_interactive_shell
fi
@ -116,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%"
@ -157,7 +200,7 @@ miso_mount_handler() {
fi
if [[ "${checksum}" == "y" ]]; then
for fs in rootfs desktopfs mhwdfs livefs;do
for fs in rootfs desktopfs mhwdfs livefs; do
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs" ]]; then
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.md5" ]]; then
msg -n ":: Self-test requested, please wait..."
@ -177,7 +220,7 @@ miso_mount_handler() {
fi
if [[ "${verify}" == "y" ]]; then
for fs in rootfs desktopfs mhwdfs livefs;do
for fs in rootfs desktopfs mhwdfs livefs; do
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs" ]]; then
if [[ -f "/run/miso/bootmnt/${misobasedir}/${arch}/${fs}.sfs.sig" ]]; then
msg -n ":: Signature verification requested, please wait..."
@ -220,7 +263,7 @@ miso_mount_handler() {
local dest_sfs="/run/miso/sfs" dest_img="/run/miso/img"
local lower_dir
for sfs in livefs mhwdfs desktopfs rootfs;do
for sfs in livefs mhwdfs desktopfs rootfs; do
if [[ -f "${src}/${sfs}.sfs" ]]; then
_mnt_sfs "${src}/${sfs}.sfs" "${dest_sfs}/${sfs}"
if [[ -f "${dest_sfs}/${sfs}/${sfs}.img" ]]; then
@ -237,6 +280,8 @@ miso_mount_handler() {
if [[ "${copytoram}" == "y" ]]; then
umount -d /run/miso/bootmnt
mkdir -p /run/miso/bootmnt/${misobasedir}/${arch}
mount -o bind /run/miso/copytoram /run/miso/bootmnt/${misobasedir}/${arch}
fi
}

View file

@ -1,9 +1,56 @@
# vim: set ft=sh:
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 () {
[[ -n "${img_label}" ]] && img_dev="/dev/disk/by-label/${img_label}"
[[ -z "${img_flags}" ]] && img_flags="defaults"
if [[ -n "${img_dev}" && -n "${img_loop}" ]]; then
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
}
@ -31,5 +78,7 @@ miso_loop_mount_handler () {
if [[ "${copytoram}" == "y" ]]; then
losetup -d ${_dev_loop} 2>/dev/null
umount /run/miso/img_dev
else
echo $(readlink -f ${img_dev}) >> /run/miso/used_block_devices
fi
}

View file

@ -40,8 +40,8 @@ miso_pxe_http_mount_handler () {
local _src=${miso_http_srv}${misobasedir}/${arch}
for sfs in livefs mhwdfs desktopfs rootfs;do
if [[ -f "${_src}/${sfs}.sfs" ]]; then
for sfs in livefs mhwdfs desktopfs rootfs; do
if [[ ! -z "$( curl -L -s --head "${_src}/${sfs}.sfs" | grep "OK" )" ]]; then
_curl_get "${_src}/${sfs}.sfs" "/${arch}"
if [[ "${checksum}" == "y" ]]; then

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

@ -4,6 +4,8 @@ build() {
add_runscript
add_binary curl
add_file $(readlink -f /etc/ssl/certs/ca-certificates.crt) /etc/ssl/certs/ca-certificates.crt
}
help() {

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
@ -37,21 +37,23 @@ 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/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(){
local platform=i386-pc img='core.img' grub=$2/boot/grub efi=$2/efi/boot \
data=$1/usr/share/grub lib=$1/usr/lib/grub prefix=/boot/grub
data_live=$1/usr/share/grub lib=usr/lib/grub prefix=/boot/grub data=/usr/share/grub \
path="${work_dir}/rootfs"
prepare_dir ${grub}/${platform}
cp ${data}/cfg/*.cfg ${grub}
cp ${data_live}/cfg/*.cfg ${grub}
cp ${lib}/${platform}/* ${grub}/${platform}
cp ${path}/${lib}/${platform}/* ${grub}/${platform}
msg2 "Building %s ..." "${img}"
@ -73,18 +75,21 @@ prepare_grub(){
prepare_dir ${efi}
prepare_dir ${grub}/${platform}
cp ${lib}/${platform}/* ${grub}/${platform}
cp ${path}/${lib}/${platform}/* ${grub}/${platform}
msg2 "Building %s ..." "${img}"
grub-mkimage -d ${grub}/${platform} -o ${efi}/${img} -O ${platform} -p ${prefix} iso9660
prepare_dir ${grub}/themes
cp -r ${data}/themes/${iso_name}-live ${grub}/themes/
cp -r ${data_live}/themes/${iso_name}-live ${grub}/themes/
cp ${data}/unicode.pf2 ${grub}
cp -r ${data}/{locales,tz,video} ${grub}
cp -r ${data_live}/{locales,tz} ${grub}
local size=8M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img"
msg2 "Set menu_show_once=1 in '${grub}/grubenv'"
grub-editenv ${grub}/grubenv set menu_show_once=1
local size=4M mnt="${mnt_dir}/efiboot" efi_img="$2/efi.img"
msg2 "Creating fat image of %s ..." "${size}"
truncate -s ${size} "${efi_img}"
mkfs.fat -n MISO_EFI "${efi_img}" &>/dev/null

View file

@ -10,9 +10,9 @@
# GNU General Public License for more details.
copy_overlay(){
if [[ -e $1 ]];then
if [[ -e $1 ]]; then
msg2 "Copying [%s] ..." "${1##*/}"
if [[ -L $1 ]];then
if [[ -L $1 ]]; then
cp -a --no-preserve=ownership $1/* $2
else
cp -LR $1/* $2
@ -21,7 +21,7 @@ copy_overlay(){
}
add_svc_rc(){
if [[ -f $1/etc/init.d/$2 ]];then
if [[ -f $1/etc/init.d/$2 ]]; then
msg2 "Setting %s ..." "$2"
chroot $1 rc-update add $2 default &>/dev/null
fi
@ -29,14 +29,19 @@ add_svc_rc(){
add_svc_sd(){
if [[ -f $1/etc/systemd/system/$2.service ]] || \
[[ -f $1/usr/lib/systemd/system/$2.service ]];then
[[ -f $1/usr/lib/systemd/system/$2.service ]]; then
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(){
if [[ -f $1/etc/conf.d/xdm ]];then
if [[ -f $1/etc/conf.d/xdm ]]; then
local conf='DISPLAYMANAGER="'${displaymanager}'"'
sed -i -e "s|^.*DISPLAYMANAGER=.*|${conf}|" $1/etc/conf.d/xdm
fi
@ -45,48 +50,429 @@ set_xdm(){
configure_mhwd_drivers(){
local path=$1${mhwd_repo}/ \
drv_path=$1/var/lib/mhwd/db/pci/graphic_drivers
info "Configuring mwwd db ..."
if [ -z "$(ls $path | grep catalyst-utils 2> /dev/null)" ]; then
msg2 "Disabling Catalyst driver"
mkdir -p $drv_path/catalyst/
touch $drv_path/catalyst/MHWDCONFIG
info "Configuring mhwd db ..."
if [ -z "$(ls $path | grep nvidia-390xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 390xx driver"
mkdir -p $drv_path/nvidia-390xx/
echo "" > $drv_path/nvidia-390xx/MHWDCONFIG
msg2 "Disabling Nvidia 390xx Bumblebee driver"
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-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia driver"
mkdir -p $drv_path/nvidia/
touch $drv_path/nvidia/MHWDCONFIG
msg2 "Disabling Nvidia Bumblebee driver"
mkdir -p $drv_path/hybrid-intel-nvidia-bumblebee/
touch $drv_path/hybrid-intel-nvidia-bumblebee/MHWDCONFIG
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-304xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 304xx driver"
mkdir -p $drv_path/nvidia-304xx/
touch $drv_path/nvidia-304xx/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
if [ -z "$(ls $path | grep nvidia-340xx-utils 2> /dev/null)" ]; then
msg2 "Disabling Nvidia 340xx driver"
mkdir -p $drv_path/nvidia-340xx/
touch $drv_path/nvidia-340xx/MHWDCONFIG
local drv_path=$1/var/lib/mhwd/db/pci/network_drivers
if [ -z "$(ls $path | grep broadcom-wl 2> /dev/null)" ]; then
msg2 "Disabling broadcom-wl driver"
mkdir -p $drv_path/broadcom-wl/
echo "" > $drv_path/broadcom-wl/MHWDCONFIG
fi
if [ -z "$(ls $path | grep xf86-video-amdgpu 2> /dev/null)" ]; then
msg2 "Disabling AMD gpu driver"
mkdir -p $drv_path/xf86-video-amdgpu/
touch $drv_path/xf86-video-amdgpu/MHWDCONFIG
if [ -z "$(ls $path | grep rt3562sta 2> /dev/null)" ]; then
msg2 "Disabling rt3562sta driver"
mkdir -p $drv_path/rt3562sta/
echo "" > $drv_path/rt3562sta/MHWDCONFIG
fi
if [ -z "$(ls $path | grep r8168 2> /dev/null)" ]; then
msg2 "Disabling r8168 driver"
mkdir -p $drv_path/r8168/
echo "" > $drv_path/r8168/MHWDCONFIG
fi
}
configure_lsb(){
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_old(){
msg2 "Configuring branding"
echo "---
componentName: manjaro
# This selects between different welcome texts. When false, uses
# the traditional 'Welcome to the %1 installer.', and when true,
# uses 'Welcome to the Calamares installer for %1.'. This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: ${welcomestyle}
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: ${welcomelogo}
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", never expand, use *windowSize*
windowExpanding: ${windowexp}
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: ${windowsize}
# 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}
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
strings:
productName: ${dist_name} Linux
shortProductName: ${dist_name}
version: ${dist_release}
shortVersion: ${dist_release}
versionedName: ${dist_name} Linux ${dist_release} "\"${dist_codename}"\"
shortVersionedName: ${dist_name} ${dist_release}
bootloaderEntryName: ${dist_name}
# These images are loaded from the branding module directory.
#
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use 'welcomeExpandingLogo' to make it non-scaled.
# Recommended size is 320x150.
images:
productLogo: "logo.png"
productIcon: "logo.png"
productWelcome: "languages.png"
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
slideshow: "show.qml"
# 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
# - sidebarText is the (foreground) text color
# - sidebarTextHighlight sets the background of the selected (current) step.
# Optional, and defaults to the application palette.
# - sidebarSelect is the text color of the selected step.
#
style:
sidebarBackground: "\"${sidebarbackground}"\"
sidebarText: "\"${sidebartext}"\"
sidebarTextSelect: "\"${sidebartextselect}"\"
sidebarTextHighlight: "\"${sidebartexthighlight}"\"" > $1/usr/share/calamares/branding/manjaro/branding.desc
}
configure_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/$2/logind.conf
local conf=$1/etc/systemd/logind.conf
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' "$conf"
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' "$conf"
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' "$conf"
@ -98,28 +484,31 @@ 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 [%s]" "${initsys}"
case ${initsys} in
'openrc')
for svc in ${enable_openrc[@]}; do
[[ $svc == "xdm" ]] && set_xdm "$1"
add_svc_rc "$1" "$svc"
done
for svc in ${enable_openrc_live[@]}; do
add_svc_rc "$1" "$svc"
done
;;
'systemd')
for svc in ${enable_systemd[@]}; do
add_svc_sd "$1" "$svc"
done
for svc in ${enable_systemd_live[@]}; do
add_svc_sd "$1" "$svc"
done
;;
esac
info "Done configuring [%s]" "${initsys}"
info "Configuring services"
use_apparmor="false"
apparmor_boot_args=""
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"
done
if [[ ${use_apparmor} == 'true' ]]; then
msg2 "Enable apparmor kernel parameters"
apparmor_boot_args="'apparmor=1' 'security=apparmor'"
fi
info "Done configuring services"
}
write_live_session_conf(){
@ -143,7 +532,7 @@ write_live_session_conf(){
echo '' >> ${conf}
echo '# live group membership' >> ${conf}
echo "addgroups='${addgroups}'" >> ${conf}
if [[ -n ${smb_workgroup} ]];then
if [[ -n ${smb_workgroup} ]]; then
echo '' >> ${conf}
echo '# samba workgroup' >> ${conf}
echo "smb_workgroup=${smb_workgroup}" >> ${conf}
@ -155,24 +544,15 @@ configure_hosts(){
}
configure_system(){
case ${initsys} in
'systemd')
configure_logind "$1" "systemd"
configure_journald "$1"
configure_logind "$1"
configure_journald "$1"
# Prevent some services to be started in the livecd
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
| tee "${path}/etc/.updated" >"${path}/var/.updated"
# Prevent some services to be started in the livecd
echo 'File created by manjaro-tools. See systemd-update-done.service(8).' \
| tee "${path}/etc/.updated" >"${path}/var/.updated"
msg2 "Disable systemd-gpt-auto-generator"
ln -sf /dev/null "${path}/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"
;;
'openrc')
configure_logind "$1" "elogind"
# local hn='hostname="'${hostname}'"'
# sed -i -e "s|^.*hostname=.*|${hn}|" $1/etc/conf.d/hostname
;;
esac
msg2 "Disable systemd-gpt-auto-generator"
ln -sf /dev/null "${path}/usr/lib/systemd/system-generators/systemd-gpt-auto-generator"
echo ${hostname} > $1/etc/hostname
}
@ -194,9 +574,9 @@ configure_thus(){
echo "INITRAMFS = \"$(echo ${default_image} | sed s'|/boot/||')\"" >> "$conf"
echo "FALLBACK = \"$(echo ${fallback_image} | sed s'|/boot/||')\"" >> "$conf"
if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]];then
sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
fi
# if [[ -f $1/usr/share/applications/thus.desktop && -f $1/usr/bin/kdesu ]]; then
# sed -i -e 's|sudo|kdesu|g' $1/usr/share/applications/thus.desktop
# fi
}
configure_live_image(){
@ -205,13 +585,13 @@ configure_live_image(){
configure_system "$1"
configure_services "$1"
configure_calamares "$1"
[[ ${edition} == "sonar" ]] && configure_thus "$1"
# [[ ${edition} == "sonar" ]] && configure_thus "$1"
write_live_session_conf "$1"
msg "Done configuring [livefs]"
}
make_repo(){
repo-add $1${mhwd_repo}/mhwd.db.tar.gz $1${mhwd_repo}/*pkg*z
repo-add $1${mhwd_repo}/mhwd.db.tar.gz $1${mhwd_repo}/*pkg.tar*
}
copy_from_cache(){
@ -228,7 +608,7 @@ copy_from_cache(){
-B "${build_mirror}/${target_branch}" \
"$1" \
pacman -v -Sp $2 --noconfirm > "$list"
sed -ni '/.pkg.tar.xz/p' "$list"
sed -ni '/pkg.tar/p' "$list"
sed -i "s/.*\///" "$list"
msg2 "Copying mhwd package cache ..."
@ -251,7 +631,7 @@ chroot_clean(){
for image in "$1"/*fs; do
[[ -d ${image} ]] || continue
local name=${image##*/}
if [[ $name != "mhwdfs" ]];then
if [[ $name != "mhwdfs" ]]; then
msg2 "Deleting chroot [%s] (%s) ..." "$name" "${1##*/}"
lock 9 "${image}.lock" "Locking chroot '${image}'"
if [[ "$(stat -f -c %T "${image}")" == btrfs ]]; then
@ -268,13 +648,20 @@ clean_up_image(){
msg2 "Cleaning [%s]" "${1##*/}"
local path
if [[ ${1##*/} == 'mhwdfs' ]];then
if [[ ${1##*/} == 'mhwdfs' ]]; then
path=$1/var
if [[ -d $path ]];then
if [[ -d $path/lib/mhwd ]]; then
mv $path/lib/mhwd $1 &> /dev/null
fi
if [[ -d $path ]]; then
find "$path" -mindepth 0 -delete &> /dev/null
fi
if [[ -d $1/mhwd ]]; then
mkdir -p $path/lib
mv $1/mhwd $path/lib &> /dev/null
fi
path=$1/etc
if [[ -d $path ]];then
if [[ -d $path ]]; then
find "$path" -mindepth 0 -delete &> /dev/null
fi
else
@ -285,7 +672,7 @@ clean_up_image(){
find "$path" -name 'initramfs*.img' -delete &> /dev/null
fi
path=$1/var/lib/pacman/sync
if [[ -d $path ]];then
if [[ -d $path ]]; then
find "$path" -type f -delete &> /dev/null
fi
path=$1/var/cache/pacman/pkg
@ -297,11 +684,11 @@ clean_up_image(){
find "$path" -type f -delete &> /dev/null
fi
path=$1/var/tmp
if [[ -d $path ]];then
if [[ -d $path ]]; then
find "$path" -mindepth 1 -delete &> /dev/null
fi
path=$1/tmp
if [[ -d $path ]];then
if [[ -d $path ]]; then
find "$path" -mindepth 1 -delete &> /dev/null
fi
fi

View file

@ -21,7 +21,7 @@ mount_img() {
}
umount_img() {
if [[ -n ${IMG_ACTIVE_MOUNTS[@]} ]];then
if [[ -n ${IMG_ACTIVE_MOUNTS[@]} ]]; then
info "umount: [%s]" "${IMG_ACTIVE_MOUNTS[@]}"
umount "${IMG_ACTIVE_MOUNTS[@]}"
unset IMG_ACTIVE_MOUNTS
@ -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
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

@ -49,7 +49,7 @@ run_safe() {
restoretrap=$(trap -p ERR)
trap 'error_function $func' ERR
if ${verbose};then
if ${verbose}; then
run_log "$func"
else
"$func"
@ -110,7 +110,7 @@ make_sfs() {
fi
fi
if ${persist};then
if ${persist}; then
local size=32G
local mnt="${mnt_dir}/${name}"
msg2 "Creating ext4 image of %s ..." "${size}"
@ -129,7 +129,7 @@ make_sfs() {
msg2 "Creating SquashFS image, this may take some time..."
local used_kernel=${kernel:5:1} mksfs_args=()
if ${persist};then
if ${persist}; then
mksfs_args+=(${work_dir}/${name}.img)
else
mksfs_args+=(${src})
@ -137,14 +137,15 @@ make_sfs() {
mksfs_args+=(${sfs} -noappend)
local highcomp="-b 256K -Xbcj x86" comp='xz'
local highcomp
if [[ "${name}" == "mhwdfs" && ${used_kernel} < "4" ]]; then
mksfs_args+=(-comp lz4)
else
mksfs_args+=(-comp ${comp} ${highcomp})
fi
if ${verbose};then
[[ "${iso_compression}" == "xz" ]] && highcomp="-b 256K -Xbcj x86"
[[ "${iso_compression}" == "zstd" ]] && highcomp="-b 256K -Xcompression-level 20" #compression level max 22 (default 15)
mksfs_args+=(-comp ${iso_compression} ${highcomp})
if ${verbose}; then
mksquashfs "${mksfs_args[@]}" >/dev/null
else
mksquashfs "${mksfs_args[@]}"
@ -152,7 +153,7 @@ make_sfs() {
make_checksum "${dest}" "${name}"
${persist} && rm "${src}.img"
if [[ -n ${gpgkey} ]];then
if [[ -n ${gpgkey} ]]; then
make_sig "${dest}" "${name}"
fi
@ -161,55 +162,34 @@ make_sfs() {
assemble_iso(){
msg "Creating ISO image..."
local iso_publisher iso_app_id
iso_publisher="$(get_osname) <$(get_disturl)>"
iso_app_id="$(get_osname) Live/Rescue CD"
# xorriso -as mkisofs \
# --protective-msdos-label \
# -volid "${iso_label}" \
# -appid "${iso_app_id}" \
# -publisher "${iso_publisher}" \
# -preparer "Prepared by manjaro-tools/${0##*/}" \
# -e /efi.img \
# -b boot/grub/i386-pc/eltorito.img \
# -c boot.catalog \
# -no-emul-boot \
# -boot-load-size 4 \
# -boot-info-table \
# -graft-points \
# --grub2-boot-info \
# --grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
# --sort-weight 0 / --sort-weight 1 /boot \
# -isohybrid-gpt-basdat \
# -eltorito-alt-boot \
# -output "${iso_dir}/${iso_file}" \
# "${iso_root}/"
local iso_publisher="$(get_osname) <$(get_disturl)>" \
iso_app_id="$(get_osname) Live/Rescue CD" \
mod_date=$(date -u +%Y-%m-%d-%H-%M-%S-00 | sed -e s/-//g)
xorriso -as mkisofs \
--protective-msdos-label \
-volid "${iso_label}" \
-appid "${iso_app_id}" \
-publisher "${iso_publisher}" \
-preparer "Prepared by manjaro-tools/${0##*/}" \
-b boot/grub/i386-pc/eltorito.img \
-c boot.catalog \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-graft-points \
--grub2-boot-info \
--grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
--sort-weight 0 / --sort-weight 1 /boot \
-eltorito-alt-boot \
-efi-boot-part --efi-boot-image \
-e efi.img \
-no-emul-boot \
-isohybrid-gpt-basdat \
-output "${iso_dir}/${iso_file}" \
"${iso_root}/"
--modification-date=${mod_date} \
--protective-msdos-label \
-volid "${iso_label}" \
-appid "${iso_app_id}" \
-publisher "${iso_publisher}" \
-preparer "Prepared by manjaro-tools/${0##*/}" \
-r -graft-points -no-pad \
--sort-weight 0 / \
--sort-weight 1 /boot \
--grub2-mbr ${iso_root}/boot/grub/i386-pc/boot_hybrid.img \
-iso_mbr_part_type 0x00 \
-partition_offset 16 \
-b boot/grub/i386-pc/eltorito.img \
-c boot.catalog \
-no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info \
-eltorito-alt-boot \
-append_partition 2 0xef ${iso_root}/efi.img \
-e --interval:appended_partition_2:all:: \
-no-emul-boot \
-full-iso9660-filenames \
-iso-level 3 -rock -joliet \
-o ${iso_dir}/${iso_file} \
${iso_root}/
}
# Build ISO
@ -218,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
@ -226,26 +210,71 @@ make_iso() {
# Sanity checks
[[ ! -d "${iso_root}" ]] && return 1
if [[ -f "${iso_dir}/${iso_file}" ]]; then
msg2 "Removing existing bootable image..."
rm -rf "${iso_dir}/${iso_file}"
msg2 "Removing ${iso_file} related files ..."
[[ -f "${iso_dir}/${iso_file}" ]] && rm -f "${iso_dir}/${iso_file}"
[[ -f "${iso_dir}/${iso_file}.sig" ]] && rm -f "${iso_dir}/${iso_file}.sig"
[[ -f "${iso_dir}/${iso_file}.sha1" ]] && rm -f "${iso_dir}/${iso_file}.sha1"
[[ -f "${iso_dir}/${iso_file}.sha256" ]] && rm -f "${iso_dir}/${iso_file}.sha256"
[[ -f "${iso_dir}/${iso_file}.torrent" ]] && rm -f "${iso_dir}/${iso_file}.torrent"
fi
assemble_iso
${permalink} && gen_permalink
msg "Done [Build ISO]"
}
gen_permalink(){
if [[ ${edition} == "community" ]] || [[ ${edition} == "manjaro" ]]; then
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 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+="?>"
## 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
}
gen_iso_fn(){
local vars=() name
vars+=("${iso_name}")
if ! ${chrootcfg};then
if ! ${chrootcfg}; then
[[ -n ${profile} ]] && vars+=("${profile}")
fi
[[ ${initsys} == 'openrc' ]] && vars+=("${initsys}")
vars+=("${dist_release}")
vars+=("${target_branch}")
vars+=("${target_arch}")
for n in ${vars[@]};do
[[ ! ${target_branch} == "stable" ]] && vars+=("${target_branch}")
[[ ${extra} == 'false' ]] && vars+=("minimal")
vars+=("$(date +%y%m%d)")
vars+=("${kernel}")
[[ ${target_arch} == "i686" ]] && vars+=("${target_arch}")
for n in ${vars[@]}; do
name=${name:-}${name:+-}${n}
done
echo $name
}
@ -256,6 +285,38 @@ reset_pac_conf(){
-i "$1/etc/pacman.conf"
}
# Snap support
function seed_snaps() {
local SEED_DIR="/var/lib/snapd/seed"
local SEED_CHANNEL="${snap_channel}"
local SEED_SNAPS="${strict_snaps} ${classic_snaps}"
if [[ -n "${strict_snaps}" ]] || [[ -n "${classic_snaps}" ]]; then
msg2 "Configuring snaps"
# Preseeded snaps should be downloaded from a versioned channel
rm -rfv "$1/${SEED_DIR}"
mkdir -p "$1/${SEED_DIR}/snaps"
mkdir -p "$1/${SEED_DIR}/assertions"
SEED_LIST=()
# Update SEED_LIST
for SEED_SNAP in ${SEED_SNAPS}; do
if [[ "${SEED_SNAP}" == "core" ]] || [[ "${SEED_SNAP}" == "core16" ]] || [[ "${SEED_SNAP}" == "core18" ]]; then
SEED_LIST+=(--snap=${SEED_SNAP}=stable)
else
SEED_LIST+=(--snap=${SEED_SNAP}=${SEED_CHANNEL})
fi
done
# Create model and account assertions
# Runs outside the container.
snap known model > /tmp/generic.model
snap prepare-image --arch amd64 --classic /tmp/generic.model "${SEED_LIST[@]}" "$1"
else
msg2 "No snaps found in profile. Skipping adding snaps"
fi
}
# Base installation (rootfs)
make_image_root() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
@ -265,6 +326,11 @@ make_image_root() {
chroot_create "${path}" "${packages}" || die
# profide multilib usage to mhwd-script
if [[ ! -z ${multilib} ]]; then
echo 'MHWD64_IS_LIB32="'${multilib}'"' > "${path}/etc/mhwd-x86_64.conf"
fi
pacman -Qr "${path}" > "${path}/rootfs-pkgs.txt"
copy_overlay "${profile_dir}/root-overlay" "${path}"
@ -292,8 +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 [[ -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}
@ -323,12 +402,27 @@ make_image_live() {
copy_overlay "${profile_dir}/live-overlay" "${path}"
configure_live_image "${path}"
# 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)"
@ -352,7 +446,7 @@ make_image_mhwd() {
rm ${path}${mhwd_repo}/${mhwd_clean}
done
fi
cp ${DATADIR}/pacman-mhwd.conf ${path}/opt
cp ${DATADIR}/pacman-mhwd.conf ${path}/opt/mhwd
make_repo "${path}"
configure_mhwd_drivers "${path}"
@ -397,8 +491,7 @@ make_image_boot() {
configure_grub(){
local default_args="misobasedir=${iso_name} misolabel=${iso_label}" \
boot_args=('quiet')
[[ ${initsys} == 'systemd' ]] && boot_args+=('systemd.show_status=1')
boot_args=('quiet' 'systemd.show_status=1' ${custom_boot_args} ${apparmor_boot_args})
sed -e "s|@DIST_NAME@|${dist_name}|g" \
-e "s|@ARCH@|${target_arch}|g" \
@ -408,15 +501,20 @@ configure_grub(){
-i $1
}
configure_grub_theme(){
sed -e "s|@ISO_NAME@|${iso_name}|" -i "$1"
}
make_grub(){
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
msg "Prepare [/iso/boot/grub]"
local path="${work_dir}/rootfs"
local path="${work_dir}/livefs"
prepare_grub "${path}" "${iso_root}"
configure_grub "${iso_root}/boot/grub/kernels.cfg"
configure_grub_theme "${iso_root}/boot/grub/variable.cfg"
: > ${work_dir}/build.${FUNCNAME}
msg "Done [/iso/boot/grub]"
@ -425,28 +523,24 @@ make_grub(){
check_requirements(){
[[ -f ${run_dir}/repo_info ]] || die "%s is not a valid iso profiles directory!" "${run_dir}"
if ! $(is_valid_arch_iso ${target_arch});then
if ! $(is_valid_arch_iso ${target_arch}); then
die "%s is not a valid arch!" "${target_arch}"
fi
if ! $(is_valid_branch ${target_branch});then
if ! $(is_valid_branch ${target_branch}); then
die "%s is not a valid branch!" "${target_branch}"
fi
if ! is_valid_init "${initsys}";then
die "%s is not a valid init system!" "${initsys}"
if ! $(is_valid_comp ${iso_compression}); then
die "%s is not a valid compression algorithm!" "${iso_compression}"
fi
local iso_kernel=${kernel:5:1} host_kernel=$(uname -r)
if [[ ${iso_kernel} < "4" ]] \
|| [[ ${host_kernel%%*.} < "4" ]];then
die "The host and iso kernels must be version>=4.0!"
fi
local iso_kernel=${kernel:5:1}
[[ ${iso_kernel} < "4" ]] && die "ISO kernel must be version>=4.0!"
}
compress_images(){
local timer=$(get_timer)
run_safe "make_iso"
user_own "${iso_dir}" "-R"
user_own "${cache_dir_iso}" "-R"
show_elapsed_time "${FUNCNAME}" "${timer}"
}
@ -483,7 +577,7 @@ archive_logs(){
make_profile(){
msg "Start building [%s]" "${profile}"
if ${clean_first};then
if ${clean_first}; then
chroot_clean "${chroots_iso}/${profile}/${target_arch}"
local unused_arch=''
@ -491,7 +585,7 @@ make_profile(){
i686) unused_arch='x86_64' ;;
x86_64) unused_arch='i686' ;;
esac
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]];then
if [[ -d "${chroots_iso}/${profile}/${unused_arch}" ]]; then
chroot_clean "${chroots_iso}/${profile}/${unused_arch}"
fi
clean_iso_root "${iso_root}"
@ -521,7 +615,7 @@ make_profile(){
get_pacman_conf(){
local user_conf=${profile_dir}/user-repos.conf pac_arch='default' conf
[[ "${target_arch}" == 'x86_64' ]] && pac_arch='multilib'
if [[ -f ${user_conf} ]];then
if [[ -f ${user_conf} ]]; then
info "detected: %s" "user-repos.conf"
check_user_repos_conf "${user_conf}"
conf=${tmp_dir}/custom-pacman.conf
@ -545,6 +639,9 @@ load_profile(){
iso_file=$(gen_iso_fn).iso
[[ ${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}
@ -555,7 +652,7 @@ load_profile(){
prepare_dir "${mnt_dir}"
prepare_dir "${iso_dir}"
user_own "${iso_dir}"
user_own "${cache_dir_iso}" "-R"
}
prepare_profile(){

View file

@ -45,33 +45,31 @@ chroot_part_mount() {
}
select_os(){
local os_list=( $(detect) ) count=${#os_list[@]}
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
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
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(){
@ -99,7 +97,7 @@ chroot_mount_partitions(){
[[ ${chroot_arch} == x86-64 ]] && chroot_arch=${chroot_arch/-/_}
case ${target_arch} in
i686)
if [[ ${chroot_arch} == x86_64 ]];then
if [[ ${chroot_arch} == x86_64 ]]; then
die "You can't chroot from %s host into %s!" "${target_arch}" "${chroot_arch}"
fi
;;

View file

@ -95,7 +95,7 @@ die() {
}
import(){
if [[ -r $1 ]];then
if [[ -r $1 ]]; then
source $1
else
die "Could not import $1"

View file

@ -38,13 +38,13 @@ get_makepkg_conf(){
# $1: target_arch
prepare_conf(){
if ! is_valid_arch_pkg "$1";then
if ! is_valid_arch_pkg "$1"; then
die "%s is not a valid arch!" "$1"
fi
local pac_arch='default'
if [[ "$1" == 'multilib' ]];then
if [[ "$1" == 'multilib' ]]; then
pac_arch='multilib'
is_multilib=true
fi
@ -69,39 +69,11 @@ find_pkg(){
[[ -z $result ]] && die "%s is not a valid package or build list!" "$1"
}
load_group(){
local _multi \
_space="s| ||g" \
_clean=':a;N;$!ba;s/\n/ /g' \
_com_rm="s|#.*||g" \
devel_group='' \
file=${DATADIR}/base-devel-udev
info "Loading custom group: %s" "$file"
if ${is_multilib}; then
_multi="s|>multilib||g"
else
_multi="s|>multilib.*||g"
fi
devel_group=$(sed "$_com_rm" "$file" \
| sed "$_space" \
| sed "$_multi" \
| sed "$_clean")
echo ${devel_group}
}
init_base_devel(){
if ${udev_root};then
base_packages=( "$(load_group)" )
if ${is_multilib}; then
base_packages=('base-devel' 'multilib-devel')
else
if ${is_multilib};then
base_packages=('base-devel' 'multilib-devel')
else
base_packages=('base-devel')
fi
base_packages=('base-devel')
fi
}
@ -143,7 +115,7 @@ clean_up(){
msg "Cleaning up ..."
msg2 "Cleaning [%s]" "${pkg_dir}"
find ${pkg_dir} -maxdepth 1 -name "*.*" -delete #&> /dev/null
if [[ -z $SRCDEST ]];then
if [[ -z $SRCDEST ]]; then
msg2 "Cleaning [source files]"
find $PWD -maxdepth 1 -name '*.?z?' -delete #&> /dev/null
fi
@ -157,10 +129,11 @@ move_to_cache(){
local src="$1"
[[ -n $PKGDEST ]] && src="$PKGDEST/$1"
[[ ! -f $src ]] && die
msg2 "Moving [%s] -> [%s]" "${src##*/}" "${pkg_dir}"
mv $src ${pkg_dir}/
if [[ ${pkg_dir} != $PKGDEST ]]; then
msg2 "Moving [%s] -> [%s]" "${src##*/}" "${pkg_dir}"
mv $src ${pkg_dir}/
fi
${sign} && sign_pkg "${src##*/}"
[[ -n $PKGDEST ]] && rm "$1"
user_own "${pkg_dir}" "-R"
}
@ -168,7 +141,7 @@ archive_logs(){
local archive name="$1" ext=log.tar.xz ver src=${tmp_dir}/archives.list target='.'
ver=$(get_full_version "$name")
archive="${name}-${ver}-${target_arch}"
if [[ -n $LOGDEST ]];then
if [[ -n $LOGDEST ]]; then
target=$LOGDEST
find $target -maxdepth 1 -name "$archive*.log" -printf "%f\n" > $src
else
@ -183,8 +156,8 @@ archive_logs(){
post_build(){
source PKGBUILD
local ext='pkg.tar.xz' tarch ver src
for pkg in ${pkgname[@]};do
local ext='pkg.tar.zst' tarch ver src
for pkg in ${pkgname[@]}; do
case $arch in
any) tarch='any' ;;
*) tarch=${target_arch}

View file

@ -9,6 +9,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
import ${LIBDIR}/util.sh
# $1: sofile
# $2: soarch
process_sofile() {

View file

@ -37,8 +37,8 @@ clone_tree(){
sync_tree_manjaro(){
cd ${tree_dir}
for repo in ${repo_tree[@]};do
if [[ -d packages-${repo} ]];then
for repo in ${repo_tree[@]}; do
if [[ -d packages-${repo} ]]; then
cd packages-${repo}
sync_tree "${repo}"
cd ..
@ -52,8 +52,8 @@ sync_tree_manjaro(){
sync_tree_abs(){
local repo_tree_abs=('packages' 'community')
cd ${tree_dir_abs}
for repo in ${repo_tree_abs[@]};do
if [[ -d ${repo} ]];then
for repo in ${repo_tree_abs[@]}; do
if [[ -d ${repo} ]]; then
cd ${repo}
sync_tree "${repo}"
cd ..

View file

@ -9,26 +9,27 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
local MINIMAL
connect(){
local home="/home/frs/project"
echo "${account},${project}@frs.${host}:${home}/${project}"
${alt_storage} && server="storage-in" || server="storage"
local storage="@${server}.osdn.net:/storage/groups/m/ma/"
echo "${account}${storage}${project}"
}
gen_webseed(){
local webseed seed="$1"
for mirror in ${iso_mirrors[@]};do
webseed=${webseed:-}${webseed:+,}"http://${mirror}.dl.${seed}"
done
echo ${webseed}
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
local seed=${host}/project/${project}/${target_dir}/${iso##*/}
local mktorrent_args=(-c "${torrent_meta}" -p -l ${piece_size} -a ${tracker_url} -w $(gen_webseed ${seed}))
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)
msg2 "Creating (%s) ..." "${iso##*/}.torrent"
mktorrent ${mktorrent_args[*]} -o ${iso}.torrent ${iso}
@ -38,18 +39,223 @@ make_torrent(){
prepare_transfer(){
profile="$1"
hidden="$2"
edition=$(get_edition "${profile}")
url=$(connect)
[[ -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}"
${torrent} && make_torrent
${hidden} && target_dir="${profile}/.${dist_release}"
}
start_agent(){
msg2 "Initializing SSH agent..."
ssh-agent | sed 's/^echo/#echo/' > "$1"
chmod 600 "$1"
. "$1" > /dev/null
ssh-add
}
ssh_add(){
local ssh_env="$USER_HOME/.ssh/environment"
if [ -f "${ssh_env}" ]; then
. "${ssh_env}" > /dev/null
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
start_agent ${ssh_env};
}
else
start_agent ${ssh_env};
fi
}
sync_dir(){
prepare_transfer "$1"
msg "Start upload [%s] ..." "$1"
rsync ${rsync_args[*]} ${src_dir}/ ${url}/${target_dir}/
msg "Done upload [%s]" "$1"
show_elapsed_time "${FUNCNAME}" "${timer_start}"
count=1
max_count=10
prepare_transfer "$1" "${hidden}"
${torrent} && make_torrent
${sign} && signiso "${src_dir}"
${ssh_agent} && ssh_add
msg "Start upload [%s] to [%s] ..." "$1" "${project}"
while [[ $count -le $max_count ]]; do
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))
${upd_homepage} && pull_hp_repo
${shell_upload} && upload_permalinks
msg "Done upload [%s]" "$1"
show_elapsed_time "${FUNCNAME}" "${timer_start}"
fi
done
}
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 filename=".latest.php"
local php="latest.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,22 +10,20 @@
# GNU General Public License for more details.
write_machineid_conf(){
local conf="${modules_dir}/machineid.conf" switch='false'
local conf="${etc_config_dir}/machineid.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
[[ ${initsys} == 'systemd' ]] && switch='true'
echo "systemd: ${switch}" >> $conf
echo "systemd: true" >> $conf
echo "dbus: true" >> $conf
echo "symlink: true" >> $conf
}
write_finished_conf(){
msg2 "Writing %s ..." "finished.conf"
local conf="${modules_dir}/finished.conf" cmd="loginctl reboot"
local conf="${etc_config_dir}/finished.conf" cmd="systemctl reboot"
echo '---' > "$conf"
echo 'restartNowEnabled: true' >> "$conf"
echo 'restartNowChecked: false' >> "$conf"
[[ ${initsys} == 'systemd' ]] && cmd="systemctl reboot"
echo "restartNowCommand: \"${cmd}\"" >> "$conf"
}
@ -44,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"
@ -58,55 +56,83 @@ write_bootloader_conf(){
echo 'grubInstall: "grub-install"' >> "$conf"
echo 'grubMkconfig: "grub-mkconfig"' >> "$conf"
echo 'grubCfg: "/boot/grub/grub.cfg"' >> "$conf"
echo 'grubProbe: "grub-probe"' >> "$conf"
echo 'efiBootMgr: "efibootmgr"' >> "$conf"
echo '#efiBootloaderId: "dirname"' >> "$conf"
echo 'installEFIFallback: true' >> "$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"
echo 'services:' >> "$conf"
echo ' enabled:' >> "$conf"
for s in ${enable_openrc[@]};do
echo " - name: $s" >> "$conf"
echo ' runlevel: default' >> "$conf"
done
if [[ -n ${disable_openrc[@]} ]];then
echo ' disabled:' >> "$conf"
for s in ${disable_openrc[@]};do
echo " - name: $s" >> "$conf"
echo ' runlevel: default' >> "$conf"
}
write_services_conf(){
local conf="${etc_config_dir}/services.conf"
local check="${modules_dir}/services.conf"
msg2 "Writing %s ..." "${conf##*/}"
echo '---' > "$conf"
echo '' >> "$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"
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_services_conf(){
local conf="${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"
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
}
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"
@ -121,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"
@ -143,35 +169,65 @@ 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"
local IFS=','
for g in ${addgroups[@]};do
for g in ${addgroups[@]}; do
echo " - $g" >> "$conf"
done
unset IFS
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
echo "avatarFilePath: ~/.face" >> "$conf" # mostly used file-name for avatar
if [[ -n "$user_shell" ]]; then
echo "userShell: $user_shell" >> "$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"
@ -192,13 +248,19 @@ 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
echo 'geoip:' >> "$conf"
echo ' style: "json"' >> "$conf"
echo ' url: "https://ipapi.co/json"' >> "$conf"
echo ' selector: "country"' >> "$conf"
fi
}
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"
@ -221,17 +283,17 @@ write_mhwdcfg_conf(){
${netinstall} && switch='false'
echo "local: ${switch}" >> "$conf"
echo '' >> "$conf"
echo 'repo: /opt/pacman-mhwd.conf' >> "$conf"
echo 'repo: /opt/mhwd/pacman-mhwd.conf' >> "$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"
echo " - archlinux" >> "$conf"
echo " - manjaro" >> "$conf"
if [[ -n ${smb_workgroup} ]];then
if [[ -n ${smb_workgroup} ]]; then
echo "" >> "$conf"
echo "samba:" >> "$conf"
echo " - workgroup: ${smb_workgroup}" >> "$conf"
@ -240,35 +302,40 @@ write_postcfg_conf(){
get_yaml(){
local args=() yaml
if ${chrootcfg};then
if ${chrootcfg}; then
args+=("${profile}/chrootcfg")
else
args+=("${profile}/packages")
fi
args+=("${initsys}")
for arg in ${args[@]};do
args+=("systemd")
for arg in ${args[@]}; do
yaml=${yaml:-}${yaml:+-}${arg}
done
echo "${yaml}.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"
if ${geoip};then
echo "geoipUrl: freegeoip.net" >> "$conf"
if ${geoip}; then
echo 'geoip:' >> "$conf"
echo ' style: "json"' >> "$conf"
echo ' url: "https://ipapi.co/json"' >> "$conf"
echo ' selector: "timezone"' >> "$conf"
else
echo "region: Europe" >> "$conf"
echo "zone: London" >> "$conf"
echo "region: America" >> "$conf"
echo "zone: New_York" >> "$conf"
fi
}
@ -281,18 +348,35 @@ write_settings_conf(){
echo "sequence:" >> "$conf"
echo " - show:" >> "$conf"
echo " - welcome" >> "$conf" && write_welcome_conf
echo " - locale" >> "$conf" && write_locale_conf
echo " - keyboard" >> "$conf"
echo " - partition" >> "$conf"
echo " - users" >> "$conf" && write_users_conf
if ${netinstall};then
if ${oem_used}; then
msg2 "Skipping to show locale and keyboard modules."
else
echo " - locale" >> "$conf" && write_locale_conf
echo " - keyboard" >> "$conf"
fi
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 ${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
echo " - summary" >> "$conf"
echo " - exec:" >> "$conf"
echo " - partition" >> "$conf"
echo " - mount" >> "$conf"
if ${netinstall};then
if ${netinstall}; then
if ${chrootcfg}; then
echo " - chrootcfg" >> "$conf"
echo " - networkcfg" >> "$conf"
@ -307,39 +391,70 @@ write_settings_conf(){
fi
echo " - machineid" >> "$conf" && write_machineid_conf
echo " - fstab" >> "$conf"
echo " - locale" >> "$conf"
echo " - keyboard" >> "$conf"
echo " - localecfg" >> "$conf"
if ${oem_used}; then
msg2 "Skipping to set locale, keyboard and localecfg modules."
else
echo " - locale" >> "$conf"
echo " - keyboard" >> "$conf"
echo " - localecfg" >> "$conf"
fi
echo " - luksopenswaphookcfg" >> "$conf"
echo " - luksbootkeyfile" >> "$conf"
echo " - initcpiocfg" >> "$conf"
echo " - initcpio" >> "$conf" && write_initcpio_conf
echo " - users" >> "$conf"
if ${oem_used}; then
msg2 "Skipping to set users module."
if ${set_oem_user}; then
msg2 "Setup OEM user."
echo " - oemuser" >> "$conf"
fi
else
echo " - users" >> "$conf"
fi
echo " - displaymanager" >> "$conf" && write_displaymanager_conf
echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf
if ${mhwd_used}; then
echo " - mhwdcfg" >> "$conf" && write_mhwdcfg_conf
else
msg2 "Skipping to set mhwdcfg module."
fi
echo " - hwclock" >> "$conf"
case ${initsys} in
'systemd') echo " - services" >> "$conf" && write_services_conf ;;
'openrc') echo " - servicescfg" >> "$conf" && write_servicescfg_conf ;;
esac
echo " - services" >> "$conf" && write_services_conf
echo " - grubcfg" >> "$conf"
echo " - bootloader" >> "$conf" && write_bootloader_conf
echo " - postcfg" >> "$conf" && write_postcfg_conf
if ${oem_used}; then
msg2 "Skipping to set postcfg module."
else
echo " - postcfg" >> "$conf" && write_postcfg_conf
fi
echo " - umount" >> "$conf"
echo " - show:" >> "$conf"
echo " - finished" >> "$conf" && write_finished_conf
echo '' >> "$conf"
echo "branding: ${iso_name}" >> "$conf"
echo '' >> "$conf"
echo "prompt-install: false" >> "$conf"
if ${oem_used}; then
echo "prompt-install: false" >> "$conf"
else
echo "prompt-install: true" >> "$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]"
}
@ -370,7 +485,7 @@ write_calamares_yaml(){
for conf in "${yaml_dir}"/etc/calamares/modules/*.conf "${yaml_dir}"/etc/calamares/settings.conf; do
check_yaml "$conf"
done
fi
fi
}
write_netgroup_yaml(){
@ -382,10 +497,10 @@ write_netgroup_yaml(){
echo " hidden: false" >> "$2"
echo " critical: false" >> "$2"
echo " packages:" >> "$2"
for p in ${packages[@]};do
for p in ${packages[@]}; do
echo " - $p" >> "$2"
done
${validate} && check_yaml "$2"
${validate} && check_yaml "$2"
}
write_pacman_group_yaml(){
@ -410,7 +525,7 @@ prepare_check(){
}
gen_fn(){
echo "${yaml_dir}/$1-${target_arch}-${initsys}.yaml"
echo "${yaml_dir}/$1-${target_arch}-systemd.yaml"
}
make_profile_yaml(){

View file

@ -183,7 +183,9 @@ load_vars() {
}
prepare_dir(){
[[ ! -d $1 ]] && mkdir -p $1
if [[ ! -d $1 ]]; then
mkdir -p $1
fi
}
# $1: chroot
@ -194,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(){
@ -209,7 +213,7 @@ init_common(){
[[ -z ${log_dir} ]] && log_dir='/var/log/manjaro-tools'
[[ -z ${build_mirror} ]] && build_mirror='http://mirror.netzspielplatz.de/manjaro/packages'
[[ -z ${build_mirror} ]] && build_mirror='https://mirror.easyname.at/manjaro'
[[ -z ${tmp_dir} ]] && tmp_dir='/tmp/manjaro-tools'
}
@ -219,7 +223,7 @@ init_buildtree(){
tree_dir_abs=${tree_dir}/packages-archlinux
[[ -z ${repo_tree[@]} ]] && repo_tree=('core' 'extra' 'community' 'multilib' 'openrc')
[[ -z ${repo_tree[@]} ]] && repo_tree=('core' 'extra' 'community' 'multilib')
[[ -z ${host_tree} ]] && host_tree='https://github.com/manjaro'
@ -242,10 +246,10 @@ init_buildpkg(){
get_iso_label(){
local label="$1"
label="${label//_}" # relace all _
#label="${label//_}" # relace all _
label="${label//-}" # relace all -
label="${label^^}" # all uppercase
label="${label::8}" # limit to 8 characters
label="${label^^}" # all uppercase
label="${label::32}" # limit to 32 characters
echo ${label}
}
@ -270,17 +274,17 @@ get_distid(){
}
get_disturl(){
source /etc/os-release
source /usr/lib/os-release
echo "${HOME_URL}"
}
get_osname(){
source /etc/os-release
source /usr/lib/os-release
echo "${NAME}"
}
get_osid(){
source /etc/os-release
source /usr/lib/os-release
echo "${ID}"
}
@ -301,41 +305,68 @@ init_buildiso(){
[[ -z ${dist_release} ]] && dist_release=$(get_release)
dist_codename=$(get_codename)
[[ -z ${dist_codename} ]] && dist_codename=$(get_codename)
dist_name=$(get_distname)
iso_name=$(get_osid)
[[ -z ${dist_branding} ]] && dist_branding="MJRO"
[[ -z ${dist_branding} ]] && dist_branding="MANJARO"
iso_label=$(get_iso_label "${dist_branding}${dist_release//.}")
[[ -z ${iso_compression} ]] && iso_compression='zstd'
[[ -z ${initsys} ]] && initsys="systemd"
[[ -z ${kernel} ]] && kernel="linux54"
[[ -z ${kernel} ]] && kernel="linux49"
load_run_dir "${profile_repo}"
if [[ -d ${run_dir}/.git ]]; then
current_path=$(pwd)
cd ${run_dir}
branch=$(git rev-parse --abbrev-ref HEAD)
cd ${current_path}
else
[[ -z ${branch} ]] && branch="v18.0" #current branch release
fi
[[ -z ${gpgkey} ]] && gpgkey=''
mhwd_repo="/opt/pkg"
mhwd_repo="/opt/mhwd/pkg"
}
init_calamares(){
[[ -z ${welcomestyle} ]] && welcomestyle=false
[[ -z ${welcomelogo} ]] && welcomelogo=true
[[ -z ${windowexp} ]] && windowexp=noexpand
[[ -z ${windowsize} ]] && windowsize="800px,560px"
[[ -z ${windowplacement} ]] && windowplacement="center"
[[ -z ${sidebarbackground} ]] && sidebarbackground=#454948
[[ -z ${sidebartext} ]] && sidebartext=#efefef
[[ -z ${sidebartextselect} ]] && sidebartextselect=#4d915e
[[ -z ${sidebartexthighlight} ]] && sidebartexthighlight=#1a1c1b
}
init_deployiso(){
host="sourceforge.net"
[[ -z ${project} ]] && project="[SetProject]"
host="osdn.net"
[[ -z ${account} ]] && account="[SetUser]"
[[ -z ${limit} ]] && limit=100
[[ -z ${alt_storage} ]] && alt_storage=false
[[ -z ${tracker_url} ]] && tracker_url='udp://mirror.strits.dk:6969'
[[ -z ${tracker_url} ]] && tracker_url='udp://tracker.opentrackr.org:1337'
[[ -z ${piece_size} ]] && piece_size=21
[[ -z ${iso_mirrors[@]} ]] && iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent')
torrent_meta="$(get_distid)"
}
@ -355,6 +386,8 @@ load_config(){
init_buildiso
init_calamares
init_deployiso
return 0
@ -373,7 +406,10 @@ load_profile_config(){
[[ -z ${autologin} ]] && autologin="true"
[[ ${displaymanager} == 'none' ]] && autologin="false"
[[ -z ${snap_channel} ]] && snap_channel="stable"
[[ -z ${multilib} ]] && multilib="true"
[[ ${no_multilib} == 'true' ]] && multilib="false"
[[ -z ${nonfree_mhwd} ]] && nonfree_mhwd="true"
@ -385,51 +421,52 @@ 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
addgroups="video,power,storage,optical,network,lp,scanner,wheel,sys"
if [[ -z ${addgroups} ]]; then
addgroups="lp,network,power,sys,wheel"
fi
if [[ -z ${enable_systemd[@]} ]];then
enable_systemd=('bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep')
if [[ -z ${enable_systemd[@]} ]]; then
enable_systemd=('avahi-daemon' 'bluetooth' 'cronie' 'ModemManager' 'NetworkManager' 'org.cups.cupsd' 'tlp' 'tlp-sleep' 'ufw')
fi
[[ -z ${disable_systemd[@]} ]] && disable_systemd=('pacman-init')
if [[ -z ${enable_openrc[@]} ]];then
enable_openrc=('acpid' 'bluetooth' 'elogind' 'cronie' 'cupsd' 'dbus' 'syslog-ng' 'NetworkManager')
fi
[[ -z ${disable_openrc[@]} ]] && disable_openrc=()
if [[ -z ${enable_systemd_live[@]} ]];then
if [[ -z ${enable_systemd_live[@]} ]]; then
enable_systemd_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
fi
if [[ -z ${enable_openrc_live[@]} ]];then
enable_openrc_live=('manjaro-live' 'mhwd-live' 'pacman-init' 'mirrors-live')
fi
if [[ ${displaymanager} != "none" ]]; then
enable_openrc+=('xdm')
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'
[[ -z ${smb_workgroup} ]] && smb_workgroup=''
basic='true'
[[ -z ${extra} ]] && extra='false'
[[ ${full_iso} ]] && extra='true'
${extra} && basic='false'
basic='true'
[[ ${extra} == 'true' ]] && basic='false'
[[ -z ${office_installer} ]] && office_installer="false"
return 0
}
@ -441,8 +478,23 @@ get_edition(){
echo ${path##*/}
}
get_project(){
case "${edition}" in
'manjaro')
project="manjaro"
;;
'community')
project="manjaro-community"
;;
esac
echo "${project}"
}
reset_profile(){
unset displaymanager
unset strict_snaps
unset classic_snaps
unset snap_channel
unset autologin
unset multilib
unset nonfree_mhwd
@ -453,17 +505,19 @@ reset_profile(){
unset addgroups
unset enable_systemd
unset disable_systemd
unset enable_openrc
unset disable_openrc
unset enable_systemd_live
unset enable_openrc_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(){
@ -475,7 +529,7 @@ check_profile(){
local has_keyfiles=false has_keydirs=false
for f in ${keyfiles[@]}; do
if [[ -f $f ]];then
if [[ -f $f ]]; then
has_keyfiles=true
else
has_keyfiles=false
@ -483,14 +537,14 @@ check_profile(){
fi
done
for d in ${keydirs[@]}; do
if [[ -d $d ]];then
if [[ -d $d ]]; then
has_keydirs=true
else
has_keydirs=false
break
fi
done
if ! ${has_keyfiles} && ! ${has_keydirs};then
if ! ${has_keyfiles} && ! ${has_keydirs}; then
die "Profile [%s] sanity check failed!" "$1"
fi
@ -507,27 +561,15 @@ check_profile(){
load_pkgs(){
info "Loading Packages: [%s] ..." "${1##*/}"
local _init _init_rm
case "${initsys}" in
'openrc')
_init="s|>openrc||g"
_init_rm="s|>systemd.*||g"
;;
*)
_init="s|>systemd||g"
_init_rm="s|>openrc.*||g"
;;
esac
local _multi _nonfree_default _nonfree_multi _arch _arch_rm _nonfree_i686 _nonfree_x86_64 _basic _basic_rm _extra _extra_rm
if ${basic};then
if ${basic}; then
_basic="s|>basic||g"
else
_basic_rm="s|>basic.*||g"
fi
if ${extra};then
if ${extra}; then
_extra="s|>extra||g"
else
_extra_rm="s|>extra.*||g"
@ -540,7 +582,7 @@ load_pkgs(){
_multi="s|>multilib.*||g"
_nonfree_multi="s|>nonfree_multilib.*||g"
_nonfree_x86_64="s|>nonfree_x86_64.*||g"
if ${nonfree_mhwd};then
if ${nonfree_mhwd}; then
_nonfree_default="s|>nonfree_default||g"
_nonfree_i686="s|>nonfree_i686||g"
@ -553,9 +595,9 @@ load_pkgs(){
_arch="s|>x86_64||g"
_arch_rm="s|>i686.*||g"
_nonfree_i686="s|>nonfree_i686.*||g"
if ${multilib};then
if ${multilib}; then
_multi="s|>multilib||g"
if ${nonfree_mhwd};then
if ${nonfree_mhwd}; then
_nonfree_default="s|>nonfree_default||g"
_nonfree_x86_64="s|>nonfree_x86_64||g"
_nonfree_multi="s|>nonfree_multilib||g"
@ -566,7 +608,7 @@ load_pkgs(){
fi
else
_multi="s|>multilib.*||g"
if ${nonfree_mhwd};then
if ${nonfree_mhwd}; then
_nonfree_default="s|>nonfree_default||g"
_nonfree_x86_64="s|>nonfree_x86_64||g"
_nonfree_multi="s|>nonfree_multilib.*||g"
@ -579,6 +621,7 @@ load_pkgs(){
;;
esac
# We can reuse this code
local _edition _edition_rm
case "${edition}" in
'sonar')
@ -591,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} \
@ -604,8 +654,6 @@ load_pkgs(){
| sed "$_space" \
| sed "$_blacklist" \
| sed "$_purge" \
| sed "$_init" \
| sed "$_init_rm" \
| sed "$_arch" \
| sed "$_arch_rm" \
| sed "$_nonfree_default" \
@ -620,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
@ -720,13 +770,6 @@ create_min_fs(){
mkdir -m 0555 -p $1/{sys,proc}
}
is_valid_init(){
case $1 in
'openrc'|'systemd') return 0 ;;
*) return 1 ;;
esac
}
is_valid_arch_pkg(){
eval "case $1 in
$(show_build_profiles "${make_conf_dir}")) return 0 ;;
@ -743,14 +786,21 @@ 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
}
is_valid_comp(){
case $1 in
'gzip'|'lzma'|'lz4'|'lzo'|'xz'|'zstd') return 0 ;;
*) return 1 ;;
esac
}
run(){
if ${is_build_list};then
for item in ${build_list[@]};do
if ${is_build_list}; then
for item in ${build_list[@]}; do
$1 $item
done
else
@ -776,3 +826,32 @@ subvolume_delete_recursive() {
return 0
}
create_chksums() {
msg2 "creating checksums for [$1]"
sha1sum $1 > $1.sha1
sha256sum $1 > $1.sha256
}
init_profiles() {
_workdir='/usr/share/manjaro-tools'
if [[ -d ${_workdir}/iso-profiles ]]; then
rm -Rf ${_workdir}/iso-profiles
fi
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
#Check if git clone is done
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
rm -f $i
done
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
rm -Rf $i
done
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
exit 1
fi
}