README-add-repo.htm 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title></title></head><body>Puppy Package Manager<br>
  3. <h1>HOWTO add (or remove) a package database</h1>
  4. <h2>Background</h2>
  5. These are web pages that introduce the package system in Puppy 5.x:<br>
  6. <br>
  7. <big><a href="http://puppylinux.com/woof/ppm.htm">http://puppylinux.com/woof/ppm.htm</a></big> <br>
  8. <big><a href="http://puppylinux.com/woof/pkg-db-format.htm">http://puppylinux.com/woof/pkg-db-format.htm</a></big> <br>
  9. <br>
  10. There are two local files that you need to know about:<br><a href="file:///root/.packages/DISTRO_PET_REPOS">/root/.packages/DISTRO_PET_REPOS</a><br>
  11. <a href="file:///root/.packages/DISTRO_COMPAT_REPOS">/root/.packages/DISTRO_COMPAT_REPOS</a> <br>
  12. <br>
  13. <h2>DISTRO_COMPAT_REPOS</h2>
  14. What you will see in this file are two variables named PKG_DOCS_DISTRO_COMPAT and REPOS_DISTRO_COMPAT.<br>
  15. <h3>PKG_DOCS_DISTRO_COMPAT</h3>
  16. This consists of a series of entries that are separated by a space-character. Here is an example of one entry:<br>
  17. <pre>slackware.cs.utah.edu|http://slackware.cs.utah.edu/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}/PACKAGES.TXT|Packages-slackware-${DISTRO_COMPAT_VERSION}-official</pre>
  18. The variable DISTRO_COMPAT_VERSION is defined in this file:<br>
  19. <br>
  20. <a href="file:///etc/DISTRO_SPECS">/etc/DISTRO_SPECS</a><br>
  21. <br>
  22. An example would be Puppy built from Slackware version 12.2, so the above example resolves to:<br>
  23. <pre>slackware.cs.utah.edu|http://slackware.cs.utah.edu/pub/slackware/slackware-12.2/PACKAGES.TXT|Packages-slackware-12.2-official</pre>
  24. <br>
  25. The entry has three fields, separated by a vertical-bar character:<br>
  26. 1st: This is the URL used for testing that the site is responding.<br>
  27. 2nd: The full URI of the repository packages database file.<br>
  28. 3rd: The name of the database file after it has been downloaded and converted to a standardised format.<br>
  29. <br>
  30. You must only add another repository which has packages of the same
  31. "compatible distro" that was used to build Puppy, that is, one of
  32. Slackware, Debian, Ubuntu or Arch. The DISTRO_BINARY_COMPAT variable in
  33. /etc/DISTRO_SPECS defines this.<br>
  34. <br>
  35. So, when Puppy downloads the database file, in the above example
  36. 'PACKAGES.TXT', it must be in the database format used by the
  37. compatible distro. Puppy will expect it to be in that format to be able
  38. to convert it to the standadised format used in Puppy.<br>
  39. <h3>REPOS_DISTRO_COMPAT</h3>
  40. This variable has the same format, entries separated by
  41. space-character, fields in each entry separated by the vertical-bar.
  42. Here is an example:<br>
  43. <pre>slackware.cs.utah.edu|http://slackware.cs.utah.edu/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official</pre>
  44. ...it looks like before, but in this case the full URI is to where the
  45. actual packages are kept. Note that individual packages may be in
  46. subdirectories but this information is in the package database.<br>
  47. <br>
  48. If the repository is mirrored, no problem, additional entries can be
  49. made, all with the same 3rd field, for example here is the complete
  50. definition of REPOS_DISTRO_COMPAT (it's a bit long, so I've put in
  51. new-lines for each entry):<br>
  52. <pre>slackware.cs.utah.edu|http://slackware.cs.utah.edu/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official <br>slackware.mirrors.tds.net|http://slackware.mirrors.tds.net/pub/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official <br>ftp.gwdg.de|http://ftp.gwdg.de/pub/linux/slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official <br>ftp.isu.edu.tw|http://ftp.isu.edu.tw/pub/Linux/Slackware/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-official <br>repository.slacky.eu|http://repository.slacky.eu/slackware-${DISTRO_COMPAT_VERSION}|Packages-slackware-${DISTRO_COMPAT_VERSION}-slacky</pre>
  53. On the other hand, one download site may have more than one
  54. "repository". What I mean by that is best shown by example. This is the
  55. REPOS_DISTRO_COMPAT variable for the Ubunt-compatible build of Puppy:<br>
  56. <pre>ftp.filearena.net|http://ftp.filearena.net/pub/ubuntu|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-*<br>mirror.anl.gov|http://mirror.anl.gov/pub/ubuntu|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-*<br>mirrors.kernel.org|http://mirrors.kernel.org/ubuntu|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-*<br>archive.ubuntu.com|http://archive.ubuntu.com/ubuntu|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-*</pre>
  57. There are actually three different repositories on each site that Puppy
  58. can download from, 'main', 'universe' and 'multiverse'. Puppy has a
  59. database file for each, for example for the 'Intrepid' release of
  60. Ubuntu: 'Packages-ubuntu-intrepid-main',
  61. 'Packages-ubuntu-intrepid-universe' and
  62. 'Packages-ubuntu-intrepid-multiverse'. Accordingly, the
  63. PKG_DOCS_DISTRO_COMPAT variable has this:<br>
  64. <pre>archive.ubuntu.com|http://archive.ubuntu.com/ubuntu/dists/intrepid/main/binary-i386/Packages.bz2|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-main <br>archive.ubuntu.com|http://archive.ubuntu.com/ubuntu/dists/intrepid/universe/binary-i386/Packages.bz2|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-universe <br>archive.ubuntu.com|http://archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/binary-i386/Packages.bz2|Packages-ubuntu-${DISTRO_COMPAT_VERSION}-multiverse</pre>
  65. ...that is, it specifies all three databases.<br>
  66. <h2>DISTRO_PET_REPOS</h2>
  67. Adding another repository of .pet packages is probably the most likely
  68. requirement of a Puppy user. Chances are, when you upgrade to the
  69. latest version of Puppy the package manager will be accessing the most
  70. appropriate repositories. But, you might want to make an addition right
  71. now, or especially so if you are a Puppy-developer.<br>
  72. <h3>PKG_DOCS_PET_REPOS</h3>
  73. It is really the same as described above. File DISTRO_PET_REPOS has
  74. variable PKG_DOCS_PET_REPOS and here is it's current contents:<br>
  75. <pre>ibiblio.org|http://distro.ibiblio.org/pub/linux/distributions/puppylinux/Packages-puppy-woof-official|Packages-puppy-woof-official <br>ibiblio.org|http://distro.ibiblio.org/pub/linux/distributions/puppylinux/Packages-puppy-4-official|Packages-puppy-4-official <br>ibiblio.org|http://distro.ibiblio.org/pub/linux/distributions/puppylinux/Packages-puppy-3-official|Packages-puppy-3-official <br>ibiblio.org|http://distro.ibiblio.org/pub/linux/distributions/puppylinux/Packages-puppy-2-official|Packages-puppy-2-official</pre>
  76. Note that the database filename on the site is the same as that after
  77. it is downloaded. This is because the PET database file on the site is
  78. supposed to already be in the "standardised format". Puppy from version
  79. 2.0 up to and including version 4.x has kept package database
  80. information in a file /root/.packages/packages.txt, but this is
  81. different from the new standardised format -- note though, the Woof
  82. build system has a script for converting old 'packages.txt' files into
  83. the new format.<br>
  84. <br>
  85. So, say you have a repository of .pet packages. Let's say&nbsp;
  86. at&nbsp; http://johhny.org/petrepo. What you will have to do is create
  87. a database file, say 'Packages-puppy-4-johhny' -- the naming convention
  88. is that the second field 'puppy' identifies this as a Puppy .pet repo,
  89. the third field '4' identifies what version of Puppy these packages are
  90. compiled on/for, while the last field is a unique identification of the
  91. repository.<br>
  92. <br>
  93. So, add an entry to variable PKG_DOCS_PET_REPOS:<br>
  94. <pre>johhny.org|http://johhny.org/petrepo|Packages-puppy-4-johhny</pre>
  95. <h3>PET_REPOS</h3>
  96. This is another variable in file DISTRO_PET_REPOS. Here are the current contents:<br>
  97. <pre>ibiblio.org|http://distro.ibiblio.org/pub/linux/distributions/puppylinux|Packages-puppy-*-official <br>ftp.nluug.nl|http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux|Packages-puppy-*-official <br>ftp.linux.hr|ftp://ftp.linux.hr/puppylinux|Packages-puppy-*-official <br>ftp.vcu.edu|ftp://ftp.vcu.edu/pub/gnu+linux/puppylinux|Packages-puppy-*-official <br>ftp.tu-chemnitz.de|ftp://ftp.tu-chemnitz.de/.SAN0/pub/linux/sunsite.unc-mirror/distributions/puppylinux|Packages-puppy-*-official <br>ftp.ussg.iu.edu|ftp://ftp.ussg.iu.edu/linux/puppylinux|Packages-puppy-*-official <br>ftp.lug.udel.edu|ftp://ftp.lug.udel.edu/pub/puppylinux|Packages-puppy-*-official <br>ftp.sh.cvut.cz|ftp://ftp.sh.cvut.cz/storage/1/puppy|Packages-puppy-*-official</pre>
  98. ...notice the '*' wildcard. This is because all of the pet package repositories are at the same sites.<br>
  99. <br>
  100. For our hypothetical example, add this line:<br>
  101. <pre>johhny.org|http://johhny.org/petrepo|Packages-puppy-4-johhny</pre>
  102. ...note again, the .pet packages may be in subdirectories below 'petrepo' and this is defined in the database file.<br>
  103. <br>
  104. What the above line is saying is that for any of the packages dclared
  105. in 'Packages-puppy-4-johhny', you will find them at
  106. http://johhny.org/petrepo.<br>
  107. <h2>Summary</h2>
  108. If you add the two entries as shown in the above example, and create a
  109. database file 'Packages-puppy-4-johhny' at the website, that's it,
  110. you're ready to go.<br>
  111. <br>
  112. Click the 'Configure package manager' button in the main GUI window,
  113. then click 'Update now', the package manager will download the
  114. 'Packages-puppy-4-johhny' and add it to the others and the packages
  115. will then display in the main GUI window.<br>
  116. <br>
  117. On the other hand, if you want to remove any repository, remove the
  118. entries in the variables (the reverse of that above procedure) and
  119. delete the 'Packages-*' file.<br>
  120. <br>
  121. A final point about the example package database file
  122. 'Packages-puppy-4-johhny'. A repository could have mixed .pet packages,
  123. that have been compiled in different versions of Puppy. In such a
  124. situation, you could create separate 'Packages-*' files for each group.
  125. Alternatively, the package database does have extra fields for each
  126. package entry that can declare what environment the package was
  127. compiled in, for example 'ubuntu|intrepid|puppy' means that this
  128. package was compiled in a Puppy that was built from Ubuntu Intrepid
  129. packages. I have such a mixed bunch of packages at my ibiblio site, in
  130. directory 'pet_packages-woof', and the package database file is
  131. 'Packages-puppy-woof-official' -- the 'woof' field is not one of the
  132. Puppy release numbers. The Puppy Package Manager is able to sift
  133. through such a mixed database and offer only the appropriate packages
  134. for installation.<br>
  135. <br>
  136. Regards,<br>
  137. Barry Kauler<br>October 2009<br>
  138. <br>
  139. </body></html>