Resource Menu


posted by Sebastien Jourdain at Nov 6, 2007 11:32 AM
Quote
Here is a sample of code that could be used. But those script are specific to the way that you want it to work. Basically LS execute the query given in the property file and add the name of the new repository for its creation or the old name and the new name in case of a rename.

CreateSVNRepositoryForLS.sh

#!/bin/sh

if [ $# -ne 2 ]; then echo $0 svnparentpath svnrepository exit 1 fi

svnparentpath=$1 shift

if [ ! -d $svnparentpath ]; then echo $svnparentpath is not a valid folder… exit 2 fi

if [ $1 != `basename $1` ]; then echo $1 ambiguous repository name … exit 3 fi

if [ -e $svnparentpath/$1 ]; then echo $svnparentpath/$1 already exist… exit 4 fi

su www-data -c "mkdir $svnparentpath/$1; svnadmin create $svnparentpath/$1" #mkdir $svnparentpath/$1; svnadmin create $svnparentpath/$1

if [ $? != 0 ]; then echo problem during the svncreate phase exit 5 fi

exit 0

MoveSVNRepositoryForLS.sh

#!/bin/sh

if [ $# -ne 3 ]; then echo $0 svnparentpath sourcesvnrepository ciblesvnrepository exit 1 fi

svnparentpath=$1 shift

if [ ! -d $svnparentpath ]; then echo $svnparentpath is not a valid folder… exit 2 fi

if [ $1 != `basename $1` ]; then echo $1 ambiguous repository name … exit 3 fi

if [ $2 != `basename $2` ]; then echo $2 ambiguous repository name … exit 4 fi

if [ ! -d $svnparentpath/$1 ]; then echo $svnparentpath/$1 is not a valid folder… exit 5 fi

if [ -e $svnparentpath/$2 ]; then echo $svnparentpath/$2 already exist… exit 6 fi

su www-data -c "mv $svnparentpath/$1 $svnparentpath/$2"

if [ $? != 0 ]; then echo problem during the move phase exit 7 fi

exit 0

posted by maximeca at Nov 6, 2007 11:10 AM
Quote
In the LS conf you told about 2 scripts:
sudo /XXXXX/tools/CreateSVNRepositoryForLS.sh /XXXX/svn
sudo /XXXXX/tools/MoveSVNRepositoryForLS.sh /XXXX/svn

I can't find them anywhere. Where can I get them?

posted by Sebastien Jourdain at Nov 5, 2007 5:04 PM
Quote
Virtual host apache :

<VirtualHost *>
        ServerName XXXX
        ErrorLog /XXXX/error_log
        CustomLog /XXXX/access_log combined
        ProxyRequests Off
        <Proxy *>
                Order Deny,allow
                Allow from all
        </Proxy>
        ProxyPass /ls-svn/ !
        ProxyPass / http://XXXX:YYYY/
        ProxyPassReverse / http://XXXX:YYYY/

<Location /ls-svn/ > DAV svn SVNParentPath /XXXX/svn AuthzSVNAccessFile /XXXX/svn/XXXX-access.conf

Order Deny,allow Allow from all

Require valid-user AuthName "svn" AuthType Basic Auth_PG_host localhost Auth_PG_port 5432 Auth_PG_database XXXX Auth_PG_user postgres Auth_PG_pwd rien Auth_PG_pwd_table casusers_ Auth_PG_uid_field username_ Auth_PG_pwd_field passworddigest_ Auth_PG_cache_passwords on Auth_PG_encrypted off </Location> </VirtualHost>

Conf LS:

# Subversion configuration
subversion.authz.file.path=/XXXX/svn/XXXX-access.conf
subversion.repository.base.path=/XXXX/svn
subversion.create.repository.cmd=sudo /XXXXX/tools/CreateSVNRepositoryForLS.sh /XXXX/svn
subversion.rename.repository.cmd=sudo /XXXXX/tools/MoveSVNRepositoryForLS.sh /XXXX/svn

Modules apaches pour svn:

  • libapache2-svn libapache2-mod-auth-pgsql
posted by maximeca at Nov 5, 2007 4:37 PM
Quote
Hi,

I am currently trying to install the subversion module of LibreSource thanks to the document ! install_subversion !.

There are several things I didn't understand.

Firstly in the svn properties of the libresourceConfig file, I have to customize 4 values:

subversion.authz.file.path      : Specify the path to the authz file that your Subversion should use (security mapping)
subversion.repository.base.path
subversion.create.repository.cmd
subversion.rename.repository.cmd

Regarding the authz.file.path value, I understood that the security mapping was done with the LibreSource users database. So which file am I supposed to specify in this field?

Secondly, you give an example of an apache site configuration. Where do I need to copy (and customize) these lines?

Thank

posted by Sebastien Jourdain at Oct 3, 2007 8:31 PM
Quote
I don't know and I won't have the time to check that for the moment...

Sorry

posted by maximeca at Oct 3, 2007 11:08 AM
Quote
I have downloaded 2 times the 2.3 source from the link you give me in this thread.

When I execute the command "java -jar Libresource-2.3-installer.jar" I have got an error that says that the jar is invalid or corrupted.

Has someone succeeded in installing this jar? Or is this jar corrupted?

posted by Sebastien Jourdain at Sep 27, 2007 10:01 AM
Quote
LibreSource 2.3 Community allow to bind smartly a subversion server in http. But it does not include the subversion package.

Few documents explain how to bind a subversion with LibreSource.

  • Apache configuration
  • LibreSource configuration to bind the subversion
posted by maximeca at Sep 27, 2007 9:51 AM
Quote
Thank you for the information.

Does the 2.3 Community version include the Subversion configuration tools?

Regards.

posted by Sebastien Jourdain at Sep 26, 2007 5:17 PM
Quote
Libresource Enterprise Version

You can get some information on our Web site http://www.artenum.com Or directly contact us at : contact@artenum.com / jourdain@artenum.com

Community Answer part

Normally yes, but by now we are pretty busy on other industrial project, so the Official Community release as been a bite freezed. Except that the unofficial version is already available on the site at this URL.

PS: Only few help document should be still missing.

posted by maximeca at Sep 26, 2007 4:51 PM
Quote
Hi,

I would like to know if the subversion integration in the Community version is still planned for September?

If I understand well, the subversion integration is already available in the LSE. Where can I get information about this version (demo, prices, ...)

Regards

posted by Sebastien Jourdain at Jul 26, 2007 3:26 PM
Quote
At least we need time to do it.

But there must be one in September. (To be confirmed...)

posted by prokher at Jul 26, 2007 3:06 PM
Quote
Ok, thank you. It is clear for me. I will wait for next release. Btw, when it will be released?
posted by Sebastien Jourdain at Jul 26, 2007 2:47 PM
Quote
The development of the integration of Subversion was still on its way during the last release of LibreSource. It's the reason why the documentation is pretty draft. By now, on LibreSource Enterprise we have the final integration of Subversion with real multi-svn repository. So the next release of LibreSource community will contain this subversion integration with a real documentation.

By the way, no migration on subversion will be available between this 2 version.

So for your industrial use, you should prefer to wait the next release or get a LibreSource Enterprise installation.

posted by prokher at Jul 26, 2007 11:42 AM
Quote
I cannot integrate LibreSource with libresource. Moreover I cannot find any intelligible manual or howto. Process described above is out of date, in my LibreSource (latest release available at the moment of writing), there is no any '''$LIBRESOURCE_HOME/Distribution/ls-config.properties''' file. And I only find those words in README:
  • libresourceConfig.properties : Used to configure any dynamic property of the libresource platform. (host name, working directory, default working node, subversion configuration)
Bug where can I find detailed step-by-step instructions what to do? There are several lines in '''libresourceConfig.properties''' connected with subversion:

# Subversion configuration
subversion.file.generation=false
subversion.authz.file.path=$LS_CONFIG_SVN_AUTH_PATH
subversion.passwd.file.path=$LS_CONFIG_SVN_PASSWD_PATH
subversion.repository.base.path=$LS_CONFIG_SVN_REPOSITORY_BASE_PATH
subversion.admin.login=$LS_CONFIG_SVN_ADMIN_LOGIN
subversion.admin.password=$LS_CONFIG_SVN_ADMIN_PASSWD

I have tried many different settings but every time I get "Error in createRepository : Impossible to create repository on the server" when trying to create new subversion resource under my demo project.

Log shows me exception:

Thu Jul 26 13:40:06 MSD 2007 : /users/root : /projects/demo/svn : kernel.createAcl
Thu Jul 26 13:40:06 MSD 2007 : /users/root : /projects/demo/svn : kernel.create
org.libresource.subversion.LibresourceSubversionException: Error in createRepository : Impossible to create repository on the server
        at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.createRepository(LibresourceSubversionServiceBean.java:150)
        at org.objectweb.jonas_gen.org.libresource.subversion.interfaces.JOnASLibresourceSubversionService1243386765Remote.createRepository(JOnASLibresourceSubversionService1243386765Remote.java:56)
        at org.libresource.web.controllers.subversion.CreateRepositoryController.process(Unknown Source)
        at org.libresource.web.controllers.CreateChildController.process(Unknown Source)
        at org.libresource.web.servlets.Browse.process(Unknown Source)
        at org.libresource.web.servlets.BaseServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
        at org.libresource.web.filters.SiteMeshFilter.doFilter(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
        at org.libresource.web.filters.SecurityFilter.doFilter(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
        at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
        at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.objectweb.jonas.web.catalina55.ResetAuthenticationValve.invoke(ResetAuthenticationValve.java:62)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Impossible to create repository on the server
        at org.libresource.subversion.ejb.LibresourceSubversionServiceBean.createRepository(LibresourceSubversionServiceBean.java:128)
        … 62 more
Thu Jul 26 13:40:06 MSD 2007 : root : ERROR : org.libresource.subversion.LibresourceSubversionException

Please help me integrate subversion and libresource.

BTW, It is not recommended to use subversion instead of synchronizer here? If it is true

  • I have to stop trying use libresource in my company, we know that subversion in known and used all over the world, so we don't want stop using it.
posted by Yann Richard at Jun 19, 2007 3:59 PM
Quote
postgres user has a home directory

Libresource seems to have problem only executing the commit command

Try remove the line "auth-access = read" in your svnserve.conf

posted by pl2st at May 8, 2007 2:24 AM
Quote
postgres user has a home directory

Libresource seems to have problem only executing the commit command

posted by Sebastien Jourdain at May 7, 2007 11:01 PM
Quote
The reason that I see, could be that the user postgre don't have a /home/postgres and when you execute the svn command at the libresource configuration/initialisation, the login/password are not kept for furthers command. So when LibreSource execute its commit, it do it as an unauthenticated user.

Seb

PS: LibreSource execute such command when creating a repository (I translate to similar cmd line)

cd xxxx/2138546516875421
svn add xxxx/2138546516875421
svn add xxxx/2138546516875421/trunk
svn add xxxx/2138546516875421/tags
svn add xxxx/2138546516875421/branches
svn commit xxxx/2138546516875421 -m "Add repository 2138546516875421"
  • 2138546516875421 : is a sample svn repository
  • xxxx : is the home SVN repository
posted by pl2st at May 7, 2007 10:43 PM
Quote
After some testing I undestand better how it works now ...

And you were right when suggesting that libresource didn't succeed in the svn directory commit.

Doing it manually make my toirtoise connect without any problem to the repository created by libresource.

So I have to find why libresourec cannot commit...

Pierre

posted by Sebastien Jourdain at May 7, 2007 10:11 PM
Quote
This documentation is not yet available due to the fact that the SVN integration will be deeply improved in the coming releases.

But for more information, you may directly contact us.

Regards,

Seb

posted by pl2st at May 7, 2007 9:44 PM
Quote
So...

I start again with a fresh install from source.

I still have the problem with svn so where could I find some doc about svn integration in LSC 2.1 ?

posted by pl2st at May 5, 2007 3:18 AM
Quote
Ok I give up with this fuc..installation and try a new one from start

Thanks for time and help

Pierre

posted by Sebastien Jourdain at May 5, 2007 2:51 AM
Quote
The only reason that I get is that the libresource server didn't succeed in the svn directory commit.

Try to create a new svn repository from libresource and check if you didn't get any output error ?

Or try manually.

su postgres
cd THE_PATH_I_SET_FOR_LS_subversion.repository.base.pathpath
svn add *
svn commit -m "test"
posted by pl2st at May 5, 2007 2:39 AM
Quote
Lucky you… I still don't understand why my svn client is able to connect to the root repository (ls-svn), without seeing those created by libresource...even with the svn super-user.
posted by Sebastien Jourdain at May 5, 2007 1:15 AM
Quote
Ok, then that was not the pb.

I might understand what is wrong.

The subversion integration might not be well explained, and its good to precise some points here even if works are on for a better integration.

The current SVN integration, works with only one repository that is shared among all the libresource SVN repository.

So basically, libresource create a subdirectory to this root repository (ls-svn) and set a specific security to this directory in order to prevent anyone to write into it.

So Libresource is seen by the subversion server like any other svn client. That's why we ask the user for the installation to create a directory that will be linked to the SVN repository so the Libresource server can use this directory to create and delete directory (libresource svn repository) and commit its change to the SVN server. That's why we need this kind of super-user for SVN. And when libresource commit its new directory/repository to the server, it does not specify the SVN user because it was supposed to be stored in the libresource/jonas user preference when the repository initialization have been done.

But I thought (maybe I dreamed), when such error occurred, an output error on jonas occur.

I don't know if my explanation highlight your problem, but for now I don't know what to say.

Seb

posted by pl2st at May 5, 2007 12:49 AM
Quote
argh.... I was sure I started jonas with postgres user...now it's done.

The repository's well created and owned by postgres.

I started SVN with postgres user who now own the repository base path but the error with svn is still the same.I can't see the directory 56a69… with my svn client (toirtoise) but it's created by libresource under the repository base path (for me /var/svn/projets/ls-svn/56a69...) and contains a svn structure...

Pierre

posted by Sebastien Jourdain at May 5, 2007 12:20 AM
Quote
Ok then, this might not solved the problem, but you shouldn't start Jonas/libresource with the root user. Otherwise you will have problem with file security on your file system.

I supposed that your postgres is running under the postgres user ? If so you might run libresource with that user or create a specific libresource one...

To come back on your problem with SVN.

When you list the content of the root SVN repository with the SVN command line what do you see ? (Sorry I don't have it in mind)

You sould be able to see the directory 56a69d087f000001000018752e6de017.

If not, this mean that the libresource didn't managed to commit this directory to the svn.

posted by pl2st at May 5, 2007 12:03 AM
Quote
The repository created with libresource is owned by the root user of my system.(is this configurable somewhere ?)

The user who create the repository in libresource has all the rights (read and write) and is the owner of the ressource

SVN is using the libresource generated file without any problem.

I have no error in jonas log when creating the repository with libresource.

Ps : thanks for the bug, i've commented it twice

Pierre

posted by Sebastien Jourdain at May 4, 2007 11:15 PM
Quote
Do you have any error on the Jonas output ?

What do you mean, own by root ?

  • is it the root user of your system ?
  • is it the libresource root user ?
What kind of security did you assign to the svn repository in Libresource ?
  • users allow to read ?
  • users allow to commit ?
Is your SVN using the libresource generated file ?

Are the generated file ok ?

Sorry to ask you so many questions, but otherwise I can't help much.

Seb

PS: I've also commented your bug.

posted by pl2st at May 4, 2007 11:03 PM
Quote
Ok I can browse the basepath repository but when I want to browse a repositary created with libresource I get an error saying the repository doesn't exist.

The repository exist and has a name like 56a69d087f000001000018752e6de017 and is owned by root:root

Any idea of what's wrong ?

Thanks in advance

posted by pl2st at May 4, 2007 10:11 PM
Quote
whaow, I feel so stupid !!

I've to check my svn installation now cause I got an access denied error

Thank you

posted by Sebastien Jourdain at May 4, 2007 9:56 PM
Quote
Instead of svn://forge.artenum.com/ls-svn

you should use your server url like

svn://myLibresource.org/ls-svn

posted by pl2st at May 4, 2007 9:46 PM
Quote
Hi,

The command : svn co svn://forge.artenum.com/ls-svn "THE_PATH_I_SET_FOR_LS_subversion.repository.base.pathpath" failed with a timeout

(I had done this before with the same error but I thought this step was not required.)

Thank you for your help.

posted by Sebastien Jourdain at May 4, 2007 9:27 PM
Quote
The documentation available on subversion for the moment is the one given in the installation file.

Here is the part of the installation file talking about subversion :

7) Subversion installation
  - The LibreSource Subversion service manage dynamicaly the 
    subversion configuration files for user authentication and 
    security management. Thus, in order to use this services, 
    a subversion server must be installed and configured to used 
    those generated files.

- Configure LibreSource for your subversion (Properties to defined in $LIBRESOURCE_HOME/Distribution/ls-config.properties) > subversion.authz.file.path : Specify the path to the authz file that your Subversion should use (security mapping) > subversion.passwd.file.path : Specify the path to the passwd file that your Subversion should use (user authentication) > subversion.repository.base.path : Working area for LibreSource. Should be set by the administrateur as the root > subversion.admin.login : Subversion Libresource superuser > subversion.admin.password : Subversion Libresource superuser password

- Configure the Subversion installation > Create only one repository that should respond at svn://YOUR_LS_SERVER/ls-svn > Check-out the content of this repository + svn co svn://forge.artenum.com/ls-svn "THE_PATH_YOU_SET_FOR_LS_subversion.repository.base.path" > Delete all the repository content and commit + cd "THE_PATH_YOU_SET_FOR_LS_subversion.repository.base.path" + svn delete trunk + svn delete tags + svn delete branches + svn commit -m "Initialisation" > Edit the configuration file "svnserve.conf" (authz/passwd should refer to the file path specified in LibreSource) [general] authz-db = authz password-db = passwd

anon-access = none auth-access = read

posted by pl2st at May 4, 2007 9:20 PM
Quote
Where could I find documentation about the use of subversion in libresource ?