View previous topic :: View next topic |
Author |
Message |
assaf Apprentice
Joined: 14 Feb 2005 Posts: 152 Location: http://localhost
|
Posted: Sat May 21, 2005 9:49 am Post subject: |
|
|
I think a rule for sys-fs/udev should be added
Code: | cruftdir /lib/dev-state |
|
|
Back to top |
|
|
Jarhead Guru
Joined: 26 Mar 2004 Posts: 474
|
Posted: Mon Jun 06, 2005 6:16 am Post subject: |
|
|
I was not careful enough in my checking, and my gcc got messed up as a result. Let me re-iterate the warning of "be careful." _________________ Hats off to everyone in leadership, developmental, or administrative capacities for Gentoo Linux. Your hard work is very much appreciated. |
|
Back to top |
|
|
hielvc Advocate
Joined: 19 Apr 2002 Posts: 2805 Location: Oceanside, Ca
|
|
Back to top |
|
|
Xgates Tux's lil' helper
Joined: 27 Jun 2005 Posts: 82
|
Posted: Mon Jul 04, 2005 3:10 am Post subject: Bad Script |
|
|
Ed Catmur's cruft script still works better then findcruft-1.0.4, which happes to find alot of cruft that is false. All I can say is if Ed's script is outdated then we certainly need something better then findcruft-1.0.4 |
|
Back to top |
|
|
Fauli l33t
Joined: 24 Apr 2004 Posts: 760 Location: Moers, Germany
|
Posted: Sun Aug 07, 2005 7:56 pm Post subject: |
|
|
I have made some improvements and additions to the findcruft configuration directory (/usr/lib/findcruft). Now findcruft reports no more false positives -- at least for the packets installed on my computer.
You can download an archive of the config dir: http://ifp.loeber1.de/findcruft-config-20050807.tar.bz2 or you can install the ebuild for app-portage/findcruft-1.0.4-r1: http://ifp.loeber1.de/findcruft-ebuild.tar.bz2.
Take care to not accidentally overwrite any personal changes you made in your findcruft config directory! _________________ Do your part to beautify the web! Turn off link underlining! |
|
Back to top |
|
|
Vollkorn n00b
Joined: 02 Oct 2004 Posts: 41
|
Posted: Sun Aug 21, 2005 12:03 pm Post subject: findcruft, genkernel and installed sources |
|
|
Hi,
I just started using findcruft and it found a lot of files from genkernel like /etc/kernels/kernel-config-xxx. My idea is to let the config-files of findcruft have a look which kernel-sources are installed and output only these ones, so kernel-config-files belonging to kernels which aren't installed anymore are going to be identified as cruft.
But.. I don't know how to do this in an elegant way...
Someone got an idea?
Bye |
|
Back to top |
|
|
Fauli l33t
Joined: 24 Apr 2004 Posts: 760 Location: Moers, Germany
|
Posted: Sun Aug 21, 2005 6:41 pm Post subject: |
|
|
The files of the installed kernels are handled in the "nopackage" config script. You may add a line to ignore kernel-config-$kv there. _________________ Do your part to beautify the web! Turn off link underlining! |
|
Back to top |
|
|
TJNII l33t
Joined: 09 Nov 2003 Posts: 637 Location: for(;;);
|
|
Back to top |
|
|
Takaitra n00b
Joined: 12 Apr 2004 Posts: 26 Location: Minnesota
|
Posted: Sat Dec 10, 2005 3:21 am Post subject: |
|
|
Jarhead wrote: | I was not careful enough in my checking, and my gcc got messed up as a result. Let me re-iterate the warning of "be careful." |
Oops, I just did the same. I didn't know how important /usr/i686-pc-linux-gnu/bin/ was until it was gone . I was able to follow the instructions here to recover GCC and my binutils executables. I think /usr/i686-pc-linux-gnu/ should be added to the ignore list so others don't make this mistake. |
|
Back to top |
|
|
VS Jonno n00b
Joined: 16 Dec 2005 Posts: 7 Location: England
|
Posted: Sat Dec 24, 2005 3:38 pm Post subject: |
|
|
Mine lists xorg.conf (I'm using X.org), the entire JRE, /usr/i686-pc-linux-gnu/bin/ and other such things. |
|
Back to top |
|
|
Gothmog n00b
Joined: 11 Sep 2005 Posts: 10 Location: Germany
|
Posted: Sat Jan 14, 2006 1:41 pm Post subject: |
|
|
The use of such scripts is pretty dangerous, like many people who breaked their systems have already proven.
I think that an ignore list isn't enough; i suggest that you build a list of directories which are checked, at least by default. This has the benefit of not checking directories by mistake users have created, like /c or whatever. And I think /etc should be excluded completely by default. There are just too many config files that are not created when a package is installed, but later on. This will prevent many errors, and is not too sad because usually files in /etc are pretty small. The /etc directory here is 15MB large. Not much need of cleaning it, but many, many false positives at the moment.
I would also exclude some other directories, like /var/log, /var/run and /var/spool. Everything where files are regularly created by a package after it's installation.
Furthermore on my system it finds many symlinks pointing on files which aren't cruft. I suggest that you follow symlinks and decide whether to delete them by looking at the target.
Another proposal by me is not to proceed into (some) directories belonging to installed packages, like the ones in /usr/lib. Otherwise you would, for example, delete all the nice Perl modules installed with CPAN. :-) _________________ perl -e '$i++, print $1 while
"\nrekcah lreP rehtona tsuJ" =~ /(.)(??{"."x$i})$/s' |
|
Back to top |
|
|
iBormuth n00b
Joined: 13 Jan 2004 Posts: 59
|
|
Back to top |
|
|
swingkyd Guru
Joined: 13 Jan 2005 Posts: 334
|
Posted: Wed Mar 08, 2006 7:31 pm Post subject: |
|
|
is it normal to have some 3100+ "cruft" files after running:
Code: | # /usr/local/bin/findcruft >cruftfiles | ???
It seems to want to delete a whole bunch of stuff like:
Quote: | /etc/hosts.hightime
/etc/hosts.homenetwork
/etc/hosts.roaming
/etc/init.d/intelpatch
/etc/init.d/net.quickswitch
|
which are required for "quickswitch"
Quote: |
/etc/ndiswrapper/bcmwl5
/etc/ndiswrapper/bcmwl5/14E4:4301.5.conf
/etc/ndiswrapper/bcmwl5/14E4:4307.5.conf
/etc/ndiswrapper/bcmwl5/14E4:4320.5.conf
/etc/ndiswrapper/bcmwl5/14E4:4321.5.conf
/etc/ndiswrapper/bcmwl5/14E4:4324.5.conf
/etc/ndiswrapper/bcmwl5/bcmwl5.inf
/etc/ndiswrapper/bcmwl5/bcmwl5.sys
.... (would kill my wireless)
/etc/samba/printer
/etc/samba/smb.conf
...(kill samba?)
/etc/timezone....????
/etc/udev/cdsymlinks.conf
/etc/udev/permissions.d
/etc/udev/permissions.d/30-svgalib.permissions
/etc/udev/permissions.d/50-udev.permissions
/etc/udev/rules.d/10-local.rules....????
...
|
am I doing something wrong here? |
|
Back to top |
|
|
shinewu n00b
Joined: 09 Jan 2005 Posts: 27
|
Posted: Mon Mar 27, 2006 7:50 am Post subject: |
|
|
This is a fantastic script!
If you are impatient like me, just edit
/usr/local/lib/findcruft/ignore
For instance, if you mount your windows
partition at /mnt/windows
then add one line to that ignore file
echo /mnt/windows
It will automatically skip that dir for you.
After a few tries, you can customize it to find
those crufts exactly.
Good work, this one should be included in
the official portage tree. |
|
Back to top |
|
|
leszek4444 n00b
Joined: 18 May 2006 Posts: 10
|
Posted: Mon Jun 05, 2006 11:35 am Post subject: |
|
|
Yep findcruft is definitly a great app which should be in the tree
What is the normal procedure to add something to the tree ?
btw if you have false positives you can add them in the wiki : http://gentoo-wiki.com/TIP_Clean_Up_Cruft#False_Positives_rules_needed
The best way to have this completely integrated with portage is to add a new facultative CRUFT file in
/var/db/pkg/<cat>/<pkg>/
and patch the ebuilds of the concerned packages to add this file.
this CRUFT file could replace the files in /usr/lib/findcruft
and maybe the /usr/lib/findcruft/ignore can be moved to /etc/findcruft.ignore or something like that
Because there is a problem with the current method: for example with the new glibc, /etc/locale.build is replaced with /etc/locale.gen
it should be the glibc ebuild which should decide which files are cruft so that the old /etc/locale.build is considered like cruft after the emerge of the new glibc. |
|
Back to top |
|
|
synss Apprentice
Joined: 08 Mar 2006 Posts: 282 Location: Dijon > Berlin > Tokyo > Nürnberg > München
|
Posted: Fri Jun 09, 2006 9:24 pm Post subject: |
|
|
@leszek4444, I do not think such programs can ever make it to the tree because their main purpose is to break a running system.
However, I use it.
And it would probably be as good as edcatmur's cruft if it would follow symlinks (as already mentioned), and it is easier to maintain. So could sbdy add something like Code: | if symlink then follow
if follow is cruft
then symlink is cruft
else symlink is not cruft | I have tried but I do not know how to follow symlinks and echo the target... so I cannot make it. And a quick google does not help... But the script would be much more reliable with that! _________________ Compress portage tree
Elog viewer
Autodetect swap |
|
Back to top |
|
|
leszek4444 n00b
Joined: 18 May 2006 Posts: 10
|
Posted: Fri Jun 09, 2006 11:46 pm Post subject: |
|
|
i can make a symlink to something not cruft (like gcc), the symlink is still cruft and i want findcruft to find it.
if the symlink is not cruft then it should be in the rules in /usr/lib/findcruft/<category>/<package>.
Quote: | I do not think such programs can ever make it to the tree because their main purpose is to break a running system. |
the main purpose of findcruft is to find the cruft, breaking a running system is left as an exercise to the reader [/quote] |
|
Back to top |
|
|
synss Apprentice
Joined: 08 Mar 2006 Posts: 282 Location: Dijon > Berlin > Tokyo > Nürnberg > München
|
Posted: Tue Jun 13, 2006 9:10 pm Post subject: |
|
|
leszek4444 wrote: | i can make a symlink to something not cruft (like gcc), the symlink is still cruft and i want findcruft to find it. | OK, if you are clever enough to use ln -s, maybe you also should use rm sometimes... if you meant that an ebuild might make a symlink and forget to delete it (and that is where findcruft comes into play) then it is very likely that most symlinks to gcc were created by sys-devel/gcc and not removed while updating. I do not understand much how gcc sits on my system (although I know why), but abiword had such a "forgotten" symlink.
Anyway, a second point is that I do not use computers to have more job to do by hand but to have as much as possible dealt by the computer itself.
To conclude, - do it your way and maintain findcruft by
Quote: | if the symlink is not cruft then it should be in the rules in /usr/lib/findcruft/<category>/<package>. | which is OK with me, and you also deal with false positives and ppl breaking there system, because definitely, false positives are a greater problem than not finding any 0-sized crap.
or
do it my way and improve findcruft as to automatically leave what definitely does not look like cruft...That being said, I will try following the links, when and if I have time and post the patch here, unless sbdy wants to do it before. I though that using ln -s | cut -f x may actually do the job, although maybe not that elegant. And since I am pretty tired now, I just drop my pseudo code for anyone on holidays to steal it: Code: | list symlinknames in a different file, {requires identification when listing all files}
for each symlinkname
while (is symlink) {while for recursion}
filename = follow symlink
if filename in /tmp/${PROG}-falsepositives
forget it
else
is cruft | Anyone?
(by posting a more elaborated pseudocode each time, I'll finish posting the real code _________________ Compress portage tree
Elog viewer
Autodetect swap |
|
Back to top |
|
|
CrazyTerabyte Apprentice
Joined: 30 Dec 2004 Posts: 193
|
Posted: Thu Aug 10, 2006 12:56 pm Post subject: |
|
|
If you install dev-lang/ifc-9.xx, you must manually add a license file at /opt/intel/fortran90/licenses/
So, findcruft should ignore /opt/intel/fortran90/licenses/*.lic |
|
Back to top |
|
|
Phlogiston Veteran
Joined: 27 Jan 2004 Posts: 1925 Location: Europe, Swizerland
|
Posted: Sat Aug 12, 2006 9:46 am Post subject: |
|
|
Where can I get the script? Link seems to be down... _________________ Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor |
|
Back to top |
|
|
CrazyTerabyte Apprentice
Joined: 30 Dec 2004 Posts: 193
|
|
Back to top |
|
|
Revoluzzer n00b
Joined: 17 May 2005 Posts: 12
|
Posted: Sun Sep 24, 2006 9:09 am Post subject: False positives |
|
|
Can somebody add the false positives from the wiki to the archive of findcruft? There are enough now to justify an update, I think.
Thx. |
|
Back to top |
|
|
masterdriverz Retired Dev
Joined: 28 Mar 2006 Posts: 391 Location: Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the galaxy
|
Posted: Fri Sep 29, 2006 12:48 pm Post subject: |
|
|
Hmm,
Quote: | wc -l /tmp/cruft
594991 cruft |
|
|
Back to top |
|
|
xfighterx n00b
Joined: 28 Oct 2008 Posts: 4
|
Posted: Tue Oct 28, 2008 4:01 pm Post subject: |
|
|
hi!
i've got a question. an improtant question..
HOW AM I SUPOSED TO USE IT?
ok. i understand.. download, untar, copy, run.. but
what about thats false positives? is there one big file of all of those standard false positives?
how can i delete all the files listed in this output file?
i will be gratefull for an answer |
|
Back to top |
|
|
loftwyr l33t
Joined: 29 Dec 2004 Posts: 970 Location: 43°38'23.62"N 79°27'8.60"W
|
Posted: Tue Oct 28, 2008 5:30 pm Post subject: |
|
|
This program is very old and unlikely to work with the current portage versions. I would not use it and wait to see if there's another program that is more up to date that will do what you want. _________________ My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing. |
|
Back to top |
|
|
|