jsvn script is broken

Bug #1823704 reported by Christoph Lutz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
svnkit (Debian)
New
Unknown
svnkit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

System:
  Description: Ubuntu 18.04.2 LTS
  Release: 18.04

Package:
  svnkit:
    Installed: 1.8.14-1
    Candidate: 1.8.14-1

All special chars in /usr/share/svnkit/jsvn are escaped and ${mainclass} should probably have been replaced during build:

==== snip ====
BASEDIR="`dirname "\$0"`/.."
BASEDIR=`(cd "\$BASEDIR"; pwd)`

cygwin=false;
darwin=false;
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  Darwin*) darwin=true
           if [ -z "\$JAVA_VERSION" ] ; then
             JAVA_VERSION="CurrentJDK"
(...)

exec "\$JAVACMD" \$JAVA_OPTS \\
  "\$EXTRA_JVM_ARGUMENTS" \\
  -classpath "\$CLASSPATH" \\
  ${mainclass} \\
  "\$@"

==== snap ====

What happens:

=== snip ====
user@ubuntu:~>jsvn help
/usr/bin/jsvn: 29: /usr/bin/jsvn: $cygwin: not found
Error: JAVA_HOME is not defined correctly.
  We cannot execute $JAVACMD
==== snap ====

What should happen:

==== snip ====
jsvn help
usage: jsvn <subcommand> [options] [args]
Subversion command-line client, version 1.8.14.
Type 'jsvn help <subcommand>' for help on a specific subcommand.
Type 'jsvn --version' to see the program version and RA modules
  or 'jsvn --version --quiet' to see just the version number.

Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.

Available subcommands:
   add
   blame (praise, annotate, ann)
   cat
   changelist (cl)
   checkout (co)
   cleanup
   commit (ci)
   copy (cp)
   delete (del, remove, rm)
   diff (di)
   export
   help (?, h)
   import
   info
   list (ls)
   lock
   log
   merge
   mergeinfo
   mkdir
   move (mv, rename, ren)
   patch
   propdel (pdel, pd)
   propedit (pedit, pe)
   propget (pget, pg)
   proplist (plist, pl)
   propset (pset, ps)
   resolve
   resolved
   revert
   status (stat, st)
   switch (sw, relocate)
   unlock
   update (up)
   upgrade

SVNKit is a pure Java (TM) version of Subversion - a tool for version control.
For additional information, see http://svnkit.com/
==== snap ====

The local fix ist to run
 sed -i 's@\\\$@\$@g' /usr/share/svnkit/jsvn
 sed -i 's@\\\\@\\@g' /usr/share/svnkit/jsvn
 sed -i 's@\${mainclass}@org.tmatesoft.svn.cli.SVN@' /usr/share/svnkit/jsvn

as root, but I guess this is somehow broken in the build process.

Best regards,

Christoph

EDIT: First version was lazy researched and the fix was not complete.

Christoph Lutz (genie42)
description: updated
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting.

Marking confirmed, I get the same error message when attempting to run jsvn from svnkit 1.8.14-3 on Ubuntu Focal.

Changed in svnkit (Ubuntu):
status: New → Confirmed
tags: added: bionic eoan focal
tags: added: groovy
removed: eoan
tags: added: impish
removed: groovy
Changed in svnkit (Debian):
status: Unknown → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.