list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH v5 0/3] RUNTIME_PREFIX relocatable Git
@ 2018-01-08  3:02 Dan Jacques
  2018-01-08  3:02 ` [PATCH v5 1/3] Makefile: generate Perl header from template file Dan Jacques
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Dan Jacques @ 2018-01-08  3:02 UTC (permalink / raw)
  To: git; +Cc: gitster, avarab, Johannes.Schindelin, Dan Jacques

(Send #2, since I failed to CC everyone in the first posting).

This patch set expands support for the RUNTIME_PREFIX configuration flag,
currently only used on Windows builds, to include Linux, Darwin, and
FreeBSD. When Git is built with RUNTIME_PREFIX enabled, it resolves its
ancillary paths relative to the runtime location of its executable
rather than hard-coding them at compile-time, allowing a Git
installation to be deployed to a path other than the one in which it
was built/installed.

Note that RUNTIME_PREFIX is not currently used outside of Windows.
This patch set should not have an impact on default Git builds.

I'm uploading an updated patch set now that avarab@'s Perl Makefile
simplification patch set has advanced and seems to be stable. Please take
a look and let me know what you think!

Previous threads:

Changes in v5 from v4:

- Rebase on top of "next", notably incorporating the
  "ab/simplify-perl-makefile" branch.
- Cleaner Makefile relative path enforcement.
- Update Perl header template path now that the "perl/" directory has
  fewer build-related files in it.
- Update Perl runtime prefix header to use a general system path resolution
- Implemented the injection of the locale directory into Perl's
  "Git/" module from the runtime prefix Perl script header.
- Updated Perl's "Git/" module to accept injected locale directory.
- Added more content to some comments.

=== Testing ===

The latest patch set is available for testing on my GitHub fork, including
"" testing. The "runtime-prefix" branch includes a "config.mak"
commit that enables runtime prefix for the Travis build; the
"runtime-prefix-no-config" omits this file, testing this patch without
runtime prefix enabled:

Built/tested locally using this "config.mak" w/ autoconf:

=== Example config.mak ===

## (BEGIN config.mak)

gitexecdir = libexec/git-core
template_dir = share/git-core/templates
sysconfdir = etc

## (END config.mak)

=== Revision History ===

Changes in v4 from v3:

- Incorporated some quoting and Makefile dependency fixes, courtesy of

Changes in v3 from v2:

- Broken into multiple patches now that Perl is isolated in its own
- Working with avarab@, several changes to Perl script runtime prefix
  - Moved Perl header body content from Makefile into external template
  - Added generic "perllibdir" variable to override Perl installation
  - RUNTIME_PREFIX_PERL generated script header is more descriptive and
    consistent with how the C version operates.
  - Fixed Generated Perl header Makefile dependency, should rebuild
    when dependent files and flags change.
- Changed some of the new RUNTIME_PREFIX trace strings to use consistent
  formatting and terminology.

Changes in v2 from v1:

- Added comments and formatting to improve readability of
  platform-sepecific executable path resolution sleds in
- Consolidated "cached_exec_path" and "argv_exec_path" globals
  into "exec_path_value".
- Use `strbuf_realpath` instead of `realpath` for procfs resolution.
- Removed new environment variable exports. Git with RUNTIME_PREFIX no
  longer exports or consumes any additional environment information.
- Updated Perl script resolution strategy: rather than having Git export
  the relative executable path to the Perl scripts, they now resolve
  it independently when RUNTIME_PREFIX_PERL is enabled.
- Updated resolution strategy for "gettext()": use system_path() instead
  of special environment variable.
- Added `sysctl` executable resolution support for BSDs that don't
  mount "procfs" by default (most of them).

Dan Jacques (3):
  Makefile: generate Perl header from template file
  Makefile: add Perl runtime prefix support
  exec_cmd: RUNTIME_PREFIX on some POSIX systems

 .gitignore                                       |   1 +
 Makefile                                         | 114 +++++++++--
 cache.h                                          |   1 +
 common-main.c                                    |   4 +-
 config.mak.uname                                 |   7 +
 exec_cmd.c                                       | 241 ++++++++++++++++++++---
 exec_cmd.h                                       |   4 +-
 gettext.c                                        |   8 +-
 git.c                                            |   2 +-
 perl/Git/                                 |   2 +-
 perl/header_templates/   |   1 +
 perl/header_templates/ |  32 +++
 12 files changed, 364 insertions(+), 53 deletions(-)
 create mode 100644 perl/header_templates/
 create mode 100644 perl/header_templates/


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-01-08 22:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-08  3:02 [PATCH v5 0/3] RUNTIME_PREFIX relocatable Git Dan Jacques
2018-01-08  3:02 ` [PATCH v5 1/3] Makefile: generate Perl header from template file Dan Jacques
2018-01-08  3:02 ` [PATCH v5 2/3] Makefile: add Perl runtime prefix support Dan Jacques
2018-01-08  9:41   ` Ævar Arnfjörð Bjarmason
2018-01-08 19:18     ` Dan Jacques
2018-01-08 20:00       ` Ævar Arnfjörð Bjarmason
2018-01-08 20:27       ` Johannes Schindelin
2018-01-08 21:54         ` Junio C Hamano
2018-01-08 22:05         ` Dan Jacques
2018-01-08 22:16           ` Ævar Arnfjörð Bjarmason
2018-01-08 22:18             ` Dan Jacques
2018-01-08 20:24     ` Johannes Schindelin
2018-01-08  3:02 ` [PATCH v5 3/3] exec_cmd: RUNTIME_PREFIX on some POSIX systems Dan Jacques list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ \
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone