Upgrade gentoo: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 7: Line 7:
* use eselect to select it
* use eselect to select it


=== Upgrading gentoo profile ===
=== Upgrading to gentoo profile v17 ===
 
Go with the base profile.  I used to use no-multilib (to avoid 32-bit support) but it sounds like there's little harm or cost in it.


  bitpost ~ # eselect profile list
  bitpost ~ # eselect profile list
  Available profile symlink targets:
  Available profile symlink targets:
   [1]  default/linux/amd64/13.0 (stable)
   [1]  default/linux/amd64/13.0 (stable)
   [2]  default/linux/amd64/13.0/selinux (dev)
   ...
  [3]  default/linux/amd64/13.0/desktop (stable)
  [4]  default/linux/amd64/13.0/desktop/gnome (stable)
  [5]  default/linux/amd64/13.0/desktop/gnome/systemd (stable)
  [6]  default/linux/amd64/13.0/desktop/plasma (stable)
  [7]  default/linux/amd64/13.0/desktop/plasma/systemd (stable)
  [8]  default/linux/amd64/13.0/developer (stable)
   [9]  default/linux/amd64/13.0/no-multilib (stable)
   [9]  default/linux/amd64/13.0/no-multilib (stable)
   [10]  default/linux/amd64/13.0/systemd (stable)
   ...
  [11]  default/linux/amd64/13.0/x32 (dev)
   [12]  default/linux/amd64/17.0 (stable) *
   [12]  default/linux/amd64/17.0 (stable)
   ...
   [13]  default/linux/amd64/17.0/selinux (dev)
  [14]  default/linux/amd64/17.0/hardened (dev)
  [15]  default/linux/amd64/17.0/hardened/selinux (dev)
  [16]  default/linux/amd64/17.0/desktop (stable)
  [17]  default/linux/amd64/17.0/desktop/gnome (stable)
  [18]  default/linux/amd64/17.0/desktop/gnome/systemd (stable)
  [19]  default/linux/amd64/17.0/desktop/plasma (stable)
  [20]  default/linux/amd64/17.0/desktop/plasma/systemd (stable)
  [21]  default/linux/amd64/17.0/developer (stable)
   [22]  default/linux/amd64/17.0/no-multilib (stable) *
   [22]  default/linux/amd64/17.0/no-multilib (stable) *
   [23]  default/linux/amd64/17.0/no-multilib/hardened (dev)
   ...
  [24]  default/linux/amd64/17.0/no-multilib/hardened/selinux (dev)
  [25]  default/linux/amd64/17.0/systemd (stable)
  [26]  default/linux/amd64/17.0/x32 (dev)
   [27]  default/linux/amd64/17.1 (exp)
   [27]  default/linux/amd64/17.1 (exp)
   [28]  default/linux/amd64/17.1/selinux (exp)
   ...
  [29]  default/linux/amd64/17.1/hardened (exp)
 
  [30]  default/linux/amd64/17.1/desktop (exp)
I started down v17 so I better finish upBut let's go with the base profile (12).  I used to use no-multilib (to avoid 32-bit support) but it sounds like there's little harm or cost in it.
  [31]  default/linux/amd64/17.1/desktop/gnome (exp)
  [32]  default/linux/amd64/17.1/desktop/gnome/systemd (exp)
  [33] default/linux/amd64/17.1/desktop/plasma (exp)
  [34]  default/linux/amd64/17.1/desktop/plasma/systemd (exp)
  [35] default/linux/amd64/17.1/developer (exp)
  [36]  default/linux/amd64/17.1/no-multilib (exp)
  [37]  default/linux/amd64/17.1/no-multilib/hardened (exp)
  [38]  default/linux/amd64/17.1/no-multilib/hardened/selinux (exp)
  [39]  default/linux/amd64/17.1/systemd (exp)
  [40]  hardened/linux/amd64 (stable)
  [41]  hardened/linux/amd64/selinux (stable)
  [42]  hardened/linux/amd64/no-multilib (stable)
  [43]  hardened/linux/amd64/no-multilib/selinux (stable)
  [44]  hardened/linux/amd64/x32 (dev)
  [45]  default/linux/musl/amd64 (exp)
  [46]  hardened/linux/musl/amd64 (exp)
  [47]  default/linux/musl/amd64/x32 (exp)
  [48]  hardened/linux/musl/amd64/x32 (exp)
  [49]  default/linux/uclibc/amd64 (exp)
  [50]  hardened/linux/uclibc/amd64 (exp)


I started down v17 so I better finish up.
Steps are described in eselect:
Steps are described in eselect:
   eselect news list
   eselect news list
Line 70: Line 29:
   2017-11-30-new-17-profiles
   2017-11-30-new-17-profiles
   Title                    New 17.0 profiles in the Gentoo repository
   Title                    New 17.0 profiles in the Gentoo repository
  Author                    Andreas K. Hüttel <dilfridge@gentoo.org>
  (blah blah blah)
  Posted                    2017-11-30
  Revision                  1
   
We have just added (for all arches except arm and mips, these follow
later) a new set of profiles with release version 17.0 to the Gentoo
repository. These bring three changes:
1) The default C++ language version for applications is now C++14.
    This change is mostly relevant to Gentoo developers. It also
    means, however, that compilers earlier than GCC 6 are masked
    and not supported for use as a system compiler anymore. Feel
    free to unmask them if you need them for specific applications.
2) Where supported, GCC will now build position-independent
    executables (PIE) by default. This improves the overall
    security fingerprint. The switch from non-PIE to PIE binaries,
    however, requires some steps by users, as detailed below.
3) Up to now, hardened profiles were separate from the default
    profile tree. Now they are moving into the 17.0 profile
    as a feature there, similar to "no-multilib" and "systemd".
Please migrate away from the 13.0 profiles within the six weeks after
GCC 6.4.0 has been stabilized on your architecture. The 13.0 profiles
will be deprecated then and removed in half a year.
If you are not already running a hardened setup with PIE enabled, then
switching the profile involves the following steps:
If not already done,
* Use gcc-config to select gcc-6.4.0 or later as system compiler
* Re-source /etc/profile:
    . /etc/profile
* Re-emerge libtool
    emerge -1 sys-devel/libtool
Then,
* Select the new profile with eselect
* Re-emerge, in this sequence, gcc, binutils, and glibc
    emerge -1 sys-devel/gcc:6.4.0
    emerge -1 sys-devel/binutils
    emerge -1 sys-libs/glibc
  * Rebuild your entire system
  * Rebuild your entire system
     emerge -e @world
     emerge -e @world
  Switching the profile from 13.0 to 17.0 modifies the settings of  
  Switching the profile from 13.0 to 17.0 modifies the settings of  
  GCC 6 to generate PIE executables by default; thus, you need to do  
  GCC 6 to generate PIE executables by default; thus, you need to do  

Revision as of 23:45, 18 January 2018

Upgrading to PHP 7

  • edit /etc/portage/make.conf
# APACHE2_MODULES: update -D PHP5 to -D PHP
# add php7-0 as target
PHP_TARGETS="php5-6 php7-0"
  • emerge everything
  • use eselect to select it

Upgrading to gentoo profile v17

bitpost ~ # eselect profile list
Available profile symlink targets:
 [1]   default/linux/amd64/13.0 (stable)
 ...
 [9]   default/linux/amd64/13.0/no-multilib (stable)
 ...
 [12]  default/linux/amd64/17.0 (stable) *
 ...
 [22]  default/linux/amd64/17.0/no-multilib (stable) *
 ...
 [27]  default/linux/amd64/17.1 (exp)
 ...

I started down v17 so I better finish up. But let's go with the base profile (12). I used to use no-multilib (to avoid 32-bit support) but it sounds like there's little harm or cost in it.

Steps are described in eselect:

 eselect news list
 eselect news read 36
 2017-11-30-new-17-profiles
  Title                     New 17.0 profiles in the Gentoo repository
(blah blah blah)
* Rebuild your entire system
    emerge -e @world
Switching the profile from 13.0 to 17.0 modifies the settings of 
GCC 6 to generate PIE executables by default; thus, you need to do 
the rebuilds even if you have already used GCC 6 beforehand.
If you do not follow these steps you may get spurious build
failures when the linker tries unsuccessfully to combine non-PIE
and PIE code.