Debian package management: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Johayek
mNo edit summary
imported>Johayek
mNo edit summary
Line 19: Line 19:
which files are included? will be created from this package file?
which files are included? will be created from this package file?
<pre>$ dpkg --contents PACKAGE.deb</pre>
<pre>$ dpkg --contents PACKAGE.deb</pre>
...
<pre>$ ...</pre>


== dealing with installed packages ==
== dealing with installed packages ==
Line 29: Line 26:
* https://www.systutorials.com/docs/linux/man/1-dpkg-query/
* https://www.systutorials.com/docs/linux/man/1-dpkg-query/


which packages are installed (together with details)?
which packages are installed (together with a '''couple''' of details)?
<pre>$ dpkg-query --list</pre>
<pre>$ dpkg-query --list</pre>


Line 35: Line 32:
<pre>$ dpkg-query --list | fgrep XYZ</pre>
<pre>$ dpkg-query --list | fgrep XYZ</pre>


details of an installed package (that you know the name of, e.g. PACKAGE)
details of an installed package (that you know the name of, e.g. PACKAGE):
<pre>$ dpkg-query --list PACKAGE</pre>
<pre>$ dpkg-query --list PACKAGE</pre>
all details of specified package:
<pre>$ dpkg-query --status PACKAGE</pre>


what's the content of an installed package (e.g. PACKAGE)?
what's the content of an installed package (e.g. PACKAGE)?
<pre>$ dpkg-query --listfiles PACKAGE</pre>
<pre>$ dpkg-query --listfiles PACKAGE</pre>
...
<pre>$ ...</pre>


== rpm2deb ==
== rpm2deb ==

Revision as of 11:40, 23 April 2018

APT

$ sudo apt-get update  # update is used to resynchronize the package index files from their sources
$ sudo apt-get upgrade # upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list

dealing with packages files (.deb)

what's the official package name?

$ dpkg --info PACKAGE.deb

which files are included? will be created from this package file?

$ dpkg --contents PACKAGE.deb

dealing with installed packages

which packages are installed (together with a couple of details)?

$ dpkg-query --list

is there an installed package, that sounds like XYZ?

$ dpkg-query --list | fgrep XYZ

details of an installed package (that you know the name of, e.g. PACKAGE):

$ dpkg-query --list PACKAGE

all details of specified package:

$ dpkg-query --status PACKAGE

what's the content of an installed package (e.g. PACKAGE)?

$ dpkg-query --listfiles PACKAGE

rpm2deb

alien --to-deb ...

this command line creates a Debian package from an RPM package (using that e-mail address for the (local Debian) package maintainer).
CAVEAT: won't actually work, because creating a Debian package requires running this as root

$ env EMAIL='john.doe@COMPANY.com' alien --to-deb --keep-version ...

some command line parameters can only get passied to "alien" as environment variables.

fakeroot ...

you do not have root priviliges, but you need to pretend to have them for achieving certain goals like creating a Debian package:

$ fakeroot --unknown-is-real ...

open questions

  • how to deal with dependencies specified within the RPM package?

history of this article

The blog article got created 1st, but then the content got moved here: