Commit Graph

21 Commits (master)

Author SHA1 Message Date
informatic ebae01636e shell: fix colmena run
Somehow SHELL variable from host was still kept in pure shell.

This should prevent colmena deploys failing when host is built against
libc newer than the one in our fhsuserenv.

Change-Id: Ia98e35e71d8d3a0ae2920a18ff2fe6a2e8ed2d53
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1910
Reviewed-by: q3k <q3k@hackerspace.pl>
2024-03-07 22:47:01 +00:00
informatic ff8a50cb02 ops: colmena integration
Change-Id: I18b9218f2c29a84f7fa769e1a9f561a4385578ca
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1757
Reviewed-by: q3k <q3k@hackerspace.pl>
2024-02-07 18:12:12 +00:00
q3k f4313b7b26 env.sh: do not set CC=clang in nix(os)
That seems to be broken:

  external/com_google_absl/absl/base/config.h:56:10: fatal error: 'cstddef' file not found

We should probably make it work some day, but let's unbreak things
first.

Change-Id: I5bc6892f8c6353a626f5ca103805c9a0e9a0d494
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1726
Reviewed-by: informatic <informatic@hackerspace.pl>
2023-10-14 11:51:39 +00:00
q3k d9567b3b99 java: use JDK 11
This is needed for newer versions of the gerrit owners plugin.

We also need to add zlib to our shell, as binary builds of JDK11 used by
Bazel require it.

Change-Id: Idbbc5e0d88cac13daf2e5f201be6032412bf1a5d
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1641
Reviewed-by: implr <implr@hackerspace.pl>
2023-10-09 19:02:12 +00:00
q3k 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
q3k e35199ad9b shell.nix: add libxcrypt (needed for some python junk)
Change-Id: Ie094aa06669c82018708534eea58a161f89f8742
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1492
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-04-01 11:19:20 +00:00
patryk 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
informatic b39edc3256 shell.nix: pin bazel version
Change-Id: I34e665bf19069162a5ee671147eaf057a26e6381
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1388
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-09-28 23:01:35 +00:00
q3k 8e439ed8e3 shell: add vim, openssh (hermeticity)
Change-Id: I846b5e2d3f93159a149d694a40d21f22d4fccddc
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1323
Reviewed-by: informatic <informatic@hackerspace.pl>
2022-06-19 11:48:57 +00:00
informatic 45e4fecf2e shell: improve hermeticity
* Add some missing tools and ssl cert bundles to fix builds when using
nix-shell --pure
* Replaced broken //tools:install with direct bazel build in shell.nix
initialization to prevent cache thrashing
* Added fontconfig file with roboto font for use in wkhtmltopdf

Change-Id: I062380df5f1d83a0fb2df8ca172f362fff9ecf8e
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1301
Reviewed-by: q3k <q3k@hackerspace.pl>
Reviewed-by: pl <pl@hackerspace.pl>
2022-05-01 08:17:57 +00:00
q3k 0f8e5a2132 *: do not require env.sh
This removes the need to source env.{sh,fish} when working with hscloud.

This is done by:

 1. Implementing a Go library to reliably detect the location of the
    active hscloud checkout. That in turn is enabled by
    BUILD_WORKSPACE_DIRECTORY being now a thing in Bazel.
 2. Creating a tool `hscloud`, with a command `hscloud workspace` that
    returns the workspace path.
 3. Wrapping this tool to be accessible from Python and Bash.
 4. Bumping all users of hscloud_root to use either the Go library or
    one of the two implemented wrappers.

We also drive-by replace tools/install.sh to be a proper sh_binary, and
make it yell at people if it isn't being ran as `bazel run
//tools:install`.

Finally, we also drive-by delete cluster/tools/nixops.sh which was never used.

Change-Id: I7873714319bfc38bbb930b05baa605c5aa36470a
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1169
Reviewed-by: informatic <informatic@hackerspace.pl>
2021-10-17 21:21:58 +00:00
informatic 0c59cb33af shell.nix: add missing gnupg
This should fix secretstore on NixOS

Change-Id: Id86b0e920bef82f08a67a84e59d37d6f8737d83f
2021-09-14 20:00:42 +02:00
informatic 013c159dfe Merge "shell.nix: add missing tools" 2021-09-14 16:43:21 +00:00
informatic cb9cbb3fcc shell.nix: add missing tools
Some tools were taken from "host" shell/PATH which crashed in certain
cases due to libc incompatiblity.

Fixes b/50

Change-Id: Ie94e2c064afff6d5aa782f70e0a024365079e4c7
2021-09-14 18:37:10 +02:00
implr 7f7dcd9847 Merge "nix: upgrade readTree" 2021-09-11 10:19:03 +00:00
implr 56ff18c486 nix: upgrade readTree
Change-Id: I460800dc3d8095e2ae89b8bd6ed7c5f0c90b6ccf
2021-09-11 12:18:04 +02:00
q3k 69ff6038d5 shell.nix: colorful prompt
https://object.ceph-waw3.hswaw.net/q3k-personal/815968ff10071d4192e464c91b64228e760128267311a94872006d87cbfd0bd9.png

Change-Id: Ia4eeddf045af0d0bdc962087aaeed55d11846648
2021-09-10 23:15:38 +00:00
mlen 51f6c10660 shell.nix: add git to targetPkgs
nix-shell attempts to use packages from the system and fails to find git
installed via users.users.<name>.packages.  Adding it to targetPkgs
resolves the issue and makes the dependency explicit.

Change-Id: Ie0c3e48065174a5032ced9c31236f65255483d08
2021-07-18 18:08:27 +00:00
q3k 43b0e0920f shell.nix: add random utilities
Change-Id: I49bfe400af054a8bcc0861f6066e7ca426590268
2021-06-06 12:59:44 +00:00
q3k dce10bae86 shell.nix: add binutils and gcc
Fixes b.hswaw.net/33

Change-Id: Iadeb4157f4271ad684b6c2603d734cb0c098238d
2021-03-11 23:17:21 +00:00
q3k c97461e844 shell.nix: actually add
This should've been merged in with cr/704. Whoops.

Change-Id: I1fe18a74462e8bdc0350c5ba26b51261b76c7ae1
2021-02-17 19:30:51 +00:00