LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-06-2017, 08:49 AM   #1
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918
APT appears to add master control file fields


I'm currently taking a closer look at how the APT suite operates, starting with how it downloads, interprets and caches the binary package master control files.

My test package is mutt.

Using apt-get download mutt to download the binary package, I took a look at the master control file (DEBIAN/control):

Code:
Package: mutt
Version: 1.5.24-1build1
Architecture: amd64
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Antonio Radici <antonio@dyne.org>
Installed-Size: 3676
Depends: libc6 (>= 2.15), libgnutls30 (>= 3.4.2), libgpgme11 (>= 1.2.0), libgssapi-krb5-2 (>= 1.10+dfsg~), libidn11 (>= 1.13), libncursesw5 (>= 6), libsasl2-2, libtinfo5 (>= 6), libtokyocabinet9 (>= 1.4.47)
Recommends: default-mta | mail-transport-agent, locales, mime-support, libsasl2-modules
Suggests: urlview, aspell | ispell, gnupg, mixmaster, openssl, ca-certificates
Conflicts: mutt-utf8
Replaces: mutt-utf8
Provides: imap-client, mail-reader
Section: mail
Priority: standard
Homepage: http://www.mutt.org/
Description: text-based mailreader supporting MIME, GPG, PGP and threading
 Mutt is a sophisticated text-based Mail User Agent. Some highlights:
 .
  * MIME support (including RFC1522 encoding/decoding of 8-bit message
    headers and UTF-8 support).
...
I then had a look at the control file (as generated by apt-get update) in archive.ubuntu.com_ubuntu_dists_xenial_main_binary-amd64_Packages:

Code:
Package: mutt
Priority: optional
Section: mail
Installed-Size: 3676
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Antonio Radici <antonio@dyne.org>
Architecture: amd64
Version: 1.5.24-1build1
Replaces: mutt-utf8
Provides: imap-client, mail-reader
Depends: libc6 (>= 2.15), libgnutls30 (>= 3.4.2), libgpgme11 (>= 1.2.0), libgssapi-krb5-2 (>= 1.10+dfsg~), libidn11 (>= 1.13), libncursesw5 (>= 6), libsasl2-2, libtinfo5 (>= 6), libtokyocabinet9 (>= 1.4.47)
Recommends: default-mta | mail-transport-agent, locales, mime-support, libsasl2-modules
Suggests: urlview, aspell | ispell, gnupg, mixmaster, openssl, ca-certificates
Conflicts: mutt-utf8
Filename: pool/main/m/mutt/mutt_1.5.24-1build1_amd64.deb
Size: 865928
MD5sum: e925715e6f3487e3119b6992847ea1ba
SHA1: 7cc8a09b389f6d8059f3715e463daaf0ab0a0fda
SHA256: 467b9b38a639fefee21365d6b402f3f37d970f18a6b12383fe57dda5ae340f39
Description: text-based mailreader supporting MIME, GPG, PGP and threading
Homepage: http://www.mutt.org/
Description-md5: a2a425952f4b623e21ee73d317640a85
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: mail-server
You will notice that the order of the fields has been changed and the long description has been removed (the first is no biggie and the latter info is kept in archive.ubuntu.com_ubuntu_dists_xenial_main_i18n_Translation-en%5fGB).

However, there have been a few fields added (Bugs, Origin etc.) and the priority has been changed from standard to optional.

My question is this: at what point are these changes made?

Is there perhaps a separate control file in the Ubuntu archives that is downloaded and used rather than the file in the binary package itself?

Or does APT make the changes on the fly? (if so, I couldn't find anything in the apt source code indicating the addition of these fields).
 
Old 03-06-2017, 01:45 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048

Original Poster
Blog Entries: 5

Rep: Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918Reputation: 2918
Problem solved. My knowledge of how Debian-style repositories work was lacking.

The page https://wiki.debian.org/RepositoryFo...ository_Format indicates that the binary package indices, e.g. archive.ubuntu.com_ubuntu_dists_xenial_main_binary-amd64_Packages above, are downloaded by APT from dists/$DIST/$COMP/binary-$ARCH/Packages.gz (in this case, http://archive.ubuntu.com/ubuntu/dis...64/Packages.gz).

These Packages files are no doubt created by the repository using an automated process on a regular basis, taking the original packages' master control file info into consideration, but adding/modifying where required with repo-added metadata.

So, my lesson is learned. If a binary package has been installed from a repo, it's the package's control file in the repo's binary package indices that will be used as the source of the package's metadata, not the one that comes in the package's archive itself.

Last edited by hydrurga; 03-06-2017 at 01:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
awk: compare fields of file 1 to fields of file 2 beca123456 Linux - Newbie 2 05-01-2016 03:28 AM
Hello, How to add some fields in HELLO list in AODV protocol in NS2? jayashreemanoharan Linux - Newbie 1 10-26-2014 12:32 PM
awk: add new fields to 1st row overlord73 Linux - General 2 09-05-2012 05:28 AM
game server appears in master list for 10 minutes until system idles UNI Slackware 4 05-29-2008 05:32 PM
Mandriva (HP zv5420) volume keys control master mono, NOT MASTER! about36ninjas Linux - Laptop and Netbook 10 12-30-2007 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration