diff options
-rw-r--r-- | .editorconfig | 16 | ||||
-rw-r--r-- | README.md | 72 | ||||
-rwxr-xr-x | pre-inst-env | 13 |
3 files changed, 34 insertions, 67 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bc68ff2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*.{c,h,cpp,hpp,el,scm,ac,am,m4,po}{,.in}] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true + +[*.{c,h,cpp,hpp,ac,am,m4,el,scm}{,.in}] +max_line_length = 85 + +[*.{c,h,cpp,hpp,ac,m4,el,scm}{,.in}] +indent_style = space + +[*.{c,h,cpp,hpp}{,.in}] +indent_size = 4 @@ -4,11 +4,7 @@ This repository contains package defintions for PantherX OS. This is a fork of our original package repository [guix-pantherx](https://git.pantherx.org/development/guix-pantherx) to resolve authentication issues (many of the commits weren't signed) and reduce the size which had blown up to 700+ MB. -## Branches - -- `master` Development -- `rolling` Live branch for most users -- `production` Live branch for enterprice users +Refer to `./DOCS.md` for more information on configuration options. ## Authentication @@ -44,69 +40,11 @@ Format and lint the file before commit: guix style --whole-file px/packages/tools.scm ``` -### Automatically Publish Source Code - -1. Creates archive of your repository -2. Uploads to S3 with the name `repository_tag.tgz` -3. Available via `https://s3.eu-central-1.amazonaws.com/source-git-pantherx-org/repository_tag.tgz` - -Example: `px_accounts_service_0.0.1.tgz` - -#### Set-Up CI - -1. Settings > General > Permissions; Enable **Pipelines** -2. Settings > Repository > Protected Tags; Add `*` and select **Maintainers** - -#### Prepare your Project - -Add a new file `.gitlab-ci.yml` with the following contents: - -```yaml -# GitLab CI Automation for PantherX Packages -# Author: Franz Geffke <franz@pantherx.org> -# Version: 0.0.8 - -# GitLab provided templates -include: - - template: SAST.gitlab-ci.yml - - template: License-Scanning.gitlab-ci.yml - -# Git submodules -variables: - GIT_SUBMODULE_STRATEGY: recursive - -stages: - - test - - deploy - -# Pack and upload to S3 -deploy: - stage: deploy - image: alpine:latest - script: - - cd ../ - - apk add py-pip - - pip install --user awscli - - export PATH="$PATH:/root/.local/bin" - - export AWS_ACCESS_KEY_ID=$(echo "$AWS_ACCESS_KEY_ID") - - export AWS_SECRET_ACCESS_KEY=$(echo "$AWS_SECRET_ACCESS_KEY") - - export AWS_DEFAULT_REGION=eu-central-1 - - export PACKAGE_NAME="$(echo $CI_PROJECT_NAME)_$(echo $CI_COMMIT_TAG).tgz" - - tar --exclude="$CI_PROJECT_NAME/.git" -zcvf "$PACKAGE_NAME" "$CI_PROJECT_NAME" - - aws s3 cp "$PACKAGE_NAME" s3://source-git-pantherx-org/ - only: - - tags - tags: [source] -``` - -**Note**: If you're using Git submodules, please follow [Using Git submodules with GitLab CI](https://docs.gitlab.com/ee/ci/git_submodules.html) to prepare your repository and modify the `upload` stage in the `.gitlab-ci.yml` according to your requirements. - -#### Trigger a build +### Test changes -1. Repository > Tags; Create a new Tag -2. CI / CD > Pipleines; Watch the progress - -Assuming that your repository name is `px_accounts_service` and you create a Tag 0.0.4, source code should be available at `https://s3.eu-central-1.amazonaws.com/source-git-pantherx-org/px_accounts_service_0.0.4.tgz` within a couple of minutes. +```bash +./pre-inst-env guix system vm .examples/server-os.scm +``` ### Patches diff --git a/pre-inst-env b/pre-inst-env new file mode 100755 index 0000000..79afb4f --- /dev/null +++ b/pre-inst-env @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +panther_dir="$(dirname "$(realpath "$0")")" + +GUILE_LOAD_PATH="${panther_dir}${GUILE_LOAD_PATH:+:}${GUILE_LOAD_PATH}" +GUIX_PACKAGE_PATH="${panther_dir}${GUIX_PACKAGE_PATH:+:}${GUIX_PACKAGE_PATH}" + +export GUILE_LOAD_PATH GUIX_PACKAGE_PATH + +echo $GUILE_LOAD_PATH +echo $GUIX_PACKAGE_PATH + +exec "$@" |