Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 164529 - [Future EAPI] CONFIG_PROTECT_MASK should allow wildcards
Summary: [Future EAPI] CONFIG_PROTECT_MASK should allow wildcards
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2007-01-30 11:09 UTC by Johan Stäring
Modified: 2021-11-29 07:12 UTC (History)
3 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 Johan Stäring 2007-01-30 11:09:39 UTC
I have, for backup and recovery reasons (and because I can... =) put my /etc directories on all my Gentoo machines in my SVN repository. This in itself is of course not a problem, but it coexists fairly poorly with etc-update and the CONFIG_PROTECT functionality.

The thing is that when etc-update uses find to find the config files that have changed, it matches a lot of things in the .svn subdirectories of the various subdirectories in /etc, a behavior that I don't want. 

The CONFIG_PROTECT_MASK feature is not flexible enough -- I could of course and all the .svn directories with absolute path, but that'd be too much work (I counted them on one of my servers -- 1609 of them...). 

So what I would suggest is that either the line 

for file in $(find ${path}/ -iname '._cfg????_*' ! -name '.*~' ! -name '.*.bak' |

in etc-update is changed to 

for file in $(find ${path}/ -iname '._cfg????_*' ! -name '.*~' ! -name '.*.bak' ! -name '*.svn*' | 

or something similar, or that the CONFIG_PROTECT_MASK feature is updated to allow wildcards. I'd be perfectly happy to have this as a config parameter, I just would find it convenient to not having to edit etc-update after each update of portage... :)

Besides, while having /etc in SVN isn't exactly common, I can't be the only one, can I? :)

Reproducible: Always

Steps to Reproduce:
1. Add /etc to a SVN repository
2. Update a few packages
3. run etc-update
Comment 1 Remy Blank 2007-05-05 08:12:46 UTC
(In reply to comment #0)
> Besides, while having /etc in SVN isn't exactly common, I can't be the only
> one, can I? :)

No, I'm doing that, too, and it's very useful. But strangely I haven't noticed anything odd with etc-update, as it only looks for ._cfg* files, and these are never created in .svn directories. Can you describe more precisely how this "coexists poorly with etc-update"?
Comment 2 Johan Stäring 2007-07-03 12:42:58 UTC
An excerpt of what etc-update tells me when I run it without having modified the script itself:

67) /etc/init.d/samba (1)
68) /etc/conf.d/saslauthd (1)
69) /etc/init.d/shorewall (1)
70) /etc/shorewall/shorewall.conf (1)
71) /etc/shorewall/.svn/text-base/shorewall.conf.svn-base (1)
72) /etc/shorewall/.svn/wcprops/shorewall.conf.svn-work (1)
73) /etc/init.d/.svn/wcprops/shorewall.svn-work (1)
74) /etc/openldap/slapd.conf (1)
75) /etc/openldap/slapd.conf.default (1)
76) /etc/X11/startDM.sh (1)
77) /etc/mail/spamassassin/v310.pre (1)
78) /etc/dcc/whitecommon (1)
79) /etc/dcc/whitelist (1)
80) /etc/init.d/xdm (1)
81) /etc/X11/xorg.conf.example (1)
82) /etc/shorewall/zones (1)
83) /etc/shorewall/.svn/text-base/zones.svn-base (1)
84) /etc/shorewall/.svn/wcprops/zones.svn-work (1)
Please select a file to edit by entering the corresponding number.
              (don't use -3, -5, -7 or -9 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all remaining files)
                           (-5 to auto-merge AND not use 'mv -i')
                           (-7 to discard all updates)
                           (-9 to discard all updates AND not use 'rm -i'):

So... I suppose it could be something that is due to some other setting on my system, but to me it seems that the code change I suggested, or something more well-thought-through that achieves the same thing, would be useful. 

Oh, sorry for the veeery slow response, btw. :)
Comment 3 Remy Blank 2007-07-03 12:55:24 UTC
Could you post your 'emerge --info' please?
Comment 4 Johan Stäring 2007-07-03 13:34:20 UTC
Sure thing:

bender ~ # emerge --info
Portage 2.1.2.7 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.5-r3, 2.6.17-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r7 x86_64 Intel(R) Pentium(R) D CPU 2.66GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 02 Jul 2007 02:20:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -mtune=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c svn"
CXXFLAGS="-march=nocona -mtune=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles/"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X alsa amd64 apache2 bash-completion berkdb bitmap-fonts bzip2 cdrom cgi chroot cjk cli courier cracklib crypt cups dbase dbm dbx divx4linux doc dri eds emboss emul-linux-x86 encode expat extensions firefox font-server foomaticdb fortran freetts freetype ftp gcj gd gif gnome gnuplot gpm gstreamer gtk gtk2 gtkhtml gvim hal iconv icq imagemagick imap imlib ipv6 isdnlog java javascript jikes jpeg kerberos krb4 lapack latex ldap lm_sensors lzw lzw-tiff mailbox maildir maildrop mailwrapper mbox md5sum midi milter mime mng mp3 mpeg mplayer msn msql mssql mudflap mysql mysqli ncurses nfs nls nptl nptlonly nsplugin nvidia offensive opengl openmp openssh pam pam-mysql pcre pdf perl pic png postfix postgresql pppd procmail python qt3 qt4 quicktime rar readline reflection samba sapdb sasl sdl session sftp smime snmp spamassassin spell spl sse-filters ssl svg t1lib tcpd tetex threads tiff tools truetype truetype-fonts type1-fonts unicode usb vda vhosts xorg xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 5 Remy Blank 2007-07-03 14:11:36 UTC
Ok, nothing suspect (except possibly the trailing "svn" in your CONFIG_PROTECT_MASK), my CONFIG_* vars are similar:

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"

In your etc-update output, it seems all problematic files are related to shorewall. Are you installing it from a layman overlay? Could you post the output of "equery f shorewall" (emerge gentoolkit if you don't have equery)?

Emerge normally never installs files into .svn directories, and such files should therefore never appear in etc-update. It might be due to a broken ebuild.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-08-09 07:56:14 UTC
Splitting etc-update from this bug, there's Bug 173284 about this. And, +1 on globbing support for CONFIG_PROTECT{,_MASK}, would be very useful for some ebuilds.