SVN error while taking checkout using script - bash

I am getting below error when taking checkout from svn using a script.
**[Test] $ /bin/sh -xe /tmp/hudson8576425899836211909.sh
+ sh /cvsrx/rxapp/build_dir/Jenkins_Scripts/test.sh
Could not load program svn:
Could not load module /opt/freeware/lib/libssl.so.
Dependent module /usr/lib/libcrypto.a(libcrypto.so.1.0.1) could not be loaded.
Member libcrypto.so.1.0.1 is not found in archive
Could not load module svn.
Dependent module /opt/freeware/lib/libssl.so could not be loaded.
Could not load module .
Build step 'Execute shell' marked build as failure
Finished: FAILURE**
In test.sh I have written just one line svn co /path to svn branch/
I am in middle of some test so please don't ask why am not using jenkins in build svn plugin.
here,I am able to take checkout on command prompt using svn co /path to svn branch/
But not if I write this command line in script and run in execute shell of jenkins.
Any help please ?
Am using jenkins on AIX 7 platform.
I had softlinks from /usr/bin/svn to /opt/freeware/bin/svn.SVN installed at /opt/freeware/bin/svn ..... By default when i do which svn its showing /usr/bin/svnBut When i deleted those softlinks and exported path,Jenkins didnt recognize SVN at all.And which svn command doesnot show any svn installed . PFB logs of jenkins :
`
/bin/sh -xe /tmp/hudson5607872610124977868.sh
+ export PATH=/opt/freeware/bin/svn/:/opt/freeware/bin/svnversion:/opt/freeware/bin/svn:/opt/freeware/bin/svnversion/:/usr/java5/lib:/opt/freeware/bin/svnversion/bin:/usr/local/bin:/usr/bin:/usr/X11R7/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/sbin:/
+ echo /opt/freeware/bin/svn/:/opt/freeware/bin/svnversion:/opt/freeware/bin/svn:/opt/freeware/bin/svnversion/:/usr/java5/lib:/opt/freeware/bin/svnversion/bin:/usr/local/bin:/usr/bin:/usr/X11R7/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/sbin:/opt/freeware/bin/svn/:/opt/freeware/bin/svnversion:/opt/freeware/bin/svn:/opt/freeware/bin/svnversion/:/usr/java5/lib:/opt/freeware/bin/svnversion/bin:/usr/local/bin:/usr/bin:/usr/X11R7/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/sbin
+ cd /usr/local/apps/Jenkins_new/scripts
+ ./test.sh
Could not load program /opt/freeware/bin/svn:
Could not load module /opt/freeware/lib/libssl.so.
Dependent module /usr/lib/libcrypto.a(libcrypto.so.1.0.1) could not be loaded.
Member libcrypto.so.1.0.1 is not found in archive
Could not load module svn.
Dependent module /opt/freeware/lib/libssl.so could not be loaded.
Could not load module .
./test.sh[3]: svn: not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE`

ReInstalling Jenkins solved my problem !! It was due to corrupt plugin which happened due to server restart.
Thanks Everyone

I have not seen the exact command of svn you have used in test.sh, but would advice you to give full path of SVN in your calling line, eg /usr/bin/svn co .....
And if also possible make an entry in your test.sh for export PATH and export LD_LIBRARY_PATH setting them to values which are paths of the mentioned .so files

I see you're using Hudson/Jenkins. Hudson and Jenkins use SVNKit internally when checking stuff in and out of Subversion. This means that the command line svn client may not be installed on your system, or that it may have other problems.
It is also possible that there are multiple svn clients on your system. For example, you may have one under /usr/bin/svn and one under /usr/local/bin/svn. If Subversion is working from the command line, but not in the script, you may have a different $PATH setup when you're executing from the command line vs. the script from Hudson/Jenkins. You can add to your script (if it's BASH) the line type svn to see where your executing svn from. It may be different from what you are using from the command line. It may also be nice to print out $PATH as part of your script.
It would also be helpful to see the svn command that your script is executing, and tell us what you're trying to do. You can also add to your script the following lines:
PS4="\$LINE: "
set -xv
These lines will turn on shell script debugging, and help you locate where your script is having problems.
This will give you some clues as to what is going wrong in your script.
Reply
Thanks David. Here only 1 svn path exists (usr/bin/svn)but created as a softlink see -->cd /usr/bin/svn lrwxrwxrwx 1 root system 26 Jul 1 14:34 svn -> ../../opt/freeware/bin/svn. Also soflink of libs.so is created see --> lrwxrwxrwx 1 root system 15 Sep 13 18:15 libssl.so -> libssl.so.1.0.1 .......... Is it possible that softlink is creating these problems ?? Before requesting to remove these softlinks ,i need confirmation that these softlinks are creating problems.
Softlinking isn't unusual for Unix. For example, I have Ant, Grails, Maven, Subversion, and many other packages installed under /opt on my Mac. In order not to have to include each and every one of these in my path, I soft link all of the binaries for those programs under /usr/local/bin. About 80% of the programs under /usr/local/bin are merely soft links elsewhere.
Library soft links are also very common. This usually has to do with version numbering. When a program requests a library, it may or may not include the library's version number. So, you have libfoo-2.0.3.so on your drive. This is the actual version of foo. However, few programs will request that particular version. Instead, they may simply request they need Version #2 of foo or just say they need to link to foo.
To handle this, you will have libfoo2.0.3.so soft linked to libfoo-2.so for programs that specify they need version 2 of foo. Then, libfoo-2.so will be soft linked to libfoo.so. This way, libfoo will be called no matter what. If I install, libfoo2.0.4.so, I can change the link to libfoo-2.so to point to version 2.0.4 instead of version 2.0.3, and anything that depends upon Foo will be picking up the correct version.
Instead, let's look at the error message:
Could not load module /opt/freeware/lib/libssl.so.
   Dependent module /usr/lib/libcrypto.a(libcrypto.so.1.0.1) could not be loaded.
   Member libcrypto.so.1.0.1 is not found in archive
For some reason, it couldn't access the file /usr/lib/libcryto.a. Is this file on you machine? Is it in /usr/lib? If not, where is it located?
So, where did you get this version of Subversion from? Why is the link to the /opt/freeware/bin/ directory? Was this part of your system?
It could be that Subversion on your system is not complete and never did work. In Jenkins, the Subversion repository is accessed by the SVNKit Jarfile which is embedded inside Jenkins/Hudson itself, so it wouldn't really be a surprise to find that the Subversion binary didn't work.
Are you able to do anything with Subversion from the command line? If not, you may have to install a new version of Subversion from Perzl which is where CollabNet points to for an AIX version of Subversion. (It's at least up to date at version 1.8.4).
You may even want to change the soft link at /usr/bin/svn to point to the newer, working version of Subversion.

Related

How to install a program for mac, from github (no brew)

I would like to play with Dima Kogan vnlog program for testing ; my computer is mac os.
There is a repository on Github hosting the code, with 3 branches, one of them named : build-osx.
https://github.com/dkogan/vnlog/branches
I dont see any file or documentation related to installation.
What would be the process to get it working on my computer (in such a way I would be able to uninstall it if needed) ? what are the tools needed ? That's something I have never never done yet.
(I don't have any git/subversion installed, if that matters).
Edit1, after first anwser.
Repository downloaded ; looks like "vnl-filter", "vnl-sort", "vnl-join" tools work ; yet "vnl-align" doesn't : Can't locate Text/Table.pm in #INC (you may need to install the Text::Table module) (#INC contains: /Library/Perl/5.30/darwin-thread-multi-2level […]) at /Users/gilles/Downloads/vnlog-master/vnl-align line 5. BEGIN failed--compilation aborted at /Users/gilles/Downloads/vnlog-master/vnl-align line 5.
I believe some perl module is missing (or not found ?) for this tool. Any easy way to install it ?
I suspect the current installation process ("Install on non-Debian boxes") differs from the three-years old build-osx branch:
Most of this is written in an interpreted language, so there’s nothing to build or install, and you can run the tools directly from the source tree:
$ git clone https://github.com/dkogan/vnlog.git
$ cd vnlog
$ ./vnl-filter .....
The python and perl libraries can be run from the tree by setting the PYTHONPATH and PERL5LIB environment variables respectively.
For the C library, you should make, and then point your CFLAGS and LDLIBS and LD_LIBRARY_PATH to the local tree.
So if your Mac has the prerequisites set up, it should work after a clone.

Error trying to rebase msys-2.0.dll:

Using Cygwin on Windows 7 64 bit.
Trying to rebase msys-2.0.dll: for Git with the below command.
However I am getting the message saying its skipped because its wrong machine type.
cd /cygdrive/c/Program Files (x86)/Git/bin
$ rebase.exe -b 0x50000000 /cygdrive/c/"Program Files (x86)"/Git/bin/msys-2.0.dll
/cygdrive/c/Program Files (x86)/Git/bin/msys-2.0.dll: skipped because wrong machine type.
What does this mean? Trying to look up on Google but didn't find much information anywhere - so hoping someone in this community can help.
As mentioned here, it could be a Cygwin issue depending on your current version of Cygwin.
But you can also try the alternative without cygwin, using the latest git-for-windows:
unzip PortableGit-2.6.3-64-bit.7z.exe anywhere you want
add to your %PATH% the folders C:\path\to\PortableGit-2.6.3-64-bit\bin and C:\path\to\PortableGit-2.6.3-64-bit\usr\bin (that last path comes with 200+ Linux gnu commands: ls, xargs, awk,... all accessible from your CMD.exe session!)
Then try again your git commands.

Compiling a specific version of a freeBSD utility

I want to compile and run a specific version of a FreeBSD utility from the source code.
For example, I downloaded the repo for the following utility: https://svnweb.freebsd.org/base/stable/9/sbin/routed/
However, when I run the make command, I get the following error:
"../Makefile.inc", line 3: Cannot open ../Makefile.inc
make: fatal errors encountered -- cannot continue
*** [all] Error code 1
Can someone point me in the right direction?
You will need to download the whole source tree. The build system depends on pieces from different locations in the tree. Then;
Unpack the source in /usr/src
cd /usr/src/sbin/routed
make && make install
It looks like you want the 9-stable branch? If you have subversion available, you can do:
rm -rf /usr/src/
svn co svn://svn.freebsd.org/base/stable/9 /usr/src
(Depending on your FreeBSD version, svn may also be called svnlite) Also see the handbook.
On my machine, the complete /usr/src tree is 2445 MiB, including the .svn directory.
Edit: Note that it a program relies on system calls, library functions or other features that were introduced in a certain branch/version of FreeBSD, it will not work on older branches/versions.

configure command not found cygwin

This question has been asked many time but I am not able to resolve the problem from them so I am asking
I had installed Cygwin a few days ago.I tried using ./configure command but it says
-bash: ./configure: No such file or directory
I tried using
where configure
but I got the output
INFO: Could not find files for the given pattern(s).
then I tried grep configureand I got this output
/etc/bash_completion.d/configure
/usr/i686-pc-cygwin/sys-root/usr/share/libtool/libltdl/configure
/usr/share/ELFIO/configure
/usr/share/libtool/libltdl/configure
I tried to export the path and then run the ./configure but it also didn't worked.
I find no executable file named as configure in my cygwin bin directory.
Does it mean that I have to add configure file manually?How can I correct it?
NOTE :- I had also tried sh configure but it also didn't worked
If a software project is set up to be built using autoconf, that tool generates a script canonically called configure. It queries the system for various parameters that are subsequently used in the build, and is specific to the software package to be built. Different software projects have different configure scripts. They are all called configure, but their contents are not the same.
So, to actually build such a software project once that script was set up (usually done by the maintainers when packaging the source tarball for distribution), you call:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
cd <sourcedir> # the one you just untarred
./configure
make
make install
Note the prefix ./, which means "located in this directory" (i.e. the top directory of that project's source tree).
Actually, the better procedure is the so-called "out-of-tree build", when you set up a different directory for the binaries to be built in, so the source tree remains unmodified:
tar xzf <tarball>.gz # or xjf <tarball>.bz2 or whatever
mkdir builddir
cd builddir
../<sourcedir>/configure
make
make install
So, there is supposed to be no configure executable in your PATH, you are supposed to call the script of that name from the source tree you are trying to build from.
If I correctly understood...
Configure is not an application that should be installed on your system, but script that should be delivered with source code to prepare for make command. File named configure should be in the main directory of source code.
I understand that this is an old question. However many might find this solution helpful.
Normally we use the make command to compile a downloaded source in cygwin. In many cases it contains a autogen.sh file. Running that file with
bash autogen.sh
will in many case solve the problem. At least it solved my issue and i could then use the make command

SVN direct command output differs from scripted one

when I'm executing a command using Solaris 10 which updates ignores list it outputs properly like its supposed to be. However, when I want to do it automatically via bash script things go wrong, and an error pops up.
The command I execute is:
svn propset svn:ignore workspace/project/.settings
and the line executing it in the script:
svn propset svn:ignore -F $1/.settings $1/
where $1 is passed as workspace/project/
What I get in return in wrong scenario is:
svn: The path 'workspace/project' appears to be part of a Subversion 1.7 or greater
working copy. Please upgrade your Subversion client to use this
working copy.
Any solutions?
You have two versions of Subversion installed, 1.7 and 1.6 or older. When you execute the script yourself, you're executing the 1.7 client, and your script is calling the 1.6 version.
Find the older version and remove it from the system, or determine the correct path to the 1.7 version and specify it explicitly in the script.

Resources