You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-273Lines changed: 4 additions & 273 deletions
Original file line number
Diff line number
Diff line change
@@ -4,276 +4,7 @@ central-server branch: the hackage.haskell.org instance
4
4
This is the branch for the "official" Hackage server at hackage.haskell.org. Most changes should not be here, but should be made to master.
5
5
6
6
# General Documentation
7
-
8
-
This is the `hackage-server` code. This is what powers <http://hackage.haskell.org>, and many other private hackage instances. The `master` branch is suitable for general usage. Specific policy and documentation for the central hackage instance exists in the `central-server` branch.
9
-
10
-
## Installing dependencies
11
-
12
-
`hackage-server` depends on `icu` and `zlib`. You'll also need `libbrotli-dev` for enabling tests.
13
-
14
-
ICU stands for "International Components for Unicode". The `icu4c` is a set
15
-
of libraries that provide Unicode and Globalization support.
16
-
The [text-icu](https://hackage.haskell.org/package/text-icu) Haskell package
17
-
uses the [icu4c](http://icu-project.org/apiref/icu4c/) library to build.
18
-
19
-
### Nix shell
20
-
21
-
If you have the Nix package manager installed, the easiest way to obtain
22
-
`hackage-server`'s dependencies is using the Nix shell:
23
-
24
-
nix-shell
25
-
26
-
Note: `libbrotli-dev` has to be installed manually.
27
-
28
-
### Manually
29
-
30
-
You can also install dependencies manually via your operating system's package
31
-
manager.
32
-
33
-
#### ICU
34
-
35
-
You'll need to do the following to get `hackage-server`'s dependency `text-icu` to build:
36
-
37
-
- Mac OS X
38
-
39
-
brew install icu4c
40
-
brew link icu4c --force
41
-
42
-
Besides that, you might also need to include these in the `cabal.project.local` you created:
43
-
44
-
```
45
-
package text-icu
46
-
extra-include-dirs: /usr/local/opt/icu4c/include
47
-
extra-lib-dirs: /usr/local/opt/icu4c/lib
48
-
```
49
-
50
-
- Ubuntu/Debian
51
-
52
-
sudo apt-get update
53
-
sudo apt-get install unzip libicu-dev
54
-
55
-
- Fedora/CentOS
56
-
57
-
sudo dnf install unzip libicu-devel
58
-
59
-
- Nix/NixOS
60
-
61
-
nix-shell --packages icu
62
-
63
-
#### libbrotli
64
-
65
-
- Ubuntu/Debian
66
-
67
-
sudo apt update
68
-
sudo apt install libbrotli-dev
69
-
70
-
- Fedora/CentOS
71
-
72
-
sudo dnf install brotli-devel
73
-
74
-
#### openssl
75
-
76
-
- Fedora/CentOS
77
-
78
-
sudo dnf install openssl-devel
79
-
80
-
#### zlib
81
-
82
-
- Mac OS X
83
-
84
-
brew install zlib
85
-
86
-
- Ubuntu/Debian
87
-
88
-
sudo apt-get update
89
-
sudo apt-get install zlib
90
-
91
-
- Fedora/CentOS
92
-
93
-
sudo dnf install zlib
94
-
95
-
- Nix/NixOS
96
-
97
-
nix-shell --packages zlib
98
-
99
-
100
-
## Setting up security infrastructure
101
-
102
-
Out of the box the server comes with some example keys and
103
-
[TUF](https://theupdateframework.io) metadata. The example keys are in
104
-
`example-keys/`; these keys were used to create
105
-
106
-
datafiles/TUF/root.json
107
-
datafiles/TUF/mirrors.json
108
-
datafiles/TUF/timestamp.private
109
-
datafiles/TUF/snapshot.private
110
-
111
-
While these files will enable you to start the server without doing anything
112
-
else, you should replace all these files before deploying your server. In the
113
-
remainder of this section we will explain how to do that.
114
-
115
-
The first step is to create your own keys using the
0 commit comments