#1749: avoid creating temporary links to files in Formaline -----------------------------------+---------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Keywords: Formaline | -----------------------------------+---------------------------------------- the patch in https://bitbucket.org/cactuscode/cactusutils/branch/rhaas %2Fupdate-index changes the way Formaline populates the configjar git repository with changed files. Instead of making a hard linked copy of every file in the thorn, it used plumbing commands git-update-index to add them to the index. This deals gracefully with files in symbolically linked directories (but will dereference a symbolic link if the file *itself* is a symgolic link) and also works when CACTUS_CONFIGS_DIR is not on the same file system as the source tree (eg Cactus is in $HOME which has a small quota but is backed up and $CACTUS_CONFIGS_DIR is in $SCRATCH which is not backed up).
Not being able to have $CACTUS_CONFIGS_DIR on a different file system than Cactus is a minor bug, in particular since this method is described in the UserGuide.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: new => review
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+---------------------------------------
Comment (by knarf):
In general: why not. Concerning the patch: is it not possible to get the real file mode from the files? Here modes would be 'converted' to 755 or 644, even if they were something else before.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+---------------------------------------
Comment (by rhaas):
Well this method may be slower since it two calls to git per file rather than one call to ln per file and one call to git for all files together at the end.
As for modes: apparently git ignores everything (see http://git- scm.com/book/en/v2/Git-Internals-Git-Objects and search for 120000) but "file/directory" and "executable/not-executable". I have however amended to branch to pass the full mode information.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+--------------------------------------- Changes (by rhaas):
* type: defect => enhancement
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+---------------------------------------
Comment (by knarf):
Please quote the filename in lines 46 and 49. I might be too paranoid, and I am sure this isn't the only place things like this occur in the code (in fact, code that the patch removes is as bad), but just imagine someone adding a file with the name "README | rm -rf ~" to a thorn. Or worse.
I didn't test the patch yet though - not for retaining functionality, and especially not for helping in the current case.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+---------------------------------------
Comment (by rhaas):
I updated the branch with the suggested change. Note that Formaline using hard links will also break on clusters that use BeeGFS for the Cactus build filesystem (since the file system does not support hard links). Testing this with the current ET trunk, the proposed patch produces identical tarballs to the current code.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: | Keywords: Formaline ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
Comment:
This looks good.
#1749: avoid creating temporary links to files in Formaline ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: development version Resolution: fixed | Keywords: Formaline ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied in git hash d56810ca94835fe7d7a7526a6d469650aef34f7a of CactusUtils.
trac@lists.einsteintoolkit.org