Bad file permissions and EOL encodings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP's Framework R&D |
Bug Description
A lot of the files in the overall project has random file permissions. In a packaging context, something like this is needed to rectify:
find . -name \*.py -a -perm 644 | \
xargs sed -i -e '\;/usr/bin/env;d' -e '\;/usr/
find . -name \*.html -o -name \*yml -o -name \*.js -o -name \*.po \
-o -name \*.css -o -iname readme* -o -name \*.csv \
-o -name account_
-o -name base_quality_
xargs chmod 644
chmod 644 $( find openerp/
chmod 644 openerp/
Also, some files have DOS eol encodings, as opposed to the overall Unix/Linus conventions. To fix:
find . -name \*.html | xargs sed -i 's/\r//'
sed -i 's/\r//' openerp/
sed -i 's/\r//' openerp/
Packaging would be simpler something like these command were applied to the source
Changed in openobject-server: | |
milestone: | none → 7.0 |
The first find removes teh shebang from non-executable python files. Packaging as well as common sense requiers that a file is either executable and has a shebang, or that it's not executable and don't have it.