Redcore Linux Project Forum

Unfortunately, no one can be told what Redcore Linux is. You have to see it for yourself!

You are not logged in.

#1 2024-02-02 10:34:40

Oleksa75
Member
From: Ukraine
Registered: 2023-03-24
Posts: 4

Fine tune-up after installation

Hello there!
First of all, thank you very much for the pretty hard work on new release.
I just want to know the best way – how to customize system after installation for my PC (in part of hardware and software)
KPIs:

1) I want to use march=native for top packages
2) To add (restore) graphite feature for GCC
3) To add polly for clang
4) Recompile some packages for multi-threads bzip2 support
etc

I know that I need manipulate with USE flags, EXTRA_ECONF etc.
But after update new binary packages will overwrite my changes.

So, what is the way for "branch" my changes and keep it after updates?

Thanks for answer!

Offline

#2 2024-02-08 15:10:45

V3n3RiX
Administrator
Registered: 2021-11-04
Posts: 59

Re: Fine tune-up after installation

Well, when I designed sisyphus, I considered someone might want to override some defaults. In fact, I was hoping someone will eventually ask me this question. So, you don't really need to branch out. Sisyphus has a mechanism to override the defaults. Not everything in your list is possible, but 3 out of 4 are.

1. Edit /etc/portage/env/10-sisyphus-overrides and add the following lines :

CFLAGS="-O2 -march=native -mtune=generic -pipe -fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations -fno-plt -fstack-protector-strong -fstack-clash-protection -fcf-protection=full"
CXXFLAGS="-O2 -march=native -mtune=generic -pipe -fno-delete-null-pointer-checks -Wno-deprecated -Wno-deprecated-declarations -fno-plt -fstack-protector-strong -fstack-clash-protection -fcf-protection=full"

Feel free to edit these flags however you please. The only change from Redcore's default is -march=native instead of -march=x86-64

Then, let's say you want to compile GCC with -march=native :

Edit /etc/portage/package.env/10-sisyphus-overrides and add the following line :

sys-devel/gcc 10-sisyphus-overrides

For every package you want to compile with -march=native you add another line :

category/name 10-sisyphus-overrides

2. Edit /etc/portage/package.use/10-sisyphus-overrides and add the following line :

sys-devel/gcc graphite

For every package you want to change an USE flag you add another line:

category/name USE

to enable an USE flag or

category/name -USE

to disable it

3. https://bugs.gentoo.org/715612 , this one is a work in progress, once it shows up in Gentoo's tree, you can follow the steps I described at number 2 to enable it.
4. Follow the steps at number 2 and add the following line:

app-alternatives/bzip2 -reference lbzip2

This will change the bzip2 implementation from reference (default implementation) to https://github.com/kjn/lbzip2/

or

app-alternatives/bzip2 -reference pbzip2

This will change the bzip2 implementation from reference (default implementation) to https://launchpad.net/pbzip2

Once done, the changes are permanent and sisyphus will NOT use binaries for the packages altered this way. All you have to do is run

sisyphus upgrade --ebuild

and you will notice it will offer to recompile the altered packages with your settings. If anything goes wrong, just remove the alterations and re-run

sisyphus upgrade --ebuild

Sisyphus has a fallback mechanism, so the --ebuild flag becomes automatically redundant and will use binaries if alterations are removed.

P.S.: There is no global override, changes are possible only per-package basis. Recompiling the whole system with -march=native is possible using a global override, but it is not implemented yet.

Offline

#3 2024-02-08 15:43:31

Oleksa75
Member
From: Ukraine
Registered: 2023-03-24
Posts: 4

Re: Fine tune-up after installation

Dear V3n3RiX!
Great thank You for clarification!

Offline

Board footer

Powered by FluxBB