LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need advice on how to link a subversion repo to my build environment (https://www.linuxquestions.org/questions/programming-9/need-advice-on-how-to-link-a-subversion-repo-to-my-build-environment-713268/)

jakev383 03-20-2009 09:20 PM

Need advice on how to link a subversion repo to my build environment
 
I work on several RPMs that are all for an overall larger project.
My subversion repo looks (or will once I set it up) like this:

/
/package-1
spec
source
tags
/package-2
spec
source
tags
/package-3
spec
source
tags

And so on. I have a spec file and sources for each package, and I would like to easily link them all into my build environment (/usr/src/redhat/SPECS and /usr/src/redhat/SOURCES). I'd like some advice on this before I jump. I'd ideally like to see my all my .spec files in the /usr/src/redhat/SPECS dir, all the sources for all the projects in the SOURCES dir. Has anyone else out there set up anything like this already that can offer some advice/howto on how to set this up so it's easy and efficient for me (I know the 2 may not be necessarily related).
Thanks for any advice!

ilikemonkeys111 03-22-2009 10:38 PM

I don't know if this is what you had in mind, but what you might want to do is check out whichever package you're working on to /usr/src/redhat.

Code:

svn checkout <repository url>/package-1/ /usr/src/redhat/
Then you'll end up with /usr/src/redhat/spec, /usr/src/redhat/source, and /usr/src/redhat/tags. If you're using eclipse as your IDE, this is pretty easy with the subclipse plugin, as it integrates svn very nicely with your development environment and allows you to easily check out code into your working directory.

ta0kira 03-22-2009 10:53 PM

I was going to recommend something similar, but couldn't express it gracefully at the time. I'd suggest the svn export command, however, because you shouldn't be pushing changes back the other way. Also, you could write a script that will pull all of the sources to the right place and all of the specs to the right place without much work (if you know bash, that is.) If not, we can help you out. It all depends on the level of automation you want.
Kevin Barry


All times are GMT -5. The time now is 02:12 AM.