Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a profile #457

Open
latot opened this issue Mar 23, 2017 · 23 comments
Open

Make a profile #457

latot opened this issue Mar 23, 2017 · 23 comments

Comments

@latot
Copy link

latot commented Mar 23, 2017

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
Copy link
Collaborator

kiwifb commented Mar 23, 2017

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
Copy link
Author

latot commented Mar 23, 2017

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
Copy link
Author

latot commented Mar 23, 2017

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
Copy link
Collaborator

kiwifb commented Mar 23, 2017

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
Copy link
Collaborator

kiwifb commented Mar 23, 2017

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

@Alessandro-Barbieri
Copy link
Contributor

Alessandro-Barbieri commented May 9, 2017

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
Copy link
Collaborator

kiwifb commented May 9, 2017

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
Copy link
Contributor

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
Copy link
Collaborator

kiwifb commented May 10, 2017

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
Copy link
Contributor

OK

@latot
Copy link
Author

latot commented May 12, 2017

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
Copy link
Contributor

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

comments & reviews accepted

@kiwifb
Copy link
Collaborator

kiwifb commented May 28, 2017

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
Copy link
Contributor

Alessandro-Barbieri commented May 29, 2017

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

@kiwifb
Copy link
Collaborator

kiwifb commented May 29, 2017

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
Copy link
Collaborator

kiwifb commented May 29, 2017

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
Copy link
Contributor

@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
Copy link
Contributor

Alessandro-Barbieri commented May 29, 2017

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

@latot
Copy link
Author

latot commented May 29, 2017

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
Copy link
Author

latot commented May 29, 2017

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

@Alessandro-Barbieri
Copy link
Contributor

Alessandro-Barbieri commented May 29, 2017

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

@Alessandro-Barbieri
Copy link
Contributor

Should I pull request or whatever?

@kiwifb
Copy link
Collaborator

kiwifb commented Jun 1, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants