contrib/dockerrpm
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 10 Sep 2014 14:42:52 +0100
changeset 22394 813c6855b97f
parent 21642 76a347bcdb33
child 22438 f5abb231b80a
permissions -rwxr-xr-x
obsolete: properly drop 'date' from metadata Mistakes were made while resolving rebase conflicts in 4bc96685a40c. This led to 'date' being preserved in metadata when reading markers from a binary stream. As a result, some known markers were seen as "new" when pulling. I noticed it because a no-op pulls from main added about 600 duplicated markers to my obsstore (for each pull). I do not believe we need to perform any specific action to actively de-duplicates existing obsstore. After this fix, duplicated markers will no be propagated and the few affected repositories can probably deal with duplication (or people can repull the obsstore from a clone). As a side effect, we decode metadata only once, reducing the impact of the hack in fm0 to store extra important data (parents and date).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#!/bin/bash
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
BUILDDIR=$(dirname $0)
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
ROOTDIR=$(cd $BUILDDIR/..; pwd)
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
21642
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     6
if which docker.io >> /dev/null ; then
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     7
  DOCKER=docker.io
76a347bcdb33 docker: check for docker.io first
Matt Mackall <mpm@selenic.com>
parents: 21561
diff changeset
     8
elif which docker >> /dev/null ; then
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
  DOCKER=docker
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
fi
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
$DOCKER build --tag "hg-dockerrpm-$1" - < $BUILDDIR/docker/$1
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
$DOCKER run --rm -v $ROOTDIR:/hg "hg-dockerrpm-$1" bash -c \
21561
f1bcc33a5c52 docker: update package target to packages/
Matt Mackall <mpm@selenic.com>
parents: 21255
diff changeset
    14
    "cp -a hg hg-build; cd hg-build; make clean local $1; cp packages/$1/* /hg/packages/$1/"