cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
83 stars 26 forks source link

Make a profile #457

Open latot opened 7 years ago

latot commented 7 years ago

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.

kiwifb commented 7 years ago

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.

latot commented 7 years ago

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 commented 7 years ago

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

kiwifb commented 7 years ago

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 commented 7 years ago

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

Alessandro-Barbieri commented 7 years ago

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

kiwifb commented 7 years ago

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.

Alessandro-Barbieri commented 7 years ago

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

kiwifb commented 7 years ago

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.

Alessandro-Barbieri commented 7 years ago

OK

latot commented 7 years ago

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.

Alessandro-Barbieri commented 7 years ago

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

comments & reviews accepted

kiwifb commented 7 years ago

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....)

Alessandro-Barbieri commented 7 years ago

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

kiwifb commented 7 years ago

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 commented 7 years ago

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.

Alessandro-Barbieri commented 7 years ago

@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 commented 7 years ago

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

TODO

latot commented 7 years ago

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 commented 7 years ago

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

Alessandro-Barbieri commented 7 years ago

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

Alessandro-Barbieri commented 7 years ago

Should I pull request or whatever?

kiwifb commented 7 years ago

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!