diff options
Diffstat (limited to 'www')
23 files changed, 331 insertions, 17 deletions
| diff --git a/www/assets/partials/preview/article.css b/www/assets/res/css/article.css index 9629597..9629597 100644 --- a/www/assets/partials/preview/article.css +++ b/www/assets/res/css/article.css diff --git a/www/assets/base-style.css b/www/assets/res/css/base.css index 4c5a730..9fd922b 100644 --- a/www/assets/base-style.css +++ b/www/assets/res/css/base.css @@ -25,6 +25,11 @@ a.mono-link,    font-family: monospace;  } +div.mono-container { +  font-family: monospace; +  margin-block: 1rem; +} +  .toast {    font-size: large;    font-family: monospace; @@ -88,6 +93,24 @@ nav {    vertical-align: middle;  } +.link-group { +  margin-block-end: 1em; + +  > .link-group-title { +    font-size: 1.1em; +    margin-block-end: 5px; +  } + +  > .link-group-list { +    border-inline-start: solid 1px hsl(0, 0%, 25%); +    padding-inline-start: 8px; + +    > .link-group-item::before { +      content: "- "; +    } +  } +} +  html[data-theme="dark"] {    --fg-color: white;    --bg-color: black; @@ -112,4 +135,13 @@ html[data-theme="dark"] {        color: var(--fg-color);      }    } + +  table  { +    border-collapse: collapse; + +    &, :is(td,th) { +      padding: 0.5em; +      border: 1px solid hsl(0, 0%, 25%); +    } +  }  } diff --git a/www/assets/catppuccin-latte.css b/www/assets/res/css/catppuccin-latte.css index 00c0669..00c0669 100644 --- a/www/assets/catppuccin-latte.css +++ b/www/assets/res/css/catppuccin-latte.css diff --git a/www/assets/catppuccin-mocha.css b/www/assets/res/css/catppuccin-mocha.css index 4d9a04c..4d9a04c 100644 --- a/www/assets/catppuccin-mocha.css +++ b/www/assets/res/css/catppuccin-mocha.css diff --git a/www/assets/home.css b/www/assets/res/css/home.css index 1db357e..1db357e 100644 --- a/www/assets/home.css +++ b/www/assets/res/css/home.css diff --git a/www/assets/single.css b/www/assets/res/css/single.css index 70325d1..70325d1 100644 --- a/www/assets/single.css +++ b/www/assets/res/css/single.css diff --git a/www/assets/res/css/todos.css b/www/assets/res/css/todos.css new file mode 100644 index 0000000..e9a595d --- /dev/null +++ b/www/assets/res/css/todos.css @@ -0,0 +1,14 @@ +.todo { + +  &::before { +    font-family: monospace; +  } + +  &.working::before { +    content: "* "; +  } + +  &.done::before { +    content: "✓ "; +  } +}
\ No newline at end of file diff --git a/www/assets/github-mark.png b/www/assets/res/img/gh.pngBinary files differ index 6cb3b70..6cb3b70 100644 --- a/www/assets/github-mark.png +++ b/www/assets/res/img/gh.png diff --git a/www/assets/color-scheme.ts b/www/assets/res/js/color-scheme.ts index db6a3aa..db6a3aa 100644 --- a/www/assets/color-scheme.ts +++ b/www/assets/res/js/color-scheme.ts diff --git a/www/config/_default/hugo.yaml b/www/config/_default/hugo.yaml index 4ade102..2479f6e 100644 --- a/www/config/_default/hugo.yaml +++ b/www/config/_default/hugo.yaml @@ -17,6 +17,9 @@ frontmatter:    lastmod: [ "lastmod", "date", "publishDate" ]  markup: +  goldmark: +    extensions: +      table: true    highlight:      lineNos: true      noClasses: false diff --git a/www/content/hurd.md b/www/content/hurd.md deleted file mode 100644 index 67cf6f8..0000000 --- a/www/content/hurd.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Hurd" -date: 2025-03-03T15:34:41+08:00 -lastmod: 2025-03-03T15:34:41+08:00 ---- diff --git a/www/content/hurd/_index.md b/www/content/hurd/_index.md new file mode 100644 index 0000000..b4c727c --- /dev/null +++ b/www/content/hurd/_index.md @@ -0,0 +1,182 @@ +--- +title: "Hurd" +date: 2025-03-03T15:34:41+08:00 +lastmod: 2025-03-03T23:28:46+08:00 +layout: single +--- + +{{< mono >}} + +[TODOS](/hurd/todos) + +{{< /mono >}} + +## links + +{{< mono >}} + +| name | link | +| --- | --- | +| kernel-list-archive | <https://lists.gnu.org/archive/html/bug-hurd/> | +| debian-list-archive | <https://lists.debian.org/debian-hurd/> | +| irc-archive | <https://logs.guix.gnu.org/hurd/> | +| kernel-home | <https://www.gnu.org/software/hurd/index.html> | +| debian-home | <https://www.debian.org/ports/hurd/> | + +{{< /mono >}} + +refs: + +{{< mono >}} + +| name | link | +| --- | --- | +| c | <https://en.cppreference.com/w/c> | +| posix latest | <https://pubs.opengroup.org/onlinepubs/9799919799/> | +| posix 2013 | <https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/> | +| posix 2008 | <https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/> | +| glibc | <https://sourceware.org/glibc/manual/2.41/html_mono/libc.html> | + +{{< /mono >}} + +## *_MAX patch + +TODO: Move to separate page. + +```c +#include <errno.h> +#include <stdlib.h> +#include <unistd.h> + +static inline char *xreadlink(const char *restrict path) { +  char *buffer; +  size_t allocated = 128; +  ssize_t len; + +  while (1) { +    buffer = (char *)malloc(allocated); +    if (!buffer) { +      return NULL; +    } +    len = readlink(path, buffer, allocated); +    if (len < (ssize_t)allocated) { +      return buffer; +    } +    free(buffer); +    if (len >= (ssize_t)allocated) { +      allocated *= 2; +      continue; +    } +    return NULL; +  } +} + +static inline char *xgethostname() { +  long max_host_name; +  char *buffer; + +  max_host_name = sysconf(_SC_HOST_NAME_MAX); +  buffer = malloc(max_host_name + 1); + +  if (gethostname(buffer, max_host_name + 1)) { +    free(buffer); +    return NULL; +  } + +  buffer[max_host_name] = '\0'; +  return buffer; +} + +static inline char *xgetcwd() { +  char *buffer; +  size_t allocated = 128; + +  while (1) { +    buffer = (char *)malloc(allocated); +    if (!buffer) { +      return NULL; +    } +    getcwd(buffer, allocated); +    if (buffer) +      return buffer; +    free(buffer); +    if (errno == ERANGE) { +      allocated *= 2; +      continue; +    } +    return NULL; +  } +} +``` + +## git repos + +{{< link-group >}} +hurd +cru: <https://crupest.life/git/cru-hurd/hurd.git> +upstream: <https://git.savannah.gnu.org/git/hurd/hurd.git> +debian: <https://salsa.debian.org/hurd-team/hurd> +{{< /link-group >}} + +{{< link-group >}} +gnumach +cru: <https://crupest.life/git/cru-hurd/gnumach.git> +upstream: <https://git.savannah.gnu.org/git/hurd/gnumach.git> +debian: <https://salsa.debian.org/hurd-team/gnumach> +{{< /link-group >}} + +{{< link-group >}} +mig +cru: <https://crupest.life/git/cru-hurd/mig.git> +upstream: <https://git.savannah.gnu.org/git/hurd/mig.git> +debian: <https://salsa.debian.org/hurd-team/mig> +{{< /link-group >}} + +{{< link-group >}} +glibc +cru: <https://crupest.life/git/cru-hurd/glibc.git> +upstream: <git://sourceware.org/git/glibc.git> +debian: <https://salsa.debian.org/glibc-team/glibc> +mirror: <https://mirrors.tuna.tsinghua.edu.cn/git/glibc.git> +{{< /link-group >}} + +{{< link-group >}} +web +cru: <https://crupest.life/git/cru-hurd/web.git> +upstream: <https://git.savannah.gnu.org/git/hurd/web.git> +{{< /link-group >}} + +## cheatsheet + +Start qemu + +```sh +qemu-system-x86_64 -enable-kvm -m 4G -net nic -net user,hostfwd=tcp::3222-:22 -vga vmware -drive cache=writeback,file=[...] +``` + +Configure/Setup network + +```sh +settrans -fgap /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +fsysopts /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +fsysopts /server/socket/2 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +``` + +Setup apt + +```sh +apt-get --allow-unauthenticated --allow-insecure-repositories update +apt-get --allow-unauthenticated upgrade +``` + +## mailing lists / irc + +{{< mono >}} + +| name | address | +| --- | --- | +| hurd | <bug-hurd@gnu.org> | +| debian | <debian-hurd@lists.debian.org> | +| irc | librechat #hurd | + +{{< /mono >}} diff --git a/www/content/hurd/todos.md b/www/content/hurd/todos.md new file mode 100644 index 0000000..d95bfb9 --- /dev/null +++ b/www/content/hurd/todos.md @@ -0,0 +1,54 @@ +--- +title: "Hurd Todos" +date: 2025-03-03T21:22:35+08:00 +lastmod: 2025-03-03T23:28:46+08:00 +params: +  css: +    - todos +--- + +## Porting + +### {{< todo name=pam state=working >}} + +{{< link-group >}} +git +cru: <https://crupest.life/git/love-hurd/pam.git> +debian: <https://salsa.debian.org/vorlon/pam> +upstream: <https://github.com/linux-pam/linux-pam> +{{< /link-group >}} + +{{< link-group >}} +mail +<https://lists.debian.org/debian-hurd/2025/02/msg00018.html> +{{< /link-group >}} + +### {{< todo name=abseil state=working >}} + +{{< link-group >}} +git +cru: <https://crupest.life/git/cru-hurd/abseil.git> +upstream: <https://github.com/abseil/abseil-cpp> +debian: <https://salsa.debian.org/debian/abseil> +{{< /link-group >}} + +{{< link-group >}} +mail +<https://lists.debian.org/debian-hurd/2025/02/msg00011.html>\ +<https://lists.debian.org/debian-hurd/2025/02/msg00035.html> +{{< /link-group >}} + +### {{< todo name=libgav1 state=done >}} + +{{< link-group >}} +git +my: <https://crupest.life/git/love-hurd/libgav1.git> +debian: <https://salsa.debian.org/multimedia-team/libgav1> +upstream: <https://chromium.googlesource.com/codecs/libgav1/> +{{< /link-group >}} + +{{< link-group >}} +misc +mail: <https://lists.debian.org/debian-hurd/2025/02/msg00016.html> +gerrit: <https://chromium-review.googlesource.com/c/codecs/libgav1/+/6239812> +{{< /link-group >}} diff --git a/www/content/todos.md b/www/content/todos.md index da7cc0f..a790e24 100644 --- a/www/content/todos.md +++ b/www/content/todos.md @@ -1,5 +1,7 @@  ---  title: "Todos"  date: 2025-03-03T15:34:53+08:00 -lastmod: 2025-03-03T15:34:53+08:00 +lastmod: 2025-03-03T23:28:46+08:00  --- + +[Hurd](/hurd/todos) diff --git a/www/layouts/_default/baseof.html b/www/layouts/_default/baseof.html index 55954d3..621aea1 100644 --- a/www/layouts/_default/baseof.html +++ b/www/layouts/_default/baseof.html @@ -9,11 +9,14 @@      <title>{{ block "title" . }}        {{ .Site.Title }}      {{ end }}</title> -    {{ partial "js.html" "color-scheme.ts" }} +    {{ partial "js.html" "res/js/color-scheme.ts" }}      {{ partial "css-res.html" (partial "highlight.html" dict) }} -    {{ partial "css.html" "base-style.css" }} +    {{ partial "css.html" "res/css/base.css" }}      {{ block "head" . }}      {{ end }} +    {{ range .Params.css }} +      {{ partial "css.html" (printf "res/css/%s.css" .) }} +    {{ end }}    </head>    <body>      <div id="slogan"> diff --git a/www/layouts/_default/list.html b/www/layouts/_default/list.html index ddc3942..c7c6cce 100644 --- a/www/layouts/_default/list.html +++ b/www/layouts/_default/list.html @@ -1,5 +1,5 @@  {{ define "head"}} -  {{ partial "css.html" "partials/preview/article.css" }} +  {{ partial "css.html" "res/css/article.css" }}  {{ end }}  {{ define "content" }} diff --git a/www/layouts/_default/single.html b/www/layouts/_default/single.html index 1f267eb..cd0e9c5 100644 --- a/www/layouts/_default/single.html +++ b/www/layouts/_default/single.html @@ -1,5 +1,5 @@  {{ define "head"}} -  {{ partial "css.html" "single.css" }} +  {{ partial "css.html" "res/css/single.css" }}  {{ end }}  {{ define "title" }} diff --git a/www/layouts/index.html b/www/layouts/index.html index 55e49ff..7b33a6a 100644 --- a/www/layouts/index.html +++ b/www/layouts/index.html @@ -1,6 +1,6 @@  {{ define "head"}} -  {{ partial "css.html" "home.css" }} -  {{ partial "css.html" "partials/preview/article.css" }} +  {{ partial "css.html" "res/css/home.css" }} +  {{ partial "css.html" "res/css/article.css" }}  {{ end }}  {{ define "friend" }} @@ -10,7 +10,7 @@        <img class="friend-avatar" alt="Friend {{.name}}'s avatar" src="{{.avatar}}" width="80"          height="80" /><br />{{.name}}</a>      <a rel="noopener noreferrer" href="{{ $gh_url }}"> -      {{- with resources.Get "github-mark.png" -}} +      {{- with resources.Get "res/img/gh.png" -}}          <img class="friend-github" src="{{ .RelPermalink }}" />        {{- end -}}      </a><br /> diff --git a/www/layouts/partials/highlight.html b/www/layouts/partials/highlight.html index 06ab047..28c510e 100644 --- a/www/layouts/partials/highlight.html +++ b/www/layouts/partials/highlight.html @@ -1,6 +1,6 @@ -{{ $light := resources.Get "catppuccin-latte.css" }} -{{ $dark := resources.Get "catppuccin-mocha.css" }} +{{ $light := resources.Get "res/css/catppuccin-latte.css" }} +{{ $dark := resources.Get "res/css/catppuccin-mocha.css" }}  {{ $dark_wrapper_before := resources.FromString "highlight-dark-wapper-before.css" `html[data-theme="dark"] {`}}}  {{ $dark_wrapper_after := resources.FromString "highlight-dark-wapper-after.css" "}"}} -{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "highlight.css" }} +{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "res/css/highlight.css" }}  {{ return $highlight }} diff --git a/www/layouts/partials/nav.html b/www/layouts/partials/nav.html index 42c9ad1..4ecf622 100644 --- a/www/layouts/partials/nav.html +++ b/www/layouts/partials/nav.html @@ -2,5 +2,5 @@    {{ range .Ancestors.Reverse }}      <a class="mono-link" href="{{ .RelPermalink }}">{{ lower .Title }}</a> >    {{ end }} -  this +  this: {{.Title}}  </nav> diff --git a/www/layouts/shortcodes/link-group.html b/www/layouts/shortcodes/link-group.html new file mode 100644 index 0000000..b16c2bc --- /dev/null +++ b/www/layouts/shortcodes/link-group.html @@ -0,0 +1,25 @@ +<div class="mono link-group"> +  {{ $self := . }} +  {{ $lines := slice }} +  {{ range split .Inner "\n" }} +    {{ if strings.ContainsNonSpace . }} +      {{ $lines = $lines | append (strings.TrimSpace .) }} +    {{ end }} +  {{ end }} +  {{ $notitle := false }} +  {{ if .IsNamedParams }} +    {{ $notitle = .Get "notitle" }} +  {{ else }} +    {{ $notitle = in .Params "notitle" }} +  {{ end }} +  {{ if not $notitle }} +    {{ $title := index $lines 0 }} +      <div class="link-group-title">{{ $title | $self.Page.RenderString }}</div> +      {{ $lines = $lines | after 1 }} +  {{ end }} +  <div class="link-group-list"> +    {{ range $lines }} +      <div class="link-group-item">{{ . | $self.Page.RenderString }}</div> +    {{ end }} +  </div> +</div> diff --git a/www/layouts/shortcodes/mono.html b/www/layouts/shortcodes/mono.html new file mode 100644 index 0000000..ab183a5 --- /dev/null +++ b/www/layouts/shortcodes/mono.html @@ -0,0 +1,3 @@ +<div class="mono-container"> +  {{ .Inner | .Page.RenderString }} +</div> diff --git a/www/layouts/shortcodes/todo.html b/www/layouts/shortcodes/todo.html new file mode 100644 index 0000000..1327b31 --- /dev/null +++ b/www/layouts/shortcodes/todo.html @@ -0,0 +1 @@ +<span class="todo {{ .Get "state" }}">{{ .Get "name" }}</span>
\ No newline at end of file | 
