How to upgrade CakePHP or any other package that is under subversion control with Rsync
Actually this is more simple than you might think.
First you checkout your current version. Then download and un-tar the new version and simply run the following command on your shell/terminal:
rsync -av --exclude '.svn' --exclude '._*' my/new/cakephp-cakephp-efb6e08/ my-old-cakephp/
This will exclude your Subversion .svn directories and it will also exclude the META-data files created by Mac OS X.
Good luck with upgrading!
Installtion problems on FreeBSD (8)-CURRENT with Subversion
If you tend to install Subversion on FreeBSD you might get the following error.
This is what I get when installing Subversion 1.6.4 on FreeBSD 8 CURRENT.
/usr/lib/libkrb5.so: undefined reference to `hx509_certs_init' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_get_serialnumber' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_find_subjectAltName_otherName' /usr/lib/libkrb5.so: undefined reference to `hx509_certs_find' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_attach_anchors' /usr/lib/libkrb5.so: undefined reference to `hx509_query_alloc' /usr/lib/libkrb5.so: undefined reference to `hx509_get_error_string' /usr/lib/libkrb5.so: undefined reference to `hx509_cms_unenvelope' /usr/lib/libkrb5.so: undefined reference to `hx509_lock_add_password' /usr/lib/libkrb5.so: undefined reference to `hx509_revoke_init' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_hostname' /usr/lib/libkrb5.so: undefined reference to `hx509_cms_unwrap_ContentInfo' /usr/lib/libkrb5.so: undefined reference to `hx509_prompt_hidden' /usr/lib/libkrb5.so: undefined reference to `hx509_name_free' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_check_eku' /usr/lib/libkrb5.so: undefined reference to `hx509_name_binary' /usr/lib/libkrb5.so: undefined reference to `hx509_certs_append' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_destroy_ctx' /usr/lib/libkrb5.so: undefined reference to `hx509_name_to_Name' /usr/lib/libkrb5.so: undefined reference to `hx509_cms_wrap_ContentInfo' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_get_issuer' /usr/lib/libkrb5.so: undefined reference to `hx509_free_octet_string_list' /usr/lib/libkrb5.so: undefined reference to `hx509_certs_iter' /usr/lib/libkrb5.so: undefined reference to `hx509_revoke_free' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_get_subject' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_free' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_attach_revoke' /usr/lib/libkrb5.so: undefined reference to `hx509_get_one_cert' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_init_ctx' /usr/lib/libkrb5.so: undefined reference to `hx509_revoke_add_crl' /usr/lib/libkrb5.so: undefined reference to `hx509_context_free' /usr/lib/libkrb5.so: undefined reference to `hx509_cms_create_signed_1' /usr/lib/libkrb5.so: undefined reference to `hx509_name_is_null_p' /usr/lib/libkrb5.so: undefined reference to `hx509_cms_verify_signed' /usr/lib/libkrb5.so: undefined reference to `hx509_lock_free' /usr/lib/libkrb5.so: undefined reference to `hx509_context_set_missing_revoke' /usr/lib/libkrb5.so: undefined reference to `hx509_query_match_option'
The fix is quite simple, when you use portupgrade or make install in the ports and it crashes with this error, simply do NOT cleanup the port. Just do the following...
First goto: /usr/ports/devel/subversion/work
Then edit: Makefile
Search for -lkrb5 and add -lhx509 to that line.
That should solve the problem for now. Future port upgrades should fix this...
Subversion (svn) Server over Apache (https) on FreeBSD
NOTE: For the people who like to to test out my repository. Well you can't. My repository is not running on the hostname provided in this manual.
First you have to install Subversion with the right options:
cd /usr/ports/devel/subversion make config
Select at least:
[X] MOD_DAV_SVN [X] NEON [X] SVNSERVE_WRAPPER
Install:
make install clean
For our location path we have decided to use the same location where our users would be located. This cause we have only 2 users accessing this system via SSH.
Setup repository root and first repository:
mkdir /home/_svn mkdir /home/_svn/root svnadmin create /home/_svn/root/repository chown -R www:www /home/_svn/root/repository chmod -R go= /home/_svn/root/repository
Cause we want to have one location to configure our repositories we setup a central location for our configuration and authorization files.
mkdir /home/_svn/conf cp /home/_svn/root/repos/conf/* /home/_svn/conf/
Edit /home/_svn/conf/svnserve.conf and add/change:
[general] anon-access = none auth-access = write password-db = /home/_svn/conf/passwd authz-db = /home/_svn/conf/authz realm = SVN Repository
Edit rights in: /home/_svn/conf/authz:
[groups] admin = marius dev = marius [repos:/] * = @admin = rw [repos:/_system/trunk/scripts] local = r spothost = r [repos:/falloftime_nl/trunk] local = r [repos:/mariusvw_com/trunk] spothost = r [repos:/vendors] * = r @admin = rw
Tighten permissions:
chown -R www:www /home/_svn chmod -R go= /home/_svn
NOTE: In any case you have permission problems re-run these!
Setup Apache vritualhost:
# # Subversion on svn.mariusvw.com # SSLEngine on ServerAdmin info@mariusvw.com ServerName svn.mariusvw.com DAV svn SVNParentPath /home/_svn/root AuthzSVNAccessFile /home/_svn/conf/authz AuthName "SVN Repository" AuthType Basic AuthUserFile /home/_svn/conf/htpasswd #Satisfy Any Require valid-user
Adding a user for the first time:
htpasswd -cm /home/svn/_conf/htpasswd
After that:
htpasswd -m /home/svn/_conf/htpasswd
Backup/Refresh repository when upgrading Subversion to a newer version (dump/load)
Shut down svnserve, Apache, and anything else that might access the repository.
svnadmin dump /repository/path/here > dumpfile.txt mv /repository/path/here /repository/path/here_old
Upgrade Subversion.
svnadmin create /repository/path/here svnadmin load /repository/path/here > dumpfile.txt
Copy over hook scripts, etc, from the old repository to the new one.
And last but not least. Restart Apache, svnserver or any other app you run
Step by step: Moving code between Subversion repositories
I found this solution to move your code/projects between repositories, maybe not the most ideal way but it works great! Thanks to Dan Forys!
As many coders will tell you, there reaches a point where you realise that you absolutely, positively must keep your code in a a revision control system. In my working life, I’ve used Microsoft’s ageing SourceSafe and more recently the vastly superior SubVersion (SVN).
There’s many powerful GUIs out there which you can use to interact with SVN, and make the checking out and checking in very easy. If you primarily use a desktop GUI (like me), then chances are you use a SVN client GUI to interact with SVN on a day-to-day basis.
But what happens when you need to move code between repositories?
I first realised I needed to reorganise my repositories when my single “clients” repository was growing unwieldy. It was one large repository, with all my client work organised into folders by the project name. This method keeps things very tidy, but increments the version numbers with every commit on every project and means you have a very long root log.
A better way, I realised, is to keep the unrelated projects organised in their own repositories – but how to move the code out of my client repository into a new one?
To do this, you’ll need shell access to your SVN server (surely you do – otherwise, how do you create your repositories?)
SVN provides the svnadmin dump command to export data from your repository. In my case, to dump the contents of my entire clients repository, I did the following:
svnadmin dump clients > clients-dumpfile
which creates a text file called clients-dumpfile containing all the revision data for my clients repository. Note that this can create a very large file, as it’s not stored in the ultra-efficient space-saving SVN database any longer.
Say I want to move all my code from a folder called client-1, and put it in its own repository. First thing I need to do, is to create the destination repository:
svnadmin create client-1-repository
Now – the dumpfile contains all the code for all the projects, so how do I filter out the other projects? (this is all one line)
cat clients-dumpfile | svndumpfilter include client-1 --drop-empty-revs --renumber-revs > client-1-filtered-dumpfile
What does this do? It takes the previously created clients-dumpfile and sends it through the svndumpfilter program. I’ve told it to include the client-1 folder (and throw away everything else). I’ve told it to drop the empty revisions left behind by the thrown away data, and renumber the rest of the revisions so my new repository is nicely sequentially numbered. The results from svndumpfilter are output into a new file called client-1-filtered-dumpfile.
Finally, you simply load the data into the new repository:
svnadmin load client-1-repository < client-1-filtered-dumpfile
Hopefully, you now have a populated repository with your clients’ code.




