Skip to content

Commit 4da6239

Browse files
committed
make wayland default
1 parent bd92627 commit 4da6239

File tree

5 files changed

+98
-92
lines changed

5 files changed

+98
-92
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thelamer"
1111

1212
# title
13-
ENV TITLE=Wireshark
13+
ENV TITLE=Wireshark \
14+
NO_GAMEPAD=true \
15+
PIXELFLUX_WAYLAND=true
1416

1517
RUN \
1618
echo "**** add icon ****" && \

Dockerfile.aarch64

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
1010
LABEL maintainer="thelamer"
1111

1212
# title
13-
ENV TITLE=Wireshark
13+
ENV TITLE=Wireshark \
14+
NO_GAMEPAD=true \
15+
PIXELFLUX_WAYLAND=true
1416

1517
RUN \
1618
echo "**** add icon ****" && \

Jenkinsfile

Lines changed: 85 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pipeline {
7878
'''
7979
script{
8080
env.EXIT_STATUS = ''
81+
env.CI_TEST_ATTEMPTED = ''
8182
env.LS_RELEASE = sh(
8283
script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:latest 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
8384
returnStdout: true).trim()
@@ -875,6 +876,7 @@ pipeline {
875876
script{
876877
env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
877878
env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json'
879+
env.CI_TEST_ATTEMPTED = 'true'
878880
}
879881
sh '''#! /bin/bash
880882
set -e
@@ -1077,98 +1079,13 @@ EOF
10771079
) '''
10781080
}
10791081
}
1080-
// If this is a Pull request send the CI link as a comment on it
1081-
stage('Pull Request Comment') {
1082-
when {
1083-
not {environment name: 'CHANGE_ID', value: ''}
1084-
environment name: 'EXIT_STATUS', value: ''
1085-
}
1086-
steps {
1087-
sh '''#! /bin/bash
1088-
# Function to retrieve JSON data from URL
1089-
get_json() {
1090-
local url="$1"
1091-
local response=$(curl -s "$url")
1092-
if [ $? -ne 0 ]; then
1093-
echo "Failed to retrieve JSON data from $url"
1094-
return 1
1095-
fi
1096-
local json=$(echo "$response" | jq .)
1097-
if [ $? -ne 0 ]; then
1098-
echo "Failed to parse JSON data from $url"
1099-
return 1
1100-
fi
1101-
echo "$json"
1102-
}
1103-
1104-
build_table() {
1105-
local data="$1"
1106-
1107-
# Get the keys in the JSON data
1108-
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1109-
1110-
# Check if keys are empty
1111-
if [ -z "$keys" ]; then
1112-
echo "JSON report data does not contain any keys or the report does not exist."
1113-
return 1
1114-
fi
1115-
1116-
# Build table header
1117-
local header="| Tag | Passed |\\n| --- | --- |\\n"
1118-
1119-
# Loop through the JSON data to build the table rows
1120-
local rows=""
1121-
for build in $keys; do
1122-
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1123-
if [ "$status" = "true" ]; then
1124-
status="✅"
1125-
else
1126-
status="❌"
1127-
fi
1128-
local row="| "$build" | "$status" |\\n"
1129-
rows="${rows}${row}"
1130-
done
1131-
1132-
local table="${header}${rows}"
1133-
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1134-
echo "$escaped_table"
1135-
}
1136-
1137-
if [[ "${CI}" = "true" ]]; then
1138-
# Retrieve JSON data from URL
1139-
data=$(get_json "$CI_JSON_URL")
1140-
# Create table from JSON data
1141-
table=$(build_table "$data")
1142-
echo -e "$table"
1143-
1144-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1145-
-H "Accept: application/vnd.github.v3+json" \
1146-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1147-
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1148-
else
1149-
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1150-
-H "Accept: application/vnd.github.v3+json" \
1151-
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1152-
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1153-
fi
1154-
'''
1155-
1156-
}
1157-
}
11581082
}
11591083
/* ######################
1160-
Send status to Discord
1084+
Comment on PR and Send status to Discord
11611085
###################### */
11621086
post {
11631087
always {
1164-
sh '''#!/bin/bash
1165-
rm -rf /config/.ssh/id_sign
1166-
rm -rf /config/.ssh/id_sign.pub
1167-
git config --global --unset gpg.format
1168-
git config --global --unset user.signingkey
1169-
git config --global --unset commit.gpgsign
1170-
'''
1171-
script{
1088+
script {
11721089
env.JOB_DATE = sh(
11731090
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
11741091
returnStdout: true).trim()
@@ -1211,6 +1128,87 @@ EOF
12111128
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
12121129
}
12131130
}
1131+
script {
1132+
if (env.GITHUBIMAGE =~ /lspipepr/){
1133+
if (env.CI_TEST_ATTEMPTED == "true"){
1134+
sh '''#! /bin/bash
1135+
# Function to retrieve JSON data from URL
1136+
get_json() {
1137+
local url="$1"
1138+
local response=$(curl -s "$url")
1139+
if [ $? -ne 0 ]; then
1140+
echo "Failed to retrieve JSON data from $url"
1141+
return 1
1142+
fi
1143+
local json=$(echo "$response" | jq .)
1144+
if [ $? -ne 0 ]; then
1145+
echo "Failed to parse JSON data from $url"
1146+
return 1
1147+
fi
1148+
echo "$json"
1149+
}
1150+
1151+
build_table() {
1152+
local data="$1"
1153+
1154+
# Get the keys in the JSON data
1155+
local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]')
1156+
1157+
# Check if keys are empty
1158+
if [ -z "$keys" ]; then
1159+
echo "JSON report data does not contain any keys or the report does not exist."
1160+
return 1
1161+
fi
1162+
1163+
# Build table header
1164+
local header="| Tag | Passed |\\n| --- | --- |\\n"
1165+
1166+
# Loop through the JSON data to build the table rows
1167+
local rows=""
1168+
for build in $keys; do
1169+
local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success")
1170+
if [ "$status" = "true" ]; then
1171+
status="✅"
1172+
else
1173+
status="❌"
1174+
fi
1175+
local row="| "$build" | "$status" |\\n"
1176+
rows="${rows}${row}"
1177+
done
1178+
1179+
local table="${header}${rows}"
1180+
local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g')
1181+
echo "$escaped_table"
1182+
}
1183+
1184+
if [[ "${CI}" = "true" ]]; then
1185+
# Retrieve JSON data from URL
1186+
data=$(get_json "$CI_JSON_URL")
1187+
# Create table from JSON data
1188+
table=$(build_table "$data")
1189+
echo -e "$table"
1190+
1191+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1192+
-H "Accept: application/vnd.github.v3+json" \
1193+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1194+
-d "{\\"body\\": \\"I am a bot, here are the test results for this PR: \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}"
1195+
else
1196+
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
1197+
-H "Accept: application/vnd.github.v3+json" \
1198+
"https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \
1199+
-d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR: \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}"
1200+
fi
1201+
'''
1202+
}
1203+
}
1204+
}
1205+
sh '''#!/bin/bash
1206+
rm -rf /config/.ssh/id_sign
1207+
rm -rf /config/.ssh/id_sign.pub
1208+
git config --global --unset gpg.format
1209+
git config --global --unset user.signingkey
1210+
git config --global --unset commit.gpgsign
1211+
'''
12141212
}
12151213
cleanup {
12161214
sh '''#! /bin/bash

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ To use hardware acceleration in Wayland mode, we distinguish between the card us
106106
* `DRINODE`: The path to the GPU used for **Rendering** (EGL).
107107
* `DRI_NODE`: The path to the GPU used for **Encoding** (VAAPI/NVENC).
108108

109-
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency.
109+
If both variables point to the same device, the container will automatically enable **Zero Copy** encoding, significantly reducing CPU usage and latency. If they are set to different devices one will be used for **Rendering** and one for **Encoding** with a cpu readback.
110+
111+
You can also use the environment variable `AUTO_GPU=true`, with this set the first card detected in the container (IE `/dev/dri/renderD128`) will be used and configured for **Zero Copy**.
110112

111113
##### Intel & AMD (Open Source Drivers)
112114

@@ -121,8 +123,6 @@ For Intel and AMD GPUs.
121123
- DRINODE=/dev/dri/renderD128
122124
- DRI_NODE=/dev/dri/renderD128
123125
```
124-
125-
126126
### SealSkin Compatibility
127127
128128
This container is compatible with [SealSkin](https://sealskin.app).
@@ -143,12 +143,14 @@ This container is based on [Docker Baseimage Selkies](https://github.com/linuxse
143143
| Variable | Description |
144144
| :----: | --- |
145145
| PIXELFLUX_WAYLAND | **Experimental** If set to true the container will initialize in Wayland mode running [Smithay](https://github.com/Smithay/smithay) and Labwc while enabling zero copy encoding with a GPU |
146+
| SELKIES_DESKTOP | If set to true and in Wayland mode, a simple panel will be initialized with labwc |
146147
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default `3000` |
147148
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default `3001` |
148149
| CUSTOM_WS_PORT | Internal port the container listens on for websockets if it needs to be swapped from the default 8082 |
149150
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
150151
| DRI_NODE | **Encoding GPU**: Enable VAAPI/NVENC stream encoding and use the specified device IE `/dev/dri/renderD128` |
151152
| DRINODE | **Rendering GPU**: Specify which GPU to use for EGL/3D acceleration IE `/dev/dri/renderD129` |
153+
| AUTO_GPU | If set to true and in Wayland mode, we will automatically use the first GPU available for encoding and rendering IE `/dev/dri/renderD128` |
152154
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
153155
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
154156
| TITLE | The page title displayed on the web browser, default "Selkies" |
@@ -589,6 +591,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
589591

590592
## Versions
591593

594+
* **04.04.26:** - Make Wayland default disable with PIXELFLUX_WAYLAND=false.
592595
* **28.12.25:** - Add Wayland init logic, rebase to Alpine 3.23.
593596
* **12.07.25:** - Rebase to Selkies and Alpine 3.22, HTTPS IS NOW REQUIRED.
594597
* **06.12.24:** - Rebase to Alpine 3.21.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ init_diagram: |
110110
"wireshark:latest" <- Base Images
111111
# changelog
112112
changelogs:
113+
- {date: "04.04.26:", desc: "Make Wayland default disable with PIXELFLUX_WAYLAND=false."}
113114
- {date: "28.12.25:", desc: "Add Wayland init logic, rebase to Alpine 3.23."}
114115
- {date: "12.07.25:", desc: "Rebase to Selkies and Alpine 3.22, HTTPS IS NOW REQUIRED."}
115116
- {date: "06.12.24:", desc: "Rebase to Alpine 3.21."}

0 commit comments

Comments
 (0)