Skip to content

Commit 0ef00a6

Browse files
authored
Merge branch 'pterodactyl:develop' into develop
2 parents 7bd6068 + 3b968bb commit 0ef00a6

12 files changed

Lines changed: 112 additions & 41 deletions

File tree

.github/workflows/codeql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
security-events: write
2727
steps:
2828
- name: Code checkout
29-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3030

3131
- name: Initialize CodeQL
3232
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v3.29.5

.github/workflows/docker.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
packages: write
2020
steps:
2121
- name: Code checkout
22-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2323

2424
- name: Docker metadata
2525
id: docker_meta
26-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
26+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
2727
with:
2828
images: ghcr.io/${{ github.repository }}
2929
flavor: |
@@ -34,10 +34,10 @@ jobs:
3434
type=ref,event=branch
3535
3636
- name: Setup QEMU
37-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
37+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
3838

3939
- name: Setup Docker buildx
40-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
40+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4141

4242
- name: Login to GitHub Container Registry
4343
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -49,8 +49,8 @@ jobs:
4949
- name: Get Build Information
5050
id: build_info
5151
run: |
52-
echo "version_tag=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_OUTPUT
53-
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
52+
echo "version_tag=${GITHUB_REF/refs\/tags\/v/}" >> "$GITHUB_OUTPUT"
53+
echo "short_sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
5454
5555
- name: Build and Push (tag)
5656
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0

.github/workflows/push.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-24.04]
19-
go: ["1.24.1"]
19+
go: ["1.24.11", "1.25.5"]
2020
goos: [linux]
2121
goarch: [amd64, arm64]
2222
permissions:
2323
contents: read
2424
steps:
2525
- name: Code checkout
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727

2828
- name: Setup Go
29-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
29+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3030
with:
3131
go-version: ${{ matrix.go }}
3232

@@ -62,15 +62,15 @@ jobs:
6262
go test -race $(go list ./...)
6363
6464
- name: Upload Release Artifact
65-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
66-
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.23.7' }}
65+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
66+
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.24.11' }}
6767
with:
6868
name: wings_linux_${{ matrix.goarch }}
6969
path: dist/wings
7070

7171
- name: Upload Debug Artifact
72-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
73-
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.23.7' }}
72+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
73+
if: ${{ (github.ref == 'refs/heads/develop' || github.event_name == 'pull_request') && matrix.go == '1.24.11' }}
7474
with:
7575
name: wings_linux_${{ matrix.goarch }}_debug
7676
path: dist/wings_debug

.github/workflows/release.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ on:
66
jobs:
77
release:
88
name: Release
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-24.04
1010
permissions:
1111
contents: write
1212
steps:
13-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
13+
- name: Code checkout
14+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
15+
16+
- name: Setup Go
17+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
1518
with:
16-
go-version: "1.24.1"
19+
go-version: 1.24.11
20+
1721
- name: Build release binaries
1822
env:
1923
CGO_ENABLED: 0
@@ -22,6 +26,7 @@ jobs:
2226
chmod 755 dist/wings_linux_amd64
2327
GOARCH=arm64 go build -o dist/wings_linux_arm64 -v -trimpath -ldflags="-s -w -X github.com/pterodactyl/wings/system.Version=${{ github.ref_name }}" github.com/pterodactyl/wings
2428
chmod 755 dist/wings_linux_arm64
29+
2530
- name: Create release branch
2631
env:
2732
VERSION: ${{ github.ref_name }}
@@ -35,9 +40,11 @@ jobs:
3540
git add system/const.go
3641
git commit -m "ci(release): bump version"
3742
git push
43+
3844
- name: write changelog
3945
run: |
4046
sed -n "/^## ${{ github.ref_name }}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
47+
4148
- uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
4249
env:
4350
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v1.12.1
4+
### Added
5+
* Add mount for /etc/machine-id for servers for Hytale ([#292](https://github.com/pterodactyl/wings/pull/292))
6+
37
## v1.12.0
48
### Fixed
59
* [CVE-2025-68954](https://github.com/pterodactyl/panel/security/advisories/GHSA-8c39-xppg-479c)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1 (Build)
2-
FROM golang:1.24.1-alpine AS builder
2+
FROM golang:1.24.11-alpine AS builder
33

44
ARG VERSION
55
RUN apk add --update --no-cache git make mailcap

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
197197
for _, serv := range manager.All() {
198198
s := serv
199199

200-
// For each server we encounter make sure the root data directory exists.
201-
if err := s.EnsureDataDirectoryExists(); err != nil {
202-
s.Log().Error("could not create root data directory for server: not loading server...")
200+
// For each server ensure the minimal environment is configured for the server.
201+
if err := s.CreateEnvironment(); err != nil {
202+
s.Log().Error("could create base environment for server...")
203203
continue
204204
}
205205

config/config.go

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ type SystemConfiguration struct {
177177
Passwd struct {
178178
// Enable controls whether generated passwd files should be mounted into containers.
179179
//
180-
// By default this option is disabled and Wings will not mount any additional passwd
181-
// files into containers.
180+
// By default this option is disabled and Wings will not mount any
181+
// additional passwd files into containers.
182182
Enable bool `yaml:"enabled" default:"false"`
183183

184-
// Directory is the directory on disk where the generated files will be stored.
184+
// Directory is the directory on disk where the generated passwd files will be stored.
185185
// This directory may be temporary as it will be re-created whenever Wings is started.
186186
//
187187
// This path **WILL** be both written to by Wings and mounted into containers created by
@@ -192,6 +192,26 @@ type SystemConfiguration struct {
192192
Directory string `yaml:"directory" default:"/run/wings/etc"`
193193
} `yaml:"passwd"`
194194

195+
// MachineID controls the mounting of a generated `/etc/machine-id` file into containers started by Wings.
196+
MachineID struct {
197+
// Enable controls whether a generated machine-id file should be mounted
198+
// into containers.
199+
//
200+
// By default this option is enabled and Wings will mount an additional
201+
// machine-id file into containers.
202+
Enable bool `yaml:"enabled" default:"true"`
203+
204+
// Directory is the directory on disk where the generated machine-id files will be stored.
205+
// This directory may be temporary as it will be re-created whenever Wings is started.
206+
//
207+
// This path **WILL** be both written to by Wings and mounted into containers created by
208+
// Wings. If you are running Wings itself in a container, this path will need to be mounted
209+
// into the Wings container as the exact path on the host, which should match the value
210+
// specified here. If you are using SELinux, you will need to make sure this file has the
211+
// correct SELinux context in order for containers to use it.
212+
Directory string `yaml:"directory" default:"/run/wings/machine-id"`
213+
} `yaml:"machine_id"`
214+
195215
// The amount of time in seconds that can elapse before a server's disk space calculation is
196216
// considered stale and a re-check should occur. DANGER: setting this value too low can seriously
197217
// impact system performance and cause massive I/O bottlenecks and high CPU usage for the Wings
@@ -634,6 +654,11 @@ func ConfigureDirectories() error {
634654
return err
635655
}
636656

657+
log.WithField("path", _config.System.TmpDirectory).Debug("ensuring temporary data directory exists")
658+
if err := os.MkdirAll(_config.System.TmpDirectory, 0o700); err != nil {
659+
return err
660+
}
661+
637662
log.WithField("path", _config.System.ArchiveDirectory).Debug("ensuring archive data directory exists")
638663
if err := os.MkdirAll(_config.System.ArchiveDirectory, 0o700); err != nil {
639664
return err
@@ -651,6 +676,13 @@ func ConfigureDirectories() error {
651676
}
652677
}
653678

679+
if _config.System.MachineID.Enable {
680+
log.WithField("path", _config.System.MachineID.Directory).Debug("ensuring machine-id directory exists")
681+
if err := os.MkdirAll(_config.System.MachineID.Directory, 0o755); err != nil {
682+
return err
683+
}
684+
}
685+
654686
return nil
655687
}
656688

docker-compose.example.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ services:
2323
- "/var/log/pterodactyl/:/var/log/pterodactyl/"
2424
- "/tmp/pterodactyl/:/tmp/pterodactyl/"
2525
- "/etc/ssl/certs:/etc/ssl/certs:ro"
26+
- "/run/wings:/run/wings"
2627
# you may need /srv/daemon-data if you are upgrading from an old daemon
2728
#- "/srv/daemon-data/:/srv/daemon-data/"
2829
# Required for ssl if you use let's encrypt. uncomment to use.

flake.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)