Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 51 additions & 11 deletions docs/packaging/prepare-for-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Prepare for Packaging
summary: Quick guide on getting your system set up for packaging on Solus
sidebar_position: 1
---

# Prepare for packaging

## Switch to the Unstable repository
Expand Down Expand Up @@ -120,9 +119,17 @@ After cloning your repository, create a symlink to source the helper functions f

```bash
mkdir -p ~/.bashrc.d
chmod 700 ~/.bashrc.d
ln -s ~/solus-packages/common/Scripts/helpers.sh ~/.bashrc.d/solus-monorepo-helpers.sh
source ~/.bashrc
```

:::note

By default, the system will load all files in `~/.bashrc.d` through code in `.bashrc`

:::

### fish

```bash
Expand All @@ -132,25 +139,58 @@ ln -s ~/solus-packages/common/Scripts/helpers.fish ~/.config/fish/conf.d/solus.f

### zsh

:::note

If you already have a customized `.zshrc` or config for `zsh`, you'll need to adapt these commands or edit your config by hand (e.g. instead of using the `cat` command)

:::

```bash
mkdir -p ~/.zshrc.d
printf "\nfpath=(~/.zshrc.d \$fpath)" >> ~/.zshrc
chmod 700 ~/.zshrc.d
cat <<eos >>! ~/.testrc
fpath=(\$HOME/.zshrc.d \$fpath)
autoload -U \$HOME/.zshrc.d/*
source \$HOME/.zshrc.d/solus-monorepo-helpers.zsh

eos

source ~/.zshrc
ln -s ~/solus-packages/common/Scripts/helpers.zsh ~/.zshrc.d/solus-monorepo-helpers.zsh
```

This is what you need in your `.zshrc` (or another file loaded by `zsh`)

:::note

You may have more than what is shown here if you have customized things

:::

```bash
fpath=($HOME/.zshrc.d $fpath)
autoload -U $HOME/.zshrc.d/*
source $HOME/.zshrc.d/solus-monorepo-helpers.zsh
```

Verify that `$fpath` contains the needed directory with:

```bash
echo $fpath | grep .zshrc.d
```

---

You should now have the following available from your shell:

| Function | Description | Usage |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| **cpesearch** | Search for CPE Names for packages. For use when writing the [`monitoring.yml`](/docs/packaging/monitoring.yml.md) file for a package | `cpesearch search-term` |
| **goroot** | When in the Solus packages repository, change directory to the root directory. | `goroot` |
| **gotopkg** | Change directory to any Solus package. You can type part of the package name then double press `Tab` to get autocompletion for this function. | `gotopkg firefox` |
| **gotosoluspkgs** | Change directory to the Solus packages repository from anywhere on the filesystem. | `gotosoluspkgs` |
| **whatprovides** | Find out what package provides a library by reading the `abi_libs` files. | `whatprovides libfoobar.so.1` |
| **whatuses** | Find out what packages use a library by reading the `abi_used_libs` files. | `whatuses libfoobar.so.1` |

| Function | Description | Usage |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| **cpesearch** | Search for CPE Names for packages. For use when writing the[`monitoring.yml`](/docs/packaging/monitoring.yml.md) file for a package | `cpesearch search-term` |
| **goroot** | When in the Solus packages repository, change directory to the root directory. | `goroot` |
| **gotopkg** | Change directory to any Solus package. You can type part of the package name then double press`Tab` to get autocompletion for this function. | `gotopkg firefox` |
| **gotosoluspkgs** | Change directory to the Solus packages repository from anywhere on the filesystem. | `gotosoluspkgs` |
| **whatprovides** | Find out what package provides a library by reading the`abi_libs` files. | `whatprovides libfoobar.so.1` |
| **whatuses** | Find out what packages use a library by reading the`abi_used_libs` files. | `whatuses libfoobar.so.1` |

## Building packages

Expand Down