Needs work
Project:
Feature Server (fserver)
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 May 2011 at 20:48 UTC
Updated:
17 Oct 2011 at 20:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jeffamHere's the patch. I tested with tar on Snow Leopard 10.6.7, but not with GNU tar. I did confirm that GNU tar has the -C switch, however, so I'm hoping someone can test and confirm that it works.
Comment #2
eugenmayer commentedInteresting, thank you for your contribution!. Well we need both, linux testers and unix testers to be sure we dont play bug-ping-pong here.
I will take care about the Linux ( Debian ) part, and test your patch there.
And additional question here is, how far do those things depend on a specific git verion? If there are limitation, which version is minimal.
Comment #3
jeffamGood question about the git version. I suspect that the way you're using it is fine for several versions back.
I was looking at the git deploy module the other day, and they seem to use something called GLIP (Git Library in PHP) that might also be of use to this project.
Comment #4
danepowell commentedIn Ubuntu, this patch does break existing functionality- the files are placed into the tarball without a root directory, creating a nice little tarbomb.
Comment #5
eugenmayer commentedThank you Dane for testing. Patch did not get applied to 1.1, so it still to be reviewd.
Comment #6
jeffamGood catch, Dane. Here's a reworked version that doesn't create a tarbomb. Again, it was only tested on OS X 10.6.7 with bsdtar.
Comment #7
eugenmayer commentedSo we will need to have a linux tester also. Iam not sure about my hight workload, but maybe i happen to test it. Over all, thank you guys for all your work, finally the fserver gets some attention and care :)
Comment #8
danepowell commentedI'm not sure about that patch. If you modify FserverProject_git->path, then when the destructor is called, it's not going to properly clean up is it? i.e., the parent folder created by
mkdir($this->path);will still remain...Comment #9
randallknutson commentedJust ran into this on CentOs. The version of tar that comes by default on CentOs is 1.15.1 which does not include the --transform option. It was added in GNU tar 1.20 in August 2008. To fix this I am recompiling tar on my server to get the latest version. Perhaps we should add a message somewhere saying that tar --version must be greater than 1.20 for fserver-package to work until we are sure this works on all systems.
Comment #10
eugenmayer commentedthat is a very handy information randallknutson! Thank you very much. I guess including that informatin would at least give the admin a clue, whats wrong
Comment #11
jeffamAnother option is git archive.
Something like:
git archive [tag|commit] --prefix=[project]/ | gzip > /tmp/[project]-[version].tar.gzgit archive has been around since 2006, and the above command works on Snow Leopard with its bsdtar, so maybe it will work on the old version of tar in CentOS, too.
Comment #12
lendudeRan into this problem on a OSX 10.7 server (but same problem still exists on 10.8 and 10.9 ), just want to add my solution.
The tar command is a simlink to bsdtar on OSX and the version shipped with OSX doesn't support --transform. However GNU tar is also shipped with OSX. So I changed the tar simlink to GNU tar. That got transform to work, but added the resource fork to the tar archive.
So changed the tar command to set a env
This excludes the resource fork. So works perfectly now.
Just wanted to add my workaround, in case other people run into the same problems
Len