init
This commit is contained in:
commit
c1593c551c
|
@ -0,0 +1,19 @@
|
||||||
|
FROM debian:12
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install -y \
|
||||||
|
locales sudo vim
|
||||||
|
|
||||||
|
RUN locale-gen en_US.UTF-8 && locale-gen ko_KR.UTF-8
|
||||||
|
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
ENV LC_ALL C.UTF-8
|
||||||
|
|
||||||
|
RUN useradd -m user && \
|
||||||
|
echo "user:Passw0rd" | chpasswd && \
|
||||||
|
usermod -aG sudo user && \
|
||||||
|
echo "user ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
|
CMD ["/bin/bash"]
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cmd1="$1"
|
||||||
|
cmd2="$2"
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
echo "kill $pid1 $pid2"
|
||||||
|
[[ -n $pid1 ]] && kill "$pid1" 2>/dev/null
|
||||||
|
[[ -n $pid2 ]] && kill "$pid2" 2>/dev/null
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup SIGINT SIGTERM
|
||||||
|
|
||||||
|
eval "$cmd1" &
|
||||||
|
pid1=$!
|
||||||
|
|
||||||
|
eval "$cmd2" &
|
||||||
|
pid2=$!
|
||||||
|
|
||||||
|
wait "$pid1" "$pid2"
|
||||||
|
|
||||||
|
cleanup
|
|
@ -0,0 +1,33 @@
|
||||||
|
FROM registry.fedoraproject.org/fedora-toolbox:39
|
||||||
|
|
||||||
|
RUN dnf -y update && \
|
||||||
|
dnf -y install \
|
||||||
|
"dnf-command(builddep)" \
|
||||||
|
appstream-devel \
|
||||||
|
expat-devel \
|
||||||
|
git \
|
||||||
|
glslc \
|
||||||
|
graphviz \
|
||||||
|
libabigail \
|
||||||
|
libjpeg-turbo-devel \
|
||||||
|
python3-jinja2 \
|
||||||
|
python3-packaging \
|
||||||
|
python3-pygments \
|
||||||
|
python3-toml \
|
||||||
|
python3-typogrify \
|
||||||
|
sassc \
|
||||||
|
vala && \
|
||||||
|
dnf -y build-dep gtk4 && \
|
||||||
|
dnf -y remove gi-docgen
|
||||||
|
|
||||||
|
RUN git clone https://github.com/GNOME/gtk.git --depth=1 \
|
||||||
|
&& cd gtk \
|
||||||
|
&& git checkout main
|
||||||
|
|
||||||
|
RUN cd /gtk && meson build -Dgtk_doc=true \
|
||||||
|
-Ddemos=true \
|
||||||
|
-Dbuild-examples=false \
|
||||||
|
-Dbuild-tests=false \
|
||||||
|
-Dbuild-testsuite=false \
|
||||||
|
&& cd build \
|
||||||
|
&& ninja
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ ! -v FIRST ]]; then
|
||||||
|
FIRST=false ;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $FIRST; then
|
||||||
|
dnf -y update ;
|
||||||
|
dnf -y install \
|
||||||
|
"dnf-command(builddep)" \
|
||||||
|
appstream-devel \
|
||||||
|
expat-devel \
|
||||||
|
git \
|
||||||
|
glslc \
|
||||||
|
graphviz \
|
||||||
|
libabigail \
|
||||||
|
libjpeg-turbo-devel \
|
||||||
|
python3-jinja2 \
|
||||||
|
python3-packaging \
|
||||||
|
python3-pygments \
|
||||||
|
python3-toml \
|
||||||
|
python3-typogrify \
|
||||||
|
sassc \
|
||||||
|
vala ;
|
||||||
|
dnf -y build-dep gtk4 ;
|
||||||
|
dnf -y remove gi-docgen ;
|
||||||
|
|
||||||
|
if [ ! -d gtk ]; then
|
||||||
|
git clone https://github.com/GNOME/gtk.git --depth=1 ;
|
||||||
|
fi
|
||||||
|
cd gtk ;
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "Continue? " ;
|
||||||
|
|
||||||
|
meson build --prefix=/usr \
|
||||||
|
-Dgtk_doc=true \
|
||||||
|
-Ddemos=true \
|
||||||
|
-Dbuild-examples=false \
|
||||||
|
-Dbuild-tests=false \
|
||||||
|
-Dbuild-testsuite=false ;
|
||||||
|
cd build ;
|
||||||
|
ninja ;
|
||||||
|
sudo ninja install ;
|
|
@ -0,0 +1 @@
|
||||||
|
COMMIT="30b014549539a9a31824c4c88fd5d00d71d9f5c2"; cat build-aux/flatpak/org.gtk.Demo4.json | sed 's/"branch": "main"/"commit": "'${COMMIT}'"/' | tee build-aux/flatpak/org.gtk.Demo4-${COMMIT}.json; BUILD_DIR="build-${COMMIT}"/; flatpak-builder --force-clean ${BUILD_DIR} build-aux/flatpak/org.gtk.Demo4-${COMMIT}.json; flatpak-builder --run --env=GSK_RENDERER=gl ${BUILD_DIR} build-aux/flatpak/org.gtk.Demo4-${COMMIT}.json gtk4-demo
|
|
@ -0,0 +1,173 @@
|
||||||
|
<domain type="kvm">
|
||||||
|
<name>Open</name>
|
||||||
|
<uuid>ffffffff-2b7a-4229-afeb-adad76c63b73</uuid>
|
||||||
|
<metadata>
|
||||||
|
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||||
|
<libosinfo:os id="http://debian.org/debian/12"/>
|
||||||
|
</libosinfo:libosinfo>
|
||||||
|
</metadata>
|
||||||
|
<memory unit="KiB">4194304</memory>
|
||||||
|
<currentMemory unit="KiB">4194304</currentMemory>
|
||||||
|
<vcpu placement="static">4</vcpu>
|
||||||
|
<sysinfo type="smbios">
|
||||||
|
<bios>
|
||||||
|
<entry name="vendor">American Megatrends Inc.</entry>
|
||||||
|
<entry name="version">A.40</entry>
|
||||||
|
<entry name="date">09/10/2019</entry>
|
||||||
|
</bios>
|
||||||
|
<system>
|
||||||
|
<entry name="manufacturer">XXXXX</entry>
|
||||||
|
<entry name="product">XXXXX</entry>
|
||||||
|
<entry name="version">XXXXX</entry>
|
||||||
|
<entry name="serial">XXXXX</entry>
|
||||||
|
<entry name="uuid">ffffffff-2b7a-4229-afeb-adad76c63b73</entry>
|
||||||
|
<entry name="sku">XXXXXX</entry>
|
||||||
|
<entry name="family">XXXXXX</entry>
|
||||||
|
</system>
|
||||||
|
</sysinfo>
|
||||||
|
<os>
|
||||||
|
<type arch="x86_64" machine="pc-q35-7.2">hvm</type>
|
||||||
|
<boot dev="hd"/>
|
||||||
|
<smbios mode="sysinfo"/>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<vmport state="off"/>
|
||||||
|
</features>
|
||||||
|
<cpu mode="host-passthrough" check="none" migratable="on"/>
|
||||||
|
<clock offset="utc">
|
||||||
|
<timer name="rtc" tickpolicy="catchup"/>
|
||||||
|
<timer name="pit" tickpolicy="delay"/>
|
||||||
|
<timer name="hpet" present="no"/>
|
||||||
|
</clock>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<pm>
|
||||||
|
<suspend-to-mem enabled="no"/>
|
||||||
|
<suspend-to-disk enabled="no"/>
|
||||||
|
</pm>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
|
<disk type="file" device="disk">
|
||||||
|
<driver name="qemu" type="qcow2"/>
|
||||||
|
<source file="/srv/qemu/open.qcow2"/>
|
||||||
|
<target dev="sda" bus="sata"/>
|
||||||
|
</disk>
|
||||||
|
<controller type="usb" index="0" model="qemu-xhci" ports="15">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="0" model="pcie-root"/>
|
||||||
|
<controller type="pci" index="1" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="1" port="0x10"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="2" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="2" port="0x11"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="3" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="3" port="0x12"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="4" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="4" port="0x13"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="5" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="5" port="0x14"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="6" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="6" port="0x15"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="7" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="7" port="0x16"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="8" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="8" port="0x17"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="9" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="9" port="0x18"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="10" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="10" port="0x19"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="11" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="11" port="0x1a"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="12" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="12" port="0x1b"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="13" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="13" port="0x1c"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="14" model="pcie-root-port">
|
||||||
|
<model name="pcie-root-port"/>
|
||||||
|
<target chassis="14" port="0x1d"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="sata" index="0">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="virtio-serial" index="0">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
|
||||||
|
</controller>
|
||||||
|
<interface type="network">
|
||||||
|
<mac address="52:54:00:20:6a:f6"/>
|
||||||
|
<source network="default"/>
|
||||||
|
<model type="e1000e"/>
|
||||||
|
</interface>
|
||||||
|
<serial type="pty">
|
||||||
|
<target type="isa-serial" port="0">
|
||||||
|
<model name="isa-serial"/>
|
||||||
|
</target>
|
||||||
|
</serial>
|
||||||
|
<console type="pty">
|
||||||
|
<target type="serial" port="0"/>
|
||||||
|
</console>
|
||||||
|
<channel type="unix">
|
||||||
|
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||||
|
<address type="virtio-serial" controller="0" bus="0" port="1"/>
|
||||||
|
</channel>
|
||||||
|
<input type="mouse" bus="ps2"/>
|
||||||
|
<input type="keyboard" bus="ps2"/>
|
||||||
|
<graphics type="vnc" port="-1" autoport="yes">
|
||||||
|
<listen type="address"/>
|
||||||
|
</graphics>
|
||||||
|
<audio id="1" type="none"/>
|
||||||
|
<video>
|
||||||
|
<model type="vga" vram="16384" heads="1" primary="yes"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
|
||||||
|
</video>
|
||||||
|
<memballoon model="virtio">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
|
||||||
|
</memballoon>
|
||||||
|
<rng model="virtio">
|
||||||
|
<backend model="random">/dev/urandom</backend>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
|
||||||
|
</rng>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,80 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os, sys
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
if __name__=="__main__":
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print(f"Usage: {sys.argv[0].split("/")[-1]} [Flatpak Manifest file]")
|
||||||
|
exit()
|
||||||
|
if not os.path.exists(sys.argv[1]):
|
||||||
|
print("Error: Manifest file doesnt exists.")
|
||||||
|
exit()
|
||||||
|
if os.path.isdir(sys.argv[1]):
|
||||||
|
print("Error: Wrong file.")
|
||||||
|
exit()
|
||||||
|
with open(sys.argv[1], "r") as f:
|
||||||
|
try:
|
||||||
|
manifest = json.load(f)
|
||||||
|
except:
|
||||||
|
print("Error: Wrong file.")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
print(f"\nManifest Info\n==========================\n"
|
||||||
|
f"App | {manifest['app-id']}\n"
|
||||||
|
f"Runtime | {manifest['runtime']}//{manifest["runtime-version"]}\n"
|
||||||
|
f"SDK | {manifest['sdk']}\n"
|
||||||
|
f"CMD | {manifest['command']}\n"
|
||||||
|
f"Modules | \n - "
|
||||||
|
f"{"\n - ".join([f"{i["name"]}\n - {i["sources"][0]["url"]}" for i in manifest["modules"]])}\n"
|
||||||
|
)
|
||||||
|
|
||||||
|
global_script = []
|
||||||
|
WORKDIR = ""
|
||||||
|
workdir = f"./build-{str(uuid.uuid1())[:8]}" if not WORKDIR else WORKDIR
|
||||||
|
print(f"Set workdir to {workdir}\n")
|
||||||
|
|
||||||
|
global_script.append(f"if [ $(ls \"{workdir}\" | wc -l) -ne 0 ]; then exit; fi")
|
||||||
|
global_script.append(f"mkdir -p {workdir}")
|
||||||
|
global_script.append(f"ROOTDIR=$(realpath {workdir})")
|
||||||
|
global_script.append("cd ${ROOTDIR}")
|
||||||
|
|
||||||
|
for module in manifest["modules"]:
|
||||||
|
script = []
|
||||||
|
name = module["name"]
|
||||||
|
build = module["buildsystem"]
|
||||||
|
builddir = module.get("builddir", False)
|
||||||
|
sources = module["sources"]
|
||||||
|
opts = module.get("config-opts", [])
|
||||||
|
|
||||||
|
for src in sources:
|
||||||
|
if src["type"] == "git":
|
||||||
|
script.append(f"git clone {src["url"]} ./{name}.src")
|
||||||
|
script.append(f"cd ./{name}.src")
|
||||||
|
if src.get("tag"):
|
||||||
|
# Need to fetch tags?
|
||||||
|
script.append(f"git checkout {src["tag"]}")
|
||||||
|
elif src.get("commit"):
|
||||||
|
script.append(f"git checkout {src["commit"]}")
|
||||||
|
elif src.get("branch"):
|
||||||
|
# Switch to branch?
|
||||||
|
script.append(f"git checkout {src["branch"]}")
|
||||||
|
|
||||||
|
elif src["type"] == "file":
|
||||||
|
script.append(f"cp -r {src["url"]} {workdir}/{name}.src")
|
||||||
|
|
||||||
|
if build == "meson":
|
||||||
|
script.append("meson setup build/")
|
||||||
|
script.append("meson configure build/ " + " ".join(opts))
|
||||||
|
script.append("cd build/; ninja")
|
||||||
|
script.append("ninja install")
|
||||||
|
|
||||||
|
elif build == "cmake-ninja":
|
||||||
|
script.append("cmake .")
|
||||||
|
script.append("cd build/; ninja; ninja install")
|
||||||
|
|
||||||
|
global_script += script
|
||||||
|
global_script.append("cd ${ROOTDIR}")
|
||||||
|
|
||||||
|
print("\n".join(global_script))
|
|
@ -0,0 +1,25 @@
|
||||||
|
FROM registry.fedoraproject.org/fedora-toolbox:39
|
||||||
|
|
||||||
|
RUN dnf -y update && \
|
||||||
|
dnf -y install \
|
||||||
|
"dnf-command(builddep)" \
|
||||||
|
appstream-devel \
|
||||||
|
expat-devel \
|
||||||
|
git \
|
||||||
|
glslc \
|
||||||
|
graphviz \
|
||||||
|
libabigail \
|
||||||
|
libjpeg-turbo-devel \
|
||||||
|
python3-jinja2 \
|
||||||
|
python3-packaging \
|
||||||
|
python3-pygments \
|
||||||
|
python3-toml \
|
||||||
|
python3-typogrify \
|
||||||
|
sassc \
|
||||||
|
vala && \
|
||||||
|
dnf -y build-dep gtk4 && \
|
||||||
|
dnf -y remove gi-docgen
|
||||||
|
|
||||||
|
RUN git clone https://github.com/GNOME/gtk.git --depth=1 \
|
||||||
|
&& cd gtk \
|
||||||
|
&& git checkout main
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM fedora:39
|
||||||
|
|
||||||
|
RUN dnf update -y && \
|
||||||
|
dnf install git make -y
|
||||||
|
|
||||||
|
RUN git clone https://github.com/ublue-os/isogenerator /isogenerator && \
|
||||||
|
cd /isogenerator && \
|
||||||
|
make install-deps
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
FROM debian:latest
|
||||||
|
|
||||||
|
ARG RUNNER_VERSION="2.313.0"
|
||||||
|
|
||||||
|
RUN apt-get update -y && apt-get upgrade -y && useradd -m user
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip wget git
|
||||||
|
|
||||||
|
RUN cd /home/user && mkdir actions-runner && cd actions-runner \
|
||||||
|
&& curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
|
||||||
|
&& tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz
|
||||||
|
|
||||||
|
RUN chown -R user ~user && /home/user/actions-runner/bin/installdependencies.sh
|
||||||
|
|
||||||
|
RUN cat << EOF > entrypoint.sh \
|
||||||
|
#!/bin/bash \
|
||||||
|
\
|
||||||
|
ORGANIZATION=$ORGANIZATION \
|
||||||
|
ACCESS_TOKEN=$ACCESS_TOKEN \
|
||||||
|
REG_TOKEN=$REG_TOKEN \
|
||||||
|
\
|
||||||
|
cd /home/user/actions-runner \
|
||||||
|
\
|
||||||
|
echo ./config.sh --url https://github.com/${ORGANIZATION} --token ${REG_TOKEN} \
|
||||||
|
./config.sh --url https://github.com/${ORGANIZATION} --token ${REG_TOKEN} \
|
||||||
|
\
|
||||||
|
cleanup() { \
|
||||||
|
echo "Removing runner..." \
|
||||||
|
./config.sh remove --unattended --token ${REG_TOKEN} \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
trap 'cleanup; exit 130' INT \
|
||||||
|
trap 'cleanup; exit 143' TERM \
|
||||||
|
\
|
||||||
|
./run.sh & wait $! \
|
||||||
|
EOF
|
||||||
|
|
||||||
|
RUN chmod +x entrypoint.sh
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
@ -0,0 +1,42 @@
|
||||||
|
# cd /work
|
||||||
|
# sudo dnf update -y
|
||||||
|
# sudo dnf install git make -y
|
||||||
|
# git clone https://github.com/ublue-os/isogenerator
|
||||||
|
# cd isogenerator
|
||||||
|
# make install-deps
|
||||||
|
|
||||||
|
IMAGE_NAME=base-main
|
||||||
|
IMAGE_REPO=ghcr.io/ublue-os
|
||||||
|
IMAGE_TAG=${VERSION}
|
||||||
|
VERSION=39
|
||||||
|
ARCH=x86_64
|
||||||
|
VARIANT=Silverblue
|
||||||
|
WEB_UI=true
|
||||||
|
|
||||||
|
make output/${IMAGE_NAME}-${IMAGE_TAG}.iso \
|
||||||
|
ARCH=${ARCH} \
|
||||||
|
VERSION=${VERSION} \
|
||||||
|
IMAGE_REPO=${IMAGE_REPO} \
|
||||||
|
IMAGE_NAME=${IMAGE_NAME} \
|
||||||
|
IMAGE_TAG=${IMAGE_TAG} \
|
||||||
|
VARIANT=${VARIANT} \
|
||||||
|
WEB_UI=${WEB_UI}
|
||||||
|
|
||||||
|
|
||||||
|
# make container/${IMAGE_NAME}-${VERSION} \
|
||||||
|
# ARCH=${ARCH} \
|
||||||
|
# IMAGE_NAME=${IMAGE_NAME} \
|
||||||
|
# IMAGE_REPO=${IMAGE_REPO} \
|
||||||
|
# IMAGE_TAG=${VERSION} \
|
||||||
|
# VARIANT=${VARIANT} \
|
||||||
|
# VERSION=${VERSION} \
|
||||||
|
# WEB_UI=${WEB_UI}
|
||||||
|
|
||||||
|
# make boot.iso \
|
||||||
|
# ARCH=${ARCH} \
|
||||||
|
# IMAGE_NAME=${IMAGE_NAME} \
|
||||||
|
# IMAGE_REPO=${IMAGE_REPO} \
|
||||||
|
# IMAGE_TAG=${VERSION} \
|
||||||
|
# VARIANT=${VARIANT} \
|
||||||
|
# VERSION=${VERSION} \
|
||||||
|
# WEB_UI=${WEB_UI}
|
|
@ -0,0 +1,69 @@
|
||||||
|
|
||||||
|
# lorax_templates/set_installer.tmpl
|
||||||
|
# append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/@IMAGE_NAME@-@IMAGE_TAG@ --transport=oci --no-signature-verification"
|
||||||
|
|
||||||
|
# lorax_templates/configure_upgrades.tmpl
|
||||||
|
# usr/share/anaconda/interactive-defaults.ks
|
||||||
|
# "%post --erroronfail"
|
||||||
|
# "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/@IMAGE_REPO_ESCAPED@\/@IMAGE_NAME@:@IMAGE_TAG@/' /ostree/deploy/default/deploy/*.origin"
|
||||||
|
# "%end"
|
||||||
|
#
|
||||||
|
# usr/share/anaconda/post-scripts/configure_upgrades.ks
|
||||||
|
# "%post --erroronfail"
|
||||||
|
# "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/@IMAGE_REPO_ESCAPED@\/@IMAGE_NAME@:@IMAGE_TAG@/' /ostree/deploy/default/deploy/*.origin"
|
||||||
|
# "%end"
|
||||||
|
|
||||||
|
sed 's/@IMAGE_NAME@/$(IMAGE_NAME)/' $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl
|
||||||
|
|
||||||
|
sed 's/@IMAGE_TAG@/$(IMAGE_TAG)/' $(_BASE_DIR)/lorax_templates/$*.tmpl > $(_BASE_DIR)/lorax_templates/$*.tmpl.tmp
|
||||||
|
mv $(_BASE_DIR)/lorax_templates/$*.tmpl{.tmp,}
|
||||||
|
|
||||||
|
sed 's/@IMAGE_REPO_ESCAPED@/$(_IMAGE_REPO_DOUBLE_ESCAPED)/' $(_BASE_DIR)/lorax_templates/$*.tmpl > $(_BASE_DIR)/lorax_templates/$*.tmpl.tmp
|
||||||
|
mv $(_BASE_DIR)/lorax_templates/$*.tmpl{.tmp,}
|
||||||
|
|
||||||
|
# boot.iso
|
||||||
|
|
||||||
|
rm -Rf $(_BASE_DIR)/results || true
|
||||||
|
rm /etc/rpm/macros.image-language-conf || true
|
||||||
|
|
||||||
|
# Set the enrollment password
|
||||||
|
sed 's/@ENROLLMENT_PASSWORD@/$(ENROLLMENT_PASSWORD)/' $(_BASE_DIR)/scripts/enroll-secureboot-key.sh.in > $(_BASE_DIR)/scripts/enroll-secureboot-key.sh
|
||||||
|
|
||||||
|
# Download the secure boot key
|
||||||
|
if [ -n "$(SECURE_BOOT_KEY_URL)" ]; then\
|
||||||
|
curl --fail -L -o $(_BASE_DIR)/sb_pubkey.der $(SECURE_BOOT_KEY_URL);\
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the default menu entry to the first one
|
||||||
|
sed -i 's/set default="1"/set default="0"/' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg
|
||||||
|
|
||||||
|
sed -i 's/set default="1"/set default="0"/' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg
|
||||||
|
|
||||||
|
# Add Extra Boot Parameters to all menu entries
|
||||||
|
sed -i 's/linux @KERNELPATH@ @ROOT@ quiet/linux @KERNELPATH@ @ROOT@ quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg
|
||||||
|
|
||||||
|
sed -i 's/linuxefi @KERNELPATH@ @ROOT@ quiet/linuxefi @KERNELPATH@ @ROOT@ quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg
|
||||||
|
|
||||||
|
sed -i 's/linux @KERNELPATH@ @ROOT@ rd.live.check quiet/linux @KERNELPATH@ @ROOT@ rd.live.check quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg
|
||||||
|
|
||||||
|
sed -i 's/linuxefi @KERNELPATH@ @ROOT@ rd.live.check quiet/linuxefi @KERNELPATH@ @ROOT@ rd.live.check quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg
|
||||||
|
|
||||||
|
sed -i 's/linux @KERNELPATH@ @ROOT@ nomodeset quiet/linux @KERNELPATH@ @ROOT@ nomodeset quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg
|
||||||
|
|
||||||
|
sed -i 's/linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet/linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg
|
||||||
|
|
||||||
|
sed -i 's/linux @KERNELPATH@ @ROOT@ inst.rescue quiet/linux @KERNELPATH@ @ROOT@ inst.rescue quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-bios.cfg
|
||||||
|
|
||||||
|
sed -i 's/linuxefi @KERNELPATH@ @ROOT@ inst.rescue quiet/linuxefi @KERNELPATH@ @ROOT@ inst.rescue quiet $(EXTRA_BOOT_PARAMS)/g' /usr/share/lorax/templates.d/99-generic/config_files/x86/grub2-efi.cfg
|
||||||
|
|
||||||
|
# Build boot.iso
|
||||||
|
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
||||||
|
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) \
|
||||||
|
$(_LORAX_ARGS) \
|
||||||
|
--repo /etc/yum.repos.d/fedora.repo \
|
||||||
|
--repo /etc/yum.repos.d/fedora-updates.repo \
|
||||||
|
--add-template $(_BASE_DIR)/lorax_templates/set_installer.tmpl \
|
||||||
|
--add-template $(_BASE_DIR)/lorax_templates/configure_upgrades.tmpl \
|
||||||
|
--add-template $(_BASE_DIR)/lorax_templates/secure_boot_key.tmpl \
|
||||||
|
$(_BASE_DIR)/results/
|
||||||
|
mv $(_BASE_DIR)/results/images/boot.iso $(_BASE_DIR)/
|
|
@ -0,0 +1,29 @@
|
||||||
|
FROM debian:12
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
xrdp dbus-x11
|
||||||
|
|
||||||
|
RUN apt-get install -y \
|
||||||
|
xfce4 \
|
||||||
|
xfce4-terminal
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install -y \
|
||||||
|
locales sudo firefox-esr \
|
||||||
|
fonts-noto-cjk
|
||||||
|
|
||||||
|
RUN locale-gen en_US.UTF-8 && locale-gen ko_KR.UTF-8
|
||||||
|
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
ENV LC_ALL C.UTF-8
|
||||||
|
|
||||||
|
RUN useradd -m user && \
|
||||||
|
echo "user:Passw0rd" | chpasswd && \
|
||||||
|
usermod -aG sudo user
|
||||||
|
|
||||||
|
RUN echo "xfce4-session" > /home/user/.xsession && \
|
||||||
|
chown user:user /home/user/.xsession
|
||||||
|
|
||||||
|
EXPOSE 3389
|
||||||
|
|
||||||
|
CMD ["bash", "-c", "/usr/sbin/xrdp-sesman --nodaemon & /usr/sbin/xrdp --nodaemon & tail -f /dev/null"]
|
Loading…
Reference in New Issue