How to build own (local) Sabayon packages?

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

How to build own (local) Sabayon packages?

Postby linuxfluesterer » Tue Apr 11, 2017 17:47

Hallo repo administrators.
I have three computers, all run by Sabayon Linux (latest version of Plasma with 5.9.4 and Kernel differing from 4.8.17 to 4.9.16). I have some programs (e.g. handbrake) which I use at one computer, where portage is installed on.
But I don't want to install portage on the other computers also to install handbrake or mediathekview by portage.

So my question: Is there any way to build a Sabayon package for an (already installed) program on a computer? And is it possible to copy this package onto another computer, to install it with:
Code: Select all
equo i packagename.tbz2

And: will equo then check for dependencies on the target computer also?
Thank you in advance.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...
User avatar
linuxfluesterer
Old Dear Hen
 
Posts: 763
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: How to build own (local) Sabayon packages?

Postby sabayonino » Tue Apr 11, 2017 18:55

yes . you can do it
if handbrake was installed from portage and you ran "equo rescue spmsync", yuo can build your own package(s)

Code: Select all
# equo pkg quickpkg <package> <package>...


see equo help command

files will be stored to /var/tmp/entropy...

if you need to save to other directory , keep in mind to create category structure for a/all package you need (see --savedir option)

extract installed packages category
Code: Select all
equo q list installed -q | awk -F"/" '{print $1}' | uniq | sort


Create categories
Code: Select all
cd ~/test && equo q list installed -q | awk -F"/" '{print $1}' | uniq | sort | xargs mkdir -p


Code: Select all
equo pkg quickpkg --savedir=~/test handbrake


you can also build your package via emerge (pkgbuild) or entropy (see equo pkg --help command)


[edit] Build firefox local package
Code: Select all
# equo smart quickpkg firefox
╠  ## [www-client/firefox-52.0.1-r1] Pacchetto generato: /var/tmp/entropy/www-client/www-client:firefox-52.0.1-r1.d2c6a933d11dfce701241d04a22a0079abb8ee24~0.tbz2


Build firefox package and save generated package to ~/packages
Code: Select all
# mkdir -p ~/packages/www-client  && sudo equo smart quickpkg --savedir ~/packages firefox
╠  ## [www-client/firefox-52.0.1-r1] Pacchetto generato: /home/saba/packages/www-client/www-client:firefox-52.0.1-r1.d2c6a933d11dfce701241d04a22a0079abb8ee24~0.tbz2


Move/copy package to another pc and install :
Code: Select all
# equo i /home/saba/packages/www-client/www-client:firefox-52.0.1-r1.d2c6a933d11dfce701241d04a22a0079abb8ee24~0.tbz2


Code: Select all
╠  @@ calcolo delle dipendenze...
╠  ## [R] [sabayonlinux.org->www-client:firefox-52.0.1-r1.d2c6a933d11dfce701241d04a22a0079abb8ee24~0.tbz2] www-client/firefox-52.0.1-r1|0   [52.0.1-r1|0]
╠  @@ Pacchetti che richiedono di essere installati/aggiornati/retrocessi: 1
╠  @@ Pacchetti da rimuovere: 0
╠  @@ Dimensione download: 0b
╠  @@ Spazio su disco liberato: 0.0b
╠  @@ Hai bisogno di almeno: 111.0MB di spazio libero
╠  ::: >>>  (1/1) 1 pacchetto
╠  +++ >>>  (1/1) www-client/firefox-52.0.1-r1
╠    ## Scompattamento: www-client:firefox-52.0.1-r1.d2c6a933d11dfce701241d04a22a0079abb8ee24~0.tbz2
╠    ## Fase pacchetto: setup
[...]


if packages need some needed libarries/dpendencies it will download this automatically if available

a usefull alternative atom-backup for a offline pc is to save current entropy database
Code: Select all
# equo rescue backup


create a full tarballs of installed packages
Code: Select all
# equo pkg quickpkg $(equo q list installed -qv)


restore backup :
Code: Select all
# equo rescue restore
(choose a entropy backup)


and restore all generated tarballs
Code: Select all
# find /yor/tarbalss/dir  -type f -name '*.tbz2' -exec equo i {} \;


or
Code: Select all
 find /your/tarballs/dir  -type f -name '*.tbz2' | xargs equo i
User avatar
sabayonino
Sagely Hen
 
Posts: 2887
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: How to build own (local) Sabayon packages?

Postby sabayonino » Wed Apr 12, 2017 12:14

Simple "Atomic" backup startegy with equo (can take a while...)

Backup

From Portage to Entropy
Code: Select all
# equo rescue spmsync


Save all your configuration
Code: Select all
# equo sec oscheck --assimilate

(usefull to keep your configuration)

Backup current entropy database
Code: Select all
# equo rescue backup


Generate all tarballs for all packages installed (or which you needed)
Code: Select all
# equo pkg quickpkg $(equo q list installed -qv)




Restore

Restore backup
Code: Select all
# equo rescue restore


Install all tarballs
Code: Select all
# find /packages/directory -type f -name '*.tbz2' | xargs equo i

or
Code: Select all
#  find /packages/directory -type f -name '*.tbz2'  -exec equo i {} \;


check your system
Code: Select all
# equo deptest && equo libtest


PS : if you want to save tarballs on to alternative dirs (using equo pkg quickpkg --savedir=/path/to/save , keep in mind you need to make categories dir
Code: Select all
CATEGORY=$(equo q list installed -q | awk -F"/" '{print $1}')

Code: Select all
# cd /path/to/save && mkdir -p $(echo $CATEGORY)
User avatar
sabayonino
Sagely Hen
 
Posts: 2887
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: How to build own (local) Sabayon packages?

Postby linuxfluesterer » Wed Apr 12, 2017 13:33

Ciao Sabayonino.
Gracie (thank you) for your extensive and detailled instructions. I will have to try with and to learn to handle with the new usage of equo.
Anyway, that I can use equo (or any other command) with --help option does not mean, that I understand the contents of this command / the option. It doesn't mean, that I know, what exactly does the command.
I mostly learn by experimenting, by doing. But as we all know, a wrong parameter or else can destroy a lot.

Ciao...

-Linuxfluesterer (I love KDE ...)
Take away Facebook from me and let there be real people again...
User avatar
linuxfluesterer
Old Dear Hen
 
Posts: 763
Joined: Thu Sep 20, 2012 19:47
Location: Germany



Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron