Skip to content

Commit 172e673

Browse files
committed
replace packages.txt with calculated graph
Signed-off-by: Avi Deitcher <avi@deitcher.net>
1 parent 31ab819 commit 172e673

File tree

15 files changed

+16
-723
lines changed

15 files changed

+16
-723
lines changed

.github/pull-request-template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ addressed, and remove any items that are not relevant to this PR.
3232
- [ ] Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
3333
- [ ] REQUIRED - The package is available under an OSI-approved or FSF-approved license
3434
- [ ] REQUIRED - The version of the package is still receiving security updates
35-
- [ ] REQUIRED - The package is added to `packages.txt`
3635

3736
#### For security-related PRs
3837
<!-- remove if unrelated -->

.github/workflows/ci-build.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
branches:
88
- gh-readonly-queue/main/**
99

10+
env:
11+
WOLFICTL: "docker run -it --rm --entrypoint=wolfictl ghcr.io/wolfi-dev/sdk:latest@sha256:b296d1848a8fb05ae08d41fbcfd3822ada50678f04d0ead2c4808b014b8e0d63 wolfictl"
1012
jobs:
1113
changes:
1214
name: Determine packages to test building
@@ -28,17 +30,13 @@ jobs:
2830
- name: Build package list
2931
id: package-list
3032
run: |
31-
# Ensure there is a newline at the end of packages.txt to avoid `read` from ignoring
32-
# the last entry.
33-
echo >> $GITHUB_WORKSPACE/packages.txt
34-
3533
printf "packages=" >> $GITHUB_OUTPUT
3634
37-
while read pkg; do
35+
make list | while read pkg; do
3836
for file in ${{ steps.changes.outputs.all_changed_files }}; do
3937
[ "${file%.yaml}" = "$pkg" ] && printf "%s " ${file%.yaml} >> $GITHUB_OUTPUT
4038
done
41-
done < $GITHUB_WORKSPACE/packages.txt
39+
done
4240
4341
printf "\n" >> $GITHUB_OUTPUT
4442

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ Wolfi packages are built using melange. If you want to learn how packages are bu
2626

2727
Start by cloning this repository and create a YAML file named `<your-package-name>.yaml` in its root directory. If you have any patches, create a folder with the same name and put them there.
2828

29-
Add a new entry for your package near the bottom of [`packages.txt`](packages.txt) like this:
30-
31-
```
32-
your-package-name
33-
```
34-
3529
Once you're done writing the new package configuration file, you can test it by triggering a build with `make packages/<your-package-name> BUILDWORLD=no USE_CACHE=no`.
3630

3731
note: `USE_CACHE=no` disables using a GCP cloud bucket for caching pipeline sources. This is mainly used for production setups and not needed for local development.

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ endif
66
TARGETDIR = packages/${ARCH}
77

88
MELANGE ?= $(shell which melange)
9+
WOLFICTL ?= $(shell which wolfictl)
910
KEY ?= local-melange.rsa
1011
REPO ?= $(shell pwd)/packages
1112
CACHE_DIR ?= gs://wolfi-sources/
@@ -50,11 +51,8 @@ endif
5051
endef
5152

5253
# The list of packages to be built. The order matters.
53-
# At some point, when ready, this should be replaced with `wolfictl text -t name .`
54-
# non-standard source directories are provided by adding them separated by a comma,
55-
# e.g.
56-
# postgres-11,postgres
57-
PKGLIST ?= $(shell cat packages.txt | grep -v '^\#' )
54+
# wolfictl determines the list and order
55+
PKGLIST ?= $(shell $(WOLFICTL) text --dir . --type name)
5856

5957
all: ${KEY} .build-packages
6058

bazel-5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bazel

bazel-6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bazel

lint.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ makepkgs=$(make list-yaml)
66
for f in *.yaml; do
77
echo "---" $f
88

9-
# Check that every package is listed in packages.txt
10-
if ! echo "$makepkgs" | grep -wq "$f"; then
11-
echo "missing $f in packages.txt"
12-
exit 1
13-
fi
14-
159
# Don't specify packages.wolfi.dev/os as a repository, and remove it from the keyring.
1610
# Packages from the bootstrap repo should be allowed, but otherwise packages
1711
# should be fetched locally and the local repository should be appended at

mariadb-10.11

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mariadb

mariadb-10.6

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mariadb

0 commit comments

Comments
 (0)