!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

81 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5125 Servers

Load older messages


SenderMessageTime
10 Mar 2023
@hexa:lossy.network@hexa:lossy.network Janne Heß: make it happen! 00:05:40
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @lily:lily.flowers
Janne Heß: Do you think you could clarify the license situation for https://github.com/helsinki-systems/plymouth-theme-nixos-bgrt? I would like to package it in nixpkgs, if that's okay
Sure, what do you want? Mit?
07:11:04
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deAlso have you tested it first? I don't even remember if it looks good07:13:13
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @janne.hess:helsinki-systems.de
Sure, what do you want? Mit?
Or does it have to be CC-BY? that's what the logo is under. If only licensing wasn't what it is… 
07:33:46
@lily:lily.flowers@lily:lily.flowers
In reply to @janne.hess:helsinki-systems.de
Or does it have to be CC-BY? that's what the logo is under. If only licensing wasn't what it is…
I mean the logo is cc-by and not cc-by-sa, so it doesn't necessarily need to be the same license. It just needs to have attribution
08:12:58
@lily:lily.flowers@lily:lily.flowers
In reply to @janne.hess:helsinki-systems.de
Also have you tested it first? I don't even remember if it looks good
Yeah it does look good!
08:13:11
@lily:lily.flowers@lily:lily.flowersI would say easiest is to just keep cc-by, though, same as the logo (my not-a-lawyer understanding is that cc licenses better accomodate creative works like this anyway rather than something like MIT)08:16:08
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de

https://library.mit.edu.au/copyright/creativecommons

Looks like a readme attribution is enough. I wanted mit because it would be compatible with nixpkgs

08:28:42
@lily:lily.flowers@lily:lily.flowersYeah, just readme attribution is sufficient. It should be compatible with nixpkgs either way (pretty sure there's already cc assets in the repo), I mostly just care that it's licensed at all08:45:09
@dramforever:matrix.org@dramforever:matrix.orgcompatibility doesn't really matter unless you're pasting the repo contents into nixpkgd08:53:55
@dramforever:matrix.org@dramforever:matrix.org * compatibility doesn't really matter unless you're pasting the repo contents into nixpkgs08:53:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHuh... I just realized I think we're forcing initrd to be updated every time nixpkgs updates, even if nothing in initrd actually changed.09:07:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgBecause of this: https://github.com/NixOS/nixpkgs/blob/88bdb6d79b0bdf03d3338f6f3d1416a55ec199ab/nixos/modules/misc/version.nix#L18-L3809:08:16
@elvishjerricco:matrix.org@elvishjerricco:matrix.org The initrdRelease contains BUILD_ID, which includes the nixpkgs revision 09:08:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's not good09:08:47
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
That's not good
Should we try to strip that out or just make our own initrd os-release attrset with less info to begin with?
13:41:45
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de Lily Foster: added a MIT license and a README with the appropriate attribution 13:59:25
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deFeel free to open a PR that mentions the package name in the README once it's upstreamed ;)14:00:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @lily:lily.flowers
Should we try to strip that out or just make our own initrd os-release attrset with less info to begin with?
Probably just separate common, stage 2, and stage 1. I'm going to need another variant for ukify since that seems to require an os-release as well
16:15:44
@k900:0upti.meK900One thing I wanted to do for bootis but didn't get around to doing is building UKIs with Nix 16:16:36
@k900:0upti.meK900That would be really nice16:16:51
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt's not hard. I've got a little script for it somewhere16:16:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
  addSections = pkgs.writeShellScriptBin "add-sections" ''
    set -euo pipefail
    stub="$1"
    image="$2"

    stub_line=$(${pkgs.binutils}/bin/objdump -h "$stub" | tail -2 | head -1)
    stub_size=0x$(echo "$stub_line" | awk '{print $3}')
    stub_offs=0x$(echo "$stub_line" | awk '{print $4}')
    next_offs=$((stub_size + stub_offs))
    args=()

    while read sectionName contentsFile; do
      contentsFile="$(readlink -f "$contentsFile")"
      args+=(--add-section "$sectionName"="$contentsFile")
      args+=(--change-section-vma "$sectionName"=$(printf 0x%x $next_offs))
      next_offs=$((next_offs + $(stat -c%s "$contentsFile")))
    done

    set -x
    exec ${pkgs.binutils}/bin/objcopy "''${args[@]}" "$stub" "$image"
  '';
  stub = pkgs.runCommand "stub" {nativeBuildInputs = [addSections];} ''
    mkdir $out
    add-sections ${nixosConfig}/systemd/lib/systemd/boot/efi/linuxx64.efi.stub $out/foo-unsigned.efi <<EOF
      .osrel ${osRelease}
      .linux ${nixosConfig}/kernel
      .initrd ${nixosConfig}/initrd${lib.optionalString kernelBoot "\n.cmdline ${cmdline}"}
    EOF
  '';
16:18:36
@elvishjerricco:matrix.org@elvishjerricco:matrix.org *
  addSections = pkgs.writeShellScriptBin "add-sections" ''
    set -euo pipefail
    stub="$1"
    image="$2"

    stub_line=$(${pkgs.binutils}/bin/objdump -h "$stub" | tail -2 | head -1)
    stub_size=0x$(echo "$stub_line" | awk '{print $3}')
    stub_offs=0x$(echo "$stub_line" | awk '{print $4}')
    next_offs=$((stub_size + stub_offs))
    args=()

    while read sectionName contentsFile; do
      contentsFile="$(readlink -f "$contentsFile")"
      args+=(--add-section "$sectionName"="$contentsFile")
      args+=(--change-section-vma "$sectionName"=$(printf 0x%x $next_offs))
      next_offs=$((next_offs + $(stat -c%s "$contentsFile")))
    done

    set -x
    exec ${pkgs.binutils}/bin/objcopy "''${args[@]}" "$stub" "$image"
  '';
  stub = pkgs.runCommand "stub" {nativeBuildInputs = [addSections];} ''
    mkdir $out
    add-sections ${nixosConfig}/systemd/lib/systemd/boot/efi/linuxx64.efi.stub $out/foo-unsigned.efi <<EOF
      .osrel ${osRelease}
      .linux ${nixosConfig}/kernel
      .initrd ${nixosConfig}/initrd
    EOF
  '';
16:20:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.org But also systemd now has theukify tool to do it, which can easily be used in a nix derivation. It just requires an os-release for whatever reason 16:22:00
@k900:0upti.meK900I know it's not hard, I just wanted to get it into nixpkgs16:25:24
@k900:0upti.meK900And probably wire it up as a bootspec extension 16:25:34
@gdamjan:spodeli.org@gdamjan:spodeli.orgyou can create a custom os-release right16:25:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org gdamjan: Yea I'm just annoyed by it :P 16:25:58
@gdamjan:spodeli.org@gdamjan:spodeli.orgit's used to identify the image :D16:26:17

Show newer messages


Back to Room ListRoom Version: 6