diff --git a/src/content/docs/contributing/getting-started.mdx b/src/content/docs/contributing/getting-started.mdx index c54e98d..2b0f684 100644 --- a/src/content/docs/contributing/getting-started.mdx +++ b/src/content/docs/contributing/getting-started.mdx @@ -1,15 +1,15 @@ --- -title: Contributing -description: "Get started contributing packages to Terra." +title: Getting Started +description: "Get started with contributing packages to Terra." --- -import { Aside } from "@astrojs/starlight/components"; +import { Aside, Badge, Steps, Tabs, TabItem } from "@astrojs/starlight/components"; import { Code } from "astro:components"; import RPMSpec from "@/components/spec.json"; -# Overview - -Thanks for contributing to Terra! +
+ +
Terra is specifically designed to be as _package-maintainer-friendly_ as possible — you don't need to know everything about the infrastructure to create a package for Terra! @@ -27,78 +27,97 @@ If you ever need help, hop into [our Discord server](https://fyralabs.com/discor and [RFC 8174](https://www.rfc-editor.org/rfc/rfc8174). -# Creating a package +## Creating a package -## Before you begin... +### Before you begin... - Make sure the package is not in the [Fedora repositories](https://packages.fedoraproject.org), and the package name is not taken. - Review our [packaging policies](/contributing/policies). - Review our [packaging guidelines](/contributing/guidelines). - Review our custom [SRPM macros](/contributing/srpm), as these may be helpful to your package. -## Preparation +### Preparation You'll need a few tools to get started, pick one of these sections, then continue to [Writing Sources](#writing-sources). -### Fedora/Ultramarine + + + Make sure that you have Terra [installed](/usage/installing). -Install [Andaman](https://developer.fyralabs.com/andaman) and its Mock configs on your system: + If not, then add it with: - + ```sh + sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release terra-gpg-keys + ``` -### Dev Container + Once enabled, install [Andaman](https://developer.fyralabs.com/andaman) and its [Mock](https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds) configs on your system: -You can create, build, and push a package all from within our Dev Container. -This means you do NOT need to be running Fedora/Ultramarine to create a package. -You can run this devcontainer from Linux, macOS, or Windows. + ```sh + sudo dnf install anda terra-mock-configs + ``` -1. Install the Dev Containers extension in your IDE - - Zed comes with Dev Containers, see [this documentation](https://zed.dev/docs/dev-containers) + If preferred, Andaman can also be installed via [Cargo](https://crates.io/crates/anda) - - VSCode users need to install the Dev Containers extension + ```sh + cargo install anda + ``` -2. Get the container runtime - - On Windows and Mac, install [Docker Desktop](https://docs.docker.com/desktop) + + + You can create, build, and push a package all from within our Dev Container. + This means you do NOT need to be running Fedora/Ultramarine to create a package. + You can run this devcontainer from Linux, macOS, or Windows. - - On Linux, install `podman-docker` from your package manager + + 1. Install a Dev Containers extension in your IDE: -3. Fork [terrapkg/packages](https://github.com/terrapkg/packages), and `git clone` your fork -4. Open the folder you cloned in your editor -5. It should prompt you to `reopen in Dev Container`, click this and wait for the Dev Container to open. + - Zed comes with Dev Containers, see [this documentation](https://zed.dev/docs/dev-containers) - + - VSCode users need to install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) -You are now in the Terra Dev Container, and have all the packages and -configuration necessary to start building packages! + 1. Get the container runtime: -### Pet Container + - On Linux, install [podman-docker](https://podman.io/) from your package manager -If you're on atomic system, or otherwise prefer to work with containers, you can run the Terra build container as your development environment. + - On Windows and Mac, install [Docker Desktop](https://docs.docker.com/desktop) -Simply run: + 1. Fork [terrapkg/packages](https://github.com/terrapkg/packages), and `git clone` your fork -```shell -podman run --rm --cap-add=SYS_ADMIN --privileged --volume ./:/anda --volume mock_cache:/var/cache/mock --workdir /anda ghcr.io/terrapkg/builder:frawhide anda -``` + 1. Open the folder you cloned in your editor -### Cargo + 1. It should prompt you to `reopen in Dev Container`, click this and wait for the Dev Container to open. + -Anda is also available via [Cargo](https://crates.io/crates/anda). + -### Language Support in Editors + You are now in the Terra Dev Container, and have all the packages and + configuration necessary to start building packages! + + + If you're on atomic system, or otherwise prefer to work with containers, you can run the Terra build container as your development environment. -The most common languages you will see: + Simply run: -- RPMSPEC (`.spec`), for the package build scripts -- rhai, for the auto-update scripts -- hcl, for informing `anda` of the package -- xml, for AppStream MetaInfo on some packages + ```sh + podman run --rm --cap-add=SYS_ADMIN --privileged --volume ./:/anda --volume mock_cache:/var/cache/mock --workdir /anda ghcr.io/terrapkg/builder:frawhide anda + ``` + + -VSCode should prompt you to install these extensions, and Zed should auto-install them. -If not/using a different IDE, we suggest installing language support for each of these. + ### Writing sources