Re: How to query the package owning the file? (no packahe manger installed)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Prasad Pillarisetti <prasad.pillarisetti@xxxxxxxxx>
> Guys recently I had this question asked in a technical interview.
> How do I find out the package owning a particular file, when no
> package managers are installed?

Impossible.
I think he didn't know what he was talking about.

He might have mistakenly been looking for...
1.  Find the tarball on the system
2.  Find the source directory of the system (/usr/local/src)?
3.  Use Checkinstall (build package from tarball build)
4.  Use rpmbuild -t to look inside of a tarball for SPEC files
5.  Others?

I guess I just had to be there.

> I am assuimg SRPMs are used to install the software?

An rpm -i blah.src.rpm merely dumps things into /usr/src/redhat.
You go through the SPEC, SOURCE, etc... subdirectories.

> Is this actually possible?
> Install the Linux OS without a package manager?

Of course!

There are "packages"** distros like Debian, Fedora, etc... based.
And then there are "tarball" distros with some meta-data** in the
tarballs, such as Slackware.

[ SIDE NOTE:  Both DPKG and RPM are System V cpio archives,
pretty much the same USTAR format as tar itself, but use 5KiB
blocking instead of 10KiB blocking by default. ]

Newer to Linux (but no stranger to BSD) are "ports" distros,
such as Gentoo.  It uses a centralized build system whereby
instead of a "package manager" that creates the SPEC (RPM)
file, config/Makefile and other commands and bundles it into
a single file, the "ports" repository (e.g., Gentoo's portage)
just gives you basic Makefiles and other meta-data, and you
actually fetch the software.

> I know "rpm -qf filename" gives the package owning the file.
> But how to get the package name when I don't have any
> package manager?  Maybe this was a question to rattle me?

Of course.
People do it all-the-time.


--
Bryan J. Smith   mailto:b.j.smith@xxxxxxxx


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux