Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17268 - etc-update can't show binary config file differences
Summary: etc-update can't show binary config file differences
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 47382 112093 123455 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-10 19:33 UTC by Guy
Modified: 2011-10-30 22:20 UTC (History)
8 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 Guy 2003-03-10 19:33:33 UTC
After emerging devfsd-1.3.25-r2, emerge indicated I had 3 configuration files to
update. None of the three files displayed any actuall differences when using
etc-update.

I'm wondering if there is a problem with the 'automatic merge of trivial
changes' functionality.

================================================================================



 * GNU info directory index is up-to-date.
 * IMPORTANT: 2 config files in /etc need updating.
 * IMPORTANT: 1 config files in /usr/X11R6/lib/X11/xkb need updating.
 * Type emerge --help config to learn how to update config files.

dragon root # etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/X11/rstart/rstartd.real
/etc/X11/rstart/._cfg0000_rstartd.real
2) /etc/X11/xdm/chooser
/etc/X11/xdm/._cfg0000_chooser
3) /usr/X11R6/lib/X11/xkb/xkbcomp
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp
Please select a file to edit by entering the corresponding number (-1 to exit): 1

Showing differences between /etc/X11/rstart/rstartd.real and
/etc/X11/rstart/._cfg0000_rstartd.real
Files /etc/X11/rstart/rstartd.real and /etc/X11/rstart/._cfg0000_rstartd.real differ
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
Please select from the menu above (-1 to ignore this update): 1
Replacing /etc/X11/rstart/rstartd.real with /etc/X11/rstart/._cfg0000_rstartd.real
mv: overwrite `/etc/X11/rstart/rstartd.real'? y

The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
2) /etc/X11/xdm/chooser
/etc/X11/xdm/._cfg0000_chooser
3) /usr/X11R6/lib/X11/xkb/xkbcomp
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp
Please select a file to edit by entering the corresponding number (-1 to exit): 2

Showing differences between /etc/X11/xdm/chooser and /etc/X11/xdm/._cfg0000_chooser
Files /etc/X11/xdm/chooser and /etc/X11/xdm/._cfg0000_chooser differ
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
Please select from the menu above (-1 to ignore this update): 1
Replacing /etc/X11/xdm/chooser with /etc/X11/xdm/._cfg0000_chooser
mv: overwrite `/etc/X11/xdm/chooser'? y

The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
3) /usr/X11R6/lib/X11/xkb/xkbcomp
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp
Please select a file to edit by entering the corresponding number (-1 to exit): 3

Showing differences between /usr/X11R6/lib/X11/xkb/xkbcomp and
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp
Files /usr/X11R6/lib/X11/xkb/xkbcomp and
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp differ
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
Please select from the menu above (-1 to ignore this update): 1
Replacing /usr/X11R6/lib/X11/xkb/xkbcomp with
/usr/X11R6/lib/X11/xkb/._cfg0000_xkbcomp
mv: overwrite `/usr/X11R6/lib/X11/xkb/xkbcomp'? y

Exiting: No files to work on!
dragon root # 


===========================================================================

ragon root # emerge info
Portage 2.0.47-r8 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r0)
=================================================================
System uname: 2.4.20 i686 AMD Athlon(TM) XP1500+
GENTOO_MIRRORS=" ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
http://212.219.56.162/sites/www.ibiblio.org/gentoo/
http://194.83.57.2/sites/www.ibiblio.org/gentoo/
http://194.83.57.3/sites/www.ibiblio.org/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode gif jpeg gnome libg++ mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml
alsa gdbm berkdb slang readline arts tetex bonobo svga ggi tcltk java guile
mysql X sdl gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt kde
motif opengl mozilla cdr"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j1"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"

dragon root #

Reproducible: Didn't try
Steps to Reproduce:
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-03-11 07:13:35 UTC
did you enable
eu_automerge="yes" in /etc/etc-update.conf ?
Comment 2 Matt Taylor 2003-03-11 16:05:00 UTC
the files are binary...

liverbugg@alumiguin liverbugg $ file /usr/X11R6/lib/X11/xkb/xkbcomp
/usr/X11R6/lib/X11/xkb/xkbcomp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped
liverbugg@alumiguin liverbugg $ file /etc/X11/xdm/chooser
/etc/X11/xdm/chooser: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped
liverbugg@alumiguin liverbugg $ file /etc/X11/rstart/rstartd.real
/etc/X11/rstart/rstartd.real: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

Comment 3 Guy 2003-03-11 18:16:00 UTC
Answer to comment #2: I didn't need to enable it. It is already configured that way.

Comment regarding comment #3: I never checked the file type or contents. I assumed (DOH!!!!) that confiuration files / scripts would always be text. The implication here is that either these files should never have been picked up as 'config' files _or_ if they are indeed 'config' files of some type, then etc-update needs the ability to understand them and then present the differences.

It's been my impression that the only binary 'config' files are some of the 'gnome' files in XML format with (or without) internal compression. I could (almost certainly) be wrong here though.

:-)
Comment 4 Guy 2003-03-11 19:07:52 UTC
I changed the summary to more accurately reflect the real issue.

As I currently see it, the potential issues are:

1) Some packages may be using binary format files to hold configuration data.

2) 'etc-update' has no functionality for dealing with binary format configuration files in a rational manner.

On a philisophical note, I am a firm believer in text only configuration files. This is one of the reasons I won't use gnome anymore.

As far as binary format configuration files go, etc-update should probably do the following for now until a more rational and logical approach is defined:

A) Old configuration files should be saved with a clear identify appended to the file name. I'd suggest something like $FILENAME.oldconf-####.

B) The newly emerged configuration file should immediately go in it's place.

C) The 'emerge' process should report a count of all _binary_ configuration files updated. 

In other words, 'emerge' should be expanded to treat and track binary config files differently than text config files.

Rational:

i) Thinking over all the 'config' files in the past which have had no differences displayed, it is my impression (not proved by any means) that most if not all binary configuration files are similar in nature to 'xkbcomp'. These are not config files that most users are likely to change.

ii) I think it's reasonable to assume that most newer config files where security changes are an issue will most likely be more secure. Therefore, it is probably best to have more secure default behaviour and to make the user use the appropriate tool to change their respective application package config settings.

Just my nickel's worth (inflation and all that)
Comment 5 Guy 2003-06-15 03:49:57 UTC
The improvements in etc-update probably render this bug report moot. :-)
Comment 6 SpanKY gentoo-dev 2003-11-06 20:36:29 UTC
*** Bug 32927 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2004-08-02 20:03:23 UTC
*** Bug 47382 has been marked as a duplicate of this bug. ***
Comment 8 Kurt Hindenburg 2004-08-30 22:06:33 UTC
With the lastest gentoo, this bug is still relevant.

Beginning of differences between /etc/X11/xdm/chooser and /etc/X11/xdm/._cfg0000_chooser
Files /etc/X11/xdm/chooser and /etc/X11/xdm/._cfg0000_chooser differ
End of differences between /etc/X11/xdm/chooser and /etc/X11/xdm/._cfg0000_chooser

Beginning of differences between /etc/X11/rstart/rstartd.real and /etc/X11/rstart/._cfg0000_rstartd.real
Files /etc/X11/rstart/rstartd.real and /etc/X11/rstart/._cfg0000_rstartd.real differ
End of differences between /etc/X11/rstart/rstartd.real and /etc/X11/rstart/._cfg0000_rstartd.real                                                              

Not very helpful output; both files are binary.  Not sure this is really an etc-update bug; more likely the ebuilds/package fault.
Comment 9 Frédéric Point 2004-09-18 05:33:02 UTC
I think this is a bug in diff (or even in bash)

Diff put extra char on prompt

diff -Bbua /etc/sound/events/gnobots2.soundlist /etc/sound/events/._cfg0000_gnobots2.soundlist

The end of the output is weird :
----------------------
+description[uk]=
Comment 10 Frédéric Point 2004-09-18 05:33:02 UTC
I think this is a bug in diff (or even in bash)

Diff put extra char on prompt

diff -Bbua /etc/sound/events/gnobots2.soundlist /etc/sound/events/._cfg0000_gnobots2.soundlist

The end of the output is weird :
----------------------
+description[uk]=Ð ÑÐ²ÐµÐ½Ñ Ð·Ð°Ð²ÐµÑÑено
 description[vi]=Mức hoà n thà nh
 description[zh_CN]=æ¬å±å®æ
 description[zh_TW]=éé
itchy-scratchy root # 1;2c
----------------------

My diffutils vervion is sys-apps/diffutils-2.8.4-r4
Comment 11 Nicholas Jones (RETIRED) gentoo-dev 2004-09-27 12:44:43 UTC
Bug is mostly useless. We are not going to display source dumps of
application binaries.

Non-ascii text in files is another issue.
Comment 12 Rui Covelo 2004-09-27 12:46:35 UTC
I don't think this is a bug with etc-update. I think this is a limitation of diff.  I had this problem when I last updated xorg-x11. I used dispatch-conf and noticed one of the updated files was different but I wasn't able to see the differences. I used the new files and ended with a not working windows key.

At the time of the emerge, I didn't know the file was binary. Only when I went to my dispatch-conf config arquive and got to see the previous version of the file I understood the problem. A diff between the new file and the previous version only outputs something like "the files differ". That's why I say it's a limitation (not a bug) with diff.

BTW, I replaced the new file by the previous file and my keyboard is working again.
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2005-11-10 20:24:09 UTC
*** Bug 112093 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-02-20 00:40:33 UTC
*** Bug 123455 has been marked as a duplicate of this bug. ***