Closed macosforgebot closed 11 years ago
_christophapple@… originally submitted this as _attachment:fix_calendar-linux-xattr-fix.patch:ticket:337_
fix_calendar Linux xattr Fix
sammys@… originally submitted this as attachment:upgrade-linux-xattr-fix.patch:ticket:337
Fixes xattr incompatibility in linux (twistedcaldav/upgrade.py)
sammys@… originally submitted this as comment:1:ticket:337
I have attached a patch to fix the incompatibility when upgrading calendars from the old format to the new format (e.g calendarserver 1.2 to calendarserver 2.4).
apm@… originally submitted this as comment:2:ticket:337
bin/xattr is affected as well.
Maybe the correct solution is to override the whole xattr class for Linux and import linuxxattr as xattr. I've attached a linuxxattr/init.py
apm@… originally submitted this as attachment:init.py:ticket:337
a linuxxattr/init.py class
alexis@… originally submitted this as comment:3:ticket:337
alexis@… originally submitted this as comment:4:ticket:337
alexis@… originally submitted this as comment:5:ticket:337
@wsanchez originally submitted this as comment:9:ticket:337
The xattr property store is obsolete, and to the degree that this code is used at all, it's to only migrate from previously working data stores using it, so there no plan to fix this.
_christophapple@… originally submitted this as ticket:337
Linux requires a "user." prefix when setting extended attributes but CalendarServer uses a hardcoded "WebDAV:" prefix on various occasions. At least the following files seem to be affected:
calendarserver/tools/fixcalendardata.py calendarserver/tools/doublequotefix.py contrib/tools/fix_calendar twistedcaldav/test/test_upgrade.py twistedcaldav/test/data/makelargefbset.py twistedcaldav/upgrade.py twistedcaldav/admin/util.py
The attached patch fixes this problem for fix_calendar but has not been tested on non-Linux platforms.