Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68618 - [PATCH] new/more dispatch-conf fixes
Summary: [PATCH] new/more dispatch-conf fixes
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 65707 (view as bug list)
Depends on: 93874
Blocks:
  Show dependency tree
 
Reported: 2004-10-23 01:27 UTC by Heinachi
Modified: 2013-12-29 17:59 UTC (History)
3 users (show)

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


Attachments
new dispatch-conf (new.dispatch-conf,8.81 KB, text/plain)
2004-10-23 01:32 UTC, Heinachi
Details
Patch against CVS dispatch-conf (dispatch-conf.diff,2.68 KB, patch)
2004-10-26 06:54 UTC, Jason Stubbs (RETIRED)
Details | Diff
more new dispatch-conf (new.dispatch-conf,10.61 KB, text/plain)
2004-10-26 20:30 UTC, Heinachi
Details
added another feature (new.dispatch-conf,10.61 KB, text/plain)
2004-10-27 14:14 UTC, Heinachi
Details
another new feature (new.dispatch-conf,10.99 KB, text/plain)
2004-11-02 12:40 UTC, Heinachi
Details
new patch against the updated portage-2.0.51-r3 dispatch-conf (port-2.0.51-r3.dispatch-conf.patch,5.42 KB, patch)
2004-11-08 18:43 UTC, Heinachi
Details | Diff
Patch against portage 2.1.2_pre3-r3 (dispatch-conf.patch,4.51 KB, patch)
2006-10-17 06:08 UTC, Neil Bothwick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Heinachi 2004-10-23 01:27:13 UTC
new dispatch-conf, i say new cause i couldn't stand the tabbing style and had to fix it (i'm doing alot with dispatch-conf right now) at any rate here's an enchancment to the last patch i posted, the last patch should not be used as i found a problem with it that i fixed in this version. anyway, here's the important stuff:

fixed the while diff -a thing, no more diffing binarys like they are text, this was this bug: http://bugs.gentoo.org/show_bug.cgi?id=45385

added config file freezing, this allows you to set config files to never be overwritten (/etc/fstab /etc/group /etc/password) stuff like that, this sort of pretains to this bug: http://bugs.gentoo.org/show_bug.cgi?id=49952
but has been requested alot, and is just plain useful, there is more description of this in my last patch subbmission (which should not be used!) that's here: http://bugs.gentoo.org/show_bug.cgi?id=65707

also, if you read the last patch i subbmitted, i changed config file clobberin to work when the option '-c' (without the single quotes) is passed on the command line, making it easier for scripting (this all rolls into remote managment stuff) i think this is a better way to handle it than the config file option.

anyway, the bug: http://bugs.gentoo.org/show_bug.cgi?id=65707
should be closed, i'll put a note on it pointing to this bug.

also, any other features you want added to dispatch-conf let me know, i'll probably add them, unless you want to integrate alien technology into it to allow it to predict what config should be changed to what before they arrive. i can't do that..  those aliens are crafty and i still havn't caught one.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Heinachi 2004-10-23 01:32:29 UTC
Created attachment 42451 [details]
new dispatch-conf

oops, i forgot to attach the new file..

oh, if you want to diff this file against the current dispatch-conf to see the
changes just use:
s/\s\s\s\s/\t/g
on the old dispatch-conf first, that's 90% of my formating changes right there
and will make it readable
Comment 2 Heinachi 2004-10-23 01:34:05 UTC
*** Bug 65707 has been marked as a duplicate of this bug. ***
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2004-10-26 01:24:26 UTC
Heinachi: from your posting on gentoo-portage-dev I see that there is at least one new feature; would you mind summing the features up for me so I can include it on http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=4 if they make it into the stable portage?
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2004-10-26 06:54:25 UTC
Created attachment 42626 [details, diff]
Patch against CVS dispatch-conf

So that other's can see what's changed...

I'll add this to CVS and fix up the lack of tabs, but I disagree with the
cutting of blank lines and contraction of the docstrings.
Comment 5 Heinachi 2004-10-26 20:30:53 UTC
Created attachment 42659 [details]
more new dispatch-conf

another addition to dispatch-conf, more new features, and some fixes to some
stuff i missed in the last one (sorry).

in light of that i'll just go ever every new feature and/or fix:

1)
-a option removed from all diff commands, no more binary diffing problems

2)
frozen config files: add files to a new option in dispatch-conf.conf to prevent
config files from being overwritten, instead the new file from portage will be
added to rcs (or whatever other system of archiving you have dispatch-conf set
up to use) so you don't "lose" the changes. the list is a space dilimeted list
of files to be "frozen". example of the line in dispatch-conf:
frozen="/etc/fstab /etc/passwd /etc/group"
those files will be "frozen" and therefore never be overwritten by
dispatch-conf.

3)
-c command line option, this is "clobberall", it will cause dispatch-conf to
overwrite all old files with the new ones from portage with the exception of
files that have been "frozen"

4)
-p command line option, this is "pretend", it will print out a list of all
files that have updates, files will be in green unless frozen, then they will
be in blue. if the output is not a tty then there will be no color. frozen
files will have a * appended to the end so with or without color the frozen
files will be easy to spot.

5)
-a command line option, this is "ask", just like emerge ask, prints a pretend
and asks if you want to continue (dispatch-conf -c -a can make updates a
breeze)

6)
-t command line option, this is "testing", this is the option that was there
previously for developer testing, if you follow -t with a directory (or
directories encapsulated in quotes with a space dilimiter) then it will check
those directories rather than the portage config protect directories.

7)
replaced all the spaces with tabs like they should be, also, at jstubbs request
i put back in the blank lines and put the doc strings back the way they were.

i think that's all, if this wasn't clear enough for any of the features let me
know, also, if you find any bugs in this that i missed let me know, considering
how i missed the bugs in the last two patches i wouldn't be surprised. but
third times a charm right? i sure hope so.
Comment 6 Heinachi 2004-10-27 14:14:29 UTC
Created attachment 42719 [details]
added another feature

added one more feature at the suggestion of a friend:

-f command line option, this is the "force" option, it will override the frozen
files so if you *want* to update a config file that is frozen you can easily
append the -f option (extra useful with -a and/or -c)
Comment 7 Heinachi 2004-11-02 12:40:01 UTC
Created attachment 43186 [details]
another new feature

another added feature:

-s for "show" this shows a list of config files that have been frozen

also, fixed a minor oops with checking for -p and -a options.
Comment 8 Heinachi 2004-11-08 18:43:31 UTC
Created attachment 43571 [details, diff]
new patch against the updated portage-2.0.51-r3 dispatch-conf

this is a patch against the new dispatch-conf in portage-2.0.51-r3 which had
some security updates to it.

this includes all of the new features as listed in the last few above posts

not much has changed, a little bit of clean up, and due to the security update
i reverted the spacing back to 4 spaces instead of a tab, though i still
advocate it be changed.
Comment 9 LionsPhil 2005-07-26 01:55:17 UTC
Brilliant. I suggest that the default dispatch.conf when this becomes unmasked 
should have /etc/fstab in freeze, because it's just too damn easy for a new user 
to splat it and it's never (?) actually genuinely updated (unlike, for example, 
rc.conf, which recently had CLOCK and KEYMAP stuff split out).

(Another approach might be to make the baselayout ebuild smarter and not 
generate ._cfg* files for Really Important System Configuration Files that exist 
and haven't had such a change, but that's probably i) nontrivial ii) a seperate 
'bug' iii) flawed in several unpleasant edge cases I haven't forseen.)
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:25:34 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 11 Neil Bothwick 2006-10-17 06:08:27 UTC
Created attachment 99876 [details, diff]
Patch against portage 2.1.2_pre3-r3

Following some discussion on gentoo-user, I've fixed this patch to work with the latest dispatch-conf.
Comment 12 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 13:51:27 UTC
Reopen for consideration.