Skip to content

Commit

Permalink
Merge branch 'dev-2.2' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cerebrate authored Mar 3, 2022
2 parents 87d7ecf + a31efeb commit 1d73399
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 67 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ out/

# Genie wrapper
binsrc/genie-wrapper/genie
binsrc/genie/*.dist-info
binsrc/genie/argparse.py
binsrc/genie/bin/
binsrc/genie/contextlib2/
binsrc/genie/nsenter/
binsrc/genie/pathlib.py
binsrc/genie/python_hosts/
binsrc/out

# Debian build intermediates

Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ internal-debian-package:
# Binaries.
mkdir -p "$(BINDIR)"
install -Dm 6755 -o root "binsrc/genie-wrapper/genie" -t "$(BINDIR)"
install -Dm 0755 -o root "binsrc/genie/genie" -t "$(INSTALLDIR)"
install -Dm 0755 -o root "binsrc/genie/runinwsl" -t "$(INSTALLDIR)"

# Requirements
install -Dm 0644 -o root "binsrc/genie/requirements.txt" -t "$(INSTALLDIR)"
install -Dm 0755 -o root "binsrc/out/genie" -t "$(INSTALLDIR)"
install -Dm 0755 -o root "binsrc/out/runinwsl" -t "$(INSTALLDIR)"

# Environment generator.
install -Dm 0755 -o root "othersrc/scripts/80-genie-envar.sh" -t "$(INSTALLDIR)"
Expand Down
21 changes: 19 additions & 2 deletions binsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,28 @@
#
# default target: build both for installation
#
build:
build: build-wrapper build-runinwsl build-genie

build-wrapper:
make -C genie-wrapper

build-runinwsl:
python -m zipapp -o out/runinwsl -p "/usr/bin/env python3" -c runinwsl

build-genie:
python -m pip install -r genie/requirements.txt --target genie
python -m zipapp -o out/genie -p "/usr/bin/env python3" -c genie

#
# clean: clean up after a build/package
#
clean:
clean: clean-wrapper clean-runinwsl clean-genie

clean-wrapper:
make -C genie-wrapper clean

clean-runinwsl:
rm -f out/runinwsl

clean-genie:
rm -f out/genie
2 changes: 1 addition & 1 deletion binsrc/genie-wrapper/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ all:
#

clean:
# rm genie
rm -f genie
2 changes: 1 addition & 1 deletion binsrc/genie/genie → binsrc/genie/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3

import argparse
import configparser
Expand Down
2 changes: 1 addition & 1 deletion binsrc/genie/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nsenter>=0.2
psutil>=5.9.0
python_hosts>=1.0.1
# psutil>=5.9.0 (should be handled by apt package)
2 changes: 1 addition & 1 deletion binsrc/genie/runinwsl → binsrc/runinwsl/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/python3
#! /usr/bin/env python3

import os
import subprocess
Expand Down
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
systemd-genie (2.2) buster bullseye bookworm sid focal bionic; urgency=medium

* Single-file package python scripts.
* Man page fixes.

-- Alistair Young <avatar@arkane-systems.net> Mon, 28 Feb 2022 18:30:00 -0500

systemd-genie (2.1) buster bullseye bookworm sid focal bionic; urgency=medium

* Documentation updates.
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Vcs-Browser: https://github.com/arkane-systems/genie

Package: systemd-genie
Architecture: amd64
Depends: ${misc:Depends}, ${shlibs:Depends}, dbus, policykit-1, daemonize, systemd (>= 232-25), python3 (>= 3.7), python3-pip, systemd-container (>= 232-25), gawk
Depends: ${misc:Depends}, ${shlibs:Depends}, dbus, policykit-1, daemonize, systemd (>= 232-25), python3 (>= 3.7), python3-pip, python3-psutil, systemd-container (>= 232-25), gawk
Description: quick way into a systemd "bottle" under Windows Subsystem for Linux
Automates the process of starting up, entering into, and shutting down
a container within which systemd is pid 1, effectively enabling the use
Expand Down
47 changes: 0 additions & 47 deletions debian/postinst

This file was deleted.

8 changes: 0 additions & 8 deletions debian/systemd-genie.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
# Needed for systemd
# breakout-link usr/lib/systemd/system-environment-generators/80-genie-envar.sh -> usr/lib/genie/80-genie-envar.sh
# breakout-link usr/lib/systemd/user-environment-generators/80-genie-envar.sh -> usr/lib/genie/80-genie-envar.sh

# Must be setuid
elevated-privileges usr/bin/genie 6755 root/root

# Python should be more usual
unusual-interpreter /usr/bin/python3 [usr/lib/genie/genie]
unusual-interpreter /usr/bin/python3 [usr/lib/genie/runinwsl]

0 comments on commit 1d73399

Please sign in to comment.