Skip to content

Commit

Permalink
Merge pull request #11 from arkane-systems/dev-0.6
Browse files Browse the repository at this point in the history
Emergency update 0.6
  • Loading branch information
cerebrate authored Sep 28, 2022
2 parents 326c81f + 929a07f commit 5cd63c5
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 26 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,15 @@ internal-package:
install -Dm 0755 -o root "othersrc/scripts/map-user-runtime-dir.sh" -t "$(INSTALLDIR)"
install -Dm 0755 -o root "othersrc/scripts/unmap-user-runtime-dir.sh" -t "$(INSTALLDIR)"

# Systemd services.
install -Dm 0644 -o root "othersrc/usr-lib/systemd/system/pstorefs.service" -T "$(SVCDIR)/pstorefs.service"
install -Dm 0644 -o root "othersrc/usr-lib/systemd/system/securityfs.service" -T "$(SVCDIR)/securityfs.service"

# WSLg mount file
install -Dm 0644 -o root "debian/bottle-imp.tmp-.X11\x2dunix.mount" -T "$(SVCDIR)/tmp-.X11\x2dunix.mount"
install -Dm 0644 -o root "othersrc/usr-lib/systemd/system/tmp-.X11\x2dunix.mount" -T "$(SVCDIR)/tmp-.X11\x2dunix.mount"

# Tmpfiles.
install -Dm 0644 -o root "othersrc/usr-lib/tmpfiles.d/bottle-imp.conf" -T "$(USRLIBDIR)/tmpfiles.d/bottle-imp.conf"

# Unit override files.
install -Dm 0644 -o root "othersrc/usr-lib/systemd/system/[email protected]/override.conf" -t "$(SVCDIR)/[email protected]"
Expand Down Expand Up @@ -204,10 +211,6 @@ internal-supplement:
mkdir -p $(MAN8DIR)
install -Dm 0644 -o root "$(TMPBUILDDIR)/imp.8.gz" -t $(MAN8DIR)

# Systemd services.
install -Dm 0644 -o root debian/bottle-imp.pstorefs.service -T "$(SVCDIR)/pstorefs.service"
install -Dm 0644 -o root debian/bottle-imp.securityfs.service -T "$(SVCDIR)/securityfs.service"

mkdir -p "$(ETCSVCDIR)/sysinit.target.wants"
ln -sr $(SVCDIR)/pstorefs.service $(ETCSVCDIR)/sysinit.target.wants/pstorefs.service
ln -sr $(SVCDIR)/securityfs.service $(ETCSVCDIR)/sysinit.target.wants/securityfs.service
Expand All @@ -216,9 +219,6 @@ internal-supplement:
mkdir -p "$(ETCSVCDIR)/multi-user.target.wants"
ln -sr $(SVCDIR)/systemd-machined.service $(ETCSVCDIR)/multi-user.target.wants/systemd-machined.service

# Tmpfile.
install -Dm 0644 -o root debian/bottle-imp.tmpfiles -T "$(USRLIBDIR)/tmpfiles.d/bottle-imp.conf"

# Cleanup temporary directory
rm -rf $(TMPBUILDDIR)

Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Alistair Young <[email protected]>
pkgname=bottle-imp
pkgver=0.5
pkgver=0.6
pkgrel=1
pkgdesc="A helper for WSL's native systemd support."
arch=('x86_64')
Expand Down
2 changes: 1 addition & 1 deletion binsrc/imp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import helpers

# Global variables
version = "0.5"
version = "0.6"

verbose = False
login = None
Expand Down
2 changes: 2 additions & 0 deletions debian/bottle-imp.links
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/usr/lib/systemd/system/systemd-machined.service /etc/systemd/system/multi-user.target.wants/systemd-machined.service
/usr/lib/systemd/system/pstorefs.service /etc/systemd/system/sysinit.target.wants/pstorefs.service
/usr/lib/systemd/system/securityfs.service /etc/systemd/system/sysinit.target.wants/securityfs.service
/usr/lib/systemd/system/tmp-.X11\x2dunix.mount /etc/systemd/system/sysinit.target.wants/tmp-.X11\x2dunix.mount
11 changes: 0 additions & 11 deletions debian/bottle-imp.tmpfiles

This file was deleted.

10 changes: 10 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
bottle-imp (0.6) buster bullseye bookworm sid focal jammy; urgency=medium

* Additions to tmpfiles for things disabled by systemd support.
* Build package using XZ compression when using CI.
* Do not use dh_installsystemd, it fucks up.
* Mount .X11-unix read-only.
* Add compensatory tmpfiles entries (/var/tmp, other X folders).

-- Alistair Young <[email protected]> Tue, 27 Sep 2022 23:00:00 -0500

bottle-imp (0.5) buster bullseye bookworm sid focal jammy; urgency=medium

* Added amd64 Arch package.
Expand Down
7 changes: 3 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ override_dh_auto_clean:
override_dh_fixperms:
dh_fixperms -Ximp

override_dh_installsystemd:
dh_installsystemd --name pstorefs --no-start
dh_installsystemd --name securityfs --no-start

override_dh_strip:
dh_strip --no-automatic-dbgsym

override_dh_shlibdeps:
ifeq ($(DEB_TARGET_ARCH),amd64)
dh_shlibdeps
endif

override_dh_builddeb:
dpkg-deb -Zxz --build debian/bottle-imp ..
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ConditionPathExists=/mnt/wslg/.X11-unix
What=/mnt/wslg/.X11-unix
Where=/tmp/.X11-unix
Type=none
Options=bind
Options=bind,ro

[Install]
WantedBy=sysinit.target
23 changes: 23 additions & 0 deletions othersrc/usr-lib/tmpfiles.d/bottle-imp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file is part of bottle-imp.
#

# See tmpfiles.d(5) for details

# Recreate the mount point for the X11 socket.
d! /tmp/.X11-unix 1777 root root -

# Replace these from x11.conf

## Make sure these are created by default so that nobody else can
## or empty them at startup
D! /tmp/.ICE-unix 1777 root root 10d
D! /tmp/.XIM-unix 1777 root root 10d
D! /tmp/.font-unix 1777 root root 10d

## Unlink the X11 lock files
r! /tmp/.X[0-9]*-lock

# Replace these from tmp.conf
# We don't need to clear /tmp, as it's already a fresh tmpfs
# We should clear /var/tmp, though.
q /var/tmp 1777 root root 30d

0 comments on commit 5cd63c5

Please sign in to comment.