forked from endeavouros-team/iso-autobuild
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprepare-action
70 lines (51 loc) · 2.6 KB
/
prepare-action
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
tag=24.06.1.2
# clone ISO sources and join the path:
#git clone https://github.com/endeavouros-team/EndeavourOS-ISO.git
#load tarball of the ISO and unpack it
wget "https://github.com/endeavouros-team/EndeavourOS-ISO/archive/refs/tags/${tag}.tar.gz"
tar -xf ${tag}.tar.gz
mv EndeavourOS-ISO-${tag} EndeavourOS-ISO
# fetch package for testing [kpmcore]
#wget -qN --show-progress -P "EndeavourOS-ISO/airootfs/root/packages/" "https://archive.archlinux.org/packages/k/kpmcore/kpmcore-24.05.2-1-x86_64.pkg.tar.zst"
# patch run_before_squashfs.sh to apply patches that fstab after lukskeyfile job so crypttab is correct [settings_online.conf] [settings_offline.conf]
patch "EndeavourOS-ISO/run_before_squashfs.sh" < run_before_squashfs.sh.patch
# get missing live session wallpaper
# cp livewall.png "EndeavourOS-ISO/airootfs/root/"
# fetch updated mirrorlist
wget -qN --show-progress -P "EndeavourOS-ISO/" "https://raw.githubusercontent.com/endeavouros-team/Weekly-ISO-Rebuilds/main/mirrorlist"
# run preperations inside ISO structure
cd EndeavourOS-ISO
# mirrorlist: replaced mirror f4st.host with moson.org --> https://github.com/endeavouros-team/EndeavourOS-ISO/commit/a290732253c67da1a7200c4dba4c45284bb8d54
rm mirrorlist
wget "https://raw.githubusercontent.com/endeavouros-team/EndeavourOS-ISO/main/mirrorlist"
# Get mirrorlist for offline installs
mkdir "airootfs/etc/pacman.d"
wget -qN --show-progress -P "airootfs/etc/pacman.d/" "https://raw.githubusercontent.com/endeavouros-team/Weekly-ISO-Rebuilds/main/mirrorlist"
# use it also for building ISO
cp "airootfs/etc/pacman.d/mirrorlist" "/etc/pacman.d/mirrorlist"
# Get wallpaper for installed system
wget -qN --show-progress -P "airootfs/root/" "https://raw.githubusercontent.com/endeavouros-team/endeavouros-theming/master/backgrounds/endeavouros-wallpaper.png"
# Make sure build scripts are executable
chmod +x "./"{"mkarchiso","run_before_squashfs.sh"}
# create build user
#useradd -m -G wheel -s /bin/bash build
useradd -m build
printf "build ALL=NOPASSWD: ALL\n" | tee -a /etc/sudoers
chown -R build:build ./
# Build liveuser skel
get_pkg() {
pacman -Syw "$1" --noconfirm --cachedir "airootfs/root/packages"
}
get_pkg "eos-settings-plasma"
# Make sure build scripts are executable
chmod +x "./"{"mkarchiso","run_before_squashfs.sh"}
get_pkg() {
sudo pacman -Syw "$1" --noconfirm --cachedir "airootfs/root/packages" \
&& sudo chown build:build "airootfs/root/packages/"*".pkg.tar"*
}
get_pkg "eos-settings-plasma"
# Build liveuser skel
cd "airootfs/root/endeavouros-skel-liveuser"
sudo -u build bash makepkg -f
#sudo -u build makepkg -f