From bf31278e2373682934c0c0c9661ee633648c7cbb11ecf53f59e63d01a67a6b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Wed, 1 Jan 2025 14:15:51 +0000 Subject: [PATCH] [info=da6b6b9f4859a58b1537c7f8243fdbbb] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/gcc-14-image?expand=0&rev=160 --- .gitattributes | 23 ++++++ .gitignore | 1 + Dockerfile | 48 +++++++++++++ README.md | 103 +++++++++++++++++++++++++++ _constraints | 7 ++ _service | 10 +++ gcc-14-image.changes | 164 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 356 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 _constraints create mode 100644 _service create mode 100644 gcc-14-image.changes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a276c56 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +# Copyright (c) 2025 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!UseOBSRepositories + +#!BuildTag: opensuse/bci/gcc:%%gcc_minor_version%%-%RELEASE% +#!BuildTag: opensuse/bci/gcc:%%gcc_minor_version%% +#!BuildTag: opensuse/bci/gcc:14 +#!BuildTag: opensuse/bci/gcc:latest + +FROM opensuse/tumbleweed:latest + +RUN set -euo pipefail; \ + zypper -n install --no-recommends gcc14 gcc14-c++ gcc14-fortran make gcc gcc-c++ gcc-fortran curl findutils gawk git-core procps util-linux; \ + zypper -n clean; \ + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=org.opensuse.bci.gcc +LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI GNU Compiler Collection" +LABEL org.opencontainers.image.description="GNU Compiler Collection container based on the openSUSE Tumbleweed Base Container Image." +LABEL org.opencontainers.image.version="%%gcc_minor_version%%" +LABEL org.opencontainers.image.url="https://www.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="openSUSE Project" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opencontainers.image.ref.name="%%gcc_minor_version%%-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/gcc:%%gcc_minor_version%%-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" +LABEL org.opensuse.release-stage="released" +# endlabelprefix +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/gcc-14-image/README.md" +LABEL io.artifacthub.package.logo-url="https://gcc.gnu.org/img/gccegg-65.png" +ENV GCC_VERSION="%%gcc_minor_version%%" + diff --git a/README.md b/README.md new file mode 100644 index 0000000..09959c1 --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ +# openSUSE Tumbleweed BCI GNU Compiler Collection container image (GCC) +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) + +# Description +The GNU Compiler Collection (GCC) is an optimizing compiler for various +architectures and operating systems. It is the default compiler in the GNU +project and most Linux distributions, including SUSE Linux Enterprise and +openSUSE. + + +## Usage + +### Compile an application with a `Dockerfile` + +Normally, you'd want to compile an application and distribute it as part of a +custom container image. To do this, create a `Dockerfile` similar to the one +below. The `Dockerfile` uses this image to build a custom container image, +copies the sources to a working directory, and compiles the application: + +```Dockerfile +FROM registry.opensuse.org/opensuse/bci/gcc:14 +WORKDIR /src/ +COPY . /src/ +RUN gcc main.c src1.c src2.c +CMD ["./a.out"] +``` + +It is also possible to compile a static binary with gcc as part of a multistage +build: + +```Dockerfile +FROM registry.opensuse.org/opensuse/bci/gcc:14 as builder +WORKDIR /src/ +COPY . /src/ +RUN gcc -o app main.c src1.c src2.c + +FROM registry.opensuse.org/opensuse/bci/bci-micro:latest +WORKDIR /build/ +COPY --from=builder /src/app /build/ +CMD ["/build/app"] +``` + +Note that you must build a static binary to deploy it into bci-micro; otherwise +shared libraries might be missing. You cannot deploy such an app into a +`scratch` image, as it is not possible to statically link glibc. + + +### Available build systems + +The container image comes with `make` by default. Other build systems and +related utilities are available in the repository, and they can be installed +using `zypper`. This includes the following: +- `meson` +- `cmake` +- `ninja` +- `autoconf` & `automake` + + +### Available compiler frontends + +The GNU Compiler Collections supports a wide range of frontends. The container +image ships the C, C++ and fortran frontends available as `gcc`, `g++` and `gfortran` +respectively. The following additional frontends can be installed from the +repository: +- `gcc14-ada` for the Ada frontend (GNAT) +- `gcc14-go` for the Go frontend +- `gcc14-objc` and `gcc14-obj-c++` for the Objective C and Objective C++ +- `gcc14-d` for the frontend to the D Language +- `gcc14-m2` for the Modula 2 compiler frontend +- `gcc14-rust` for the GNU Rust compiler + + +### Using the container image interactively + +You can use the image to create ephemeral containers that execute only gcc. This +can be useful in situations, where building a full container image is not +practical. One way to do this is to mount the working directory of an +application into the launched container and compile the application there: + +```bash +podman run --rm -it -v $(pwd):/src/:Z registry.opensuse.org/opensuse/bci/gcc:14 \ + gcc -o /src/app.out /src/*.c +``` +or by invoking `make` +```bash +podman run --rm -it -v $(pwd):/src/:Z --workdir /src/ \ + registry.opensuse.org/opensuse/bci/gcc:14 \ + make +``` + +Note that the binary built using this approach are unlikely to work on a local +machine. They only work on operating systems that are binary-compatible to +openSUSE Tumbleweed. + +## Licensing + +`SPDX-License-Identifier: GPL-3.0-or-later` + +This documentation and the build recipe are licensed as GPL-3.0-or-later. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/). diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..a6a4866 --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 6 + + + diff --git a/_service b/_service new file mode 100644 index 0000000..dc9945c --- /dev/null +++ b/_service @@ -0,0 +1,10 @@ + + + + + Dockerfile + %%gcc_minor_version%% + gcc14 + minor + + \ No newline at end of file diff --git a/gcc-14-image.changes b/gcc-14-image.changes new file mode 100644 index 0000000..13bc6d5 --- /dev/null +++ b/gcc-14-image.changes @@ -0,0 +1,164 @@ +------------------------------------------------------------------- +Wed Jan 1 14:13:48 UTC 2025 - SUSE Update Bot + +- update copyright year + +------------------------------------------------------------------- +Tue Dec 3 13:26:37 UTC 2024 - SUSE Update Bot + +- Change attribute order in _service + +------------------------------------------------------------------- +Fri Nov 8 10:49:01 UTC 2024 - SUSE Update Bot + +- add logo url + +------------------------------------------------------------------- +Thu Nov 7 13:55:54 UTC 2024 - SUSE Update Bot + +- update license to the one of the main package + +------------------------------------------------------------------- +Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot + +- remove nonsensical org.opencontainers.image.authors - duplication of .vendor + +------------------------------------------------------------------- +Tue Oct 29 15:23:20 UTC 2024 - SUSE Update Bot + +- drop tag_version-%RELEASE% + +------------------------------------------------------------------- +Tue Oct 29 14:22:15 UTC 2024 - SUSE Update Bot + +- add fortran + +------------------------------------------------------------------- +Mon Oct 14 11:26:26 UTC 2024 - SUSE Update Bot + +- make the version-%release tag the first one listed; remove duplicates where they existed; update image.ref/reference to point to the version-%release(-) tag + +------------------------------------------------------------------- +Fri Oct 11 15:12:52 UTC 2024 - SUSE Update Bot + +- make the tag with -%RELEASE% the first tag listed + +------------------------------------------------------------------- +Sat Sep 28 08:15:08 UTC 2024 - Dirk Mueller + +- fix registry references in READMEs + +------------------------------------------------------------------- +Wed Sep 25 17:36:16 UTC 2024 - Dirk Mueller + +- rerender installation step in multiple lines, allow uninstalling optional packages + +------------------------------------------------------------------- +Wed Sep 25 17:12:11 UTC 2024 - Dirk Mueller + +- improved log cleaning + +------------------------------------------------------------------- +Tue Sep 24 20:00:32 UTC 2024 - Dirk Mueller + +- remove release tags for additional_versions + +------------------------------------------------------------------- +Mon Sep 23 07:17:50 UTC 2024 - Dirk Mueller + +- use full version in container labels + +------------------------------------------------------------------- +Thu Sep 12 10:37:22 UTC 2024 - Dirk Mueller + +- set useobsrepositories explicitly + +------------------------------------------------------------------- +Fri Sep 6 05:46:48 UTC 2024 - Dirk Mueller + +- main gcc is 14; switch linking/packages + +------------------------------------------------------------------- +Fri Aug 23 10:27:45 UTC 2024 - Dan Čermák + +- Add missing distro name in the README + +------------------------------------------------------------------- +Wed Aug 14 12:30:32 UTC 2024 - Dirk Mueller + +- install packages first + +------------------------------------------------------------------- +Thu Aug 8 19:28:10 UTC 2024 - Dirk Mueller + +- add oci.image.ref.name + +------------------------------------------------------------------- +Thu Aug 8 16:43:43 UTC 2024 - Dirk Mueller + +- remove oci reference annotation again + +------------------------------------------------------------------- +Mon Aug 5 11:38:13 UTC 2024 - Dirk Mueller + +- add OCI reference annotation + +------------------------------------------------------------------- +Sat Aug 3 08:56:51 UTC 2024 - Dirk Mueller + +- set OCI.authors attribute instead of deprecated MAINTAINER + +------------------------------------------------------------------- +Wed Jul 31 12:06:44 UTC 2024 - Dirk Mueller + +- set specific lifecycle url for openSUSE BCI + +------------------------------------------------------------------- +Fri Jun 28 06:52:02 UTC 2024 - Dirk Mueller + +- add standard devel tools back to development containers + +------------------------------------------------------------------- +Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller + +- use sentence style capitalization in READMEs + +------------------------------------------------------------------- +Mon Jun 10 15:11:25 UTC 2024 - Dirk Mueller + +- update README; reduce unnecessary newlines + +------------------------------------------------------------------- +Wed Jun 5 15:13:27 UTC 2024 - Dirk Mueller + +- Don't add artifacthub labels into labelprefix section + +------------------------------------------------------------------- +Tue Jun 4 12:35:15 UTC 2024 - Alexandre Vicenzi + +- Fix grammar mistake in licensing footer + +------------------------------------------------------------------- +Wed May 15 13:43:21 UTC 2024 - Dirk Mueller + +- Add _constraints to prevent FTBFS + +------------------------------------------------------------------- +Wed May 8 16:26:31 UTC 2024 - Dirk Mueller + +- README fixes - better titles and follow recommended document structure + +------------------------------------------------------------------- +Tue May 7 19:07:24 UTC 2024 - Dirk Mueller + +- extend READMEs; correct eula for application images + +------------------------------------------------------------------- +Tue May 7 12:37:35 UTC 2024 - Dirk Mueller + +- install awk; use symlinks rather than hardlinks as they break the compiler + +------------------------------------------------------------------- +Wed Apr 17 14:34:54 UTC 2024 - SUSE Update Bot + +- First version of the GNU Compiler Collection 14 BCI