annotate tests/test-mac-packages.t @ 29027:db5084d27df5 stable

osx: create a modern package including manpages Instead of using bdist_mpkg, we use the modern Apple-provided tools to build an OS X Installer package directly. This has several advantages: * Avoids bdist_mpkg which seems to be barely maintained and is hard to use. * Creates a single unified .pkg instead of a .mpkg. * The package we produce is in the modern, single-file format instead of a directory bundle that we have to zip up for download. In addition, this way of building the package now correctly: * Installs the manpages, bringing the `make osx`-generated package in line with the official Mac packages we publish on the website. * Installs files with the correct permissions instead of encoding the UID of the user who happened to build the package. Thanks to Augie for updating the test expectations.
author Kevin Bullock <kbullock+mercurial@ringworld.org>
date Wed, 27 Apr 2016 10:20:36 -0500
parents f2549b0ba9ab
children 3c9066ed557c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
1 #require test-repo slow osx osxpackaging
29025
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
2 $ OUTPUTDIR=`pwd`
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
3 $ export OUTPUTDIR
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
4 $ KEEPMPKG=yes
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
5 $ export KEEPMPKG
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
6
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
7 $ cd "$TESTDIR"/..
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
8 $ rm -rf dist
29025
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
9 $ make osx > $OUTPUTDIR/build.log 2>&1
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
10 $ cd $OUTPUTDIR
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
11 $ ls -d *.pkg
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
12 Mercurial-*-macosx10.*.pkg (glob)
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
13
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
14 $ xar -xf Mercurial*.pkg
29025
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
15
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
16 Gather list of all installed files:
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
17 $ lsbom mercurial.pkg/Bom > boms.txt
29025
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
18
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
19 Spot-check some randomly selected files:
29027
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
20 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
21 ./Library/Python/2.7/site-packages/mercurial/bdiff.so 100755 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
22 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
23 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
24 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
25 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
26 ./usr/local/share/man/man1 40755 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
27 ./usr/local/share/man/man1/hg.1 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
28 ./usr/local/share/man/man5 40755 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
29 ./usr/local/share/man/man5/hgignore.5 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
30 ./usr/local/share/man/man5/hgrc.5 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
31 $ grep bser boms.txt | cut -d ' ' -f 1,2,3
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
32 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
33 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
34 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
35 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
36 $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
37 ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
38 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
39 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
40 $ grep '/hg ' boms.txt | cut -d ' ' -f 1,2,3
db5084d27df5 osx: create a modern package including manpages
Kevin Bullock <kbullock+mercurial@ringworld.org>
parents: 29025
diff changeset
41 ./usr/local/bin/hg 100755 0/0
29025
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
42
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
43 Note that we're not currently installing any /etc/mercurial stuff,
f2549b0ba9ab tests: add test for Mac OS X package construction
Augie Fackler <augie@google.com>
parents:
diff changeset
44 including merge-tool configurations.