Debian package management: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Johayek
mNo edit summary
imported>Johayek
Line 39: Line 39:
* https://unix.stackexchange.com/questions/9714/what-is-the-need-for-fakeroot-command-in-linux#9720
* https://unix.stackexchange.com/questions/9714/what-is-the-need-for-fakeroot-command-in-linux#9720


: # this command line creates a Debian package from an RPM package
=== alien --to-deb ... ===
: # (using that e-mail address for the package creator (?)).
this command line creates a Debian package from an RPM package<br/>
: # CAVEAT: won't actually work, because creating a Debian package requires running this as root
(using that e-mail address for the package creator (?)).<br/>
CAVEAT: won't actually work, because creating a Debian package requires running this as root
: $ env EMAIL='jochen.hayek@ext.COMPANY.com' alien --to-deb --keep-version ...
: $ env EMAIL='jochen.hayek@ext.COMPANY.com' alien --to-deb --keep-version ...
: # some command line parameters can only get passied to "alien" as environment variables
some command line parameters can only get passied to "alien" as environment variables.


: # you do not have root priviliges,
=== fakeroot ... ===
: # but you need to pretend to have them for achieving certain goals like creating a Debian package
you do not have root priviliges,<br/>
but you need to pretend to have them for achieving certain goals like creating a Debian package:
: $ fakeroot --unknown-is-real ...
: $ fakeroot --unknown-is-real ...


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 ===


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

Revision as of 09:45, 16 April 2018

# the Debian APT = Advanced Packaging Tool
# update and upgrade
$ 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 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
# 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 package creator (?)).
CAVEAT: won't actually work, because creating a Debian package requires running this as root

$ env EMAIL='jochen.hayek@ext.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: