Skip to content

Instantly share code, notes, and snippets.

@immolo
Last active November 24, 2024 15:49
Show Gist options
  • Select an option

  • Save immolo/25dd43367fdcd049a3027cb67b9be7a7 to your computer and use it in GitHub Desktop.

Select an option

Save immolo/25dd43367fdcd049a3027cb67b9be7a7 to your computer and use it in GitHub Desktop.
tim64 migration
Title: Profile upgrade to tim64 varients available
Author: Ian Jordan <immoloism@gmail.com>
Posted: 2024-11-04
Revision: 1
News-Item-Format: 2.0
Display-If-Profile: default/linux/x86/23.0/*
The year 2038 problem (also known as Y2038, Y2K38, Y2K38 superbug, or the Epochalypse.)
is a time computing problem that leaves some computer systems unable to
represent times after 03:14:07 UTC on 19 January 2038.
A fix for Gentoo users that will suffer from issue can be mitigated by
following the below instructions.
Upgrade instructions
Note : In case you are already familiar with binary packages, you should be
able to add "--getbinpkg" to the emerge calls to speed things up.
The use of binary packages is completely optional though.
1. Ensure your system backups are up to date. Please also update
your system fully and depclean before proceeding.
glibc older than 2.38 is not supported anymore.
2. Prepare the system for tim64 migration by emerging the time64-prep migration tool
emerge --ask --verbose --oneshot app-portage/time64-prep
Test the system for readidness by running:
time64-prep
If everything looks safe to contuine, then ru
time64-prep --update
3. Edit /etc/portage/make.conf; if there is a line defining the CHOST variable,
remove it. Also delete all lines defining CHOST_... variables.
4. Select the t66 23.0 profile corresponding to your current profile, either using
"eselect profile" or by manually setting the profile symlink.!
for example,
OLD default/linux/x86/23.0/x86/i686
==> NEW default/linux/x86/23.0/t64
(added "t64 for merged-usr")
A detailed table of the upgrade paths can be found at [1]. Please consult it.
In some cases (hppa, x86) the table will tell you to pick between two choices.
What you need should be obvious from your *old* CHOST value (from step 4).
5. Delete the contents of your binary package cache at ${PKGDIR}
rm -r /var/cache/binpkgs/*
6. In the file or directory /etc/portage/binrepos.conf (if existing), update
the URI in all configuration such that they point to 23.0 profile binhost
directories with time64. The exact paths can be found in the table at [1], too.
7. Rebuild or reinstall from binary (if available) the following packages in
this order, with the same version as already active:
emerge --ask --oneshot sys-devel/gcc
(you may have to run gcc-config and re-select your gcc now)
(IMPORTANT: If this command wants to rebuild glibc first, do *not* let it do
that; instead, abort and try again with --nodeps added to the command line.)
emerge --ask --oneshot sys-devel/binutils
(you may have to run binutils-config and re-select your binutils now)
and the C library, i.e. for glibc-based systems
emerge --ask --oneshot sys-libs/glibc
8. Recheck with binutils-config and gcc-config that valid installed versions
of binutils and gcc are selected.
9. Check /etc/env.d, /etc/env.d/binutils, and /etc/env.d/gcc for files that
refer to the *OLD* CHOST value, and remove them.
Examples how to do this can be found in the similar procedure <needs creating>
10. Run env-update && source /etc/profile
11. Re-emerge libtool:
emerge --ask --oneshot libtool
12. Just for safety, delete the contents of your binary package cache at
${PKGDIR} again:
rm -r /var/cache/binpkgs/*
13. Rebuild world:
emerge --ask --emptytree @world
[1] Add profile update table URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment