Commit graph

16229 commits

Author SHA1 Message Date
Vincent Ambo
385591d8bf chore(nixery): Bump Go dependencies
Change-Id: Id6ff48d66368732cba0b8af6e1cbab64b0f2afbf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5671
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-26 10:05:55 +00:00
Vincent Ambo
bc42c5a61b fix(ops/modules): adapt for changed ssh.knownHosts
Somehow this ended up generating an empty file, with this change it is
fine again. I was looking at the recent commits of the module in
nixpkgs but couldn't quite figure it out, there are also some vague
references to the attribute set key being used as a hostname, but this
doesn't seem to be true in practice.

To be clear, the previous code was wrong, but at some point it
generated a file that accidentally worked.

Change-Id: I42d55730c09daafe6d6fe0eb3647135e84737bca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5670
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2022-05-26 10:05:54 +00:00
Vincent Ambo
85943eeed4 feat(nixery): Automatically mirror subtree to Github
This exports the `:/tools/nixery` subtree to Github automatically
after merges to `canon`.

Due to the way the project was imported this continues the existing
git history in the external repository.

Change-Id: Ie871c14ad5d8f1019f8be86adecbe9b130ffb01a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5667
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-26 08:41:57 +00:00
Vincent Ambo
74c422d0a0 feat(tools/releases): Add release helper for mirroring to Github
This adds an extra step definition which can push the result of
running a josh filter on the repository to Github.

Change-Id: I1f93ae78e1bf452fbd1b21ce943a60acc85c944f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5666
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-26 08:41:57 +00:00
Vincent Ambo
6a17cf232d chore(3p/naersk): Bump and fetch via niv instead
Change-Id: Icae69a1170e06f61aea5494963913c7278f18dce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5669
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-26 00:00:42 +00:00
Vincent Ambo
e3a31b702a feat(whitby): Deploy private SSH key for build agents
Change-Id: I5b1dfaaf28e835cac5b897e18b015d90ac3b2857
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5665
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-25 23:53:09 +00:00
Vincent Ambo
77f096771d feat(ops/secrets): Add private SSH key for Buildkite agent(s)
The public key is:

  ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIME13zAw3Fk6qsbWCe6mH2zkxOJ+NmG+FwMjLw00mcWt buildkite@tvl

Change-Id: Ia8591e5df42727e4068f26865d83d0af85424fde
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5664
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-25 23:53:09 +00:00
Vincent Ambo
e3c26a0083 chore(cheddar): Bump dependencies within bounds
Change-Id: I58a18b41c883c73450fdfafa93a565777710be3b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5663
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-25 23:53:09 +00:00
Klemens Nanni
3a53587c2a feat(ops/modules/open_eid.nix): Access all key slots
`onepin-opensc-pkcs11.so` only enables PIN1, but PIN2 is also required.

Change-Id: Ic1c34ca58a46c2978c7e27e7a9b7e6a4d335ac0c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5648
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: kn <klemens@posteo.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-25 20:38:11 +00:00
Klemens Nanni
45c46d4a73 feat(ops/modules/open_eid.nix): Add digidoc-tool(1) to PATH
libdigidocpp is a dependency of qdigidoc4(1) already.

This will need https://github.com/NixOS/nixpkgs/pull/174055
"libdigidocpp: Fix PKCS11 module library path" to work, though.

Change-Id: Ic8d671077977b1d1f099a8b4b23cc537b52aa954
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5647
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-25 20:37:53 +00:00
sterni
98dbd715fa feat(sterni/emacs): enable which-key mode
Change-Id: Ibfb1b729ad8dc1de72e4da5833077ea4cd764638
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5668
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-25 18:30:39 +00:00
sterni
03d1986316 feat(3p/agenix): update to 2022-05-16 and add to niv
The new version brings the new secretsDir setting which means we no
longer have to hardcode /run/agenix everywhere.

Change-Id: I4b579d7233d315a780d7671869d5d06722d769fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5646
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-05-25 15:00:37 +00:00
Vincent Ambo
c55f61cd9b feat(tazjin/emacs): Configure zetteldeft for Markdown
Change-Id: Ib652374d42b6f701a7371325355871f8cc5325f9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5650
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-25 11:46:13 +00:00
Vincent Ambo
1bdf44c61f feat(tazjin/emacs): add zetteldeft & deft to prepare for showdown
The buildup to the showdown of org-roam vs. zetteldeft.

I can never quite get into org, but I wanna find a solution to the
problem I think I have which I think these solve

Change-Id: I03f7ee63b0af8dc3f8c52ad6fa4d6fa5048540bd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5644
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-25 11:46:12 +00:00
Vincent Ambo
739434f417 revert(tazjin/emacs): Don't ignore messages from blocked senders
This reverts commit a989a91f9f.

This seemingly doesn't work anymore, and it is also not required
anymore because I no longer have the problem this solved.

Change-Id: I3c9c076b45f9aa865260ce7cb103538f694fe3e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5643
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-25 11:46:11 +00:00
James Landrein
dc346bb8cf feat(ops/users): add j4m3s
I've only been a couple months lurking in the IRC ...

Change-Id: Idebf96d3bf1124f0a97e11e0f854e8c6d4be8d8e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5662
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-05-24 23:39:44 +00:00
sterni
c93527d8a1 refactor(sterni/emacs): use use-package for elfeed
When I first added elfeed, for some reason I couldn't set it up with
use-package. Now the situation has reversed itself and elfeed started to
crash with cryptic elisp error messages. Copying tazjin's approach to
configuring elfeed has solved this issue luckily.

Change-Id: I57ec8f8d8ace6aa6545483f7b2559065a56792f1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5649
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-05-23 17:12:55 +00:00
Vincent Ambo
f31edeec1b refactor(nixery): Modernise structure of binaries
Nixery is going to gain a new binary (used for building images without
a registry server); to prepare for this the server binary has moved to
cmd/server and the Nix build logic has been updated to wrap this
binary and set the required environment variables.

Change-Id: I9b4f49f47872ae76430463e2fcb8f68114070f72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5603
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-23 15:04:56 +00:00
Vincent Ambo
796ff086be refactor(nixery): Extract layering logic into separate package
This will be required for making a standalone, Nixery-style image
builder function usable from Nix.

Change-Id: I5e36348bd4c32d249d56f6628cd046916691319f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5601
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-23 15:04:56 +00:00
sterni
d60feb21e8 feat(sterni/emacs): add binding for find-file-at-point
Change-Id: I5b44df45d97e69b1a83c3e84039f55a3fced509f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5645
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-05-22 21:55:36 +00:00
sterni
5a1a18f58e chore(3p/sources): Bump channels & overlays
* //users/sterni: disable ada-mode, as GNAT bootstrap is broken in
  channels currently

Change-Id: I430f77baba2bcf306121e80aba61684c229c3981
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5641
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-22 13:08:37 +00:00
Vincent Ambo
e6e19f3d81 chore(paroxysm): Bump dependencies within constraints
just `cargo update`

Change-Id: Ia3fdc3660fc92d81dc4781adf2c200d961118dd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5640
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-19 14:46:28 +00:00
Vincent Ambo
19baeea350 chore(3p/sources): Bump channels & overlays to 2022-05-18
Included changes:

* //3p/nixpkgs: pick bat from stable channel for cheddar
* //3p/nixpkgs: drop emacs27 (no longer required)

Change-Id: Idb677aa0e98d4b3aec189bdd7700324922246699
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5629
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-19 14:10:24 +00:00
Vincent Ambo
19669bd53e chore(3p/gtest): Remove package
No longer used without //3p/nix

Change-Id: I3c3d9b98d47cb7c5740d4262b1e77f06697432d1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5634
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
2022-05-19 14:08:22 +00:00
Vincent Ambo
7c777e45a2 chore(3p/rapidcheck): Remove package
No longer used without //3p/nix

Change-Id: Iab5fc92f501151c2196c7ce082ea004857b0b0b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5633
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
2022-05-19 14:08:21 +00:00
Vincent Ambo
d127f9bd0e chore(3p/nix): unvendor tvix 0.1
Nothing is using this now, and we'll likely never pick this up again,
but we learned a lot in the process.

Every now and then this breaks in some bizarre way on channel bumps
and it's just a waste of time to maintain that.

Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
2022-05-19 14:08:20 +00:00
sterni
c85291c602 chore(3p/cgit): strip debug symbols on the cgit cgi script
This saves 10MB which seems useful for a CGI binary that is started a
lot.

Change-Id: I9536955d3962647a3fce2821bbdc4c3826fb4a91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5639
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-19 09:23:44 +00:00
sterni
df4a4c4a52 chore(3p/cgit): don't unnecessarily install cgit filters
We don't use these filters, utilizing cheddar instead. They don't work
as it stands anyway, since they require wrapping to find their (mostly
Python) dependencies.

Change-Id: I19a690dca4fbfc03784850597752ab617f0c0522
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5638
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-19 09:23:43 +00:00
sterni
92a0d9f7da fix(3p/cgit): substitute newly supported compression tools
This code is copied from the cgit derivation in nixpkgs, seems like we
missed when these new compression methods were added.

Change-Id: I2d4118785abc173c86ac92e3007cd7027a1e0496
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5637
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-19 09:23:43 +00:00
sterni
40803d9c6d subtree(3p/cgit): merge cgit-pink into depot cgit
cgit-pink is a maintained fork of cgit that follows upstream git more
closely and already contains a lot of patches we already had applied.
Consequently, it seems sensible it becomes our future upstream, we may
even be able to upstream some of our custom, less invasive patches.

Change-Id: Ia081e4508866f32298986c7160f4890c8a7c8922
2022-05-19 10:45:02 +02:00
sterni
0c86e2ac3f Squashed 'third_party/cgit/' changes from 8fc0c81bb..26ac84466
26ac84466 Bump version to 1.4.1
cc167887f Fix bad free in cgit_diff_tree
4a30da89c Bump version to 1.4.0
695515801 Tolerate short writes in print_slot
069d15447 git: update to v2.36.1
3374b0e7a git: update to v2.36.0
400fd7abb Use release_commit_memory()
93ce8fe3b Reset font size for blame oid
28c0cb6f7 Add a link to the parent commit in blame
c5809a429 Fix fmt() off-by-one error
129d8a158 Allow to give readme head from query
44a004809 Bump version to 1.3.0
76d9396e4 Update information for fork
d993e4be6 Remove Lua support
e4ce4fa74 Merge remote-tracking branch 'ch/git-2-35'
065ee253a Silence owner-info error
f92ba7ea8 Remove default favicon
03519c7bc Show about path in page title
20f0352d9 Generate valid Atom feeds
516175469 Merge up to git v2.32.0
12d91b897 Fix crash trying to print "this commit" on 404s
957855ffd Use owner-filter for repo page headers
f9c417f24 Fix tests for diff spans
be6a526a7 Use <pre> and <span> to print diffs
a8e11db65 Use buffered stdio
b2511f295 Remove redundant title on repo anchors
2d4c893db Improve button spacing for browsers w/o CSS
1e9f26ffb Improve decoration display for browsers without CSS
2843093cb Use <pre> for commit-msg
122f7a9be Improve pageheader display on text-based browsers
298f7d15f Use git raw note format
6524fe671 Add "this commit" option to switch form
8f9034884 Show subject in commit page title
41a17adaf Show symlink targets in tree listing
437d0b416 Disallow blame in robots.txt
e75fa957e Don't link to blame for binary blobs
8bf017ec5 Bail from blame if blob is binary
fa86ef6a3 Remove dependency on memrchr
bbbaa29a9 git: update to v2.35.1
73e98c16e git: update to v2.35.0
11be5b818 git: update to v2.34.1
b8f2b675d git: update to v2.34.0
45eff4065 git: update to v2.33.0
5258c297b git: update to v2.32.0
6dbbffe01 git: update to v2.31.1
62eb8db45 md2html: use proper formatting for hr
d889cae81 git: update to v2.31.0
4ffadc1e0 git: update to v2.30.1
bd6f5683f tests: t0107: support older and/or non-GNU tar
f69626c68 md2html: use sane_lists extension
cef27b670 git: update to v2.30.0
b1739247b git: update to v2.29.2
fe99c76ee git: update to v2.29.1
adcc4f822 tests: try with commit-graph
a1039ab17 tests: do not copy snapshots to /tmp/
a4de0e810 global: replace hard coded hash length
779631c6d global: replace references to 'sha1' with 'oid'
629659d2c git: update to v2.29.0
205837d46 git: update to v2.28.0
f780396c0 git: update to v2.27.0
0462f08d8 git: update to v2.26.0
55fa25adb Bump version
6a8d6d4b5 global: use proper accessors for maybe_tree
892ba8c3c ui-snapshot: add support for zstd compression
cc230bf04 tests: add tests for xz compressed snapshots
06671f4b2 ui-snapshot: add support for lzip compression
fde897b81 git: update to v2.25.1
5e49023b0 tests: allow to skip git version tests
fa146ccab Bump version
bd68c9887 git: update to v2.25.0
ca98c9e7b tests: skip tests if strace is not functional
d8e5dd25a git: update to v2.24.1
583aa5d80 ui-repolist: do not return unsigned (negative) value
bfabd4519 git: update to v2.24.0

git-subtree-dir: third_party/cgit
git-subtree-split: 26ac844661e95ee1ff3ddf4f8691de9904dad783
2022-05-19 10:23:37 +02:00
June McEnroe
e579aa6603 fix(3p/cgit): Fix bad free in cgit_diff_tree
Since git commit 244c27242f44e6b88e3a381c90bde08d134c274b,

> diff.[ch]: have diff_free() call clear_pathspec(opts.pathspec)

calling diff_flush calls free(3) on opts.pathspec.items, so it can't
be a pointer to a stack variable.

(cherry-picked from commit
https://git.causal.agency/cgit-pink/commit/?id=cc167887f1ee6907103533187ff9679f01006a1f)

Change-Id: I3054b0839f46465e8a5ce0da52a87357c7d77128
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5631
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-18 15:27:36 +00:00
Vincent Ambo
045cf244b5 chore(ops/secrets): add key for tazjin/zamalek
Change-Id: Ieb2fe49a67940d7cfbd261edbe10d0a8577a466d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5628
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-17 10:14:02 +00:00
Vincent Ambo
6e364d3d54 chore(alcoholic_jwt): prepare release v4091
Documentation updates & dependency bumps.

Change-Id: I18c3e9ad34ebf970c3ce81183188508976c2d4e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5624
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-16 18:53:30 +00:00
Vincent Ambo
a226639afa chore(alcoholic_jwt): update copyright header
The original copyright was released back in the day when Aprila and I
parted ways, and I'm happy with just assigning it to TVL.

Change-Id: I8fcba55bfa7f460b29e60f29e8fd24ffca2cd75b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5623
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-16 18:46:28 +00:00
Vincent Ambo
224eb8a3a3 docs(alcoholic_jwt): add 'contributing' section to docs
Change-Id: Iaa06b3a7d643a2688d43275aedf708fa4208586c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5622
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-05-16 18:45:33 +00:00
Vincent Ambo
94cf85c5cc chore(alcoholic_jwt): base64: 0.10 -> 0.13
this removes another transitive dependency \o/

Change-Id: I511b54c5841066e6f517edfc2c81ec607ca2bf55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5621
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2022-05-16 18:45:33 +00:00
Vincent Ambo
8f84059de8 chore(crimp): prepare release of v4087
Just housekeeping changes (docs updates, dependency bumps).

Change-Id: Id404490ae3c67a8d14c91fd53691f5809f0a1d08
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5620
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-16 18:15:18 +00:00
Vincent Ambo
fe62a33645 docs(crimp): update README with depot information
Change-Id: I48aca4f96178e9f25d58900798997e55c5062b43
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5619
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-05-16 18:06:54 +00:00
Vincent Ambo
e39e773464 chore(crimp): bump cargo dependencies
a simple `cargo update`

Change-Id: Ieabb10ef53aeef6416c849036317995fef5b6703
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5618
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-05-16 18:06:54 +00:00
Vincent Ambo
2c847e0dc1 chore(alcoholic_jwt): Prepare release of v4084
Change-Id: Id45d4b7b33c29ed8ae3c487c4303266a8ca0fad3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5617
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-16 17:55:04 +00:00
Vincent Ambo
10d07ad985 chore(alcoholic_jwt): bump cargo dependencies
a simple `cargo update`

Change-Id: I388fcb3822678e7f025f0f86c6e9af450bf29bd8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5616
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-05-16 17:44:22 +00:00
Griffin Smith
d377830281 feat(net/alcoholic_jwt): Implement Error for ValidationError
This allows using it unchanged in contexts where working with &dyn Error
is desirable, such as when using anyhow.

Change-Id: Ide34025e432204546b2c80b14b870af42dbfbb44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5615
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: grfn <grfn@gws.fyi>
2022-05-16 15:37:11 +00:00
Griffin Smith
e20f7695fa chore(net/alcoholic_jwt): Remove travis-ci build badge
It looks like this has been very obsolete for a very long time

Change-Id: I34d1200e3d9595f0ab9101329aec7774f965a154
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5614
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: grfn <grfn@gws.fyi>
2022-05-16 14:09:01 +00:00
Vincent Ambo
074ee66eb0 fix(tazjin/nixos): force tgsa proxying over IPv4
Change-Id: I5b77d1c3a7e19144c0002d2b6f909317cfc62092
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5613
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-16 09:21:29 +00:00
Vincent Ambo
9b395edaa5 chore(tazjin/tgsa): remove note about long image links
this is no longer the case since image links are now forwarded by tgsa
with a cache

Change-Id: I36216efb5f372115e082a11a51c04736f102debb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5612
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-16 08:20:22 +00:00
Vincent Ambo
73c08943b8 feat(tazjin/tgsa): use permanent media links in bbcode
uses the tgsa-proxied media links in the message bbcode, leading to
stable image serving even if telegram swaps cdn addresses around, as
long as their embed page is någorlunda the same.

Change-Id: I50af1b3512d4e429fae4a2b3d10395664169e7a1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5611
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2022-05-15 00:01:31 +00:00
Vincent Ambo
b308361a73 feat(tazjin/tgsa): add stable redirects to telegram images
telegram occasionally changes the upstream urls at which images are
served, with old/new partially overlapping in time afaict.

with this commit, a new endpoint is added to tgsa at

  /img/$user/$post_id/$img_idx

which serves a redirect to the actual image url that telegram had
returned within the last hour (i.e. as per the cache).

next step is to use these image urls in the bbcode itself.

Change-Id: I9aa5cb56bc444cbe796868346c67f2e1e1b79413
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5610
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-14 23:50:50 +00:00
Vincent Ambo
f200b1265f refactor(tazjin/tgsa): move error handling one layer up
this lays the groundwork for adding another handler and returning
handler results as `anyhow::Result<rouille::Response>`.

needed for the image redirect stuff.

Change-Id: I909bd9c2f46f42ea759d50662d7bc36c1f408ed3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5609
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-14 23:50:50 +00:00
Vincent Ambo
e3d09c3446 refactor(tazjin/tgsa): factor out cache access helper
factor out a function to access telegram posts from the cache,
fetching them anew if required.

a small behavioural change means that the program now takes a write
lock when fetching a post, to avoid simultaneously fetching the same
post many times (quite likely once it serves image redirects).

Change-Id: If9c1429f86fb118dab90834f349cb222709c3a31
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5608
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-14 23:50:50 +00:00