Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require a git repository to build and install #5068

Closed
nalimilan opened this issue Dec 8, 2013 · 5 comments
Closed

Do not require a git repository to build and install #5068

nalimilan opened this issue Dec 8, 2013 · 5 comments
Labels
building Build system, or building Julia or its dependencies

Comments

@nalimilan
Copy link
Member

Currently packagers need to carry patches to disable git when building Julia:

I also needed to patch deps/Makefile (and Debian does something similar) so that I can provide a tarball instead of using the git submodule for libuv:
https://gist.github.com/nalimilan/7863923

Of course since this is an unofficial version of libuv, but for packaging it's much better to get a tarball from Github using an URL such as
https://github.com/JuliaLang/libuv/archive/%{uvcommit}/archive/libuv-%{uvversion}-%{uvshortcommit}.tar.gz
This way stable sources can be downloaded by anybody simply having access to the package control file.

Thus, it would be nice if the Makefile could check whether a tarball for libuv is present before trying to use the git submodule. Or maybe a global switch could be enabled when make detects that the build is happening from a tarball rather than a git repository?

@ivarne
Copy link
Member

ivarne commented Dec 8, 2013

CC @staticfloat
Could we just move the build_h.jl stuff out of the makefile to a build_h.sh. Then the makefile could check for git availability and regenerate build_h.jl only if possible. We might also have a default build_h.jl, so that those who build from a github tarball doesn't get a empty BUILD_INFO.

@staticfloat
Copy link
Member

@ivarne that sounds fine to me. Moving it out to a build_h.sh that invokes git is a good idea, and it would be a good simplification to have a lack of git information just not touch the current build_h.jl. This would make it so that the Debian build process and such doesn't need any patches with regards to git.

@nalimilan I would review a pull request for a makevar such as IGNORE_SUBMODULES that could be set to disable the submodule updates. Note that you'd basically just need to modify these lines, but you would then need to ensure that all the submodules that you want are downloaded before building.

@nalimilan
Copy link
Member Author

@staticfloat I think I'd prefer a solution where make detects that it's running from a tarball (i.e. not .git directory), and thus sets a variable like NOGIT. This means that people who do not use git do not need to bother about it. After all, if .git is missing, there's no chance updating submodules will work.

@JeffBezanson
Copy link
Member

Very similar to #2539

@ivarne
Copy link
Member

ivarne commented Mar 5, 2014

I think this can be closed now.

@pao pao closed this as completed Mar 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

No branches or pull requests

5 participants