{"id":44125888,"url":"https://github.com/projg2/time64-prep","last_synced_at":"2026-02-08T21:18:41.168Z","repository":{"id":261976449,"uuid":"866166887","full_name":"projg2/time64-prep","owner":"projg2","description":"A tool to prepare for (comparatively) safe time64 transition","archived":false,"fork":false,"pushed_at":"2024-11-09T16:26:05.000Z","size":33,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T17:26:32.043Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projg2.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-01T19:00:52.000Z","updated_at":"2024-11-09T16:26:09.000Z","dependencies_parsed_at":"2024-11-09T17:36:51.375Z","dependency_job_id":null,"html_url":"https://github.com/projg2/time64-prep","commit_stats":null,"previous_names":["projg2/time64-prep"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/projg2/time64-prep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projg2%2Ftime64-prep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projg2%2Ftime64-prep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projg2%2Ftime64-prep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projg2%2Ftime64-prep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projg2","download_url":"https://codeload.github.com/projg2/time64-prep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projg2%2Ftime64-prep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29244639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T21:00:43.743Z","status":"ssl_error","status_checked_at":"2026-02-08T20:59:20.374Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-08T21:18:40.534Z","updated_at":"2026-02-08T21:18:41.159Z","avatar_url":"https://github.com/projg2.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========\ntime64-prep\n===========\n\nOverview\n========\ntime64-prep is a tool to provide a more secure transition path for\nrebuilding the systems using 32-bit ``time_t`` (time32 ABI) to\nthe 64-bit variant of this type (time64 ABI).\n\nNote that this tool is not technically required to perform\nthe transition.  In fact, an even better approach is to build new\nbinaries in a separate root, then merge them into the main system;\nor at least use a separate root to prepare binary packages for\nthe transition.  However, when transition in place is intended,\ntime64-prep can reduce the risk of time32 and time64 ABI mixing between\ndifferent binaries, that could lead to catastrophic and potentially\nexploitable memory errors.\n\nTo achieve this, time64-prep creates mirror ``libt32`` library\ndirectories containing copies of the shared libraries from ``lib``,\nand patches all existing binaries to list these directories in their\nRUNPATHs.  As libraries are rebuilt to use 64-bit ``time_t``\nand installed into ``lib``, old executables (still using time32 ABI)\ncontinue using the libraries from ``libt32`` — until they themselves\nare rebuilt and therefore lose the injected RUNPATH.\n\nNote that this is not a perfect solution.  In particular, ecosystems\nsuch as Perl and Python install loadable modules in non-standard\nlocations and they will suffer from mixed ABIs nevertheless.\n\n\nDependencies\n============\ntime64-prep requires the following Python packages:\n- ``portage`` to obtain the list of installed files\n- ``pyelftools`` to inspect binaries (and gather their RUNPATHs)\n\nAdditionally, it requires the following executables:\n- ``ldconfig`` to find library directories\n- ``patchelf`` to modify binary RUNPATHs\n\n\nUsage\n=====\nBy default, time64-prep runs in a \"pretend\" mode, in which it prints\nthe operations that would be performed without actually performing them.\nIdeally, do a such run first and inspect the output for any\nirregularities::\n\n    time64-prep\n\nIf everything looks fine, you can pass ``-u`` to apply the updates::\n\n    time64-prep -u\n\nIt also accepts a ``--prefix`` argument to perform the operation\nin the specified system root, instead of ``/``::\n\n    time64-prep --prefix /mnt/gentoo\n\nAfter performing the update, the system can be transitioned to time64\nper Gentoo instructions.  Once done, the created ``libt32`` directories\nshould be removed manually.\n\nIf errors occur while patching RUNPATHs, the tool will terminate early,\nwithout actually copying libraries.  It can be afterwards run again\nto attempt to patch the remaining binaries, and possibly copy libraries\nafterwards.\n\nIf errors occur while copying or moving libraries, the tool attempts\nto copy/move as many as possible.  It dos not support safely resuming\nat this point, and any failures should be fixed manually.\n\n\nExpert usage\n============\nBy default, time64-prep copies all shared libraries and moves static\nlibraries (to reduce the risk of mixing ABIs while statically linking).\nThis implies that depending on package ordering, and particularly when\ncyclic dependencies are involved, executables may end up temporarily\nmixing time32 and time64 ABI.\n\nAlternatively, ``--mv-shared-libs`` option can be used to move shared\nlibraries instead of copying them.  This reduces the risk of ABI mixing,\nat the cost of making the rebuilds involving cyclic dependencies fail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojg2%2Ftime64-prep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojg2%2Ftime64-prep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojg2%2Ftime64-prep/lists"}