Skip to content

Commit e0a9389

Browse files
committed
First draft
1 parent 005af42 commit e0a9389

12 files changed

+397
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for
49+
moderation decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail
56+
address, posting via an official social media account, or acting as an
57+
appointed representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
<[email protected]>. All complaints will be reviewed and investigated
64+
promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Git source-install
2+
3+
[![minimal-readme compliant](https://img.shields.io/badge/readme%20style-minimal-brightgreen.svg)](https://github.com/RichardLitt/standard-readme/blob/master/example-readmes/minimal-readme.md) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
4+
5+
## Table of Contents
6+
7+
* [Install](#install)
8+
* [Usage](#usage)
9+
* [Contributing](#contributing)
10+
* [License](#license)
11+
12+
## Install
13+
14+
```
15+
curl -sSL https://gitlab.com/b-data/git/gsi/-/archive/master/gsi-master.tar.gz \
16+
-o gsi.tar.gz
17+
18+
tar -zxf gsi.tar.gz --one-top-level --strip-components=1
19+
```
20+
21+
## Usage
22+
23+
```bash
24+
for file in sample.*; do cp "$file" "${file#sample.}"; done;
25+
26+
docker-compose up --build -V
27+
```
28+
29+
## Contributing
30+
31+
PRs accepted.
32+
33+
This project follows the
34+
[Contributor Covenant](https://www.contributor-covenant.org)
35+
[Code of Conduct](CODE_OF_CONDUCT.md).
36+
37+
## License
38+
39+
[MIT](LICENSE) © 2021 b-data GmbH

sample..env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
IMAGE=ubuntu:focal
2+
3+
GIT_VERSION=2.31.1
4+
PREFIX=/usr/local

sample.Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ARG IMAGE
2+
3+
FROM $IMAGE
4+
5+
ARG DEBIAN_FRONTEND=noninteractive
6+
7+
RUN apt-get update \
8+
&& apt-get install -y --no-install-recommends \
9+
curl \
10+
sudo \
11+
# Minimal dependencies for compiling and installing the Git binaries
12+
dh-autoreconf \
13+
libcurl4-gnutls-dev \
14+
libexpat1-dev \
15+
gettext \
16+
zlib1g-dev \
17+
libssl-dev \
18+
libpcre2-dev \
19+
# Additional dependencies to add the documentation in various formats
20+
asciidoc \
21+
xmlto \
22+
docbook2x \
23+
# On a Debian-based distribution you also need the install-info package
24+
install-info \
25+
# Supplemental dependencies for testing CVS and mail interoperability
26+
apache2 \
27+
gnupg \
28+
liberror-perl \
29+
## CVS
30+
cvsps \
31+
libdbd-sqlite3-perl \
32+
## mail
33+
libmailtools-perl
34+
35+
RUN useradd -ms /bin/bash builder \
36+
&& usermod -aG sudo builder \
37+
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
38+
39+
USER builder
40+
WORKDIR /home/builder
41+
42+
COPY scripts/git-prompt /var/tmp/
43+
COPY scripts/*.sh /usr/bin/
44+
45+
CMD ["start.sh"]

sample.build.env

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# According to https://github.com/git/git/blob/master/Makefile
2+
3+
# Define USE_LIBPCRE if you have and want to use libpcre. Various
4+
# commands such as log and grep offer runtime options to use
5+
# Perl-compatible regular expressions instead of standard or extended
6+
# POSIX regular expressions.
7+
#
8+
# Only libpcre version 2 is supported. USE_LIBPCRE2 is a synonym for
9+
# USE_LIBPCRE, support for the old USE_LIBPCRE1 has been removed.
10+
USE_LIBPCRE=1
11+
#
12+
# Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
13+
# tests. These tests take up a significant amount of the total test time
14+
# but are not needed unless you plan to talk to SVN repos.
15+
NO_SVN_TESTS=1
16+
#
17+
# Define NO_PERL_CPAN_FALLBACKS if you do not want to install bundled
18+
# copies of CPAN modules that serve as a fallback in case the modules
19+
# are not available on the system. This option is intended for
20+
# distributions that want to use their packaged versions of Perl
21+
# modules, instead of the fallbacks shipped with Git.
22+
NO_PERL_CPAN_FALLBACKS=1
23+
#
24+
# Define NO_TCLTK if you do not want Tcl/Tk GUI.
25+
NO_TCLTK=1
26+
#
27+
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
28+
# copies to install built-in git commands e.g. git-cat-file.
29+
NO_INSTALL_HARDLINKS=1
30+
31+
# According to https://github.com/git/git/tree/master/t
32+
33+
# In some environments, certain tests have no way of succeeding
34+
# due to platform limitation, such as lack of 'unzip' program, or
35+
# filesystem that do not allow arbitrary sequence of non-NUL bytes
36+
# as pathnames.
37+
GIT_SKIP_TESTS=t9020
38+
#
39+
# You can give DEFAULT_TEST_TARGET=prove on the make command (or define it
40+
# in config.mak) to cause "make test" to run tests under prove.
41+
# GIT_PROVE_OPTS can be used to pass additional options, e.g.
42+
#
43+
# $ make DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS='--timer --jobs 16' test
44+
#
45+
DEFAULT_TEST_TARGET=prove

sample.docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '3.8'
2+
3+
services:
4+
gsi:
5+
build:
6+
context: .
7+
args:
8+
- IMAGE=$IMAGE
9+
image: gsi
10+
container_name: gsi
11+
network_mode: host
12+
volumes:
13+
- $PREFIX:/tmp/dst$PREFIX
14+
- /etc/bash_completion.d:/tmp/etc/bash_completion.d
15+
- /usr/local/share/bash-completion/completions:/tmp/usr/local/share/bash-completion/completions
16+
- ./var/cache/gsi:/tmp/var/cache/gsi
17+
environment:
18+
- DESTDIR=/tmp/src
19+
- FINALDIR=/tmp/dst
20+
- GIT_VERSION=${GIT_VERSION}
21+
- PREFIX=${PREFIX}
22+
env_file:
23+
- build.env

scripts/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Copyright (c) 2021 b-data GmbH.
3+
# Distributed under the terms of the MIT License.
4+
5+
set -e
6+
7+
cd /tmp \
8+
&& curl -sSLO \
9+
https://github.com/git/git/archive/refs/tags/v$GIT_VERSION.tar.gz \
10+
&& tar -zxf v$GIT_VERSION.tar.gz \
11+
&& cd git-$GIT_VERSION \
12+
&& make configure \
13+
&& ./configure \
14+
--prefix=$PREFIX \
15+
--libexecdir=$PREFIX/lib \
16+
&& make all doc info strip \
17+
&& sudo -E make install install-doc install-html install-info

scripts/git-prompt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# In git versions < 1.7.12, this shell library was part of the
2+
# git completion script.
3+
#
4+
# Some users rely on the __git_ps1 function becoming available
5+
# when bash-completion is loaded. Continue to load this library
6+
# at bash-completion startup for now, to ease the transition to a
7+
# world order where the prompt function is requested separately.
8+
#
9+
if [[ -e PREFIX/lib/git-core/git-sh-prompt ]]; then
10+
. PREFIX/lib/git-core/git-sh-prompt
11+
fi

scripts/install.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Copyright (c) 2021 b-data GmbH.
3+
# Distributed under the terms of the MIT License.
4+
5+
set -e
6+
7+
# Git
8+
cp -a $DESTDIR/* $FINALDIR/
9+
10+
# Export list of installed files
11+
find $DESTDIR \( -type f -o -type l \) -printf '/%P\n' \
12+
> /tmp/var/cache/gsi/$GIT_VERSION.list
13+
14+
# bash completion
15+
install -m0644 \
16+
$FINALDIR$PREFIX/share/doc/git/contrib/completion/git-completion.bash \
17+
/tmp/usr/local/share/bash-completion/completions/git
18+
19+
install -m0644 \
20+
$FINALDIR$PREFIX/share/doc/git/contrib/completion/git-prompt.sh \
21+
$FINALDIR$PREFIX/lib/git-core/git-sh-prompt
22+
echo "$PREFIX/lib/git-core/git-sh-prompt" \
23+
>> /tmp/var/cache/gsi/$GIT_VERSION.list
24+
rm -rf $FINALDIR$PREFIX/share/doc/git/contrib/completion
25+
26+
if [[ ! -f "/tmp/etc/bash_completion.d/git-prompt" ]]; then
27+
sed -i "s|PREFIX|$PREFIX|g" /var/tmp/git-prompt
28+
install -m0644 /var/tmp/git-prompt /tmp/etc/bash_completion.d/git-prompt
29+
fi

scripts/modify.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# Copyright (c) 2021 b-data GmbH.
3+
# Distributed under the terms of the MIT License.
4+
5+
set -e
6+
7+
# install contrib stuff
8+
find /tmp/git-$GIT_VERSION/contrib -name '.git*' -delete
9+
cp -a --no-preserve=ownership /tmp/git-$GIT_VERSION/contrib \
10+
$DESTDIR$PREFIX/share/doc/git/
11+
12+
# move and symlink hooks
13+
mkdir -p $DESTDIR$PREFIX/share/git-core/contrib/
14+
mv $DESTDIR$PREFIX/share/doc/git/contrib/hooks \
15+
$DESTDIR$PREFIX/share/git-core/contrib/ \
16+
17+
ln -rs $DESTDIR$PREFIX/share/git-core/contrib/hooks \
18+
$DESTDIR$PREFIX/share/doc/git/contrib/hooks

0 commit comments

Comments
 (0)