Commit graph

56 commits

Author SHA1 Message Date
94d96497b5 hswaw/site: implement recurring events
Change-Id: Ib3c570d058141c4d8441801010f0f1755ccfc0e7
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1624
Reviewed-by: radex <radex@hackerspace.pl>
2023-09-22 22:50:39 +00:00
c5f466822e third_party/py: bump/reformat
Change-Id: Ia148d7f56af8ecbf382dfb3d663963f682f64fb9
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1628
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 22:44:25 +00:00
97b5cd7b58 go: re-do the entire thing
This is a mega-change, but attempting to split this up further is
probably not worth the effort.

Summary:

1. Bump up bazel, rules_go, and others.
2. Switch to new go target naming (bye bye go_default_library)
3. Move go deps to go.mod/go.sum, use make gazelle generate from that
4. Bump up Python deps a bit

And also whatever was required to actually get things to work - loads of
small useless changes.

Tested to work on NixOS and Ubuntu 20.04:

   $ bazel build //...
   $ bazel test //...

Change-Id: I8364bdaa1406b9ae4d0385a6b607f3e7989f98a9
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1583
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 21:50:19 +00:00
f5b1a215f4 app/mailman-web: create
There's a lot of ugly hacks here, but this has been the state of prod
for months now, so we should reflect that.
Also, this bumps a bunch of workspace deps.

Change-Id: I744e0d3aff27036cfed73416cf442c7d62444a8b
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1473
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-10 21:11:37 +00:00
0d3e609013 bazlets: use python3
Change-Id: Idf8ec4b70eed991874a0bcdcced132b9f6da3f83
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1584
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-01 17:17:24 +00:00
7631880620 *: remove java/minecraft
Change-Id: Id2b1e69dcad240d7ef8a80b844531ef862e27dd2
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1582
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-01 16:50:48 +00:00
dc03494c2c third_party/factorio: update version hashes
Change-Id: Ib4e07bdebbb913bf970db9dd124c8177b947ca04
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1581
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-01 16:50:48 +00:00
8100a2de97 third_party: replace jq with gojq
Building jq portably is annoying, and the way we were doing it (which we
iirc stole from some google project?) sucked. Let's use a Go jq clone
instead.

This is an alternative for 1535. jq is currently used only in one
script, which could really be replaced by a Go program, but let's keep
it simple for now.

Change-Id: Ie25dffadd545df143490f510e9b75a74adf81492
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1540
Reviewed-by: palid <palid@hackerspace.pl>
2023-07-24 14:47:54 +00:00
f21ca388ba WORKSPACE: rules_python->0.13; switch to hermetic interpreter
Change-Id: I0145f9db6a71fa9080b166dd75ff2c1b93e2b241
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1462
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-02-19 17:12:35 +00:00
9851b38608 WORKSPACE,third_party/py: bump rules_{python,docker} and some py packages
Those are far from the latest versions still, but this change should be
non-breaking.

Change-Id: Ieeb9d6b301184f46677d821fe8276391346d6285
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1459
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-01-29 01:40:25 +00:00
28742b8106 Make golang deps fetching go faster
This commit aims to increase the speed of hscloud rebuild process
by optimizing the behavior of Go dependency fetching routines.

Gazelle v0.25.0 introduced a new dependency resolution mode
where it does not reach out for external dependencies; instead,
it operates solely on what is contained inside the workspace.

Because static dependency resolution mode is now the default
behavior in go_repository() rules, we are also updating the
contents of //third_party/go/repositories.bzl.

Also, I changed some of the bigger Go dependencies to be downloaded
by a tarball fetch in order to speed up the rebuild process.

Other changes:
  * Bump nixpkgs to a fresh snapshot
  * Upgrade to Bazel v5

Change-Id: Icfe752411b3128bcd5b25fa28bb76bec45ae2f71
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1441
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-11-27 16:27:53 +00:00
e69e98da47 third_party/py: update rules_python, use pip-compile for requirements
Change-Id: If8309e8e3a4b58142f7479005a9eb4cbb1043cdb
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1324
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-07-05 21:27:31 +00:00
ironbound
e7c8509d48 bump factorio version
Change-Id: I027d45b843b33fe963008b90a5d1c024ecef4e71
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1205
Reviewed-by: ironbound <ironbound@hackerspace.pl>
Reviewed-by: lquawl <lquawl@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-12-26 10:26:04 +00:00
3e2a5a5957 third_party/go: add filippo.io/age
You can test this using:

   bazel run '@io_filippo_age//cmd/age'

The same target can now be used in data dependencies for secretstore
(you'll need to hardcode the runfile path, or use some
Bazel-runfile-resolving library for Python).

This required adding a few dependencies to
third_party/go/repositories.bzl, but also moving golang.org/x/crypto
from that file into WORKSPACE, before gazelle_deps gets loaded (as the
version requested by gazelle_deps is too old). We also moved shlex that
shouldn't have been in WORKSPACE into third_party/go/repositories.bzl.

Otherwise, this was just a few small deps - bumped golang.org/x/crypto,
new golang.org/x/term, new filippo.io/edwards25519. Hooray low
dependency code.

Change-Id: I0e684d88efffde13a3b4e253860aabcb35a3c94d
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1158
Reviewed-by: patryk <patryk@hackerspace.pl>
2021-10-07 20:18:25 +00:00
d01f9e5fa2 WORKSPACE,third_party/go: reformat
Change-Id: If263013bd9a544696ee2530688f7f7d4ded49a92
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1159
Reviewed-by: patryk <patryk@hackerspace.pl>
2021-10-07 20:17:12 +00:00
c429b5385a third_party/go: bump go-netbox
Change-Id: If88259dc10529b45d108c61f1ebfa097844b5bc6
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1154
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-10-07 18:50:27 +00:00
c35d52b19e *: update build_naming_convention for new rules_go
Change-Id: Ib1604a46d24969ae0110985cda156d31b7cc27aa
2021-08-30 18:21:03 +00:00
cd5533e02d third_party/go: fix vbom.ml dependency
Looks like .ml DNS servers are currently down, and this repository
import path is deprecated anyway. Really, we should bump Kubernetes...

Change-Id: I3e0c834a49ccf1111b9412371489bae5f80ff6ab
2021-08-11 16:50:30 +00:00
8ef457feee hswaw/site: add calendar/event library
This will let us populate upcoming events server-side on the website (or
serve this data in a format that can be more easily consumed by JS).

Change-Id: I0f6b5bf9831f4d07acebb4eb77a7d88b63fe8e46
2021-07-11 17:17:33 +00:00
50e987cb68 third_party/go: move some repositories from WORKSPACE
Change-Id: Icc23c741512d148c9b3dfb19c52b205d4c0150bd
2021-07-11 17:17:33 +00:00
5d94a7b434 third_party/py: remove flask-oauthlib
This fixes resolution errors with newer pip versions (where
flask-oauthlib wants to pull in oauthlib==2 while requests-oauthlib
wants to pull in oauthlib==3).

We remove flask-oauthlib fully, as it's abandoned. Our copy of
flask-spaceauth (//hswaw/lib/flask_spaceauth) depends on it, but we will
update it to use authlib instead.

Change-Id: I51a9336015ddc0cad7457844d186bd8408371ab3
2021-07-10 15:41:08 +02:00
f7efc40ea4 factorio: bump to 1.1.35
Change-Id: I1b61b70d0d4c3b7506fbac5319fa9ed86de08bb4
2021-06-18 19:31:07 +00:00
b3799c80e8
games/factorio: run new pymods instance
Change-Id: I0a5c3b016e30f277744889cc93fa1ca576cdf1a0
2021-06-13 23:10:23 +02:00
87801be432 third_party/go: add minio client lib
This adds github.com/minio/minio-go, a library that can be used to
access S3-like storage, eg. our own radosgw. It's significantly lighter
than the entire Go AWS SDK, and seems to also be more idiomatic than it.

Change-Id: I1e18c7665b58480fb72e789692aa7f37816cd28f
2021-03-20 12:05:34 +00:00
4b613303b1 RFC: *: move away from rules_nixpkgs
This is an attempt to see how well we do without rules_nixpkgs.

rules_nixpkgs has the following problems:

 - complicates our build system significantly (generated external
   repository indirection for picking local/nix python and go)
 - creates builds that cannot run on production (as they are tainted by
   /nix/store libraries)
 - is not a full solution to the bazel hermeticity problem anyway, and
   we'll have to tackle that some other way (eg. by introducing proper
   C++ cross-compilation toolchains and building everything from C,
   including Python and Go)

Instead of rules_nixpkgs, we ship a shell.nix file, so NixOS users can
just:

  jane@hacker:~/hscloud $ nix-shell
  hscloud-build-chrootenv:jane@hacker:~/hscloud$ prodaccess

This shell.nix is in a way nicer, as it immediately gives you all tools
needed to access production straight away.

Change-Id: Ieceb5ae0fb4d32e87301e5c99416379cedc900c5
2021-02-15 22:11:35 +01:00
55cc9ab177 third_party: bump minecraft deps
Change-Id: Ib03669eef2f535ecf6711618b960f3058337fda5
2021-02-15 22:11:00 +01:00
a9bfa79ec7 factorio: remove old versions
Change-Id: Ib3655e1fd46ee2ba562df25e6263d068f3918b9f
2021-02-14 14:45:10 +00:00
Patryk Jakuszew
f27bade7c8 third_party/py: bump gevent and greenlet to latest versions
Previously specified gevent version was not compatible with Python 3.9.

Change-Id: I5c8ef317d65187dab2a0b0e217c474cda80bc496
2020-11-15 00:18:04 +01:00
301435f3c3 third_party/go: pay off some technical debt and hide the bodies
This is an amalgamation of a handful of small changes to Go deps.
Notably:

 - we remove our opencensus-proto fork, use upstream, use exclude=src to
   fix the build
 - unvendorify some deps
 - bump io_rules_go to fix WKT resolution

Notably, we now do not have the 'protoc-gen-go' error when running
kubecfg/kubectl anymore.

Change-Id: I34fb9e78b2b12e4543142183d601d01987076f32
2020-11-03 21:15:41 +01:00
e23717d520 third_party/go/kubernetes: fix version reported in kubectl
Change-Id: I5a45158004280c8ce6ba04c18af93e8dbbc300e4
2020-11-03 21:15:41 +01:00
c3f36e9bf1 third_party/go: bump kubernetes to 1.19.3
Change-Id: Id9245765936997088e94135fde409ff4c1539bba
2020-11-03 21:15:41 +01:00
99ce53c79a third_party: remove uWSGI
It's not being used outside of personal/q3k for now, and it's really
fucking up the build system.

Change-Id: Ie8f3e59e40e8be8ef3ec32118a591da2274e398c
2020-10-29 01:43:37 +01:00
79b506bcc2 third_party/go: unbreak build
This was missed in gerrit/486. Whoops, we should CI sooner than later.

Change-Id: Ic70b742c75d52dd615d4e2f946233783d156cead
2020-10-24 17:36:25 +02:00
b4c3f342e4 third_party/go: add gostatic
To test:

    bazel run '@com_github_piranha_gostatic//:gostatic'

Change-Id: Ie846429df0d1f1914f2734735591edebd5d29094
2020-10-24 17:30:44 +02:00
q3k
a4a5a66f88 Merge "nix: provide a python2 toolchain" 2020-10-10 15:59:58 +00:00
3af7da1988 third_party/licenses: create, import Apache-2.0
Change-Id: I3f1a9ede192e70244c8d51bd58e9232a186a203f
2020-10-10 15:59:29 +00:00
27885a9979 nix: provide a python2 toolchain
This allows us to use rules_docker from NixOS. However, the built
binaries are broken because of the Docker base image not being NixOS
based.

Change-Id: I29b93f1bae1575b04f97265c67497081d11a1910
2020-10-03 16:41:39 +00:00
194b1c8e62 WORKSPACE: use nix for python/go if available
This introduces Nix, the package manager, and nixpkgs, the package
collection, into hscloud's bazel build machinery.

There are two reasons behind this:

 - on NixOS, it's painful or at least very difficult to run hscloud out
   of the box. Especially with rules_go, that download a blob from the
   Internet to get a Go toolchain, it just fails outright. This solves
   this and allows hscloud to be used on NixOS.

 - on non-NixOS platforms that still might have access to Nix this
   allows to somewhat hermeticize the build. Notably, Python now comes
   from nixpkgs, and is fabricobbled in a way that makes pip3_import
   use Nix system dependencies for ncurses and libpq.

This has been tested to run ci_presubmit on NixOS 20.09pre and Gentoo
~amd64.

Change-Id: Ic16e4827cb52a05aea0df0eed84d80c5e9ae0e07
2020-10-03 18:31:38 +02:00
4e8622df35 djtest: use pyelftools to find uwsgi ld.so
Change-Id: I54bdaa588ff15d8c6ca73c4307076a93a5682d78
2020-09-25 21:00:11 +00:00
791ab6d1a5 factorio: bump to 1.0.0
Change-Id: I24c96e556ae4054fb1b25e671341f2cb671010c2
2020-08-14 10:35:28 +00:00
q3k
fe33aa6489 Merge "third_party/py: bump cffi and psycopg2 to latest versions" 2020-08-05 20:58:12 +00:00
970b7687f3 factorio: bump all to 0.18.40
Change-Id: Iaf9b28ce6fed9ba791075307ee3e75f218267d23
2020-08-04 20:33:25 +02:00
1773f32c8a factorio: bump to 0.18.40
Change-Id: I065a5e8a8c6608a137c0ae4f1cb04f8254ef6ddd
2020-08-01 22:02:38 +02:00
a8bc92f34a third_party/py: bump cffi and psycopg2 to latest versions
This fixes broken builds on Ubuntu 20.04 and Python 3.8.

Change-Id: Id81a38e5b9694fcb38c8c07b405a71354b10b601
2020-07-30 21:44:50 +02:00
cae27ecd99 Replace rules_pip with rules_python; use bazel built upstream grpc
instead of Python packages

As usual with Python sadness, the @pydeps wheels are built on the bazel
host, so stuffing them inside a container_image (or py_image) will cause
new and unexpected kinds of misery.

Change-Id: Id4e4d53741cf2da367f01aa15c21c133c5cf0dba
2020-07-08 18:55:34 +02:00
0c3b9a570e WORKSPACE: cleanup
This removes some old skylib/zlib deps, moves all Go repositories to a
separate file, and in general does a small cleanup pass on external
repository magic.

Change-Id: Ic9700ee4c40cdb2e5a68e4fc7c6b3e386a109f8a
2020-06-25 19:54:25 +02:00
0037edaa5b cluster/tools/rook-s3cmd-config: build using bazel
This turns the existing script into a proper sh_binary, and injects
dependencies (kubectl and jq) as deps into it.

This change also pulls in BUILDfiles for jq, and a dep (oniguruma) into
//third_party, and adds buildable external repositories for them.

The jq/oniguruma BUILDfiles are lifted from
https://github.com/attilaolah/bazel-tools/.

Change-Id: If2e548bd60a8fd34e4f3be767ae59c6b2f2286d9
2020-06-13 22:46:41 +02:00
q3k
0ae0728ea8 Merge "third_party/factorio: init" 2020-06-04 21:45:55 +00:00
5786d5245d third_party/java: actually commit
this unfucks master, whoops

Change-Id: I118b9d32aaf53e598333960b959bfb3c0fe33681
2020-05-18 23:48:49 +02:00
480505768d third_party/factorio: init
We turn the existing experimental BUILD file into a nicely abstracted
starlark rule generator, for generating both external repositories and
container build rules from a single source of truth.

We also add 0.18.22 (which we already pushed via :push_latest).

Change-Id: I521d6e5cb9447eaf6f237671b7ef07d621cd9c77
2020-05-18 00:46:31 +02:00