{"thread":{"id":"47559","subject":"[PATCH v5 0/3] RUNTIME_PREFIX relocatable Git","startedAt":"2018-01-07T16:57:50Z","lastAt":"2018-01-07T16:57:50Z","messageCount":1,"participants":["Dan Jacques"],"isPatch":true,"patchVersion":5,"patchTotal":3},"messages":[{"id":"336086","messageId":"20180107165613.78434-1-dnj@google.com","threadId":"47559","inReplyTo":null,"subject":"[PATCH v5 0/3] RUNTIME_PREFIX relocatable Git","fromName":"Dan Jacques","fromEmail":"dnj@google.com","sentAt":"2018-01-07T16:56:10Z","receivedAt":"2018-01-07T16:57:50Z","isPatch":true,"sender":{"key":"dnj@google.com","avatar":"https://avatars.githubusercontent.com/u/9965104?v=4"},"body":"This patch set expands support for the RUNTIME_PREFIX configuration flag,\ncurrently only used on Windows builds, to include Linux, Darwin, and\nFreeBSD. When Git is built with RUNTIME_PREFIX enabled, it resolves its\nancillary paths relative to the runtime location of its executable\nrather than hard-coding them at compile-time, allowing a Git\ninstallation to be deployed to a path other than the one in which it\nwas built/installed.\n\nNote that RUNTIME_PREFIX is not currently used outside of Windows.\nThis patch set should not have an impact on default Git builds.\n\nI'm uploading an updated patch set now that avarab@'s Perl Makefile\nsimplification patch set has advanced and seems to be stable. Please take\na look and let me know what you think!\n\nPrevious threads:\nv1: https://public-inbox.org/git/20171116170523.28696-1-dnj@google.com/\nv2: https://public-inbox.org/git/20171119173141.4896-1-dnj@google.com/\nv3: https://public-inbox.org/git/20171127164055.93283-1-dnj@google.com/\nv4: https://public-inbox.org/git/20171129223807.91343-1-dnj@google.com/\n\nChanges in v5 from v4:\n\n- Rebase on top of \"next\", notably incorporating the\n  \"ab/simplify-perl-makefile\" branch.\n- Cleaner Makefile relative path enforcement.\n- Update Perl header template path now that the \"perl/\" directory has\n  fewer build-related files in it.\n- Update Perl runtime prefix header to use a general system path resolution\n  function.\n- Implemented the injection of the locale directory into Perl's\n  \"Git/I18N.pm\" module from the runtime prefix Perl script header.\n- Updated Perl's \"Git/I18N.pm\" module to accept injected locale directory.\n- Added more content to some comments.\n\n=== Testing ===\n\nThe latest patch set is available for testing on my GitHub fork, including\n\"travis.ci\" testing. The \"runtime-prefix\" branch includes a \"config.mak\"\ncommit that enables runtime prefix for the Travis build; the\n\"runtime-prefix-no-config\" omits this file, testing this patch without\nruntime prefix enabled:\n- https://github.com/danjacques/git/tree/runtime-prefix\n- https://travis-ci.org/danjacques/git/branches\n\nBuilt/tested locally using this \"config.mak\" w/ autoconf:\n\n=== Example config.mak ===\n\n## (BEGIN config.mak)\n\nRUNTIME_PREFIX = YesPlease\nRUNTIME_PREFIX_PERL = YesPlease\ngitexecdir = libexec/git-core\ntemplate_dir = share/git-core/templates\nsysconfdir = etc\n\n## (END config.mak)\n\n=== Revision History ===\n\nChanges in v4 from v3:\n\n- Incorporated some quoting and Makefile dependency fixes, courtesy of\n  <johannes.schindelin@gmx.de>.\n\nChanges in v3 from v2:\n\n- Broken into multiple patches now that Perl is isolated in its own\n  RUNTIME_PREFIX_PERL flag.\n- Working with avarab@, several changes to Perl script runtime prefix\n  support:\n  - Moved Perl header body content from Makefile into external template\n    file(s).\n  - Added generic \"perllibdir\" variable to override Perl installation\n    path.\n  - RUNTIME_PREFIX_PERL generated script header is more descriptive and\n    consistent with how the C version operates.\n  - Fixed Generated Perl header Makefile dependency, should rebuild\n    when dependent files and flags change.\n- Changed some of the new RUNTIME_PREFIX trace strings to use consistent\n  formatting and terminology.\n\nChanges in v2 from v1:\n\n- Added comments and formatting to improve readability of\n  platform-sepecific executable path resolution sleds in\n  `git_get_exec_path`.\n- Consolidated \"cached_exec_path\" and \"argv_exec_path\" globals\n  into \"exec_path_value\".\n- Use `strbuf_realpath` instead of `realpath` for procfs resolution.\n- Removed new environment variable exports. Git with RUNTIME_PREFIX no\n  longer exports or consumes any additional environment information.\n- Updated Perl script resolution strategy: rather than having Git export\n  the relative executable path to the Perl scripts, they now resolve\n  it independently when RUNTIME_PREFIX_PERL is enabled.\n- Updated resolution strategy for \"gettext()\": use system_path() instead\n  of special environment variable.\n- Added `sysctl` executable resolution support for BSDs that don't\n  mount \"procfs\" by default (most of them).\n\nDan Jacques (3):\n  Makefile: generate Perl header from template file\n  Makefile: add Perl runtime prefix support\n  exec_cmd: RUNTIME_PREFIX on some POSIX systems\n\n .gitignore                                       |   1 +\n Makefile                                         | 114 +++++++++--\n cache.h                                          |   1 +\n common-main.c                                    |   4 +-\n config.mak.uname                                 |   7 +\n exec_cmd.c                                       | 241 ++++++++++++++++++++---\n exec_cmd.h                                       |   4 +-\n gettext.c                                        |   8 +-\n git.c                                            |   2 +-\n perl/Git/I18N.pm                                 |   2 +-\n perl/header_templates/fixed_prefix.template.pl   |   1 +\n perl/header_templates/runtime_prefix.template.pl |  32 +++\n 12 files changed, 364 insertions(+), 53 deletions(-)\n create mode 100644 perl/header_templates/fixed_prefix.template.pl\n create mode 100644 perl/header_templates/runtime_prefix.template.pl\n\n-- \n2.15.0.chromium12\n\n"}]}