forked from mirrored-repos/manjaro-tools
Compare commits
477 commits
arch-patch
...
master
Author | SHA1 | Date | |
---|---|---|---|
5e29909aec | |||
|
99d8f267bf | ||
|
aec896c90c | ||
|
98eda6b062 | ||
|
8129e5d45a | ||
|
78765ee17c | ||
|
71f34308c6 | ||
|
e41edc365f | ||
|
0bb4097092 | ||
|
4e13703bf0 | ||
|
d7e97d48c9 | ||
|
65a84879e8 | ||
|
263d64006e | ||
|
18b975da7f | ||
|
488315a4ed | ||
|
a35c94d4b9 | ||
|
95b66c254d | ||
|
0f27b81f10 | ||
|
3de332a3f0 | ||
|
18b93d69db | ||
|
18ce522cab | ||
|
8325693818 | ||
|
7cabd74e60 | ||
|
2ddcc62973 | ||
|
dc48e4e43c | ||
|
1838316b51 | ||
|
7ef0b3dc2b | ||
|
fe9bd56896 | ||
|
caf60645ce | ||
|
62db7160d5 | ||
|
a30c5c5b47 | ||
|
5f1c35e045 | ||
|
d3ab09123c | ||
|
d422be22df | ||
|
55b596daad | ||
|
5350029b7c | ||
|
25bc6cafb4 | ||
|
65911fa712 | ||
|
48e2b429cd | ||
|
46e558d4b2 | ||
|
d85b80b766 | ||
|
6502ac4753 | ||
|
f0557b5eea | ||
|
29f5030440 | ||
|
53a46f255b | ||
|
a44862c96c | ||
|
7bcbc518f1 | ||
|
6c127f06f8 | ||
|
90d7cd8301 | ||
|
4e6e583a7d | ||
|
9a99817285 | ||
|
9e9b793aab | ||
|
7a6459172e | ||
|
5c372f07c6 | ||
|
4018148768 | ||
|
4362959570 | ||
|
3ac95787c5 | ||
|
3736289745 | ||
|
1f7a1bbdb4 | ||
|
6cbf8f7f02 | ||
|
7d4a0081d4 | ||
|
ac648310e2 | ||
|
933a3dc249 | ||
|
562867eeba | ||
|
343fea66e3 | ||
|
f905232812 | ||
|
2dd93535d7 | ||
|
3eee06d65d | ||
|
55603df916 | ||
|
b7b4f48e3a | ||
|
2d0a4ead94 | ||
|
2e8d4e71d4 | ||
|
8f0633468d | ||
|
c0f75a6247 | ||
|
786abcbcb3 | ||
|
f1ac7301b2 | ||
|
bc23dce4a7 | ||
|
b1fb15af1b | ||
|
ceacbe0dcc | ||
|
4d9c804384 | ||
|
fb7ec401fd | ||
|
e66c9c0f61 | ||
|
c10c4d5e8f | ||
|
4bdb473250 | ||
|
7ef53f1daf | ||
|
70b5d07ca9 | ||
|
5a5195cb87 | ||
|
511f4f2fcb | ||
|
8b38859828 | ||
|
39f8daf70a | ||
|
b99d489ef5 | ||
|
b12ff4a491 | ||
|
abfb256279 | ||
|
1408d2ce4b | ||
|
41242f4d5c | ||
|
35f27fc4f3 | ||
|
c579446076 | ||
|
2f7fadaa70 | ||
|
5a28432745 | ||
|
1eb51d062f | ||
|
181675fe0e | ||
|
1dd62d180a | ||
|
110b26747b | ||
|
15406d86f4 | ||
|
3ae4799ee6 | ||
|
204ae9004f | ||
|
ce4a92f362 | ||
|
4a800db62c | ||
|
2276d19058 | ||
|
37d862971b | ||
|
043fc489d8 | ||
|
d3de31b7f1 | ||
|
c4f2f75d78 | ||
|
398fc3d6d6 | ||
|
0b8624d064 | ||
|
df09a5f3ba | ||
|
5b7275a28f | ||
|
f332cfd9ee | ||
|
fa815e8bab | ||
|
61f1373d95 | ||
|
fb176e8a77 | ||
|
2949a54e95 | ||
|
c1ad19e8db | ||
|
34b9a4ee30 | ||
|
65c1322551 | ||
|
36134e5b91 | ||
|
d2d6d8f596 | ||
|
9932f4b8d0 | ||
|
3806b31b04 | ||
|
be6f82ab91 | ||
|
3917a6818e | ||
|
02a8b7c90d | ||
|
e492a858be | ||
|
024d0ba921 | ||
|
7f6da6af34 | ||
|
b2a36142a3 | ||
|
76f4b723f5 | ||
|
dee5a38dea | ||
|
6054f09efc | ||
|
514eafa341 | ||
|
1dcb41da57 | ||
|
f4dd5b3bd0 | ||
|
76d6d697e1 | ||
|
25b3bc1d61 | ||
|
6d1bb50b44 | ||
|
7ce5288a8c | ||
|
2238d824e0 | ||
|
34345bf8f3 | ||
|
f9f8b11280 | ||
|
5a889a8058 | ||
|
4180b449cb | ||
|
ca5034d06e | ||
|
0ca7be157f | ||
|
465bc8937d | ||
|
b4038736dd | ||
|
a9e23cd7c1 | ||
|
4d164fc0ed | ||
|
407fbaa4e9 | ||
|
228aa3faa8 | ||
|
f44df5bb5f | ||
|
d25e4ba870 | ||
|
0a420b5818 | ||
|
5e36d2d206 | ||
|
bda1c943ca | ||
|
ed9b77b2fe | ||
|
2c234febb8 | ||
|
ea3a53e9d8 | ||
|
268f1dac17 | ||
|
5a6ad3f64b | ||
|
8f994ef0d2 | ||
|
05722a2fa2 | ||
|
808b25b6a7 | ||
|
628a79a715 | ||
|
be6d499cbd | ||
|
37c8f8b5c6 | ||
|
3ff82a8a63 | ||
|
699d178f52 | ||
|
8fcab05e66 | ||
|
5ac3badadf | ||
|
36b663cac0 | ||
|
ff5acbe2bb | ||
|
e3712e4a60 | ||
|
b3ed15d0fe | ||
|
3c355c7093 | ||
|
a1863f14e9 | ||
|
1bfa0725f5 | ||
|
4ac9dc3192 | ||
|
3983d1ffff | ||
|
ef6ee481a9 | ||
|
7cb8ca20db | ||
|
5c31cf102e | ||
|
fee0b2cb18 | ||
|
2329b76681 | ||
|
731b5e454f | ||
|
55db3e7cb3 | ||
|
c21c9f140d | ||
|
0102f31a88 | ||
|
94491db6f0 | ||
|
331ed19659 | ||
|
c64b5fde27 | ||
|
43828be26e | ||
|
d64cf2f94f | ||
|
d7c6bae83e | ||
|
e9833fcabf | ||
|
3748533c10 | ||
|
ecc7b90bec | ||
|
fb6af199e0 | ||
|
f30e3f17b2 | ||
|
90a00d679f | ||
|
4739b2cc98 | ||
|
4841509678 | ||
|
b64dd4dfea | ||
|
c4962833e8 | ||
|
f0494d3965 | ||
|
8e37a24ac8 | ||
|
6fe92d320e | ||
|
007ce7d6f8 | ||
|
ac9e91cf52 | ||
|
6569d444cc | ||
|
881d137e14 | ||
|
8c14770c87 | ||
|
62780fd47c | ||
|
3d29788c40 | ||
|
c6dcaddec5 | ||
|
64be09421b | ||
|
9ebf14dfcc | ||
|
2d968e31f5 | ||
|
66d4a341f3 | ||
|
0a314fd993 | ||
|
92e1bad570 | ||
|
a2e5200974 | ||
|
392a86bcfe | ||
|
d6b1eb7f6c | ||
|
3ca0eadf41 | ||
|
dfbcb1c2bd | ||
|
1b32aa25b8 | ||
|
ba2ffebf86 | ||
|
10ae36e92f | ||
|
fde8147a72 | ||
|
2349c59e02 | ||
|
1dc0cc28ea | ||
|
07742ab6e4 | ||
|
c2a1af3b61 | ||
|
dc241e9ae4 | ||
|
c478485648 | ||
|
59242d2b4a | ||
|
a90199a176 | ||
|
ebe6012dbe | ||
|
08aadaf5e1 | ||
|
5ccd0e2167 | ||
|
11c328c79e | ||
|
68fdb9341c | ||
|
5363189b87 | ||
|
0e9a1657b3 | ||
|
fc4f4693aa | ||
|
f004b99889 | ||
|
c9057e9524 | ||
|
b4f167d96a | ||
|
1f4fda04dd | ||
|
8c43a542d6 | ||
|
48c214ef6f | ||
|
9f16f6ee83 | ||
|
cc80c4c1a8 | ||
|
b1e5a54f4b | ||
|
3645f17c8f | ||
|
ba88b2ba63 | ||
|
b6d9ee34b5 | ||
|
d6e7190e41 | ||
|
99534efa3c | ||
|
bb04a599b6 | ||
|
c9784f056a | ||
|
c4cb48ddf9 | ||
|
e1b179cd45 | ||
|
5ace583e7d | ||
|
15da548fb8 | ||
|
0674438df1 | ||
|
cb28eefe2d | ||
|
08ba08e846 | ||
|
8d140615f6 | ||
|
ec51e92bab | ||
|
f67dd8fbe0 | ||
|
2559ff5bb2 | ||
|
97e0601cb4 | ||
|
f05c594db0 | ||
|
af85a38ad1 | ||
|
08427fd8ee | ||
|
a0ea27a565 | ||
|
31249fa9fd | ||
|
8f4742cd4a | ||
|
2c76ba5d6c | ||
|
61dafad585 | ||
|
691bfbe4cb | ||
|
1a9ef7c5a4 | ||
|
7106e97c77 | ||
|
6c1636e9c2 | ||
|
c6ec757f17 | ||
|
0104b5c84d | ||
|
e99949a700 | ||
|
bbcf524883 | ||
|
a6eeac142d | ||
|
84c70221ce | ||
|
4f94991a17 | ||
|
c411f5bf41 | ||
|
867cf4cff2 | ||
|
63b4efcd25 | ||
|
26b1110acd | ||
|
5237a2cb4e | ||
|
ee261705fb | ||
|
f3fb001d36 | ||
|
68c1489d0c | ||
|
467a57b122 | ||
|
a58e94e15a | ||
|
8542ed676f | ||
|
428d95ebf9 | ||
|
200abe3832 | ||
|
5cbc29af91 | ||
|
ac6f97cb53 | ||
|
86dae4f1e4 | ||
|
83f8b3e23d | ||
|
2106c3f7a1 | ||
|
d055b5571c | ||
|
2911866e64 | ||
|
f5e5980745 | ||
|
bbd9aaba24 | ||
|
8271bb6e5c | ||
|
7f57aa3339 | ||
|
28fb1521a6 | ||
|
953b02cccb | ||
|
cc67d34b88 | ||
|
7d56c7a58a | ||
|
4303febfdb | ||
|
d6ab170fba | ||
|
70f036cb5b | ||
|
72f46f8aa8 | ||
|
05bee87e2d | ||
|
d21ff17799 | ||
|
7b067b22b3 | ||
|
16936b118e | ||
|
039eacae82 | ||
|
c207c3d428 | ||
|
08b818ef92 | ||
|
60a0a9433c | ||
|
1a7923c21b | ||
|
e1eb050f64 | ||
|
67b6f1ea71 | ||
|
3e80462940 | ||
|
6acdb40fed | ||
|
02413245d4 | ||
|
72a1ae0722 | ||
|
96a3b52670 | ||
|
a049fc81d4 | ||
|
3711a00cf0 | ||
|
fb0ae6bf1e | ||
|
e59152b7dd | ||
|
98aaa74bac | ||
|
bb83c3d4fe | ||
|
72c138728c | ||
|
fc0adbcba3 | ||
|
f87fa4be1e | ||
|
f1b67449f7 | ||
|
b3bef8b2e3 | ||
|
51605c0d15 | ||
|
fdb222f32c | ||
|
1262b50b71 | ||
|
1a6e4a27b5 | ||
|
9dd40f8b9a | ||
|
a731f04132 | ||
|
4134a2db17 | ||
|
fdf797e2fb | ||
|
225ace7417 | ||
|
8c4e64d2da | ||
|
4587df847d | ||
|
6116773a23 | ||
|
dafd48a413 | ||
|
a8e8ba6039 | ||
|
084ef4267d | ||
|
e89eb44971 | ||
|
358fee880c | ||
|
d98639e344 | ||
|
4933bb3ce3 | ||
|
d9eefd0481 | ||
|
4b334e4527 | ||
|
f23a135b6c | ||
|
128db78545 | ||
|
e6ae6aaa3f | ||
|
1f00082bb6 | ||
|
b3a7a431be | ||
|
6a711f4771 | ||
|
1d92941420 | ||
|
c3b82d4027 | ||
|
0aef777dd8 | ||
|
0688a642e8 | ||
|
4f74f8c9e1 | ||
|
14ff48abe0 | ||
|
9aefc30a38 | ||
|
b6023bf92f | ||
|
52e415f11d | ||
|
83db864d60 | ||
|
aa74a8262e | ||
|
e1d27f6237 | ||
|
57d1c9c146 | ||
|
8f1dae5863 | ||
|
318c0bcd31 | ||
|
564523fd2d | ||
|
cdc3d2e3e5 | ||
|
cb98a5549a | ||
|
672ecf850f | ||
|
2d1d8bc6b9 | ||
|
321c4369ee | ||
|
95ef8e2956 | ||
|
9d5526c1e2 | ||
|
d266a28a0b | ||
|
cfeefabcbc | ||
|
f910aaa2fe | ||
|
050066781e | ||
|
16e573d8ac | ||
|
bae607b8cd | ||
|
37730b9df6 | ||
|
23a04cf757 | ||
|
bf1403e355 | ||
|
e4d2ecae9e | ||
|
96336c2ec9 | ||
|
e173e717da | ||
|
43f49cd5fa | ||
|
d68f8eb61e | ||
|
b6f8ba6dc2 | ||
|
7bdac68017 | ||
|
ebaa387072 | ||
|
f4d62cb0d7 | ||
|
b3187908f3 | ||
|
c3de6b1137 | ||
|
7d89e9af6c | ||
|
22750ad6de | ||
|
e2f0a4600c | ||
|
883944362c | ||
|
e21f62276b | ||
|
e5efe8b32d | ||
|
61ed9981be | ||
|
15c77b6666 | ||
|
c250d54e30 | ||
|
473a294f6a | ||
|
6c8b2ca33a | ||
|
b0cd0c481f | ||
|
5f53d251c9 | ||
|
ce942050b9 | ||
|
11dc24934a | ||
|
f5ef88c4dc | ||
|
37c3daa526 | ||
|
f462434f98 | ||
|
ed0903bf3f | ||
|
21deb78026 | ||
|
2bd080bd65 | ||
|
75b7e86b22 | ||
|
b8255e9e17 | ||
|
4201241c9c | ||
|
321fd5a5b1 | ||
|
b0623173e9 | ||
|
382a20f5a8 | ||
|
c529601087 | ||
|
afbae5e9ff | ||
|
e080dd3dbe | ||
|
4433351b95 | ||
|
4b76f7fa83 | ||
|
965de2f5fc | ||
|
1e3795f8c3 | ||
|
62266058c2 | ||
|
ff23abeed6 | ||
|
a4f2fd33a4 | ||
|
7744315f63 | ||
|
251f56befd | ||
|
7caeeb9638 | ||
|
fcd8e2a640 | ||
|
4e44c5f807 | ||
|
83fc4866de | ||
|
8a6cb28be6 | ||
|
feda1e7659 | ||
|
42e0735b77 |
55 changed files with 2194 additions and 904 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
.idea
|
||||
*~
|
||||
*.tar.gz
|
||||
*.tar.xz
|
||||
|
|
14
Makefile
14
Makefile
|
@ -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
232
README.md
|
@ -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
|
||||
|
|
|
@ -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
94
bin/buildiso.in
Executable file → Normal 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}"
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
27
bin/signiso.in
Normal 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
|
|
@ -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
136
bin/testiso.in
Executable file → Normal 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
|
||||
|
|
|
@ -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
93
data/branding.desc.d
Normal 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}"
|
|
@ -1,6 +1,12 @@
|
|||
awesome
|
||||
bspwm
|
||||
bspwm-mate
|
||||
budgie
|
||||
cinnamon
|
||||
deepin
|
||||
i3
|
||||
lxde
|
||||
lxqt
|
||||
mate
|
||||
openbox
|
||||
webdad
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
kde
|
||||
xfce
|
||||
architect
|
||||
gnome
|
||||
lxqt
|
||||
kde
|
||||
netinstall
|
||||
xfce
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
gnome-edition
|
||||
mate-edition
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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=()
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
269
lib/util-iso.sh
269
lib/util-iso.sh
|
@ -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(){
|
||||
|
|
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -95,7 +95,7 @@ die() {
|
|||
}
|
||||
|
||||
import(){
|
||||
if [[ -r $1 ]];then
|
||||
if [[ -r $1 ]]; then
|
||||
source $1
|
||||
else
|
||||
die "Could not import $1"
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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 ..
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
281
lib/util-yaml.sh
281
lib/util-yaml.sh
|
@ -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(){
|
||||
|
|
241
lib/util.sh
241
lib/util.sh
|
@ -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="linux49"
|
||||
[[ -z ${kernel} ]] && kernel="linux54"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue