Skip to content

Commit 7e01a66

Browse files
author
Michel Casabianca
committed
Release 1.4.1: Improved documentation
2 parents c7d7047 + b12fa2e commit 7e01a66

File tree

2 files changed

+59
-13
lines changed

2 files changed

+59
-13
lines changed

Diff for: CHANGELOG.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Semantic changelog: https://github.com/c4s4/changelog
22

3+
- version: 1.4.1
4+
date: 2015-07-30
5+
summary: Improved documentation
6+
37
- version: 1.4.0
48
date: 2015-07-30
59
summary: Added HTTPS support

Diff for: README.md

+55-13
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ You may also pass the path to the configuration file on the command line:
6868

6969
$ cheeseshop /path/to/cheeseshop.yml
7070

71-
This configuration file should look like this:
71+
Configuration
72+
-------------
73+
74+
The configuration file should look like this:
7275

7376
# The root directory for packages
7477
root: /home/cheeseshop
@@ -91,30 +94,69 @@ This configuration file should look like this:
9194
spam: acbd18db4cc2f85cedef654fccc4a4d8
9295
eggs: 37b51d194a7513e45b56f6524f2d51f2
9396

94-
To compute MD5 sum for a given password, in order to fill the authentication file, you may type following command :
97+
There is a sample configuration in file *etc/cheeseshop.yml* of the archive.
9598

96-
$ echo -n foo | md5sum
97-
acbd18db4cc2f85cedef654fccc4a4d8 -
98-
$ echo -n bar | md5sum
99-
37b51d194a7513e45b56f6524f2d51f2 -
99+
### root
100100

101-
There is a sample configuration file in *etc* directory of the archive.
101+
The root directory is where live the Python packages. Under this root there is a directory for each package. Files for versions of this package are in these subdirectories. Thus, if our repository hosts packages *spam* (in versions *1.0.0* and *1.1.0*) and *eggs* (in versions *1.0.0* and *1.0.1*) we would have following directory structure :
102102

103-
Of course, you must create an empty directory for the repository. Ensure that the user running CheeseShop has a right to write in this directory.
103+
$ tree
104+
.
105+
├── spam
106+
│   ├── spam-1.0.0.tar.gz
107+
│   └── spam-1.1.0.tar.gz
108+
└── eggs
109+
   ├── eggs-1.0.0.tar.gz
110+
   └── eggs-1.0.1.tar.gz
104111

105-
To disable HTTP or HTTPS, you must set port to *0*. If HTTPS is disabled, you don't have to set certificate and key paths. To disable basic authentication, you must set auth to `~` (which means none in YAML).
112+
You must create this directory and ensure that user running the server has a right to write in this directory.
106113

107-
To generate a key, you can use openssl as follows:
114+
It is highly advised to backup this directory.
115+
116+
### key
117+
118+
This is the path to the CheeseShop private key. To generate such a key, you might type:
108119

109120
$ openssl genrsa -out cheeseshop-key.pem 2048
110121

111-
To generate au self signed certificate, you can type:
122+
This will generate a file *cheeseshop-key.pem* that you should copy in directory */etc/ssl/private*, which is the standard place.
123+
124+
This is only necessary when running HTTPS server. If you run only HTTP, you may set this value to *~*.
125+
126+
### cert
127+
128+
This is the path to the CheeseShop certificate. To generate a self signed certificate, you can type:
112129

113130
$ openssl req -new -x509 -key cheeseshop-key.pem -out cheeseshop-cert.pem -days 3650
114131

115-
This command will ask you many fields, but the only that is necessary is the *FQDN* which is the hostname of the machine that is running CheeseShop.
132+
This command will ask you many fields, but the only that is necessary is the *FQDN* which is the hostname of the machine that is running CheeseShop. A file named *cheeseshop-cert.pem* will be generated; you should copy this file in directory */etc/ssl/certs*, which is the standard place.
133+
134+
Note that if you have a certificate generated by a Certification Authority, you might not have to add a *trusted-host* in your PIP configuration. But I have such certificate and was unable to test it.
135+
136+
### http
137+
138+
This the port number that HTTP server will listen for incoming connections. Set it to *0* to disable HTTP (and run only on HTTPS). Note that it is not a good idea to perform basic authentication on HTTP, as anybody that intercepts HTTP requests might know you username and password. Standard port for HTTP is *80* but the server must run as root to be able to listen on this port. If you don't run the server as root, you must listen on a port number greater than *1024*.
139+
140+
### https
141+
142+
This is the port number that HTTPS server is listening. Set it to *0* to disable HTTPS. If HTTPS is enabled, you must provide private key and certificate (in *key* and *cert* configuration fields). Standard port for HTTPS is *443* but the server must run as root to be able to listen on this port. If you don't run the server as root, you must listen on a port number greater than *1024*.
143+
144+
### path
145+
146+
This is the URL path that the server will listen. Default value is *simple*, thus to list all packages, you should open URL <http://my.shop.host/simple>. To list available version for package *spam*, you would open URL <http://my.shop.host/simple/spam>. To download version *1.2.3* of this package, you would open <http://my.shop.host/simple/spam/spam-1.2.3.tar.gz>. This value should not be changed.
147+
148+
### shop
149+
150+
This is the URL of the public package repository, aka <http://pypi.python.org/simple>. This should not be changed.
151+
152+
### auth
153+
154+
This is the basic authentication configuration. If you don't want authentication, set this value to *~*. This is a list of usernames and MD5 hash of their password. To get the MD5 hash of a given password, you can type following command:
155+
156+
$ echo -n foo | md5sum
157+
acbd18db4cc2f85cedef654fccc4a4d8 -
116158

117-
You should copy the certificate in directory */etc/ssl/certs* and the key in */etc/ssl/private*.
159+
Note that if you modify this configuration, you must restart server, because this configuration is loaded at startup.
118160

119161
Service
120162
-------

0 commit comments

Comments
 (0)