Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 32927 - portage shouldnt CONFIG_PROTECT binary executables
Summary: portage shouldnt CONFIG_PROTECT binary executables
Status: RESOLVED DUPLICATE of bug 14321
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-06 20:24 UTC by Reporter
Modified: 2011-10-30 22:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reporter 2003-11-06 20:24:48 UTC
Reproducible: Always
Steps to Reproduce:
1. emerge xfree-4.3.0-r3
2. run etc-update
3. etc-update thinks /etc/X11/chooser (a binary file) is a config file
4. try to interactively merge original with update


Actual Results:  
BAM!

Expected Results:  
/etc/X11/chooser replaced automatically
Comment 1 SpanKY gentoo-dev 2003-11-06 20:36:29 UTC

*** This bug has been marked as a duplicate of 17268 ***
Comment 2 Reporter 2003-11-07 21:13:55 UTC
no, spanky, it's not!

bug #17268 is about etc-update is not able to deal with *binary
config files* (shudder) and is assigned to dev-portage

this bug is about /etc/X11/xdm/chooser, which is a compiled 
c programm and should be assigned to xfree. feeding binary 
programs to etc-update doens't make the least bit of sense!

could you please reopen and assign to the proper people?

thanks
Comment 3 SpanKY gentoo-dev 2003-11-07 21:38:26 UTC
there's a bug somewhere that deals with this, but i cant find it atm
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2003-11-24 22:08:24 UTC
ok, I see 3 options to solve this:
- add a CONFIG_PROTECT_MASK entry for this file
- install it in a different location
- generally don't protect binary stuff (how can we check if a file is binary ?)
Comment 5 SpanKY gentoo-dev 2003-11-25 07:20:05 UTC
run `file` on the file and see if it says it's data or a binary or something
Comment 6 TGL 2003-11-26 05:34:21 UTC
The things that `file ...` can output are problematic in fact. 
For instance, a shell script is displayed as "application/x-shellscript",
which doesn't show it is a "text" file at the first look. And it is 
probably not possible to maintain an exhaustive list of such text-like 
types into portage, it would be too error prone (and ugly also).

There was a discussion on this topic on the python list a few months ago:
http://mail.python.org/pipermail/python-list/2003-August/177961.html

One of the point in that discussion is that it is difficult to know 
what are "printable" characters of a files when you don't know its 
encoding. And assuming config files are ASCII only would be wrong: 
there are more and more UTF8 files coming from Gnome/KDE for instance.

Hence, one of the suggestions in this thread is to recognize as "binary" 
those files that contains "\0" chars. This is easy and safe, but may fail
to detect some of the binaries files. Anyway, it would be better than 
nothing.
Comment 7 SpanKY gentoo-dev 2003-11-26 19:12:03 UTC
if you run `file` on a shell script it should save something like 'Bourne-Again shell script text executable' ... if it gives you a mime type, you probably ran `file` with the -i option

the man page for file refers to the fact that all text files usually contain the word 'text' in their output ...

rather than worrying about a portage solution we could always tell xfree to 'fix' their end
Comment 8 TGL 2003-11-27 01:36:06 UTC
Now that I've re-read "file" manpage, and that I've also read in FHS 
that their should be _no_ binary file in /etc (I was not sure about 
this at all, I was thinking it was more like this because no binaries
were needed in general), I can only fully agree with you SpanKY. 
Sorry for the noise.
Comment 9 SpanKY gentoo-dev 2003-11-29 15:39:01 UTC
well, for the most part, the files arent technically in /etc

the directories are symlinked in ;)
Comment 10 Nicholas Jones (RETIRED) gentoo-dev 2003-12-23 23:20:31 UTC

*** This bug has been marked as a duplicate of 14321 ***
Comment 11 SpanKY gentoo-dev 2006-06-11 12:40:19 UTC
*** Bug 136376 has been marked as a duplicate of this bug. ***