Jump to content

Debian Packaging - Part 2


castix

6 posts in this topic

Recommended Posts

What is a Debian control file
 

 

Specifics regarding the contents of a Debian control file are provided in the Debian Policy Manual

Briefly, a sample control file is shown below for the Debian package Test:

Package: Test
Priority: optional
Section: devel
Installed-Size: 45
Maintainer: castix <[email protected]>
Architecture: iphoneos
Version: 1.3-16
Depends: libc6 (>= 2.1)
Description: The classic greeting, and a good example The GNU hello program produces a familiar, friendly greeting.  It
             allows nonprogrammers to use a classic computer science tool which
             would otherwise be unavailable to them.

Seriously, though: this is an example of how to do a Debian package. It is the Debian version of the GNU Project's `hello world' program (which is itself an example for the GNU Project).

The Package field gives the package name.  This is the name by which the package can be manipulated by the package tools, and usually similar to but not necessarily the same as the first component string in the Debian archive file name. The Version field gives both the upstream developer's version number and (in the last component) the revision level of the Debian package of this program. The Architecture field specifies the chip for which this particular binary was compiled. The Depends field gives a list of packages that have to be installed in order to install this package successfully. The Installed-Size indicates how much disk space the installed package will consume.  This is intended to be used by installation front-ends in order to show whether there is enough disk space available to install the program. The Section line gives the "section" where this Debian package is stored at the Debian FTP sites. The Priority indicates how important is this package for installation, so that semi-intelligent software like dselect or aptitude can sort the package into a category of e.g.  packages optionally installed. The Maintainer field gives the e-mail address of the person who is currently responsible for maintaining this package. The Description field gives a brief summary of the package's features.

 

 

 

 


What is a Debian conffile


Conffiles is a list of configuration files (usually placed in `/etc') that the package management system will not overwrite when the package is upgraded.  This ensures that local values for the contents of these files will be preserved, and is a critical feature enabling the in-place upgrade of packages on a running system.

To determine exactly which files are preserved during an upgrade, run:

  dpkg --status package

And look under "Conffiles:".
 

 

 

 

 

 

What is a Debian preinst, postinst, prerm, and postrm script


These files are executable scripts which are automatically run before or after a package is installed.  Along with a file named `control', all of these files are part of the "control" section of a Debian archive file.

The individual files are:

preinst This script executes before that package will be unpacked from its Debian archive (".deb") file.  Many 'preinst' scripts stop services for packages which are being upgraded until their installation or upgrade is completed (following the successful execution of the 'postinst' script).

 

postinst This script typically completes any required configuration of the package `foo' once `foo' has been unpacked from its Debian archive (".deb") file.  Often, 'postinst' scripts ask the user for input, and/or warn the user that if he accepts default values, he should remember to go back and re-configure that package as the situation warrants.  Many 'postinst' scripts then execute any commands necessary to start or restart a service once a new package has been installed or upgraded.

prerm This script typically stops any daemons which are associated with a package.  It is executed before the removal of files associated with the package.

postrm This script typically modifies links or other files associated with `foo', and/or removes files created by the package. 

 

Currently all of the control files can be found in directory `/var/lib/dpkg/info'.  The files relevant to package `foo' begin with the name "foo" and have file extensions of "preinst", "postinst", etc., as appropriate.  The file `foo.list' in that directory lists all of the files that were installed with the package `foo'.  (Note that the location of these files is a dpkg internal; you should not rely on it.)

 

 

 

 

 

 

What is an Essential, Required, Important, Standard, Optional, or Extra package
 

 

Each Debian package is assigned a priority by the distribution maintainers, as an aid to the package management system.  The priorities are:

▪ Required: packages that are necessary for the proper functioning of the system. This includes all tools that are necessary to repair system defects.  You must not remove these packages or your system may become totally broken and you may probably not even be able to use dpkg to put things back.  Systems with only the Required packages are probably unusable, but they do have enough functionality to allow the sysadmin to boot and install more software.

▪ Important packages should be found on any Unix-like system. Other packages which the system will not run well or be usable without will be here.  This does NOT include Emacs or X or TeX or any other large applications.  These packages only constitute the bare infrastructure.


▪ Standard packages are standard on any Linux system, including a reasonably small but not too limited character-mode system. Tools are included to be able to browse the web (using w3m), send e-mail (with mutt) and download files from FTP servers. This is what will install by default if users do not select anything else.  It does not include many large applications, but it does include the Python interpreter and some server software like OpenSSH (for remote administration), Exim (for mail delivery, although it can be configured for local delivery only), an identd server (pidentd) and the RPC portmapper (`portmap'). It also includes some common generic documentation that most users will find helpful.

 

▪ Optional packages include all those that you might reasonably want to install if you did not know what it was, or do not have specialized requirements. This includes X, a full TeX distribution, and lots of applications.

▪ Extra: packages that either conflict with others with higher priorities, are only likely to be useful if you already know what they are, or have specialized requirements that make them unsuitable for "Optional". If you do a default Debian installation all the packages of priority Standard or higher will be installed in your system.  If you select pre-defined tasks you will get lower priority packages too. Additionally, some packages are marked as Essential since they are absolutely necessary for the proper functioning of the system.  The package management tools will refuse to remove these.

 

 

 

 

 

 

 

What is meant by saying that a package Depends, Recommends,Suggests, Conflicts, Replaces, Breaks or Provides another package


The Debian package system has a range of package "dependencies" which are designed to indicate (in a single flag) the level at which Program A can operate independently of the existence of Program B on a given system:

▪ Package A depends on Package B if B absolutely must be installed in order to run A.  In some cases, A depends not only on B, but on a version of B.  In this case, the version dependency is usually a lower limit, in the sense that A depends on any version of B more recent than some specified version.

▪ Package A recommends Package B, if the package maintainer judges that most users would not want A without also having the functionality provided by B.

▪ Package A suggests Package B if B contains files that are related to (and usually enhance) the functionality of A.

▪ Package A conflicts with Package B when A will not operate if B is installed on the system.  Most often, conflicts are cases where A contains files which are an improvement over those in B. "Conflicts" are often combined with "replaces".

▪ Package A replaces Package B when files installed by B are removed and (in some cases) over-written by files in A.


▪ Package A breaks Package B when both cannot packages cannot be simultaneously configured in a system.  The package management system will refuse to install one if the other one is already installed and configured in the system.

▪ Package A provides Package B when all of the files and functionality of B are incorporated into A.  This mechanism provides a way for users with constrained disk space to get only that part of package A which they really need.

 

 

 

 

 

 

What is meant by Pre-Depends


"Pre-Depends" is a special dependency.  In the case of most packages, `dpkg' will unpack its archive file (i.e., its `.deb' file) independently of whether or not the files on which it depends exist on the system.  Simplistically, unpacking means that `dpkg' will extract the files from the archive file that were meant to be installed on your file system, and put them in place.  If those packages depend on the existence of some other packages on your system, `dpkg' will refuse to complete the installation (by executing its "configure" action) until the other packages are installed. However, for some packages, `dpkg' will refuse even to unpack them until certain dependencies are resolved.  Such packages are said to "Pre-depend" on the presence of some other packages.  The Debian project provided this mechanism to support the safe upgrading of systems from `a.out' format to `ELF' format, where the order in which packages were unpacked was critical.  There are other large upgrade situations where this method is useful, e.g.  the packages with the required priority and their LibC dependency. As before, more detailed information about this can be found in the Policy manual.
 

 

 

 

 

 

What is meant by unknown, install, remove, purge and hold in the package status


These "want" flags tell what the user wanted to do with a package (as indicated either by the user's actions in the "Select" section of `dselect', or by the user's direct invocations of `dpkg').

Their meanings are:

▪ unknown - the user has never indicated whether he wants the package

▪ install - the user wants the package installed or upgraded

▪ remove - the user wants the package removed, but does not want to remove any existing configuration files.

▪ purge - the user wants the package to be removed completely, including its configuration files.

▪ hold - the user wants this package not to be processed, i.e., he wants to keep the current version with the current status whatever that is.

 

 

 

 

 

 

 

How do I install a source package


Debian source packages can't actually be "installed", they are just unpacked in whatever directory you want to build the binary packages they produce. Source packages are distributed on most of the same mirrors where you can obtain the binary packages.  If you set up your APT's sources.list(5) to include the appropriate "deb-src" lines, you'll be able to easily download any source packages by running

apt-get source foo

To help you in actually building the source package, Debian source package provide the so-called build-dependencies mechanism.  This means that the source package maintainer keeps a list of other packages that are required to build their package.  To see how this is useful, run

apt-get build-dep foo

before building the source.

 

 

 

 

 

 

How do I build binary packages from a source package


The preferred way to do this is by using various wrapper tools. I'll show how it's done using the `devscripts' tools.  Install this package if you haven't done so already.

Now, first get the source package:

apt-get source foo

and change to the source tree:

cd foo-*

Then install needed build-dependencies (if any):

sudo apt-get build-dep foo

Then create a dedicated version of your own build (so that you won't get confused later when Debian itself releases a new version)

dch -l local 'Blah blah blah'

And finally build your package

debuild -us -uc

If everything worked out fine, you should now be able to install your package by running

sudo dpkg -i ../*.deb

If you prefer to do things manually, and don't want to use `devscripts', follow this procedure:

You will need all of foo*.dsc, foo*.tar.gz and foo*.diff.gz to compile the source (note: there is no .diff.gz for some packages that are native to Debian). Once you have them, if you have the `dpkg-dev' package installed, the following command:

dpkg-source -x foo_version-revision.dsc

will extract the package into a directory called `foo-version'. If you want just to compile the package, you may cd into `foo-version' directory and issue the command

dpkg-buildpackage -rfakeroot -b

to build the package (note that this also requires the `fakeroot' package), and then

dpkg -i ../foo_version-revision_arch.deb

to install the newly-built package(s).

 

 

 

As always thanks for reading, 

 

castix

 

Link to comment
https://iosgods.com/topic/5660-debian-packaging-part-2/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Golden Desire: Fantasy Romance v1.0.2 +1 Jailed Cheat [ Free Premium Choices ]
      Modded/Hacked App: Golden Desire: Fantasy Romance By Storytaco.inc
      Bundle ID: com.storytaco.c20client
      iTunes Store Link: https://apps.apple.com/us/app/golden-desire-fantasy-romance/id6738368127?uo=4


      Hack Features:
      - Free Premium Choices


      Jailbreak required hack(s): [Mod Menu Hack] Golden Desire: Fantasy Romance v1.0.2 +1 Cheat [ Free Premium Choices ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 0 replies
    • Golden Desire: Fantasy Romance v1.0.2 +1 Cheat [ Free Premium Choices ]
      Modded/Hacked App: Golden Desire: Fantasy Romance By Storytaco.inc
      Bundle ID: com.storytaco.c20client
      iTunes Store Link: https://apps.apple.com/us/app/golden-desire-fantasy-romance/id6738368127?uo=4


      Hack Features:
      - Free Premium Choices


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Golden Desire: Fantasy Romance v1.0.2 +1 Jailed Cheat [ Free Premium Choices ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 0 replies
    • Darts Club v5.8.6 +28 Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Darts Club By BoomBit, Inc.
      Bundle ID: com.boombitgames.DartsClub
      iTunes Store Link: https://apps.apple.com/us/app/darts-club/id1389760587?uo=4


      Hack Features:
      - Unlimited Currencies
      - Debug Menu -> Head into Settings and toggle the DEBUG button. [ VIP ]
      -> Add Soft
      -> Add Hard
      -> Add Trophies
      -> Unlock All Parts/Emotes/Vanities/Wild Items
      + More!


      Jailbreak required hack(s): [Mod Menu Hack] Darts Club v5.8.6 +28 Cheats [ Debug Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 0 replies
    • Darts Club v5.8.6 +28 Cheats [ Debug Menu ]
      Modded/Hacked App: Darts Club By BoomBit, Inc.
      Bundle ID: com.boombitgames.DartsClub
      iTunes Store Link: https://apps.apple.com/us/app/darts-club/id1389760587?uo=4


      Hack Features:
      - Unlimited Currencies
      - Debug Menu -> Head into Settings and toggle the DEBUG button. [ VIP ]
      -> Add Soft
      -> Add Hard
      -> Add Trophies
      -> Unlock All Parts/Emotes/Vanities/Wild Items
      + More!


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Darts Club v5.8.6 +28 Jailed Cheats [ Debug Menu ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 10 replies
    • Strongest Knight Cheats v1.07 +4
      Modded/Hacked App: Strongest Knight By Superlink Ltd.
      Bundle ID: com.idlemaster.hero
      iTunes Store Link: https://apps.apple.com/us/app/strongest-knight/id6738113239?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies
      - No Ads (Don't use the deb cheat unless you complete tutorial -- Finish use 4 ads boost quest)
       


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/190406-strongest-knight-v106-jailed-cheats-4/


      iOS Hack Download Link: https://iosgods.com/topic/190404-strongest-knight-cheats-v106-4/
      • 8 replies
    • [ GrandChase TW] 永恆冒險 Cheats v1.85.1 +3
      Modded/Hacked App: 永恆冒險 By HaoPlay Limited
      Bundle ID: tw.txwy.ios.grandchase
      iTunes Store Link: https://apps.apple.com/tw/app/%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA/id1434266148?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skills
      - Weak Enemies


      ViP Non-Jailbroken Hack: https://iosgods.com/topic/167594-grandchase-tw-%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA-v1744-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/144913-grandchase-tw-%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA-cheats-v1812-3/
      • 147 replies
    • GrandChase Cheats v1.85.1 +4 [ Multiply Attack & More ]
      Modded/Hacked App: GrandChase By KOG co., Ltd
      Bundle ID: com.kog.grandchaseglobal
      iTunes Store Link: https://itunes.apple.com/us/app/grandchase/id1385904294?mt=8&uo=4&at=1010lce4

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - x Player Damage - x1 - 100
      - x Player HP - x1 - 100
      - Auto-Win
      - Unlimited Skills

      All features are unlinked and only for player, you!

      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app. This hack works on the latest x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
        • Agree
        • Winner
        • Like
      • 1,440 replies
    • Cat Snack Bar Cheats v1.0.155 +1
      Modded/Hacked App: Cat Snack Bar By treeplla Inc.
      Bundle ID: com.tree.idle.catsnackbar
      iTunes Store Link: https://apps.apple.com/us/app/cat-snack-bar/id6443895159?uo=4


      Hack Features:
      - Freeze Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/170232-cat-snack-bar-v1036-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/170233-cat-snack-bar-cheats-v1036-1/
      • 67 replies
    • Temple Run 2 Cheats v1.117.1 +8
      Modded/Hacked App: Temple Run 2 by Imangi Studios, LLC
      Bundle ID: com.imangi.templerun2
      iTunes Store Link: https://apps.apple.com/us/app/temple-run-2/id572395608?uo=4&at=1010lce4


      Hack Features:
      - No Ads Enabled
      - x2 Coin Enabled
      - Infinite Coin (Spend some)
      - Infinite Gem (Spend some)
      - All Characters Unlocked
      - Free iAP (Turn off all iap hacks before using this, also if itunes popup don't show then run ldrestart in terminal -- This is an issue with the jailbreak not the hack)
      - Auto Run
      - Coin Magnet


      iOS Hack Download Link: https://iosgods.com/topic/132609-arm64-temple-run-2-cheats-v1691-8/
      • 297 replies
    • CodyCross: Crossword Puzzles Cheats v2.0.3 +3
      Modded/Hacked App: CodyCross: Crossword Puzzles by Fanatee, Inc.
      Bundle ID: com.fanatee.cody
      iTunes Store Link: https://apps.apple.com/us/app/codycross-crossword-puzzles/id1092689152?uo=4&at=1010lce4


      Hack Features:
      - Infinite Tokens
      - Infinite Boosters
      - PREMIUM


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/87156-arm64-codycross-crossword-puzzles-v1220-jailed-cheats-1/


      Hack Download Link: https://iosgods.com/topic/87091-arm64-codycross-crossword-puzzles-cheats-all-versions-3/
      • 161 replies
    • MARVEL Contest of Champions v48.1.0 +11++ Amazing Cheats!
      Modded/Hacked App: MARVEL Contest of Champions By Kabam
      Bundle ID: com.kabam.marvelbattle
      iTunes Link: https://itunes.apple.com/us/app/marvel-contest-of-champions/id896112560?mt=8&uo=4&at=1010lce4


      Hack Features
      - Enemy/AI Doesn't Attack
      - Special Attack/Skill Always Available
      - No Knockbacks When Hit
      - No Knockdowns When Hit
      - Enemy Doesn't Block
      - Auto Win - Whoever Attacks first, loses. Disable AI Doesn't Attack for this to work.
      - One Hit Kill / High Damage - Linked. Attack first or use with Enemy Doesn't Attack.

      Non-Jailbroken version of this hack: https://iosgods.com/topic/44075-marvel-contest-of-champions-v1311-2-cheats-for-jailed-devices/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 3,426 replies
    • Royal Match v26455 +10 Jailed Cheats [ Coins + More ]
      Modded/Hacked App: Royal Match By Dream Games Teknoloji Anonim Sirketi
      Bundle ID: com.dreamgames.royalmatch
      iTunes Store Link: https://apps.apple.com/us/app/royal-match/id1482155847?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Stars
      - Freeze Boosters
      - Freeze Time
      - Freeze Moves
      - Unlock VIP Badges
      - Unlock VIP Name Styles
      - Unlock VIP Frames
      - Auto Win -> Quit the level.


      Jailbreak required hack(s): [Mod Menu Hack] Royal Match v26455 +11 Cheats [ Unlimited Coins + More ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 292 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines