el:programming:repositories
Table of Contents
Debian Repositories
Δημιουργία ασφαλούς repository
Server
Ελέγχουμε εάν έχουμε αρκετή εντροπία στο σύστημα με
watch -n1 cat /proc/sys/kernel/random/entropy_avail
Εάν είναι κάτω από 300 μόνιμα τότε εκτελούμε
apt-get install rng-tools rngd -r /dev/urandom
Κάνουμε reset στα υπάρχοντα κλειδιά καλού κακού
mv /root/.gnupg /root/.gnupg.old
Δημιουργούμε το αρχείο /root/.gnupg/pubring.gpg
gpg --gen-key chmod 644 /root/.gnupg/pubring.gpg cp /root/.gnupg/pubring.gpg /path/to/repo/Release.gpg
Δημιουργούμε το public key σε text μορφή
gpg --armor --output pubkey.txt --export 'Vagelis Koutsomitros'
Δημιουργούμε το αρχείο Release για το repository που είναι στο φάκελο /path/to/repo/unstable
cd /path/to/repo apt-ftparchive release unstable > Release
Στην συνέχεια υπογράφουμε το αρχείο Release με αυτό το κλειδί
gpg -abs -o Release.gpg Release
Και μεταφέρουμε και τα 2 αρχεία στο root φάκελο του repository μας
mv Release.gpg unstable/ mv Release.gpg unstable/
Ανανέωση κλειδιού server
gpg --full-generate-key
Όνομα Koutsomitros Vagelis, mail web-support@weballdesign.gr, Comment LServerAdmin Repository
Client import
wget -O - http://debian.mywebrepo.gr/pubring.gpg | apt-key add -
Ανανέωση κλειδιού client
Βρίσκουμε τον δεκαεξαδικό αριθμό του κλειδιού που έχει λήξει
apt-key list
και το διαγράφουμε
apt-key del wget -O - http://debian.mywebrepo.gr/pubring.gpg | apt-key add -
cache control
Στο conf αρχείο του apache ορίζουμε
<VirtualHost *:80> ServerName packages.weballdesign.gr .. .. #One day: max-age=86400, One week: max-age=604800, One month: max-age=2628000 Header set Cache-Control "max-age=604800, public" </Directory>
Πηγές
- Simple repo howto : http://earruda.eti.br/blog/archives/10
- Key signing : http://wiki.debian.org/SecureApt
- Restrict access : http://www.debian-administration.org/articles/513
- Multi Arch
- reprepro recovery : https://github.com/esc/reprepro/blob/master/docs/recovery
el/programming/repositories.txt · Last modified: by vagk
