contrib/packaging/docker/debian.template
author Georges Racinet <georges.racinet@octobus.net>
Fri, 27 Dec 2019 23:04:18 +0100
changeset 44257 9896a8d0d3d2
parent 38463 c8ef9d897e14
permissions -rw-r--r--
rust-node: handling binary Node prefix Parallel to the inner signatures of the nodetree functions in revlog.c, we'll have to handle prefixes of `Node` in binary form. Another motivation is that it allows to convert from full Node references to `NodePrefixRef` without copy. This is expected to be by far the most common case in practice. There's a slight complication due to the fact that we'll be sometimes interested in prefixes with an odd number of hexadecimal digits, which translates in binary form by a last byte in which only the highest weight 4 bits are considered. This is totally transparent for callers and could be revised once we have proper means to measure performance. The C implementation does the same, passing the length in nybbles as function arguments. Because Rust byte slices already have a length, we carry the even/odd informaton as a boolean, to avoid introducing logical redundancies and the related potential inconsistency bugs. There are a few candidates for inlining here, but we refrain from such premature optimizations, letting the compiler decide. Differential Revision: https://phab.mercurial-scm.org/D7790
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38463
c8ef9d897e14 packaging: don't write files for templatized Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38461
diff changeset
     1
FROM debian:%CODENAME%
38461
11eda1f1b6e7 packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38045
diff changeset
     2
11eda1f1b6e7 packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38045
diff changeset
     3
RUN groupadd -g 1000 build && \
11eda1f1b6e7 packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38045
diff changeset
     4
    useradd -u 1000 -g 1000 -s /bin/bash -d /build -m build
11eda1f1b6e7 packaging: consistently create build user in Dockerfiles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38045
diff changeset
     5
24973
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
RUN apt-get update && apt-get install -y \
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
  build-essential \
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
  debhelper \
34424
1baa077214ae docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents: 32150
diff changeset
     9
  devscripts \
24973
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
  dh-python \
32148
e02bae37af30 docker: install less as a build-time dependency in deb-based distros
Anton Shestakov <av6@dwimlabs.net>
parents: 24973
diff changeset
    11
  less \
24973
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
  python \
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
  python-all-dev \
4c4d0012db4f dockerdeb: rules to build a debian package using docker
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
  python-docutils \
34424
1baa077214ae docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents: 32150
diff changeset
    15
  unzip \
1baa077214ae docker: try to follow the best practices for writing Dockerfiles
muxator <a.mux@inwind.it>
parents: 32150
diff changeset
    16
  zip