Discussion:
Setup post-commit mailer fails
Michael Silberman
2017-01-25 22:27:10 UTC
Permalink
Hello,
I've upgraded Subversion to 1.9 and Python to 2.7. Where can I find the Subversion Python binding and Python script mailer.py? Does anyone have instructions to configure the notification script environment so email notices work with this script?
Regards,
Michael
Pavel Lyalyakin
2017-01-26 11:15:30 UTC
Permalink
Hello Michael,

On Thu, Jan 26, 2017 at 1:27 AM, Michael Silberman
Post by Michael Silberman
Hello,
I’ve upgraded Subversion to 1.9 and Python to 2.7. Where can I find the Subversion Python binding and Python script mailer.py? Does anyone have instructions to configure the notification script environment so email notices work with this script?
Regards,
Michael
What exactly do you mean by "setup post-commit mailer fails"?

Anyway, `mailer.py` is available at
http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/mailer/

--
With best regards,
Pavel Lyalyakin
VisualSVN Team
Michael Silberman
2017-01-26 18:33:53 UTC
Permalink
Hello Pavel,
I'm on a VM with Red Hat Enterprise Linux Server release 6.8 (Santiago) so I'm limited to the packages I can get through yum, but I used the RPM to get Python 2.7 installed. I replicated the files on our old Subversion server for the mailer.conf, post-commit, and the mailer.py. The new server has Subversion 1.9.4 (r1740329 wd-1) installed. I'm not a Python programmer so I don't know what packages are required to transition the mailer.py script to work with the Subversion 1.9 installed and the Python 2.7 version.
Here is the error I get during testing.

$ svn ci -m "addin readme" README
Adding README
Transmitting file data .
Committed revision 2.

Warning: post-commit hook failed (exit code 1) with output:
You need version 1.5.0 or better of the Subversion Python bindings.

Is there an RPM or set of them I need to install to make this work? Is there a path issue? Any steps necessary to edit the script?

Regards,
Michael Silberman
-----Original Message-----
From: Pavel Lyalyakin [mailto:***@visualsvn.com]
Sent: Thursday, January 26, 2017 3:16 AM
To: Michael Silberman <***@Netgear.com>
Cc: ***@subversion.apache.org
Subject: Re: Setup post-commit mailer fails

Hello Michael,
Post by Michael Silberman
Hello,
I’ve upgraded Subversion to 1.9 and Python to 2.7. Where can I find the Subversion Python binding and Python script mailer.py? Does anyone have instructions to configure the notification script environment so email notices work with this script?
Regards,
Michael
What exactly do you mean by "setup post-commit mailer fails"?

Anyway, `mailer.py` is available at
https://urldefense.proofpoint.com/v2/url?u=http-3A__svn.apache.org_viewvc_subversion_trunk_tools_hook-2Dscripts_mailer_&d=DwIFaQ&c=mPqdMxlQPdltZylzF3sRPA&r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=0KxTt-1pzStcu8elgA8_6bcgSQtmi-C8WZg2x_A4acs&s=d06yH1k94ReCDy1AYmWOzNtR3dsHrL4bFkJdgs-xNJw&e=
--
With best regards,
Pavel Lyalyakin
Vis
Stefan Sperling
2017-01-26 19:07:31 UTC
Permalink
Post by Michael Silberman
Is there an RPM or set of them I need to install to make this work?
Depends.

The Apache Subversion project does not officially endorse or
maintain any binary packages of the Subversion software.
See http://subversion.apache.org/packages.html

Depending on where you got your binary packages from, the distributor
of those packages may have chosen to package python bindings separately.
For example, it seems in CentOS the python bindings are packaged
as an additional RPM called 'subversion-python'.
This choice is up to the distributor, not the Subversion project.

Unless you tell us which SVN binary packages you installed it is
impossible for us to find the name of the extra package you might need.

You could also ask the distributor of your package.
Michael Silberman
2017-01-26 19:23:41 UTC
Permalink
Thank you!
I'm not sure how they installed the packages but assuming they used yum to do it.
# yum list | egrep -i "svn|subversion"
acp-gfr-scripts-svn.noarch 1.7.4.1-56 installed
ltrace.x86_64 0.5-28.45svn.el6 @anaconda-RedHatEnterpriseLinux-201604140956.x86_64/6.8
mod_dav_svn.x86_64 1.9.4-1 @/mod_dav_svn-1.9.4-1.x86_64
subversion.x86_64 1.9.4-1 @/subversion-1.9.4-1.x86_64
subversion-debuginfo.x86_64 1.9.4-1 @/subversion-debuginfo-1.9.4-1.x86_64
subversion-fsfswd.x86_64 1.9.4-1 @/subversion-fsfswd-1.9.4-1.x86_64
subversion-javahl.x86_64 1.9.4-1 @/subversion-javahl-1.9.4-1.x86_64
svn-multisite-plus.x86_64 1:1.9.2.2-147 @/svn-multisite-plus-1.9.2.2-147.x86_64
eclipse-svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
kmid.i686 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid.x86_64 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid-common.noarch 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
libdvdread.x86_64 4.1.4-0.3.svn1183.el6 rhel-6-server-rpms
matchbox-window-manager.x86_64 1.2-6.20070628svn.1.el6 rhel-6-server-rpms
sgabios-bin.noarch 0-0.3.20110621svn.el6 rhel-6-server-rpms
subversion.i686 1.6.11-15.el6_7 rhel-6-server-rpms
subversion-javahl.i686 1.6.11-15.el6_7 rhel-6-server-rpms
svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms

I downloaded the Python 2.7 tarball from https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
I built it and installed alternate target.

I installed the RPM from http://opensource.wandisco.com/rhel/6/svn-1.9/RPMS/x86_64/subversion-python-1.9.4-1.x86_64.rpm.

Does this help? Is there another set of commands to run that would provide more useful information?

-----Original Message-----
From: Stefan Sperling [mailto:***@elego.de]
Sent: Thursday, January 26, 2017 11:08 AM
To: Michael Silberman <***@Netgear.com>
Cc: Pavel Lyalyakin <***@visualsvn.com>; ***@subversion.apache.org
Subject: Re: Setup post-commit mailer fails
Post by Michael Silberman
Is there an RPM or set of them I need to install to make this work?
Depends.

The Apache Subversion project does not officially endorse or maintain any binary packages of the Subversion software.
See https://urldefense.proofpoint.com/v2/url?u=http-3A__subversion.apache.org_packages.html&d=DwIBAg&c=mPqdMxlQPdltZylzF3sRPA&r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=-P9-bauQXVXQeq0wS1BzxA7TYD0T9zT9mtZ7IHhUo24&s=hRYS2xVwBTE8SyOYLvDM3WH9muj60lqYHUPVSqOwn5s&e=

Depending on where you got your binary packages from, the distributor of those packages may have chosen to package python bindings separately.
For example, it seems in CentOS the python bindings are packaged as an additional RPM called 'subversion-python'.
This choice is up to the distributor, not the Subversion project.

Unless you tell us which SVN binary packages you installed it is impossible for us to find the name of the extra package you might need.

You could also ask the distributor of your package.
Stefan Sperling
2017-01-26 19:34:38 UTC
Permalink
Post by Michael Silberman
Thank you!
I'm not sure how they installed the packages but assuming they used yum to do it.
# yum list | egrep -i "svn|subversion"
acp-gfr-scripts-svn.noarch 1.7.4.1-56 installed
eclipse-svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
kmid.i686 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid.x86_64 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid-common.noarch 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
libdvdread.x86_64 4.1.4-0.3.svn1183.el6 rhel-6-server-rpms
matchbox-window-manager.x86_64 1.2-6.20070628svn.1.el6 rhel-6-server-rpms
sgabios-bin.noarch 0-0.3.20110621svn.el6 rhel-6-server-rpms
subversion.i686 1.6.11-15.el6_7 rhel-6-server-rpms
subversion-javahl.i686 1.6.11-15.el6_7 rhel-6-server-rpms
svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
I downloaded the Python 2.7 tarball from https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
I built it and installed alternate target.
Why did you compile Python yourself from source?
Was there no standard Python 2.7 RPM you could install in RHEL6?
Post by Michael Silberman
I installed the RPM from http://opensource.wandisco.com/rhel/6/svn-1.9/RPMS/x86_64/subversion-python-1.9.4-1.x86_64.rpm.
Does this help? Is there another set of commands to run that would provide more useful information?
I think you should ask Wandisco's support to figure out what they
would do to get the Python bindings running.
(Perhaps someone else reading this list happens to know this -- I don't.)

Generally, you should install the exact same things the distributor had
installed on the system which compiled these packages. Anything else
is a mix and match that can cause all sorts of problems.
Michael Silberman
2017-01-26 19:44:35 UTC
Permalink
Thank you Stefan. I'll contact Wandisco. I couldn't find Python 2.7 for the RHEL from the libraries we have. But, I'll let roll back and wait on Wandisco Support. Was hoping someone else in community had experience with this before.

-----Original Message-----
From: Stefan Sperling [mailto:***@elego.de]
Sent: Thursday, January 26, 2017 11:35 AM
To: Michael Silberman <***@Netgear.com>
Cc: Pavel Lyalyakin <***@visualsvn.com>; ***@subversion.apache.org
Subject: Re: Setup post-commit mailer fails
Post by Michael Silberman
Thank you!
I'm not sure how they installed the packages but assuming they used yum to do it.
# yum list | egrep -i "svn|subversion"
acp-gfr-scripts-svn.noarch 1.7.4.1-56 installed
eclipse-svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
kmid.i686 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid.x86_64 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid-common.noarch 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
libdvdread.x86_64 4.1.4-0.3.svn1183.el6 rhel-6-server-rpms
matchbox-window-manager.x86_64 1.2-6.20070628svn.1.el6 rhel-6-server-rpms
sgabios-bin.noarch 0-0.3.20110621svn.el6 rhel-6-server-rpms
subversion.i686 1.6.11-15.el6_7 rhel-6-server-rpms
subversion-javahl.i686 1.6.11-15.el6_7 rhel-6-server-rpms
svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
I downloaded the Python 2.7 tarball from
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.python.org_ft
p_python_2.7.13_Python-2D2.7.13.tgz&d=DwIBAg&c=mPqdMxlQPdltZylzF3sRPA&
r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=Dv0gxKU1HhkAPMuDjqwvzr
LyGvn3V4_6h4luN4iS-f0&s=vTrgDL9hg-xEIBTiU8JycAkiR7QFMTRZ1A-ZiDzQ4UI&e=
I built it and installed alternate target.
Why did you compile Python yourself from source?
Was there no standard Python 2.7 RPM you could install in RHEL6?
Post by Michael Silberman
I installed the RPM from https://urldefense.proofpoint.com/v2/url?u=http-3A__opensource.wandisco.com_rhel_6_svn-2D1.9_RPMS_x86-5F64_subversion-2Dpython-2D1.9.4-2D1.x86-5F64.rpm&d=DwIBAg&c=mPqdMxlQPdltZylzF3sRPA&r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=Dv0gxKU1HhkAPMuDjqwvzrLyGvn3V4_6h4luN4iS-f0&s=_VJ1uvTP0-t-g27bv4WrTyJGxjr_40BXCdb1PvHk7I0&e= .
Does this help? Is there another set of commands to run that would provide more useful information?
I think you should ask Wandisco's support to figure out what they would do to get the Python bindings running.
(Perhaps someone else reading this list happens to know this -- I don't.)

Generally, you should install the exact same things the distributor had installed on the system which compiled these packages. Anything else is a mix and match that can cause all sorts of problems.
Nico Kadel-Garcia
2017-01-28 11:05:20 UTC
Permalink
On Thu, Jan 26, 2017 at 2:44 PM, Michael Silberman
Post by Michael Silberman
Thank you Stefan. I'll contact Wandisco. I couldn't find Python 2.7 for the RHEL from the libraries we have. But, I'll let roll back and wait on Wandisco Support. Was hoping someone else in community had experience with this before.
Building and replacing the system Python is *begging* for pain. You
can break RPM itself very badly, and be forced to use tools like the
old "rpm2cpio.sh" script to take apart and restore your RPMs for RPM
itself.

Python 2.7 and other releases are in the "Software Collections
Library" for RHEL, and would be installed in /opt/rh/. There are tools
in the SRPM's for those "python27" or "python33" packages, for
building fresh RPMs and SRPMs in the "python27" or "python33" working
environments. RHEL and CentOS publish SRPM's for those, and you could,
if you want to spend the work, build a "python27-srpm" that would work
from the relevant "/opt/rh" directory and use Python 2.7. I did
precisely this for a very large set of Python modules needed for
"airflow" software last year at my workplace. It's at
https://github.com/SkyhookWireless/airflowrepobuilder .

I'd do some things differently now, but it may give some ideas of how
to build up the necessary tool chain for a more recent Subversion, if
you feel the need.
Post by Michael Silberman
-----Original Message-----
Sent: Thursday, January 26, 2017 11:35 AM
Subject: Re: Setup post-commit mailer fails
Post by Michael Silberman
Thank you!
I'm not sure how they installed the packages but assuming they used yum to do it.
# yum list | egrep -i "svn|subversion"
acp-gfr-scripts-svn.noarch 1.7.4.1-56 installed
eclipse-svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
kmid.i686 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid.x86_64 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
kmid-common.noarch 2.0-0.14.20080213svn.el6 rhel-6-server-rpms
libdvdread.x86_64 4.1.4-0.3.svn1183.el6 rhel-6-server-rpms
matchbox-window-manager.x86_64 1.2-6.20070628svn.1.el6 rhel-6-server-rpms
sgabios-bin.noarch 0-0.3.20110621svn.el6 rhel-6-server-rpms
subversion.i686 1.6.11-15.el6_7 rhel-6-server-rpms
subversion-javahl.i686 1.6.11-15.el6_7 rhel-6-server-rpms
svnkit.x86_64 1.3.0-3.el6 rhel-6-server-rpms
I downloaded the Python 2.7 tarball from
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.python.org_ft
p_python_2.7.13_Python-2D2.7.13.tgz&d=DwIBAg&c=mPqdMxlQPdltZylzF3sRPA&
r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=Dv0gxKU1HhkAPMuDjqwvzr
LyGvn3V4_6h4luN4iS-f0&s=vTrgDL9hg-xEIBTiU8JycAkiR7QFMTRZ1A-ZiDzQ4UI&e=
I built it and installed alternate target.
Why did you compile Python yourself from source?
Was there no standard Python 2.7 RPM you could install in RHEL6?
Post by Michael Silberman
I installed the RPM from https://urldefense.proofpoint.com/v2/url?u=http-3A__opensource.wandisco.com_rhel_6_svn-2D1.9_RPMS_x86-5F64_subversion-2Dpython-2D1.9.4-2D1.x86-5F64.rpm&d=DwIBAg&c=mPqdMxlQPdltZylzF3sRPA&r=3Cfm8zsX3deZqG3JCZLpFealAzwN9AMA_A7tQtJEAFY&m=Dv0gxKU1HhkAPMuDjqwvzrLyGvn3V4_6h4luN4iS-f0&s=_VJ1uvTP0-t-g27bv4WrTyJGxjr_40BXCdb1PvHk7I0&e= .
Does this help? Is there another set of commands to run that would provide more useful information?
I think you should ask Wandisco's support to figure out what they would do to get the Python bindings running.
(Perhaps someone else reading this list happens to know this -- I don't.)
Generally, you should install the exact same things the distributor had installed on the system which compiled these packages. Anything else is a mix and match that can cause all sorts of problems.
Loading...