{"thread":{"id":"16725","subject":"Followup: management of OO files - warning about \"rezip\" approach","startedAt":"2008-12-14T13:08:24Z","lastAt":"2008-12-15T14:41:13Z","messageCount":2,"participants":["Sergio Callegari","Peter Krefting"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"97871","messageId":"loom.20081214T123442-862@post.gmane.org","threadId":"16725","inReplyTo":null,"subject":"Followup: management of OO files - warning about \"rezip\" approach","fromName":"Sergio Callegari","fromEmail":"sergio.callegari@gmail.com","sentAt":"2008-12-14T13:08:24Z","receivedAt":"2008-12-14T13:08:24Z","isPatch":false,"sender":{"key":"sergio.callegari@gmail.com","avatar":"https://gravatar.com/avatar/c98f41317e0422c1e630385de0e3970227b8e5ad15f35ba8586066467cc833bc?d=mp&s=160"},"body":"Hi, some times ago, i considered ways to achieve a smarter management of\nopenoffice files with git.\n\nThe thread started at:\n\nhttp://article.gmane.org/gmane.comp.version-control.git/95951\n\nThere, a \"rezip\" script was proposed to store OO files uncompressed into git\nrepos, so that the compression and delta machinery of git could operate at its\nbest with them.\n\nAppartently, the script rose some interest.  In the following days I received\nquite a few corrections/enhancements proposals for which all the posters I thank.\n\nAlso I was asked to upload the script and instructions relative to its adoption\ntogether with .gitattributes to the git wiki.\n\nThis I didn't do (I do not know if someone else might have done it) because I\nfirst wanted to be absolutely sure that the script would cause no problems to\nanybody.\n\nUnfortunately, I now see that there is an issue, so I am sending a warning.\n\nThe problem stems from the fact that ODF files, due to the zip compression also\nmight store pieces of info that are completely irrelevant.  For instance zip\nstores ownership of member files.  This is why in the rezip script I initially\nstarted to unzip files with -X.\n\nNow, this seems to be looking for trouble when repos are passed from one user to\nanother one.\n\nWhen we uncompress and ODF file for storing we should probably scrap away the\nmember ownership info alltogether. Note that this is not equivalent to not using\n-X.  Not using -X would mean \"changing\" member owernership when an ODF file is\npassed from one user to another one.  Using -X seemed to me the correct thing to\ndo as it allowed to leave untouched the member ownership.  However, -X fails\nwhen user A has no permission to create files as user B.\n\nI found out about this issue by having accounts on many hosts, where my\nalphanumeric user ID maps to different numeric IDs.\n\nI will look better at this as soon as I have time.  So far, please just be\ncareful.  My guess is that we should not use -X on \"unzip\" but use it on \"zip\".\n\nE.g. patch the rezip script so that\n\nPROFILE_UNZIP_ODF_UNCOMPRESS='-b -qq'\nPROFILE_ZIP_ODF_UNCOMPRESS='-q -r -D -0 -X'\nPROFILE_UNZIP_ODF_COMPRESS='-b -qq'\nPROFILE_ZIP_ODF_COMPRESS='-q -r -D -6 -X'\n\n\nSergio\n"},{"id":"97963","messageId":"Pine.LNX.4.64.0812151535410.21677@ds9.cixit.se","threadId":"16725","inReplyTo":"loom.20081214T123442-862@post.gmane.org","subject":"Re: Followup: management of OO files - warning about \"rezip\" approach","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2008-12-15T14:41:13Z","receivedAt":"2008-12-15T14:41:13Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Sergio Callegari:\n\n> E.g. patch the rezip script so that\n> \n> PROFILE_UNZIP_ODF_UNCOMPRESS='-b -qq'\n> PROFILE_ZIP_ODF_UNCOMPRESS='-q -r -D -0 -X'\n> PROFILE_UNZIP_ODF_COMPRESS='-b -qq'\n> PROFILE_ZIP_ODF_COMPRESS='-q -r -D -6 -X'\n\nYeah, that is exactly what I ended up doing.\n\nI've been running the rezip script for quite a long time now,\nversioning a spreadsheet that I update by adding stuff to up to several\ntimes a week. Using this approach has shrunk the compressed .git\ndirectory by about 90 % (before I started using rezip, it was about 9\nmegabytes, with rezip and 30 % more commits, it is now 1 megabyte).\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"}]}