Skip to content

Commit affbe02

Browse files
authored
seaweedfs: add iamguarded subpkg (#77121)
Adds `-iamguarded-compat` subpkg to `seaweedfs`. <!--- Provide a short summary in the Title above. Examples of good PR titles: * "ruby-3.1: new package" * "haproxy: fix CVE-2014-123456" --> <!-- Please include references to any related issues or delete this section otherwise. --> Fixes: Related: ### Pre-review Checklist <!-- This checklist is mostly useful as a reminder of small things that can easily be forgotten – it is meant as a helpful tool rather than hoops to jump through. At the moment of this PR you have the most information on what all the change will affect, so please take the time to jot it down. Put an `x` in all the items that apply, make notes next to any that haven't been addressed, and remove any items that are not relevant to this PR. --> #### For new package PRs only <!-- remove if unrelated --> - [ ] This PR is marked as fixing a pre-existing package request bug - [ ] Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency - [ ] REQUIRED - The package is available under an OSI-approved or FSF-approved license - [ ] REQUIRED - The version of the package is still receiving security updates - [ ] This PR links to the upstream project's support policy (e.g. `endoflife.date`) #### For new version streams <!-- remove if unrelated --> - [ ] The upstream project actually supports multiple concurrent versions. - [ ] Any subpackages include the version string in their package name (e.g. `name: ${{package.name}}-compat`) - [ ] The package (and subpackages) `provides:` logical unversioned forms of the package (e.g. `nodejs`, `nodejs-lts`) - [ ] If non-streamed package names no longer built, open PR to withdraw them (see [WITHDRAWING PACKAGES](https://github.com/wolfi-dev/os/blob/main/WITHDRAWING_PACKAGES.md)) #### For package updates (renames) in the base images <!-- remove if unrelated --> When updating packages part of base images (i.e. cgr.dev/chainguard/wolfi-base or ghcr.io/wolfi-dev/sdk) - [ ] REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk images successfully build - [ ] REQUIRED cgr.dev/chainguard/wolfi-base and ghcr.io/wolfi-dev/sdk contain no obsolete (no longer built) packages - [ ] Upon launch, does `apk upgrade --latest` successfully upgrades packages or performs no actions #### For security-related PRs <!-- remove if unrelated --> - [ ] The security fix is recorded in the [advisories](https://github.com/wolfi-dev/advisories) repo **CVE Scanning:** This PR will fail if ANY CVEs are found (fail-any mode). To customize: - **Must-fix specific CVEs only:** Add `<!--ci-cve-scan:must-fix: CVE-ID-->` markers and remove the line below - **Fail on any CVEs (default):** Keep the marker below ``` <!--ci-cve-scan:fail-any--> ``` #### For version bump PRs <!-- remove if unrelated --> - [ ] The `epoch` field is reset to 0 #### For PRs that add patches <!-- remove if unrelated --> - [ ] Patch source is documented Signed-off-by: Dentrax <[email protected]>
1 parent a9b8ee3 commit affbe02

File tree

1 file changed

+71
-5
lines changed

1 file changed

+71
-5
lines changed

seaweedfs.yaml

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
package:
22
name: seaweedfs
33
version: "4.05"
4-
epoch: 0 # GHSA-g754-hx8w-x2g6
4+
epoch: 1
55
description: SeaweedFS is a fast distributed storage system for blobs, objects, files.
66
copyright:
77
- license: Apache-2.0
88
dependencies:
99
runtime:
1010
- fuse2
1111

12+
var-transforms:
13+
- from: ${{package.version}}
14+
match: ^(\d+).*
15+
replace: $1
16+
to: major-version
17+
1218
environment:
1319
environment:
1420
CGO_ENABLED: "0"
@@ -63,6 +69,63 @@ subpackages:
6369
test -x /entrypoint.sh
6470
/entrypoint.sh help | grep -F "SeaweedFS"
6571
72+
- name: ${{package.name}}-iamguarded-compat
73+
description: Compatibility package for iamguarded variant of SeaweedFS
74+
dependencies:
75+
runtime:
76+
- bash
77+
- busybox
78+
- procps
79+
pipeline:
80+
- uses: iamguarded/build-compat
81+
with:
82+
package: ${{package.name}}
83+
version: ${{vars.major-version}}
84+
- runs: |
85+
mkdir -p ${{targets.contextdir}}/opt/iamguarded/seaweedfs/bin
86+
mkdir -p ${{targets.contextdir}}/data
87+
mkdir -p ${{targets.contextdir}}/tmp
88+
chmod g+rwX ${{targets.contextdir}}/opt/iamguarded
89+
chmod g+rwX ${{targets.contextdir}}/data
90+
ln -sf /usr/bin/weed ${{targets.contextdir}}/opt/iamguarded/seaweedfs/bin/weed
91+
- uses: iamguarded/finalize-compat
92+
with:
93+
package: ${{package.name}}
94+
version: ${{vars.major-version}}
95+
test:
96+
environment:
97+
contents:
98+
packages:
99+
- ${{package.name}}
100+
- curl
101+
- jq
102+
- wait-for-it
103+
environment:
104+
MASTER_PORT: "9333"
105+
pipeline:
106+
- uses: iamguarded/test-compat
107+
with:
108+
package: ${{package.name}}
109+
version: ${{vars.major-version}}
110+
- uses: test/tw/symlink-check
111+
with:
112+
allow-absolute: true
113+
- name: "Test master server startup and API"
114+
uses: test/daemon-check-output
115+
with:
116+
start: /opt/iamguarded/seaweedfs/bin/weed master -ip=0.0.0.0 -port="${MASTER_PORT}" -mdir=/tmp/seaweedfs-test
117+
timeout: 45
118+
expected_output: |
119+
Start Seaweed Master
120+
No existing leader found!
121+
Initializing new cluster
122+
post: |
123+
wait-for-it "localhost:${MASTER_PORT}" -t 30
124+
125+
curl -sf "http://localhost:${MASTER_PORT}/cluster/status" | grep -F "Leader"
126+
curl -sf "http://localhost:${MASTER_PORT}/dir/assign" | jq -e ".fid and .url"
127+
curl -sf "http://localhost:${MASTER_PORT}/dir/status" | jq -e ".Topology"
128+
66129
test:
67130
environment:
68131
contents:
@@ -73,10 +136,13 @@ test:
73136
environment:
74137
MASTER_PORT: "9333"
75138
pipeline:
76-
- name: "Version and help commands"
77-
runs: |
78-
weed version | grep -F "${{package.version}}"
79-
weed help | grep -F "SeaweedFS"
139+
- uses: test/tw/ldd-check
140+
- uses: test/tw/help-check
141+
with:
142+
bins: weed
143+
- uses: test/tw/ver-check
144+
with:
145+
bins: weed
80146
- name: "Test master server startup and API"
81147
uses: test/daemon-check-output
82148
with:

0 commit comments

Comments
 (0)