xteven
Posts: 4
Joined: Fri Dec 29, 2017 12:58 am

You have to overwrite the make file to build a package?

Sun Dec 31, 2017 5:58 am

I'm a little confused... It says in https://solus-project.com/articles/pack ... ackage/en/ to call:

echo "include ../Makefile.common" > Makefile

But doesn't that overwrite the original make file?

User avatar
kyrios
Posts: 1522
Joined: Thu Sep 22, 2016 4:20 pm

Re: You have to overwrite the make file to build a package?

Sun Dec 31, 2017 10:44 am

xteven wrote:
Sun Dec 31, 2017 5:58 am
I'm a little confused... It says in https://solus-project.com/articles/pack ... ackage/en/ to call:

echo "include ../Makefile.common" > Makefile

But doesn't that overwrite the original make file?
Nope because this is your local repository not the location where the source file is extracted and built.
When you make a new package, the directory will only contain 2 files :
  • Makefile
  • package.yml
then when your package is successfully built, a few other files will be generated: like pspec_x86_64.xml, abi_used_libs, ...

So basically you create a directory for your local repository (on my machine, I named it repo)
Inside that directory, you clone common, which will create a common sub-directory and you create the symbolic links
Then still inside repo, you create a directory for the package you want to build (or you clone an existing package you want to update). Let's call it borg.
Inside borg, you create the Makefile you are talking about and you create the package.yml.
At the end you have something like this:

Code: Select all

repo/
|-- common/
|-- Makefile
|-- Makefile.common
|-- Makefile.iso
|-- borg/
    |-- Makefile
    |-- package.yml
And here is the final result : https://dev.solus-project.com/source/bo ... se/master/

xteven
Posts: 4
Joined: Fri Dec 29, 2017 12:58 am

Re: You have to overwrite the make file to build a package?

Tue Jan 02, 2018 6:54 pm

So I setup my package directory with only a makefile and a YAML file and I ran "make".
It displays an error which is equivalent to the error I get if I did not run the "setup" section of my YAML file.
That leads me to believe that the "setup" section of my YAML file was ignored. Is my suspicion correct?
If so, please tell me how to put lines of code which are to be executed before building.

P.S. - I followed https://solus-project.com/articles/pack ... ge.yml/en/ as well as I can.

User avatar
kyrios
Posts: 1522
Joined: Thu Sep 22, 2016 4:20 pm

Re: You have to overwrite the make file to build a package?

Tue Jan 02, 2018 7:06 pm

xteven wrote:
Tue Jan 02, 2018 6:54 pm
So I setup my package directory with only a makefile and a YAML file and I ran "make".
It displays an error which is equivalent to the error I get if I did not run the "setup" section of my YAML file.
That leads me to believe that the "setup" section of my YAML file was ignored. Is my suspicion correct?
If so, please tell me how to put lines of code which are to be executed before building.

P.S. - I followed https://solus-project.com/articles/pack ... ge.yml/en/ as well as I can.
When you type make, it executes what is defined in your package.yml. If you have a setup section, it will be executed. Everything i displayed on the screen.

Here is the output of a package I did just rebuild.
Line 65 : [Build] Running step: setup
Line 232 : [Build] setup successful
Line 233 : [Build] Running step: build
Line 451 : [Build] build successful
Line 452 : [Build] Running step: install
Line 554 : [Build] install successful
Line 555 : [Build] Running step: check
Line 2649 : [Build] check successful

So you see it's very clear.

xteven
Posts: 4
Joined: Fri Dec 29, 2017 12:58 am

Re: You have to overwrite the make file to build a package?

Sun Jan 07, 2018 5:34 am

OK thanks for your patience. I think the real issue now is that I don't know how to actually use solbuild.
I can't seem to find any online guides so would you be so kind to provide me with the actual process of creating a package.
Or you can just provide me a link to a website.
Thank you so much! :D

User avatar
kyrios
Posts: 1522
Joined: Thu Sep 22, 2016 4:20 pm

Re: You have to overwrite the make file to build a package?

Sun Jan 07, 2018 10:11 am

xteven wrote:
Sun Jan 07, 2018 5:34 am
OK thanks for your patience. I think the real issue now is that I don't know how to actually use solbuild.
I can't seem to find any online guides so would you be so kind to provide me with the actual process of creating a package.
Or you can just provide me a link to a website.
Thank you so much! :D
Just watch the video tutorial, it's a straightforward way for learning packaging and setting up the environment.

Return to “Packaging”