mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2025-08-06 14:17:18 +02:00
Merge branch 'multilib-devel' into 'master'
Introduce multilib-devel See merge request archlinux/archlinux-docker!81
This commit is contained in:
commit
199f647532
@ -60,7 +60,7 @@ get_version:
|
|||||||
stage: rootfs
|
stage: rootfs
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- GROUP: [base, base-devel]
|
- GROUP: [base, base-devel, multilib-devel]
|
||||||
before_script:
|
before_script:
|
||||||
- pacman -Syu --noconfirm git make fakechroot fakeroot
|
- pacman -Syu --noconfirm git make fakechroot fakeroot
|
||||||
- pacman -Sdd --noconfirm devtools
|
- pacman -Sdd --noconfirm devtools
|
||||||
@ -97,7 +97,7 @@ rootfs:secure:
|
|||||||
stage: image
|
stage: image
|
||||||
parallel:
|
parallel:
|
||||||
matrix:
|
matrix:
|
||||||
- GROUP: [base, base-devel]
|
- GROUP: [base, base-devel, multilib-devel]
|
||||||
tags:
|
tags:
|
||||||
- vm
|
- vm
|
||||||
before_script:
|
before_script:
|
||||||
@ -237,7 +237,7 @@ release:
|
|||||||
http --ignore-stdin PATCH https://hub.docker.com/v2/repositories/archlinux/archlinux/ Authorization:"JWT ${TOKEN}" full_description="$(cat README.md)"
|
http --ignore-stdin PATCH https://hub.docker.com/v2/repositories/archlinux/archlinux/ Authorization:"JWT ${TOKEN}" full_description="$(cat README.md)"
|
||||||
|
|
||||||
# Upload rootfs to the Generic Packages Repository
|
# Upload rootfs to the Generic Packages Repository
|
||||||
for group in base base-devel; do
|
for group in base base-devel multilib-devel; do
|
||||||
sed -i "s|${group}.tar.zst|${group}-${BUILD_VERSION}.tar.zst|" output/${group}.tar.zst.SHA256
|
sed -i "s|${group}.tar.zst|${group}-${BUILD_VERSION}.tar.zst|" output/${group}.tar.zst.SHA256
|
||||||
echo "Uploading ${group}.tar.zst"
|
echo "Uploading ${group}.tar.zst"
|
||||||
curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file output/${group}.tar.zst ${PACKAGE_REGISTRY_URL}/${group}-${BUILD_VERSION}.tar.zst
|
curl -sSf --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file output/${group}.tar.zst ${PACKAGE_REGISTRY_URL}/${group}-${BUILD_VERSION}.tar.zst
|
||||||
@ -260,6 +260,9 @@ release:
|
|||||||
--form "actions[][file_path]=Dockerfile.base-devel"
|
--form "actions[][file_path]=Dockerfile.base-devel"
|
||||||
--form "actions[][content]=<output/Dockerfile.base-devel"
|
--form "actions[][content]=<output/Dockerfile.base-devel"
|
||||||
--form "actions[][action]=update"
|
--form "actions[][action]=update"
|
||||||
|
--form "actions[][file_path]=Dockerfile.multilib-devel"
|
||||||
|
--form "actions[][content]=<output/Dockerfile.multilib-devel"
|
||||||
|
--form "actions[][action]=update"
|
||||||
--form "actions[][file_path]=.gitlab-ci.yml"
|
--form "actions[][file_path]=.gitlab-ci.yml"
|
||||||
--form "actions[][content]=<.gitlab-ci.yml"
|
--form "actions[][content]=<.gitlab-ci.yml"
|
||||||
--form "actions[][action]=update"
|
--form "actions[][action]=update"
|
||||||
@ -277,6 +280,11 @@ release:
|
|||||||
base_devel_sha_url=$(./ci/get-public-download-for-generic-package.sh base-devel-${BUILD_VERSION}.tar.zst.SHA256)
|
base_devel_sha_url=$(./ci/get-public-download-for-generic-package.sh base-devel-${BUILD_VERSION}.tar.zst.SHA256)
|
||||||
echo "${base_devel_sha_url}"
|
echo "${base_devel_sha_url}"
|
||||||
|
|
||||||
|
multilib_devel_url=$(./ci/get-public-download-for-generic-package.sh multilib-devel-${BUILD_VERSION}.tar.zst)
|
||||||
|
echo "${multilib_devel_url}"
|
||||||
|
multilib_devel_sha_url=$(./ci/get-public-download-for-generic-package.sh multilib-devel-${BUILD_VERSION}.tar.zst.SHA256)
|
||||||
|
echo "${multilib_devel_sha_url}"
|
||||||
|
|
||||||
# TODO: We should actually be able to do something like \"url\":\"${PACKAGE_REGISTRY_URL}/base-${BUILD_VERSION}.tar.zst\"
|
# TODO: We should actually be able to do something like \"url\":\"${PACKAGE_REGISTRY_URL}/base-${BUILD_VERSION}.tar.zst\"
|
||||||
# But it doesn't appear that those downloads are public. I consider this a bug and hopefully it's fixed in a future version!
|
# But it doesn't appear that those downloads are public. I consider this a bug and hopefully it's fixed in a future version!
|
||||||
echo "Creating release"
|
echo "Creating release"
|
||||||
@ -288,6 +296,8 @@ release:
|
|||||||
--assets-link "{\"name\":\"base-${BUILD_VERSION}.tar.zst.SHA256\",\"url\":\"${base_sha_url}\"}" \
|
--assets-link "{\"name\":\"base-${BUILD_VERSION}.tar.zst.SHA256\",\"url\":\"${base_sha_url}\"}" \
|
||||||
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.zst\",\"url\":\"${base_devel_url}\"}" \
|
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.zst\",\"url\":\"${base_devel_url}\"}" \
|
||||||
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.zst.SHA256\",\"url\":\"${base_devel_sha_url}\"}"
|
--assets-link "{\"name\":\"base-devel-${BUILD_VERSION}.tar.zst.SHA256\",\"url\":\"${base_devel_sha_url}\"}"
|
||||||
|
--assets-link "{\"name\":\"multilib-devel-${BUILD_VERSION}.tar.zst\",\"url\":\"${multilib_devel_url}\"}" \
|
||||||
|
--assets-link "{\"name\":\"multilib-devel-${BUILD_VERSION}.tar.zst.SHA256\",\"url\":\"${multilib_devel_sha_url}\"}"
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
dotenv: build.env
|
dotenv: build.env
|
||||||
|
2
Makefile
2
Makefile
@ -16,6 +16,6 @@ $(OUTPUTDIR)/Dockerfile.%: $(OUTPUTDIR)/%.tar.zst
|
|||||||
|
|
||||||
# The following is for local builds only, it is not used by the CI/CD pipeline
|
# The following is for local builds only, it is not used by the CI/CD pipeline
|
||||||
|
|
||||||
all: image-base image-base-devel
|
all: image-base image-base-devel image-multilib-devel
|
||||||
image-%: $(OUTPUTDIR)/Dockerfile.%
|
image-%: $(OUTPUTDIR)/Dockerfile.%
|
||||||
${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t archlinux/archlinux:$(*) $(OUTPUTDIR)
|
${OCITOOL} build -f $(OUTPUTDIR)/Dockerfile.$(*) -t archlinux/archlinux:$(*) $(OUTPUTDIR)
|
||||||
|
14
README.md
14
README.md
@ -12,8 +12,9 @@ Arch Linux provides OCI-Compliant container images in multiple repositories:
|
|||||||
* [Daily in our ghcr.io repository][ghcr-containers]:
|
* [Daily in our ghcr.io repository][ghcr-containers]:
|
||||||
`podman pull ghcr.io/archlinux/archlinux:latest` or `docker pull ghcr.io/archlinux/archlinux:latest`
|
`podman pull ghcr.io/archlinux/archlinux:latest` or `docker pull ghcr.io/archlinux/archlinux:latest`
|
||||||
|
|
||||||
Two versions of the image are provided: `base` (approx. 150 MiB) and `base-devel`
|
Three versions of the image are provided: `base` (approx. 150 MiB), `base-devel`
|
||||||
(approx. 260 MiB), containing the respective meta package. Both are available as
|
(approx. 260 MiB) and `multilib-devel` (approx. 300MiB) containing the
|
||||||
|
respective meta package. All of them are available as
|
||||||
tags with `latest` pointing to `base`. Additionally, images are tagged with their
|
tags with `latest` pointing to `base`. Additionally, images are tagged with their
|
||||||
date and build job number, f.e. `base-devel-20201118.0.9436`.
|
date and build job number, f.e. `base-devel-20201118.0.9436`.
|
||||||
|
|
||||||
@ -32,7 +33,8 @@ $ cosign verify ghcr.io/archlinux/archlinux:latest --certificate-identity-regexp
|
|||||||
|
|
||||||
## Principles
|
## Principles
|
||||||
* Provide the Arch experience in a Docker image
|
* Provide the Arch experience in a Docker image
|
||||||
* Provide the simplest but complete image to `base` and `base-devel` on a regular basis
|
* Provide the simplest but complete image to `base`, `base-devel` and
|
||||||
|
`multilib-devel` on a regular basis
|
||||||
* `pacman` needs to work out of the box
|
* `pacman` needs to work out of the box
|
||||||
* All installed packages have to be kept unmodified
|
* All installed packages have to be kept unmodified
|
||||||
|
|
||||||
@ -63,9 +65,9 @@ Install the following Arch Linux packages:
|
|||||||
Make sure your user can directly interact with Podman (i.e. `podman info` works).
|
Make sure your user can directly interact with Podman (i.e. `podman info` works).
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
Run `make image-base` to build the `archlinux:base` image with the `base` meta
|
There are multiple `make image-XXX` targets, where each creates the
|
||||||
package installed. You can also run `make image-base-devel` to build the image
|
respective `archlinux:XXX` image based on the corresponding meta package.
|
||||||
`archlinux:base-devel` which additionally has the `base-devel` group installed.
|
Currently those include `base`, `base-devel` and `multilib-devel`.
|
||||||
|
|
||||||
## Pipeline
|
## Pipeline
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@ mkdir -vp "$BUILDDIR/alpm-hooks/usr/share/libalpm/hooks"
|
|||||||
find /usr/share/libalpm/hooks -exec ln -sf /dev/null "$BUILDDIR/alpm-hooks"{} \;
|
find /usr/share/libalpm/hooks -exec ln -sf /dev/null "$BUILDDIR/alpm-hooks"{} \;
|
||||||
|
|
||||||
mkdir -vp "$BUILDDIR/var/lib/pacman/" "$OUTPUTDIR"
|
mkdir -vp "$BUILDDIR/var/lib/pacman/" "$OUTPUTDIR"
|
||||||
install -Dm644 /usr/share/devtools/pacman.conf.d/extra.conf "$BUILDDIR/etc/pacman.conf"
|
[[ "$GROUP" == "multilib-devel" ]] && pacman_conf=multilib.conf || pacman_conf=extra.conf
|
||||||
|
install -Dm644 "/usr/share/devtools/pacman.conf.d/$pacman_conf" "$BUILDDIR/etc/pacman.conf"
|
||||||
cat pacman-conf.d-noextract.conf >> "$BUILDDIR/etc/pacman.conf"
|
cat pacman-conf.d-noextract.conf >> "$BUILDDIR/etc/pacman.conf"
|
||||||
|
|
||||||
sed 's/Include = /&rootfs/g' < "$BUILDDIR/etc/pacman.conf" > pacman.conf
|
sed 's/Include = /&rootfs/g' < "$BUILDDIR/etc/pacman.conf" > pacman.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user