commit 659abdf358c659a2da543006a5eb9d56044376e0e81cbe8ec44ce20b6d7a4f5a Author: Dan Čermák Date: Tue Jan 28 18:29:23 2025 +0000 [info=447f213331fef0c2067ee2ec133de0aa5b780dbf] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/gcc-13-image?expand=0&rev=171 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..2a3c54d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,52 @@ +# 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:13 + +FROM opensuse/tumbleweed:latest + +RUN set -euo pipefail; \ + zypper -n install --no-recommends gcc13 gcc13-c++ gcc13-fortran make 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-13-image/README.md" +LABEL io.artifacthub.package.logo-url="https://gcc.gnu.org/img/gccegg-65.png" +ENV GCC_VERSION="%%gcc_minor_version%%" + +# symlink all versioned gcc & g++ binaries to unversioned +# ones in /usr/local/bin so that plain gcc works +RUN set -euo pipefail; for gcc_bin in $(rpm -ql gcc13 gcc13-c++ gcc13-fortran |grep ^/usr/bin/ ); do \ + ln -sf $gcc_bin $(echo "$gcc_bin" | sed -e 's|/usr/bin/|/usr/local/bin/|' -e 's|-13$||'); \ + done diff --git a/README.md b/README.md new file mode 100644 index 0000000..13629f4 --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# 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:13 +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:13 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: +- `gcc13-ada` for the Ada frontend (GNAT) +- `gcc13-go` for the Go frontend +- `gcc13-objc` and `gcc13-obj-c++` for the Objective C and Objective C++ +- `gcc13-d` for the frontend to the D Language +- `gcc13-m2` for the Modula 2 compiler frontend + + +### 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:13 \ + 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:13 \ + 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/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..a809dbb --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,5 @@ +mtime: 1735740828 +commit: 8720cff6b7dc48da6eab529ec066581a09603659 +url: https://github.com/SUSE/bci-dockerfile-generator +revision: Tumbleweed +subdir: gcc-13-image diff --git a/_service b/_service new file mode 100644 index 0000000..f74d527 --- /dev/null +++ b/_service @@ -0,0 +1,10 @@ + + + + + Dockerfile + %%gcc_minor_version%% + gcc13 + minor + + \ No newline at end of file diff --git a/gcc-13-image.changes b/gcc-13-image.changes new file mode 100644 index 0000000..525669a --- /dev/null +++ b/gcc-13-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 13 BCI