<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Deb</id>
	<title>Deb - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Deb"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Deb&amp;action=history"/>
	<updated>2026-05-07T03:51:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Deb&amp;diff=5791&amp;oldid=prev</id>
		<title>Kenneth: /* building a deb package */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Deb&amp;diff=5791&amp;oldid=prev"/>
		<updated>2020-12-17T18:40:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;building a deb package&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== building a deb package ==&lt;br /&gt;
&lt;br /&gt;
Good looking articles:&lt;br /&gt;
*[http://www.linuxdevices.com/articles/AT8047723203.html How to make deb packages]&lt;br /&gt;
*[http://www.debian.org/doc/maint-guide/ Debian New Maintainers&amp;#039; Guide]&lt;br /&gt;
*[http://women.debian.org/wiki/English/BuildingWithoutHelper English/BuildingWithoutHelper - Debian Women Wiki]&lt;br /&gt;
*[http://tldp.org/HOWTO/html_single/Debian-Binary-Package-Building-HOWTO/ Debian Binary Package Building HOWTO]&lt;br /&gt;
*[http://www.debian-administration.org/articles/336 Rolling your own Debian packages (part 1)]&lt;br /&gt;
*[http://www.linux.com/articles/60383 Linux.com :: Make your own packages for Debian-based systems]&lt;br /&gt;
*[http://www.falkotimme.com/howtos/checkinstall/ Creating .deb-Packages With Checkinstall - FalkoTimme.com]&lt;br /&gt;
*[http://ubuntuforums.org/showthread.php?t=2356 HOW TO: Using checkinstall for sources - Ubuntu Forums]&lt;br /&gt;
&lt;br /&gt;
=== Build deb ===&lt;br /&gt;
&lt;br /&gt;
Create deb:&lt;br /&gt;
 dpkg -b [DIR]&lt;br /&gt;
 # creates: [DIR].deb&lt;br /&gt;
&lt;br /&gt;
Create deb with target name:&lt;br /&gt;
 dpkg -b [DIR] [NAME].deb&lt;br /&gt;
 # creates: [NAME].deb&lt;br /&gt;
&lt;br /&gt;
Package layout:&lt;br /&gt;
 [DIR]/&lt;br /&gt;
   /etc/myfile&lt;br /&gt;
   #...etc...&lt;br /&gt;
   DEBIAN/control    # REQUIRED, similar to RPM spec file&lt;br /&gt;
   DEBIAN/postinst   # pre/post scripts&lt;br /&gt;
&lt;br /&gt;
Maintainer scripts - {pre,post}{inst,rm}&lt;br /&gt;
 DEBIAN/postinst&lt;br /&gt;
 DEBIAN/preinst&lt;br /&gt;
 DEBIAN/postrm&lt;br /&gt;
 DEBIAN/prerm&lt;br /&gt;
&lt;br /&gt;
NOTE: Comments do not appear to be allowed in DEBIAN/control.&lt;br /&gt;
&lt;br /&gt;
DEBIAN/control: (minimal with warning)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Package: deb1&lt;br /&gt;
Version: 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DEBIAN/control: (minimal no warnings)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Package: ken1&lt;br /&gt;
Version: 1.0&lt;br /&gt;
Architecture: somearch&lt;br /&gt;
Maintainer: Kenneth &amp;lt;kenneth@gmail.com&amp;gt;&lt;br /&gt;
Description: This is a description with&lt;br /&gt;
        multiple lines&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DEBIAN/control:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Package: deb1&lt;br /&gt;
Version: 1.0&lt;br /&gt;
Section: web&lt;br /&gt;
Priority: optional&lt;br /&gt;
Architecture: all&lt;br /&gt;
Essential: no&lt;br /&gt;
Maintainer: Joe Brockmeier [jzb@dissociatedpress.net]&lt;br /&gt;
Provides: deb1&lt;br /&gt;
Description: The description can contain free-form text&lt;br /&gt;
             describing the function of the program, what&lt;br /&gt;
             kind of features it has, and so on.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Debian repo archive is divided into multiple areas: main (the free software), non-free (the not really free software) and contrib (free software that depends on non-free software)&lt;br /&gt;
&lt;br /&gt;
== CheckInstall ==&lt;br /&gt;
&lt;br /&gt;
 apt install checkinstall&lt;br /&gt;
&lt;br /&gt;
See [[Linux/CheckInstall]]&lt;br /&gt;
&lt;br /&gt;
ref: https://wiki.debian.org/CheckInstall&lt;br /&gt;
&lt;br /&gt;
==deb vs rpm==&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;I&amp;#039;m wondering if anyone could please tell me the differences in these two software formats and why that data makes one better than another (or perhaps makes them the same).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;I don&amp;#039;t think one is superior than the other. They are quite similar in functionality and have the same pros and limitations e.g. you have to resolve dependencies manually when installing rpms with rpm and debs with dpkg. What tends to differ is the wrappers around rpm and dpkg which provide additional functionality e.g automatic dependency checking and resolution. On most Debian based distros, apt and its related tools are the preferred wrapper and on rpm based distros, there is a wider selection e.g. yum, urpmi, yast, smart, apt etc. For years apt was the superior tool because it had a few years head start, but tools like yum, urpmi and SMART have caught up and have more or less the same features as apt.&lt;br /&gt;
&lt;br /&gt;
:The debates you see on the net about rpm vs deb, tend to be really flawed because a lot of people compare apt vs rpm instead of comparing rpm vs dpkg. Apt can be used with rpm based distros so its not unique to Debian based distros. Its just that many rpm based distros don&amp;#039;t use it by default.&amp;quot; ([http://www.linuxforums.org/forum/linux-newbie/93595-deb-vs-rpm.html *.deb vs *.rpm - Linux Forums])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;Debian&amp;#039;s package system is often considered superior to RPMs. IMHO, this is not because of technical reasons. In fact, Debian&amp;#039;s advantage (with respect to packaging) comes from 2 issues outside of the packaging system:&lt;br /&gt;
:- apt-get. Whenever you want to install a .deb, you&amp;#039;ll get it - and its dependencies from the Debian archive. (Debian packages &amp;quot;in the wild&amp;quot; - outside of Debian or related distributions - are rare.)&lt;br /&gt;
:- The Debian policy. Becoming a Debian developer requires one to agree to a &amp;quot;contract&amp;quot;. Errors against the policy have a very high priority in the bug tracking system.&lt;br /&gt;
:Red Hat on the other hand never enforced such a policy for RPMs. Their package format was adopted by many distributions and independent programmers, each using their own conventions. And this makes it difficult to mix packages from different sources.&amp;quot; [http://www.linuxtoday.com/news_story.php3?ltsn=2002-06-17-005-26-OP-SW-0012]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;The packaging policies have nothing to do with it. The mechanism to create a DEB package is more powerful, understandable, and flexible than the mechanism to create an RPM package.&amp;quot; ([http://lwn.net/Articles/223183/ RPM vs DEB on technical merits alone. [LWN.net]])&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
Install deb package:&lt;br /&gt;
 dpkg -i [package].deb&lt;br /&gt;
&lt;br /&gt;
Remove package:&lt;br /&gt;
 dpkg -r [package]&lt;br /&gt;
&lt;br /&gt;
Show package information:&lt;br /&gt;
 dpkg -I [package].deb&lt;br /&gt;
&lt;br /&gt;
Show required dependencies:&lt;br /&gt;
 dpkg -P [package].deb  # TODO: verify verify&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Extract control files ==&lt;br /&gt;
&lt;br /&gt;
DEB files are ar archives, which contain three files:&lt;br /&gt;
 debian-binary&lt;br /&gt;
 control.tar.gz&lt;br /&gt;
 data.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extract deb files:&lt;br /&gt;
 ar vx [PACKAGE].deb&lt;br /&gt;
 tar -tzvf control.tar.gz  # list files&lt;br /&gt;
 tar -zvxf control.tar.gz&lt;br /&gt;
&lt;br /&gt;
Extra data files:&lt;br /&gt;
 cat data.tar.xz | xz -d | tar -xv&lt;br /&gt;
&lt;br /&gt;
One liner:&lt;br /&gt;
 ar p [PACKAGE].deb control.tar.gz | tar zx&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* How to extract RPM or DEB packages - http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/&lt;br /&gt;
&lt;br /&gt;
== rpm to deb commands ==&lt;br /&gt;
&lt;br /&gt;
Install package:&lt;br /&gt;
 rpm -Uvh [PACKAGE].rpm&lt;br /&gt;
 dpkg -i [PACKAGE].deb&lt;br /&gt;
&lt;br /&gt;
Remove package:&lt;br /&gt;
 rpm -e [PACKAGE]&lt;br /&gt;
 dpkg -r [PACKAGE]&lt;br /&gt;
&lt;br /&gt;
Package info:&lt;br /&gt;
 rpm --info [PACAKGE].rpm&lt;br /&gt;
 dpkg -I [PACKAGE].deb&lt;br /&gt;
&lt;br /&gt;
List install package files:&lt;br /&gt;
 rpm -qvl [PACKAGE]&lt;br /&gt;
 dpkg -L [PACKAGE]&lt;br /&gt;
&lt;br /&gt;
List deb package files:&lt;br /&gt;
 rpm -qvlp [PACKAGE].rpm&lt;br /&gt;
 dpkg -c [PACAKGE].deb&lt;br /&gt;
&lt;br /&gt;
List installed packages:&lt;br /&gt;
 rpm -qa&lt;br /&gt;
 dpkg -l&lt;br /&gt;
&lt;br /&gt;
Extract files from deb package:&lt;br /&gt;
 rpm2cpio [PACAKGE].rpm | cpio -dmvi&lt;br /&gt;
 dpkg -x [PACKAGE].deb [TARGETFOLDER]&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>