pax_global_header00006660000000000000000000000064143322066330014514gustar00rootroot0000000000000052 comment=d5623bf85e8e73ae6352f78ee6b55a287619dd4e go-systemd-22.5.0/000077500000000000000000000000001433220663300136755ustar00rootroot00000000000000go-systemd-22.5.0/.github/000077500000000000000000000000001433220663300152355ustar00rootroot00000000000000go-systemd-22.5.0/.github/workflows/000077500000000000000000000000001433220663300172725ustar00rootroot00000000000000go-systemd-22.5.0/.github/workflows/containers.yml000066400000000000000000000036301433220663300221640ustar00rootroot00000000000000--- name: Containers on: push: branches: [main] pull_request: branches: [main] permissions: contents: read env: GO_TOOLCHAIN: "1.15" GOPATH: "/opt" BUILD_DIR: "/opt/src/github.com/coreos/go-systemd" jobs: ditro-test: name: "Distro test" runs-on: ubuntu-latest strategy: matrix: baseimage: ['debian:stretch', 'ubuntu:18.04', 'ubuntu:20.04'] steps: - run: sudo apt-get -qq update - name: Install libsystemd-dev run: sudo apt-get install libsystemd-dev - uses: actions/checkout@v2 - name: Setup go uses: actions/setup-go@v1 with: go-version: ${{ env['GO_TOOLCHAIN'] }} - name: Go build (source) run: ./scripts/ci-runner.sh build_source - name: Go build (tests) run: ./scripts/ci-runner.sh build_tests - name: Pull base image - ${{ matrix.baseimage }} run: docker pull ${{ matrix.baseimage }} - name: Install packages for ${{ matrix.baseimage }} run: docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${{ matrix.baseimage }} /bin/bash -c "export DEBIAN_FRONTEND=noninteractive; apt-get update && apt-get install -y sudo build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container" - name: Persist base container run: docker commit `cat /tmp/cidfile` go-systemd/container-tests - run: rm -f /tmp/cidfile - name: Run systemd from ${{ matrix.baseimage }} run: docker run --shm-size=2gb -d --cidfile=/tmp/cidfile --privileged -e GOPATH=${GOPATH} -v ${PWD}:${BUILD_DIR} go-systemd/container-tests /bin/systemd --system - name: Wait a bit for the whole system to settle run: sleep 30s - name: Run tests run: docker exec --privileged `cat /tmp/cidfile` /bin/bash -c "cd ${BUILD_DIR} && ./scripts/ci-runner.sh run_tests" - name: Cleanup run: docker kill `cat /tmp/cidfile` go-systemd-22.5.0/.github/workflows/go.yml000066400000000000000000000030371433220663300204250ustar00rootroot00000000000000name: Go on: push: branches: [main] pull_request: branches: [main] permissions: contents: read env: # Minimum supported Go toolchain ACTION_MINIMUM_TOOLCHAIN: "1.12.x" jobs: build: name: "Build" runs-on: ubuntu-latest strategy: matrix: go: ['1.17.x', '1.18.x', '1.19.x'] steps: - run: sudo apt-get -qq update - name: Install libsystemd-dev run: sudo apt-get install libsystemd-dev - uses: actions/checkout@v3 - name: Setup go uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: Go fmt run: ./scripts/ci-runner.sh go_fmt - name: Go build (source) run: ./scripts/ci-runner.sh build_source - name: Go build (tests) run: ./scripts/ci-runner.sh build_tests - name: Go vet run: ./scripts/ci-runner.sh go_vet build-minimum: name: "Build on minimum supported toolchain" runs-on: ubuntu-latest steps: - run: sudo apt-get -qq update - name: Install libsystemd-dev run: sudo apt-get install libsystemd-dev - uses: actions/checkout@v3 - name: Setup go uses: actions/setup-go@v3 with: go-version: ${{ env['ACTION_MINIMUM_TOOLCHAIN'] }} - name: Go fmt run: ./scripts/ci-runner.sh go_fmt - name: Go build (source) run: ./scripts/ci-runner.sh build_source - name: Go build (tests) run: ./scripts/ci-runner.sh build_tests - name: Go vet run: ./scripts/ci-runner.sh go_vet go-systemd-22.5.0/.gitignore000066400000000000000000000000121433220663300156560ustar00rootroot00000000000000test_bins go-systemd-22.5.0/CONTRIBUTING.md000066400000000000000000000040331433220663300161260ustar00rootroot00000000000000# How to Contribute CoreOS projects are [Apache 2.0 licensed](LICENSE) and accept contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. # Certificate of Origin By contributing to this project you agree to the Developer Certificate of Origin (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the [DCO](DCO) file for details. ## Getting Started - Fork the repository on GitHub - Read the [README](README.md) for build and test instructions - Play with the project, submit bugs, submit patches! ## Contribution Flow This is a rough outline of what a contributor's workflow looks like: - Create a topic branch from where you want to base your work (usually main). - Make commits of logical units. - Make sure your commit messages are in the proper format (see below). - Push your changes to a topic branch in your fork of the repository. - Make sure the tests pass, and add any new tests as appropriate. - Submit a pull request to the original repository. Thanks for your contributions! ### Format of the Commit Message We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. The subject line should feature the what and the body of the commit should describe the why. ``` scripts: add the test-cluster command this uses tmux to setup a test cluster that you can easily kill and start for debugging. Fixes #38 ``` The format can be described more formally as follows: ``` :