Skip to content

Instantly share code, notes, and snippets.

@jasonehines
Last active January 18, 2023 13:44
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jasonehines/5a40c8996943be402e8e39cb9816a20f to your computer and use it in GitHub Desktop.
Save jasonehines/5a40c8996943be402e8e39cb9816a20f to your computer and use it in GitHub Desktop.

Solus packaging cheat sheet

Setup

Install required packages

  • sudo eopkg install -c system.devel
  • sudo eopkg install git solbuild
  • sudo eopkg install solbuild-config-unstable

Create repository directory

  • mkdir ~/repository
  • cd ~/repository

Initialize unstable image

  • sudo solbuild init

Clone 'Common' packaging scripts

  • git clone https://git.solus-project.com/common

Create symlinks

  • ln -sv common/Makefile.common .
  • ln -sv common/Makefile.toplevel Makefile
  • ln -sv common/Makefile.iso .

Create alias to yauto.py

Edit your .bashrc or .zshrc

alias fetchYml="$HOME/repository/common/Scripts/yauto.py"

Setup git

  • git config --global user.name "Full Name"
  • git config --global user.email test@example.com

Create packager file

  • mkdir ~/.solus

  • nano ~/.solus/packager

    [Packager]
    Name=Full Name
    Email=test@example.com
    

Packaging

Create package

Setup directory for package (in repository directory)

  • sudo solbuild update
  • mkdir some-application
  • cd some-application
  • git init
  1. Go to releases page and copy link to release tarball
  2. fetchYml https://git.somesite.com/some-application-1.0.tar.gz

Edit package.yml

  • Check name, version and license. (Any changes to packages need the release number incremented)

  • Fill in component (get list of components to choose from eopkg lc)

  • Fill in summary and description (may be the same)

  • Fill in builddeps (you don't have to define anything that is already in system.devel)

    • eopkg search some-application-dependency-devel

    • eopkg info some-application-dependency-devel

    • Select an item from the Provides section and set builddeps to the value

      builddeps:
         - chossen-packageconfig(some-dependancy-1.0)
         - chossen-packageconfig(some-other-dependancy-1.0)
      

      Setup macros (if necessary)

      • Choose setup
      • Choose build
      • Choose install

    Advanced Packaging

    1. mkdir files
    2. touch files/example
    Install
    • install -Dm00644 $pkgfiles/example $installdir/usr/share/doc/some-application/examplefile

Build package

  1. echo "include ../Makefile.common" > Makefile
  2. make
  3. ls eopkg some-application.eopkg

Commit package

  1. make clean
  2. git status
  3. git add *
  4. git commit
    • Set commit message (if it's the initial commit, set the commit message toInitial commit of some-application)
  5. git format-patch -n1
  6. create task on Solus Dev tracker
    • title some-application (do not assign anyone the task)
    • fill in description Initial inclusion of some-application
      • upload 0001-Initial-commit-of-some-appliction.patch
    • set Tags to Patch Submission
    • click create
@Felix-fh
Copy link

Felix-fh commented Apr 9, 2020

Hi, the link for the macros seems to be invalid (and that is the step where my buildprocess is currently aborting) is there an alternative explanation how to set up those?
also I am pretty fresh to building a package in solus so sorry if I am missing something obvious

ok maybe this was the section you were referring to? https://getsol.us/articles/packaging/package.yml/en/ (just the domain changed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment