aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-12-18 07:44:07 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-12-18 07:46:44 +0400
commit9ba01b6e4a6b80fc41e86c17f818fe9f067e078f (patch)
tree4adce1462af8f271860d65e24055eabba2ee2456
parent9890f7b08aa65ce835901fbc3f35e878d77fca3f (diff)
downloadcibs-9ba01b6e4a6b80fc41e86c17f818fe9f067e078f.tar.gz
Readme: Split development file and runtime
-rw-r--r--README.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/README.md b/README.md
index a6fccd0..0fccce1 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,40 @@ To create and publish an IPS package you need:
Look into directory `examples` for examples.
+
+# Best practices
+
+## Split development file and runtime
+
+In contrast to some crazy distributions (like Solaris or Arch Linux)
+we *do* split runtime and development files (as Debian does).
+
+Any shared library should be packaged into separate package reflecting
+library's soname, e. g. `library/gmp10` includes libgmp.so.10. Nothing else.
+But `library/gmp` includes headers, man pages, maybe static libraries etc. -
+anything that required to build applications using GMP. Both packages -
+`library/FOO` and `library/FOOxxx` are built from the same source, and
+`library/FOO` must depend on `library/FOOxxx` in such a way:
+
+ depend fmri=pkg:/library/FOOxxx@$(ips-version) type=require
+ depend fmri=pkg:/library/FOOxxx@$(ips-version) type=incorporate
+
+The trick is that IPS will use `library/FOOxxx` to fulfil runtime
+dependencies, and we will be allowed to perform smooth migration
+on newer library (e. g. `library/FOOyyy`) without breaking existing
+packages. Of course, newer `library/FOO` will depend on `library/FOOyyy`,
+but `library/FOOyyy` can be installed along with `library/FOOxxx`.
+Again, `library/FOOyyy` and `library/FOOxxx` must be installable together
+so none of them can ship docs, man pages or images or anything,
+but a shared library itself.
+
+Another example is Node.js or Python. Use `developer/nodejs` and
+`runtime/nodejs` package for development files and runtime.
+`runtime/nodejs` includes only the binary - `/usr/bin/nodejs` -
+and maybe other runtime files, man pages etc.
+
+
+
# CIBS modules
## common.mk