Skip to content

Commit

Permalink
feat: update ocaml-crunch to 3.3.1-1
Browse files Browse the repository at this point in the history
  • Loading branch information
deepin-community-bot[bot] authored and UTsweetyfish committed Nov 18, 2024
1 parent 539c45b commit a99d62c
Show file tree
Hide file tree
Showing 39 changed files with 1,050 additions and 36 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_build/
.merlin
*.install
_opam/
3 changes: 3 additions & 0 deletions .ocamlformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
profile = default
version = 0.23.0
ocaml-version = 4.08
112 changes: 112 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
## v3.3.1 (2022-08-05)

* Fixed a regression in v3.3.0 where periods ('.') had to be specified
in the extention list. (#62, @MisterDA, fixes #61 reported by @cemerick)

## v3.3.0 (2022-07-24)

* Open files in binary mode so buffers don't underread on Windows.
(#54, @jonahbeckford)
* Always use Unix-style paths for path keys (#58, @MisterDA)
* Add -s and --silent flags (#52, #60, @MisterDA)
* Add `hash` and `size` functions to the plain module (#53, #60, @MisterDA)
* Update to cmdliner 1.1 (#55, @MisterDA)

## v3.2.0 (2019-12-14)

* Make crunch reproducible: use a Map.Make(String) instead of Hashtbl.
Iterating over the former is guaranteed to be sorted over the keys.
(#51 @hannesm)
* The state (Map.t) is passed explicit to `scan_file`, `output_implementation`
and `walk_directory_tree`. The value `empty` is provided to construct an
empty `t`. (#51 @hannesm)

## v3.1.0 (2019-11-01)

* Adapt mirage-kv 3.0.0 interface (#50 @hannesm)

## v3.0.0 (2019-02-28)

* Implement the mirage-kv 2.0.0 interface, using mirage-kv-mem
(#47 @linse @hannesm)
* Removed no longer used size function (#47 @linse @hannesm)

## v2.2.0 (2019-02-05)

* Port to dune from jbuilder (#46 @hannesm)
* use `SOURCE_DATE_EPOCH` instead of gettimeofday if set to
support reproducible builds (#45 @xclerc)

## v2.1.0 (2017-06-24)

* Port to Jbuilder and simplify test dependencies (#38 by @rgrinberg)

## v2.0.0 (2016-02-24)

* Fix reading of files consisting of multiple pages (#30 by @hannesm)
* Port to MirageOS3 API: removed unused `id` type (#17), add Failure
error type (#20), `connect` does not return a result anymore.
* Generate a `mem` function for the filesystem (#18)
* Port to topkg and respect the odig packaging convention (#24 via @fgimenez)
* Add `LICENSE` file to repository (#19 via @djs55)

## v1.4.1 (2016-02-08)

* Use a poor-man `realpath` instead of relying on C bindings which are not
available under Cygwin

## v1.4.0 (2015-03-09)

* Add an explicit `connect` function to the signature of generated code. (#13)
* Use centralised Travis CI scripts.

## v1.3.0 (2014-03-08)

* Deduplicate file chunks so that only one copy of each
sector is allocated in the static module.

## v1.2.3 (2013-12-24)

* Fix compilation of 0-length files.

## v1.2.2 (2013-12-08)

* Use the `V1.KV_RO` signature from mirage-types>=0.5.0
* Add Travis CI scripts.

## v1.2.1 (2013-12-08)

* Generate the correct signature for `V1.KV_RO`.

## v1.2.0 (2013-12-08)

* Use the `V1.KV_RO` signature from mirage-types>=0.3.0

## v1.1.2 (2013-12-07)

* Do not skip files without an extension.

## v1.1.1 (2013-12-06)

* Bugfix release.

## v1.1.0 (2013-12-05)

* New release to adapt to the new mirage-types API

## v0.7.0 (2013-07-21)

* Add a `-nolwt` output mode which simply uses strings and has
no dependence on Lwt. For the modern user who demands ultra-convenience.

## v0.6.0 (2013-07-09)

* Adapt output to mirage-platform-0.9.2 Io_page API.

## v0.5.0 (2013-03-28)

* Added a -o option (needed for mirari)

## 0.4.0 (2012-12-20)

* Initial public release
16 changes: 16 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(*
* Copyright (c) <the authors, see individual headers on files>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*)
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: build clean test

build:
dune build

test:
dune runtest

clean:
dune clean
69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
# template-repository
# ocaml-crunch — convert a filesystem into a static OCaml module

`ocaml-crunch` takes a directory of files and compiles them into a standalone
OCaml module which serves the contents directly from memory. This can be
convenient for libraries that need a few embedded files (such as a web server)
and do not want to deal with all the trouble of file configuration.

Run `ocaml-crunch --help` for more information:

```
NAME
ocaml-crunch - Convert a directory structure into a standalone OCaml
module that can serve the file contents without requiring an external
filesystem to be present.
SYNOPSIS
ocaml-crunch [--ext=VALID EXTENSION] [--mode=MODE] [--output=OUTPUT]
[OPTION]… DIRECTORIES…
ARGUMENTS
DIRECTORIES (required)
Directories to recursively walk and crunch.
OPTIONS
-e VALID EXTENSION, --ext=VALID EXTENSION
If specified, only these extensions will be included in the
crunched output. If not specified, then all files will be crunched
into the output module.
-m MODE, --mode=MODE (absent=lwt)
Interface access mode: either lwt or plain. lwt is the default.
-o OUTPUT, --output=OUTPUT
Output file for the OCaml module.
-s, --silent
Silent mode.
COMMON OPTIONS
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto,
pager, groff or plain. With auto, the format is pager or plain
whenever the TERM env var is dumb or undefined.
--version
Show version information.
EXIT STATUS
ocaml-crunch exits with the following status:
0 on success.
123 on indiscriminate errors reported on standard error.
124 on command line parsing errors.
125 on unexpected internal errors (bugs).
ENVIRONMENT
These environment variables affect the execution of ocaml-crunch:
SOURCE_DATE_EPOCH
Specifies the last modification of crunched files for reproducible
output.
BUGS
Email bug reports to <[email protected]>.
```
45 changes: 45 additions & 0 deletions crunch.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: "3.3.1"
opam-version: "2.0"
maintainer: "MirageOS team"
authors: ["Anil Madhavapeddy" "Thomas Gazagnaire" "Stefanie Schirmer" "Hannes Mehnert"]
homepage: "https://github.com/mirage/ocaml-crunch"
bug-reports: "https://github.com/mirage/ocaml-crunch/issues"
doc: "https://mirage.github.io/ocaml-crunch/"
license: "ISC"
dev-repo: "git+https://github.com/mirage/ocaml-crunch.git"
tags: ["org:mirage" "org:xapi-project"]

depends: [
"ocaml" {>= "4.08.0"}
"cmdliner" {>= "1.1"}
"ptime"
"dune" {>= "2.5"}
"lwt" {with-test}
"mirage-kv" {with-test & >= "3.0.0"}
"mirage-kv-mem" {with-test & >= "3.0.0"}
"fmt" {with-test}
]
conflicts: [
"mirage-kv" {< "3.0.0"}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
synopsis: "Convert a filesystem into a static OCaml module"
description: """
`ocaml-crunch` takes a directory of files and compiles them into a standalone
OCaml module which serves the contents directly from memory. This can be
convenient for libraries that need a few embedded files (such as a web server)
and do not want to deal with all the trouble of file configuration.
"""
6 changes: 3 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
template-repository (1.0-1) unstable; urgency=medium
ocaml-crunch (3.3.1-1) unstable; urgency=medium

* Initial release
* Initial release (Closes: #1064002)

-- Tsic404 <liuheng@deepin.org> Sat, 28 Jan 2023 13:46:49 +0800
-- Stéphane Glondu <glondu@debian.org> Thu, 15 Feb 2024 15:04:51 +0100
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

74 changes: 62 additions & 12 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,15 +1,65 @@
Source: template-repository
Section: unknown
Source: ocaml-crunch
Section: ocaml
Priority: optional
Maintainer: Tsic404 <[email protected]>
Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: https://github.com/deepin-community/template-repository
#Vcs-Browser: https://salsa.debian.org/debian/deepin-community-template-repository
#Vcs-Git: https://salsa.debian.org/debian/deepin-community-template-repository.git
Maintainer: Debian OCaml Maintainers <[email protected]>
Uploaders: Stéphane Glondu <[email protected]>
Build-Depends:
debhelper-compat (= 13),
ocaml,
ocaml-dune,
libcmdliner-ocaml-dev,
libptime-ocaml-dev,
dh-ocaml (>= 1.2)
Standards-Version: 4.6.2
Rules-Requires-Root: no
Vcs-Browser: https://salsa.debian.org/ocaml-team/ocaml-crunch
Vcs-Git: https://salsa.debian.org/ocaml-team/ocaml-crunch.git
Homepage: https://github.com/mirage/ocaml-crunch

Package: template-repository
Package: ocaml-crunch
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Depends:
${ocaml:Depends},
${shlibs:Depends},
${misc:Depends}
Description: convert a filesystem into a static OCaml module (tool)
ocaml-crunch takes a directory of files and compiles them into a
standalone OCaml module which serves the contents directly from
memory. This can be convenient for libraries that need a few embedded
files (such as a web server) and do not want to deal with all the
trouble of file configuration.
.
This package contains the command-line tool.

Package: libcrunch-ocaml-dev
Provides: ${ocaml:Provides}
Architecture: any
Depends:
${ocaml:Depends},
${shlibs:Depends},
${misc:Depends}
Recommends: ocaml-findlib
Description: convert a filesystem into a static OCaml module (dev files)
ocaml-crunch takes a directory of files and compiles them into a
standalone OCaml module which serves the contents directly from
memory. This can be convenient for libraries that need a few embedded
files (such as a web server) and do not want to deal with all the
trouble of file configuration.
.
This package contains development files.

Package: libcrunch-ocaml
Provides: ${ocaml:Provides}
Architecture: any
Depends:
${ocaml:Depends},
${shlibs:Depends},
${misc:Depends}
Description: convert a filesystem into a static OCaml module (runtime files)
ocaml-crunch takes a directory of files and compiles them into a
standalone OCaml module which serves the contents directly from
memory. This can be convenient for libraries that need a few embedded
files (such as a web server) and do not want to deal with all the
trouble of file configuration.
.
This package contains runtime files.
38 changes: 20 additions & 18 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: template-repository
Source: https://github.com/deepin-community/template-repository
Packaged-By: Stéphane Glondu <[email protected]>

Files: *
Copyright: 2023 Tsic404 <[email protected]>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
Copyright: 2009-2013, Anil Madhavapeddy <[email protected]>
2013, Thomas Gazagnaire <[email protected]>
License: ISC

Files: debian/*
Copyright: 2024, Stéphane Glondu <[email protected]>
License: ISC

License: ISC
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Loading

0 comments on commit a99d62c

Please sign in to comment.