You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/terra/contributing.mdx
+51-20Lines changed: 51 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,15 @@ import { Callout } from "nextra/components";
8
8
# Contributing
9
9
10
10
Thanks for contributing to Terra!
11
+
11
12
Terra is specifically designed to be as _package-maintainer-friendly_ as possible — you
12
13
don't need to know everything about the infrastructure to create a package for Terra!
13
14
See the following guide for creating a new package yourself. Quick and easy.
14
15
15
16
It's also ok to **suggest packages** to include into Terra, though it might take a while. (We're busy!)
16
17
17
18
Remember, it takes effort to create a package. If you ever need help, hop into
18
-
[our Discord server](https://discord.gg/5fdPuxTg5Q) and we will try to help you.
19
+
[our Discord server](https://fyralabs.com/discord) and we will try our best to help you.
19
20
20
21
## Creating a package
21
22
@@ -27,21 +28,42 @@ Remember, it takes effort to create a package. If you ever need help, hop into
27
28
28
29
### Preparation
29
30
30
-
- Install [Andaman] on your system and its mock configs
31
+
#### Fedora/Ultramarine
32
+
33
+
- Install [Andaman] and its mock configs on your system
31
34
-`[1;32msudo dnf[97m install [0;97;mterra-mock-configs{:ansi}` via Terra
32
35
- anda is also available via rust crates.io
33
36
- If on an atomic system, this command works using podman: `podman run --rm --cap-add=SYS_ADMIN --privileged --volume ./:/anda --volume mock_cache:/var/lib/mock --workdir /anda ghcr.io/terrapkg/builder:frawhide anda`
34
-
- Use `rust2rpm` for **Rust** packages
35
-
- Use `pyp2rpm` for **Python** packages
36
-
- Use `go2rpm` for **Go** packages
37
-
- else, find the source of the packages you are adding, preferably a URL to a `.tar.gz` archive
38
-
- multiple archives are ok
39
-
- non `.tar.gz` archives are also ok, but might require additional build dependencies
40
-
- we also prefer archives from git repositories
37
+
- Fork the [Terra sources repo](https://github.com/terrapkg/packages), and then `git clone` your fork.
38
+
- You are now ready for the [Writing Sources]([contributing#writing-sources](https://developer.fyralabs.com/terra/contributing#writing-sources)) section below.
39
+
40
+
#### Dev Container
41
+
42
+
You can create, build, and push a package all from within our Dev Container.
43
+
This means you do NOT need to be running Fedora/Ultramarine to create a package.
44
+
You can run this devcontainer from Linux, macOS, or Windows.
45
+
46
+
- If you're Visual Studio Code, open it and navigate to the Extensions menu located at the bottom of the left sidebar.
47
+
- Install [Docker](https://docs.docker.com/engine/install/). If you're on Linux, you'll need to enable the service and reboot.
48
+
- Fork the [Terra sources repo](https://github.com/terrapkg/packages), and `git clone` your fork.
49
+
- Open this folder in Visual Studio Code (File -> Open Folder).
50
+
- It should prompt you to `reopen in Dev Container,` click this and wait for the Dev Container to open. If it doesn't prompt you, press `Ctrl` + `Shift` + `P`, type `Reopen in Container`, and press `Enter`.
51
+
- You are now in the Terra Dev Container, and have all the packages and configuration necessary to start building packages!
52
+
53
+
#### Language Support in Editors
54
+
55
+
The most common languages you will see:
56
+
- RPMSPEC (`.spec`), for the package build scripts
57
+
- rhai, for the auto-update scripts
58
+
- hcl, for informing `anda` of the package
59
+
- xml, for appstream metainfo on some packages
60
+
61
+
VSCode should prompt you to install these extensions, and Zed should auto-install them.
62
+
If not/using a different IDE, we suggest installing language support for each of these.
41
63
42
64
### Writing sources
43
65
44
-
1. Fork/clone the [Terra sources repo](https://github.com/terrapkg/packages).
66
+
1. Fork the [Terra sources repo](https://github.com/terrapkg/packages), and `git clone` your fork.
45
67
1. Create a folder named after the package name, for example:
46
68
- A font named `lovelyfonttype` would go in `anda/fonts/lovelyfonttype`.
47
69
- A Pantheon DE package would go in `anda/desktops/elementary/`.
@@ -51,7 +73,7 @@ Remember, it takes effort to create a package. If you ever need help, hop into
51
73
- The name of the folder name actually is just for identifications for Terra package maintainers.
52
74
What matters is that the spec file name _must_ match with the package name defined in the spec file later.
53
75
This is a Fedora `mock` limitation.
54
-
- For more information, check out our [packaging policies](policy).
76
+
- For more information, check out our [packaging policies].
55
77
1. Edit `anda.hcl`, which tells [Andaman] how to build the package:
56
78
57
79
```hcl
@@ -66,10 +88,17 @@ Remember, it takes effort to create a package. If you ever need help, hop into
66
88
- It is a custom file format for RPM packages.
67
89
- This [RPM Packaging Guide] might help newbies with no prior experiences with RPM specs.
68
90
- This [Spec file format] docs goes into the details of the spec file format.
91
+
- You may use `rust2rpm` for **Rust** packages.
92
+
- You may use `pyp2rpm` for **Python** packages.
93
+
- You may use `go2rpm` for **Go** packages.
94
+
- Otherwise, find the source of the packages you are adding, preferably a URL to a `.tar.gz` archive
95
+
- Multiple archives are ok.
96
+
- Archives not in `.tar.gz` format are also okay, but might require extra work.
97
+
- Archives from git repositories are preferred.
69
98
70
99
#### Editing the Spec file
71
100
72
-
> TIP: Check out other spec files for other packages for some examples ;)
101
+
> TIP: Check out other spec files of related packages for some examples ;)
0 commit comments