Keeping Sabayon's Portage files up-to-date

Anything that pertains to Portage

Moderator: Moderators

Keeping Sabayon's Portage files up-to-date

Postby rdnetto » Wed Nov 05, 2014 3:29

NOTE: As of 16.04, the script is no longer necessary for new installs. New installs symlink /etc/portage to /opt/sabayon-build/conf/intel/portage (which is a git repo), so you can just make your changes as normal and commit them.
For automatic updating, just
Code: Select all
! git -C /etc/portage pull
to /etc/eix-sync.conf and run:
Code: Select all
git config --add branch.autosetuprebase always
git config --add rebase.autosquash true
git config --add rebase.autostash true
git config --add branch.myconf.remote origin
git config --add branch.myconf.merge refs/heads/master
git config --add branch.myconf.rebase true


Instructions for older installs:

Hi,
By default, Sabayon installs several configuration files for Portage which are intended to reflect the settings used when creating packages for Entropy. However, these files are never updated, which can become problematic if you use Portage. For example, if your install is more than a year old, you probably have the following in your make.conf:
## FUCK KILL PYTHON 3 WITH FIRE ##
# Avoids python.eclass to compile stuff for Python 3
USE_PYTHON="2.7"
PYTHON_TARGETS="python2_7"


However, this hasn't applied to Entropy packages since January, which means that emerging affected packages would result in unobvious differences to the existing packages.

Ideally these files would be part of the entropy package, but that's a job for the maintainers (and somewhat tricky, I suspect, given that the files are stored in a different repository to entropy).
I've therefore written a short script for automatically updating these files. I suggest adding the following line to /etc/eix-sync.conf to call it:
! /var/lib/entropy/sync-entropy-files.sh


Hope someone finds this useful.

Script source.

EDIT: Added article to wiki.
Last edited by rdnetto on Fri Mar 25, 2016 10:32, edited 2 times in total.
rdnetto
Young Hen
 
Posts: 27
Joined: Sun Jun 23, 2013 10:06

Re: Keeping Sabayon's Portage files up-to-date

Postby Fitzcarraldo » Wed Nov 05, 2014 17:50

Interesting. Thanks for posting. If you have the time, it would be good if you would create an article in the SL Wiki and list the script in it too.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 8078
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Keeping Sabayon's Portage files up-to-date

Postby svantoviit » Thu Nov 06, 2014 21:22

Was wondering about these files too...
Thanks for your script rdnetto!
svantoviit
Old Dear Hen
 
Posts: 706
Joined: Sun Feb 28, 2010 17:55

Re: Keeping Sabayon's Portage files up-to-date

Postby rdnetto » Fri Nov 07, 2014 1:43

Fitzcarraldo wrote:Interesting. Thanks for posting. If you have the time, it would be good if you would create an article in the SL Wiki and list the script in it too.


I've added it to the wiki here.

I also added some info on committing changes so that they would be rebased on top of the default configuration, since getting prompted to revert your customizations is annoying.
rdnetto
Young Hen
 
Posts: 27
Joined: Sun Jun 23, 2013 10:06

Re: Keeping Sabayon's Portage files up-to-date

Postby svantoviit » Fri Nov 07, 2014 2:37

Found an issue in the script on line 9
Shouldn't it be rather
Code: Select all
[[ "$ARCH" == "i686" || "$ARCH" == "x86_64" ]] && ARCH="intel"
?

1. uname -m on a 64bit machine gives
Code: Select all
$ uname -m
x86_64

2. the contents of conf are
Code: Select all
$ ls conf/
armarch  armv6l  armv7l  home  intel  noarch
So with the original version you got an error (Unknown architecture…) because it was looking for non-existent directories and what you need is actually the intel directory.
svantoviit
Old Dear Hen
 
Posts: 706
Joined: Sun Feb 28, 2010 17:55

Re: Keeping Sabayon's Portage files up-to-date

Postby rdnetto » Fri Nov 07, 2014 12:39

svantoviit wrote:Found an issue in the script on line 9
Shouldn't it be rather
Code: Select all
[[ "$ARCH" == "i686" || "$ARCH" == "x86_64" ]] && ARCH="intel"
?

1. uname -m on a 64bit machine gives
Code: Select all
$ uname -m
x86_64

2. the contents of conf are
Code: Select all
$ ls conf/
armarch  armv6l  armv7l  home  intel  noarch
So with the original version you got an error (Unknown architecture…) because it was looking for non-existent directories and what you need is actually the intel directory.


Nice catch - looks like I managed to make two mistakes in the same line, which cancelled out on my system. :P
I've pushed the change to the original link.
rdnetto
Young Hen
 
Posts: 27
Joined: Sun Jun 23, 2013 10:06

Re: Keeping Sabayon's Portage files up-to-date

Postby reppk » Sun Mar 06, 2016 7:58

Structure of /etc seems changed now. Is this still work? How to do it in new version of Sabayon?
reppk
Baby Hen
 
Posts: 8
Joined: Thu Dec 24, 2015 13:41

Re: Keeping Sabayon's Portage files up-to-date

Postby rdnetto » Sun Mar 06, 2016 8:03

Changed how?
rdnetto
Young Hen
 
Posts: 27
Joined: Sun Jun 23, 2013 10:06

Re: Keeping Sabayon's Portage files up-to-date

Postby sabayonino » Sun Mar 06, 2016 9:47

rdnetto wrote:Changed how?


/etc
Code: Select all
 make.profile -> ../usr/portage/profiles/default/linux/amd64/13.0/desktop
portage -> /opt/sabayon-build/conf/intel/portage


Code: Select all
/opt/sabayon-build/conf/intel/portage $ ls -l
totale 60
drwxr-xr-x 2 root root   24 23 feb 12.40 bin
drwxr-xr-x 7 root root 4096  5 ott 19.39 env
lrwxrwxrwx 1 root root   15 29 feb 21.01 make.conf -> make.conf.amd64
-rw-r--r-- 1 root root 4430 23 ott 18.16 make.conf~
-rw-r--r-- 1 root root 5338 16 nov 10.42 make.conf.amd64
-rw-r--r-- 1 root root 4637  5 ott 19.39 make.conf.x86
-rw-r--r-- 1 root root  690  5 ott 19.39 NOTES
drwxr-xr-x 2 root root   24 29 feb 21.01 package.env
-rw-r--r-- 1 root root 5364  5 ott 19.39 package.env.amd64
-rw-r--r-- 1 root root 5470  5 ott 19.39 package.env.x86
drwxr-xr-x 2 root root   16  5 ott 19.39 package.keywords
-rw-r--r-- 1 root root 2204  5 ott 19.39 package.license
drwxr-xr-x 2 root root   16  5 ott 19.39 package.mask
drwxr-xr-x 2 root root   16  5 ott 19.39 package.unmask
drwxr-xr-x 2 root root   40 28 gen 13.42 package.use
drwxr-xr-x 2 root root   24 23 feb 12.40 postsync.d
drwxr-xr-x 3 root root   56  5 ott 19.39 profile
drwxr-xr-x 2 root root   24 28 gen 19.28 repo.postsync.d
drwxr-xr-x 2 root root   40 29 feb 21.01 repos.conf
drwxr-xr-x 4 root root   16 23 feb 12.40 savedconfig
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)
User avatar
sabayonino
Sagely Hen
 
Posts: 3018
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Keeping Sabayon's Portage files up-to-date

Postby svantoviit » Sun Mar 06, 2016 11:34

It should work just fine on a new system.
In older systems /etc needs to be updated accordingly the changes in portage file structure.
I use my version of the script which fixes a small issue with an undefined variable and it works for the files I chose:

Code: Select all
remote: Counting objects: 44, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 44 (delta 18), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (44/44), done.
From https://github.com/Sabayon/build
   8a12c32..97b8650  master     -> origin/master
First, rewinding head to replay your work on top of it...
Applying: modified:   conf/intel/portage/make.conf.amd64
Applying: modified:   conf/intel/portage/make.conf.amd64
Applying: Add portage rules
Applying: Add local rules
Updating Sabayon portage files...
WARNING: Skipping make.conf.x86
WARNING: Skipping NOTES
WARNING: Skipping package.env.amd64
WARNING: Skipping package.env.x86
WARNING: Skipping package.license
WARNING: Skipping env/apache.conf
WARNING: Skipping env/damn.sse3.conf
WARNING: Skipping env/damn.sse.conf
WARNING: Skipping env/disable.debug.conf
WARNING: Skipping env/disable.debug+userpriv.conf
WARNING: Skipping env/disable.userpriv.conf
WARNING: Skipping env/ggdb.amd64.conf
WARNING: Skipping env/ggdb.x86.conf
WARNING: Skipping env/hardened.conf
WARNING: Skipping env/linguas-en.conf
WARNING: Skipping env/nographite.amd64.conf
WARNING: Skipping env/nographite.x86.conf
WARNING: Skipping env/O3.amd64.conf
WARNING: Skipping env/O3.amd64.notest.conf
WARNING: Skipping env/O3.x86.conf
WARNING: Skipping profile/package.provided
WARNING: Skipping profile/use.mask
WARNING: Skipping env/dev-lang/python
WARNING: Skipping env/gnome-extra/nm-applet
WARNING: Skipping env/media-tv/mythtv
WARNING: Skipping env/sys-boot/grub
WARNING: Skipping env/www-servers/apache
WARNING: Skipping profile/package.use.mask/00-sabayon.mask

Sabayon portage file changes:
90e21dd Add local rules
e8e647e Add portage rules
c90966f modified:   conf/intel/portage/make.conf.amd64
7749638 modified:   conf/intel/portage/make.conf.amd64
97b8650 [intel/portage] Mask portage version of sys-apps/lsb-release
278717b [intel/portage] enabling dracut on linux-sabayon
52ee3a9 [intel/repo] bumping portage version in critical packages
2c96b76 [intel/portage] Enable xmpp use on net-misc/asterisk
10f556a [armarch/portage] -qt5 to net-p2p/qbittorrent
4178a34 Revert "[armhfp/portage] removing -k from make.conf"
8d75445 [intel/portage] Disable cdr on mate-extra/caja-extensions

╠  @@ Scanning filesystem...
╠ Found update: /etc/portage/package.use/._cfg0000_00-sabayon.package.use
╠ Found update: /etc/portage/package.mask/._cfg0000_00-sabayon.package.mask
╠ (1) file: /etc/portage/package.mask/._cfg0000_00-sabayon.package.mask
╠ (2) file: /etc/portage/package.use/._cfg0000_00-sabayon.package.use
╠ Please choose a file to update by typing its identification number.
╠ Other options are:
╠   (-1) Exit
╠   (-3) Automerge all the files asking you one by one
╠   (-5) Automerge all the files without questioning
╠   (-7) Discard all the files asking you one by one
╠   (-9) Discard all the files without questioning
Your choice (type a number and press enter): 1
svantoviit
Old Dear Hen
 
Posts: 706
Joined: Sun Feb 28, 2010 17:55

Next

Return to Portage|Emerge Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest

cron