easily installing modern Mercurial on RHEL6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

easily installing modern Mercurial on RHEL6

Hollis Blanchard
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?
-- 
Hollis Blanchard [hidden email]
Mentor Graphics Emulation Division

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

install-mercurial.sh (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Gregory Szorc
On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Augie Fackler-2

On Oct 14, 2017, at 5:22 PM, Gregory Szorc <[hidden email]> wrote:

On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?

Nope, you covered the bases well. I know we have a script like this for RHEL5, so it might be easy to adapt for RHEL6. Poke around in the makefile for things marked ‘centos'.


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Joe Healy
In reply to this post by Gregory Szorc
Hi,

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.
Although it does not meet all the OP's goals (no root access at all), we tend to install modern mercurial on these systems via nix. Gives us a common base across nearly all linux distros.


Cheers,

Joe

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Mathias De Maré
In reply to this post by Gregory Szorc


On Sat, Oct 14, 2017 at 11:22 PM, Gregory Szorc <[hidden email]> wrote:
On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.
The producing of those RPMs works fine (we're using it for CentOS 5, 6 and 7). As soon as I get permission to send a public key, they will be published on  https://www.mercurial-scm.org/release/ (I am hoping for today).

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial



_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Hollis Blanchard
I'm still waiting to see these RPMs, but I'm concerned about two things:
  1. They need to be relocatable, so that non-root users can install with 'rpm --prefix /foo'. This doesn't happen automatically:
    $ rpm --prefix /scratch1/hblancha/tmp -ivh https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    Retrieving https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    error: package mercurial is not relocatable
  2. This is only mercurial core, not including hg-git, hg-experimental, or liblz4.

Unless I can find an rpm one-liner for all these packages, I don't think RPMs are going to solve this problem.

Hollis Blanchard [hidden email]
Mentor Graphics Emulation Division
On 10/23/2017 02:13 AM, Mathias De Maré wrote:


On Sat, Oct 14, 2017 at 11:22 PM, Gregory Szorc <[hidden email]> wrote:
On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.
The producing of those RPMs works fine (we're using it for CentOS 5, 6 and 7). As soon as I get permission to send a public key, they will be published on  https://www.mercurial-scm.org/release/ (I am hoping for today).

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial




_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Cody Scott
I install Mercurial into a virtualenv and then create a symlink in a folder that is on my $PATH.

I also install hg-git and hg-evolve in the same virtualenv with Mercurial.



On Fri, Oct 27, 2017 at 11:56 AM, Hollis Blanchard <[hidden email]> wrote:
I'm still waiting to see these RPMs, but I'm concerned about two things:
  1. They need to be relocatable, so that non-root users can install with 'rpm --prefix /foo'. This doesn't happen automatically:
    $ rpm --prefix /scratch1/hblancha/tmp -ivh https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    Retrieving https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    error: package mercurial is not relocatable
  2. This is only mercurial core, not including hg-git, hg-experimental, or liblz4.

Unless I can find an rpm one-liner for all these packages, I don't think RPMs are going to solve this problem.

Hollis Blanchard [hidden email]
Mentor Graphics Emulation Division
On 10/23/2017 02:13 AM, Mathias De Maré wrote:


On Sat, Oct 14, 2017 at 11:22 PM, Gregory Szorc <[hidden email]> wrote:
On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.
The producing of those RPMs works fine (we're using it for CentOS 5, 6 and 7). As soon as I get permission to send a public key, they will be published on  https://www.mercurial-scm.org/release/ (I am hoping for today).

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial




_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial



_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Mathias De Maré
In reply to this post by Hollis Blanchard


On Fri, Oct 27, 2017 at 5:56 PM, Hollis Blanchard <[hidden email]> wrote:
I'm still waiting to see these RPMs, but I'm concerned about two things:
  1. They need to be relocatable, so that non-root users can install with 'rpm --prefix /foo'. This doesn't happen automatically:
    $ rpm --prefix /scratch1/hblancha/tmp -ivh https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    Retrieving https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    error: package mercurial is not relocatable
  2. This is only mercurial core, not including hg-git, hg-experimental, or liblz4.

Unless I can find an rpm one-liner for all these packages, I don't think RPMs are going to solve this problem.

I am waiting to get access to upload the RPMs. I haven't done anything special with these RPMs (I simply run 'make docker-centosX'), so that may indeed not solve your problem.

Greetings,
Mathias

Hollis Blanchard [hidden email]
Mentor Graphics Emulation Division
On 10/23/2017 02:13 AM, Mathias De Maré wrote:


On Sat, Oct 14, 2017 at 11:22 PM, Gregory Szorc <[hidden email]> wrote:
On Wed, Oct 11, 2017 at 7:15 PM, Hollis Blanchard <[hidden email]> wrote:
I've been experimenting with building a modern Mercurial environment on RHEL6. I need to include some external extensions (hg_experimental and hg-git), but my distribution is ancient I'm not even an administrator. I wanted to make it as easy as possible to install this environment on anybody's workstation, to remove initial installation as a barrier to adoption.

The attached script is not RHEL-specific, but it expects users to provide gcc 4.7 and python 2.7. I'm considering changing it to pull gcc 4.7 and lz4 packages from EPEL, which would tie it to RHEL...

It's certainly not a General Purpose Installer, but it works well for me and I'm sharing it in case it's useful to others in a similar situation. With improvements, would this be useful as a contrib/ script, or just a blog post somewhere?

I believe previous discussions around supporting Mercurial on older RHEL releases resulted in the decision to provide RPMs with a self-contained Python installation. Essentially, you could `yum localinstall /path/to/mercurial.rpm` and it would "just work." What I'm not sure is if we ever landed code to produce those RPMs. If we did, we're not publishing them to https://www.mercurial-scm.org/release/.
The producing of those RPMs works fine (we're using it for CentOS 5, 6 and 7). As soon as I get permission to send a public key, they will be published on  https://www.mercurial-scm.org/release/ (I am hoping for today).

Of course, anything we can do to make installing a modern Mercurial on as many machines as possible is a good idea. So if you feel others could benefit from the script you wrote, I'd encourage you to send it as a patch.

Augie: anything to add?


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial





_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: easily installing modern Mercurial on RHEL6

Mathias De Maré


On Mon, Oct 30, 2017 at 8:47 AM, Mathias De Maré <[hidden email]> wrote:


On Fri, Oct 27, 2017 at 5:56 PM, Hollis Blanchard <[hidden email]> wrote:
I'm still waiting to see these RPMs, but I'm concerned about two things:
  1. They need to be relocatable, so that non-root users can install with 'rpm --prefix /foo'. This doesn't happen automatically:
    $ rpm --prefix /scratch1/hblancha/tmp -ivh https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    Retrieving https://www.mercurial-scm.org/release/centos6/RPMS/x86_64/mercurial-4.0-0.9_rc.x86_64.rpm
    error: package mercurial is not relocatable
  2. This is only mercurial core, not including hg-git, hg-experimental, or liblz4.

Unless I can find an rpm one-liner for all these packages, I don't think RPMs are going to solve this problem.

I am waiting to get access to upload the RPMs. I haven't done anything special with these RPMs (I simply run 'make docker-centosX'), so that may indeed not solve your problem.
CentOS 5, 6 and 7 packages are now available for the latest Mercurial, see https://www.mercurial-scm.org/downloads .

(As mentioned, I didn't do anything to make these relocatable.)

Greetings,
Mathias

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial