solus_noob
Posts: 22
Joined: Mon Mar 07, 2016 6:59 pm

YAML files review

Wed Mar 09, 2016 1:03 pm

Hello,

I read on the Solus site that Solus make packaging simple with evobuild. So I decided to give it a try. I never packaged anything. Yesterday evening I choose to give a try to the Rust language, so this morning I thought "let's try to package it". I read the tutorial and in few minutes I get a YAML file.

I was impressed by how simple this was ! So I decided to start this thread to review the YAML files of the packaging noobs like me. The goal is to help people new in packaging, ensure the quality of the files, and let the Solus dev add the package when they are ok. I know we can send an e-mail to get the right to publish packages, but for those who start packaging or just want package stuff casually this thread will be useful.

this is my rustc.yml file :

Code: Select all

name       : rustc
version    : 1.7.0
release    : 1
homepage   : https://www.rust-lang.org/
source     :
    - https://static.rust-lang.org/dist/rustc-1.7.0-src.tar.gz : 6df96059d87b718676d9cd879672e4e22418b6093396b4ccb5b5b66df37bf13a
license    : Apache-2.0 MIT
summary    : the rust language compiler
builddeps  :
 - clang
 - python
 - git
 - make
 - curl
description: |
    Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.
setup      : |
    ./configure
build      : |
    %make
install    : |
    %make_install
I don't find how to use pkgconfig() format. Also I substituted the %configure macro with ./configure as the first give me an error.

Here a possible YAML for cargo:

Code: Select all

name       : cargo
version    : 1.7.0
release    : 1
homepage   : http://doc.crates.io/
source     :
    - https://github.com/rust-lang/cargo/archive/master.zip : ba6b24da9efae073f2885c59b972d9fea84f76858039f2d638d7edaeb8158d08
license    : Apache-2.0 MIT
summary    : the rust language package manager
builddeps  :
 - rustc
 - python
 - cmake
 - openssl-devel
 - curl
description: |
    Cargo downloads your Rust project’s dependencies and compiles your project.
setup      : |
    %configure
build      : |
    %make
install    : |
    %make_install

User avatar
Justin
Development Team
Posts: 3613
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: YAML files review

Thu Mar 10, 2016 12:54 am

Awesome work, a few pointers

The system.devel component contains a lot of the build tools like cmake etc already, so they aren't necessary to include in your build dependencies, you can see the full list by using the following in terminal:

Code: Select all

eopkg la -c system.devel
Rust is already packaged but a good starter to get used to the packaging format :)

When something is dual licensed it can also be listed like so:

Code: Select all

license    :
    - Apache 2.0
    - MIT
Indentation of 4 spaces looks a lot nicer and aligns better :)

If you do have to remove the %configure macro (which does happen) please do the following as it ensures all binaries go into /usr/bin/ and libraries in /usr/lib etc:

Code: Select all

./configure --prefix=/usr 

solus_noob
Posts: 22
Joined: Mon Mar 07, 2016 6:59 pm

Re: YAML files review

Thu Mar 10, 2016 2:45 pm

Thx for your answer, this is a new one :

Code: Select all

name       : intel-gpu-tools
version    : 1.14
release    : 1
homepage   : https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
source     :
    - https://github.com/ChrisCummins/intel-gpu-tools/archive/wip/gen_regions-license.zip : 5e4b769a917ab8c2d5ba8f31d5bc9526ab32abecc1342223ba8d1824c2fbad26
license    : MIT
summary    : Tools for development and testing of the Intel DRM driver
builddeps  :
    - util-macros
    - libpciaccess-devel
    - libcairo-devel 
    - libdrm-devel
    - libunwind-devel
    - swig
    - python3-devel
description: |
    Tools for development and testing of the Intel DRM driver
setup      : |
    ./autogen.sh
build      : |
    %make
install    : |
    %make_install

User avatar
Justin
Development Team
Posts: 3613
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: YAML files review

Thu Mar 10, 2016 10:23 pm

Awesome, are you submitting these to the bug tracker as git patches to be included in the repository?

Side note, try use pkgconfig dependencies, for instance python3-devel, to find the pkgconfig name, do:

Code: Select all

eopkg info python3-devel
For most -devel you'll find a line like this:

Code: Select all

Provides            : pkgconfig(python-3.5) 
So instead of python3-devel you'll have:

Code: Select all

builddeps  :
    - pkgconfig(python-3.5)

underscoreDje
Posts: 7
Joined: Wed Feb 24, 2016 3:22 pm
Location: France

Re: YAML files review

Fri Mar 11, 2016 9:42 am

Hi Justin,

I build some packages too (SDL_ttf, SDL_gfx, xvidcore, ufoai) with the stable repo and i wonder how to submit it.

if it is possible, can you explain it ? (Sorry, but the wiki is not clear about it, unless you are a repo maintener).

Thanks

solus_noob
Posts: 22
Joined: Mon Mar 07, 2016 6:59 pm

Re: YAML files review

Fri Mar 11, 2016 10:55 am

Thx for your answer and for correcting my mistake.
Awesome, are you submitting these to the bug tracker as git patches to be included in the repository?
As underscoreDje say, you are not clear about the process to get our file/package included in the repository, so I started this thread to submit it.

User avatar
Justin
Development Team
Posts: 3613
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: YAML files review

Fri Mar 11, 2016 11:38 am


solus_noob
Posts: 22
Joined: Mon Mar 07, 2016 6:59 pm

Re: YAML files review

Fri Mar 11, 2016 11:54 am

Thx you I will try to package Kodi to try.

EDIT : Kodi need libmysqlclient-dev, not currently in repos

Here is what I already did:

Code: Select all

name       : kodi
version    : 16.0
release    : 1
homepage   : https://kodi.tv
source     :
    - https://github.com/xbmc/xbmc/archive/16.0-Jarvis.tar.gz : 0421ea1337cdee674f8a36d995f54152b5ddc4100e53410b3aeeb3b3f7d53946
license    : GPL-2.0
summary    : Kodi (formerly XBMC) is an award-winning free and open source software media center 
description: |
    Kodi (formerly XBMC) is an award-winning free and open source software media center
builddeps:
    - swig
    - openjdk-8
    - libboost-devel
    - pkgconfig(glew)
setup      : |
    ./bootstrap
    %configure
build      : |
    %make
install    : |
    %make_install
Last edited by solus_noob on Fri Mar 11, 2016 1:08 pm, edited 4 times in total.

underscoreDje
Posts: 7
Joined: Wed Feb 24, 2016 3:22 pm
Location: France

Re: YAML files review

Fri Mar 11, 2016 12:08 pm

Yeah, thanks!

An other question:
Is there components which are not listed in 'eopkg lc' ?

For example, "eopkg info sdl1" says "component: multimedia.library". This component is not listed by "eopkg lc"

solus_noob
Posts: 22
Joined: Mon Mar 07, 2016 6:59 pm

Re: YAML files review

Fri Mar 11, 2016 5:07 pm

Hi,

I wanted to make my "intel_gpu_tools" file to the pkg-config format but I have a problem with python:

sudo eopkg info python3-devel:

Code: Select all

Package found in Solus repository:
Name                : python3-devel, version: 3.5.1, release: 9
Summary             : Development files for python3
Description         : The Python 3 package contains the Python development
                      environment. This is useful for object-oriented
                      programming, writing scripts, prototyping large programs
                      or developing entire applications.
Licenses            : Python-2.0
Component           : programming.devel
Provides            : pkgconfig(python-3.5) 
Dependencies        : python3 glibc 
Distribution        : Solus, Dist. Release: 1
Architecture        : x86_64, Installed Size: 552.00 KB, Package Size: 121.00
                      KB
but when i put pkgconfig(python-3.5) in my yml:

Code: Select all

Warning: build dep does not exist in repo: python-3.5
Requested build dep does not exist! python-3.5
here is my new file:

Code: Select all

name       : intel-gpu-tools
version    : 1.3
release    : 1
homepage   : https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
source     :
    - https://github.com/ChrisCummins/intel-gpu-tools/archive/intel-gpu-tools-1.3.tar.gz : 2ddd2126fd849ca1e067a289f55b73c392d5fac5acf0400dd2c578010b26106c
license    : MIT
summary    : Tools for development and testing of the Intel DRM driver
builddeps  :
    - pkgconfig(xorg-macros)
    - pkgconfig(pciaccess)
    - pkgconfig(cairo)
    - pkgconfig(libdrm)
    - pkgconfig(libunwind)
    - swig
    - python3-devel
description: |
    Tools for development and testing of the Intel DRM driver
setup      : |
    ./autogen.sh
build      : |
    %make
install    : |
    %make_install

Return to “Engagement”