#2321 Port final 'pki' and 'tomcatjss' SVN repos
Closed: Fixed None Opened 13 years ago by mharmsen.

On Thursday, May 27, Stephen Gallagher (sgallagh@redhat.com) enabled
snapshots of the 'pki' and 'tomcatjss' repositories on 'fedorahosted.org'
as a trial run (they had previously existed on 'pki.fedoraproject.org').
[Reference https://fedorahosted.org/fedora-infrastructure/ticket/2192]

Since these repos were only used to test out our process, they have never
been actively used, and can be completely replaced by the actual data
contained in the two gzipped repositories included in
http://fedorapeople.org/~mharmsen/.

At that time, as we requested, he also enabled four email lists:

* pki-announce@lists.fedorahosted.org,
* pki-commits@lists.fedorahosted.org,
* pki-devel@lists.fedorahosted.org, and
* pki-users@lists.fedorahosted.org.

Additionally, we no longer need these email lists, as we plan to continue
using our existing email lists (pki-*@redhat.com), and these have never been
used.

Therefore, we would like to request that the following two projects be updated:

Project name: pki

Project short summary: Dogtag Certificate System

SCM choice (git/bzr/hg/svn): svn

Importing from another SCM? yes

If yes, which? http://fedorapeople.org/~mharmsen/pki.dump.gz
NOTE:  This is a gzipped subversion dump of this repo.

Project admin Fedora Account System account name: mharmsen

Yes/No, would you like a Trac instance for your project?: yes
NOTE:  This will only be used to reference the Dogtag wiki located at
       the 'pki.fedoraproject.org' website, and as a convenient way
       to view source through the browser.

Do you need a mailing list?
If so, comma-separate a list of what you'd like them to be called.
Otherwise, put "no": no
NOTE:  We will continue to use our existing mailing lists:
       * pki-announce@redhat.com,
       * pki-commits@redhat.com,
       * pki-devel@redhat.com, and
       * pki-users@redhat.com

Send commits to the following list
(leave empty if none needed): pki-commits@redhat.com
NOTE:  If needed, I have included a 'commit-email.pl' script
       as well as a sample 'pki-commit' hook for subversion:
       * http://fedorapeople.org/~mharmsen/commit-email.pl
       * http://fedorapeople.org/~mharmsen/pki-commit

Special Subversion Hook Request: Please enable 'pre-revprop-change'
NOTE:  Perform the following commands:
       # cd pki/hooks
       # cp pre-revprop-change.tmpl pre-revprop-change
       # chmod 755 pre-revprop-change)




Project name: tomcatjss

Project short summary: JSSE implementation using JSS for Tomcat

SCM choice (git/bzr/hg/svn): svn

Importing from another SCM? yes

If yes, which? http://fedorapeople.org/~mharmsen/tomcatjss.dump.gz
NOTE:  This is a gzipped subversion dump of this repo.

Project admin Fedora Account System account name: mharmsen

Yes/No, would you like a Trac instance for your project?: yes

Do you need a mailing list?
If so, comma-separate a list of what you'd like them to be called.
Otherwise, put "no": no

Send commits to the following list
(leave empty if none needed):

Special Subversion Hook Request: Please enable 'pre-revprop-change'
NOTE:  Perform the following commands:
       # cd tomcatjss/hooks
       # cp pre-revprop-change.tmpl pre-revprop-change
       # chmod 755 pre-revprop-change)

The 'pki' and 'tomcatjss' SVN repositories have been updated with the provided dumps.

The four mailing lists have been removed, the commit mail has been set up for 'pki' (but not 'tomcatjss' as it was not requested)

The requested hooks have been enabled.

Thank you to sgallagh!

I performed the following tests out on the repos:
successfully performed check-out of tomcatjss PKI_8_BRANCH
successfully performed check-out of pki PKI_8_BRANCH
successfully performed check-out of tomcatjss TIP
successfully performed check-out of pki TIP
successfully altered pki/dogtag//.spec TIP from "Version: 1.3.0" --> "Version 2.0.0"
successfully built, installed, and configured pki-ca on TIP
successfully performed check-in to pki TIP
successfully received email on pki-commits@redhat.com!
successfully tested setting/disabling 'executable' properties on a file
failed testing trying to change a log message utilizing the 'pre-revprop-change' hook:

I performed the following test:
* svn propset svn:log 'Bugzilla BZ595391: session domain table to be moved to ldap (corrected BZ596391 to BZ595391 on 08/10/2010 by mharmsen)' -r1125 --revprop

Which failed with the following "empty" error message:
* svn: 'pre-revprop-change' hook failed with error output:

This test failed on the tomcatjss TIP also (just attempting to replace a message with its original content), but I am wondering if the problem was forgetting to set execute permission on the 'pre-revprop-change' hooks?

This needs to be done for both the 'pki' and 'tomcatjss' pre-revprop-change hooks:

  • cd pki/hooks
  • cp pre-revprop-change.tmpl pre-revprop-change (pre-revprop-change should not be an empty file)
  • chmod 755 pre-revprop-change

  • cd tomcatjss/hooks

  • cp pre-revprop-change.tmpl pre-revprop-change (pre-revprop-change should not be an empty file)
  • chmod 755 pre-revprop-change

If everything is as documented above, I have no idea as to what the issue could be.

{{{
[sgallagh@hosted1 svn]$ ls -l tomcatjss/hooks/pre-revprop-change pki/hooks/pre-revprop-change
-rwxr-xr-x 1 root svnpki 2764 Aug 10 11:40 pki/hooks/pre-revprop-change
-rwxr-xr-x 1 root svntomcatjss 2764 Aug 10 11:44 tomcatjss/hooks/pre-revprop-change
}}}

The contents of both files are identical:
{{{

!/bin/sh

PRE-REVPROP-CHANGE HOOK

The pre-revprop-change hook is invoked before a revision property

is added, modified or deleted. Subversion runs this hook by invoking

a program (script, executable, binary, etc.) named 'pre-revprop-change'

(for which this file is a template), with the following ordered

arguments:

[1] REPOS-PATH (the path to this repository)

[2] REVISION (the revision being tweaked)

[3] USER (the username of the person tweaking the property)

[4] PROPNAME (the property being set on the revision)

[5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)

[STDIN] PROPVAL ** the new property value is passed via STDIN.

If the hook program exits with success, the propchange happens; but

if it exits with failure (non-zero), the propchange doesn't happen.

The hook program can use the 'svnlook' utility to examine the

existing value of the revision property.

WARNING: unlike other hooks, this hook MUST exist for revision

properties to be changed. If the hook does not exist, Subversion

will behave as if the hook were present, but failed. The reason

for this is that revision properties are UNVERSIONED, meaning that

a successful propchange is destructive; the old value is gone

forever. We recommend the hook back up the old value somewhere.

On a Unix system, the normal procedure is to have 'pre-revprop-change'

invoke other programs to do the real work, though it may do the

work itself too.

Note that 'pre-revprop-change' must be executable by the user(s) who will

invoke it (typically the user httpd runs as), and that user must

have filesystem-level permission to access the repository.

On a Windows system, you should name the hook program

'pre-revprop-change.bat' or 'pre-revprop-change.exe',

but the basic idea is the same.

The hook program typically does not inherit the environment of

its parent process. For example, a common problem is for the

PATH environment variable to not be set to its usual value, so

that subprograms fail to launch unless invoked via absolute path.

If you're having unexpected problems with a hook program, the

culprit may be unusual (or missing) environment variables.

Here is an example hook script, for a Unix /bin/sh interpreter.

For more examples and pre-written hooks, see those in

the Subversion repository at

http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and

http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"
ACTION="$5"

if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi

echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
}}}

These repositories were set up to your specifications. I don't know what the problem is. It's probably time to bring in someone who knows more about subversion than I do.

The only difference I can think of is that we came from a repository that used 'https' through Apache, and these scripts were owned by Apache.

Since this does require that a 'write' be performed on the repository, can we add group 'write' privileges to the two hooks?:

  • chmod 775 pki/hooks/pre-revprop-change

  • chmod 775 tomcatjss/hooks/pre-revprop-change

Mike McGrath pointed me in the right direction. You should be all set now.

And no, it had nothing to do with the write privileges above. Those would only apply to the hook script itself, not the repository it was talking to.

Unfortunately, I am still seeing the same problem.

I did the following:

  • svn update

  • svn log | more

Located the following:

r1125 | alee | 2010-07-07 13:09:30 -0700 (Wed, 07 Jul 2010) | 1 line

Bugzilla BZ596391: session domain table to be moved to ldap

Following the 'svn help propset' instructions:

propset PROPNAME --revprop -r REV PROPVAL [TARGET]

I tried with a 'TARGET':

svn propset svn:log --revprop -r 1125 'Bugzilla BZ595391: session domain table to be moved to ldap (corrected BZ596391 to BZ595391 on 08/10/2010 by mharmsen)' svn+ssh://svn.fedorahosted.org/svn/pki

and without a 'TARGET':

svn propset svn:log --revprop -r 1125 'Bugzilla BZ595391: session domain table to be moved to ldap (corrected BZ596391 to BZ595391 on 08/10/2010 by mharmsen)'

and on both occasions, I still received the same "empty" error message:

svn: 'pre-revprop-change' hook failed with error output:

Please note that although I re-opened the ticket, I did downgrade the Priority of this ticket to "minor".

Cool! It works:

svn propset svn:log --revprop -r 1125 'Bugzilla BZ595391: session domain table to be moved to ldap (corrected BZ596391 to BZ595391 on 08/10/2010 by mharmsen)'

property 'svn:log' set on repository revision 1125

Many thanks to both you and sgallagh.

Feel free to close the bug.

Login to comment on this ticket.

Metadata