Commit Graph

117 Commits

Author SHA1 Message Date
Gregory Szorc
e7a98e2138 make: targets for building packages for ubuntu yakkety
Ubuntu 16.10 Yakkety Yak is out. Let's support it.
2016-11-01 18:49:23 -07:00
Augie Fackler
6cbd7d8973 osx: stamp the hg version into the version field in the pkg
This is required for tools like https://github.com/munki/munki, and is
also more semantically correct.
2016-08-12 17:51:48 -04:00
Pierre-Yves David
a098ddad6b make: introduce a target to clean everything but packages
Removing the 'packages' directory makes nightly builder life much harder.
2016-07-29 00:39:59 +02:00
Augie Fackler
c36830f5df osx: explicitly build hg with /usr/bin/python2.7
This should help avoid creating a package that depends on a custom
Python, as happened when I built a package for 3.8.
2016-07-13 10:39:33 -04:00
Sean Farley
ca1aff7fdb ubuntu-xenial-ppa: add makefile rule 2016-04-27 01:07:40 -07:00
Sean Farley
83ef160aa1 ubuntu-wily-ppa: add makefile rule 2016-04-27 01:02:56 -07:00
Sean Farley
49dcbb48fa ubuntu-trusty-ppa: add makefile rule 2016-04-27 00:27:10 -07:00
Sean Farley
492deac0a3 ubuntu-xenial: add makefile rule to build deb 2016-04-27 00:18:18 -07:00
Sean Farley
8d241b8149 ubuntu-wily: add makefile rule to build deb 2016-04-27 00:10:49 -07:00
Sean Farley
bf3866fc9f make: turn ubuntu docker into template
This allows us to easily add more ubuntu docker targets (which following
patches will do).

Also, we no longer need the mkdir command.
2016-04-26 23:33:17 -07:00
Kevin Bullock
971fb62b26 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.
2016-04-27 10:20:36 -05:00
Augie Fackler
8b0b581117 osx: add support for keeping mpkgs
This is a bit of a hack, but I don't really want to mount a dmg during
a test, and I don't see an option with hdiutil to take a dmg and spit
out a folder, so this is what we've got for now.
2016-04-18 23:59:28 -04:00
Augie Fackler
a7f803602c osx: add support for dumping built dmg into OUTPUTDIR 2016-04-18 23:57:22 -04:00
Siddharth Agarwal
74116a4f32 make: backout changeset e3b84d90a55b
Support for '!=' was only added in GNU Make 4.0, and CentOS versions as new as
CentOS 7 only carry 3.82.

I will leave figuring out compatibility with BSD make as an exercise for
interested folks.
2016-04-25 16:34:02 -07:00
Augie Fackler
280edd8f34 make: use shell-command assignment instead of $(eval ...)
This is portable between BSD and GNU make.

As of this change, our Makefile appears to work in both BSD and GNU
make, with the caveat that the test-% and testpy-% wildcard rules
don't work on BSD make. That said, this still seems worthwhile because
it lets the buildbots work more consistently across platforms.
2016-04-21 10:11:20 -04:00
Augie Fackler
da32b6b74d make: do assignment and export in a single statement
This is portable between GNU and BSD make, whereas doing the export on
its own line confuses BSD make.
2016-04-21 10:10:48 -04:00
Augie Fackler
10944bd011 make: alter how we compute compiler flags for setup.py
This is portable between BSD and GNU make. I'm not thrilled with how
it worked out, but it's portable and solves the problem.
2016-04-21 10:05:14 -04:00
Sean Farley
c278aa536d make: add rule for building an ubuntu ppa 2016-04-16 13:02:13 -07:00
Sean Farley
33f8cae522 make: remove packages directory in clean rule 2016-04-15 13:10:34 -07:00
Sean Farley
8110a0a71f make: add forgotten hgext3rd to clean rule 2016-04-15 11:51:57 -07:00
Sean Farley
ec938b217f make: add chg to clean rule 2016-04-15 11:51:41 -07:00
Anton Shestakov
78963e34c6 dockerdeb: add Ubuntu Trusty
One problem reported by lintian is "bad-distribution-in-changes-file unstable"
in changelog, but the current changelog for the official package in Ubuntu also
uses that distribution name (unstable), because they import from Debian. This
certainly doesn't stop the build process.
2016-03-10 23:46:19 +08:00
timeless
d54666f50a setup: create a module for the modulepolicy
Instead of rewriting __init__ to define the modulepolicy,
write out a __modulepolicy__.py file like __version__.py

This should work for both system-wide installation and in-place build. Therefore
we can avoid relying on two separate modulepolicy rules, '@MODULELOADPOLICY@'
and 'mercurial/modulepolicy'.
2016-03-09 15:47:01 +00:00
Anton Shestakov
11e3a4574b builddeb: read default distribution and codename from lsb_release
This makes `make deb` place packages into a more appropriately named directory
instead of just "debian-unknown".
2015-11-25 18:07:33 +08:00
Anton Shestakov
b61eeae0ab builddeb: add --distid option to specify Distributor ID
This allows builddeb to handle distributions that are not Debian.

Distributor ID is reported by lsb_release --id, and in case of builddeb it's
usually Debian or Ubuntu.
2015-11-25 15:15:03 +08:00
Anton Shestakov
b5106c63ef builddeb: rename --release option to --codename
Debian and Ubuntu releases have both codenames and traditional version numbers.
An entire "branch" of releases is referred to by its codename, and version
numbers (e.g. 8.2, 14.04.3) are used to address individual releases.

Since we use codenames for building .deb packages, let's call the option and
the variable appropriately.
2015-11-25 14:59:43 +08:00
Nathan Goldbaum
77c0959268 makefile: add wheel build target 2015-10-09 12:30:46 -05:00
Augie Fackler
bf1f880a9e builddeb: rework how output dir and platform are specified
This makes it possible to write tests for both builddeb and dockerdeb
that actually build .debs and then sanity check the contents.
2015-08-25 00:02:44 -04:00
Augie Fackler
196afc1244 docker-debian-jessie: fix errant mkdir 2015-08-24 23:47:43 -04:00
Augie Fackler
dfa5f19293 makefile: rename debian-jessie to deb
`make debian-jessie` was a poor name choice on my part, because it
really builds a package for the current debian platform, whatever that
happens to be, rather than a specific platform. Rename it to just
`make deb` so that it's a little clearer. As a result, it now places
built debs in a "debian-unknown" directory.
2015-08-27 14:24:39 -04:00
Augie Fackler
c491e8091f dockerdeb: rules to build a debian package using docker
Currently only supports jessie (current stable), but other version
should be trivial.
2015-05-06 13:15:39 -04:00
Augie Fackler
c2c147fe7a builddeb: new script for building a deb package
Future work will allow us to use docker to build debs.

Right now this doesn't install any config files. I plan to do that as
a followup, but getting something basic and working checked in seems
like more of a priority than getting everything done in one big step.

This also does not create a source deb yet. I haven't looked into that
process.

Note that this declares incompatibility with the `mercurial-common`
package. It's typical for debian packages to be split between
architecture-independent bits and native bits, meaning the python bits
downstream live in mercurial-common and the c extension bits live in
mercurial. We don't do that because we want to (ideally) give users a
single deb file to install.
2015-05-06 13:13:54 -04:00
FUJIWARA Katsunori
6d60352ea0 i18n: extract doc string of each web commands as translatable one
Before this patch, doc string of each web commands isn't extracted as
translatable one, even though web commands are listed up in "hg help
hgweb".

This patch adds "mercurial/hgweb/webcommands.py" on to arguments of
"i18n/hggettext". "i18nfunctions" added into "webcommands.py" is used
by "i18n/hggettext" to get the list of functions having translatable
doc string.
2015-04-28 00:38:16 +09:00
Yuya Nishihara
6c27e6c97a templater: tell hggettext to collect help of template functions 2015-04-03 21:36:39 +09:00
Augie Fackler
d5c405b03d Makefile: allow setting HGTESTFLAGS in shell environment for TESTFLAGS
I keep wanting to run 'make tests', but I forget to set TESTFLAGS='-j
16' or whatever is reasonable for my machine. This lets me just set it
once in my shell settings and forget it.
2015-02-04 15:17:13 -05:00
Augie Fackler
bc6c2de805 Makefile: introduce testpy-% target for testing with a specifc Python
This makes it easy to do 'make testpy-2.4.6 TESTFLAGS="-j 16"' and the
Makefile will build Python if needed and then run tests (with -j 16)
with the resulting Python.

You can set the environment variable HGPYTHONS to a nice location on
your machine to cache the Python builds globally. If that's not set,
it builds them inside build/pythons.
2015-02-04 12:26:16 -05:00
Mads Kiilerich
031d0b9afc osx: patch .pax.gz files in pkg bundles so they extract as root (issue4081)
The packages has to be installed by root but they would be installed
insecurely, owned by the uid of the unprivileged user that made the package.
The local user with that uid could thus write to /usr/local/bin/hg .

bdist_mpkg calls out to pax to create the package, but pax do apparently not
have the power to control what it is writing.

Instead, patch the pax files and set their uid fields to 0 before they are
wrapped in a dmg.
2015-01-23 06:28:28 +01:00
Mads Kiilerich
e7afe1bb24 osx: use bdist_mpkg.script_bdist_mpkg module instead of bdist_mpkg command
It seems like a default installation of bdist_mpkg makes it available as
Python module, but the corresponding executable is placed in a location like
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/bin which is
not in $PATH and thus not directly available. 'make osx' would thus fail.

Instead, skip the bdist_mpkg executable and invoke it as a Python module. That
works out of the box here.
2015-01-21 05:04:48 +01:00
Mads Kiilerich
fc3f4381fd osx: don't launch installer after building it with bdist_mpkg
bdist_mpkg do for some reason default to use the parameter --show ("Open with
Installer.app after building") if no parameters are specified. We do not like
that.

All the important parameters to bdist_mpkg are already specified in setup.py
and we don't have any to specify in the Makefile.

Instead, specify the parameter '--' which do no harm but will disable the
default opening of the installer. This makes it possible to build packages
"silently".
2015-01-21 05:04:46 +01:00
Mads Kiilerich
e8c3de8b41 docker: support Fedora 21 2014-11-02 02:36:47 +01:00
Mads Kiilerich
f8bf9f40a4 Makefile: update .PHONY
Based on
sed -n 's/^\([a-z0-9-]*\):\(\s.*\)\?$/\1/gp' Makefile | xargs echo
add check, check-code, update-pot, some packaging targets
2014-11-01 20:00:31 +01:00
Mads Kiilerich
79c175d696 docker: add centos7 target for CentOS / Red Hat 7 support 2014-10-16 17:44:14 +02:00
Mads Kiilerich
eff8053e22 docker: add CentOS 5
There is no official CentOS 5 docker template so we use one from saltstack.
2014-05-15 01:48:37 +02:00
Mads Kiilerich
b06c2984ad docker: use stable tags for fedora and centos
A moving target is rarely useful.
2014-08-31 13:41:09 +02:00
J. Lewis Muir
1c3ff4a87e build: don't clean __version__.py on 'make clean' in release tarballs
When running 'make clean' in an extracted release tarball, file
mercurial/__version__.py is removed, causing a subsequent install to
indicate 'version unknown'.

This problem was reported in the past [1] and a patch proposed in that mail,
but was never properly sent nor applied.

[1] http://selenic.com/pipermail/mercurial/2010-December/036249.html
2014-09-02 11:28:44 +02:00
Mads Kiilerich
03327f4889 osx: create dmg with installer instead of zip
OS X would offer to expand the zip so the (multi file) installer inside it
could be run ... but that would leave the expanded zip folder around.

Instead, use a .dmg file that automatically will be mounted - that seems more
common on OS X.

Still, there is two levels of levels of clicking before actually launching the
installer. Having a single file installer would be better ... but seems to be
hard. A more feasible improvement would be some fancy layout inside the .dmg .
2014-08-31 10:24:25 +02:00
Kevin Bullock
b5dafd9f52 build: don't use -s flag for which
`which -s` is a BSDism that doesn't exist on other versions of
`which`. That means that even on Mac OS X, `make osx` breaks if you have
another utils package installed (e.g. debianutils installed thru
fink). Redirect output to /dev/null instead.
2014-08-29 12:06:31 +02:00
Mads Kiilerich
d77462b1b9 buildrpm: remove prompt for uncommitted changes - it was a bad idea
We want a command that is useful in scripts, not an interactive command.
2014-05-15 01:48:37 +02:00
Matt Mackall
761e95b927 packaging: move output directory from build/ to packages/
setuptools owns build/ and dist/ and we want to have our own scheme
2014-05-27 11:52:39 -07:00
Matt Mackall
d9263873c7 make: add a basic osx mpkg target 2014-05-27 11:39:22 -07:00