sage-on-gentoo icon indicating copy to clipboard operation
sage-on-gentoo copied to clipboard

Make a profile

Open latot opened this issue 7 years ago • 23 comments

Hi all, well reading i found the instructions here are little complates, or in other is possible simplify it, so i want propose make a custom profile with the keywords and USE packages, to use it you need make it normally and then in /etc/portage/make.profile we edit the file parent, there we put the profiles we want to use, i use this for example:

cat parent
gentoo:hardened/linux/amd64
gentoo:default/linux/amd64/13.0/desktop/gnome/systemd

Thx. Cya.

latot avatar Mar 23 '17 18:03 latot

Are you suggesting we provide some profiles including the material for sage-on-gentoo? I would have to to provide an alternative for all possible profiles. Lots of work, lots of maintenance. We already have a relatively good keyword and use files for you to use. I guess I could add a set.

kiwifb avatar Mar 23 '17 19:03 kiwifb

Hi, yes i think would be great, but you don't need include a lot of profiles, i think just 2, one profile for general propose, and the other include at the same time as the first for unstable systems, like in the first case:

sage-on-gentoo:sage-on-gentoo/stable

second

sage-on-gentoo:sage-on-gentoo/stable
sage-on-gentoo:sage-on-gentoo/unstable

And then you can keep working similar as now.

latot avatar Mar 23 '17 19:03 latot

i think you need to do is write the default profiles and then put the keywords, use, etc files there and should be ready.

latot avatar Mar 23 '17 19:03 latot

You cannot have several profile at once. In your proposal if I switch to sage-on-gentoo/stable from, say, default/linux/amd64/13.0/desktop/plasma/systemd then I will lose all the settings from that original profile. Which is why I said I would need to do a lot of profiles because I would have to "augment" existing ones.

The only thing I can think for which a simple one like you are suggesting would be useful would be a dedicated sage server. Even then there would need to be more than two profiles in my opinion (hardened or not, systemd or openrc and I support exotic hardware, I actually run sage-on-gentoo in a ppc64 rap prefix...).

kiwifb avatar Mar 23 '17 20:03 kiwifb

There was a typo in my original post "you cannot have several profiles loaded at once".

kiwifb avatar Mar 23 '17 20:03 kiwifb

You can have multiple profiles, see https://wiki.gentoo.org/wiki/Profile_(Portage)#Combining_profiles An alternative solution is to add package[useflag] in the ebuild dependencies

UPDATE well, after viewing the keyword file, I think that using two profiles (stable and unstable) is the solution

Alessandro-Barbieri avatar May 09 '17 20:05 Alessandro-Barbieri

That link teaches you how to make a custom profile that would be a combination of two profiles, in a local overlay. Are you suggesting that I provide two profiles and let people combine the one they want with their current profile manually? I think that's a bad recipe.

I already have package[useflag] in my ebuild dependencies.

kiwifb avatar May 09 '17 21:05 kiwifb

Since the files will remain mostly the same but in another folder, the users will choose between the symlink method or the profiles method.

Alessandro-Barbieri avatar May 10 '17 03:05 Alessandro-Barbieri

Well, I am not sure I understand it. Feel free to make a PR for that feature, including documentation on how it should be used. As someone who had to write documentation for end user I'll be reviewing the documentation quite closely as at the moment I don't have a clue what you intend the procedure to be.

kiwifb avatar May 10 '17 03:05 kiwifb

OK

Alessandro-Barbieri avatar May 10 '17 03:05 Alessandro-Barbieri

Hi all, testing that Wiki and comparing with the method i post in my first post, i can confirm both works, i recommend use the first, i think is simpler than then wiki.

latot avatar May 12 '17 11:05 latot

I'm working on it in my branch https://github.com/Alessandro-Barbieri/sage-on-gentoo/tree/profile

comments & reviews accepted

Alessandro-Barbieri avatar May 28 '17 17:05 Alessandro-Barbieri

Some stuff in my own package.use are a bit obsolete and need refreshing (cython doesn't have a numpy useflag anymore for example, it should be safe to enable threads in ntl....)

kiwifb avatar May 28 '17 21:05 kiwifb

Another question: does sage/this overlay support all architectures?

Alessandro-Barbieri avatar May 29 '17 01:05 Alessandro-Barbieri

I try to as much as possible. Some stuff is not keyworded x86 because dependencies in the main tree aren't. But technically it should be supported. I also support prefix on linux. I have supported prefix on mac in the past but that is currently on hiatus. I also build on ppc64 myself - although there is a big problem with upstream giac on non x86, 64bit platforms right now [ppc64, arm64] but we are heading towards some solution for that particular problem.

kiwifb avatar May 29 '17 02:05 kiwifb

On that matter you may have noticed that a few weeks ago I removed some stuf in the science overlay that prevented you to use the blas/lapack on anything else than x86/x86_64. That was me upstreaming stuff that was blocking my work on ppc64.

kiwifb avatar May 29 '17 02:05 kiwifb

@latot my /etc/portage/make.profile is a symlink (to my custom profile but it's not the point) so if you edit it, you are editing a system file (that will be reset at the next portage update)

Alessandro-Barbieri avatar May 29 '17 13:05 Alessandro-Barbieri

Progress https://github.com/Alessandro-Barbieri/sage-on-gentoo/tree/profile and ready to be tried (I think)

TODO

  • [ ] add howto in README.rst

  • [ ] create profiles/updates/2Q-2017

Alessandro-Barbieri avatar May 29 '17 13:05 Alessandro-Barbieri

mini tutorial:

rm /etc/portage/make.profile (remember your profile and the overlay (custom or main tree)
mkdir /etc/portage/make.profile
touch /etc/portage/make.profile/parent

format: $SOURCE:$PROFILE

nano /etc/portage/make.profile/parent

in my case i use this:

gentoo:hardened/linux/amd64
gentoo:default/linux/amd64/13.0/desktop/gnome/systemd
Local-X:Local-X/overlay

following the same syntax (following the structure in your fork):

gentoo:YOUR PROFILE
sage-on-gentoo:releases/stable

I use this some ages ago, and when i update portage this don't is reset, so you only need do this one time, or when you want add some new profile or similar.

Cya.

latot avatar May 29 '17 18:05 latot

pentoo overlay use this, if you want you can check it https://github.com/pentoo/pentoo-overlay

latot avatar May 29 '17 18:05 latot

@latot OK this make more sense but eselect profile will still work?

Alessandro-Barbieri avatar May 29 '17 19:05 Alessandro-Barbieri

Should I pull request or whatever?

Alessandro-Barbieri avatar Jun 01 '17 09:06 Alessandro-Barbieri

I am travelling, but yes you can send a PR and I'll review it. Before you do the PR, I think you should add a short entry on the readme pointing to the documentation to use the profile. Mention that using it is optional as well. If you have already thought of that, fantastic!

kiwifb avatar Jun 01 '17 10:06 kiwifb