Commit Graph

347 Commits

Author SHA1 Message Date
Emil Velikov
d251908f91 Use the PACKAGE_REGISTRY_URL during releasing
The bug that mandated the get-public-download-for-generic-package.sh
use has been fixed a while ago.

Directly use the URL variable and drop the no longer needed script.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
ee1b64a7ff Use rootfs_file across the board, rename and quote
Currently things are a bit mixed up - just rename all the files to
include the BUILD_VERSION and consistently use the rootfs_file variable.

Throw in some quotes while in there.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
bf931bf033 Don't fetch the tarballs during publish-dockerhub
They are not needed at this point, so don't fetch them.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
b06e3250d5 Remove bot workaround for the test stage
The issue referenced was fixed a few months after we added the
workaround.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Emil Velikov
93e0f66a3a Remove not applicable before_script
The image template, has a before_script stage which is overridden by all
instances that use it. Just drop it - it's rather misleading.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-11-18 14:58:56 +00:00
Justin Kromlinger
34b3f4f131
Push multilib-devel to official dockerhub 2023-11-18 15:58:16 +01:00
Justin Kromlinger
49b83e2f55
Fix missing \ 2023-11-01 16:51:57 +01:00
hashworks
199f647532 Merge branch 'multilib-devel' into 'master'
Introduce multilib-devel

See merge request archlinux/archlinux-docker!81
2023-10-31 19:40:54 +00:00
Emil Velikov
244718b5c9 Also release the multilib-devel container
So it can be useful for the wider community. I've intentionally left it
out as separate commit, since:
 - it is untested
 - there is lots of duplication that can/should be fixed
 - if publishing seems like an overkill, people can locally still use it

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-22 19:20:46 +01:00
Emil Velikov
5d404ea4bd Introduce multilib-devel container
Can be used to build 32bit (aka multilib) packages. With all the
simplification and de-duplication done with the previous commits, this
turns out to be a fairly simple job ;-)

Notes:
 - there is currently no test stage for this container
 - the release bits will come with next commit

v2:
 - preserve extra.conf for base/base-devel

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2023-10-22 19:20:06 +01:00
Justin Kromlinger
0ba93e3ec9
Fix copy command removal 2023-10-22 15:45:29 +02:00
Justin Kromlinger
fb332d2218
Provide rootfs file name to make-dockerfile.sh script
Fixes https://gitlab.archlinux.org/archlinux/archlinux-docker/-/jobs/186685
2023-10-22 15:37:37 +02:00
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