apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

Hardcoded "WebDAV:" xattr prefix breaks Linux compatibility #173

Closed macosforgebot closed 11 years ago

macosforgebot commented 15 years ago

_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.

macosforgebot commented 15 years ago

_christophapple@… originally submitted this as _attachment:fix_calendar-linux-xattr-fix.patch:⁠ticket:337_


fix_calendar Linux xattr Fix

macosforgebot commented 14 years ago

sammys@… originally submitted this as attachment:upgrade-linux-xattr-fix.patch:⁠ticket:337


Fixes xattr incompatibility in linux (twistedcaldav/upgrade.py)

macosforgebot commented 14 years ago

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).

macosforgebot commented 14 years ago

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

macosforgebot commented 14 years ago

apm@… originally submitted this as attachment:init.py:⁠ticket:337


a linuxxattr/init.py class

macosforgebot commented 14 years ago

alexis@… originally submitted this as comment:3:⁠ticket:337

macosforgebot commented 14 years ago

alexis@… originally submitted this as comment:4:⁠ticket:337

macosforgebot commented 14 years ago

alexis@… originally submitted this as comment:5:⁠ticket:337

macosforgebot commented 11 years ago

@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.