Date: Tue, 18 Mar 2014 17:05:38 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@freebsd.org Subject: Re: An admin script to check missing dependencies Message-ID: <53287CE2.20209@infracaninophile.co.uk> In-Reply-To: <20140318155612.GA84624@bigb5.homeftp.net> References: <20140318155612.GA84624@bigb5.homeftp.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ko5TOoWHpqvt4P5KU8Ue4w9Ruf4RglOI0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/18/14 15:56, Minas Dasygenis wrote: > While I administer a number of FreeBSD Servers, I have faced the proble= m of an application > failing to start, due to a missing dynamic library dependency. Furtherm= ore, if this application > impacts the reputation of the server, then it is mandatory to fix it as= soon as possible. >=20 > The problem originates when I update a port [using portmaster], which i= nstalls a newer version of a library > [e.g. removes the library.so.10 and installs library.so.11]. In such ca= ses, applications > that demand the old library stop working. Usually an "ln -s library.so.= 11 library.so.10" > fixes the problem, but this means that an early detection is required. >=20 > To help myself [and other freebsd administrators], I have created a scr= ipt that I execute > it daily. This script checks all files on the system. If it finds a mis= sing dependency it reports > it to the user, as well as a possible fix if this is available. >=20 > This script is available at my home page at the miscellaneous section: >=20 > http://arch.icte.uowm.gr/mdasyg/misc/check_requisite_library_files.sh >=20 >=20 > I am executing it on every FreeBSD server and whenever a missing librar= y is found > I am notified via email. >=20 > Feel free to contribute any improvements via email and I will update it= =2E This sort of functionality is built into pkg(8) -- see the pkg-check(8) man page, particularly the bits about 'pkg check -b' which should be a lot quicker than your script. Of course 'pkg check' only covers stuff installed from packages, and it implies you're on a pkgngified machine. Using pkg(8) should, in any case, make it much harder to accidentally forget to install all the run-time dependencies you need. While pkg(8) currently really only covers stuff that's installed from the ports, that doesn't have to be the case. You can, in principle, create a pkg from any set of files on a machine -- at the moment, that's all pretty much down to manually generating a +MANIFEST file, until some kind person sits down and writes user tools to facilitate the process. Cheers, Matthew --Ko5TOoWHpqvt4P5KU8Ue4w9Ruf4RglOI0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJTKHzrXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTntJgQALc7hWH+LCOg5hvGLfwaMWEs w/SPfEmK66jbeTIudWaiN9+Ms4vlxrOUhMdOGocXXp8uV7yxU6vCsEFlqgqpF84S 4tL3FftP+qTDKqWCsOvIVAfDSyKTcvUCrNU4TUbUxopeODK73h3ElNV3zARBghRu PELjese0Z1EKbaagXrOZHu7IvMLxS73wczbzsFUGmcam9GnA0gVaVdlxHXnrlguj lOo4r4a6IyImG1nhoLIM7rkK5WTIv09GTAiuxJM92oV00mAisTwbHGfUUfPVuZHC 6bjLetyTfJ2TD8JN8JhMUNta65c3AodPZ4hAwhbOo/bbbhkjck3OuCvMbopmjxCh 5kuI5pq1skx9LHznfGzAWLem/gdnjJzp2EtLkh11GlAewCdC3FD0m6cdLZd0Raxz ku7mQv5Y+gjTFGwTrKOuva5wDkTv5m3AWcDUdCDZ/zz7sBrVNXT7QzQ9T39haKJ1 ojacPYzZo9o4JRWDj05+7BXOThF76nDFhx4Ogjb1ltoW3lVlA9sl460G1zrJKT2v AQ73qVvaaQCirgKkYUeWe0tmVYOF8G7S6bFrXRyfQEGLEazyOfor42RptnEZYjbh cNgUfu6/sBng/Gm8OA0B8GmpjhxV0KD4G98GdUWzVKZf3P63YEbHk6vIgPUXdfai txmBy1YeT+TXG5rphEer =K3ya -----END PGP SIGNATURE----- --Ko5TOoWHpqvt4P5KU8Ue4w9Ruf4RglOI0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53287CE2.20209>