Repository navigation
Git: Use sysconfdir=/etc for git built from source - #395
Samruddhi Khandale (samruddhikhandale) merged 2 commits into
Conversation
John Keech (jkeech)
left a comment
There was a problem hiding this comment.
Instead of adding a symlink for the git config, I think it would be much better to build git from source with the correct prefix set to target a global installation. if we set prefix to be /usr, the system config path will automatically be derived correctly, which will also set up system-level gitattributes and other files properly.
John Keech (@jkeech) As That's the reason I avoided changing the |
I thought the point of this PR is to make building From https://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY:
If we really don't want to modify |
John Keech (@jkeech) Yeah, installing under It's one thing if this were the final image... but in this case, end users can extend the image or add software by hand within the Dev Container at runtime. |
|
One possible way to handle this would be to generate a |
|
Chuck Lantz (@Chuxel), that's where the
|
* feat: add basic scaffolding for alpine, based on debian implementation * feat: add baseline packages from <https://github.com/alpinelinux/aports/blob/master/main/git/APKBUILD> * fix: add `curl` package (needed for version lookup) * feat: use `jq`-based version matching implementation for alpine the alpine version of `grep` doesn't support PCRE * fix: forgot to strip the leading "v" from the version number * fix: need `make` package to build from source * feat: parameterize make options to easily inject Alpine-specific option * fix: wip: latest baseline (still breaking due to musl) * feat: add basic scaffolding for alpine, based on debian implementation note: this won't install from source (due to build issues with musl) but will install using the `apk` package manager * chore: chmod +x * chore: bump semver (proposed) * docs: add Alpine/apk to notes * test: add test for `alpine:3` to install system package note: feature does not currently implement building from source on Alpine * fix: working build from source! still need to tweak the package dependencies and make config * perf: remove OBE `gettext-dev` package from dependencies no longer required with "NO_GETTEXT=YesPlease" make config * perf: remove OBE `libintl` package from dependencies no longer required with "NO_GETTEXT=YesPlease" make config (?) * feat: add remaining make options from apk package source reference * docs: add refs. for alpine build from source * test(git): add test case for building git from src on alpine:3 * fix: lint: SC2068: Double quote array expansions to avoid re-splitting elements * fix: use Devcontainer Alpine image as base (because it has `bash` installed); refactor test script names to remove major version suffix (since it isn't specified in the associated image tag) * perf: consolidate to a single, jq-based implementation using `jq` avoids the need for PCRE `grep` expression (not supported in Alpine) * fix: set `sysconfdir` option for alpine build as well see [#395](#395) * test: fix: alpine doesn't include perl support; leverage test cases from `install_git_from_src.sh` script * style: remove unused options * fix: set `prefix` option for alpine build to be consistent with other builds see [#395](#395) * refactor: move common arguments out of distro-specific logic * perf: minimum set of make options for building git from source in Alpine * chore: remove OBE code (unused make options for Git) * style: whitespace * test: fix: remove `gettext` check (since this package isn't installed in Alpine) * feat: update implementation based on local Git feature in `base-alpine` image * feat: remove `libsecret-dev` package not present in local Git feature in `base-alpine` image `install.sh` script * feat: switch `glib-dev` to `g++` and `gcc` packages, based on local Git feature in `base-alpine` image * chore: remove `alpine-sdk` package, based on local Git feature in `base-alpine` image no longer needed, based on initial testing * revert: switch back to `grep`-based PCRE implementation, based on local Git feature in `base-alpine` image `jq` package no longer needed * test: revert: remove test cases (covered by generic `install_git_from_src.sh`) * test: fix: remove perl check for system package in Alpine (because the system package is not built with PCRE support) --------- Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
Generally, libraries/tools expects the
gitconfigto be located at/etc/gitconfig. However, when 'git' is built from source, it uses the/usr/localprefix & creates agitconfigfile at${prefix}/etc/configie/usr/local/etc/config.Building with
sysconfdir=/etcto fix this issue.