Permalink
Browse files

Merge branch 'master' of git://github.com/pkgng/pkgng

  • Loading branch information...
2 parents 1cd02f4 + 419e47b commit 838dd4cac448cdc228f900c14d98b0e143e6a894 @namore namore committed Sep 6, 2012
Showing with 27,346 additions and 6,647 deletions.
  1. +3 −0 AUTHORS
  2. +1 −1 Doxyfile
  3. +98 −6 FAQ.md
  4. +8 −8 README.md
  5. +3 −3 docs/GOALS
  6. +181 −94 external/sqlite/shell.c
  7. +5,629 −1,547 external/sqlite/sqlite3.c
  8. +73 −17 external/sqlite/sqlite3.h
  9. +915 −0 external/uthash/uthash.h
  10. +10 −4 libpkg/Makefile
  11. +141 −88 libpkg/backup.c
  12. +138 −0 libpkg/dns_utils.c
  13. +502 −0 libpkg/elfhints.c
  14. +67 −17 libpkg/fetch.c
  15. +47 −38 libpkg/packing.c
  16. +252 −286 libpkg/pkg.c
  17. +236 −102 libpkg/pkg.h
  18. +45 −36 libpkg/pkg_add.c
  19. +166 −78 libpkg/pkg_attributes.c
  20. +180 −49 libpkg/pkg_config.c
  21. +166 −41 libpkg/pkg_create.c
  22. +33 −38 libpkg/pkg_delete.c
  23. +317 −88 libpkg/pkg_elf.c
  24. +28 −12 libpkg/pkg_event.c
  25. +70 −47 libpkg/pkg_jobs.c
  26. +337 −275 libpkg/pkg_manifest.c
  27. +176 −83 libpkg/pkg_ports.c
  28. +657 −325 libpkg/pkg_repo.c
  29. +25 −13 libpkg/pkg_version.c
  30. +1,503 −998 libpkg/pkgdb.c
  31. +635 −0 libpkg/plugins.c
  32. +1 −0 libpkg/private/event.h
  33. +50 −0 libpkg/private/ldconfig.h
  34. +128 −80 libpkg/private/pkg.h
  35. +9 −7 libpkg/private/pkgdb.h
  36. +67 −0 libpkg/private/thd_repo.h
  37. +16 −0 libpkg/private/utils.h
  38. +45 −44 libpkg/rcscripts.c
  39. +18 −8 libpkg/rsa.c
  40. +118 −18 libpkg/scripts.c
  41. +86 −25 libpkg/update.c
  42. +33 −25 libpkg/usergroup.c
  43. +74 −65 libpkg/utils.c
  44. +1 −0 pkg-static/Makefile
  45. +15 −4 pkg/Makefile
  46. +7 −6 pkg/add.c
  47. +65 −49 pkg/audit.c
  48. +20 −18 pkg/autoremove.c
  49. +14 −9 pkg/backup.c
  50. +79 −56 pkg/check.c
  51. +248 −36 pkg/clean.c
  52. +123 −87 pkg/create.c
  53. +66 −45 pkg/delete.c
  54. +48 −30 pkg/event.c
  55. +6 −6 pkg/fetch.c
  56. +52 −0 pkg/fix-xrefs
  57. +140 −121 pkg/info.c
  58. +63 −41 pkg/install.c
  59. +86 −44 pkg/main.c
  60. +3 −8 pkg/pkg-add.8
  61. +14 −3 pkg/pkg-audit.8
  62. +2 −1 pkg/pkg-autoremove.8
  63. +9 −8 pkg/pkg-backup.8
  64. +10 −3 pkg/pkg-check.8
  65. +29 −2 pkg/pkg-clean.8
  66. +110 −26 pkg/pkg-create.8
  67. +44 −15 pkg/pkg-delete.8
  68. +4 −4 pkg/pkg-fetch.8
  69. +3 −3 pkg/pkg-info.8
  70. +104 −38 pkg/pkg-install.8
  71. +46 −4 pkg/pkg-query.8
  72. +2 −6 pkg/pkg-register.8
  73. +31 −11 pkg/pkg-repo.8
  74. +22 −0 pkg/pkg-rquery.8
  75. +331 −46 pkg/pkg-search.8
  76. +1 −0 pkg/pkg-set.8
  77. +1 −1 pkg/pkg-shell.8
  78. +1 −5 pkg/pkg-shlib.8
  79. +77 −0 pkg/pkg-stats.8
  80. +17 −8 pkg/pkg-update.8
  81. +4 −4 pkg/pkg-updating.8
  82. +27 −10 pkg/pkg-upgrade.8
  83. +80 −7 pkg/pkg-version.8
  84. +1 −0 pkg/pkg-which.8
  85. +20 −7 pkg/pkg.8
  86. +34 −2 pkg/pkg.conf.5
  87. +20 −16 pkg/pkg.conf.sample
  88. +82 −38 pkg/pkgcli.h
  89. +94 −0 pkg/plugins.c
  90. +2 −2 pkg/progressmeter.c
  91. +509 −373 pkg/query.c
  92. +48 −44 pkg/register.c
  93. +36 −13 pkg/repo.c
  94. +28 −26 pkg/rquery.c
  95. +278 −60 pkg/search.c
  96. +73 −57 pkg/set.c
  97. +3 −1 pkg/shell.c
  98. +2 −2 pkg/shlib.c
  99. +103 −0 pkg/stats.c
  100. +26 −19 pkg/update.c
  101. +11 −11 pkg/updating.c
  102. +39 −31 pkg/upgrade.c
  103. +387 −158 pkg/utils.c
  104. +205 −174 pkg/version.c
  105. +10 −11 pkg/which.c
  106. +18 −0 plugins/pkg-plugin-mystats-command/Makefile
  107. +43 −0 plugins/pkg-plugin-mystats-command/README.md
  108. +127 −0 plugins/pkg-plugin-mystats-command/mystats.c
  109. +6 −0 plugins/pkg-plugin-mystats-command/mystats.conf
  110. +37 −0 plugins/pkg-plugin-mystats-command/mystats.h
  111. +18 −0 plugins/pkg-plugin-stats/Makefile
  112. +43 −0 plugins/pkg-plugin-stats/README.md
  113. +97 −0 plugins/pkg-plugin-stats/stats.c
  114. +6 −0 plugins/pkg-plugin-stats/stats.conf
  115. +37 −0 plugins/pkg-plugin-stats/stats.h
  116. +18 −0 plugins/pkg-plugin-template/Makefile
  117. +40 −0 plugins/pkg-plugin-template/README.md
  118. +161 −0 plugins/pkg-plugin-template/template.c
  119. +26 −0 plugins/pkg-plugin-template/template.conf
  120. +38 −0 plugins/pkg-plugin-template/template.h
  121. +18 −0 plugins/pkg-plugin-zfssnap/Makefile
  122. +45 −0 plugins/pkg-plugin-zfssnap/README.md
  123. +165 −0 plugins/pkg-plugin-zfssnap/zfssnap.c
  124. +23 −0 plugins/pkg-plugin-zfssnap/zfssnap.conf
  125. +37 −0 plugins/pkg-plugin-zfssnap/zfssnap.h
  126. +4 −0 plugins/pkg-plugins-serve/Makefile
  127. +48 −0 plugins/pkg-plugins-serve/README.md
  128. +19 −0 plugins/pkg-plugins-serve/mongoose/LICENSE
  129. +20 −0 plugins/pkg-plugins-serve/mongoose/Makefile
  130. +151 −0 plugins/pkg-plugins-serve/mongoose/Makefile.orig
  131. +29 −0 plugins/pkg-plugins-serve/mongoose/README.md
  132. +52 −0 plugins/pkg-plugins-serve/mongoose/bindings/csharp/example.cs
  133. +134 −0 plugins/pkg-plugins-serve/mongoose/bindings/csharp/mongoose.cs
  134. +63 −0 plugins/pkg-plugins-serve/mongoose/bindings/python/example.py
  135. +160 −0 plugins/pkg-plugins-serve/mongoose/bindings/python/mongoose.py
  136. +8 −0 plugins/pkg-plugins-serve/mongoose/examples/Makefile
  137. +387 −0 plugins/pkg-plugins-serve/mongoose/examples/chat.c
  138. +37 −0 plugins/pkg-plugins-serve/mongoose/examples/hello.c
  139. BIN plugins/pkg-plugins-serve/mongoose/examples/html/favicon.ico
  140. +73 −0 plugins/pkg-plugins-serve/mongoose/examples/html/index.html
  141. +154 −0 plugins/pkg-plugins-serve/mongoose/examples/html/jquery.js
  142. +43 −0 plugins/pkg-plugins-serve/mongoose/examples/html/login.html
  143. BIN plugins/pkg-plugins-serve/mongoose/examples/html/logo.png
  144. +99 −0 plugins/pkg-plugins-serve/mongoose/examples/html/main.js
  145. +154 −0 plugins/pkg-plugins-serve/mongoose/examples/html/style.css
  146. +61 −0 plugins/pkg-plugins-serve/mongoose/examples/post.c
  147. +50 −0 plugins/pkg-plugins-serve/mongoose/examples/ssl_cert.pem
  148. +507 −0 plugins/pkg-plugins-serve/mongoose/main.c
  149. +174 −0 plugins/pkg-plugins-serve/mongoose/mongoose.1
  150. +4,474 −0 plugins/pkg-plugins-serve/mongoose/mongoose.c
  151. +301 −0 plugins/pkg-plugins-serve/mongoose/mongoose.h
  152. +1 −0 plugins/pkg-plugins-serve/mongoose/test/.leading.dot.txt
  153. +1 −0 plugins/pkg-plugins-serve/mongoose/test/\/a.txt
  154. +28 −0 plugins/pkg-plugins-serve/mongoose/test/all_build_flags.pl
  155. +5 −0 plugins/pkg-plugins-serve/mongoose/test/bad.cgi
  156. +3 −0 plugins/pkg-plugins-serve/mongoose/test/bad2.cgi
  157. +181 −0 plugins/pkg-plugins-serve/mongoose/test/embed.c
  158. +46 −0 plugins/pkg-plugins-serve/mongoose/test/env.cgi
  159. +69 −0 plugins/pkg-plugins-serve/mongoose/test/exploit.pl
  160. +6 −0 plugins/pkg-plugins-serve/mongoose/test/hello.cgi
  161. +1 −0 plugins/pkg-plugins-serve/mongoose/test/hello.txt
  162. +3 −0 plugins/pkg-plugins-serve/mongoose/test/passfile
  163. +6 −0 plugins/pkg-plugins-serve/mongoose/test/sh.cgi
  164. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi1.shtml
  165. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi2.shtml
  166. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi3.shtml
  167. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi4.shtml
  168. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi5.shtml
  169. +5 −0 plugins/pkg-plugins-serve/mongoose/test/ssi6.shtml
  170. +6 −0 plugins/pkg-plugins-serve/mongoose/test/ssi7.shtml
  171. +1 −0 plugins/pkg-plugins-serve/mongoose/test/ssi8.shtml
  172. +3 −0 plugins/pkg-plugins-serve/mongoose/test/ssi9.shtml
  173. +533 −0 plugins/pkg-plugins-serve/mongoose/test/test.pl
  174. +12 −0 plugins/pkg-plugins-serve/mongoose/test/timeout.cgi
  175. +206 −0 plugins/pkg-plugins-serve/mongoose/test/unit_test.c
  176. +15 −0 plugins/pkg-plugins-serve/mongoose/win32/dll.def
  177. +1 −0 plugins/pkg-plugins-serve/mongoose/win32/res.rc
  178. +50 −0 plugins/pkg-plugins-serve/mongoose/win32/ssl_cert.pem
  179. BIN plugins/pkg-plugins-serve/mongoose/win32/systray.ico
  180. +22 −0 plugins/pkg-plugins-serve/plugin/Makefile
  181. +131 −0 plugins/pkg-plugins-serve/plugin/serve.c
  182. +6 −0 plugins/pkg-plugins-serve/plugin/serve.conf
  183. +37 −0 plugins/pkg-plugins-serve/plugin/serve.h
  184. +218 −240 ports/patch-portmaster-pkgng
  185. +38 −4 ports/pkg2ng
  186. +0 −26 scripts/find-missing-man-page-sa.sh
  187. +1 −1 scripts/periodic/410.pkg-audit
  188. +47 −0 scripts/periodic/411.pkg-backup
  189. +131 −0 scripts/pkg_tree.sh
View
@@ -5,6 +5,9 @@ Julien Laffaye <jlaffaye@FreeBSD.org>
Contributors:
+All contributors can be seen on github:
+https://github.com/pkgng/pkgng/graphs/contributors
+
Philippe Pepiot <phil@philpep.org>
Will Andrews <will@FreeBSD.org>
Marin Atanasov Nikolov <dnaeon@gmail.com>
View
@@ -31,7 +31,7 @@ PROJECT_NAME = libpkg
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 1.0-beta15
+PROJECT_NUMBER = 1.0.90
# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.
View
@@ -22,6 +22,16 @@ Table of Contents
* [How can I use pkgng with portmaster?](#15)
* [How can I use pkgng with portupgrade?](#16)
* [pkgng does not work it says: /usr/local/sbin/pkg: Undefined symbol "pkg_event_register"](#17)
+* [Can pkgng cope with parallel installs? What happpens if I simultaneously (attempt to) install conflicting packages?](#18)
+* [If I use "pkg delete -f", what happens to packages that depended on the forcibly-deleted package?](#19)
+* [What happens if I delete a package where I've modified one of the files managed by the package?](#20)
+* [What facilities does it have for auditing and repairing the package database? (ie checking for inconsistencies between installed files and the content of the package database)?](#21)
+* [Will it detect that a package install would overwrite an existing?](#22)
+* [If so, what happens to the file metadata (particularly uid, gid and mtime)?](#23)
+* [Can it track user-edited configuration files that are associated with packages?](#24)
+* [Can it do 2- or 3-way merges of package configuration files?](#25)
+* [The README states "Directory leftovers are automatically removed if they are not in the MTREE." How does this work for directories that are shared between multiple packages? Does this mean that if I add a file to a directory that was created by a package, that file will be deleted automatically if I delete the package?](#26)
+* [How to create a new plugin for pkgng?](#27)
<a name="0"></a>
### Q: How can I start using pkgng?
@@ -30,7 +40,7 @@ In order to start using pkgng, please follow the steps below.
Install ports-mgmt/pkg:
- # make -C /usr/ports/ports-mgmt/pkg
+ # make -C /usr/ports/ports-mgmt/pkg install clean
# echo "WITH_PKGNG=yes" >> /etc/make.conf
Now register all packages you have in the pkgng database:
@@ -94,7 +104,11 @@ The default hierarchy has lots of symlinks which should just be ignored and thus
Here is how to do that:
- sh -c 'find . -name "*.txz" -exec pkg query -f {} %o \;' | sort | uniq -d
+ sh -c 'find . -type f -name "*-*.txz" -exec pkg query -F {} %o \;' | sort | uniq -d
+
+As of beta17, `pkg repo` will emit a warning message and ignore any
+older versions if it finds multiple packages from the same origin
+when building a repo.
<a name="11"></a>
### Q: How to start working with multi-repos in pkgng?
@@ -149,8 +163,86 @@ More information can be found in the portupgrade [NEWS](https://github.com/pkgto
<a name="17"></a>
### Q: pkgng does not work it says: /usr/local/sbin/pkg: Undefined symbol "pkg_event_register"
-You should have forgotten make delete-old-libs when you upgraded your system.
+You forgot to run `make delete-old-libs` when you upgraded your system.
+
+During 9-CURRENT life the pkg_install tools have been split to provide a
+shared library: libpkg.so.0. This has been reverted, this error message means
+that this library is still on your system. Check for and delete /usr/lib/libpkg.so.0.
+
+<a name="18"></a>
+### Q: Can pkgng cope with parallel installs? What happpens if I simultaneously (attempt to) install conflicting packages?
+
+No. Parallel installs will not work -- the first to start will lock the DB, and
+the second won't be able to proceed.
+
+<a name="19"></a>
+### Q: If I use "pkg delete -f", what happens to packages that depended on the forcibly-deleted package?
+
+Nothing. If you forcibly delete a package it's assumed you understand that you know you're doing something that can break your system.
+pkg check will detect missing dependency packages and reinstall as required.
+
+<a name="20"></a>
+### Q: What happens if I delete a package where I've modified one of the files managed by the package?
+
+The package is removed, but modified file is not:
+
+ # pkg check -s pciids
+ pciids-20120625: checksum mismatch for /usr/local/share/pciids/pci.ids
+ # pkg delete pciids
+ The following packages will be deinstalled:
+
+ pciids-20120625
+
+ The deinstallation will free 788 kB
+ Deinstalling pciids-20120625...pkg: /usr/local/share/pciids/pci.ids
+ fails original SHA256 checksum, not removing
+ pkg: rmdir(/usr/local/share/pciids/): Directory not empty
+ done
+ # pkg info pciids
+ pkg: No package(s) matching pciids
+ # ls -l /usr/local/share/pciids/pci.ids
+ -rw-r--r-- 1 root wheel 752925 Jul 16 07:05
+ /usr/local/share/pciids/pci.ids
+
+<a name="21"></a>
+### Q: What facilities does it have for auditing and repairing the package database? (ie checking for inconsistencies between installed files and the content of the package database)
+
+See pkg-check(8)
+
+<a name="22"></a>
+### Q: Will it detect that a package install would overwrite an existing
+
+Yes exactly that. Files in the older package that are identical in the
+newer one are left untouched. Otherwise, files from the older package
+are removed, and files from the newer package are installed.
+
+<a name="23"></a>
+### Q: If so, what happens to the file metadata (particularly uid, gid and mtime)?
+
+Nothing.
+
+<a name="24"></a>
+### Q: Can it track user-edited configuration files that are associated with packages?
+
+This works in exactly the same way as it does currently in the ports. Except if the package provide the configuration with a .pkgconf extension
+In that if there is no user config the default configuration is created otherwise, the user edited version is kept
+
+<a name="25"></a>
+### Q: Can it do 2- or 3-way merges of package configuration files?
+
+No. In general the package will install sample configuration files,
+and will only touch the live config files if either the live configs
+don't exist, or the live configs are identical to the sample configs.
+This is the standard way things work in the ports at the moment.
+
+<a name="26"></a>
+### Q: The README states "Directory leftovers are automatically removed if they are not in the MTREE." How does this work for directories that are shared between multiple packages? Does this mean that if I add a file to a directory that was created by a package, that file will be deleted automatically if I delete the package?
+
+No. Directories have to be empty before they will be removed.
+
+<a name="27"></a>
+### Q: How to create a new plugin for pkgng?
+
+If you are interested in creating a new plugin for pkgng you might want to check the following handbook which is an introduction to plugins writing for pkgng.
-during 9-CURRENT life the pkg_install tools has been splitted to provide a
-shared library: libpkg.so.0 and this has been reverted, this error message means
-that this library is still on your system, please check /usr/lib/libpkg.so.0
+* [Introduction to writing plugins for pkgng in FreeBSD](http://unix-heaven.org/writing-plugins-for-pkgng)
View
@@ -152,12 +152,12 @@ show pkg-message, ...
`pkg add` can install a package archive from the local disk, or from a
remote FTP/HTTP server.
-If only a package name is given, it will search the remote repository
+If only a package name is given, it will search the repository catalogue
and download and install the package if it exists. The dependencies will be
downloaded and installed first.
This is possible because we have the dependency information in the
-remote repository database.
+catalogue of the remote repository.
`pkg add` will check if the user attempts to install a package built for another
arch or release.
@@ -180,7 +180,7 @@ Directory leftovers are automatically removed if they are not in the MTREE.
pkgng beta1 is now in the ports tree. To get it:
- $ make -C /usr/ports/ports-mgmt/pkg
+ $ make -C /usr/ports/ports-mgmt/pkg install clean
$ echo "WITH_PKGNG=yes" >> /etc/make.conf
<a name="usageintro"></a>
@@ -282,7 +282,7 @@ so that it points to a remote location, which contains packages that can be inst
or set _PACKAGESITE_ in the *pkg.conf(5)* configuration file.
In order to work with a single remote package repository, you would define _PACKAGESITE_ to
-your remote server with packages, like for example (or use */etc/pkg.conf* to set it there):
+your remote server with packages, like for example (or use ${LOCALBASE}/etc/pkg.conf* to set it there):
TCSH users:
@@ -292,7 +292,7 @@ your remote server with packages, like for example (or use */etc/pkg.conf* to se
# export PACKAGESITE=http://example.org/pkgng-repo/
-Then fetch the remote repository using the below command:
+Then fetch the repository catalogue using the command:
# pkg update
@@ -308,11 +308,11 @@ pkgng is also able to work with multiple remote repositories. In the previous se
we are using only a single remote repository, which is defined by the _PACKAGESITE_ option.
In order to be able to work with multiple remote repositories and instead of changing
-each time _PACKAGESITE_, you can tell *pkg(1)* to work in multi-repos mode as well.
+_PACKAGESITE_ each time, you can tell *pkg(1)* to work in multi-repos mode as well.
To do this, simply enable multi-repos in *pkg.conf(5)* like this:
- # echo "PKG_MULTIREPOS : YES" >> /etc/pkg.conf
+ # echo "PKG_MULTIREPOS : YES" >> /usr/local/etc/pkg.conf
The next thing is to define your remote repositories in the *pkg.conf(5)* file.
@@ -327,7 +327,7 @@ the *default* repository.
It is important that you always define a *default* repository - this is the repository that is being
used when no remote repositories are specified via the `-r <repo>` flag.
-Next, fetch the remote repositories:
+Next, fetch all the repository catalogues:
# pkg update
View
@@ -62,7 +62,7 @@ Table of Contents:
- search:
- - Will search the remote repository to provide information
+ - Will search the repository catalogue to provide information
to the users.
- info:
@@ -87,8 +87,8 @@ Table of Contents:
- upgrade:
- - Will compute the remote repository to check if there are new upgrades
- available and apply them.
+ - Will examine the repository catalogue to check if there are
+ any upgrades available and apply them.
- update:
Oops, something went wrong.

0 comments on commit 838dd4c

Please sign in to comment.