Author Topic: Cruft Discussion and Scripts  (Read 11744 times)

ectropy

  • Guest
Cruft Discussion and Scripts
« on: September 23, 2013, 12:09:31 AM »
Psst! The current release contains 200Mb+ of cruft which can, and should, be pared out.
(don't shoot the messenger, eh)

Although the space savings within the squashfs won't be the full "size on disk" of the items detailed below (213Mb)... pappy always said "a thing worth doin' is worth doin' RIGHT"

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

TIP: install the debian package "ncdu" (ncurses directory usage utility), then you can easily "walk" the filesystem to flesh out space hogs and cruft
$ cd /
$ ncdu

/usr/share/qt4/translations
(handpick, most files pathed here can be nixed)
4Mb

rm -Rf /usr/share/kde4/*
2.7Mb

/usr/share/aptitude
(handpick, nix all foriegn lang helpdocs n readme files)
3Mb

/usr/share/i18n
(handpick, nix all foriegn lang helpdocs n readme files)
6Mb

/usr/share/fluxbox/nls
(handpick, nix all foriegn lang helpdocs n readme files)
1Mb

rm -Rf /usr/share/perl/5.18.1/Unicode/Collate/*
unneeded, non-English locale-specific cruft
3Mb+

rm -Rf /usr/share/themes/Adwaita/backgrounds/*
1.2Mb

/usr/share/fonts
(handpick, weed out most "serif" fontsets)(please!)
6Mb approx

rm /var/cache/apt/*.bin
unneeded. these are automatically regenerated by each "apt-get update" operation
42Mb

/var/lib/mlocate/mlocate/mlocate.db
occupies 2.3Mb in current squashfs
and (BUT) will be regenerated at boot (delaying bootup of each live session, eternally) if missing
so please don't get overzealous and nix molcate.db (some live distros do)

v--- variants or backup/renamed copies of various png files
/boot/grub
/lib/live/mount/medium/isolinux
/etc/remastersys
/urs/local/bin/images
/usr/share/images
3Mb+

v--- these will be autogenerated at first run, if absent:
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/places.sqlite
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/cookies.sqlite
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/downloads.sqlite
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/formhistory.sqlite
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/webappsstore.sqlite
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/signons.sqlite
rm -Rf /etc/skel/.mozilla/firefox/0bwoq7rk.default/thumbnails/*
rm -Rf /etc/skel/.mozilla/firefox/0bwoq7rk.default/safebrowsing/*
rm /etc/skel/.mozilla/firefox/0bwoq7rk.default/startupCache/*
^--- this is NOT a comprehensive list of "what all" may be safely excluded
but it's better than complete inattention to this cruft ( ala debian mozilla packagers + remastersys )
17Mb
Bear in mind that this "cleanup" (suggest wrapping it into a bash script) needs to be performed again
following each "apt-get upgrade iceweasel" operation, prior to remastering.
Also note: per stock (as configured per its package) bleachbit does not clean these paths/items

$ apt-get purge libicu48
orphaned package (per the set of currently-installed apps)
42Mb

Note: THE PREFERENCES SETTING, WITHIN SYNAPTIC, "CONSIDER RECOMMENDED PACKAGES AS DEPENDENCIES" IS TICKMARKED !
^--- quoting comedian Jeff Foxworthy: "HEREs yer sign!"

Note: "puddletag" plus its dependant (otherwise unneeded) libs, are adding 41Mb overhead to the squashfs !
(cruft CRUFT cruft)

Note: package "freepats" (midi patchsets) has no dependants and adds 34Mb overhead to the squashfs !
(i'm a fan of midi, but... cruft CRUFT cruft)

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


NOTE: (caps)(yeah, i'm shouting) I PROTEST THE ABSENCE OF /usr/share/doc
EVEN IF (NOT SO, CURRENTLY) A USER CAN EASILY REINSTALL THAT CONTENT LATER, VIA A (downloadable, separately packaged) 'CLICKME'

Although the doc path does contain quite a bit of cruft (by file count), prior to performing a backup I weed most of its zero-value (to user) content by running a cleanup script
--- snip ---
cd /usr/share/doc
find  -iname AUTHORS -exec rm {} \;
find  -iname COPYRIGHT -exec rm {} \;
find  -iname LICENSE -exec rm {} \;
find  -iname THANKS -exec rm {} \;
find  -iname THANKS.gz -exec rm {} \;
find  -iname CONTRIBUTORS -exec rm {} \;
--- snip ---
Hmm, am I recommending "ship the apps, ship the docs... and withhold the (myriad) license copies and the credits"?
Gee, it sounds like I just did... so sue me.  Whatever.

Note: (counterintuitive, at a glance, but) I suggest installing packages "gnome-icon'them" and "tango-icon-theme".
At every turn, when user installs packageX  (e.g. Thunar wants tango folder icons)... those biatches are gonna get pulled in as dependencies.
Post-install, pin the packages and weed out their installed files.
If you prune the 72x72/* ... 128x128 paths, IIRC the remainder (total overhead from both icon packages) is about 6Mb.

Note: "gmusicbrowser" (lotta deps and) adds an additional 17Mb of cruft to the /etc/skel path !
("times two". At boot, same cruft immediately gets copied to /home )

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #1 on: September 23, 2013, 01:51:48 AM »
@ ectropy

That is incredible input! I appreciate you taking the time to show all of this and over the next week I will be taking a long look at everything you posted and try to reduce to the ISO's to their minimal sizes. I cannot tell you how much I appreciate this...

 8)
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #2 on: September 24, 2013, 11:33:33 PM »
All right another update...

I have resolved the lxpanel issues and now have it working exactly the way the current tint2 works AND it is using less memory than the two tint2 panels...  I started on this mission because of ectropy's gentle pushes and had been thinking about it also because tint2 lately seems to be using memory exponentially as the session goes on and that is not good... The main push from ectropy that I heard regarding the tint2 panel was
Quote
At first boot into vsido I groaned (seriously, I did) "oh no, notta nudder WBAR distro!" 3/4inch tall icons, no autohide... if I were a WXGA laptop user, I would have IMMEDIATELY bailed.
and I agree with for the most part... lxpanel does provide several more tools out of the box that just work.

So, for the great pushes from ectropy and the overall discussion in here, the new ISO's on Sunday (or tonight if all goes well ... statmonkey is in dire need!) will have lxpanel as the new panel...

I will also reduce the kindergarten sized fonts... I do use massive monitors and have a difficult time judging what is good.. the jittery conky is an easy fix too, I just need to find the setting... It has never been an issue I have seen but easy to fix.

a lot of shit that is in remastersys (loved the takemytoysandgohomesys reference) does not pertain to users of VSIDO and I could wipe it out if needed... specifically plymouth is not enabled at all.  Remastersys (the way I have tweaked it) works really well for my needs now... Having said that, I have seen references to the antixsnapshot tools and need to get them and test.. thanks for that.

I will continue answering all the other suggestions in here as I read through them again
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #3 on: September 25, 2013, 03:50:37 PM »
@ectropy

Good intel on gvfs... I was not aware of it, although I have hated that POS for quite some time

In reference to this:

In order to prevent this, a downstream distributor will need to roll up his sleeves, mod the codebase, and recompile ~~ which is probably beyond the skill level of 99.84% of the "distromakers" out there.

I absolutely agree...

For me as the 'dev' of VSIDO, that is a label/title I take very very lightly... I am not a coder or developer although I can look at code and understand it quite easily

I spent a 28 year career as a 'fixer' of other peoples (99.9% Microsoft) code and either fixed or enhanced it ... and IMHO that is all I am doing now with VSIDO...  I have grabbed what I believe is a good base and spend most of my time fixing it or enhancing it so that it will become better

I think phase II of VSIDO may change that as I delve more into installers, repos, scripts etc etc etc

Just my two cents, and for a nickel you can ignore it
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #4 on: September 25, 2013, 09:18:24 PM »
Initial decrufting done...

Testing the build now

ISO has dropped 80 MiB down to 550 MiB

Will release this for testers in an hour or so
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #5 on: September 25, 2013, 10:49:47 PM »
Here is the link for the test ISO

I know I have not added Geany back to the menu and that Puddletag has not been removed from the menu I will get that done
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #6 on: September 28, 2013, 01:22:28 PM »
Morning extropy

Are you running these from a live session or installed base?

VSIDO Welcome will not run from live cd...

Every thing that is in /home from live cd is there because of /etc/skel as it is created with the livecd first time login of vsido
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #7 on: September 28, 2013, 02:51:21 PM »
Went through and added the additional recommends and installed lxterminal ...

Also added 00recommends

The dual things you are seeing in Application Finder are not dupes... lxpanel is good but not totally freedesktop.org standards compliant... I had to create those additional .desktop files to overcome what lxpanel cannot do to get the panel to behave the way I want it to behave... Which is to iconify correctly on both sides... both Launcher and Task

Took care of F10 in xfce-terminal

Took care of Synaptic which is held in /root and not in /etc/skel
Quote
If you install the "apt-xapian-indexer" debian package (via the commandline, without synaptic or aptitude running, please)
a "quick search" box will automagically appear next time you launch synaptic.
Bear in mind that the searchable database created by the indexer will occupy 100Mb (or more) of drive space.

apt-xapian-index is not installed because of the 100 Mb it creates... I have added it to VSIDO-Welcome to be installed on first boot

Took care of all other rm's that I could

Now to test...

Thanks for this extropy
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #8 on: September 28, 2013, 04:28:34 PM »
All tested well...

The ISO is now down to 527 MiB

Amazing!   ;D

Will upload it to sourceforge
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Digit

  • Techno Hippie
  • Posts: 296
  • savant (alegedly), polymath (wannabe)
    • View Profile
    • wastedartist.com
Re: Cruft Discussion and Scripts
« Reply #9 on: September 28, 2013, 04:34:58 PM »
i was surprised to see no mention of the package "fslint" once inside this thread.

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #10 on: September 28, 2013, 04:36:11 PM »
^ and it blindsided the rest of the content?

527 MiB?!?!?!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

Digit

  • Techno Hippie
  • Posts: 296
  • savant (alegedly), polymath (wannabe)
    • View Profile
    • wastedartist.com
Re: Cruft Discussion and Scripts
« Reply #11 on: September 28, 2013, 04:48:16 PM »
hahahaha. no.  :)

just surprised by that.   wanted to make sure it was known that it [fslint]'s an actual thing, that could further the cause even beyond the greatness already achieved.  :)

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #12 on: September 28, 2013, 04:53:22 PM »
Ok, now you have me curios... what is fslint and how can it help me/VSIDO?   :D :D
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #13 on: September 29, 2013, 01:06:53 AM »
On the next build I will move /etc/skel/.mozilla/plugins/libflashplayer.so and /home/.mozilla/plugins/libflashplayer.so to /usr/lib/mozilla/plugins

That will eliminate 36 MiB ...

I understand where you are coming from and will help every way I can
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

VastOne

  •      v-ger
  • Posts: 4185
    • View Profile
    • VSIDO Community
Re: Cruft Discussion and Scripts
« Reply #14 on: September 29, 2013, 01:24:24 AM »
Also regarding

Quote
everything that is in /home from live cd is there because of /etc/skel "
that only reflects the scenario at time of remastering (and you elect "preserve home dir = no").

I do not allow anything from /home to be a part of the build, everything is in /etc/skel
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO