README-add-repo.htm 10 KB

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