Unverified Commit 6e2d656b authored by Adam C. Stephens's avatar Adam C. Stephens
Browse files
parent d3052ba3
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
diff --git c/distrobuilder/lxc.generator w/distrobuilder/lxc.generator
index 5f854d3..927f2df 100644
--- c/distrobuilder/lxc.generator
diff --git i/distrobuilder/lxc.generator w/distrobuilder/lxc.generator
index f7692af..f617b89 100644
--- i/distrobuilder/lxc.generator
+++ w/distrobuilder/lxc.generator
@@ -16,16 +16,6 @@ is_lxc_privileged_container() {
 	grep -qw 4294967295$ /proc/self/uid_map
@@ -166,3 +166,12 @@ index 5f854d3..927f2df 100644
 # Allow masking units created by the lxc system-generator.
 for d in /etc/systemd/system /usr/lib/systemd/system /lib/systemd/system; do
 	if ! [ -d "${d}" ]; then
@@ -247,7 +176,7 @@ if [ "${SYSTEMD}" -ge 258 ]; then
 	cat <<-EOF > /run/systemd/system/console-getty.service.d/override.conf
 		[Service]
 		ExecStart=
-		ExecStart=-/sbin/agetty -o '-- \\\\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 console
+		ExecStart=-/run/current-system/sw/bin/agetty -o '-- \\\\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 console
 		StandardInput=null
 		StandardOutput=null
 		EOF
+11 −4
Original line number Diff line number Diff line
@@ -35,15 +35,15 @@ let
in
buildGoModule (finalAttrs: {
  pname = "distrobuilder";
  version = "3.2";
  version = "3.3.1";

  vendorHash = "sha256-nlqapWxuSZlbt22F3Y9X1uXFxJHvEoUBZDl078x8ZnA=";
  vendorHash = "sha256-7dYfY6u8URJDMADY6yTW2SjOeSiRwqIh7oxUup6BHMg=";

  src = fetchFromGitHub {
    owner = "lxc";
    repo = "distrobuilder";
    tag = "distrobuilder-${finalAttrs.version}";
    sha256 = "sha256-aDCx2WGAKdTNf0uMzwxG0AUmbuuWBFPYzNyycKklYOY=";
    tag = "v${finalAttrs.version}";
    sha256 = "sha256-l9HtpeG4BSN9saDsNaF9uyOJbHGyLN0PwJ728IJfN/s=";
  };

  buildInputs = bins;
@@ -57,6 +57,12 @@ buildGoModule (finalAttrs: {
  ]
  ++ bins;

  # upstream only supports make targets due to GOFLAGS, but none of the targets work for us
  # this could be fragile, but the alternative is copying them here
  preBuild = ''
    export GOFLAGS="$(grep 'export GOFLAGS' Makefile | sed 's/export GOFLAGS=//') -trimpath"
  '';

  postInstall = ''
    wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${lib.makeBinPath bins}
  '';
@@ -74,6 +80,7 @@ buildGoModule (finalAttrs: {
  meta = {
    description = "System container image builder for LXC and LXD";
    homepage = "https://github.com/lxc/distrobuilder";
    changelog = "https://github.com/lxc/distrobuilder/releases/tag/v${finalAttrs.version}";
    license = lib.licenses.asl20;
    teams = [ lib.teams.lxc ];
    platforms = lib.platforms.linux;