2020-12-20 16:08:08 +01:00
|
|
|
From 9467d1138799d0fc127f9e1e09cf2afd9b85de79 Mon Sep 17 00:00:00 2001
|
2020-07-03 00:28:39 +02:00
|
|
|
From: Luke Granger-Brown <git@lukegb.com>
|
|
|
|
Date: Thu, 2 Jul 2020 23:02:09 +0100
|
2020-11-27 18:39:35 +01:00
|
|
|
Subject: [PATCH 1/6] Use detzip in download_bower.py
|
2020-07-03 00:28:39 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
tools/js/download_bower.py | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
feat(gerrit): Create Gerrit derivation.
This uses the actual Bazel build, using a variety of tricks and hacks to
make it actually work.
Bazel really wants to download linux binaries from the internet and run
them. In lieu of trying to fix the build system to not do this, we
instead put bazel inside an FHS environment, which allows the binaries
to find their dependencies.
We also have to patch a few things:
* We use build --nobuild instead of fetch, so we only fetch the
dependencies we actually need for the build and not, say, Windows
binaries.
* We don't remove rules_cc, because we need it as an external
dependency, not bundled.
* We do some manual fixes on the cache before packing, because we need
to remove some in-tree sources (so they don't cause the hash to break,
since the hashes differ each time they're generated), and also remove
some extraneous files.
* We explicitly turn off the repository and disk caches, because the
.bazelrc at the root of the Gerrit tree turns them on, with paths
pointing into the user's home directory.
* detzip is used instead of the zip binary for packing bower_components
into an archive. detzip doesn't create entries for directories, and
also doesn't store most metadata (timestamps, etc.), and uses store
(i.e. uncompressed) compression only. It also sorts the file tree
before writing them into the file.
Change-Id: I572c43f7175067ecb1b85cdf40dda13a52de1439
Reviewed-on: https://cl.tvl.fyi/c/depot/+/252
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 13:23:47 +02:00
|
|
|
diff --git a/tools/js/download_bower.py b/tools/js/download_bower.py
|
|
|
|
index 1df4b826bc..65bda74082 100755
|
|
|
|
--- a/tools/js/download_bower.py
|
|
|
|
+++ b/tools/js/download_bower.py
|
|
|
|
@@ -106,7 +106,7 @@ def main():
|
|
|
|
args.b, '--quiet', 'install', '%s#%s' % (args.p, args.v)))
|
|
|
|
bc = os.path.join(cwd, 'bower_components')
|
|
|
|
subprocess.check_call(
|
|
|
|
- ['zip', '-q', '--exclude', '.bower.json', '-r', cached, args.n],
|
|
|
|
+ ['detzip', '--exclude', '.bower.json', cached, args.n],
|
|
|
|
cwd=bc)
|
|
|
|
|
|
|
|
if args.s:
|
2020-07-03 00:28:39 +02:00
|
|
|
--
|
2020-11-27 18:39:35 +01:00
|
|
|
2.29.2
|
2020-07-03 00:28:39 +02:00
|
|
|
|