-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from twiest/convert-ubuntu-package
Add convert-ubuntu-package example
- Loading branch information
Showing
4 changed files
with
53 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,34 @@ | ||
name: "Build image: convert-ubuntu-package" | ||
|
||
env: | ||
IMAGE_NAME: "convert-ubuntu-package" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- convert-ubuntu-package/* | ||
- .github/workflows/convert-ubuntu-package.yml | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- convert-ubuntu-package/* | ||
- .github/workflows/convert-ubuntu-package.yml | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build container image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
context: ${{ env.IMAGE_NAME }} | ||
containerfiles: ${{ env.IMAGE_NAME }}/Containerfile | ||
image: ${{ env.IMAGE_NAME }} | ||
layers: false | ||
oci: true |
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,13 @@ | ||
# Convert an Ubuntu package to rpm using alien and install it | ||
FROM ubuntu:latest as converter | ||
RUN apt update && \ | ||
apt install -y alien && \ | ||
cd /tmp && \ | ||
apt download gocryptfs && \ | ||
alien --to-rpm --scripts --fixperms gocryptfs*.deb | ||
|
||
FROM quay.io/fedora/fedora-coreos:stable | ||
COPY --from=converter /tmp/gocryptfs*.rpm /tmp | ||
RUN rpm-ostree install /tmp/gocryptfs*.rpm && \ | ||
rm /tmp/gocryptfs*.rpm && \ | ||
ostree container commit |
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,5 @@ | ||
# Convert an Ubuntu Package and Install It | ||
|
||
This example converts an Ubuntu package into an rpm using [alien](https://wiki.debian.org/Alien) an then installs it using `rpm-ostree`. | ||
|
||
This is useful for packages that are present in Ubuntu, but not in Fedora. This example installs Ubuntu's latest packaged version of gocryptfs, which is [no longer maintained in Fedora](https://discussion.fedoraproject.org/t/gocryptfs-not-available-on-fedora-36). |