Dpkg: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
m (Text replacement - "</source" to "</syntaxhighlight")
Line 4: Line 4:
<source lang=bash>
<source lang=bash>
# apt-key adv --keyserver keyserver.ubuntu.com --recv  <keyid>
# apt-key adv --keyserver keyserver.ubuntu.com --recv  <keyid>
</source>
</syntaxhighlight>




Line 12: Line 12:
<source lang=bash>
<source lang=bash>
$ echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
$ echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
</source>
</syntaxhighlight>


==Packages from a specific source==
==Packages from a specific source==
Line 18: Line 18:
<source lang=bash>
<source lang=bash>
sudo apt-get install dctrl-tools
sudo apt-get install dctrl-tools
</source>
</syntaxhighlight>
===Show packages===
===Show packages===
For example all PPA packages
For example all PPA packages
<source lang=bash>
<source lang=bash>
sudo grep-dctrl -sPackage . /var/lib/apt/lists/ppa*_Packages
sudo grep-dctrl -sPackage . /var/lib/apt/lists/ppa*_Packages
</source>
</syntaxhighlight>


==From where is my package installed?==
==From where is my package installed?==
<source lang=bash>
<source lang=bash>
sudo apt-cache policy <package>
sudo apt-cache policy <package>
</source>
</syntaxhighlight>


==Does my file match the checksum from the package?==
==Does my file match the checksum from the package?==
Line 35: Line 35:
<source lang=bash>
<source lang=bash>
sudo apt-get install debsums
sudo apt-get install debsums
</source>
</syntaxhighlight>
===Verify packages===
===Verify packages===
<source lang=bash>
<source lang=bash>
sudo debsums <package name>
sudo debsums <package name>
</source>
</syntaxhighlight>


<source lang=bash>
<source lang=bash>
Line 48: Line 48:
/usr/share/lintian/overrides/unhide.rb                                        OK
/usr/share/lintian/overrides/unhide.rb                                        OK
/usr/share/man/man8/unhide.rb.8.gz                                            OK
/usr/share/man/man8/unhide.rb.8.gz                                            OK
</source>
</syntaxhighlight>

Revision as of 17:53, 25 November 2021

Kategorie:Linux

Missing key id NO_PUBKEY

<source lang=bash>

  1. apt-key adv --keyserver keyserver.ubuntu.com --recv <keyid>

</syntaxhighlight>


Package source which resolves to IPv6 adresses causes sometimes problems

To force the usage of the returned IPv4 adresses do: <source lang=bash> $ echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4 </syntaxhighlight>

Packages from a specific source

Prequisite: dctrl-tools

<source lang=bash> sudo apt-get install dctrl-tools </syntaxhighlight>

Show packages

For example all PPA packages <source lang=bash> sudo grep-dctrl -sPackage . /var/lib/apt/lists/ppa*_Packages </syntaxhighlight>

From where is my package installed?

<source lang=bash> sudo apt-cache policy <package> </syntaxhighlight>

Does my file match the checksum from the package?

If you fear you are hacked verify your binaries!

Prequisite: debsums

<source lang=bash> sudo apt-get install debsums </syntaxhighlight>

Verify packages

<source lang=bash> sudo debsums <package name> </syntaxhighlight>

<source lang=bash> $ sudo debsums unhide.rb /usr/bin/unhide.rb OK /usr/share/doc/unhide.rb/changelog.Debian.gz OK /usr/share/doc/unhide.rb/copyright OK /usr/share/lintian/overrides/unhide.rb OK /usr/share/man/man8/unhide.rb.8.gz OK </syntaxhighlight>