Create some files and dirs
sudo mkdir -p /var/www/conf /var/upload/mydist /var/log/reprepro
sudo chmod 1777 /var/upload/mydist
Deny http access to conf dir
Edit /etc/lighttpd/lighttpd.conf
, and change the line
url.access-deny = ( "~", ".inc" )
into:
url.access-deny = ( "~", ".inc", "/conf/", "/db/" )
, then restart the service:
sudo service lighttpd restart
Create reprepro config
Edit /var/www/conf/distributions
:
Label: mydist Codename: mydist Suite: mydist-stable Version: 0.0.0 Origin: mydist #Description: Architectures: source i386 amd64 ##ppc armel ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel s390 sparc Components: main ##UDebComponents: Uploaders: allow-upload #Update: SignWith: %keyid%
Edit /var/www/conf/incoming
:
Name: mydist-incoming IncomingDir: /var/upload/mydist TempDir: /var/tmp/mydist LogDir: /var/log/reprepro Allow: mydist stable>mydist testing>mydist unstable>mydist experimental>mydist devel>mydist Default: mydist Multiple: Yes #Options: Permit: older_version unused_files Cleanup: on_deny on_error unused_files
Edit /var/www/conf/allow-upload
:
allow * by anybody
Give the repository a key
Edit a file repokey.txt
, replacing machinexxy.rug.nl with the actual fully qualified domain name:
Key-Type:DSA Key-Length:1024 Key-Usage:sign Name-Real:Repository mydist at machinexxy.rug.nl Name-Comment:repository key Name-Email:reprepro@machinexxy.rug.nl
Use that file as input to gpg:
cat repokey.txt|gpg --gen-key --batch
+++++.+++++.+++++...+++++++++++++++.++++++++++++++++++++...+++++++++++++++.+++++++++++++++.+++++.+++++++++++++++.+++++++++++++++++++++++++.+++++.+++++.....+++++
gpg: key C7C5973D marked as ultimately trusted
... and put that key place of %key% in /var/www/conf/distributions
Then export the key to a file:
gpg --export --armor "Repository mydist at machinexxy.rug.nl" > key
sudo mv key /var/www/
Initialize the repository
sudo reprepro -b /var/www export