Skip to content

Commit

Permalink
Merge pull request #187 from hannesm/changes
Browse files Browse the repository at this point in the history
changes for 4.0.0!
  • Loading branch information
hannesm authored Aug 15, 2019
2 parents 4485675 + 4ff3b13 commit 39e87e0
Show file tree
Hide file tree
Showing 41 changed files with 116 additions and 301 deletions.
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,15 @@ services:
sudo: false
env:
global:
- PINS="dns.dev:. dns-certify.dev:. dns-client.dev:. dns-client-lwt.dev:. dns-mirage-client.dev:. dns-client-unix.dev:. dns-resolver.dev:. dns-server.dev:. dns-tsig.dev:. dns-zone.dev:. dns-cli.dev:. dns-mirage.dev:. dns-mirage-resolver.dev:. dns-mirage-server.dev:. dns-mirage-certify.dev:."
- PINS="dns.dev:. dns-certify.dev:. dns-client.dev:. dns-resolver.dev:. dns-server.dev:. dns-tsig.dev:. dns-cli.dev:. dns-mirage.dev:."
matrix:
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-zone"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-resolver"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-resolver"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-server"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-certify"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-server"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client-lwt"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-tsig"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-certify"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-cli"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-client-unix"
- DISTRO=alpine OCAML_VERSION=4.07 PACKAGE="dns-mirage-client"
notifications:
email: false
35 changes: 31 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
### v2.0.0 (dev)

* Switch to uDNS implementation.
TODO more details.
### v4.0.0 (2019-08-15)

* Switch to uDNS implementation, developed from scratch since 2017, primarily
focusing on a recursive caching resolver. The server part supports dynamic
updates (RFC 2135), transaction authentication with HMAC (RFC 2845), zone
transfer (RFC 5936), incremental zone transfer (RFC 1995), change
notifications (RFC 1996) amongst others.
* The core library uses a GADT for resource record sets, where the key (resource
record type) specifies the value type.
* The API does not leak exceptions, but uses the result type where appropriate.
* TCP transport is well supported and used widely (client uses it by default)
* Naming: client is a DNS client, resolver is the recursive resolver library
* The DNS library is split into the following opam packages and sublibraries:
- `dns` - the core library
- `dns-tsig` - transaction signatures
- `dns-zone` - zone file parser (mostly taken from the 1.x series)
- `dns-cli` - command line utilities (odig, onotify, ..)
- `dns-client` - pure client implementation
- `.unix` - DNS client using the Unix module for communication
- `.lwt` - DNS client using Lwt_unix for communication
- `.mirage` - DNS client using MirageOS for communication
- `dns-certify` - helpers for let's encrypt provisioning
- `.mirage` - certificate provisioning with MirageOS
- `dns-mirage` - generic MirageOS communication layer
- `dns-server` - pure server implementation
- `.mirage` - MirageOS primary and secondary server
- `dns-resolver` - pure recursive resolver implementation
- `.mirage` - MirageOS recursive resolver
* Only OCaml 4.07.0 and above are supported
* Multicast DNS has been dropped for now
* A client using async from JS has not been implemented yet

### v1.1.2 (2019-02-28)

Expand Down
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ API documentation [is available online](https://mirage.github.io/ocaml-dns/).

## Transition from older versions

The pre-2.0.0 versions of ocaml-dns had a significantly different interface,
The pre-4.0.0 versions of ocaml-dns had a significantly different interface,
and so applications using them will need to be rewritten to follow the
stricter coding style used in the post-2.0.0 branches. The major improvements
from 1.x to the 2.x series are:
stricter coding style used in the post-4.0.0 branches. The major improvements
from 1.x to the 4.x series are:

- data (rrset) is defined in a single GADT in `Rr_map`
- add support for: notify, dynamic update, zone transfer, tsig (hmac authentication), edns
Expand All @@ -123,7 +123,7 @@ you will have to pin the same *version* for all of them:

```csh
: csh syntax
set version=2.0.0
set version=4.0.0
set repo=git+https://github.com/mirage/ocaml-dns.git

# the -y parameter means "force" or
Expand All @@ -132,29 +132,25 @@ set repo=git+https://github.com/mirage/ocaml-dns.git
# the -n parameter means
# "just register the pin, don't actually install it yet"

foreach pkg ( dns dns-{certify,cli,client{,-lwt,-unix}} \
dns-mirage{,-certify,-client,-resolver,-server} \
dns-{resolver,server,tsig,zone} )
foreach pkg ( dns dns-{certify,cli,client,resolver,server,mirage,tsig} )
opam pin add -y -n $pkg.$version --dev $repo
end
```

```bash
: bash syntax
version=2.0.0
version=4.0.0
repo=git+https://github.com/mirage/ocaml-dns.git

for pkg in dns dns-{certify,cli,client{,-lwt,-unix}} \
dns-mirage{,-certify,-client,-resolver,-server} \
dns-{resolver,server,tsig,zone}
for pkg in dns dns-{certify,cli,client,resolver,server,mirage,tsig}
do
opam pin add -y -n $pkg.$version --dev $repo
done
```

Now you can install the packages you need, for instance:
```shell
opam install dns-client-lwt
opam install dns-client
```
or
```shell
Expand Down
5 changes: 2 additions & 3 deletions app/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(library
(name dns_cli)
(synopsis "A Domain Name system (DNS) library, unix applications")
(public_name dns-cli)
(wrapped false)
(modules dns_cli)
Expand Down Expand Up @@ -32,11 +31,11 @@
(public_name ozone)
(package dns-cli)
(modules ozone)
(libraries dns dns-cli dns-zone dns-server bos rresult))
(libraries dns dns-cli dns-server.zone dns-server bos rresult))

(executable
(name odns)
(public_name odns)
(modules odns)
(package dns-cli)
(libraries dns dns-client-lwt dns-cli cmdliner lwt.unix hex rresult))
(libraries dns dns-client.lwt dns-cli cmdliner lwt.unix hex rresult))
1 change: 0 additions & 1 deletion certify/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(library
(name dns_certify)
(synopsis "A Domain Name system (DNS) library, certificate integration")
(public_name dns-certify)
(wrapped false)
(libraries dns dns-tsig x509 randomconv))
2 changes: 1 addition & 1 deletion client/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
(name dns_client)
(public_name dns-client)
(modules dns_client dns_client_flow)
(libraries domain-name mirage-flow dns randomconv rresult)
(libraries domain-name dns randomconv rresult)
(wrapped false))
11 changes: 9 additions & 2 deletions dns-certify.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ depends: [
"ocaml" {>= "4.07.0"}
"dns" {= version}
"dns-tsig" {= version}
"randomconv"
"duration"
"dns-mirage" {= version}
"randomconv" {>= "0.1.2"}
"duration" {>= "0.1.2"}
"x509" {>= "0.7.1"}
"lwt" {>= "4.2.1"}
"tls" {>= "0.10.3"}
"mirage-random" {>= "1.2.0"}
"mirage-time-lwt" {>= "1.3.0"}
"mirage-clock-lwt" {>= "2.0.0"}
"mirage-stack-lwt" {>= "1.4.0"}
]

build: [
Expand Down
21 changes: 10 additions & 11 deletions dns-cli.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ depends: [
"ocaml" {>= "4.07.0"}
"dns" {= version}
"dns-tsig" {= version}
"dns-client-lwt" {= version}
"dns-zone" {= version}
"dns-client" {= version}
"dns-server" {= version}
"dns-certify" {= version}
"rresult"
"bos"
"rresult" {>= "0.6.0"}
"bos" {>= "0.2.0"}
"cmdliner" {>= "1.0.0"}
"fpath"
"fpath" {>= "0.7.2"}
"x509" {>= "0.7.1"}
"nocrypto"
"hex"
"ptime"
"logs"
"fmt"
"ipaddr" {>= "3.0.0"}
"nocrypto" {>= "0.5.4"}
"hex" {>= "1.4.0"}
"ptime" {>= "0.8.5"}
"logs" {>= "0.6.3"}
"fmt" {>= "0.8.8"}
"ipaddr" {>= "4.0.0"}
"alcotest" {with-test}
]

Expand Down
24 changes: 0 additions & 24 deletions dns-client-lwt.opam

This file was deleted.

27 changes: 0 additions & 27 deletions dns-client-unix.opam

This file was deleted.

13 changes: 8 additions & 5 deletions dns-client.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ build: [
depends: [
"dune" {build & >="1.5.1"}
"ocaml" {>= "4.07.0"}
"cstruct" {>= "3.1.1"}
"fmt" {>= "0.8.4"}
"logs" {>= "0.6.2"}
"cstruct" {>= "4.0.0"}
"fmt" {>= "0.8.8"}
"logs" {>= "0.6.3"}
"dns" {= version}
"rresult" {>= "0.6.0"}
"mirage-flow"
"randomconv"
"randomconv" {>= "0.1.2"}
"domain-name" {>= "0.3.0"}
"ipaddr" {>= "4.0.0"}
"lwt" {>= "4.2.1"}
"mirage-stack-lwt" {>= "1.4.0"}
"mirage-random" {>= "1.2.0"}
]
synopsis: "Pure DNS resolver API"
description: """
Expand Down
35 changes: 0 additions & 35 deletions dns-mirage-certify.opam

This file was deleted.

27 changes: 0 additions & 27 deletions dns-mirage-client.opam

This file was deleted.

35 changes: 0 additions & 35 deletions dns-mirage-resolver.opam

This file was deleted.

Loading

0 comments on commit 39e87e0

Please sign in to comment.