start v2
This commit is contained in:
35
.gitignore
vendored
Normal file
35
.gitignore
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*.pyo
|
||||
|
||||
# VS Code
|
||||
.vscode/*
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/settings.json
|
||||
!.vscode/python.env
|
||||
|
||||
# Build workdirs
|
||||
/live/*
|
||||
!/live/.gitkeep
|
||||
|
||||
/artifacts/features/*
|
||||
!/artifacts/features/.gitkeep
|
||||
/artifacts/bases/*
|
||||
!/artifacts/bases/.gitkeep
|
||||
/artifacts/profiles/*
|
||||
!/artifacts/profiles/.gitkeep
|
||||
|
||||
# Optional final outputs
|
||||
/outputs/*
|
||||
!/outputs/.gitkeep
|
||||
|
||||
# Local env / debug
|
||||
.env
|
||||
.env.*
|
||||
*.log
|
||||
|
||||
# OS junk
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
38
.vscode/launch.json
vendored
Normal file
38
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "RetroDebian: debug run-local (demo, fake legacy)",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/builder/py/build.py",
|
||||
"args": [
|
||||
"run-local",
|
||||
"--profile",
|
||||
"demo"
|
||||
],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": false,
|
||||
"env": {
|
||||
"RETRODEBIAN_FAKE_LEGACY_TOOLS": "1",
|
||||
"PYTHONPATH": "${workspaceFolder}/builder/py"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "RetroDebian: debug validate",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/builder/py/build.py",
|
||||
"args": [
|
||||
"validate"
|
||||
],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": false,
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}/builder/py"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
2
.vscode/python.env
vendored
Normal file
2
.vscode/python.env
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
PYTHONPATH=${workspaceFolder}/builder/py
|
||||
RETRODEBIAN_FAKE_LEGACY_TOOLS=1
|
||||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"python.analysis.extraPaths": [
|
||||
"${workspaceFolder}/builder/py"
|
||||
],
|
||||
"python.envFile": "${workspaceFolder}/.vscode/python.env"
|
||||
}
|
||||
100
.vscode/tasks.json
vendored
Normal file
100
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "RetroDebian: validate",
|
||||
"type": "shell",
|
||||
"command": "python3",
|
||||
"args": [
|
||||
"builder/py/build.py",
|
||||
"validate"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "RetroDebian: list profiles",
|
||||
"type": "shell",
|
||||
"command": "python3",
|
||||
"args": [
|
||||
"builder/py/build.py",
|
||||
"list",
|
||||
"profiles"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "RetroDebian: run-local (demo, fake legacy)",
|
||||
"type": "shell",
|
||||
"command": "python3",
|
||||
"args": [
|
||||
"builder/py/build.py",
|
||||
"run-local",
|
||||
"--profile",
|
||||
"demo"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"RETRODEBIAN_FAKE_LEGACY_TOOLS": "1",
|
||||
"PYTHONPATH": "${workspaceFolder}/builder/py"
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "RetroDebian: run-local (pick profile, fake legacy)",
|
||||
"type": "shell",
|
||||
"command": "python3",
|
||||
"args": [
|
||||
"builder/py/build.py",
|
||||
"run-local",
|
||||
"--profile",
|
||||
"${input:retrodebianProfile}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"RETRODEBIAN_FAKE_LEGACY_TOOLS": "1",
|
||||
"PYTHONPATH": "${workspaceFolder}/builder/py"
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "RetroDebian: run-local (pick profile, real legacy tools)",
|
||||
"type": "shell",
|
||||
"command": "python3",
|
||||
"args": [
|
||||
"builder/py/build.py",
|
||||
"run-local",
|
||||
"--profile",
|
||||
"${input:retrodebianProfile}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"RETRODEBIAN_FAKE_LEGACY_TOOLS": "0",
|
||||
"PYTHONPATH": "${workspaceFolder}/builder/py"
|
||||
}
|
||||
},
|
||||
"problemMatcher": []
|
||||
}
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "retrodebianProfile",
|
||||
"type": "pickString",
|
||||
"description": "Choose the RetroDebian profile to build locally",
|
||||
"options": [
|
||||
"demo"
|
||||
],
|
||||
"default": "demo"
|
||||
}
|
||||
]
|
||||
}
|
||||
225
Dockerfile
225
Dockerfile
@@ -1,225 +0,0 @@
|
||||
FROM i386/alpine:latest AS glide-fetcher
|
||||
ARG CACHE_BUST=38
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
COPY .docker-cache/glide.ref /tmp/glide.ref
|
||||
WORKDIR /src
|
||||
RUN cat /tmp/glide.ref > /dev/null && \
|
||||
echo "$CACHE_BUST" > /dev/null && \
|
||||
git clone --depth 1 --branch retrodebian --single-branch https://gitea.chacha.ddns.net/chacha/glide.git && \
|
||||
rm -Rf glide/.git
|
||||
|
||||
FROM i386/alpine:latest AS icons-fetcher
|
||||
ARG CACHE_BUST=11
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
COPY .docker-cache/icons.ref /tmp/icons.ref
|
||||
WORKDIR /root
|
||||
RUN cat /tmp/icons.ref > /dev/null && \
|
||||
echo "$CACHE_BUST" > /dev/null && \
|
||||
git clone --depth 1 --branch main --single-branch https://gitea.chacha.ddns.net/chacha/icons-collection.git && \
|
||||
rm -Rf icons-collection/.git
|
||||
|
||||
# building a modified Kernel + modules + libs
|
||||
FROM lpenz/debian-etch-i386-minbase AS packages-builder
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG ARCH=i386
|
||||
ARG CONCURRENCY_LEVEL=4
|
||||
|
||||
# Preparing Environment
|
||||
RUN (echo "deb http://archive.debian.org/debian etch main non-free" > /etc/apt/sources.list) && \
|
||||
(echo "deb-src http://archive.debian.org/debian etch main non-free" >> /etc/apt/sources.list) && \
|
||||
mkdir -p /usr/src/modules &&\
|
||||
apt-get update && \
|
||||
apt-get install -y aptitude build-essential quilt cvs unzip git-core ncurses-dev\
|
||||
linux-headers-2.6.24-etchnhalf.1-686 \
|
||||
squashfs-source-etchnhalf \
|
||||
linux-source-2.6.24 && \
|
||||
apt-get build-dep -y linux-image-2.6.24-etchnhalf.1-686 && \
|
||||
apt-get clean
|
||||
|
||||
# Preparing Kernel + patchs + modules
|
||||
WORKDIR /usr/src
|
||||
COPY unionfs-2.2.3_for_2.6.24.diff.gz ./
|
||||
COPY nvidia.patch ./
|
||||
COPY --from=glide-fetcher /src/glide glide
|
||||
RUN tar xjf linux-source-2.6.24.tar.bz2 && \
|
||||
tar xjf etchnhalf/squashfs.tar.bz2 && \
|
||||
ln -s linux-headers-2.6.24-etchnhalf.1-686/ linux-headers && \
|
||||
mv glide/Device3Dfx modules/ &&\
|
||||
wget http://archive.debian.org/debian-archive/debian/pool/non-free/n/nvidia-graphics-drivers-legacy-71xx/nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb && \
|
||||
dpkg-deb -x nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb / && \
|
||||
tar xjf nvidia-kernel-legacy-71xx.tar.bz2 && \
|
||||
rm nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb && \
|
||||
patch -d modules/nvidia-kernel-legacy-71xx -p1 < nvidia.patch
|
||||
|
||||
# Building Kernel + patchs + modules
|
||||
WORKDIR /usr/src/linux-source-2.6.24
|
||||
COPY config-kernel ./
|
||||
RUN (zcat /usr/src/unionfs-2.2.3_for_2.6.24.diff.gz | patch -p1) && \
|
||||
(cat config-kernel > .config) && \
|
||||
make oldconfig &&\
|
||||
make-kpkg --initrd --arch $ARCH kernel_headers kernel_image modules_image
|
||||
|
||||
# Modified urxvt terminal
|
||||
WORKDIR /usr/src
|
||||
RUN apt-get build-dep -y rxvt-unicode && \
|
||||
apt-get source rxvt-unicode &&\
|
||||
cd rxvt-unicode-* && \
|
||||
cp debian/rules debian/rules.orig && \
|
||||
cp debian/changelog debian/changelog.orig && \
|
||||
sed -i '/\.\/configure/ s/$/ --disable-iso14755/' debian/rules && \
|
||||
perl -0pi -e 's/#if ENABLE_FRILLS \|\| ISO_14755\n\s*\/\/ ISO 14755 support/#if 0\n \/\/ ISO 14755 support/' src/command.C && \
|
||||
sed -i '1s/^\([^)]* (\)\([^)]*\)\(.*\)$/\1\2+retrodebian1\3/' debian/changelog && \
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
FROM packages-builder AS voodoo-builder
|
||||
# Building userspace libs
|
||||
# 3Dfx
|
||||
WORKDIR /usr/src
|
||||
COPY buildglidepkg.sh ./
|
||||
RUN apt-get install -y nasm && \
|
||||
chmod +x buildglidepkg.sh
|
||||
# cvg / voodoo2
|
||||
WORKDIR /usr/src/glide
|
||||
RUN find . -type f \( -name 'fxgasm.h' -o -name 'fxinline.h' -o -name 'fxgasm' \) -exec rm -f {} \;
|
||||
# glide2x
|
||||
RUN mv swlibs glide2x/
|
||||
WORKDIR /usr/src/glide/glide2x/
|
||||
RUN make -f makefile.linux FX_GLIDE_HW=cvg clean
|
||||
RUN make -f makefile.linux FX_GLIDE_HW=cvg USE_X86=1 USE_MMX=0
|
||||
RUN mv swlibs ../glide3x/
|
||||
## glide3x
|
||||
WORKDIR /usr/src/glide/glide3x/
|
||||
RUN make -f makefile.linux FX_GLIDE_HW=cvg clean
|
||||
RUN make -f makefile.linux FX_GLIDE_HW=cvg USE_X86=1 USE_MMX=1
|
||||
RUN mv swlibs ../
|
||||
WORKDIR /usr/src/
|
||||
RUN /usr/src/buildglidepkg.sh cvg
|
||||
|
||||
## h3 / voodoo3 & Banshee
|
||||
#WORKDIR /usr/src/glide
|
||||
#RUN echo test3 && find . -type f -name 'fxgasm.h'
|
||||
#RUN find . -type f \( -name 'fxgasm.h' -o -name 'fxinline.h' -o -name 'fxgasm' \) -exec rm -f {} \;
|
||||
#RUN apt-get install -y libx11-dev x11proto-xf86dga-dev libxxf86vm-dev libxxf86dga-dev
|
||||
### glide2x
|
||||
#RUN mv swlibs glide2x/
|
||||
#WORKDIR /usr/src/glide/glide2x/
|
||||
#RUN make -f makefile.linux clean
|
||||
#RUN make -f makefile.linux FX_GLIDE_HW=h3 USE_X86=1 USE_MMX=1
|
||||
## glide3x
|
||||
#RUN mv swlibs ../glide3x/
|
||||
#WORKDIR /usr/src/glide/glide3x/
|
||||
#RUN make -f makefile.linux clean
|
||||
#RUN make -f makefile.linux FX_GLIDE_HW=h3 USE_X86=1 USE_MMX=1
|
||||
#RUN mv swlibs ../
|
||||
#WORKDIR /usr/src/
|
||||
#RUN /usr/src/buildglidepkg.sh h3
|
||||
|
||||
## sst1 / voodoo1
|
||||
#WORKDIR /usr/src/glide
|
||||
#RUN find . -type f \( -name 'fxgasm.h' -o -name 'fxinline.h' -o -name 'fxgasm' \) -exec rm -f {} \;
|
||||
## glide2x
|
||||
#RUN mv swlibs glide2x/
|
||||
#WORKDIR /usr/src/glide/glide2x/
|
||||
#RUN make -f makefile.linux clean
|
||||
#RUN make -f makefile.linux FX_GLIDE_HW=sst1 USE_X86=1 USE_MMX=1
|
||||
## glide3x
|
||||
#RUN mv swlibs ../glide3x/
|
||||
#WORKDIR /usr/src/glide/glide3x/
|
||||
#RUN make -f makefile.linux clean
|
||||
#RUN make -f makefile.linux FX_GLIDE_HW=sst1 USE_X86=1 USE_MMX=1
|
||||
#RUN mv swlibs ../
|
||||
#WORKDIR /usr/src/
|
||||
#RUN /usr/src/buildglidepkg.sh sst1
|
||||
|
||||
# sst96 / voodoo Rush
|
||||
# cannot build driver because of missing xf86rush lib...
|
||||
#WORKDIR /usr/src/
|
||||
#WORKDIR /usr/src/glide
|
||||
#RUN find . -type f \( -name 'fxgasm.h' -o -name 'fxinline.h' -o -name 'fxgasm' \) -exec rm -f {} \;
|
||||
# # glide2x
|
||||
# RUN mv swlibs glide2x/
|
||||
# WORKDIR /usr/src/glide/glide2x/
|
||||
# RUN make -f Makefile.linux clean
|
||||
# RUN make -f Makefile.linux FX_GLIDE_HW=sst96
|
||||
# # glide3x
|
||||
# RUN mv swlibs ../glide3x/
|
||||
# WORKDIR /usr/src/glide/glide3x/
|
||||
# RUN make -f Makefile.linux clean
|
||||
# RUN make -f Makefile.linux FX_GLIDE_HW=sst96 USE_X86=1 USE_MMX=1
|
||||
# RUN mv swlibs ../
|
||||
#WORKDIR /usr/src/
|
||||
#RUN /usr/src/buildglidepkg.sh sst96
|
||||
|
||||
#RUN rm *.gz *.bz2 && rm -Rf glide && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM i386/alpine:latest AS ut99-builder
|
||||
RUN apk add --no-cache git ca-certificates dos2unix
|
||||
ARG CACHE_BUST=10
|
||||
COPY .docker-cache/ut99.ref /tmp/ut99.ref
|
||||
# Package UT99
|
||||
WORKDIR /root
|
||||
RUN cat /tmp/ut99.ref > /dev/null && \
|
||||
echo "$CACHE_BUST" && \
|
||||
git clone --depth 1 --branch master --single-branch https://gitea.chacha.ddns.net/chacha/UT99-Official.git ut-game && \
|
||||
rm -Rf ut-game/.git
|
||||
COPY games/ut99/ut-install-436.run ./
|
||||
RUN chmod +x ut-install-436.run && \
|
||||
./ut-install-436.run --target ./ut || true && \
|
||||
tar xzf ./ut/data.tar.gz -C ut-game && \
|
||||
cp ./ut/bin/x86/ut ut-game/ && \
|
||||
rm ut-game/System/*.frt && \
|
||||
rm ut-game/System/*.itt && \
|
||||
rm ut-game/System/*.est && \
|
||||
rm ut-game/System/*.exe && \
|
||||
rm ut-game/System/*.dll && \
|
||||
rm ut-game/System/*.url && \
|
||||
rm ut-game/System/*.bat && \
|
||||
rm ut-game/System/de.* && \
|
||||
rm ut-game/System/UnrealTournament.ini && \
|
||||
rm ut-game/System/Default.ini && \
|
||||
rm ut-game/System/libSDL-1.1.so.0 && \
|
||||
rm ut-game/Sounds/*est_uax && \
|
||||
rm ut-game/Sounds/*frt_uax && \
|
||||
rm ut-game/Sounds/*itt_uax && \
|
||||
rm ut-game/DoConfig.py && \
|
||||
rm ut-game/DoConfig.sh && \
|
||||
rm -Rf ut-game/Web && \
|
||||
rm -Rf ut-game/Help/* &&\
|
||||
tar xzf ./ut/Glide.ini.tar.gz -C ut-game && \
|
||||
mv ut-game/System/UnrealTournament.ini ut-game/System/Default-glide.ini && \
|
||||
ls -al ./ut/ && \
|
||||
tar xzf ./ut/OpenGL.ini.tar.gz -C ut-game && \
|
||||
cp ut-game/System/UnrealTournament.ini ut-game/System/Default.ini && \
|
||||
mv ut-game/System/UnrealTournament.ini ut-game/System/Default-opengl.ini && \
|
||||
dos2unix ut-game/System/*.ini
|
||||
COPY games/ut99/ut ./ut-game/ut
|
||||
RUN chmod a+x,o-w ./ut-game/ut
|
||||
|
||||
# Note: we need to use Lenny because of live-helper
|
||||
# it allows creating Etch live image though !
|
||||
FROM lpenz/debian-lenny-i386-minbase
|
||||
WORKDIR /root
|
||||
COPY --from=packages-builder /usr/src/*.deb .
|
||||
COPY --from=voodoo-builder /usr/src/*.deb .
|
||||
COPY --from=ut99-builder /root/ut-game ./ut-game
|
||||
COPY --from=icons-fetcher /root/icons-collection ./icons-collection
|
||||
COPY /deps ./deps
|
||||
COPY update-initramfs.sh .
|
||||
COPY zzz-config-live.sh .
|
||||
COPY desktop .
|
||||
COPY wallpaper.jpg .
|
||||
COPY neofetch .
|
||||
COPY editions ./editions
|
||||
COPY internal ./internal
|
||||
RUN apt-get update && \
|
||||
apt-get -y --force-yes install live-helper genisoimage syslinux squashfs-tools aptitude && \
|
||||
apt-get clean
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /root/live
|
||||
|
||||
#FROM voodoo-builder
|
||||
#WORKDIR /usr/src
|
||||
#RUN apt-get build-dep -y debian-edu-artwork-usplash && \
|
||||
# apt-get source debian-edu-artwork-usplash &&\
|
||||
# ls -al && \
|
||||
# cd debian-edu-artwork-*
|
||||
381
Jenkinsfile
vendored
381
Jenkinsfile
vendored
@@ -1,226 +1,207 @@
|
||||
pipeline {
|
||||
agent {
|
||||
label 'pyDABFActory-CIAgent'
|
||||
agent any
|
||||
|
||||
parameters {
|
||||
booleanParam(name: 'BUILD_ALL_PROFILES', defaultValue: true, description: 'Build all profiles one by one')
|
||||
string(name: 'PROFILE', defaultValue: 'demo', description: 'Profile to build when BUILD_ALL_PROFILES is false')
|
||||
string(name: 'PYTHON_IMAGE', defaultValue: 'python:3.11-alpine', description: 'Default image for Python/control-plane steps')
|
||||
string(name: 'ETCH_IMAGE', defaultValue: '', description: 'Default Etch image when ETCH_DOCKERFILE is empty')
|
||||
string(name: 'ETCH_DOCKERFILE', defaultValue: '', description: 'Optional default Dockerfile path for Etch runtime')
|
||||
string(name: 'LENNY_IMAGE', defaultValue: '', description: 'Default Lenny image when LENNY_DOCKERFILE is empty')
|
||||
string(name: 'LENNY_DOCKERFILE', defaultValue: '', description: 'Optional default Dockerfile path for Lenny runtime')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('GIT get refs and download some standard things') {
|
||||
agent {
|
||||
docker {
|
||||
image 'alpine:3.21'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stage('Validate builder') {
|
||||
steps {
|
||||
sh '''
|
||||
set -eu
|
||||
apk add --no-cache git jq curl
|
||||
|
||||
mkdir -p .docker-cache
|
||||
|
||||
git ls-remote https://gitea.chacha.ddns.net/chacha/glide.git refs/heads/retrodebian \
|
||||
| awk '{print $1}' > .docker-cache/glide.ref
|
||||
test -s .docker-cache/glide.ref
|
||||
echo "glide ref: $(cat .docker-cache/glide.ref)"
|
||||
|
||||
git ls-remote https://gitea.chacha.ddns.net/chacha/UT99-Official.git refs/heads/master \
|
||||
| awk '{print $1}' > .docker-cache/ut99.ref
|
||||
test -s .docker-cache/ut99.ref
|
||||
echo "ut99 ref: $(cat .docker-cache/ut99.ref)"
|
||||
|
||||
git ls-remote https://gitea.chacha.ddns.net/chacha/icons-collection.git refs/heads/main \
|
||||
| awk '{print $1}' > .docker-cache/icons.ref
|
||||
test -s .docker-cache/icons.ref
|
||||
echo "icons ref: $(cat .docker-cache/icons.ref)"
|
||||
|
||||
curl -s "https://gitea.chacha.ddns.net/api/v1/repos/chacha/V2TMUMemTester/releases" \
|
||||
| jq -r 'map(select(.draft == false)) | .[0].assets[] | select(.name=="v2-tmu-memtester") | .browser_download_url' \
|
||||
| xargs -n1 curl -L -o v2-tmu-memtester
|
||||
|
||||
chmod +x v2-tmu-memtester
|
||||
'''
|
||||
script {
|
||||
docker.image(params.PYTHON_IMAGE).inside {
|
||||
sh 'python3 builder/py/build.py validate'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Convert splash images')
|
||||
{
|
||||
agent {
|
||||
docker {
|
||||
image 'alpine:3.21'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build common features') {
|
||||
steps {
|
||||
sh '''
|
||||
set -eu
|
||||
apk add --no-cache imagemagick
|
||||
found_edition=0
|
||||
for edition_dir in editions/*; do
|
||||
[ -d "$edition_dir" ] || continue
|
||||
found_edition=1
|
||||
set -- "$edition_dir"/splash-source.*
|
||||
if [ ! -e "$1" ]; then
|
||||
echo "ERROR: missing splash-source.* in $edition_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "ERROR: multiple splash-source.* files in $edition_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
src="$1"
|
||||
out="$edition_dir/splash.jpg"
|
||||
echo "Converting $src -> $out"
|
||||
magick "$src" \
|
||||
-resize 640x480! \
|
||||
-background black \
|
||||
-alpha remove -alpha off \
|
||||
-colorspace sRGB \
|
||||
-strip \
|
||||
-quality 95 \
|
||||
"$out"
|
||||
done
|
||||
|
||||
if [ "$found_edition" -eq 0 ]; then
|
||||
echo "ERROR: no edition directory found under editions/" >&2
|
||||
exit 1
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Create live')
|
||||
{
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
dir '.'
|
||||
label 'pyDABFActory-CIAgent'
|
||||
args '--privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined -u root:root'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Configure ISO') {
|
||||
steps {
|
||||
dir('root')
|
||||
{
|
||||
sh 'rm -Rf live artifacts'
|
||||
script {
|
||||
def resolveDefaultRuntimeImage = { String runtimeName, String imageName, String dockerfilePath ->
|
||||
if (dockerfilePath?.trim()) {
|
||||
return docker.build("retrodebian/${runtimeName}:${env.BUILD_TAG}", "-f ${dockerfilePath} .").imageName()
|
||||
}
|
||||
dir('root/live')
|
||||
{
|
||||
sh '''
|
||||
set -e
|
||||
deb="$(ls -1 /root/linux-image-*.deb | head -n1)"
|
||||
kernpkg="$(dpkg-deb -f "$deb" Package)"
|
||||
echo "$kernpkg"
|
||||
if (!imageName?.trim()) {
|
||||
error("Missing default image for runtime ${runtimeName}")
|
||||
}
|
||||
return imageName.trim()
|
||||
}
|
||||
|
||||
deb="$(ls -1 /root/squashfs-modules-*.deb | head -n1)"
|
||||
squashfspkg="$(dpkg-deb -f "$deb" Package)"
|
||||
echo "$squashfspkg"
|
||||
def resolveModuleRuntimeImage = { String runtimeName, String kind, String name, String phase, String defaultImage ->
|
||||
def overrideImage = ''
|
||||
def overrideDockerfile = ''
|
||||
def overrideContext = ''
|
||||
docker.image(params.PYTHON_IMAGE).inside {
|
||||
overrideImage = sh(script: "python3 builder/py/build.py module-docker --kind ${kind} --name ${name} --phase ${phase} image", returnStdout: true).trim()
|
||||
overrideDockerfile = sh(script: "python3 builder/py/build.py module-docker --kind ${kind} --name ${name} --phase ${phase} dockerfile", returnStdout: true).trim()
|
||||
overrideContext = sh(script: "python3 builder/py/build.py module-docker --kind ${kind} --name ${name} --phase ${phase} docker_context", returnStdout: true).trim()
|
||||
}
|
||||
if (overrideDockerfile) {
|
||||
def tag = overrideImage ? overrideImage : "retrodebian/${runtimeName}-${kind}-${name}-${phase}:${env.BUILD_TAG}"
|
||||
def contextPath = overrideContext ? overrideContext : '.'
|
||||
return docker.build(tag, "-f ${overrideDockerfile} ${contextPath}").imageName()
|
||||
}
|
||||
if (overrideImage) {
|
||||
return overrideImage
|
||||
}
|
||||
return defaultImage
|
||||
}
|
||||
|
||||
lh_config \
|
||||
-a i386 \
|
||||
--distribution etch \
|
||||
--apt apt \
|
||||
--apt-options "--yes --force-yes" \
|
||||
--apt-secure false \
|
||||
--apt-recommends false \
|
||||
--linux-packages "squashfs-modules-2.6.24 linux-image-2.6.24 device3dfx-modules-2.6.24" \
|
||||
--packages-lists "desktop" \
|
||||
--mirror-bootstrap http://archive.debian.org/debian/ \
|
||||
--mirror-binary http://archive.debian.org/debian/ \
|
||||
--mirror-binary-security http://archive.debian.org/debian-security/ \
|
||||
--mirror-chroot http://archive.debian.org/debian/ \
|
||||
--mirror-chroot-security http://archive.debian.org/debian-security/ \
|
||||
--binary-images iso \
|
||||
--bootloader syslinux \
|
||||
--syslinux-timeout 5 \
|
||||
--syslinux-menu true \
|
||||
--bootstrap debootstrap \
|
||||
--debconf-frontend noninteractive \
|
||||
--debian-installer live \
|
||||
--bootappend-live "elevator=deadline" \
|
||||
--hostname RetroDebian \
|
||||
--iso-application RetroDebian \
|
||||
--syslinux-splash config/binary_syslinux/splash.jpg \
|
||||
--union-filesystem unionfs \
|
||||
--username bob \
|
||||
--templates config/templates \
|
||||
-k retrodebian1
|
||||
def pythonDefaultImage = params.PYTHON_IMAGE.trim()
|
||||
def etchDefaultImage = resolveDefaultRuntimeImage('etch-default', params.ETCH_IMAGE, params.ETCH_DOCKERFILE)
|
||||
def lennyDefaultImage = resolveDefaultRuntimeImage('lenny-default', params.LENNY_IMAGE, params.LENNY_DOCKERFILE)
|
||||
|
||||
cp -R /usr/share/live-helper/templates/* config/templates/
|
||||
sed -i \
|
||||
-e 's|^menu vshift.*|menu vshift 4|' \
|
||||
-e 's|^menu hshift.*|menu hshift 9|' \
|
||||
-e 's|^menu width.*|menu width 60|' \
|
||||
-e 's|^menu color sel.*|menu color sel * #ff82c059 #c01f1f1f none|' \
|
||||
-e 's|^menu color unsel.*|menu color unsel * #8082c059 #c01f1f1f none|' \
|
||||
-e 's|^menu color hotkey.*|menu color hotkey * #fff01e1e #c01f1f1f none|' \
|
||||
-e 's|^menu color tabmsg.*|menu color tabmsg * #ffB0B0B0 #00000000 none|' \
|
||||
-e 's|^menu color timeout_msg.*|menu color timeout_msg * #ffB0B0B0 #00000000 none|' \
|
||||
-e 's|^menu color timeout.*|menu color timeout * #ffff0000 #00000000 none|' \
|
||||
config/templates/syslinux/menu/header.cfg
|
||||
def featureNames = []
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
def raw = sh(script: 'python3 builder/py/build.py list features', returnStdout: true).trim()
|
||||
featureNames = raw ? raw.split('\n').findAll { it?.trim() } : []
|
||||
}
|
||||
|
||||
cp -R /root/internal/rootfs/* config/chroot_local-includes
|
||||
|
||||
chmod +x /root/update-initramfs.sh
|
||||
chmod +x /root/zzz-config-live.sh
|
||||
cp /root/update-initramfs.sh config/chroot_local-hooks
|
||||
cp /root/zzz-config-live.sh config/chroot_local-hooks
|
||||
cp /root/linux-image-*.deb config/chroot_local-packages/
|
||||
cp /root/rxvt-unicode_*.deb config/chroot_local-packages/
|
||||
cp /root/device3dfx-*.deb config/chroot_local-packages/
|
||||
cp /root/squashfs-modules-*.deb config/chroot_local-packages/
|
||||
cp /root/libglide*-cvg*_i386.deb config/chroot_local-packages/
|
||||
cp /root/desktop config/chroot_local-packageslists/
|
||||
mkdir -p config/chroot_local-includes/usr/share/wallpapers
|
||||
cp /root/wallpaper.jpg config/chroot_local-includes/usr/share/wallpapers/retrodebian.jpg
|
||||
mkdir -p config/chroot_local-includes/usr/local/bin
|
||||
cp /root/neofetch config/chroot_local-includes/usr/local/bin/neofetch
|
||||
chmod +x config/chroot_local-includes/usr/local/bin/neofetch
|
||||
cp /root/editions/voodoo2/splash.jpg config/binary_syslinux/
|
||||
cp "$WORKSPACE/v2-tmu-memtester" config/chroot_local-includes/usr/local/bin/
|
||||
'''
|
||||
for (featureName in featureNames) {
|
||||
stage("Feature ${featureName}") {
|
||||
def pythonImagePre = resolveModuleRuntimeImage('python', 'feature', featureName, 'pre-gen', pythonDefaultImage)
|
||||
docker.image(pythonImagePre).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind feature --phase pre-gen --profile ${params.PROFILE} --feature ${featureName}"
|
||||
sh "python3 builder/py/build.py export-env --kind feature --phase pre-gen --profile ${params.PROFILE} --feature ${featureName} --output artifacts/features/${featureName}/runtime.env"
|
||||
}
|
||||
def etchImage = resolveModuleRuntimeImage('etch', 'feature', featureName, 'generate', etchDefaultImage)
|
||||
docker.image(etchImage).inside {
|
||||
sh "builder/bash/run_generate.sh features/${featureName} artifacts/features/${featureName}/runtime.env"
|
||||
}
|
||||
def pythonImagePost = resolveModuleRuntimeImage('python', 'feature', featureName, 'post-gen', pythonDefaultImage)
|
||||
docker.image(pythonImagePost).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind feature --phase post-gen --profile ${params.PROFILE} --feature ${featureName}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Configure games') {
|
||||
steps {
|
||||
dir('root/live') {
|
||||
sh '''
|
||||
mkdir -p config/chroot_local-includes/usr/local/games/ut99/
|
||||
ls -al /root
|
||||
cp -R /root/ut-game/* config/chroot_local-includes/usr/local/games/ut99/
|
||||
mkdir -p config/chroot_local-includes/usr/share/icons
|
||||
cp /root/icons-collection/small/ut99.png config/chroot_local-includes/usr/share/icons/
|
||||
'''
|
||||
|
||||
def profileNames = []
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
if (params.BUILD_ALL_PROFILES) {
|
||||
def raw = sh(script: 'python3 builder/py/build.py list profiles', returnStdout: true).trim()
|
||||
profileNames = raw ? raw.split('\n').findAll { it?.trim() } : []
|
||||
} else {
|
||||
profileNames = [params.PROFILE]
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build ISO') {
|
||||
steps {
|
||||
dir('root/live')
|
||||
{
|
||||
sh 'lh_build'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Save artifacts') {
|
||||
steps {
|
||||
dir('root')
|
||||
{
|
||||
sh '''
|
||||
mkdir artifacts
|
||||
mv /root/*.deb artifacts/
|
||||
'''
|
||||
|
||||
for (profileName in profileNames) {
|
||||
stage("Profile ${profileName}") {
|
||||
def baseName = ''
|
||||
def baseChain = []
|
||||
def featureList = []
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
baseName = sh(script: "python3 builder/py/build.py profile-info --profile ${profileName} base", returnStdout: true).trim()
|
||||
def chainRaw = sh(script: "python3 builder/py/build.py profile-info --profile ${profileName} base-chain", returnStdout: true).trim()
|
||||
baseChain = chainRaw ? chainRaw.split('\n').findAll { it?.trim() } : []
|
||||
def featuresRaw = sh(script: "python3 builder/py/build.py profile-info --profile ${profileName} features", returnStdout: true).trim()
|
||||
featureList = featuresRaw ? featuresRaw.split('\n').findAll { it?.trim() } : []
|
||||
}
|
||||
|
||||
for (baseItem in baseChain) {
|
||||
stage("Base ${profileName} / ${baseItem}") {
|
||||
def pythonImagePre = resolveModuleRuntimeImage('python', 'base', baseItem, 'pre-gen', pythonDefaultImage)
|
||||
docker.image(pythonImagePre).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind base --phase pre-gen --profile ${profileName} --base ${baseItem}"
|
||||
sh "python3 builder/py/build.py export-env --kind base --phase pre-gen --profile ${profileName} --base ${baseItem} --output artifacts/bases/${baseItem}/runtime.env"
|
||||
}
|
||||
def etchImage = resolveModuleRuntimeImage('etch', 'base', baseItem, 'generate', etchDefaultImage)
|
||||
docker.image(etchImage).inside {
|
||||
sh "builder/bash/run_generate.sh bases/${baseItem} artifacts/bases/${baseItem}/runtime.env"
|
||||
}
|
||||
def pythonImagePost = resolveModuleRuntimeImage('python', 'base', baseItem, 'post-gen', pythonDefaultImage)
|
||||
docker.image(pythonImagePost).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind base --phase post-gen --profile ${profileName} --base ${baseItem}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
sh "python3 builder/py/build.py prepare-profile --profile ${profileName}"
|
||||
sh "python3 builder/py/build.py export-env --kind profile --phase config --profile ${profileName} --output artifacts/profiles/${profileName}/profile-config.env"
|
||||
}
|
||||
docker.image(lennyDefaultImage).inside {
|
||||
sh "builder/bash/run_profile_config.sh artifacts/profiles/${profileName}/profile-config.env"
|
||||
}
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
sh "python3 builder/py/build.py inject-resources --kind base --name ${baseName}"
|
||||
}
|
||||
|
||||
def basePreFeaturePythonImage = resolveModuleRuntimeImage('python', 'base', baseName, 'pre-feature', pythonDefaultImage)
|
||||
docker.image(basePreFeaturePythonImage).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind base --phase pre-feature --profile ${profileName} --base ${baseName}"
|
||||
sh "python3 builder/py/build.py export-env --kind base --phase pre-feature --profile ${profileName} --base ${baseName} --output artifacts/bases/${baseName}/pre-feature.env"
|
||||
}
|
||||
def basePreFeatureLennyImage = resolveModuleRuntimeImage('lenny', 'base', baseName, 'pre-feature', lennyDefaultImage)
|
||||
docker.image(basePreFeatureLennyImage).inside {
|
||||
sh "builder/bash/run_entry.sh bases/${baseName} artifacts/bases/${baseName}/pre-feature.env pre-feature"
|
||||
}
|
||||
|
||||
for (featureName in featureList) {
|
||||
stage("Inject ${profileName} / ${featureName}") {
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
sh "python3 builder/py/build.py save-feature-metadata --profile ${profileName} --feature ${featureName}"
|
||||
}
|
||||
def featurePreInjPythonImage = resolveModuleRuntimeImage('python', 'feature', featureName, 'pre-inj', pythonDefaultImage)
|
||||
docker.image(featurePreInjPythonImage).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind feature --phase pre-inj --profile ${profileName} --feature ${featureName}"
|
||||
sh "python3 builder/py/build.py export-env --kind feature --phase pre-inj --profile ${profileName} --feature ${featureName} --output artifacts/features/${featureName}/pre-inj.env"
|
||||
}
|
||||
def featurePreInjLennyImage = resolveModuleRuntimeImage('lenny', 'feature', featureName, 'pre-inj', lennyDefaultImage)
|
||||
docker.image(featurePreInjLennyImage).inside {
|
||||
sh "builder/bash/run_entry.sh features/${featureName} artifacts/features/${featureName}/pre-inj.env pre-inj"
|
||||
}
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
sh "python3 builder/py/build.py inject-resources --kind feature --name ${featureName}"
|
||||
sh "python3 builder/py/build.py export-env --kind feature --phase post-inj --profile ${profileName} --feature ${featureName} --output artifacts/features/${featureName}/post-inj.env"
|
||||
}
|
||||
def featurePostInjLennyImage = resolveModuleRuntimeImage('lenny', 'feature', featureName, 'post-inj', lennyDefaultImage)
|
||||
docker.image(featurePostInjLennyImage).inside {
|
||||
sh "builder/bash/run_entry.sh features/${featureName} artifacts/features/${featureName}/post-inj.env post-inj"
|
||||
}
|
||||
def featurePostInjPythonImage = resolveModuleRuntimeImage('python', 'feature', featureName, 'post-inj', pythonDefaultImage)
|
||||
docker.image(featurePostInjPythonImage).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind feature --phase post-inj --profile ${profileName} --feature ${featureName}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def basePostFeaturePythonImage = resolveModuleRuntimeImage('python', 'base', baseName, 'post-feature', pythonDefaultImage)
|
||||
docker.image(basePostFeaturePythonImage).inside {
|
||||
sh "python3 builder/py/build.py run-python-phase --kind base --phase post-feature --profile ${profileName} --base ${baseName}"
|
||||
sh "python3 builder/py/build.py export-env --kind base --phase post-feature --profile ${profileName} --base ${baseName} --output artifacts/bases/${baseName}/post-feature.env"
|
||||
sh "python3 builder/py/build.py profile-pre-build --profile ${profileName}"
|
||||
sh "python3 builder/py/build.py export-env --kind profile --phase build --profile ${profileName} --output artifacts/profiles/${profileName}/profile-build.env"
|
||||
}
|
||||
def basePostFeatureLennyImage = resolveModuleRuntimeImage('lenny', 'base', baseName, 'post-feature', lennyDefaultImage)
|
||||
docker.image(basePostFeatureLennyImage).inside {
|
||||
sh "builder/bash/run_entry.sh bases/${baseName} artifacts/bases/${baseName}/post-feature.env post-feature"
|
||||
}
|
||||
docker.image(lennyDefaultImage).inside {
|
||||
sh "builder/bash/run_profile_build.sh artifacts/profiles/${profileName}/profile-build.env"
|
||||
}
|
||||
docker.image(pythonDefaultImage).inside {
|
||||
sh "python3 builder/py/build.py profile-finalize --profile ${profileName}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
archiveArtifacts artifacts: 'root/live/*.iso', fingerprint: true
|
||||
archiveArtifacts artifacts: 'root/artifacts/*.deb', fingerprint: true
|
||||
deleteDir()
|
||||
always {
|
||||
archiveArtifacts artifacts: 'artifacts/**/*', allowEmptyArchive: true
|
||||
archiveArtifacts artifacts: 'live/**/*', allowEmptyArchive: true
|
||||
}
|
||||
}
|
||||
}
|
||||
675
LICENSE.md
675
LICENSE.md
@@ -1,675 +0,0 @@
|
||||
# GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom
|
||||
to share and change all versions of a program--to make sure it remains
|
||||
free software for all its users. We, the Free Software Foundation, use
|
||||
the GNU General Public License for most of our software; it applies
|
||||
also to any other work released this way by its authors. You can apply
|
||||
it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you
|
||||
have certain responsibilities if you distribute copies of the
|
||||
software, or if you modify it: responsibilities to respect the freedom
|
||||
of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the
|
||||
manufacturer can do so. This is fundamentally incompatible with the
|
||||
aim of protecting users' freedom to change the software. The
|
||||
systematic pattern of such abuse occurs in the area of products for
|
||||
individuals to use, which is precisely where it is most unacceptable.
|
||||
Therefore, we have designed this version of the GPL to prohibit the
|
||||
practice for those products. If such problems arise substantially in
|
||||
other domains, we stand ready to extend this provision to those
|
||||
domains in future versions of the GPL, as needed to protect the
|
||||
freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish
|
||||
to avoid the special danger that patents applied to a free program
|
||||
could make it effectively proprietary. To prevent this, the GPL
|
||||
assures that patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
## TERMS AND CONDITIONS
|
||||
|
||||
### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
### 13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in
|
||||
detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU General Public
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that numbered version or
|
||||
of any later version published by the Free Software Foundation. If the
|
||||
Program does not specify a version number of the GNU General Public
|
||||
License, you may choose any version ever published by the Free
|
||||
Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU General Public License can be used, that proxy's public
|
||||
statement of acceptance of a version permanently authorizes you to
|
||||
choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
## How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands \`show w' and \`show c' should show the
|
||||
appropriate parts of the General Public License. Of course, your
|
||||
program's commands might be different; for a GUI interface, you would
|
||||
use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your
|
||||
program into proprietary programs. If your program is a subroutine
|
||||
library, you may consider it more useful to permit linking proprietary
|
||||
applications with the library. If this is what you want to do, use the
|
||||
GNU Lesser General Public License instead of this License. But first,
|
||||
please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
49
README.md
49
README.md
@@ -1,45 +1,10 @@
|
||||
# RetroDebian Live
|
||||
# RetroDebian Builder V2 skeleton
|
||||
|
||||
RetroDebian Live is a custom live distro built on **Debian Etch** for **retro gaming on classic x86 hardware**.
|
||||
Generated project tree for the RetroDebian V2 workflow.
|
||||
|
||||
It is made for machines like the **Pentium II** and **Pentium III**, with one goal:
|
||||
deliver a **fast, light, period-appropriate Linux system** for old games, old GPUs, and old hardware experiments.
|
||||
Main entry points:
|
||||
- `python3 builder/py/build.py validate`
|
||||
- `python3 builder/py/build.py run-local --profile demo`
|
||||
|
||||
This is not a modern desktop squeezed onto old hardware.
|
||||
It is a purpose-built retro system.
|
||||
|
||||
## Features
|
||||
|
||||
- Debian Etch userspace
|
||||
- Custom 2.6.24-based kernel
|
||||
- Live boot with SquashFS + UnionFS
|
||||
- Lightweight Fluxbox desktop
|
||||
- Fast startup and low overhead
|
||||
- Built as a base for 3dfx, Glide, UT99, and hardware test tools
|
||||
|
||||
## Current state
|
||||
|
||||
The system already boots and runs as a real live distro with the custom kernel.
|
||||
|
||||
The next steps are:
|
||||
- desktop polish
|
||||
- 3dfx integration
|
||||
- custom tools
|
||||
- Unreal Tournament 99
|
||||
- optional installer support
|
||||
|
||||
## Philosophy
|
||||
|
||||
RetroDebian Live is built around a simple idea:
|
||||
|
||||
**old hardware deserves software that stays out of its way.**
|
||||
|
||||
Small, responsive, understandable, and tuned for retro gaming.
|
||||
|
||||
Multiple ISO will be generated, including different GPU Drivers.
|
||||
|
||||
The current focus is on 3DFX Voodoo2 :)
|
||||
|
||||
## Technical note
|
||||
|
||||
The project is built with a custom kernel, `live-helper`, Docker, and Jenkins, with the kernel and ISO handled as separate build stages.
|
||||
The local runner uses fake legacy tools by default when `lh_config` / `lh_build`
|
||||
are not available. Set `RETRODEBIAN_FAKE_LEGACY_TOOLS=0` to force hard failures.
|
||||
|
||||
1
bases/retrodebian-common/chroot/README-common-base.txt
Normal file
1
bases/retrodebian-common/chroot/README-common-base.txt
Normal file
@@ -0,0 +1 @@
|
||||
Common base chroot payload.
|
||||
37
bases/retrodebian-common/entry.py
Normal file
37
bases/retrodebian-common/entry.py
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
THIS_FILE = Path(__file__).resolve()
|
||||
PROJECT_ROOT = THIS_FILE.parents[2]
|
||||
PY_ROOT = PROJECT_ROOT / 'builder' / 'py'
|
||||
if str(PY_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PY_ROOT))
|
||||
|
||||
from retrobuilder.context import BuildContext
|
||||
from retrobuilder.entrypoints import BaseEntry, cli_dispatch
|
||||
from retrobuilder.model import BaseSpec
|
||||
|
||||
SPEC = BaseSpec(
|
||||
name='retrodebian-common',
|
||||
description='Common inherited base resources shared by concrete bases.',
|
||||
packages=(),
|
||||
package_lists=(),
|
||||
docker_overrides={},
|
||||
)
|
||||
|
||||
|
||||
class Entry(BaseEntry):
|
||||
def pre_gen(self, ctx: BuildContext) -> None:
|
||||
ctx.current_module_artifact_dir.mkdir(parents=True, exist_ok=True)
|
||||
(ctx.current_module_artifact_dir / 'pre-gen.txt').write_text('common-base pre-gen\n', encoding='utf-8')
|
||||
|
||||
def post_gen(self, ctx: BuildContext) -> None:
|
||||
ctx.current_module_artifact_dir.mkdir(parents=True, exist_ok=True)
|
||||
(ctx.current_module_artifact_dir / 'post-gen.txt').write_text('common-base post-gen\n', encoding='utf-8')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(cli_dispatch(SPEC, Entry))
|
||||
2
bases/retrodebian-common/entry.sh
Normal file
2
bases/retrodebian-common/entry.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exit 0
|
||||
8
bases/retrodebian-common/generate.sh
Normal file
8
bases/retrodebian-common/generate.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
MODULE_NAME=$(basename "$SCRIPT_DIR")
|
||||
: "${CURRENT_MODULE_ARTIFACT_DIR:?CURRENT_MODULE_ARTIFACT_DIR is required}"
|
||||
mkdir -p "$CURRENT_MODULE_ARTIFACT_DIR/generated"
|
||||
#printf 'generated base %s\n' "$MODULE_NAME" > "$CURRENT_MODULE_ARTIFACT_DIR/generated/from-generate.txt"
|
||||
exit 0
|
||||
2
bases/retrodebian-common/hooks/05-common-base.sh
Normal file
2
bases/retrodebian-common/hooks/05-common-base.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo "common-base live hook"
|
||||
2
bases/retrodebian-common/packageslists/common-base.list
Normal file
2
bases/retrodebian-common/packageslists/common-base.list
Normal file
@@ -0,0 +1,2 @@
|
||||
# common-base package list
|
||||
nano
|
||||
1
bases/voodoo2/chroot/etc/retrodebian-base.conf
Normal file
1
bases/voodoo2/chroot/etc/retrodebian-base.conf
Normal file
@@ -0,0 +1 @@
|
||||
BASE=sample-base
|
||||
54
bases/voodoo2/entry.py
Normal file
54
bases/voodoo2/entry.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
THIS_FILE = Path(__file__).resolve()
|
||||
PROJECT_ROOT = THIS_FILE.parents[2]
|
||||
PY_ROOT = PROJECT_ROOT / 'builder' / 'py'
|
||||
if str(PY_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PY_ROOT))
|
||||
|
||||
from retrobuilder.context import BuildContext
|
||||
from retrobuilder.entrypoints import BaseEntry, cli_dispatch
|
||||
from retrobuilder.model import BaseSpec
|
||||
|
||||
SPEC = BaseSpec(
|
||||
name='sample-base',
|
||||
description='Sample base used to validate the V2 builder flow.',
|
||||
parent='common-base',
|
||||
packages=('sample-base-package',),
|
||||
package_lists=('sample-base.list',),
|
||||
docker_overrides={
|
||||
# Example: override the legacy pre/post-feature phase with a custom Lenny image.
|
||||
# 'pre-feature': {'image': 'retrodebian/custom-lenny:latest'},
|
||||
# 'post-feature': {'dockerfile': 'bases/sample-base/Dockerfile.lenny'},
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
class Entry(BaseEntry):
|
||||
def _marker(self, ctx: BuildContext, name: str) -> Path:
|
||||
ctx.current_module_artifact_dir.mkdir(parents=True, exist_ok=True)
|
||||
return ctx.current_module_artifact_dir / name
|
||||
|
||||
def pre_gen(self, ctx: BuildContext) -> None:
|
||||
self._marker(ctx, 'pre-gen.txt').write_text('sample-base pre-gen\n', encoding='utf-8')
|
||||
|
||||
def post_gen(self, ctx: BuildContext) -> None:
|
||||
self._marker(ctx, 'post-gen.txt').write_text('sample-base post-gen\n', encoding='utf-8')
|
||||
|
||||
def pre_feature(self, ctx: BuildContext) -> None:
|
||||
notes = ctx.live_dir / 'builder-notes'
|
||||
notes.mkdir(parents=True, exist_ok=True)
|
||||
(notes / 'base-pre-feature.txt').write_text('sample-base pre-feature\n', encoding='utf-8')
|
||||
|
||||
def post_feature(self, ctx: BuildContext) -> None:
|
||||
notes = ctx.live_dir / 'builder-notes'
|
||||
notes.mkdir(parents=True, exist_ok=True)
|
||||
(notes / 'base-post-feature.txt').write_text('sample-base post-feature\n', encoding='utf-8')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(cli_dispatch(SPEC, Entry))
|
||||
17
bases/voodoo2/entry.sh
Normal file
17
bases/voodoo2/entry.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
PHASE=${1:-}
|
||||
[ -n "$PHASE" ] || { echo "Usage: entry.sh <phase>" >&2; exit 2; }
|
||||
|
||||
case "$PHASE" in
|
||||
pre-feature|post-feature)
|
||||
mkdir -p "$LIVE_DIR/builder-notes"
|
||||
printf 'sample-base entry.sh %s
|
||||
' "$PHASE" > "$LIVE_DIR/builder-notes/base-entry-${PHASE}.txt"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported base phase: $PHASE" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
7
bases/voodoo2/generate.sh
Normal file
7
bases/voodoo2/generate.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
[ -n "${CURRENT_MODULE_ARTIFACT_DIR:-}" ] || { echo "CURRENT_MODULE_ARTIFACT_DIR is required" >&2; exit 2; }
|
||||
mkdir -p "$CURRENT_MODULE_ARTIFACT_DIR/generated"
|
||||
printf 'generated by sample-base
|
||||
' > "$CURRENT_MODULE_ARTIFACT_DIR/generated/base-artifact.txt"
|
||||
4
bases/voodoo2/hooks/10-sample-base.sh
Normal file
4
bases/voodoo2/hooks/10-sample-base.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
printf 'sample base chroot hook
|
||||
' > /tmp/sample-base-hook.txt
|
||||
1
bases/voodoo2/packages/sample-base_1.0_all.deb
Normal file
1
bases/voodoo2/packages/sample-base_1.0_all.deb
Normal file
@@ -0,0 +1 @@
|
||||
placeholder deb artifact for sample base
|
||||
1
bases/voodoo2/packageslists/sample-base.list
Normal file
1
bases/voodoo2/packageslists/sample-base.list
Normal file
@@ -0,0 +1 @@
|
||||
nano
|
||||
34
builder/bash/common.sh
Normal file
34
builder/bash/common.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
fail() {
|
||||
echo "ERROR: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
require_file() {
|
||||
[ -f "$1" ] || fail "Missing file: $1"
|
||||
}
|
||||
|
||||
require_dir() {
|
||||
[ -d "$1" ] || fail "Missing directory: $1"
|
||||
}
|
||||
|
||||
load_env_file() {
|
||||
ENV_FILE="$1"
|
||||
require_file "$ENV_FILE"
|
||||
set -a
|
||||
. "$ENV_FILE"
|
||||
set +a
|
||||
}
|
||||
|
||||
maybe_fake_legacy() {
|
||||
TOOL_NAME="$1"
|
||||
if command -v "$TOOL_NAME" >/dev/null 2>&1; then
|
||||
return 1
|
||||
fi
|
||||
if [ "${RETRODEBIAN_FAKE_LEGACY_TOOLS:-1}" = "1" ]; then
|
||||
echo "[fake-legacy] $TOOL_NAME not found, emulating." >&2
|
||||
return 0
|
||||
fi
|
||||
fail "$TOOL_NAME not found and RETRODEBIAN_FAKE_LEGACY_TOOLS != 1"
|
||||
}
|
||||
18
builder/bash/run_entry.sh
Normal file
18
builder/bash/run_entry.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
. "$SELF_DIR/common.sh"
|
||||
|
||||
MODULE_DIR=${1:-}
|
||||
ENV_FILE=${2:-}
|
||||
PHASE=${3:-}
|
||||
[ -n "$MODULE_DIR" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
||||
[ -n "$ENV_FILE" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
||||
[ -n "$PHASE" ] || fail "Usage: run_entry.sh <module-dir> <env-file> <phase>"
|
||||
|
||||
require_dir "$MODULE_DIR"
|
||||
load_env_file "$ENV_FILE"
|
||||
require_file "$MODULE_DIR/entry.sh"
|
||||
|
||||
exec /bin/sh "$MODULE_DIR/entry.sh" "$PHASE"
|
||||
16
builder/bash/run_generate.sh
Normal file
16
builder/bash/run_generate.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
. "$SELF_DIR/common.sh"
|
||||
|
||||
MODULE_DIR=${1:-}
|
||||
ENV_FILE=${2:-}
|
||||
[ -n "$MODULE_DIR" ] || fail "Usage: run_generate.sh <module-dir> <env-file>"
|
||||
[ -n "$ENV_FILE" ] || fail "Usage: run_generate.sh <module-dir> <env-file>"
|
||||
|
||||
require_dir "$MODULE_DIR"
|
||||
load_env_file "$ENV_FILE"
|
||||
require_file "$MODULE_DIR/generate.sh"
|
||||
|
||||
exec /bin/sh "$MODULE_DIR/generate.sh"
|
||||
22
builder/bash/run_profile_build.sh
Normal file
22
builder/bash/run_profile_build.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
. "$SELF_DIR/common.sh"
|
||||
|
||||
ENV_FILE=${1:-}
|
||||
[ -n "$ENV_FILE" ] || fail "Usage: run_profile_build.sh <env-file>"
|
||||
load_env_file "$ENV_FILE"
|
||||
|
||||
[ -n "${LIVE_DIR:-}" ] || fail "LIVE_DIR is required"
|
||||
[ -n "${PROFILE_ARTIFACT_DIR:-}" ] || fail "PROFILE_ARTIFACT_DIR is required"
|
||||
mkdir -p "$PROFILE_ARTIFACT_DIR/final"
|
||||
|
||||
if maybe_fake_legacy lh_build; then
|
||||
OUTPUT_FILE="$PROFILE_ARTIFACT_DIR/final/${PROFILE_NAME:-profile}.iso"
|
||||
printf 'fake iso for %s
|
||||
' "${PROFILE_NAME:-unknown}" > "$OUTPUT_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec lh_build "$LIVE_DIR"
|
||||
21
builder/bash/run_profile_config.sh
Normal file
21
builder/bash/run_profile_config.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SELF_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
. "$SELF_DIR/common.sh"
|
||||
|
||||
ENV_FILE=${1:-}
|
||||
[ -n "$ENV_FILE" ] || fail "Usage: run_profile_config.sh <env-file>"
|
||||
load_env_file "$ENV_FILE"
|
||||
|
||||
[ -n "${LIVE_DIR:-}" ] || fail "LIVE_DIR is required"
|
||||
mkdir -p "$LIVE_DIR"
|
||||
|
||||
if maybe_fake_legacy lh_config; then
|
||||
mkdir -p "$LIVE_DIR/.fake-live-helper"
|
||||
printf 'fake lh_config for %s
|
||||
' "${PROFILE_NAME:-unknown}" > "$LIVE_DIR/.fake-live-helper/lh_config.txt"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec lh_config "$LIVE_DIR"
|
||||
388
builder/py/build.py
Normal file
388
builder/py/build.py
Normal file
@@ -0,0 +1,388 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
THIS_DIR = Path(__file__).resolve().parent
|
||||
PACKAGE_ROOT = THIS_DIR / 'retrobuilder'
|
||||
if str(THIS_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(THIS_DIR))
|
||||
|
||||
from retrobuilder.context import BuildContext
|
||||
from retrobuilder.envfile import write_env_file
|
||||
from retrobuilder.loader import (
|
||||
load_base_chain,
|
||||
load_base_entry,
|
||||
load_base_spec,
|
||||
load_feature_entry,
|
||||
load_feature_spec,
|
||||
load_profile,
|
||||
)
|
||||
from retrobuilder.model import DockerStageSpec
|
||||
from retrobuilder.operations import (
|
||||
apply_profile_common_configuration,
|
||||
clear_directory_contents,
|
||||
ensure_live_structure,
|
||||
inject_module_resources,
|
||||
profile_finalize,
|
||||
profile_pre_build,
|
||||
save_feature_metadata,
|
||||
save_profile_metadata,
|
||||
)
|
||||
from retrobuilder.paths import (
|
||||
base_artifacts_dir,
|
||||
base_dir,
|
||||
feature_artifacts_dir,
|
||||
feature_dir,
|
||||
profile_artifacts_dir,
|
||||
project_root_from,
|
||||
)
|
||||
|
||||
|
||||
def root_dir() -> Path:
|
||||
return project_root_from(Path.cwd())
|
||||
|
||||
|
||||
def list_names(path: Path) -> list[str]:
|
||||
if not path.exists():
|
||||
return []
|
||||
return sorted(child.name for child in path.iterdir() if child.is_dir())
|
||||
|
||||
|
||||
def list_profiles(path: Path) -> list[str]:
|
||||
if not path.exists():
|
||||
return []
|
||||
return sorted(p.stem for p in path.glob('*.py') if p.is_file())
|
||||
|
||||
|
||||
def build_context(root: Path, phase: str, kind: str, profile_name: str = '', base_name: str = '', feature_name: str = '') -> BuildContext:
|
||||
live_dir = root / 'live'
|
||||
artifacts_root = root / 'artifacts'
|
||||
profile = load_profile(root, profile_name) if profile_name else None
|
||||
base = load_base_spec(root, base_name or (profile.base if profile else '')) if (base_name or profile) else None
|
||||
feature = load_feature_spec(root, feature_name) if feature_name else None
|
||||
|
||||
current_name = {
|
||||
'profile': profile_name,
|
||||
'base': base.name if base else '',
|
||||
'feature': feature.name if feature else '',
|
||||
}[kind]
|
||||
current_dir = {
|
||||
'profile': root / 'profiles' / f'{profile_name}.py',
|
||||
'base': base_dir(root, base.name if base else base_name),
|
||||
'feature': feature_dir(root, feature.name if feature else feature_name),
|
||||
}[kind]
|
||||
current_artifact_dir = {
|
||||
'profile': profile_artifacts_dir(root, profile_name),
|
||||
'base': base_artifacts_dir(root, base.name if base else base_name),
|
||||
'feature': feature_artifacts_dir(root, feature.name if feature else feature_name),
|
||||
}[kind]
|
||||
|
||||
return BuildContext(
|
||||
project_root=root,
|
||||
live_dir=live_dir,
|
||||
artifacts_root=artifacts_root,
|
||||
phase=phase,
|
||||
current_kind=kind,
|
||||
current_name=current_name,
|
||||
current_module_dir=current_dir,
|
||||
current_module_artifact_dir=current_artifact_dir,
|
||||
profile_name=profile.name if profile else profile_name,
|
||||
profile_artifact_dir=profile_artifacts_dir(root, profile.name) if profile else None,
|
||||
base_name=base.name if base else '',
|
||||
base_dir=base_dir(root, base.name) if base else None,
|
||||
base_artifact_dir=base_artifacts_dir(root, base.name) if base else None,
|
||||
feature_name=feature.name if feature else '',
|
||||
feature_dir=feature_dir(root, feature.name) if feature else None,
|
||||
feature_artifact_dir=feature_artifacts_dir(root, feature.name) if feature else None,
|
||||
profile_features=tuple(profile.features) if profile else (),
|
||||
)
|
||||
|
||||
|
||||
def run_python_phase(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
ctx = build_context(root, args.phase, args.kind, args.profile or '', args.base or '', args.feature or '')
|
||||
if args.kind == 'base':
|
||||
entry_cls = load_base_entry(root, ctx.base_name)
|
||||
elif args.kind == 'feature':
|
||||
entry_cls = load_feature_entry(root, ctx.feature_name)
|
||||
else:
|
||||
raise ValueError(f'Unsupported kind {args.kind}')
|
||||
entry = entry_cls()
|
||||
method = getattr(entry, args.phase.replace('-', '_'))
|
||||
method(ctx)
|
||||
return 0
|
||||
|
||||
|
||||
def export_env(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
kind = args.kind
|
||||
ctx = build_context(root, args.phase, kind, args.profile or '', args.base or '', args.feature or '')
|
||||
values = ctx.to_env()
|
||||
values['RETRODEBIAN_FAKE_LEGACY_TOOLS'] = os.environ.get('RETRODEBIAN_FAKE_LEGACY_TOOLS', '1')
|
||||
write_env_file(Path(args.output), values)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_validate(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
for profile_name in list_profiles(root / 'profiles'):
|
||||
profile = load_profile(root, profile_name)
|
||||
load_base_spec(root, profile.base)
|
||||
for feature_name in profile.features:
|
||||
load_feature_spec(root, feature_name)
|
||||
print('Validation OK')
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_list(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
if args.what == 'features':
|
||||
values = list_names(root / 'features')
|
||||
elif args.what == 'bases':
|
||||
values = list_names(root / 'bases')
|
||||
else:
|
||||
values = list_profiles(root / 'profiles')
|
||||
for value in values:
|
||||
print(value)
|
||||
return 0
|
||||
|
||||
|
||||
def _load_module_spec(root: Path, kind: str, name: str):
|
||||
if kind == 'base':
|
||||
return load_base_spec(root, name)
|
||||
if kind == 'feature':
|
||||
return load_feature_spec(root, name)
|
||||
raise ValueError(kind)
|
||||
|
||||
|
||||
def _docker_override_field(spec, phase: str, field: str) -> str:
|
||||
stage = spec.docker_overrides.get(phase)
|
||||
if stage is None:
|
||||
return ''
|
||||
value = getattr(stage, field)
|
||||
return value or ''
|
||||
|
||||
|
||||
def cmd_module_docker(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
spec = _load_module_spec(root, args.kind, args.name)
|
||||
print(_docker_override_field(spec, args.phase, args.field))
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_profile_info(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile = load_profile(root, args.profile)
|
||||
if args.field == 'base':
|
||||
print(profile.base)
|
||||
elif args.field == 'base-chain':
|
||||
for base_spec in load_base_chain(root, profile.base):
|
||||
print(base_spec.name)
|
||||
elif args.field == 'features':
|
||||
for feature in profile.features:
|
||||
print(feature)
|
||||
else:
|
||||
raise ValueError(args.field)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_prepare_profile(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile = load_profile(root, args.profile)
|
||||
base = load_base_spec(root, profile.base)
|
||||
base_chain = load_base_chain(root, profile.base)
|
||||
live_dir = root / 'live'
|
||||
clear_directory_contents(live_dir)
|
||||
ensure_live_structure(live_dir)
|
||||
save_profile_metadata(profile_artifacts_dir(root, profile.name) / 'profile.json', profile, base, base_chain)
|
||||
apply_profile_common_configuration(root, live_dir, profile)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_save_feature_metadata(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
feature = load_feature_spec(root, args.feature)
|
||||
target = profile_artifacts_dir(root, args.profile) / 'features' / f'{feature.name}.json'
|
||||
save_feature_metadata(target, feature)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_inject_resources(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
live_dir = root / 'live'
|
||||
ensure_live_structure(live_dir)
|
||||
if args.kind == 'base':
|
||||
for base_spec in load_base_chain(root, args.name):
|
||||
inject_module_resources(base_dir(root, base_spec.name), live_dir, base_spec.name)
|
||||
else:
|
||||
inject_module_resources(feature_dir(root, args.name), live_dir, args.name)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_profile_common(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile = load_profile(root, args.profile)
|
||||
apply_profile_common_configuration(root, root / 'live', profile)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_profile_pre_build(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile_pre_build(root / 'live', args.profile)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_profile_finalize(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile_finalize(root, args.profile)
|
||||
return 0
|
||||
|
||||
|
||||
def _run(cmd: list[str], env: dict[str, str] | None = None) -> None:
|
||||
subprocess.run(cmd, check=True, env=env)
|
||||
|
||||
|
||||
def _env_and_path(root: Path, kind: str, phase: str, profile: str, base: str = '', feature: str = '') -> tuple[dict[str, str], Path]:
|
||||
ctx = build_context(root, phase, kind, profile, base, feature)
|
||||
values = os.environ.copy()
|
||||
values.update(ctx.to_env())
|
||||
values['RETRODEBIAN_FAKE_LEGACY_TOOLS'] = values.get('RETRODEBIAN_FAKE_LEGACY_TOOLS', '1')
|
||||
env_path = profile_artifacts_dir(root, profile) / 'runtime' / f'{kind}-{ctx.current_name}-{phase}.env'
|
||||
write_env_file(env_path, {k: str(v) for k, v in values.items() if k in ctx.to_env() or k == 'RETRODEBIAN_FAKE_LEGACY_TOOLS'})
|
||||
return values, env_path
|
||||
|
||||
|
||||
def cmd_run_local(args: argparse.Namespace) -> int:
|
||||
root = root_dir()
|
||||
profile = load_profile(root, args.profile)
|
||||
|
||||
for feature_name in list_names(root / 'features'):
|
||||
env, env_path = _env_and_path(root, 'feature', 'pre-gen', args.profile, feature=feature_name)
|
||||
_run([sys.executable, str(feature_dir(root, feature_name) / 'entry.py'), 'pre-gen'], env=env)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_generate.sh'), str(feature_dir(root, feature_name)), str(env_path)])
|
||||
env, _ = _env_and_path(root, 'feature', 'post-gen', args.profile, feature=feature_name)
|
||||
_run([sys.executable, str(feature_dir(root, feature_name) / 'entry.py'), 'post-gen'], env=env)
|
||||
|
||||
env, env_path = _env_and_path(root, 'base', 'pre-gen', args.profile, base=profile.base)
|
||||
_run([sys.executable, str(base_dir(root, profile.base) / 'entry.py'), 'pre-gen'], env=env)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_generate.sh'), str(base_dir(root, profile.base)), str(env_path)])
|
||||
env, _ = _env_and_path(root, 'base', 'post-gen', args.profile, base=profile.base)
|
||||
_run([sys.executable, str(base_dir(root, profile.base) / 'entry.py'), 'post-gen'], env=env)
|
||||
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'prepare-profile', '--profile', args.profile])
|
||||
env, env_path = _env_and_path(root, 'profile', 'config', args.profile)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_profile_config.sh'), str(env_path)])
|
||||
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'inject-resources', '--kind', 'base', '--name', profile.base])
|
||||
env, env_path = _env_and_path(root, 'base', 'pre-feature', args.profile, base=profile.base)
|
||||
_run([sys.executable, str(base_dir(root, profile.base) / 'entry.py'), 'pre-feature'], env=env)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_entry.sh'), str(base_dir(root, profile.base)), str(env_path), 'pre-feature'])
|
||||
|
||||
for feature_name in profile.features:
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'save-feature-metadata', '--profile', args.profile, '--feature', feature_name])
|
||||
env, env_path = _env_and_path(root, 'feature', 'pre-inj', args.profile, feature=feature_name)
|
||||
_run([sys.executable, str(feature_dir(root, feature_name) / 'entry.py'), 'pre-inj'], env=env)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_entry.sh'), str(feature_dir(root, feature_name)), str(env_path), 'pre-inj'])
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'inject-resources', '--kind', 'feature', '--name', feature_name])
|
||||
env, env_path = _env_and_path(root, 'feature', 'post-inj', args.profile, feature=feature_name)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_entry.sh'), str(feature_dir(root, feature_name)), str(env_path), 'post-inj'])
|
||||
_run([sys.executable, str(feature_dir(root, feature_name) / 'entry.py'), 'post-inj'], env=env)
|
||||
|
||||
env, env_path = _env_and_path(root, 'base', 'post-feature', args.profile, base=profile.base)
|
||||
_run([sys.executable, str(base_dir(root, profile.base) / 'entry.py'), 'post-feature'], env=env)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_entry.sh'), str(base_dir(root, profile.base)), str(env_path), 'post-feature'])
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'profile-pre-build', '--profile', args.profile])
|
||||
|
||||
env, env_path = _env_and_path(root, 'profile', 'build', args.profile)
|
||||
_run([str(root / 'builder' / 'bash' / 'run_profile_build.sh'), str(env_path)])
|
||||
_run([sys.executable, str(root / 'builder' / 'py' / 'build.py'), 'profile-finalize', '--profile', args.profile])
|
||||
print(f'Local pipeline completed for profile {args.profile}')
|
||||
return 0
|
||||
|
||||
|
||||
def build_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(description='RetroDebian builder helper')
|
||||
sub = parser.add_subparsers(dest='command', required=True)
|
||||
|
||||
p = sub.add_parser('validate')
|
||||
p.set_defaults(func=cmd_validate)
|
||||
|
||||
p = sub.add_parser('list')
|
||||
p.add_argument('what', choices=['features', 'bases', 'profiles'])
|
||||
p.set_defaults(func=cmd_list)
|
||||
|
||||
p = sub.add_parser('profile-info')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.add_argument('field', choices=['base', 'base-chain', 'features'])
|
||||
p.set_defaults(func=cmd_profile_info)
|
||||
|
||||
p = sub.add_parser('module-docker')
|
||||
p.add_argument('--kind', choices=['base', 'feature'], required=True)
|
||||
p.add_argument('--name', required=True)
|
||||
p.add_argument('--phase', required=True)
|
||||
p.add_argument('field', choices=['image', 'dockerfile', 'docker_context'])
|
||||
p.set_defaults(func=cmd_module_docker)
|
||||
|
||||
p = sub.add_parser('run-python-phase')
|
||||
p.add_argument('--kind', choices=['base', 'feature'], required=True)
|
||||
p.add_argument('--phase', required=True)
|
||||
p.add_argument('--profile')
|
||||
p.add_argument('--base')
|
||||
p.add_argument('--feature')
|
||||
p.set_defaults(func=run_python_phase)
|
||||
|
||||
p = sub.add_parser('export-env')
|
||||
p.add_argument('--kind', choices=['profile', 'base', 'feature'], required=True)
|
||||
p.add_argument('--phase', required=True)
|
||||
p.add_argument('--profile', default='')
|
||||
p.add_argument('--base', default='')
|
||||
p.add_argument('--feature', default='')
|
||||
p.add_argument('--output', required=True)
|
||||
p.set_defaults(func=export_env)
|
||||
|
||||
p = sub.add_parser('prepare-profile')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.set_defaults(func=cmd_prepare_profile)
|
||||
|
||||
p = sub.add_parser('save-feature-metadata')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.add_argument('--feature', required=True)
|
||||
p.set_defaults(func=cmd_save_feature_metadata)
|
||||
|
||||
p = sub.add_parser('inject-resources')
|
||||
p.add_argument('--kind', choices=['base', 'feature'], required=True)
|
||||
p.add_argument('--name', required=True)
|
||||
p.set_defaults(func=cmd_inject_resources)
|
||||
|
||||
p = sub.add_parser('profile-common')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.set_defaults(func=cmd_profile_common)
|
||||
|
||||
p = sub.add_parser('profile-pre-build')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.set_defaults(func=cmd_profile_pre_build)
|
||||
|
||||
p = sub.add_parser('profile-finalize')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.set_defaults(func=cmd_profile_finalize)
|
||||
|
||||
p = sub.add_parser('run-local')
|
||||
p.add_argument('--profile', required=True)
|
||||
p.set_defaults(func=cmd_run_local)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = build_parser()
|
||||
args = parser.parse_args()
|
||||
return args.func(args)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(main())
|
||||
9
builder/py/retrobuilder/__init__.py
Normal file
9
builder/py/retrobuilder/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
__all__ = [
|
||||
'context',
|
||||
'entrypoints',
|
||||
'envfile',
|
||||
'loader',
|
||||
'model',
|
||||
'operations',
|
||||
'paths',
|
||||
]
|
||||
80
builder/py/retrobuilder/context.py
Normal file
80
builder/py/retrobuilder/context.py
Normal file
@@ -0,0 +1,80 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Mapping
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BuildContext:
|
||||
project_root: Path
|
||||
live_dir: Path
|
||||
artifacts_root: Path
|
||||
phase: str
|
||||
current_kind: str
|
||||
current_name: str
|
||||
current_module_dir: Path
|
||||
current_module_artifact_dir: Path
|
||||
profile_name: str = ''
|
||||
profile_artifact_dir: Path | None = None
|
||||
base_name: str = ''
|
||||
base_dir: Path | None = None
|
||||
base_artifact_dir: Path | None = None
|
||||
feature_name: str = ''
|
||||
feature_dir: Path | None = None
|
||||
feature_artifact_dir: Path | None = None
|
||||
profile_features: tuple[str, ...] = ()
|
||||
|
||||
def to_env(self) -> dict[str, str]:
|
||||
env = {
|
||||
'PROJECT_ROOT': str(self.project_root),
|
||||
'LIVE_DIR': str(self.live_dir),
|
||||
'ARTIFACTS_ROOT': str(self.artifacts_root),
|
||||
'PHASE': self.phase,
|
||||
'CURRENT_KIND': self.current_kind,
|
||||
'CURRENT_NAME': self.current_name,
|
||||
'CURRENT_MODULE_DIR': str(self.current_module_dir),
|
||||
'CURRENT_MODULE_ARTIFACT_DIR': str(self.current_module_artifact_dir),
|
||||
'PROFILE_NAME': self.profile_name,
|
||||
'BASE_NAME': self.base_name,
|
||||
'FEATURE_NAME': self.feature_name,
|
||||
'PROFILE_FEATURES': '|'.join(self.profile_features),
|
||||
}
|
||||
if self.profile_artifact_dir is not None:
|
||||
env['PROFILE_ARTIFACT_DIR'] = str(self.profile_artifact_dir)
|
||||
if self.base_dir is not None:
|
||||
env['BASE_DIR'] = str(self.base_dir)
|
||||
if self.base_artifact_dir is not None:
|
||||
env['BASE_ARTIFACT_DIR'] = str(self.base_artifact_dir)
|
||||
if self.feature_dir is not None:
|
||||
env['FEATURE_DIR'] = str(self.feature_dir)
|
||||
if self.feature_artifact_dir is not None:
|
||||
env['FEATURE_ARTIFACT_DIR'] = str(self.feature_artifact_dir)
|
||||
return env
|
||||
|
||||
@classmethod
|
||||
def from_env(cls, env: Mapping[str, str]) -> 'BuildContext':
|
||||
def p(name: str) -> Path | None:
|
||||
value = env.get(name, '')
|
||||
return Path(value) if value else None
|
||||
|
||||
features = tuple(filter(None, env.get('PROFILE_FEATURES', '').split('|')))
|
||||
return cls(
|
||||
project_root=Path(env['PROJECT_ROOT']),
|
||||
live_dir=Path(env['LIVE_DIR']),
|
||||
artifacts_root=Path(env['ARTIFACTS_ROOT']),
|
||||
phase=env['PHASE'],
|
||||
current_kind=env['CURRENT_KIND'],
|
||||
current_name=env['CURRENT_NAME'],
|
||||
current_module_dir=Path(env['CURRENT_MODULE_DIR']),
|
||||
current_module_artifact_dir=Path(env['CURRENT_MODULE_ARTIFACT_DIR']),
|
||||
profile_name=env.get('PROFILE_NAME', ''),
|
||||
profile_artifact_dir=p('PROFILE_ARTIFACT_DIR'),
|
||||
base_name=env.get('BASE_NAME', ''),
|
||||
base_dir=p('BASE_DIR'),
|
||||
base_artifact_dir=p('BASE_ARTIFACT_DIR'),
|
||||
feature_name=env.get('FEATURE_NAME', ''),
|
||||
feature_dir=p('FEATURE_DIR'),
|
||||
feature_artifact_dir=p('FEATURE_ARTIFACT_DIR'),
|
||||
profile_features=features,
|
||||
)
|
||||
57
builder/py/retrobuilder/entrypoints.py
Normal file
57
builder/py/retrobuilder/entrypoints.py
Normal file
@@ -0,0 +1,57 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from abc import ABC
|
||||
from pathlib import Path
|
||||
|
||||
from retrobuilder.context import BuildContext
|
||||
|
||||
|
||||
class BaseEntry(ABC):
|
||||
def pre_gen(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def post_gen(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def pre_feature(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def post_feature(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
|
||||
class FeatureEntry(ABC):
|
||||
def pre_gen(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def post_gen(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def pre_inj(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
def post_inj(self, ctx: BuildContext) -> None:
|
||||
return None
|
||||
|
||||
|
||||
def cli_dispatch(spec, entry_cls) -> int:
|
||||
if len(sys.argv) < 2:
|
||||
print('Usage: entry.py <spec|phase>', file=sys.stderr)
|
||||
return 2
|
||||
|
||||
command = sys.argv[1]
|
||||
if command == 'spec':
|
||||
print(json.dumps(spec.to_dict(), indent=2, sort_keys=True))
|
||||
return 0
|
||||
|
||||
ctx = BuildContext.from_env(dict(__import__('os').environ))
|
||||
entry = entry_cls()
|
||||
method_name = command.replace('-', '_')
|
||||
method = getattr(entry, method_name, None)
|
||||
if method is None:
|
||||
print(f'Unsupported phase: {command}', file=sys.stderr)
|
||||
return 2
|
||||
method(ctx)
|
||||
return 0
|
||||
16
builder/py/retrobuilder/envfile.py
Normal file
16
builder/py/retrobuilder/envfile.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Mapping
|
||||
|
||||
|
||||
def _escape(value: str) -> str:
|
||||
value = value.replace('\\', '\\\\').replace('"', '\\"')
|
||||
return f'"{value}"'
|
||||
|
||||
|
||||
def write_env_file(path: Path, values: Mapping[str, str]) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with path.open('w', encoding='utf-8') as handle:
|
||||
for key in sorted(values):
|
||||
handle.write(f'{key}={_escape(str(values[key]))}\n')
|
||||
81
builder/py/retrobuilder/loader.py
Normal file
81
builder/py/retrobuilder/loader.py
Normal file
@@ -0,0 +1,81 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.util
|
||||
from pathlib import Path
|
||||
from types import ModuleType
|
||||
|
||||
from retrobuilder.model import BaseSpec, FeatureSpec, ProfileSpec
|
||||
from retrobuilder.paths import base_dir, feature_dir, profile_file
|
||||
|
||||
|
||||
def _load_module(path: Path, name: str) -> ModuleType:
|
||||
spec = importlib.util.spec_from_file_location(name, path)
|
||||
if spec is None or spec.loader is None:
|
||||
raise RuntimeError(f'Cannot load module from {path}')
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
return module
|
||||
|
||||
|
||||
def load_profile(root: Path, name: str) -> ProfileSpec:
|
||||
path = profile_file(root, name)
|
||||
module = _load_module(path, f'profile_{name}')
|
||||
profile = getattr(module, 'PROFILE', None)
|
||||
if not isinstance(profile, ProfileSpec):
|
||||
raise TypeError(f'{path} must define PROFILE as ProfileSpec')
|
||||
return profile
|
||||
|
||||
|
||||
def load_base_module(root: Path, name: str) -> ModuleType:
|
||||
return _load_module(base_dir(root, name) / 'entry.py', f'base_{name}')
|
||||
|
||||
|
||||
def load_feature_module(root: Path, name: str) -> ModuleType:
|
||||
return _load_module(feature_dir(root, name) / 'entry.py', f'feature_{name}')
|
||||
|
||||
|
||||
def load_base_spec(root: Path, name: str) -> BaseSpec:
|
||||
module = load_base_module(root, name)
|
||||
spec = getattr(module, 'SPEC', None)
|
||||
if not isinstance(spec, BaseSpec):
|
||||
raise TypeError(f'bases/{name}/entry.py must define SPEC as BaseSpec')
|
||||
return spec
|
||||
|
||||
|
||||
def load_base_chain(root: Path, name: str) -> list[BaseSpec]:
|
||||
chain: list[BaseSpec] = []
|
||||
seen: set[str] = set()
|
||||
current = name
|
||||
while current:
|
||||
if current in seen:
|
||||
raise RuntimeError(f'Base inheritance loop detected at {current}')
|
||||
seen.add(current)
|
||||
spec = load_base_spec(root, current)
|
||||
chain.append(spec)
|
||||
current = spec.parent or ''
|
||||
chain.reverse()
|
||||
return chain
|
||||
|
||||
|
||||
def load_feature_spec(root: Path, name: str) -> FeatureSpec:
|
||||
module = load_feature_module(root, name)
|
||||
spec = getattr(module, 'SPEC', None)
|
||||
if not isinstance(spec, FeatureSpec):
|
||||
raise TypeError(f'features/{name}/entry.py must define SPEC as FeatureSpec')
|
||||
return spec
|
||||
|
||||
|
||||
def load_base_entry(root: Path, name: str):
|
||||
module = load_base_module(root, name)
|
||||
entry_cls = getattr(module, 'Entry', None)
|
||||
if entry_cls is None:
|
||||
raise TypeError(f'bases/{name}/entry.py must define Entry')
|
||||
return entry_cls
|
||||
|
||||
|
||||
def load_feature_entry(root: Path, name: str):
|
||||
module = load_feature_module(root, name)
|
||||
entry_cls = getattr(module, 'Entry', None)
|
||||
if entry_cls is None:
|
||||
raise TypeError(f'features/{name}/entry.py must define Entry')
|
||||
return entry_cls
|
||||
100
builder/py/retrobuilder/model.py
Normal file
100
builder/py/retrobuilder/model.py
Normal file
@@ -0,0 +1,100 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field, asdict
|
||||
from typing import Any
|
||||
|
||||
|
||||
def _tuple(values: Any) -> tuple[str, ...]:
|
||||
if values is None:
|
||||
return ()
|
||||
if isinstance(values, tuple):
|
||||
return values
|
||||
if isinstance(values, list):
|
||||
return tuple(str(v) for v in values)
|
||||
raise TypeError(f'Expected list/tuple/None, got {type(values)!r}')
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class DockerStageSpec:
|
||||
image: str | None = None
|
||||
dockerfile: str | None = None
|
||||
docker_context: str | None = None
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
if self.image is not None and not isinstance(self.image, str):
|
||||
raise TypeError('DockerStageSpec.image must be str or None')
|
||||
if self.dockerfile is not None and not isinstance(self.dockerfile, str):
|
||||
raise TypeError('DockerStageSpec.dockerfile must be str or None')
|
||||
if self.docker_context is not None and not isinstance(self.docker_context, str):
|
||||
raise TypeError('DockerStageSpec.docker_context must be str or None')
|
||||
|
||||
@classmethod
|
||||
def from_value(cls, value: Any) -> 'DockerStageSpec':
|
||||
if isinstance(value, DockerStageSpec):
|
||||
return value
|
||||
if isinstance(value, dict):
|
||||
return cls(
|
||||
image=value.get('image'),
|
||||
dockerfile=value.get('dockerfile'),
|
||||
docker_context=value.get('docker_context'),
|
||||
)
|
||||
raise TypeError(f'Expected DockerStageSpec or dict, got {type(value)!r}')
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
return asdict(self)
|
||||
|
||||
|
||||
def _docker_overrides(values: Any) -> dict[str, DockerStageSpec]:
|
||||
if values is None:
|
||||
return {}
|
||||
if not isinstance(values, dict):
|
||||
raise TypeError(f'Expected dict/None for docker_overrides, got {type(values)!r}')
|
||||
result: dict[str, DockerStageSpec] = {}
|
||||
for phase, item in values.items():
|
||||
if not isinstance(phase, str):
|
||||
raise TypeError('docker_overrides keys must be strings')
|
||||
result[phase] = DockerStageSpec.from_value(item)
|
||||
return result
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ModuleSpec:
|
||||
title: str = ''
|
||||
description: str = ''
|
||||
docker_overrides: dict[str, DockerStageSpec] = field(default_factory=dict)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
object.__setattr__(self, 'packages', _tuple(self.packages))
|
||||
object.__setattr__(self, 'package_lists', _tuple(self.package_lists))
|
||||
object.__setattr__(self, 'docker_overrides', _docker_overrides(self.docker_overrides))
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
payload = asdict(self)
|
||||
payload['docker_overrides'] = {name: spec.to_dict() for name, spec in self.docker_overrides.items()}
|
||||
return payload
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BaseSpec(ModuleSpec):
|
||||
parent: str | None = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class FeatureSpec(ModuleSpec):
|
||||
pass
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ProfileSpec:
|
||||
title: str = ''
|
||||
base: str
|
||||
features: tuple[str, ...] = field(default_factory=tuple)
|
||||
edition: str = ''
|
||||
description: str = ''
|
||||
splash: str | None = None
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
object.__setattr__(self, 'features', _tuple(self.features))
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
return asdict(self)
|
||||
115
builder/py/retrobuilder/operations.py
Normal file
115
builder/py/retrobuilder/operations.py
Normal file
@@ -0,0 +1,115 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
from retrobuilder.model import BaseSpec, FeatureSpec, ProfileSpec
|
||||
|
||||
|
||||
LIVE_DIR_STRUCTURE = (
|
||||
'config/chroot_local-packageslists',
|
||||
'config/chroot_local-packages',
|
||||
'config/chroot_local-includes',
|
||||
'config/chroot_local-hooks',
|
||||
)
|
||||
|
||||
|
||||
def ensure_live_structure(live_dir: Path) -> None:
|
||||
for relative in LIVE_DIR_STRUCTURE:
|
||||
(live_dir / relative).mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
def clear_directory_contents(path: Path) -> None:
|
||||
path.mkdir(parents=True, exist_ok=True)
|
||||
for child in path.iterdir():
|
||||
if child.name == '.gitkeep':
|
||||
continue
|
||||
if child.is_dir() and not child.is_symlink():
|
||||
shutil.rmtree(child)
|
||||
else:
|
||||
child.unlink()
|
||||
|
||||
|
||||
def copy_tree_contents(src: Path, dst: Path) -> None:
|
||||
if not src.exists():
|
||||
return
|
||||
dst.mkdir(parents=True, exist_ok=True)
|
||||
for child in src.iterdir():
|
||||
target = dst / child.name
|
||||
if child.is_dir():
|
||||
shutil.copytree(child, target, dirs_exist_ok=True)
|
||||
else:
|
||||
shutil.copy2(child, target)
|
||||
|
||||
|
||||
def copy_glob(src_dir: Path, pattern: str, dst_dir: Path, prefix: str = '') -> None:
|
||||
if not src_dir.exists():
|
||||
return
|
||||
dst_dir.mkdir(parents=True, exist_ok=True)
|
||||
for src in sorted(src_dir.glob(pattern)):
|
||||
if src.is_dir():
|
||||
continue
|
||||
name = f'{prefix}{src.name}' if prefix else src.name
|
||||
shutil.copy2(src, dst_dir / name)
|
||||
|
||||
|
||||
def save_json(path: Path, payload: dict) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
path.write_text(json.dumps(payload, indent=2, sort_keys=True) + '\n', encoding='utf-8')
|
||||
|
||||
|
||||
def save_profile_metadata(path: Path, profile: ProfileSpec, base: BaseSpec, base_chain: list[BaseSpec] | None = None) -> None:
|
||||
save_json(path, {
|
||||
'profile': profile.to_dict(),
|
||||
'base': base.to_dict(),
|
||||
'base_chain': [item.to_dict() for item in (base_chain or [base])],
|
||||
})
|
||||
|
||||
|
||||
def save_feature_metadata(path: Path, feature: FeatureSpec) -> None:
|
||||
save_json(path, feature.to_dict())
|
||||
|
||||
|
||||
def apply_profile_common_configuration(root: Path, live_dir: Path, profile: ProfileSpec) -> None:
|
||||
ensure_live_structure(live_dir)
|
||||
notes_dir = live_dir / 'builder-notes'
|
||||
notes_dir.mkdir(parents=True, exist_ok=True)
|
||||
notes = [
|
||||
f'profile={profile.name}',
|
||||
f'base={profile.base}',
|
||||
f'features={"|".join(profile.features)}',
|
||||
]
|
||||
if profile.splash:
|
||||
splash_src = root / profile.splash
|
||||
if splash_src.exists():
|
||||
splash_dst = notes_dir / splash_src.name
|
||||
shutil.copy2(splash_src, splash_dst)
|
||||
notes.append(f'splash={profile.splash}')
|
||||
(notes_dir / 'profile-common.txt').write_text('\n'.join(notes) + '\n', encoding='utf-8')
|
||||
|
||||
|
||||
def inject_module_resources(module_dir: Path, live_dir: Path, prefix: str) -> None:
|
||||
copy_tree_contents(module_dir / 'packageslists', live_dir / 'config' / 'chroot_local-packageslists')
|
||||
copy_tree_contents(module_dir / 'packages', live_dir / 'config' / 'chroot_local-packages')
|
||||
copy_tree_contents(module_dir / 'chroot', live_dir / 'config' / 'chroot_local-includes')
|
||||
copy_glob(module_dir / 'hooks', '*.sh', live_dir / 'config' / 'chroot_local-hooks', prefix=f'{prefix}_')
|
||||
|
||||
|
||||
def profile_pre_build(live_dir: Path, profile_name: str) -> None:
|
||||
marker = live_dir / 'builder-notes' / 'pre-build.txt'
|
||||
marker.parent.mkdir(parents=True, exist_ok=True)
|
||||
marker.write_text(f'pre-build profile={profile_name}\n', encoding='utf-8')
|
||||
|
||||
|
||||
def profile_finalize(root: Path, profile_name: str) -> None:
|
||||
live_dir = root / 'live'
|
||||
out_dir = root / 'artifacts' / 'profiles' / profile_name / 'final'
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
summary = out_dir / 'summary.txt'
|
||||
summary.write_text(
|
||||
'Profile finalization complete.\n'
|
||||
f'profile={profile_name}\n'
|
||||
f'live_exists={live_dir.exists()}\n',
|
||||
encoding='utf-8',
|
||||
)
|
||||
35
builder/py/retrobuilder/paths.py
Normal file
35
builder/py/retrobuilder/paths.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def project_root_from(start: Path) -> Path:
|
||||
current = start.resolve()
|
||||
for candidate in (current, *current.parents):
|
||||
if (candidate / 'builder' / 'py').exists() and (candidate / 'profiles').exists():
|
||||
return candidate
|
||||
raise RuntimeError(f'Could not locate project root from {start}')
|
||||
|
||||
|
||||
def feature_dir(root: Path, name: str) -> Path:
|
||||
return root / 'features' / name
|
||||
|
||||
|
||||
def base_dir(root: Path, name: str) -> Path:
|
||||
return root / 'bases' / name
|
||||
|
||||
|
||||
def profile_file(root: Path, name: str) -> Path:
|
||||
return root / 'profiles' / f'{name}.py'
|
||||
|
||||
|
||||
def feature_artifacts_dir(root: Path, name: str) -> Path:
|
||||
return root / 'artifacts' / 'features' / name
|
||||
|
||||
|
||||
def base_artifacts_dir(root: Path, name: str) -> Path:
|
||||
return root / 'artifacts' / 'bases' / name
|
||||
|
||||
|
||||
def profile_artifacts_dir(root: Path, name: str) -> Path:
|
||||
return root / 'artifacts' / 'profiles' / name
|
||||
149
buildglidepkg.sh
149
buildglidepkg.sh
@@ -1,149 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
FLAVOUR="${1:-cvg}"
|
||||
ARCH="${ARCH:-i386}"
|
||||
OUTDIR="${OUTDIR:-$(pwd)}"
|
||||
|
||||
if [[ "$FLAVOUR" == "sst1" ]]; then
|
||||
GLIDE2_SRC="/usr/src/glide/glide2x/sst1/lib/sst1"
|
||||
GLIDE3_SRC="/usr/src/glide/glide3x/sst1/lib/sst1"
|
||||
elif [[ "$FLAVOUR" == "sst96" ]]; then
|
||||
GLIDE2_SRC="/usr/src/glide/glide2x/sst1/lib/sst96"
|
||||
GLIDE3_SRC="/usr/src/glide/glide3x/sst1/lib/sst96"
|
||||
else
|
||||
GLIDE2_SRC="/usr/src/glide/glide2x/${FLAVOUR}/lib"
|
||||
GLIDE3_SRC="/usr/src/glide/glide3x/${FLAVOUR}/lib"
|
||||
fi
|
||||
|
||||
PKG2="libglide2-${FLAVOUR}"
|
||||
PKG3="libglide3-${FLAVOUR}"
|
||||
|
||||
BUILDROOT="$(pwd)/pkg-glide"
|
||||
rm -rf "${BUILDROOT}"
|
||||
mkdir -p "${BUILDROOT}" "${OUTDIR}"
|
||||
|
||||
find_unique_regular_file() {
|
||||
local dir="$1"
|
||||
local pattern="$2"
|
||||
local matches=()
|
||||
|
||||
while IFS= read -r -d '' f; do
|
||||
matches+=("$f")
|
||||
done < <(find "$dir" -maxdepth 1 -type f -name "$pattern" -print0)
|
||||
|
||||
if [[ ${#matches[@]} -eq 0 ]]; then
|
||||
echo "ERROR: no regular file matching '${pattern}' found in '${dir}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${#matches[@]} -ne 1 ]]; then
|
||||
echo "ERROR: multiple regular files matching '${pattern}' found in '${dir}':" >&2
|
||||
printf ' %s\n' "${matches[@]}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basename "${matches[0]}"
|
||||
}
|
||||
|
||||
extract_glide2_pkg_version() {
|
||||
local real_so="$1"
|
||||
local ver="${real_so#libglide.so.}"
|
||||
echo "${ver}-1"
|
||||
}
|
||||
|
||||
extract_glide3_pkg_version() {
|
||||
local real_so="$1"
|
||||
local ver="${real_so#libglide3.so.}"
|
||||
echo "${ver}-1"
|
||||
}
|
||||
|
||||
build_pkg_glide2() {
|
||||
local PKGDIR="${BUILDROOT}/${PKG2}"
|
||||
local REAL_SO
|
||||
local STATIC_A="libglide.a"
|
||||
local PKG_VERSION
|
||||
|
||||
mkdir -p "${PKGDIR}/DEBIAN" "${PKGDIR}/usr/lib"
|
||||
|
||||
REAL_SO="$(find_unique_regular_file "${GLIDE2_SRC}" 'libglide.so.2.*')"
|
||||
PKG_VERSION="$(extract_glide2_pkg_version "${REAL_SO}")"
|
||||
|
||||
ls -al "${GLIDE2_SRC}/"
|
||||
|
||||
cp -a "${GLIDE2_SRC}/${REAL_SO}" "${PKGDIR}/usr/lib/"
|
||||
cp -a "${GLIDE2_SRC}/${STATIC_A}" "${PKGDIR}/usr/lib/"
|
||||
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide.so.2"
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide.so"
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide2x.so"
|
||||
|
||||
cat > "${PKGDIR}/DEBIAN/control" <<EOF
|
||||
Package: ${PKG2}
|
||||
Version: ${PKG_VERSION}
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Architecture: ${ARCH}
|
||||
Maintainer: RetroDebian <root@retrodebian.local>
|
||||
Provides: libglide2
|
||||
Conflicts: libglide2, libglide2-sst1, libglide2-cvg, libglide2-h3, libglide2-h5
|
||||
Replaces: libglide2, libglide2-sst1, libglide2-cvg, libglide2-h3, libglide2-h5
|
||||
Description: Glide 2 libraries for 3Dfx ${FLAVOUR}
|
||||
Glide 2 runtime and static libraries for the 3Dfx ${FLAVOUR} family.
|
||||
EOF
|
||||
|
||||
sed -i "s/, ${PKG2}//" "${PKGDIR}/DEBIAN/control"
|
||||
|
||||
dpkg-deb --build "${PKGDIR}" "${OUTDIR}/${PKG2}_${PKG_VERSION}_${ARCH}.deb"
|
||||
}
|
||||
|
||||
build_pkg_glide3() {
|
||||
local PKGDIR="${BUILDROOT}/${PKG3}"
|
||||
local REAL_SO
|
||||
local STATIC_A="libglide3.a"
|
||||
local PKG_VERSION
|
||||
|
||||
mkdir -p "${PKGDIR}/DEBIAN" "${PKGDIR}/usr/lib"
|
||||
|
||||
REAL_SO="$(find_unique_regular_file "${GLIDE3_SRC}" 'libglide3.so.3.*')"
|
||||
PKG_VERSION="$(extract_glide3_pkg_version "${REAL_SO}")"
|
||||
|
||||
ls -al "${GLIDE3_SRC}/"
|
||||
|
||||
cp -a "${GLIDE3_SRC}/${REAL_SO}" "${PKGDIR}/usr/lib/"
|
||||
cp -a "${GLIDE3_SRC}/${STATIC_A}" "${PKGDIR}/usr/lib/"
|
||||
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide3.so.3"
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide3.so"
|
||||
ln -s "${REAL_SO}" "${PKGDIR}/usr/lib/libglide3x.so"
|
||||
|
||||
cat > "${PKGDIR}/DEBIAN/control" <<EOF
|
||||
Package: ${PKG3}
|
||||
Version: ${PKG_VERSION}
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Architecture: ${ARCH}
|
||||
Maintainer: RetroDebian <root@retrodebian.local>
|
||||
Provides: libglide3
|
||||
Conflicts: libglide3, libglide3-sst1, libglide3-cvg, libglide3-h3, libglide3-h5
|
||||
Replaces: libglide3, libglide3-sst1, libglide3-cvg, libglide3-h3, libglide3-h5
|
||||
Description: Glide 3 libraries for 3Dfx ${FLAVOUR}
|
||||
Glide 3 runtime and static libraries for the 3Dfx ${FLAVOUR} family.
|
||||
EOF
|
||||
|
||||
sed -i "s/, ${PKG3}//" "${PKGDIR}/DEBIAN/control"
|
||||
|
||||
dpkg-deb --build "${PKGDIR}" "${OUTDIR}/${PKG3}_${PKG_VERSION}_${ARCH}.deb"
|
||||
}
|
||||
|
||||
build_pkg_glide2
|
||||
build_pkg_glide3
|
||||
|
||||
REAL_SO2="$(find_unique_regular_file "${GLIDE2_SRC}" 'libglide.so.2.*')"
|
||||
REAL_SO3="$(find_unique_regular_file "${GLIDE3_SRC}" 'libglide3.so.3.*')"
|
||||
PKG_VERSION2="$(extract_glide2_pkg_version "${REAL_SO2}")"
|
||||
PKG_VERSION3="$(extract_glide3_pkg_version "${REAL_SO3}")"
|
||||
|
||||
echo "Packages created:"
|
||||
echo " ${OUTDIR}/${PKG2}_${PKG_VERSION2}_${ARCH}.deb"
|
||||
echo " ${OUTDIR}/${PKG3}_${PKG_VERSION3}_${ARCH}.deb"
|
||||
1713
config-kernel
1713
config-kernel
File diff suppressed because it is too large
Load Diff
BIN
deps/theme-AdwaitaDark.tar
vendored
BIN
deps/theme-AdwaitaDark.tar
vendored
Binary file not shown.
70
desktop
70
desktop
@@ -1,70 +0,0 @@
|
||||
xserver-xorg
|
||||
xserver-xorg-input-evdev
|
||||
xbase-clients
|
||||
xterm
|
||||
locales
|
||||
gsetroot
|
||||
rxvt-unicode
|
||||
xfonts-base
|
||||
xfonts-100dpi
|
||||
xfonts-75dpi
|
||||
xfonts-scalable
|
||||
xfonts-terminus
|
||||
xfonts-terminus-oblique
|
||||
fluxbox
|
||||
hicolor-icon-theme
|
||||
gnome-icon-theme
|
||||
gtk2-engines
|
||||
menu
|
||||
pcmanfm
|
||||
leafpad
|
||||
dbus
|
||||
hal
|
||||
pmount
|
||||
sudo
|
||||
alsa-base
|
||||
alsa-utils
|
||||
pciutils
|
||||
usbutils
|
||||
psmisc
|
||||
wget
|
||||
curl
|
||||
less
|
||||
unzip
|
||||
zip
|
||||
vim
|
||||
ntp
|
||||
htop
|
||||
libsdl1.2debian
|
||||
libsdl1.2debian-alsa
|
||||
mesa-utils
|
||||
xmms
|
||||
smbclient
|
||||
libopenal0a
|
||||
libxft2
|
||||
cpp
|
||||
inotify-tools
|
||||
xpdf
|
||||
gsfonts-x11
|
||||
gimageview
|
||||
mplayer
|
||||
xarchiver
|
||||
numlockx
|
||||
geany
|
||||
idesk
|
||||
wmnd
|
||||
wmmixer
|
||||
unclutter
|
||||
xdialog
|
||||
smbfs
|
||||
xeji
|
||||
gksu
|
||||
xscreensaver
|
||||
beep
|
||||
xclip
|
||||
xsel
|
||||
linneighborhood
|
||||
mktemp
|
||||
gparted
|
||||
wmcpuload
|
||||
wmmemload
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 690 KiB |
@@ -0,0 +1 @@
|
||||
sample feature payload
|
||||
54
features/sample-feature/entry.py
Normal file
54
features/sample-feature/entry.py
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
THIS_FILE = Path(__file__).resolve()
|
||||
PROJECT_ROOT = THIS_FILE.parents[2]
|
||||
PY_ROOT = PROJECT_ROOT / 'builder' / 'py'
|
||||
if str(PY_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PY_ROOT))
|
||||
|
||||
from retrobuilder.context import BuildContext
|
||||
from retrobuilder.entrypoints import FeatureEntry, cli_dispatch
|
||||
from retrobuilder.model import FeatureSpec
|
||||
|
||||
SPEC = FeatureSpec(
|
||||
name='sample-feature',
|
||||
description='Sample feature used to validate the V2 builder flow.',
|
||||
packages=('sample-feature-package',),
|
||||
package_lists=('sample-feature.list',),
|
||||
docker_overrides={
|
||||
# Example: override the generate phase with a custom Etch image or Dockerfile.
|
||||
# 'pre-gen': {'image': 'python:3.11-alpine'},
|
||||
# 'post-gen': {'dockerfile': 'features/sample-feature/Dockerfile.python'},
|
||||
# 'pre-inj': {'image': 'retrodebian/custom-lenny:latest'},
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
class Entry(FeatureEntry):
|
||||
def _marker(self, ctx: BuildContext, name: str) -> Path:
|
||||
ctx.current_module_artifact_dir.mkdir(parents=True, exist_ok=True)
|
||||
return ctx.current_module_artifact_dir / name
|
||||
|
||||
def pre_gen(self, ctx: BuildContext) -> None:
|
||||
self._marker(ctx, 'pre-gen.txt').write_text('sample-feature pre-gen\n', encoding='utf-8')
|
||||
|
||||
def post_gen(self, ctx: BuildContext) -> None:
|
||||
self._marker(ctx, 'post-gen.txt').write_text('sample-feature post-gen\n', encoding='utf-8')
|
||||
|
||||
def pre_inj(self, ctx: BuildContext) -> None:
|
||||
notes = ctx.live_dir / 'builder-notes'
|
||||
notes.mkdir(parents=True, exist_ok=True)
|
||||
(notes / 'feature-pre-inj.txt').write_text('sample-feature pre-inj\n', encoding='utf-8')
|
||||
|
||||
def post_inj(self, ctx: BuildContext) -> None:
|
||||
notes = ctx.live_dir / 'builder-notes'
|
||||
notes.mkdir(parents=True, exist_ok=True)
|
||||
(notes / 'feature-post-inj.txt').write_text('sample-feature post-inj\n', encoding='utf-8')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raise SystemExit(cli_dispatch(SPEC, Entry))
|
||||
17
features/sample-feature/entry.sh
Normal file
17
features/sample-feature/entry.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
PHASE=${1:-}
|
||||
[ -n "$PHASE" ] || { echo "Usage: entry.sh <phase>" >&2; exit 2; }
|
||||
|
||||
case "$PHASE" in
|
||||
pre-inj|post-inj)
|
||||
mkdir -p "$LIVE_DIR/builder-notes"
|
||||
printf 'sample-feature entry.sh %s
|
||||
' "$PHASE" > "$LIVE_DIR/builder-notes/feature-entry-${PHASE}.txt"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported feature phase: $PHASE" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
7
features/sample-feature/generate.sh
Normal file
7
features/sample-feature/generate.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
[ -n "${CURRENT_MODULE_ARTIFACT_DIR:-}" ] || { echo "CURRENT_MODULE_ARTIFACT_DIR is required" >&2; exit 2; }
|
||||
mkdir -p "$CURRENT_MODULE_ARTIFACT_DIR/generated"
|
||||
printf 'generated by sample-feature
|
||||
' > "$CURRENT_MODULE_ARTIFACT_DIR/generated/feature-artifact.txt"
|
||||
4
features/sample-feature/hooks/20-sample-feature.sh
Normal file
4
features/sample-feature/hooks/20-sample-feature.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
printf 'sample feature chroot hook
|
||||
' > /tmp/sample-feature-hook.txt
|
||||
@@ -0,0 +1 @@
|
||||
placeholder deb artifact for sample feature
|
||||
@@ -0,0 +1 @@
|
||||
htop
|
||||
297
games/ut99/ut
297
games/ut99/ut
@@ -1,297 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
ini_set_key() {
|
||||
local file="$1"
|
||||
local section="$2"
|
||||
local key="$3"
|
||||
local value="$4"
|
||||
local tmp
|
||||
|
||||
tmp="${file}.tmp.$$"
|
||||
|
||||
awk -v section="$section" -v key="$key" -v value="$value" '
|
||||
BEGIN {
|
||||
in_section = 0
|
||||
section_found = 0
|
||||
key_done = 0
|
||||
}
|
||||
|
||||
function flush_missing_key() {
|
||||
if (in_section && !key_done) {
|
||||
print key "=" value
|
||||
key_done = 1
|
||||
}
|
||||
}
|
||||
|
||||
/^\[[^]]+\]$/ {
|
||||
if (in_section) {
|
||||
flush_missing_key()
|
||||
in_section = 0
|
||||
}
|
||||
|
||||
if ($0 == "[" section "]") {
|
||||
in_section = 1
|
||||
section_found = 1
|
||||
}
|
||||
|
||||
print
|
||||
next
|
||||
}
|
||||
|
||||
{
|
||||
if (in_section && $0 ~ ("^" key "=")) {
|
||||
if (!key_done) {
|
||||
print key "=" value
|
||||
key_done = 1
|
||||
}
|
||||
next
|
||||
}
|
||||
|
||||
print
|
||||
}
|
||||
|
||||
END {
|
||||
if (in_section) {
|
||||
flush_missing_key()
|
||||
}
|
||||
|
||||
if (!section_found) {
|
||||
print "[" section "]"
|
||||
print key "=" value
|
||||
}
|
||||
}' "$file" > "$tmp" && mv "$tmp" "$file"
|
||||
}
|
||||
|
||||
ini_del_key() {
|
||||
local file="$1"
|
||||
local section="$2"
|
||||
local key="$3"
|
||||
local tmp
|
||||
|
||||
tmp="${file}.tmp.$$"
|
||||
|
||||
awk -v section="$section" -v key="$key" '
|
||||
BEGIN {
|
||||
in_section = 0
|
||||
}
|
||||
|
||||
/^\[[^]]+\]$/ {
|
||||
in_section = ($0 == "[" section "]")
|
||||
print
|
||||
next
|
||||
}
|
||||
|
||||
{
|
||||
if (in_section && $0 ~ ("^" key "=")) {
|
||||
next
|
||||
}
|
||||
print
|
||||
}' "$file" > "$tmp" && mv "$tmp" "$file"
|
||||
}
|
||||
|
||||
GAME_BINARY="ut-bin"
|
||||
SYSTEM_DIR="System"
|
||||
|
||||
# Additional commandline options for mods etc.
|
||||
CMD_ARGS=()
|
||||
|
||||
# don't use US keyboard layout
|
||||
#NOUSLAYOUT="true"
|
||||
|
||||
resolve_link() {
|
||||
local path target dir
|
||||
path="$1"
|
||||
|
||||
[ -L "$path" ] || return 1
|
||||
|
||||
target="$(LC_ALL=C ls -l "$path" 2>/dev/null)"
|
||||
target="${target##* -> }"
|
||||
|
||||
case "$target" in
|
||||
/*) printf '%s\n' "$target" ;;
|
||||
*)
|
||||
dir="$(dirname "$path")"
|
||||
printf '%s\n' "$dir/$target"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
LANG=POSIX
|
||||
export LANG
|
||||
script="$0"
|
||||
count=0
|
||||
while [ -L "$script" ]
|
||||
do
|
||||
script="$(resolve_link "$script")"
|
||||
count=$((count + 1))
|
||||
if [ "$count" -gt 100 ]
|
||||
then
|
||||
echo "Too many symbolic links"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
GAME_DIR="$(cd "$(dirname "$script")" && pwd)"
|
||||
GAME_SYSTEM_DIR="${GAME_DIR}/${SYSTEM_DIR}"
|
||||
USER_UT_DIR="${HOME}/.loki/ut/${SYSTEM_DIR}"
|
||||
SYSTEM_DEFAULT_GLIDE="${GAME_SYSTEM_DIR}/Default-glide.ini"
|
||||
SYSTEM_DEFAULT_OPENGL="${GAME_SYSTEM_DIR}/Default-opengl.ini"
|
||||
SYSTEM_DEFAULT_USER="${GAME_SYSTEM_DIR}/DefUser.ini"
|
||||
USER_UT_INI="${USER_UT_DIR}/UnrealTournament.ini"
|
||||
USER_USER_INI="${USER_UT_DIR}/User.ini"
|
||||
|
||||
if [ ! -d "${USER_UT_DIR}" ]
|
||||
then
|
||||
mkdir -p "${USER_UT_DIR}"
|
||||
fi
|
||||
|
||||
detect_renderer() {
|
||||
if [ -e /usr/lib/libglide2x.so ] || [ -e /usr/local/lib/libglide2x.so ]; then
|
||||
echo "glide"
|
||||
else
|
||||
echo "opengl"
|
||||
fi
|
||||
}
|
||||
|
||||
install_ini_profile() {
|
||||
local renderer="$1"
|
||||
|
||||
case "$renderer" in
|
||||
glide)
|
||||
if [ -r "${SYSTEM_DEFAULT_GLIDE}" ]; then
|
||||
cp -f "${SYSTEM_DEFAULT_GLIDE}" "${USER_UT_INI}"
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
opengl)
|
||||
if [ -r "${SYSTEM_DEFAULT_OPENGL}" ]; then
|
||||
cp -f "${SYSTEM_DEFAULT_OPENGL}" "${USER_UT_INI}"
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
if [ ! -f "${USER_UT_INI}" ]; then
|
||||
RENDERER="$(detect_renderer)"
|
||||
install_ini_profile "${RENDERER}" || {
|
||||
echo "Failed to install renderer profile: ${RENDERER}"
|
||||
exit 1
|
||||
}
|
||||
ini_set_key "${USER_UT_INI}" "Engine.Engine" "AudioDevice" "Audio.GenericAudioSubsystem"
|
||||
ini_set_key "${USER_UT_INI}" "Core.System" "CacheSizeMegs" "32"
|
||||
ini_set_key "${USER_UT_INI}" "WinDrv.WindowsClient" "FullscreenViewportX" "800"
|
||||
ini_set_key "${USER_UT_INI}" "WinDrv.WindowsClient" "FullscreenViewportY" "600"
|
||||
ini_set_key "${USER_UT_INI}" "Audio.GenericAudioSubsystem" "UseSpatial" "True"
|
||||
ini_set_key "${USER_UT_INI}" "Audio.GenericAudioSubsystem" "UseReverb" "True"
|
||||
ini_set_key "${USER_UT_INI}" "Audio.GenericAudioSubsystem" "OutputRate" "44100Hz"
|
||||
ini_set_key "${USER_UT_INI}" "IpDrv.TcpNetDriver" "ConfiguredInternetSpeed" "25000"
|
||||
|
||||
if ! grep -q '^\[UBrowser\.UBrowserFavoritesFact\]$' "${USER_UT_INI}"; then
|
||||
printf '%s\n' \
|
||||
'[UBrowser.UBrowserFavoritesFact]' \
|
||||
'FavoriteCount=1' \
|
||||
'Favorites[0]=Vogons\5.196.92.222\5091\False' \
|
||||
>> "${USER_UT_INI}"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Remove passwords from UnrealTournament.ini
|
||||
if [ -r "${USER_UT_INI}" ]
|
||||
then
|
||||
sed -i \
|
||||
-e 's/^\(SavedPasswords\[[0-9]*\]=\).*/\1/' \
|
||||
-e 's/^\(PasswordHistory\[[0-9]*\]=\).*/\1/' \
|
||||
"${USER_UT_INI}"
|
||||
fi
|
||||
|
||||
|
||||
set_random_ut_name() {
|
||||
local target_file="$1"
|
||||
|
||||
[ -n "$target_file" ] || return 1
|
||||
[ -f "$target_file" ] || return 1
|
||||
|
||||
local names='
|
||||
Phobos
|
||||
Vortex
|
||||
Raptor
|
||||
Hexer
|
||||
Cobra
|
||||
Grendel
|
||||
Nyx
|
||||
Blitz
|
||||
Talon
|
||||
Havoc
|
||||
Stryker
|
||||
Wraith
|
||||
Nova
|
||||
Reaper
|
||||
Goliath
|
||||
Drift
|
||||
Razor
|
||||
Pixel
|
||||
Onyx
|
||||
Fury
|
||||
'
|
||||
|
||||
local count=$(printf '%s\n' "$names" | sed '/^$/d' | wc -l)
|
||||
local idx=$(( (RANDOM % count) + 1 ))
|
||||
local base_name=$(printf '%s\n' "$names" | sed '/^$/d' | sed -n "${idx}p")
|
||||
local suffix=$(printf '%02d' $((RANDOM % 100)))
|
||||
local new_name="${base_name}${suffix}"
|
||||
|
||||
sed -i "s/^Name=Player$/Name=${new_name}/" "$target_file"
|
||||
}
|
||||
|
||||
if [ ! -f "${USER_USER_INI}" ]; then
|
||||
if [ ! -r "${SYSTEM_DEFAULT_USER}" ]; then
|
||||
echo "Missing ${SYSTEM_DEFAULT_USER}"
|
||||
exit 1
|
||||
fi
|
||||
cp -f "${SYSTEM_DEFAULT_USER}" "${USER_USER_INI}"
|
||||
set_random_ut_name "${USER_USER_INI}"
|
||||
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Left"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Up"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Right"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Down"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Z"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "Q"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "S"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.Input" "D"
|
||||
ini_del_key "${USER_USER_INI}" "Engine.PlayerPawn" "DodgeClickTime"
|
||||
|
||||
ini_set_key "${USER_USER_INI}" "Engine.Input" "W" "MoveForward"
|
||||
ini_set_key "${USER_USER_INI}" "Engine.Input" "A" "StrafeLeft"
|
||||
ini_set_key "${USER_USER_INI}" "Engine.Input" "S" "MoveBackward"
|
||||
ini_set_key "${USER_USER_INI}" "Engine.Input" "D" "StrafeRight"
|
||||
ini_set_key "${USER_USER_INI}" "Engine.PlayerPawn" "0.250000"
|
||||
|
||||
fi
|
||||
|
||||
# games run better with US keyboard layout
|
||||
restore_xkb() {
|
||||
[ -n "$OLD_XKB_LAYOUT" ] && setxkbmap "$OLD_XKB_LAYOUT" >/dev/null 2>&1 || true
|
||||
}
|
||||
|
||||
OLD_XKB_LAYOUT="$(setxkbmap -query 2>/dev/null | awk '$1=="layout:" {print $2}')"
|
||||
trap restore_xkb EXIT
|
||||
setxkbmap us >/dev/null 2>&1 || true
|
||||
|
||||
LD_LIBRARY_PATH="${GAME_SYSTEM_DIR}:${LD_LIBRARY_PATH}"
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
cd "${GAME_SYSTEM_DIR}" || exit 1
|
||||
|
||||
# start the game
|
||||
if nice -n -5 true >/dev/null 2>&1; then
|
||||
echo "Launching UT99 with elevated priority"
|
||||
exec nice -n -5 -- "./$GAME_BINARY" "${CMD_ARGS[@]}" "$@"
|
||||
else
|
||||
echo "Negative nice not permitted, launching normally"
|
||||
exec "./$GAME_BINARY" "${CMD_ARGS[@]}" "$@"
|
||||
fi
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
deb [trusted=yes] http://archive.debian.org/debian-backports/ etch-backports main
|
||||
@@ -1,18 +0,0 @@
|
||||
SSTV2_FASTMEM_RAS_READS=1
|
||||
SSTV2_FASTMEM_READ=1
|
||||
SSTV2_FASTMEM=1
|
||||
SSTV2_FASTPCIRD=1
|
||||
SSTV2_GRXCLK=90
|
||||
SSTV2_SLIM_VOUT_CLKDEL=0
|
||||
SSTV2_SLIM_VIN_CLKDEL=0
|
||||
SSTV2_SLIS_VOUT_CLKDEL=0
|
||||
SSTV2_SLIS_VIN_CLKDEL=0
|
||||
SSTV2_SWAPINTERVAL=0
|
||||
FX_GLIDE_SWAPINTERVAL=0
|
||||
SSTV2_GAMMA=1.3
|
||||
SSTV2_MISMATCHED_SLI=1
|
||||
SSTV2_SWAP_EN_WAIT_ON_VSYNC=0
|
||||
SSTV2_SCREENREFRESH=75
|
||||
FX_GLIDE_SHAMELESS_PLUG=1
|
||||
MESA_GLX_FX=f
|
||||
MESA_FX_INFO=1
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: retrodebian-fluxbox-watch-menu
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Watch and filter Fluxbox generated menu
|
||||
### END INIT INFO
|
||||
|
||||
DAEMON=/opt/retrodebian/fluxbox/watch-menu.sh
|
||||
PIDFILE=/var/run/retrodebian-fluxbox-watch-menu.pid
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting retrodebian-fluxbox-watch-menu"
|
||||
start-stop-daemon --start --background --make-pidfile --pidfile "$PIDFILE" --exec "$DAEMON"
|
||||
;;
|
||||
stop)
|
||||
echo "Stopping retrodebian-fluxbox-watch-menu"
|
||||
start-stop-daemon --stop --pidfile "$PIDFILE" --retry 5
|
||||
rm -f "$PIDFILE"
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: retrodebian-xorg-autoconfig
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop:
|
||||
# Short-Description: Generate xorg.conf for RetroDebian at boot
|
||||
# Description: Detect video hardware and generate /etc/X11/xorg.conf
|
||||
### END INIT INFO
|
||||
|
||||
FLAG_FILE="/var/lib/retrodebian/xorg-autoconfig.done"
|
||||
XORG_CONF="/etc/X11/xorg.conf"
|
||||
AUTOCONFIG_BIN="/opt/retrodebian/xorg/autoconfig.sh"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -f "$FLAG_FILE" ] && exit 0
|
||||
[ -x "$AUTOCONFIG_BIN" ] || exit 0
|
||||
|
||||
mkdir -p /var/lib/retrodebian || exit 0
|
||||
|
||||
"$AUTOCONFIG_BIN" "$XORG_CONF" || exit 0
|
||||
touch "$FLAG_FILE" || exit 0
|
||||
;;
|
||||
stop|restart|force-reload)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1 +0,0 @@
|
||||
/usr/local/lib
|
||||
@@ -1,27 +0,0 @@
|
||||
URxvt*font: xft:DejaVu Sans Mono:size=9
|
||||
URxvt*foreground: #7186e3
|
||||
URxvt*background: #303030
|
||||
URxvt*cursorColor: #65adc7
|
||||
URxvt*scrollBar: false
|
||||
URxvt*internalBorder: 6
|
||||
|
||||
URxvt.perl-ext-common: default,clipboard
|
||||
URxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
||||
URxvt.keysym.Mod4-c: perl:clipboard:copy
|
||||
URxvt.keysym.Mod4-v: perl:clipboard:paste
|
||||
URxvt.keysym.C-v: perl:clipboard:paste
|
||||
URxvt.clipboard.autocopy: false
|
||||
URxvt.clipboard.copycmd: sh -c 'xsel -i -b'
|
||||
URxvt.clipboard.pastecmd: sh -c 'xsel -o -b'
|
||||
|
||||
XTerm*faceName: DejaVu Sans Mono
|
||||
XTerm*faceSize: 9
|
||||
XTerm*foreground: #7186e3
|
||||
XTerm*background: #303030
|
||||
XTerm*cursorColor: #65adc7
|
||||
|
||||
Xft.antialias: 1
|
||||
Xft.hinting: 1
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.rgba: none
|
||||
Xft.dpi: 96
|
||||
@@ -1,3 +0,0 @@
|
||||
if [ -f "$HOME/.profile" ]; then
|
||||
. "$HOME/.profile"
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[0;37m\]\u@\h\[\033[0m\]:\[\033[0;36m\]\w\[\033[0m\]\$ '
|
||||
alias apt='apt-get'
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
eval "$(dircolors -b)"
|
||||
fi
|
||||
|
||||
# Softer moonlight palette for ls
|
||||
LS_COLORS="di=0;36:ln=1;36:so=1;35:pi=0;33:ex=1;32:bd=1;33:cd=1;33:su=0;37;41:sg=0;30;43:tw=0;30;42:ow=0;34;42:or=1;31:mi=1;31"
|
||||
export LS_COLORS
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls --color=auto -l'
|
||||
alias la='ls --color=auto -la'
|
||||
@@ -1,10 +0,0 @@
|
||||
session.styleFile: /usr/share/fluxbox/styles/BlueNight
|
||||
session.menuFile: /var/run/retrodebian/final-fluxbox-menu
|
||||
session.screen0.rootCommand: Esetroot /usr/share/wallpapers/retrodebian.jpg
|
||||
session.screen0.menu.alpha: 128
|
||||
session.configVersion: 1
|
||||
menu.frame.font: Sans-9
|
||||
menu.title.font: Sans:bold-9
|
||||
toolbar.clock.font: Sans-9
|
||||
toolbar.workspace.font: Sans-9
|
||||
window.font: Sans-9
|
||||
@@ -1,94 +0,0 @@
|
||||
# Clic sur le bureau pour afficher les menus
|
||||
OnDesktop Mouse1 :HideMenus
|
||||
OnDesktop Mouse2 :WorkspaceMenu
|
||||
OnDesktop Mouse3 :RootMenu
|
||||
# Scroll sur le bureau pour changer de bureau
|
||||
OnDesktop Mouse4 :PrevWorkspace
|
||||
OnDesktop Mouse5 :NextWorkspace
|
||||
# Scroll sur la barre fluxbox pour changer de fenetre
|
||||
OnToolbar Mouse4 :PrevWindow {static groups} (iconhidden=no)
|
||||
OnToolbar Mouse5 :NextWindow {static groups} (iconhidden=no)
|
||||
# Alt et clic gauche ou droite pour deplacer ou agrandir la fenetre
|
||||
OnWindow Mod1 Mouse1 :MacroCmd {Raise} {Focus} {StartMoving}
|
||||
OnWindowBorder Move1 :StartMoving
|
||||
OnWindow Mod1 Mouse3 :MacroCmd {Raise} {Focus} {StartResizing NearestCorner}
|
||||
OnLeftGrip Move1 :StartResizing bottomleft
|
||||
OnRightGrip Move1 :StartResizing bottomright
|
||||
# control-click a window's titlebar and drag to attach windows
|
||||
OnTitlebar Control Mouse1 :StartTabbing
|
||||
# Double clic sur la barre on agrandit (ou Windows + Fleche haut
|
||||
OnTitlebar Double Mouse1 :Maximize
|
||||
# Déplacer la fenetre quand on clic sur la barre de titre
|
||||
OnTitlebar Mouse1 :MacroCmd {Raise} {Focus} {ActivateTab}
|
||||
OnTitlebar Move1 :StartMoving
|
||||
# Reduire si clic milieu
|
||||
OnTitlebar Mouse2 :Lower
|
||||
# Clic droit sur la fenetre affiche les options
|
||||
OnTitlebar Mouse3 :WindowMenu
|
||||
# Alt Tab
|
||||
Mod1 Tab :NextWindow {groups} (workspace=[current])
|
||||
Mod1 Shift Tab :PrevWindow {groups} (workspace=[current])
|
||||
# open a terminal
|
||||
Mod1 F1 :Exec xterm
|
||||
# Ouvrir la fenetre rapide de programme avec Alt F2
|
||||
Mod1 F2 :Exec fbrun
|
||||
# Commande de fenetre
|
||||
Mod1 F4 :Close
|
||||
#Mod1 F5 :Kill
|
||||
Mod1 F9 :Minimize
|
||||
Mod1 F10 :Maximize
|
||||
Mod1 F11 :Fullscreen
|
||||
# exit fluxbox
|
||||
Control Mod1 Delete :Exit
|
||||
# change to previous/next workspace
|
||||
#Control Mod1 Left :PrevWorkspace
|
||||
#Control Mod1 Right :NextWorkspace
|
||||
# send the current window to previous/next workspace
|
||||
#Mod4 Left :SendToPrevWorkspace
|
||||
#Mod4 Right :SendToNextWorkspace
|
||||
# send the current window and follow it to previous/next workspace
|
||||
#Control Mod4 Left :TakeToPrevWorkspace
|
||||
#Control Mod4 Right :TakeToNextWorkspace
|
||||
# Changer de bureau
|
||||
Control F1 :Workspace 1
|
||||
Control F2 :Workspace 2
|
||||
Control F3 :Workspace 3
|
||||
Control F4 :Workspace 4
|
||||
Control F5 :Workspace 5
|
||||
Control F6 :Workspace 6
|
||||
Control F7 :Workspace 7
|
||||
Control F8 :Workspace 8
|
||||
Control F9 :Workspace 9
|
||||
Control F10 :Workspace 10
|
||||
Control F11 :Workspace 11
|
||||
Control F12 :Workspace 12
|
||||
# send the current window to a specific workspace
|
||||
#Mod4 F1 :SendToWorkspace 1
|
||||
#Mod4 F2 :SendToWorkspace 2
|
||||
#Mod4 F3 :SendToWorkspace 3
|
||||
#Mod4 F4 :SendToWorkspace 4
|
||||
#Mod4 F5 :SendToWorkspace 5
|
||||
#Mod4 F6 :SendToWorkspace 6
|
||||
#Mod4 F7 :SendToWorkspace 7
|
||||
#Mod4 F8 :SendToWorkspace 8
|
||||
#Mod4 F9 :SendToWorkspace 9
|
||||
#Mod4 F10 :SendToWorkspace 10
|
||||
#Mod4 F11 :SendToWorkspace 11
|
||||
#Mod4 F12 :SendToWorkspace 12
|
||||
# send the current window and change to a specific workspace
|
||||
#Control Mod4 F1 :TakeToWorkspace 1
|
||||
#Control Mod4 F2 :TakeToWorkspace 2
|
||||
#Control Mod4 F3 :TakeToWorkspace 3
|
||||
#Control Mod4 F4 :TakeToWorkspace 4
|
||||
#Control Mod4 F5 :TakeToWorkspace 5
|
||||
#Control Mod4 F6 :TakeToWorkspace 6
|
||||
#Control Mod4 F7 :TakeToWorkspace 7
|
||||
#Control Mod4 F8 :TakeToWorkspace 8
|
||||
#Control Mod4 F9 :TakeToWorkspace 9
|
||||
#Control Mod4 F10 :TakeToWorkspace 10
|
||||
#Control Mod4 F11 :TakeToWorkspace 11
|
||||
#Control Mod4 F12 :TakeToWorkspace 12
|
||||
|
||||
None XF86AudioRaiseVolume : Exec amixer sset Master,0 3000+
|
||||
None XF86AudioLowerVolume : Exec amixer sset Master,0 3000-
|
||||
None XF86AudioMute : Exec amixer sset Master,0 toggle
|
||||
@@ -1,13 +0,0 @@
|
||||
fbsetroot -f /usr/share/wallpapers/retrodebian.jpg
|
||||
|
||||
numlockx on
|
||||
|
||||
idesk &
|
||||
unclutter -idle 2 &
|
||||
wmnd &
|
||||
wmmixer -w &
|
||||
wmcpuload -bl -lc rgb:80/B0/A0 &
|
||||
wmmemload -bl -lc rgb:80/B0/A0 &
|
||||
xscreensaver &
|
||||
#exec /usr/bin/fluxbox -log "$HOME/.fluxbox/log"
|
||||
exec /usr/bin/fluxbox
|
||||
@@ -1,30 +0,0 @@
|
||||
style "force-dark"
|
||||
{
|
||||
bg[NORMAL] = "#303030"
|
||||
bg[ACTIVE] = "#404040"
|
||||
bg[PRELIGHT] = "#505050"
|
||||
bg[SELECTED] = "#506070"
|
||||
|
||||
fg[NORMAL] = "#f0f0f0"
|
||||
fg[ACTIVE] = "#ffffff"
|
||||
fg[PRELIGHT] = "#ffffff"
|
||||
fg[SELECTED] = "#ffffff"
|
||||
|
||||
base[NORMAL] = "#202020"
|
||||
base[ACTIVE] = "#303030"
|
||||
base[PRELIGHT] = "#404040"
|
||||
base[SELECTED] = "#506070"
|
||||
|
||||
text[NORMAL] = "#f0f0f0"
|
||||
text[ACTIVE] = "#ffffff"
|
||||
text[PRELIGHT] = "#ffffff"
|
||||
text[SELECTED] = "#ffffff"
|
||||
|
||||
GtkWidget::cursor-color = "#b0c0d0"
|
||||
GtkWidget::secondary-cursor-color = "#b0c0d0"
|
||||
}
|
||||
|
||||
class "*" style "force-dark"
|
||||
|
||||
gtk-font-name="Sans 8"
|
||||
gtk-icon-theme-name="Tango"
|
||||
@@ -1,38 +0,0 @@
|
||||
table Config
|
||||
FontName: xft:DejaVu Sans
|
||||
FontSize: 10
|
||||
FontColor: #f0f0f0
|
||||
ToolTip.FontSize: 11
|
||||
ToolTip.FontName: xft:DejaVu Sans
|
||||
ToolTip.ForeColor: #0000FF
|
||||
ToolTip.BackColor: #FFFFFF
|
||||
ToolTip.CaptionOnHover: true
|
||||
ToolTip.CaptionPlacement: Right
|
||||
Locked: false
|
||||
Transparency: 100
|
||||
Shadow: true
|
||||
ShadowColor: #000000
|
||||
ShadowX: 1
|
||||
ShadowY: 1
|
||||
Bold: true
|
||||
ClickDelay: 300
|
||||
IconSnap: true
|
||||
SnapWidth: 20
|
||||
SnapHeight: 20
|
||||
SnapOrigin: BottomRight
|
||||
SnapShadow: false
|
||||
SnapShadowTrans: 200
|
||||
CaptionOnHover: false
|
||||
CaptionPlacement: bottom
|
||||
FillStyle: fillinvert
|
||||
Background.File: /usr/share/wallpapers/retrodebian.jpg
|
||||
end
|
||||
|
||||
table Actions
|
||||
Lock: control right doubleClk
|
||||
Reload: middle doubleClk
|
||||
Drag: left hold
|
||||
EndDrag: left singleClk
|
||||
Execute[0]: left doubleClk
|
||||
Execute[1]: right doubleClk
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: Files
|
||||
CaptionTip: Open files browser (pcmanfm)
|
||||
Command: pcmanfm
|
||||
Icon: /usr/share/icons/gnome/48x48/apps/drawer.png
|
||||
X: 38
|
||||
Y: 2
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: Task Manager
|
||||
CaptionTip: Open htop
|
||||
Command: urxvt -e htop
|
||||
Icon: /usr/share/icons/gnome/48x48/apps/gnome-monitor.png
|
||||
X: 38
|
||||
Y: 82
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: Terminal
|
||||
CaptionTip: Open a new terminal
|
||||
Command: urxvt
|
||||
Icon: /usr/share/icons/gnome/48x48/apps/gnome-terminal.png
|
||||
X: 38
|
||||
Y: 242
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: Text Edit
|
||||
CaptionTip: Open leafpad
|
||||
Command: leafpad
|
||||
Icon: /usr/share/icons/gnome/48x48/apps/text-editor.png
|
||||
X: 38
|
||||
Y: 162
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: UT99
|
||||
CaptionTip: Unreal Tournament 99
|
||||
Command: /usr/local/games/ut99/ut
|
||||
Icon: /usr/share/icons/ut99.png
|
||||
X: 38
|
||||
Y: 322
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,10 +0,0 @@
|
||||
table Icon
|
||||
Caption: v2-tmu-memtester
|
||||
CaptionTip: Voodoo 2 Diag
|
||||
Command: urxvt -e sh -c '/usr/local/bin/v2-tmu-memtester --help; exec bash'
|
||||
Icon: /usr/share/icons/gnome/48x48/devices/gnome-dev-memory.png
|
||||
X: 38
|
||||
Y: 402
|
||||
Width: 48
|
||||
Height: 48
|
||||
end
|
||||
@@ -1,36 +0,0 @@
|
||||
[MIME Cache]
|
||||
text/x-c=geany
|
||||
text/x-c++=geany
|
||||
text/x-java=geany
|
||||
text/x-python=geany
|
||||
text/x-makefile=geany
|
||||
application/x-desktop=geany
|
||||
text/plain=leafpad
|
||||
text/x-log=leafpad
|
||||
application/xml=geany
|
||||
text/html=geany
|
||||
application/x-shellscript=geany
|
||||
image/jpeg=gimageview
|
||||
image/png=gimageview
|
||||
image/gif=gimageview
|
||||
image/bmp=gimageview
|
||||
image/x-xpixmap=gimageview
|
||||
application/pdf=xpdf
|
||||
inode/directory=pcmanfm
|
||||
audio/mpeg=xmms
|
||||
audio/x-wav=xmms
|
||||
audio/ogg=xmms
|
||||
video/x-msvideo=mplayer
|
||||
video/mpeg=mplayer
|
||||
video/mp4=mplayer
|
||||
video/x-matroska=mplayer
|
||||
application/postscript=xpdf
|
||||
application/x-bzip2=xarchiver
|
||||
application/x-gzip-compressed=xarchiver
|
||||
application/x-compressed-tar=xarchiver
|
||||
application/x-tgz=xarchiver
|
||||
application/x-bzip-compressed-tar=xarchiver
|
||||
application/zip=xarchiver
|
||||
application/x-tar=xarchiver
|
||||
application/x-bzip=xarchiver
|
||||
application/x-gzip=xarchiver
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec startx
|
||||
fi
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
: "${DISPLAY:=:0}"
|
||||
export DISPLAY
|
||||
|
||||
if [ -f "$HOME/.resolution.config" ]; then
|
||||
RES="$(sed -n '1p' "$HOME/.resolution.config")"
|
||||
if [ -n "$RES" ]; then
|
||||
xrandr -s "$RES"
|
||||
fi
|
||||
fi
|
||||
|
||||
xrdb -merge "$HOME/.Xresources"
|
||||
|
||||
exec startfluxbox
|
||||
@@ -1,328 +0,0 @@
|
||||
# XScreenSaver Preferences File
|
||||
# Written by xscreensaver-demo 4.24 for bob on Mon Mar 23 14:48:12 2026.
|
||||
# http://www.jwz.org/xscreensaver/
|
||||
|
||||
timeout: 0:10:00
|
||||
cycle: 0:10:00
|
||||
lock: False
|
||||
lockTimeout: 0:20:00
|
||||
passwdTimeout: 0:00:30
|
||||
visualID: default
|
||||
installColormap: True
|
||||
verbose: False
|
||||
timestamp: True
|
||||
splash: False
|
||||
splashDuration: 0:00:05
|
||||
quad: False
|
||||
demoCommand: xscreensaver-demo
|
||||
prefsCommand: xscreensaver-demo -prefs
|
||||
nice: 10
|
||||
memoryLimit: 0
|
||||
fade: False
|
||||
unfade: False
|
||||
fadeSeconds: 0:00:03
|
||||
fadeTicks: 20
|
||||
captureStderr: False
|
||||
ignoreUninstalledPrograms:False
|
||||
font: *-medium-r-*-140-*-m-*
|
||||
dpmsEnabled: False
|
||||
dpmsStandby: 1:00:00
|
||||
dpmsSuspend: 1:00:00
|
||||
dpmsOff: 2:00:00
|
||||
grabDesktopImages: False
|
||||
grabVideoFrames: False
|
||||
chooseRandomImages: False
|
||||
imageDirectory:
|
||||
|
||||
mode: one
|
||||
selected: 96
|
||||
|
||||
textMode: date
|
||||
textLiteral: XScreenSaver
|
||||
textFile: /usr/share/doc/xserver-common/copyright
|
||||
textProgram: fortune
|
||||
textURL: http://planet.debian.org/rss20.xml
|
||||
|
||||
programs: \
|
||||
"Qix (solid)" qix -root -solid -segments 100 \n\
|
||||
"Qix (transparent)" qix -root -count 4 -solid -transparent \n\
|
||||
"Qix (linear)" qix -root -count 5 -solid -transparent \
|
||||
-linear -segments 250 -size 100 \n\
|
||||
- "Qix (xor)" qix -root -linear -count 5 -size 200 \
|
||||
-spread 30 -segments 75 -solid -xor \n\
|
||||
"Attraction (balls)" attraction -root -mode balls \n\
|
||||
"Attraction (lines)" attraction -root -mode lines -points 3 \
|
||||
-segments 200 \n\
|
||||
- "Attraction (poly)" attraction -root -mode polygons \n\
|
||||
"Attraction (splines)" attraction -root -mode splines -segments \
|
||||
300 \n\
|
||||
"Attraction (orbital)" attraction -root -mode lines -radius 300 \
|
||||
-orbit -vmult 0.5 \n\
|
||||
pyro -root \n\
|
||||
rocks -root \n\
|
||||
helix -root \n\
|
||||
pedal -root \n\
|
||||
rorschach -root -offset 7 \n\
|
||||
hopalong -root \n\
|
||||
greynetic -root \n\
|
||||
imsmap -root \n\
|
||||
slidescreen -root \n\
|
||||
decayscreen -root \n\
|
||||
jigsaw -root \n\
|
||||
blitspin -root -grab \n\
|
||||
slip -root \n\
|
||||
distort -root \n\
|
||||
spotlight -root \n\
|
||||
"Ripples (oily)" ripples -root -oily -light 2 \n\
|
||||
"Ripples (stir)" ripples -root -oily -light 2 -stir \n\
|
||||
"Ripples (desktop)" ripples -root -water -light 6 \n\
|
||||
hypercube -root \n\
|
||||
- hyperball -root \n\
|
||||
halo -root \n\
|
||||
maze -root \n\
|
||||
noseguy -root \n\
|
||||
flame -root \n\
|
||||
- lmorph -root \n\
|
||||
deco -root \n\
|
||||
moire -root \n\
|
||||
moire2 -root \n\
|
||||
lightning -root \n\
|
||||
strange -root \n\
|
||||
- spiral -root \n\
|
||||
laser -root \n\
|
||||
grav -root \n\
|
||||
"Grav (trails)" grav -root -trail -decay \n\
|
||||
drift -root \n\
|
||||
ifs -root \n\
|
||||
julia -root \n\
|
||||
penrose -root \n\
|
||||
- sierpinski -root \n\
|
||||
braid -root \n\
|
||||
galaxy -root \n\
|
||||
bouboule -root \n\
|
||||
swirl -root \n\
|
||||
flag -root \n\
|
||||
sphere -root \n\
|
||||
forest -root \n\
|
||||
- lisa -root \n\
|
||||
- lissie -root \n\
|
||||
goop -root -max-velocity 0.5 -elasticity \
|
||||
0.9 \n\
|
||||
starfish -root \n\
|
||||
"Starfish (blob)" starfish -root -blob \n\
|
||||
munch -root \n\
|
||||
mismunch -root \n\
|
||||
fadeplot -root \n\
|
||||
coral -root -delay 0 \n\
|
||||
mountain -root \n\
|
||||
triangle -root -delay 1 \n\
|
||||
- worm -root \n\
|
||||
- rotor -root \n\
|
||||
- demon -root \n\
|
||||
- loop -root \n\
|
||||
- vines -root \n\
|
||||
kaleidescope -root \n\
|
||||
xjack -root \n\
|
||||
xlyap -root -randomize \n\
|
||||
cynosure -root \n\
|
||||
flow -root \n\
|
||||
epicycle -root \n\
|
||||
interference -root \n\
|
||||
truchet -root -randomize \n\
|
||||
bsod -root \n\
|
||||
crystal -root \n\
|
||||
discrete -root \n\
|
||||
kumppa -root \n\
|
||||
rd-bomb -root \n\
|
||||
"RD-Bomb (mobile)" rd-bomb -root -speed 1 -size 0.1 \n\
|
||||
sonar -root \n\
|
||||
t3d -root \n\
|
||||
penetrate -root \n\
|
||||
deluxe -root \n\
|
||||
compass -root \n\
|
||||
squiral -root \n\
|
||||
xflame -root \n\
|
||||
wander -root \n\
|
||||
"Wander (spots)" wander -root -advance 0 -size 10 -circles \
|
||||
-length 10000 -reset 100000 \n\
|
||||
- critical -root \n\
|
||||
phosphor -root \n\
|
||||
xmatrix -root -small -delay 12842 -trace \
|
||||
-knock-knock \n\
|
||||
petri -root -size 2 -count 20 \n\
|
||||
"Petri 2" petri -root -minlifespeed 0.02 \
|
||||
-maxlifespeed 0.03 -minlifespan 1 \
|
||||
-maxlifespan 1 -instantdeathchan 0 \
|
||||
-minorchan 0 -anychan 0.3 \n\
|
||||
shadebobs -root \n\
|
||||
ccurve -root \n\
|
||||
blaster -root \n\
|
||||
bumps -root \n\
|
||||
xteevee -root \n\
|
||||
xanalogtv -root \n\
|
||||
xspirograph -root \n\
|
||||
nerverot -root \n\
|
||||
- "NerveRot (dense)" nerverot -root -count 1000 \n\
|
||||
- "NerveRot (thick)" nerverot -root -count 100 -line-width 4 \
|
||||
-max-nerve-radius 0.8 -nervousness 0.5 \
|
||||
-db \n\
|
||||
xrayswarm -root \n\
|
||||
- "Zoom (Fatbits)" zoom -root \n\
|
||||
"Zoom (Lenses)" zoom -root -lenses \n\
|
||||
rotzoomer -root \n\
|
||||
- "RotZoomer (mobile)" rotzoomer -root -move \n\
|
||||
- "RotZoomer (sweep)" rotzoomer -root -sweep \n\
|
||||
whirlwindwarp -root \n\
|
||||
whirlygig -root \n\
|
||||
speedmine -root \n\
|
||||
"SpeedWorm" speedmine -root -worm \n\
|
||||
vermiculate -root \n\
|
||||
twang -root \n\
|
||||
apollonian -root \n\
|
||||
euler2d -root \n\
|
||||
"Euler2d (dense)" euler2d -root -count 4000 -eulertail 400 \
|
||||
-ncolors 230 \n\
|
||||
- juggle -root \n\
|
||||
polyominoes -root \n\
|
||||
- thornbird -root \n\
|
||||
fluidballs -root \n\
|
||||
anemone -root \n\
|
||||
halftone -root \n\
|
||||
metaballs -root \n\
|
||||
eruption -root \n\
|
||||
popsquares -root \n\
|
||||
barcode -root \n\
|
||||
piecewise -root \n\
|
||||
cloudlife -root \n\
|
||||
fontglide -root -page \n\
|
||||
"FontGlide (scroller)" fontglide -root -scroll \n\
|
||||
apple2 -root \n\
|
||||
bubbles -root \n\
|
||||
pong -root \n\
|
||||
wormhole -root \n\
|
||||
pacman -root \n\
|
||||
fuzzyflakes -root \n\
|
||||
anemotaxis -root \n\
|
||||
memscroller -root \n\
|
||||
substrate -root \n\
|
||||
"Substrate (circles)" substrate -root -circle-percent 33 \n\
|
||||
intermomentary -root \n\
|
||||
interaggregate -root \n\
|
||||
fireworkx -root \n\
|
||||
fiberlamp -root \n\
|
||||
boxfit -root \n\
|
||||
celtic -root \n\
|
||||
- default-n: webcollage -root \n\
|
||||
- default-n: "WebCollage (whacked)" \
|
||||
webcollage -root -filter 'vidwhacker \
|
||||
-stdin -stdout' \n\
|
||||
- default-n: vidwhacker -root \n\
|
||||
- GL: gears -root \n\
|
||||
- GL: "Gears (planetary)" gears -root -planetary \n\
|
||||
- GL: superquadrics -root \n\
|
||||
- GL: morph3d -root \n\
|
||||
- GL: cage -root \n\
|
||||
- GL: moebius -root \n\
|
||||
- GL: stairs -root \n\
|
||||
- GL: pipes -root \n\
|
||||
- GL: sproingies -root \n\
|
||||
- GL: rubik -root \n\
|
||||
- GL: atlantis -root -gradient \n\
|
||||
- GL: lament -root \n\
|
||||
- GL: bubble3d -root \n\
|
||||
- GL: glplanet -root \n\
|
||||
- GL: flurry -root -preset random \n\
|
||||
- GL: pulsar -root \n\
|
||||
- GL: "Pulsar (textures)" pulsar -root -texture -mipmap \
|
||||
-texture_quality -light -fog \n\
|
||||
- GL: extrusion -root \n\
|
||||
- GL: sierpinski3d -root \n\
|
||||
- GL: menger -root \n\
|
||||
- GL: gflux -root \n\
|
||||
- GL: "GFlux (grab)" gflux -root -mode grab \n\
|
||||
- GL: stonerview -root \n\
|
||||
- GL: starwars -root \n\
|
||||
- GL: gltext -root \n\
|
||||
- GL: "GLText (clock)" gltext -text "%A%n%d %b %Y%n%r" -root \n\
|
||||
- GL: molecule -root -shells \n\
|
||||
- GL: dangerball -root \n\
|
||||
- GL: circuit -root \n\
|
||||
- GL: engine -root \n\
|
||||
- GL: flipscreen3d -root \n\
|
||||
- GL: glsnake -root \n\
|
||||
- GL: boxed -root \n\
|
||||
- GL: glforestfire -root \n\
|
||||
- GL: "GLForestFire (rain)" glforestfire -root -count 0 \n\
|
||||
- GL: sballs -root \n\
|
||||
- GL: cubenetic -root \n\
|
||||
- GL: spheremonics -root \n\
|
||||
- GL: lavalite -root \n\
|
||||
- GL: queens -root \n\
|
||||
- GL: endgame -root \n\
|
||||
- GL: glblur -root \n\
|
||||
- GL: atunnel -root \n\
|
||||
- GL: flyingtoasters -root \n\
|
||||
- GL: bouncingcow -root \n\
|
||||
- GL: jigglypuff -root -random \n\
|
||||
- GL: klein -root -random \n\
|
||||
- GL: "HyperTorus (striped)" hypertorus -root \n\
|
||||
- GL: "HyperTorus (solid)" hypertorus -root -solid -transparent \n\
|
||||
- GL: glmatrix -root \n\
|
||||
- GL: cubestorm -root \n\
|
||||
- GL: glknots -root \n\
|
||||
- GL: blocktube -root \n\
|
||||
- GL: flipflop -root \n\
|
||||
- GL: antspotlight -root \n\
|
||||
- GL: glslideshow -root \n\
|
||||
- GL: polytopes -root \n\
|
||||
- GL: gleidescope -root \n\
|
||||
- GL: mirrorblob -root \n\
|
||||
- GL: "MirrorBlob (color only)" mirrorblob -root -colour -no-texture \n\
|
||||
- GL: blinkbox -root \n\
|
||||
- GL: noof -root \n\
|
||||
- GL: polyhedra -root \n\
|
||||
- GL: antinspect -root \n\
|
||||
- GL: providence -root \n\
|
||||
- GL: "Pinion (large gears)" pinion -root \n\
|
||||
- GL: "Pinion (small gears)" pinion -root -size 0.2 -scroll 0.3 \n\
|
||||
- GL: boing -root -lighting -smooth \n\
|
||||
- GL: carousel -root \n\
|
||||
- GL: fliptext -root \n\
|
||||
- GL: antmaze -root \n\
|
||||
- GL: tangram -root \n\
|
||||
- GL: crackberg -root -flat -lit -crack -color \
|
||||
random \n\
|
||||
- GL: glhanoi -root \n\
|
||||
- GL: cube21 -root -colormode six \n\
|
||||
- GL: timetunnel -root \n\
|
||||
- GL: juggler3d -root \n\
|
||||
- xdaliclock -root -builtin3 -cycle \n\
|
||||
- default-n: xearth -nofork -nostars -ncolors 50 \
|
||||
-night 3 -wait 0 -timewarp 400.0 -pos \
|
||||
sunrel/38/-30 \n\
|
||||
- xplanet -vroot -wait 1 -timewarp 90000 \
|
||||
-label -origin moon \n\
|
||||
- xmountains -b -M -Z 0 -r 1 \n\
|
||||
- "XMountains (top)" xmountains -b -M -Z 0 -r 1 -m \n\
|
||||
- xaos -root -autopilot -nogui -delay 10000 \
|
||||
-maxframerate 30 -incoloring -1 \
|
||||
-outcoloring -1 \n\
|
||||
- xfishtank -d -s \n\
|
||||
- xsnow \n\
|
||||
- goban -root \n\
|
||||
- electricsheep \n\
|
||||
- cosmos -root \n\
|
||||
- GL: sphereEversion --root \n\
|
||||
- GL: fireflies -root \n\
|
||||
|
||||
|
||||
pointerPollTime: 0:00:05
|
||||
pointerHysteresis: 10
|
||||
windowCreationTimeout:0:00:30
|
||||
initialDelay: 0:00:00
|
||||
sgiSaverExtension: True
|
||||
xidleExtension: True
|
||||
GetViewPortIsFullOfLies:False
|
||||
procInterrupts: True
|
||||
overlayStderr: True
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
SUBSYSTEM=="3dfx", KERNEL=="3dfx", NAME="3dfx", MODE="0666"
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
MODE="${1:-}"
|
||||
|
||||
case "$MODE" in
|
||||
640x480|800x600|1024x768) ;;
|
||||
*)
|
||||
echo "Usage: $0 {640x480|800x600|1024x768}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$MODE" > "$HOME/.resolution.config"
|
||||
|
||||
if xmessage -center -buttons Yes:0,No:1 \
|
||||
"Changed resolution to $MODE.
|
||||
Should we restart X now ?"; then
|
||||
echo "$MODE" > "$HOME/.resolution.config"
|
||||
killall fluxbox
|
||||
fi
|
||||
@@ -1,26 +0,0 @@
|
||||
[submenu] (RetroDebian) </usr/share/icons/gnome/24x24/apps/gnome-favorites.png>
|
||||
[exec] (Terminal) {urxvt} </usr/share/icons/gnome/24x24/apps/gnome-terminal.png>
|
||||
[exec] (Terminal (root\)) {gksu urxvt} </usr/share/icons/gnome/24x24/apps/gnome-terminal.png>
|
||||
[exec] (Files) {pcmanfm} </usr/share/icons/gnome/32x32/apps/file-manager.png>
|
||||
[exec] (Text Editor) {leafpad} </usr/share/icons/gnome/24x24/apps/text-editor.png>
|
||||
[exec] (Task Manager) {urxvt -e htop} </usr/share/icons/gnome/24x24/apps/gnome-monitor.png>
|
||||
[exec] (Samba Mount) {LinNeighborhood} </usr/share/icons/LinNeighborhood.xpm>
|
||||
[exec] (Archives) {xarchiver} </usr/share/icons/xarchiver.png>
|
||||
[separator]
|
||||
[exec] (xeji) {xeji} </usr/share/icons/gnome/48x48/apps/eyes.png>
|
||||
[separator]
|
||||
[submenu] (Resolution) </usr/share/icons/gnome/24x24/apps/gnome-monitor.png>
|
||||
[exec] (640x480) {/opt/retrodebian/bin/set-resolution 640x480}
|
||||
[exec] (800x600) {/opt/retrodebian/bin/set-resolution 800x600}
|
||||
[exec] (1024x768) {/opt/retrodebian/bin/set-resolution 1024x768}
|
||||
[end]
|
||||
[submenu] (Games) </usr/share/icons/gnome/24x24/apps/gnome-joystick.png>
|
||||
[exec] (ut99) {/usr/local/games/ut99/ut} </usr/share/icons/ut99.png>
|
||||
[end]
|
||||
[submenu] (Tools) </usr/share/icons/gnome/24x24/apps/gnome-control-center.png>
|
||||
[end]
|
||||
[submenu] (Diags) </usr/share/icons/gnome/24x24/apps/gnome-cpu.png>
|
||||
[exec] (v2-tmu-memtester) {urxvt -e sh -c '/usr/local/bin/v2-tmu-memtester --help; exec bash'}
|
||||
[end]
|
||||
[end]
|
||||
[separator]
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SRC="/etc/X11/fluxbox/fluxbox-menu"
|
||||
DST_DIR="/var/run/retrodebian"
|
||||
DST="$DST_DIR/final-fluxbox-menu"
|
||||
TEMPLATE="/opt/retrodebian/fluxbox/retrodebian-menu.section"
|
||||
|
||||
mkdir -p "$DST_DIR"
|
||||
|
||||
TMP="$DST.tmp"
|
||||
|
||||
logger -t "fluxbox/update-menu.sh" "Regenerating menus..."
|
||||
|
||||
sed \
|
||||
-e '/(Eterm/d' \
|
||||
-e '/(Rxvt-Unicode (Black/d' \
|
||||
-e '/(XTerm/d' \
|
||||
"$SRC" > "$TMP.base"
|
||||
|
||||
if [ -f "$TEMPLATE" ]; then
|
||||
awk -v template="$TEMPLATE" '
|
||||
BEGIN { inserted = 0 }
|
||||
{
|
||||
print
|
||||
if (!inserted && $0 ~ /^\[begin\] /) {
|
||||
while ((getline line < template) > 0) {
|
||||
print line
|
||||
}
|
||||
close(template)
|
||||
inserted = 1
|
||||
}
|
||||
}
|
||||
' "$TMP.base" > "$TMP"
|
||||
else
|
||||
mv "$TMP.base" "$TMP"
|
||||
fi
|
||||
|
||||
rm -f "$TMP.base"
|
||||
mv "$TMP" "$DST"
|
||||
|
||||
fluxbox-remote reconfigure >/dev/null 2>&1 || true
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
SRC="/etc/X11/fluxbox/fluxbox-menu"
|
||||
UPD_SCRIPT="/opt/retrodebian/fluxbox/update-menu.sh"
|
||||
|
||||
# initial generate
|
||||
"$UPD_SCRIPT"
|
||||
|
||||
inotifywait -m -e modify -e move_self -e close_write "$SRC" 2>/dev/null |
|
||||
while read dummy; do
|
||||
"$UPD_SCRIPT"
|
||||
done
|
||||
@@ -1,128 +0,0 @@
|
||||
#!/bin/bash
|
||||
# autoconfig.sh
|
||||
# search and map pci gpu deviced to xorg modules
|
||||
|
||||
set -eu
|
||||
|
||||
DEST_XORG_CONF="$1"
|
||||
|
||||
[ -n "$DEST_XORG_CONF" ] || exit 2
|
||||
|
||||
pci_line="$(lspci -nnm | grep -F '[0300]' | head -1)" || exit 1
|
||||
PCI_ADDR="$(echo "$pci_line" | awk '{print $1}')"
|
||||
|
||||
pci_line_raw="$(lspci -nm -s "$PCI_ADDR" | head -1)" || exit 1
|
||||
|
||||
PCI_VENDOR_ID="$(echo "$pci_line_raw" | awk -F'"' '{print $4}')"
|
||||
PCI_DEVICE_ID="$(echo "$pci_line_raw" | awk -F'"' '{print $6}')"
|
||||
|
||||
RAW_BUS="$(echo "$pci_line_raw" | awk '{print $1}')"
|
||||
|
||||
case "$RAW_BUS" in
|
||||
*:*:*.*)
|
||||
PCI_DOMAIN="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $1}')"
|
||||
PCI_BUS="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $2}')"
|
||||
PCI_DEV="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $3}')"
|
||||
PCI_FUNC="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $4}')"
|
||||
;;
|
||||
*:*.*)
|
||||
PCI_DOMAIN="0000"
|
||||
PCI_BUS="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $1}')"
|
||||
PCI_DEV="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $2}')"
|
||||
PCI_FUNC="$(echo "$RAW_BUS" | awk -F'[:.]' '{print $3}')"
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: invalid PCI address format: $RAW_BUS" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$PCI_DOMAIN" = "0000" ]; then
|
||||
XORG_BUSID="PCI:$((16#$PCI_BUS)):$((16#$PCI_DEV)):$PCI_FUNC"
|
||||
else
|
||||
XORG_BUSID=""
|
||||
echo "WARNING: non-zero PCI domain detected, skipping BusID on old Xorg"
|
||||
fi
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "GPU detected !"
|
||||
logger -t retrodebian-xorg-autoconfig " Line : $pci_line"
|
||||
logger -t retrodebian-xorg-autoconfig " Address : $PCI_ADDR"
|
||||
logger -t retrodebian-xorg-autoconfig " Vendor : $PCI_VENDOR_ID"
|
||||
logger -t retrodebian-xorg-autoconfig " Device : $PCI_DEVICE_ID"
|
||||
logger -t retrodebian-xorg-autoconfig " RawBus : $RAW_BUS"
|
||||
logger -t retrodebian-xorg-autoconfig " Domain : $PCI_DOMAIN"
|
||||
logger -t retrodebian-xorg-autoconfig " Bus : $PCI_BUS"
|
||||
logger -t retrodebian-xorg-autoconfig " Dev : $PCI_DEV"
|
||||
logger -t retrodebian-xorg-autoconfig " Func : $PCI_FUNC"
|
||||
logger -t retrodebian-xorg-autoconfig " XorgBusID : $XORG_BUSID"
|
||||
|
||||
|
||||
|
||||
|
||||
ROOT_DIR="/opt/retrodebian/xorg"
|
||||
XORG_FILE_BASENAME="xorg.conf"
|
||||
TEMPLATE_XORG_FILE="${XORG_FILE_BASENAME}.template"
|
||||
TMP_XORG_FILE_PATH="$(mktemp)"
|
||||
|
||||
cp "${ROOT_DIR}/${TEMPLATE_XORG_FILE}" "${TMP_XORG_FILE_PATH}"
|
||||
|
||||
MATCHED=0
|
||||
|
||||
for module in "${ROOT_DIR}/video-detect.d/"*.sh; do
|
||||
[ -f "$module" ] || continue
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Trying module: $module"
|
||||
|
||||
if PCI_ADDR="$PCI_ADDR" \
|
||||
PCI_VENDOR_ID="$PCI_VENDOR_ID" \
|
||||
PCI_DEVICE_ID="$PCI_DEVICE_ID" \
|
||||
XORG_BUSID="$XORG_BUSID" \
|
||||
"$module" "${TMP_XORG_FILE_PATH}"
|
||||
then
|
||||
logger -t retrodebian-xorg-autoconfig "Matched module: $module"
|
||||
MATCHED=1
|
||||
break
|
||||
else
|
||||
rc=$?
|
||||
if [ "$rc" -ne 1 ]; then
|
||||
logger -p daemon.err -t retrodebian-xorg-autoconfig "ERROR: module failed: $module"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$XORG_BUSID" ]; then
|
||||
sed -i -e "s|{DeviceBusID}|$XORG_BUSID|g" "${TMP_XORG_FILE_PATH}" || exit 2
|
||||
else
|
||||
sed -i \
|
||||
-e '/^[[:space:]]*BusID[[:space:]]*"{DeviceBusID}"[[:space:]]*$/d' \
|
||||
"${TMP_XORG_FILE_PATH}" || exit 2
|
||||
fi
|
||||
|
||||
[ "$MATCHED" -eq 1 ] || exit 2
|
||||
|
||||
MATCHED=0
|
||||
|
||||
for module in "${ROOT_DIR}/mouse-detect.d/"*.sh; do
|
||||
[ -f "$module" ] || continue
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Trying module: $module"
|
||||
|
||||
if "$module" "${TMP_XORG_FILE_PATH}"
|
||||
then
|
||||
logger -t retrodebian-xorg-autoconfig "Matched module: $module"
|
||||
MATCHED=1
|
||||
break
|
||||
else
|
||||
rc=$?
|
||||
if [ "$rc" -ne 1 ]; then
|
||||
logger -p daemon.err -t retrodebian-xorg-autoconfig "ERROR: module failed: $module"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
[ "$MATCHED" -eq 1 ] || exit 2
|
||||
|
||||
cp -f "${TMP_XORG_FILE_PATH}" "$DEST_XORG_CONF"
|
||||
rm -f "${TMP_XORG_FILE_PATH}"
|
||||
|
||||
exit 0
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 01000-mouse-qemu-tablet.sh
|
||||
# Prefer QEMU USB Tablet when present
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
[ -r /proc/bus/input/devices ] || exit 1
|
||||
|
||||
EVENT_DEV="$(awk '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
$0 ~ /QEMU USB Tablet/ {
|
||||
for (i = 1; i <= NF; i++) {
|
||||
if ($i ~ /^H: Handlers=/ && match($i, /event[0-9]+/)) {
|
||||
print "/dev/input/" substr($i, RSTART, RLENGTH)
|
||||
exit
|
||||
}
|
||||
}
|
||||
}' /proc/bus/input/devices)"
|
||||
|
||||
[ -n "$EVENT_DEV" ] || exit 1
|
||||
[ -e "$EVENT_DEV" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring QEMU tablet mouse: $EVENT_DEV"
|
||||
|
||||
sed -i \
|
||||
-e "s|{InputDeviceDriver}|evdev|g" \
|
||||
-e "s|{InputDeviceDevice}|$EVENT_DEV|g" \
|
||||
-e "s|{InputDeviceProtocol}|auto|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 02000-mouse-wacom.sh
|
||||
# Prefer wacom for explicit Wacom devices
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
[ -r /proc/bus/input/devices ] || exit 1
|
||||
|
||||
EVENT_DEV="$(awk '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
$0 ~ /Wacom/ {
|
||||
for (i = 1; i <= NF; i++) {
|
||||
if ($i ~ /^H: Handlers=/ && match($i, /event[0-9]+/)) {
|
||||
print "/dev/input/" substr($i, RSTART, RLENGTH)
|
||||
exit
|
||||
}
|
||||
}
|
||||
}' /proc/bus/input/devices)"
|
||||
|
||||
[ -n "$EVENT_DEV" ] || exit 1
|
||||
[ -e "$EVENT_DEV" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Wacom pointer: $EVENT_DEV"
|
||||
|
||||
sed -i \
|
||||
-e "s|{InputDeviceDriver}|wacom|g" \
|
||||
-e "s|{InputDeviceDevice}|$EVENT_DEV|g" \
|
||||
-e "s|{InputDeviceProtocol}|auto|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 03000-mouse-synaptics.sh
|
||||
# Prefer synaptics for obvious touchpads
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
[ -r /proc/bus/input/devices ] || exit 1
|
||||
|
||||
EVENT_DEV="$(awk '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
$0 ~ /SynPS\/2/ || $0 ~ /TouchPad/ || $0 ~ /Touchpad/ || $0 ~ /ALPS/ || $0 ~ /Synaptics/ {
|
||||
for (i = 1; i <= NF; i++) {
|
||||
if ($i ~ /^H: Handlers=/ && match($i, /event[0-9]+/)) {
|
||||
print "/dev/input/" substr($i, RSTART, RLENGTH)
|
||||
exit
|
||||
}
|
||||
}
|
||||
}' /proc/bus/input/devices)"
|
||||
|
||||
[ -n "$EVENT_DEV" ] || exit 1
|
||||
[ -e "$EVENT_DEV" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Synaptics touchpad: $EVENT_DEV"
|
||||
|
||||
sed -i \
|
||||
-e "s|{InputDeviceDriver}|synaptics|g" \
|
||||
-e "s|{InputDeviceDevice}|$EVENT_DEV|g" \
|
||||
-e "s|{InputDeviceProtocol}|auto-dev|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 09900-mouse-proc-handler.sh
|
||||
# prefer a direct /dev/input/mouseN handler over /dev/input/mice
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
[ -r /proc/bus/input/devices ] || exit 1
|
||||
|
||||
MOUSE_DEV="$(awk '
|
||||
BEGIN { RS=""; FS="\n" }
|
||||
{
|
||||
for (i = 1; i <= NF; i++) {
|
||||
if ($i ~ /^H: Handlers=/ && match($i, /mouse[0-9]+/)) {
|
||||
print "/dev/input/" substr($i, RSTART, RLENGTH)
|
||||
exit
|
||||
}
|
||||
}
|
||||
}' /proc/bus/input/devices)"
|
||||
|
||||
[ -n "$MOUSE_DEV" ] || exit 1
|
||||
[ -e "$MOUSE_DEV" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring direct mouse handler fallback: $MOUSE_DEV"
|
||||
|
||||
sed -i \
|
||||
-e "s|{InputDeviceDriver}|mouse|g" \
|
||||
-e "s|{InputDeviceDevice}|$MOUSE_DEV|g" \
|
||||
-e "s|{InputDeviceProtocol}|ImPS/2|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 99999-mouse-fallback.sh
|
||||
# ultimate fallback
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring ultimate Mouse fallback"
|
||||
|
||||
sed -i \
|
||||
-e "s|{InputDeviceDriver}|mouse|g" \
|
||||
-e "s|{InputDeviceDevice}|/dev/input/mice|g" \
|
||||
-e "s|{InputDeviceProtocol}|auto|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 01000-i810.sh
|
||||
# Intel i810/i815/830M/845G/852GM/855GM/865G family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "8086" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
7121|7123|7125|1132|3577|3582|358e|2562|2572)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Intel i810-family for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|i810|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 01050-i740.sh
|
||||
# Intel i740
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "8086" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
7800)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Intel i740 for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|i740|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 1100-3dfx-banshee-voodoo345.sh
|
||||
# match 3dfx cards supported by Xorg tdfx driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "121a" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
0003|0004|0005|0009)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring 3dfx tdfx for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|tdfx|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 2000-nvidia-generic.sh
|
||||
# match old NVIDIA cards supported by Xorg nv driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "10de" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring NVIDIA nv for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|nv|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 3000-ati-generic.sh
|
||||
# match ATI cards through Xorg ati wrapper
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1002" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring ATI ati for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|ati|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 4000-s3-trio.sh
|
||||
# match S3 Trio family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
8810|8811|8812|8813|8814)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring S3 Trio s3 for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|s3|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 4100-s3-virge.sh
|
||||
# match S3 ViRGE family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
5631|883d|8a01)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring S3 ViRGE s3virge for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|s3virge|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 5000-sis-generic.sh
|
||||
# match common SiS families supported by Xorg sis driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1039" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
0200|0300|0310|0325|0330|6306|6325|6326)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring SiS sis for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|sis|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 6000-matrox-generic.sh
|
||||
# match Matrox cards through Xorg mga driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "102b" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Matrox mga for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|mga|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 7000-s3-savage-generic.sh
|
||||
# match S3 Savage family through Xorg savage driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
8a20|8a21|8a22|8a23|8c10|8c11|8c12|8c13|9102|9104|9105|9106|9107|9110|9111|9112|9113|9120|9121|9122|9123|8d01|8d02|8d03|8d04)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring S3 Savage savage for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|savage|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 8000-via-generic.sh
|
||||
# match VIA integrated graphics through Xorg via driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1106" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring VIA via for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|via|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 9000-rendition-generic.sh
|
||||
# match Rendition cards
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1163" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Rendition rendition for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|rendition|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# 09050-trident-generic.sh
|
||||
# Trident generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1023" ] || exit 1
|
||||
|
||||
logger -t retrodebian-xorg-autoconfig "Configuring Trident trident for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|trident|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user