• Jonathan Backhaus's avatar
    Add support for Alpine to `git` feature (#1008) · 694906e3
    Jonathan Backhaus authored
    * 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](https://github.com/devcontainers/features/pull/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](https://github.com/devcontainers/features/pull/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: 's avatarSamruddhi Khandale <skhandale@microsoft.com>
    694906e3
install_git_from_src_alpine.sh 343 Bytes