ldd /usr/bin/programma |grep "not found"
A quel punto sapiiamo quali files mancano, ma non conosciamo ancora a quale pacchetto apperengono tali files e quindi occorre fare qualche ricerca per capire cosa installare.
Porto ad esempio un sito che permette di risolvere agevolmente (si potrebbe anche fare qualcosa di meglio forse ma va bè)questo problema:
http://packages.slackware.it/
A questo indirizzo vi è un motore di ricerca che permette di trovare il pacchetto a cui appartiene un certo file (pattern di ricerca). Da ciò risulta piuttosto semplice capire quale sia il pacchetto da installare in caso di librerie mancanti.
Purtroppo il sito sopracitato consente la ricerca tra i soli pacchetti ufficiali, quindi se la libreria necessaria sta in un pacchetto per esempio di slacky.eu, non si trova....bisognoa ricorrere a google...che comunque restituisce sempre qualche risultato.
Mi chiedevo se si potesse predisporre un motore di ricerca del genere anche per il repository di slacky.eu.
Francamente io non ho esperienza di database e non conosco le problematicità che potrebbero venirne fuori.
A me piacciono paarecchio le cose semplici...
E l'idea che mi viene per realizzare un sistema del genere potrebbe passare per la registrazione su semplici files di testo dei files presenti in un pacchetto.
Si potrebbe pubblicare nel repository un grosso file di testo da scaricari in locale:
su ogni riga troviamo:
nome_software/usr/bin/file1
nome_software/usr/lib/file2
ecc
insomma in pratica la stampa dell'explodepkg di quel pacchetto. La cosa importante è appunto che il "campo" nome_software ci sia.
Avendo in mano un tale file diventa semplice dare:
grep lbreria_mancante slacky.repo.files.txt
e salta fuori il "nome_software" che corrisponde al pacchetto da installare per avere la libreria mancante.
Insomma, io lancio l'idea, e ho pensato di aggiungere qualche qualche proposta pratica. Che non è detto essere la scelta migliore.
Ho postato in questa sezione perchè alla fine rigurada il repo dei pacchetti e soprattutto perchè occorrerebbe aggiungere eventualmente tale file di testo, magari ben compresso al repo stesso.
Esempio buttato lì:
In una directory ho dei pacchetti tgz, voglio creare un file di testo contente l'explode dei pacchetti: Nel mio caso ho solo due pacchetti rtorrent e libtorrent:
Codice: Seleziona tutto
$ ls
libtorrent-rt-0.11.9-i486-1bj.tgz rtorrent-0.7.9-i486-1bj.tgz
$ for PKG in $(ls *tgz); do tar -tzf $PKG| sed 's/^/'$PKG' /'; done > list.txt
$ cat list.txt
libtorrent-rt-0.11.9-i486-1bj.tgz ./
libtorrent-rt-0.11.9-i486-1bj.tgz usr/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/NEWS
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/TODO
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/README
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/slack-desc
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/AUTHORS
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/INSTALL
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/libtorrent-rt.SlackBuild
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/ChangeLog
libtorrent-rt-0.11.9-i486-1bj.tgz usr/doc/libtorrent-rt-0.11.9/COPYING
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/libtorrent.so.10.0.8
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/libtorrent.la
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/pkgconfig/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/pkgconfig/libtorrent.pc
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/file_manager.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/file_utils.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/file_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/block_transfer.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/block_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/transfer_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/file.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/file_list_iterator.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/piece.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/data/block.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/peer_info.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/peer_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/client_info.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/client_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/peer/peer.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/resume.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/download.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/tracker_list.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/error.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/event.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/chunk_manager.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/bitfield.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/common.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/hash_string.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/http.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/object_stream.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/path.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/poll.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/rate.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/poll_kqueue.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/poll_select.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/object.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/poll_epoll.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/torrent.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/exceptions.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/tracker.h
libtorrent-rt-0.11.9-i486-1bj.tgz usr/include/torrent/connection_manager.h
libtorrent-rt-0.11.9-i486-1bj.tgz install/
libtorrent-rt-0.11.9-i486-1bj.tgz install/doinst.sh
libtorrent-rt-0.11.9-i486-1bj.tgz install/slack-desc
libtorrent-rt-0.11.9-i486-1bj.tgz install/slack-required
rtorrent-0.7.9-i486-1bj.tgz ./
rtorrent-0.7.9-i486-1bj.tgz usr/
rtorrent-0.7.9-i486-1bj.tgz usr/bin/
rtorrent-0.7.9-i486-1bj.tgz usr/bin/rtorrent
rtorrent-0.7.9-i486-1bj.tgz usr/doc/
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/TODO
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/rtorrent.rc
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/README
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/faq.xml
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/slack-desc
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/rtorrent.SlackBuild
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/AUTHORS
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/INSTALL
rtorrent-0.7.9-i486-1bj.tgz usr/doc/rtorrent-0.7.9/COPYING
rtorrent-0.7.9-i486-1bj.tgz usr/man/
rtorrent-0.7.9-i486-1bj.tgz usr/man/man1/
rtorrent-0.7.9-i486-1bj.tgz usr/man/man1/rtorrent.1.gz
rtorrent-0.7.9-i486-1bj.tgz install/
rtorrent-0.7.9-i486-1bj.tgz install/slack-desc
rtorrent-0.7.9-i486-1bj.tgz install/slack-required
Codice: Seleziona tutto
$ grep libtorrent.so.10.0.8 list.txt
libtorrent-rt-0.11.9-i486-1bj.tgz usr/lib/libtorrent.so.10.0.8
Ovviamente il pattern di ricerca da usare con grep dovrà essere ponderato, avrei per esempio potuto cercare solo libtorrent.
Lascio a voi commenti sull'utilità/fattibilità della pubblicazione di un file di testo del genere per il repository (magari un file per ogni release di slackware ospitata qui). O per altre proposte alternative.

