Commit Graph

335 Commits

Author SHA1 Message Date
Justin Kromlinger
82f4544917
Make sure bash is available in release job for non-posix scripts 2023-10-22 15:04:02 +02:00
Justin Kromlinger
97fcff2abf
Fix make-dockerfile.sh call 2023-10-22 14:48:22 +02:00
hashworks
b34fe7a1e0 Merge branch 'dedup-cleanup' into 'master'
Misc de-duplication and cleanups

See merge request archlinux/archlinux-docker!85
2023-10-16 21:20:41 +00:00
Emil Velikov
ed0440cca2 Parametrise Github/Dockerhub dockerfile
Not a big win as-is. It will make the upcoming introduction of
multilib-devel a bit saner.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:48:41 +01:00
Emil Velikov
d1254eeee4 scripts/make-dockerfile.sh: reuse in the release stage
Bonus point, we actually error out when the git command fails.

v2:
 - fix curl quoting
 - sed match-complete-line-and-remove
 - inline update make-dockerfile.sh variables

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:46:17 +01:00
Emil Velikov
0a6910cade Use pattern rules in the makefile
Less duplication ftw, specially with multilib-devel on the horizon.
Unfortunately we'd need to tag the file pattern rules as precious,
otherwise make thinks they are intermediate files and nukes them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 12:45:57 +01:00
Emil Velikov
64cb18a0c3 scripts/make-dockerfile.sh: drop TEMPLATE_ROOTFS_RELEASE_URL
The field is an inline comment, which by default is not present in the
podman log. Plus we do have the exact URL list a couple of lines further
down.

Haven't seen any other Dockerfile have one either, so let's nuke it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 11:53:30 +01:00
Emil Velikov
a972ead2e0 scripts/make-dockerfile.sh: rework TEMPLATE_ROOTFS_DOWNLOAD handling
Currently the TEMPLATE_ROOTFS_DOWNLOAD handling is overly complicated.
For the local builds, we set a ROOTFS=$GROUP.tar.zst. While for remote
builds, we:
 - invoke curl to fetch the remote tarball - ok
 - do curl and shell escaping contortions to prints the filename - ehhh
   - that we already now
   - and rely upon to not change, otherwise sha256sum will fail

Just use a dummy "true", for the local builds and a normal curl
command otherwise.

v2:
 - don't call curl in a sub-shell - no longer needed

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-02 11:51:59 +01:00
Emil Velikov
2f43fc413a scripts/make-dockerfile.sh: tweak sha256 sum handling
Drop the spurious cat, we already echo the value the like above so it's
pretty clear what it is in the logs.

While here, rename the file to the what's commonly used by us (see the
ISOs) and others, while removing the misleading "rootfs.tar" - we're
having a tar.zst tarball.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:58 +01:00
Emil Velikov
c4b62bb18f scripts/make-rootfs.sh: move non-wrapper calls further up
Move the cp/ln calls outside of the WRAPPER call block. The files that
are referenced are either disowned by pacman or are explicitly "backup"
files, such that pacman will not override them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:58 +01:00
Emil Velikov
0067757d21 scripts/make-rootfs.sh: drop pacman gnupg removal
The files are explicitly omitted from the tarball via the excludes file.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:49:52 +01:00
Emil Velikov
f737d64397 Move shell scripts out of the Makefile
Embedding one pieces of code into another (shell script into a makefiles
in this case) is rarely pretty. Split things up, as appropriate.

While here, simplify the rootfs in a few ways:
 - pass only the extra non-base (and effectively group name) package
 - add a handy variable for the fakeroot/fakechroot combo
 - split and rewrap long lines

As a bonus point, this makes it easier to use pattern rules in the
makefile - which will be handy for the upcoming multilib-devel
group/target.

Plus we can check the scripts via shellcheck/etc CI stage, as follow-up.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +01:00
Emil Velikov
b213655855 De-duplicate podman tag/push commands
The commands are identical across the three hosts. Just flesh that into
a simple for loop.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +01:00
Emil Velikov
069a4dee59 Drop duplicate parallel/matrix
The option was moved the to template and an earlier commit
reintroduced/copied them back seemingly by mistake.

Cc: nl6720 <nl6720@gmail.com>
Fixes: ca9957f ("Do not use secure runners on forks")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 23:40:44 +01:00
Kristian Klausen
e688cede58
Merge branch 'install-git' into 'master'
Install git, add to the README

See merge request archlinux/archlinux-docker!83
2023-09-25 20:21:11 +02:00
Emil Velikov
92315d6eaa Install git, add to the README
We use git in the makefile to create the container revision label.
This did not have any affect outside the local containers, since the
official ones use the CI_COMMIT_TAG variable from the CI.

Fixes: 5ec09f5 ("gitlab-ci: install devtools without its dependencies")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-25 18:20:34 +00:00
Kristian Klausen
486eadb65e
Merge branch 'omit-tar-artefacts' into 'master'
Remove the uncompressed tar artefact

See merge request archlinux/archlinux-docker!82
2023-09-23 00:44:36 +02:00
Emil Velikov
cda5b61390 Remove the uncompressed tar artefact
The file may be useful locally, but for the other stages we don't need
it. Explicitly remove it since it tends to be 3-4x the size of
everything else.

v2
 - switch from rm to artefacts:exclude:

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-22 22:56:31 +01:00
Kristian Klausen
6d3ea0c032
Fix incorrect cosign verify commands
The identity has been changed[1] to also include the "CI config path"
and the ref path should be the git tag of the release.

Also remove `jq` as it is only nice to have, not needed and it masks the
return code of `cosign verify`.

[1] a4b3e128c1

Fixes: 8317be4 ("Sign the images with sigstore's fulcio/rekor")
2023-09-21 06:42:36 +02:00
Kristian Klausen
c432cbcbe2
Add use-sigstore-attachments: true to the image:publish:secure job
Fixes: 8317be4 ("Sign the images with sigstore's fulcio/rekor")
2023-09-21 06:12:54 +02:00
Justin Kromlinger
797702633e
Add sigstore-param-file.yaml to releases branch
Fixes https://gitlab.archlinux.org/archlinux/archlinux-docker/-/jobs/179122#L222
2023-09-16 16:24:18 +02:00
hashworks
9bbf04eac9 Merge branch 'sigstore' into 'master'
Sign the images with sigstore's fulcio/rekor

Closes #77

See merge request archlinux/archlinux-docker!77
2023-09-16 14:04:11 +00:00
Justin Kromlinger
6090c65290
README 80 column wrap, cleanup 2023-09-16 16:00:30 +02:00
Kristian Klausen
8317be4d2d
Sign the images with sigstore's fulcio/rekor
The ecosystem is moving towards sigstore and we are federated with the
public fulcio instance[1], so let's sign our images. Cosign is not used,
but the sigstore feature built into podman, which works basically the
same way as cosign.

[1] https://github.com/sigstore/fulcio/pull/1214

Fix #77
2023-09-16 15:55:50 +02:00
hashworks
3be9448db8 Merge branch 'fix-ci-on-forks' into 'master'
Do not use secure runners on forks

See merge request archlinux/archlinux-docker!66
2023-09-16 13:54:47 +00:00
nl6720
ca9957f7d1
Do not use secure runners on forks
Forks may not have access to secure runners.
2023-09-16 15:50:45 +02:00
hashworks
4c107498cf Merge branch 'mixed-bag' into 'master'
Mixed bags of fixes and polish

See merge request archlinux/archlinux-docker!78
2023-09-16 13:47:17 +00:00
Emil Velikov
ffd47f737e
Use the in-tree mirrorlist
Currently we use the system mirrorlist for the pacman invocation.
The system config may or may not be identical to the in-tree one - as
one of my dev machines was kind enough to remind me.

The tooling should be self-contained and leak as few builder specific as
possible.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:37:25 +02:00
Emil Velikov
9c32b05bfa
README: rewrap, use standalone references
Re-wrap the readme to about 80 columns and use standalone references for
the long URLs. Reduces the eye-bleed for casual contributors.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:37:22 +02:00
Emil Velikov
615bfa55ea
Drop erroneous oci- prefix for image-base{,-devel} targets
The targets never had a docker/oci prefix. Update the PHONY targets in
the Makefile and the README.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:30:21 +02:00
Emil Velikov
8589e40bd8
README: s/docker/podman/ in the requirements
We're switched to podman a while ago.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:30:20 +02:00
Emil Velikov
9d3774ce35
gitlab-ci: de-duplicate matrix option
Just push the parallel/matrix into the templates.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:30:19 +02:00
Emil Velikov
5ec09f5357
gitlab-ci: install devtools without its dependencies
We only need devtools for the pacman.conf. While currently we install a
dozen+ of extra dependencies, weighting in at over 100M.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:30:18 +02:00
Emil Velikov
c90b1ab2f1
gitlab-ci: document the get_version implicit nature
Had a silly moment a while back, assuming the stage is no longer needed.
That's not the case, so add a brief commit about that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-09-16 15:30:17 +02:00
hashworks
4618632641 Merge branch 'xeonacid-master-patch-23599' into 'master'
Delete `package group` in README

See merge request archlinux/archlinux-docker!79
2023-09-16 13:18:40 +00:00
Acid Xeon
e39d28dcce Delete package group in README
`base-devel` is also meta package now.
2023-08-12 09:19:34 +00:00
Justin Kromlinger
301942f9e5
Replace temporary link 2023-06-27 00:00:07 +02:00
Justin Kromlinger
e4875c7e36
Add ghcr.io daily target 2023-06-21 20:54:10 +02:00
Justin Kromlinger
3ef8b2737b
Fix dockerfile lint 2023-06-20 12:16:16 +02:00
Justin Kromlinger
c42fc6a251
Switch back to alpine to fix official DockerHub builds
Reverts a76517d48c
2023-06-20 12:13:56 +02:00
Justin Kromlinger
17c4a88a88
Use docker.io for Dockerfile verify step to please DockerHub Official Builds
https://github.com/docker-library/official-images/actions/runs/5300787500/jobs/9594533073?pr=14883
2023-06-20 11:54:26 +02:00
Justin Kromlinger
d2ad02b012
Fix release of latest tags 2023-06-16 11:52:15 +02:00
Justin Kromlinger
10fb4f9e4f
Be more explicit about runner tags 2023-06-15 22:39:14 +02:00
Justin Kromlinger
af3c3dcff0
Fix SUID test 2023-06-15 17:20:33 +02:00
Justin Kromlinger
87d3f29452
Drop image tag for VM runners, install podman
The executer gives us a fresh Arch VM with a shell.
2023-06-15 17:05:30 +02:00
Justin Kromlinger
62d2b0fa76
Update base image just in case 2023-06-15 16:34:30 +02:00
Justin Kromlinger
b2322a4600
Ignore DL3007 since we use :latest 2023-06-15 16:34:29 +02:00
Justin Kromlinger
a76517d48c
Eat our own dog food, drop renovate since we no longer pin any versions 2023-06-15 16:34:28 +02:00
Justin Kromlinger
6aa7dcc287
Replace kaniko with podman
Resolves #71, fixes #70.
2023-06-15 16:33:58 +02:00
Justin Kromlinger
0b819be950
Fix pull commands for the DockerHub library images 2023-06-14 14:46:20 +02:00