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 == | ||
Line 15: | Line 10: | ||
* https://manpages.debian.org/unstable/apt/apt-cache.8.en.html | * https://manpages.debian.org/unstable/apt/apt-cache.8.en.html | ||
=== apt-get -- APT package handling utility -- command-line interface === | === apt-get -- APT package handling utility -- command-line interface === | ||
Line 35: | Line 19: | ||
<pre>$ sudo apt-get update</pre> | <pre>$ sudo apt-get update</pre> | ||
=== APT: installing ... ==== | |||
<pre> | <pre> | ||
$ sudo apt-get install PACKAGE | $ sudo apt-get install PACKAGE | ||
Line 46: | Line 30: | ||
# just download it to the cache directory being specified (instead of /var/cache/apt/archives/): | # just download it to the cache directory being specified (instead of /var/cache/apt/archives/): | ||
$ sudo apt-get install --download-only --option dir::cache=$HOME/tmp PACKAGE | $ sudo apt-get install --download-only --option dir::cache=$HOME/tmp PACKAGE | ||
</pre> | </pre> | ||
Line 72: | Line 53: | ||
In case of an optional resp. alternate dependency that's not shown (clearly). | In case of an optional resp. alternate dependency that's not shown (clearly). | ||
== dpkg, dpkg-query, dpkg-deb == | == dpkg, dpkg-query, dpkg-deb == | ||
Line 85: | Line 60: | ||
* https://manpages.debian.org/unstable/dpkg/dpkg.1.en.html | * https://manpages.debian.org/unstable/dpkg/dpkg.1.en.html | ||
==== | ==== what's the official package name? ==== | ||
<pre>$ | <pre>$ dpkg --info PACKAGE.deb</pre> | ||
==== which files are included? will be created from this package file? ==== | ==== which files are included? will be created from this package file? ==== | ||
<pre>$ dpkg | <pre>$ dpkg --contents PACKAGE.deb</pre> | ||
==== | ==== installing the Debian package ==== | ||
<pre>$ dpkg- | <pre>$ sudo dpkg --install PACKAGE.deb</pre> | ||
=== dpkg-query === | === dpkg-query === | ||
Line 145: | Line 88: | ||
<pre>$ dpkg-query --listfiles PACKAGE</pre> | <pre>$ dpkg-query --listfiles PACKAGE</pre> | ||
==== | ==== which installed package includes a certain FILE (utility, ...)? ==== | ||
<pre>$ dpkg-query -- | <pre>$ dpkg-query --search FILE</pre> | ||
=== | === dpkg-deb -- Debian package archive (.deb) manipulation tool === | ||
* https://manpages.debian.org/unstable/dpkg/dpkg-deb.1.en.html | |||
'''dpkg-deb''' packs, unpacks and provides information about Debian archives. | |||
Use '''dpkg''' to install and remove packages from your system. | |||
= dpkg-source -- Debian source package (.dsc) manipulation tool = | = dpkg-source -- Debian source package (.dsc) manipulation tool = | ||
Line 181: | Line 118: | ||
* 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 ... == | ||
Line 193: | Line 129: | ||
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> | ||