LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Reducing number of installed packages. (https://www.linuxquestions.org/questions/slackware-14/reducing-number-of-installed-packages-4175564278/)

Rinndalir 01-18-2016 12:40 PM

Reducing number of installed packages.
 
New year and a little house cleaning. I ran ls -1 /var/log/packages|wc -l and it's over 1000! Many I had never heard of so I am removing them.

What I really need is to have a monitor watching the system and creating a list of files that have been loaded/used in the last 6-8 months or so.

Does anyone know if such a monitor exists? I was thinking back to tripwire or something like that.

How many does ls -1 /var/log/packages|wc -l does your -current show?

It will save me a lot of time updating -current to have fewer packages.

Tonus 01-18-2016 01:02 PM

Reducing number of installed packages.
 
Slackware is expected to be fully installed. You might run in dependencies troubles unless being very careful removing packages...

volkerdi 01-18-2016 01:08 PM

Quote:

Originally Posted by Tonus (Post 5480415)
Slackware is expected to be fully installed. You might run in dependencies troubles unless being very careful removing packages...

Indeed. The idea that dropping random packages (or even carefully selected packages) will "save me a lot of time updating -current" is not likely to be correct.

orbea 01-18-2016 02:45 PM

Some of us still enjoy using a more minimal install and being able to remove and recompile packages as needed is a great learning experience. Sure it may not make much difference in system upgrades except for potentially complicating them and hard drive space is not a concern for most people, but benefits in learning how your system works are well worth it.

On my system I use this script I found in an old arch forum post and modified slightly for slackware to make sure I did not remove anything important or to track down what extra packages need to be recompiled after an update. It works for my use case, but it probably needs a little work to be made more portable.

Code:

#!/bin/sh
#  2004/08/22  K. Piche  Find missing library references.
#  2015/11/27  orbea    Refreshed script

ifs=$IFS
IFS=':'

ARCH=$(uname -m)

libdirs="/lib:/usr/lib:/usr/X11R6/lib:/usr/libexec:/usr/$ARCH-slackware-linux:/lib64:/usr/lib64:/usr/X11R6/lib64"
extras=

#  Check ELF binaries in the PATH and specified dir trees.
for tree in $PATH $libdirs $extras
do
        echo DIR $tree

        #  Get list of files in tree.
        files=$(find $tree -type f)
        IFS=$ifs
        for i in $files
        do
                if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
                        #  Is an ELF binary.
                        if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
                                #  Missing lib.
                                echo "$i:"
                                ldd $i 2>/dev/null | grep 'not found'
                        fi
                fi
        done
done

exit

For comparison here is my customized /etc/slackpkg/blacklist
Code:

# This one will blacklist all SBo packages:
[0-9]+_SBo
[0-9]+alien
[0-9]+compat32
[0-9]+_SBocompat32
[0-9]+_git

sbopkg

kde/*
kdei/*
xfce/*

# a
elilo
grub
floppy
mt-st
mtx
pcmciautils
upower

# ap
nano
pamixer
radeontool
sox
usbmuxd

# d
cvs
Cython
mercurial
rcs
ruby
subversion

# l
akonadi
alsa-plugins
attica
automoc4
GConf
glib-networking
grantlee
gst-plugins-good
gst-plugins-good0
gtkmm3
herqq
json-c
libasyncns
libart_lgpl
libbluedevil
libproxy
libimobiledevice
libgpod
liblastfm
libusbmuxd
libvncserver
libwnck
libcanberra
mm
neon
newt
pilot-link
polkit-qt
phonon*
pulseaudio
qca*
qimageblitz
qjson
QScintilla
qt-gstreamer
qtscriptgenerator
sbc
shared-desktop-ontologies
slang
slang1
soprano
speexdsp
strigi
taglib-extras
v4l-utils
vte

# n
bluez
cifs-utils
epic5
mcabber
mobile-broadband-provider-info
ModemManager
netatalk
NetworkManager
obex-data-server
obexfs
obexftp
openobex
php
samba
wpa_supplicant

# x
intel-gpu-tools
libva
seamonkey
xf86-input-acecad
xf86-input-penmount
xf86-input-synaptics
xf86-input-wacom
xf86-video-amdgpu
xf86-video-apm
xf86-video-ark
xf86-video-ast
xf86-video-ati
xf86-video-chips
xf86-video-cirrus
xf86-video-glint
xf86-video-i128
xf86-video-i740
xf86-video-intel
xf86-video-mach64
xf86-video-mga
xf86-video-neomagic
xf86-video-openchrome
xf86-video-r128
xf86-video-rendition
xf86-video-s3
xf86-video-s3virge
xf86-video-savage
xf86-video-siliconmotion
xf86-video-sis
xf86-video-sisusb
xf86-video-tdfx
xf86-video-tga
xf86-video-trident
xf86-video-tseng
xf86-video-voodoo
xf86-video-xgi-git
xf86-video-xgixp

# xap
audacious
blackbox
blueman
electricsheep
fvwm
geeqie
gv
mozilla-thunderbird
MPlayer
network-manager-applet
pavucontrol
pidgin
rxvt
sane
x3270
xchat
xine
xlockmore
xpdf
xsane

# freeslack
getty-ps
lha
unarj
amp
ipw2100-fw
ipw2200-fw
trn
zd1211-firmware
xfractint
xgames
xv

# git
libdrm
mesa
xf86-video-nouveau


qweasd 01-18-2016 04:46 PM

OT, but orbea, you may want to add bluez-firmware to that list :) Somehow we missed it for several months, so the very early versions of the list omitted it.

dugan 01-18-2016 04:54 PM

Quote:

Originally Posted by Rinndalir (Post 5480406)
It will save me a lot of time updating -current to have fewer packages.

Why is that the case?

Are you on a slow connection?

Are you not using slackpkg?

elcore 01-18-2016 05:34 PM

Yes, the trimming procedure can be time consuming and is unsupported. I could have full install on my build machine, but not on my netbook, where I can only spare 3,5G
Problem is when I compile something on full install, makefile will sometimes autodetect, and then depend on wide variety of things that don't exist on netbook.
So one could say trimming does save some time in the long run, because packages build much faster on desktop, and I won't have to define deps manually if the two systems are identical.

I'd say stable 14.1 is a much better target for discarding packages, because -current requirements change all the time.
These are just some of the things I build custom for both -curent and stable:
Code:

MPlayer    cairo    gtk-engines    libvdpau  opentyrian  thunar-archive-plugin
OpenAL        edid    gtksourceview  libvpx    qmmp      wine
SDL2        ffmpeg  icecat        mc          smplayer      xarchiver
SDL2_image  fluxbox  iotop        mousepad  sqlite      xfce

So far only GNU IceCat is a pain to compile, because with the exception of zlib, it's building it's own separate libs and this takes hours.
Apart from that small inconvenience, and kde being a standard tentackled freedesktop mess, it all works nicely on top of 2G base system with X.

commandlinegamer 01-18-2016 06:08 PM

I'm not fussy about removing packages as I used to be. I still dump sendmail though, most of the text editors, and am leaning away from KDE in favour of XFCE.

I certainly wouldn't recommend anyone remove stuff willy-nilly, but there's a fair amount of duplication of tools.

orbea 01-19-2016 08:12 AM

Quote:

Originally Posted by qweasd (Post 5480522)
OT, but orbea, you may want to add bluez-firmware to that list :) Somehow we missed it for several months, so the very early versions of the list omitted it.

I don't have bluez-firmware on my system, it seems blacklisting just bluez is enough to get rid of both bluez and bluez-firmware.

Rinndalir 01-20-2016 02:49 PM

Quote:

Originally Posted by Tonus (Post 5480415)
You might run in dependencies troubles unless being very careful removing packages...

For example I removed yptools. I also removed a couple that were for mt. Does anyone hear even remember what mt stands for? I chuckled with nostalgia when I found those.

I also removed any that were for KDE.

BTW How many does ls -1 /var/log/packages|wc -l does your -current show?

Rinndalir 01-20-2016 03:13 PM

Quote:

Originally Posted by orbea (Post 5480479)
On my system I use this script I found in an old arch forum post and modified slightly for slackware to make sure I did not remove anything important or to track down what extra packages need to be recompiled after an update. It works for my use case, but it probably needs a little work to be made more portable.


I will look at this script. I haven't used the blacklist feature as you have. This makes sense to do it this way.

Another question, can't you just comment out the SBo mirrors so ou don't get those packages?


Also Orbea is a high-end bike maker in the Basque country of Spain. Not that well known by most.
At least that is how I know the word orbea.

zakame 01-20-2016 07:19 PM

Quote:

Originally Posted by Rinndalir (Post 5480406)
What I really need is to have a monitor watching the system and creating a list of files that have been loaded/used in the last 6-8 months or so.

Does anyone know if such a monitor exists? I was thinking back to tripwire or something like that.

Yeah, some file-based IDS would do it. The way you describe it, it seems similar to what OpenBSD's security(8) script would output; perhaps worth checking out and refit for Slackware.

The other way to achieve some minimalism here would be to start from a base list of packages (e.g. something like what I did for building my Docker slackware image and add the packages you need, instead of pruning from a full Slackware install.

MarcT 01-21-2016 02:08 PM

Quote:

Originally Posted by Rinndalir (Post 5481690)
I also removed a couple that were for mt. Does anyone hear even remember what mt stands for? I chuckled with nostalgia when I found those.

Well, we still have DAT and LTO tape drives, so the magnetic tape (mt) packages are still relevant here. :)

Rinndalir 01-21-2016 02:22 PM

Quote:

Originally Posted by zakame (Post 5481781)
Yeah, some file-based IDS would do it. The way you describe it, it seems similar to what OpenBSD's security(8) script would output; perhaps worth checking out and refit for Slackware.

I will have a look at that. It has to be something that's not obtrusive and adds very little or no overhead to be useful.


Quote:

The other way to achieve some minimalism here would be to start from a base list of packages (e.g. something like what I did for building my Docker slackware image and add the packages you need, instead of pruning from a full Slackware install.
Is docker using containers? I have sworn off them until they are actually working as described in the docs. Which may be never.

Rinndalir 01-21-2016 02:25 PM

Quote:

Originally Posted by MarcT (Post 5484615)
Well, we still have DAT and LTO tape drives, so the magnetic tape (mt) packages are still relevant here.


I guess it's a viable option still. Has the technology changed at all? i.e. data densities, materials, speed, etc.?
I wish I had a DAT drive still. I have some data on DAT but no drive. Will have to take them somewhere.


All times are GMT -5. The time now is 06:00 AM.