Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
findcruft: Yet another script to find obsolete files
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
soulwarrior
Guru
Guru


Joined: 21 Oct 2002
Posts: 331

PostPosted: Sat Dec 04, 2004 12:24 am    Post subject: Reply with quote

djpenguin wrote:

Any idea what I did wrong? I'd really like to get this going...had to go in a manually remove stuff from /var/tmp/ today so I could do an emerge sync...


What does happen when you try to open findcruft directly?
Code:

cd /tmp
/usr/local/bin/findcruft > cruftfiles
Back to top
View user's profile Send private message
djpenguin
Guru
Guru


Joined: 02 Sep 2004
Posts: 386

PostPosted: Mon Dec 06, 2004 5:03 am    Post subject: Reply with quote

That did the trick!

Thanks a bunch.
Back to top
View user's profile Send private message
lhurgoyf
n00b
n00b


Joined: 11 Jun 2003
Posts: 34

PostPosted: Tue Jan 04, 2005 9:42 am    Post subject: Reply with quote

Omg im getting a lot of false positives, thinks like /usr/bin/vi which is a simlink to vim
/etc/motd which is imho a system file and more stuff like this. this package needs a lot of tweaking which im doing now.

*Edit* Interested in my 'updated' files ?
_________________
Nederlands linux forum? Flash @ http://www.nedlinux.nl
Back to top
View user's profile Send private message
lhurgoyf
n00b
n00b


Joined: 11 Jun 2003
Posts: 34

PostPosted: Tue Jan 04, 2005 7:03 pm    Post subject: Reply with quote

I also got thesame problem with the c++ and cpp etc files. they are repoted to be used by binutils in my system when I use the grep command. but the script still reports them as positive.
_________________
Nederlands linux forum? Flash @ http://www.nedlinux.nl
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Tue Jan 25, 2005 9:04 pm    Post subject: Reply with quote

Good work man. The great cruft script by ecatmur did not work for me after my latest install. I am glad to see someone picking this up.
_________________
write quit bang
Back to top
View user's profile Send private message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 738
Location: Barcelona, Spain

PostPosted: Tue Feb 01, 2005 4:14 pm    Post subject: Reply with quote

shouldnt you exclude /proc and /dev, to say some? i get almost all my files in /dev and /proc reported as cruft!
_________________
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Back to top
View user's profile Send private message
lhurgoyf
n00b
n00b


Joined: 11 Jun 2003
Posts: 34

PostPosted: Fri Feb 04, 2005 8:30 am    Post subject: Reply with quote

Even worse, I got /etc/devfs.d reported as cruft, I didnt notice it on my desktop and upon the following reboot my system didnt want to go anymore. I had to manually mount my drives (using their long /dev/ path) and create that Dir to get my machine working again.
_________________
Nederlands linux forum? Flash @ http://www.nedlinux.nl
Back to top
View user's profile Send private message
mikkelhoegh
n00b
n00b


Joined: 27 Aug 2004
Posts: 71
Location: Herning, Denmark

PostPosted: Fri Feb 11, 2005 3:03 pm    Post subject: Reply with quote

... and all of /var/www/localhost/htdocs/ is reported as cruft too, since that is where i keep my (surprise) webpages
_________________
freak n:
Slang: An eccentric or nonconformist person, especially a member of a counterculture.
Back to top
View user's profile Send private message
Fauli
l33t
l33t


Joined: 24 Apr 2004
Posts: 760
Location: Moers, Germany

PostPosted: Fri Feb 11, 2005 8:53 pm    Post subject: Reply with quote

I've created an ebuild for findcruft. You can download it here: http://ifp.loeber1.de/findcruft-ebuild.tar.bz2

Please untar the archive in your PORTDIR_OVERLAY, echo app-portage/findcruft >>/etc/portage/package.keywords and don't forget to source /etc/profile after merging and before running findcruft because of $FINDCRUFT_CONFDIR.

Have fun!
_________________
Do your part to beautify the web! Turn off link underlining!
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Thu Feb 17, 2005 12:03 am    Post subject: Reply with quote

very nice script indeed, i must congratulate
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Thu Feb 17, 2005 1:56 am    Post subject: Reply with quote

allthough, it does seem that there are some problems with it on a 64bit install (amd64)...

it seems to be finding everything in /usr/lib64 as cruft...
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
shawv
n00b
n00b


Joined: 11 Jan 2005
Posts: 9

PostPosted: Fri Feb 18, 2005 7:51 pm    Post subject: Reply with quote

Make sure findcruft has execute permission `chmod +x findcruft'. Also make sure your user can write to the current directory, or just output your file to your home directory like `findcruft > ~/cruft.found'. Make sure you're running the right program, especially when you're using root to run the file, by specifying the full-path of findcruft. If the program is in your current directory do a `./findcruft > ~/cruft.found'

If you knew all this, sorry, just trying to be helpful. If that does not help, post the output of `ls -al findcruft' and give us the username and group that you used to run the program. Good luck.
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Fri Feb 18, 2005 9:33 pm    Post subject: Reply with quote

AWESOME WORK! thank you so much for doing this! I've been trying and trying to get ecat's cruft script working again but its having all these bash problems. The python one doesnt seem to work either. This is exactly what the gentoo community needs right now. Again great work!
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
MeatPie
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jan 2005
Posts: 112

PostPosted: Wed Mar 02, 2005 5:24 am    Post subject: Reply with quote

I get a TON of false positives. I get stuff included such as CrossOver Office, America's Army, cron settings, X11 libraries, Opengl libraries, nvidia stuff, 64bit libraries (probably because you are not running an AMD64) etc. It also wanted to remove man pages. :lol:
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Mon Mar 07, 2005 10:56 pm    Post subject: Reply with quote

hepta_sean wrote:
(too bad, that ecatmur is gone)


What happened to ecatmur?
Back to top
View user's profile Send private message
Raest
n00b
n00b


Joined: 06 Mar 2004
Posts: 12

PostPosted: Wed Mar 09, 2005 4:25 am    Post subject: Reply with quote

Heh, thought this was intresting, but at least for me its totally unusable, half of its results seem to be false positives including:

1. Stuff in /etc, mostly config files
Code:
/etc/X11/xorg.conf
/etc/devfs.d
/etc/lilo.conf
/etc/ssh/ssh_host_*(lots of key files)


2. libraries
Code:
/lib/cpp
/lib/libgcc_s.so
/lib/libgcc_s.so.1


3. EEEK, all my compiler stuff in /usr/bin !
Code:
/usr/bin/c++
/usr/bin/cc
/usr/bin/cpp
/usr/bin/g++
/usr/bin/gcc
/usr/bin/i386-pc-linux-gnu-c++
/usr/bin/i386-pc-linux-gnu-gcc
/usr/bin/i686-pc-linux-gnu-c++
/usr/bin/i686-pc-linux-gnu-g++
/usr/bin/i686-pc-linux-gnu-gcc


4. All of my files uder webroot
Code:
/var/www/localhost/htdocs/*(all web files)


Had a lot of other false positives but I think those are system specific, the ones i listed seem more universal.
Back to top
View user's profile Send private message
Fauli
l33t
l33t


Joined: 24 Apr 2004
Posts: 760
Location: Moers, Germany

PostPosted: Wed Mar 09, 2005 8:01 pm    Post subject: Reply with quote

You have to set FINDCRUFT_CONFDIR if you haven't installed findcruft in /usr/local. If FINDCRUFT_CONFDIR is not set it defaults to /usr/local/lib/findcruft.
_________________
Do your part to beautify the web! Turn off link underlining!
Back to top
View user's profile Send private message
soulwarrior
Guru
Guru


Joined: 21 Oct 2002
Posts: 331

PostPosted: Sun Mar 13, 2005 11:29 am    Post subject: Reply with quote

Fauli wrote:
I've created an ebuild for findcruft. You can download it here: http://ifp.loeber1.de/findcruft-ebuild.tar.bz2


Thanks for the ebuild :)

I just wondered if findcruft is supported anymore by hepta_sean?

When I start the last findcruft I get the following error message:
Code:

Finding files on the filesystem ...
Finding files managed by portage ...
Comparing to get unmanaged files ...
Building false positive list ...
find: warning: you have specified the -mindepth option after a non-option argument -type, but options are not positional (-mindepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

Comparing to get cruft files ...
findcruft thinks these files are cruft:
---------------------------------------



Greetings,
Daniel
Back to top
View user's profile Send private message
mope
Apprentice
Apprentice


Joined: 23 Feb 2003
Posts: 206

PostPosted: Wed Apr 06, 2005 9:51 pm    Post subject: Reply with quote

thank you for the script and the ebuild, as well.
Back to top
View user's profile Send private message
zpet731
Tux's lil' helper
Tux's lil' helper


Joined: 24 Mar 2004
Posts: 133
Location: Sydney Australia / Belgrade Serbia

PostPosted: Fri Apr 15, 2005 5:56 pm    Post subject: Reply with quote

Umm... just ran the script like a minute ago and the script spit out like 8632 files that are cruft. Is this possible for starters, and if it is who has the time to go through all of these to see if there are false positives. :?
_________________
" Invention is the most important product of man's creative brain. The ultimate purpose is the complete mastery of mind over the material world, the harnessing of human nature to human needs."
Nikola Tesla
Back to top
View user's profile Send private message
trendzetter
n00b
n00b


Joined: 24 Aug 2003
Posts: 61
Location: Ghent, Belgium

PostPosted: Tue Apr 19, 2005 9:37 pm    Post subject: Genkernel ? Reply with quote

Code:

/etc/kernels
/etc/kernels/config-2.4.20-gentoo-r6
/etc/kernels/config-2.4.20-xfs-r3
/etc/kernels/config-2.6.0-mm1
/etc/kernels/config-2.6.0-rc1-mm1
/etc/kernels/config-2.6.0-test10-mm1
/etc/kernels/config-2.6.0-test9-mm2
/etc/kernels/config-2.6.0-test9-mm5
/etc/kernels/config-2.6.0_beta9-r2
/etc/kernels/config-2.6.1-rc1-mm1
/etc/kernels/config-2.6.2-rc2-mm1
/etc/kernels/config-2.6.3-mm1
/etc/kernels/config-2.6.3-rc1-mm1
/etc/kernels/config-2.6.4-rc2-mm1
/etc/kernels/default-config
/etc/kernels/default-config.OLD
/etc/kernels/kernel-config-x86-2.6.10-gentoo-r2
/etc/kernels/kernel-config-x86-2.6.3-mm1
/etc/kernels/kernel-config-x86-2.6.4-rc2-mm1
/etc/kernels/kernel-config-x86-2.6.5-mm6
/etc/kernels/kernel-config-x86-2.6.6-love4
/etc/kernels/kernel-config-x86-2.6.6-rc2-mm1
/etc/kernels/kernel-config-x86-2.6.7-rc3-love1
/etc/kernels/kernel-config-x86-2.6.7-rc3-love2
/etc/kernels/kernel-config-x86-2.6.8-gentoo-r10
/etc/kernels/kernel-config-x86-2.6.9-gentoo-r6
/etc/kernels/kernel-config-x86-2.6.9-rc2-nitro1
/etc/kernels/settings


All genkernel configfiles are reported as cruft
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 334
Location: California USA

PostPosted: Thu Apr 21, 2005 7:45 am    Post subject: Let's use Installwatch to reduce false positives Reply with quote

It seems like a large portion of the cruft comes from the pkg_postinst routine (see man 5 ebuild). I want to patch portage.py so that it uses Installwatch to log all the files created during postinst and stores a list of those files in the /var/db/pkg database. Add support for this to findcruft and IMHO it will be a much better tool!
_________________
Zac
Back to top
View user's profile Send private message
ozbird
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 181

PostPosted: Thu Apr 21, 2005 7:59 am    Post subject: Reply with quote

Raest wrote:
Heh, thought this was intresting, but at least for me its totally unusable, half of its results seem to be false positives including:
<snip>
Had a lot of other false positives but I think those are system specific, the ones i listed seem more universal.


Most of these are actually symbolic links. One of my anti-cruft approaches is to do a periodic "emerge -e world" and see what remains in /bin, /lib, /sbin, /usr/bin etc. that has an old datestamp; this works well except for symbolic links, which I generally have to exclude. You could use something like symlinks to clean up any broken links, I guess.

Some cruft I particularly noticed was /lib/libgcc_s.so and libgcc_s.so.1; there are newer versions of these /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.3-20050110 (your version may vary.) The /lib versions don't belong to any packages, so I assume that this is a bug, and that gcc should be updating these?
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 334
Location: California USA

PostPosted: Thu Apr 21, 2005 6:03 pm    Post subject: Reply with quote

ozbird wrote:
Some cruft I particularly noticed was /lib/libgcc_s.so and libgcc_s.so.1; there are newer versions of these /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.3-20050110 (your version may vary.) The /lib versions don't belong to any packages, so I assume that this is a bug, and that gcc should be updating these?

gcc-config allows you to switch between multiple compilers. Your /lib/libgcc_s.so and libgcc_s.so.1 are cruft. If you are afraid you need them then you could move them to a temp directory and run revdep-rebuild to make sure you didn't break any dynamic links.
_________________
Zac
Back to top
View user's profile Send private message
zmedico
Developer
Developer


Joined: 02 Jan 2004
Posts: 334
Location: California USA

PostPosted: Mon Apr 25, 2005 9:43 am    Post subject: my portage patches are ready Reply with quote

Okay, my patches are ready now! I created bug number 90343 so go dowload the patches if you're interested in this feature. I hope the portage devs like it. It seems really nice to me.
_________________
Zac
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum