-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR creates two images based on upstream ones with tags `latest` and `systemd`.
- Loading branch information
Robin Lee
committed
Aug 4, 2023
1 parent
191fbbc
commit d1d3ce3
Showing
19 changed files
with
369 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: "Gentoo: Build toolbx images for PRs" | ||
|
||
permissions: read-all | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- gentoo/** | ||
- .github/workflows/gentoo-pr.yaml | ||
|
||
env: | ||
distro: 'gentoo' | ||
distro_pretty: 'Gentoo' | ||
|
||
jobs: | ||
build-images: | ||
strategy: | ||
matrix: | ||
upstream_tag: ['latest', 'systemd'] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build ${{ env.distro_pretty }} ${{ matrix.upstream_tag }} toolbox image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ${{ env.distro }}/${{ matrix.upstream_tag }} | ||
file: ${{ env.distro }}/${{ matrix.upstream_tag }}/Containerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: false | ||
no-cache: true | ||
tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.upstream_tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: "Gentoo: Build and push toolbx images" | ||
|
||
permissions: read-all | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- gentoo/** | ||
- .github/workflows/gentoo.yaml | ||
schedule: | ||
- cron: '0 0 * * MON' | ||
|
||
# Prevent multiple workflow runs from racing | ||
concurrency: ${{ github.workflow }} | ||
|
||
env: | ||
distro: 'gentoo' | ||
distro_pretty: 'Gentoo' | ||
|
||
jobs: | ||
build-and-push-images: | ||
strategy: | ||
matrix: | ||
upstream_tag: ['latest', 'systemd'] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Quay.io | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: 'toolbx-images+github' | ||
password: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
|
||
- name: Build and push ${{ env.distro_pretty }} ${{ matrix.upstream_tag }} toolbox image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ${{ env.distro }}/${{ matrix.upstream_tag }} | ||
file: ${{ env.distro }}/${{ matrix.upstream_tag }}/Containerfile | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
no-cache: true | ||
tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.upstream_tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM docker.io/gentoo/portage:latest as portage | ||
|
||
FROM docker.io/gentoo/stage3:latest | ||
|
||
LABEL com.github.containers.toolbox="true" \ | ||
name="gentoo-toolbox" \ | ||
version="latest" \ | ||
usage="This image is meant to be used with the toolbox command" \ | ||
summary="Base image for creating Gentoo toolbox containers" \ | ||
maintainer="Robin Lee <[email protected]>" | ||
|
||
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | ||
|
||
# build all UTF-8 locales | ||
RUN echo > /etc/env.d/02locale && grep UTF-8 /usr/share/i18n/SUPPORTED > /etc/locale.gen && locale-gen | ||
|
||
# flatpak-spawn is not available in offical Gentoo repo | ||
RUN mkdir /etc/portage/repos.conf && \ | ||
echo 'x11-misc/flatpak-xdg-utils' > /etc/portage/package.accept_keywords/toolbox | ||
COPY localrepo.conf /etc/portage/repos.conf | ||
COPY localrepo /var/db/repos/localrepo | ||
COPY extra-packages / | ||
|
||
RUN emerge -v $(<extra-packages) | ||
|
||
# Enable sudo permission for wheel users | ||
RUN mkdir /etc/sudoers.d && chmod 700 /etc/sudoers.d && echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox | ||
|
||
# Clean up | ||
RUN rm -frv /var/db/repos/gentoo \ | ||
/etc/portage/repos.conf/localrepo.conf /var/db/repos/localrepo \ | ||
extra-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
app-shells/bash-completion | ||
sys-devel/bc | ||
app-arch/bzip2 | ||
sys-apps/diffutils | ||
sys-apps/findutils | ||
x11-misc/flatpak-xdg-utils | ||
dev-vcs/git | ||
app-crypt/gnupg | ||
sys-apps/net-tools | ||
sys-apps/iproute2 | ||
net-misc/iputils | ||
sys-apps/keyutils | ||
app-crypt/mit-krb5 | ||
sys-apps/less | ||
sys-process/lsof | ||
sys-apps/man-db | ||
sys-apps/man-pages | ||
net-analyzer/mtr | ||
app-editors/nano | ||
sys-auth/nss-mdns | ||
net-misc/openssh | ||
sys-apps/shadow | ||
app-arch/pigz | ||
sys-process/procps | ||
net-misc/rsync | ||
app-admin/sudo | ||
net-analyzer/tcpdump | ||
sys-process/time | ||
net-analyzer/traceroute | ||
app-text/tree | ||
app-arch/unzip | ||
sys-apps/util-linux | ||
net-misc/wget | ||
sys-apps/which | ||
sys-apps/miscfiles | ||
x11-apps/xauth | ||
app-arch/xz-utils | ||
app-arch/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[localrepo] | ||
location = /var/db/repos/localrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
masters = gentoo | ||
|
||
# manifest-hashes specify hashes used for new/updated entries | ||
# the current set went live on 2017-11-21, per 2017-11-12 Council meeting | ||
# https://archives.gentoo.org/gentoo-dev/message/ba2e5d9666ebd7e1bff1143485a37856 | ||
manifest-hashes = BLAKE2B SHA512 | ||
|
||
# The following hashes are required on all Manifest entries. If any | ||
# of them are missing, repoman will refetch and rehash old distfiles. | ||
# Otherwise, old distfiles will keep using their current hash set. | ||
manifest-required-hashes = BLAKE2B | ||
|
||
# Do not update changelogs | ||
update-changelog = false | ||
# Use thin manifests | ||
thin-manifests = true | ||
# Dont sign thinn manifests. There is no current policy for git commit signing | ||
sign-manifests = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST flatpak-xdg-utils-1.0.5.tar.xz 36744 BLAKE2B 5fb4a1bf65e94e767cacc627e53caba72fa3a077e6f058ceb366f50f704716248baba378de84addf5c7bb45c748b151fc8b9a7f00ef87cc778be1c7bfc17cdf9 SHA512 71c55cc01dc962c1b419821160626c46111ad672241f7627dbf780790d4f9f320151f479264ffc188334488f43dee8f4f7aa7754040e9c6231c200ea281f6439 |
26 changes: 26 additions & 0 deletions
26
gentoo/latest/localrepo/x11-misc/flatpak-xdg-utils/flatpak-xdg-utils-1.0.5.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit meson | ||
|
||
DESCRIPTION="Utilities for containerized apps to launch programs outside the container" | ||
HOMEPAGE="https://github.com/flatpak/flatpak-xdg-utils" | ||
SRC_URI="https://github.com/flatpak/flatpak-xdg-utils/releases/download/${PV}/flatpak-xdg-utils-${PV}.tar.xz" | ||
|
||
LICENSE="LGPL-2.1" | ||
SLOT="0" | ||
RDEPEND="dev-libs/glib:2" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="${RDEPEND}" | ||
KEYWORDS="~amd64" | ||
|
||
src_configure() { | ||
meson_src_configure --bindir=/usr/lib/"${PN}" | ||
} | ||
|
||
src_install() { | ||
meson_src_install | ||
dosym -r /usr/lib/"${PN}"/flatpak-spawn /usr/bin/flatpak-spawn | ||
} |
13 changes: 13 additions & 0 deletions
13
gentoo/latest/localrepo/x11-misc/flatpak-xdg-utils/metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE | ||
pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<name>ston</name> | ||
<email>[email protected]</email> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github"> | ||
flatpak/flatpak-xdg-utils</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM docker.io/gentoo/portage:latest as portage | ||
|
||
FROM docker.io/gentoo/stage3:systemd | ||
|
||
LABEL com.github.containers.toolbox="true" \ | ||
name="gentoo-toolbox" \ | ||
version="systemd" \ | ||
usage="This image is meant to be used with the toolbox command" \ | ||
summary="Base image for creating Gentoo toolbox containers" \ | ||
maintainer="Robin Lee <[email protected]>" | ||
|
||
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | ||
|
||
# build all UTF-8 locales | ||
#RUN echo > /etc/locale.conf && grep UTF-8 /usr/share/i18n/SUPPORTED > /etc/locale.gen && locale-gen | ||
RUN echo > /etc/env.d/02locale && grep UTF-8 /usr/share/i18n/SUPPORTED > /etc/locale.gen && locale-gen | ||
|
||
# flatpak-spawn is not available in offical Gentoo repo | ||
RUN mkdir /etc/portage/repos.conf && \ | ||
echo 'x11-misc/flatpak-xdg-utils' > /etc/portage/package.accept_keywords/toolbox | ||
COPY localrepo.conf /etc/portage/repos.conf | ||
COPY localrepo /var/db/repos/localrepo | ||
COPY extra-packages / | ||
|
||
RUN emerge -v $(<extra-packages) | ||
|
||
# Enable sudo permission for wheel users | ||
RUN mkdir /etc/sudoers.d && chmod 700 /etc/sudoers.d && echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox | ||
|
||
# Clean up | ||
RUN rm -frv /var/db/repos/gentoo \ | ||
/etc/portage/repos.conf/localrepo.conf /var/db/repos/localrepo \ | ||
extra-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
app-shells/bash-completion | ||
sys-devel/bc | ||
app-arch/bzip2 | ||
sys-apps/diffutils | ||
sys-apps/findutils | ||
x11-misc/flatpak-xdg-utils | ||
dev-vcs/git | ||
app-crypt/gnupg | ||
sys-apps/net-tools | ||
sys-apps/iproute2 | ||
net-misc/iputils | ||
sys-apps/keyutils | ||
app-crypt/mit-krb5 | ||
sys-apps/less | ||
sys-process/lsof | ||
sys-apps/man-db | ||
sys-apps/man-pages | ||
net-analyzer/mtr | ||
app-editors/nano | ||
sys-auth/nss-mdns | ||
net-misc/openssh | ||
sys-apps/shadow | ||
app-arch/pigz | ||
sys-process/procps | ||
net-misc/rsync | ||
app-admin/sudo | ||
net-analyzer/tcpdump | ||
sys-process/time | ||
net-analyzer/traceroute | ||
app-text/tree | ||
app-arch/unzip | ||
sys-apps/util-linux | ||
net-misc/wget | ||
sys-apps/which | ||
sys-apps/miscfiles | ||
x11-apps/xauth | ||
app-arch/xz-utils | ||
app-arch/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[localrepo] | ||
location = /var/db/repos/localrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
masters = gentoo | ||
|
||
# manifest-hashes specify hashes used for new/updated entries | ||
# the current set went live on 2017-11-21, per 2017-11-12 Council meeting | ||
# https://archives.gentoo.org/gentoo-dev/message/ba2e5d9666ebd7e1bff1143485a37856 | ||
manifest-hashes = BLAKE2B SHA512 | ||
|
||
# The following hashes are required on all Manifest entries. If any | ||
# of them are missing, repoman will refetch and rehash old distfiles. | ||
# Otherwise, old distfiles will keep using their current hash set. | ||
manifest-required-hashes = BLAKE2B | ||
|
||
# Do not update changelogs | ||
update-changelog = false | ||
# Use thin manifests | ||
thin-manifests = true | ||
# Dont sign thinn manifests. There is no current policy for git commit signing | ||
sign-manifests = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localrepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST flatpak-xdg-utils-1.0.5.tar.xz 36744 BLAKE2B 5fb4a1bf65e94e767cacc627e53caba72fa3a077e6f058ceb366f50f704716248baba378de84addf5c7bb45c748b151fc8b9a7f00ef87cc778be1c7bfc17cdf9 SHA512 71c55cc01dc962c1b419821160626c46111ad672241f7627dbf780790d4f9f320151f479264ffc188334488f43dee8f4f7aa7754040e9c6231c200ea281f6439 |
26 changes: 26 additions & 0 deletions
26
gentoo/systemd/localrepo/x11-misc/flatpak-xdg-utils/flatpak-xdg-utils-1.0.5.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit meson | ||
|
||
DESCRIPTION="Utilities for containerized apps to launch programs outside the container" | ||
HOMEPAGE="https://github.com/flatpak/flatpak-xdg-utils" | ||
SRC_URI="https://github.com/flatpak/flatpak-xdg-utils/releases/download/${PV}/flatpak-xdg-utils-${PV}.tar.xz" | ||
|
||
LICENSE="LGPL-2.1" | ||
SLOT="0" | ||
RDEPEND="dev-libs/glib:2" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="${RDEPEND}" | ||
KEYWORDS="~amd64" | ||
|
||
src_configure() { | ||
meson_src_configure --bindir=/usr/lib/"${PN}" | ||
} | ||
|
||
src_install() { | ||
meson_src_install | ||
dosym -r /usr/lib/"${PN}"/flatpak-spawn /usr/bin/flatpak-spawn | ||
} |
Oops, something went wrong.