Editing Debian package management
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== APT == | == APT == | ||
* the Debian [http://en.wikipedia.org/wiki/Advanced_Packaging_Tool APT = Advanced Packaging Tool] | * the Debian [http://en.wikipedia.org/wiki/Advanced_Packaging_Tool APT = Advanced Packaging Tool] | ||
** [http://en.wikipedia.org/wiki/Advanced_Packaging_Tool#Update.2C_upgrade_and_dist-upgrade update, upgrade, ...] | ** [http://en.wikipedia.org/wiki/Advanced_Packaging_Tool#Update.2C_upgrade_and_dist-upgrade update, upgrade, ...] | ||
* https://manpages.debian.org/unstable/apt/apt-get.8.en.html | * https://manpages.debian.org/unstable/apt/apt-get.8.en.html | ||
* https://manpages.debian.org/experimental/apt/apt-get.8.en.html | * https://manpages.debian.org/experimental/apt/apt-get.8.en.html | ||
=== APT: resynchronising the package index files from their sources === | |||
<pre>$ sudo apt-get update</pre> | <pre>$ sudo apt-get update</pre> | ||
=== APT: installing the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list === | |||
<pre> | <pre> | ||
$ sudo apt-get upgrade | $ sudo apt-get upgrade | ||
Line 57: | Line 15: | ||
</pre> | </pre> | ||
=== APT: removing ... === | |||
<pre> | <pre>$ sudo apt-get remove PACKAGE</pre> | ||
$ sudo apt-get remove PACKAGE | |||
</pre> | |||
== | == dpkg == | ||
* https://manpages.debian.org/unstable/ | * https://manpages.debian.org/unstable/dpkg/dpkg.1.en.html | ||
<pre> | === what's the official package name? === | ||
$ | <pre>$ dpkg --info PACKAGE.deb</pre> | ||
</pre> | |||
=== which files are included? will be created from this package file? === | |||
<pre>$ dpkg --contents PACKAGE.deb</pre> | |||
=== installing the Debian package === | |||
<pre>$ sudo dpkg --install PACKAGE.deb</pre> | <pre>$ sudo dpkg --install PACKAGE.deb</pre> | ||
== dpkg-query == | |||
* https://manpages.debian.org/unstable/dpkg/dpkg-query.1.en.html | * https://manpages.debian.org/unstable/dpkg/dpkg-query.1.en.html | ||
=== which packages are installed (together with a '''couple''' of details)? === | |||
<pre>$ dpkg-query --list</pre> | <pre>$ dpkg-query --list</pre> | ||
=== is there an installed package, that sounds like XYZ? === | |||
<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) === | |||
<pre>$ dpkg-query --list PACKAGE</pre> | <pre>$ dpkg-query --list PACKAGE</pre> | ||
=== all details of specified package === | |||
<pre>$ dpkg-query --status PACKAGE</pre> | <pre>$ dpkg-query --status PACKAGE</pre> | ||
=== what's the content of an installed package (e.g. PACKAGE) === | |||
<pre>$ dpkg-query --listfiles PACKAGE</pre> | <pre>$ dpkg-query --listfiles PACKAGE</pre> | ||
=== which installed package includes a certain FILE (utility, ...)? === | |||
<pre>$ dpkg-query --search FILE</pre> | <pre>$ dpkg-query --search FILE</pre> | ||
= | == dpkg-source -- Debian source package (.dsc) manipulation tool == | ||
= dpkg-source -- Debian source package (.dsc) manipulation tool = | |||
* https://manpages.debian.org/unstable/dpkg-dev/dpkg-source.1.en.html | * https://manpages.debian.org/unstable/dpkg-dev/dpkg-source.1.en.html | ||
Line 172: | Line 63: | ||
* *.orig.tar.* | * *.orig.tar.* | ||
= rpm2deb -- | == rpm2deb -- convert packages from ... to ... == | ||
* https://en.wikipedia.org/wiki/Rpm_(software) | * https://en.wikipedia.org/wiki/Rpm_(software) | ||
Line 181: | Line 72: | ||
* https://www.howtoforge.com/converting_rpm_to_deb_with_alien : alien -k ... ('''important''') | * https://www.howtoforge.com/converting_rpm_to_deb_with_alien : alien -k ... ('''important''') | ||
* https://unix.stackexchange.com/questions/9714/what-is-the-need-for-fakeroot-command-in-linux#9720 ('''important''') | * https://unix.stackexchange.com/questions/9714/what-is-the-need-for-fakeroot-command-in-linux#9720 ('''important''') | ||
== alien --to-deb ... == | === alien --to-deb ... === | ||
this command line creates a Debian package from an RPM package | this command line creates a Debian package from an RPM package | ||
(using that e-mail address for the (local Debian) package maintainer).<br/> | (using that e-mail address for the (local Debian) package maintainer).<br/> | ||
Line 190: | Line 80: | ||
some command line parameters can only get passed to "alien" as environment variables. | some command line parameters can only get passed to "alien" as environment variables. | ||
== fakeroot ... == | === fakeroot ... === | ||
you do not have root priviliges, | you do not have root priviliges, | ||
but you need to pretend to have them for achieving certain goals like creating a Debian package: | but you need to pretend to have them for achieving certain goals like creating a Debian package: | ||
<pre>$ fakeroot ...</pre> | <pre>$ fakeroot --unknown-is-real ...</pre> | ||
== special issues == | === special issues === | ||
=== fiddling with the tree before creating the .deb === | ==== fiddling with the tree before creating the .deb ==== | ||
<pre>$ env EMAIL='john.doe@COMPANY.com' alien --to-deb --keep-version ... | Because you actually do create real files (to be owned by root), you now do need to make use of sudo instead of only fakeroot: | ||
<pre>$ sudo env EMAIL='john.doe@COMPANY.com' alien --to-deb --keep-version ... | |||
$ cd ... | $ cd ... | ||
# here you want to change a few bits | # here you want to change a few bits | ||
$ sudo | $ sudo env EMAIL='john.doe@COMPANY.com' debian/rules binary | ||
</pre> | </pre> | ||
== open questions == | === open questions === | ||
* how to deal with dependencies specified within the RPM package? | * how to deal with dependencies specified within the RPM package? | ||
* … | * … | ||
= history of this article = | == history of this article == | ||
This blog article got created 1st, but then the content got moved here to the wiki: | This blog article got created 1st, but then the content got moved here to the wiki: |