Gestione di un Repository APT multi distribuzione con reprepro
| Attenzione questo articolo è ancora incompleto. Sentiti libero di contribuire cliccando sul tasto edit. |
Aggiunta i pacchetti
- Compilare i pacchetti e poi importarli con:
reprepro includedeb wheezy path/to/telegram-cli_1.0.6-1_amd64.deb
- Se si vogliono aggiungere due pacchetti della stessa applicazione per due distribuzioni diverse (perchè hanno dipendenze diverse), questi pacchetti devono avere versione e nome diverso: editare il file debian/changelog per includere -nomedistribuzione dopo la versione.
Aggiunta di un'architettura
Se si vuole aggiungere un'architettura dopo, editare il file aggiungendo ad esempio armhf:
vi conf/distributions
# RVM Debian Stretch packages Origin: RVM Label: rvm Suite: stretch Codename: stretch Architectures: i386 amd64 armhf source Components: main Description: RVM Debian repository Contents: .gz .bz2 Tracking: keep SignWith: yes Log: packages.stretch.log
- Esportare gli indici e poi migrare tutti i pacchetti di architettura all da stretch:
reprepro export reprepro flood 'stretch' 'armhf'
Riferimenti
- SettingUpSignedAptRepositoryWithReprepro - Debian Wiki
- Local corporate APT repositories | Vincent Bernat
- debian - Reprepro adding same deb package - Stack Overflow
- reprepro: How to add the same package for multiple distributions | Ascii for Breakfast
adduser --system --disabled-password --disabled-login \
--home /srv/packages \
--group reprepro
sudo apt-get install reprepro
sudo -u reprepro mkdir conf gpg logs www
1 cd /srv/packages/
2 GNUPGHOME=gpg gpg --gen-key
3 ls
4 vi conf/distributions
5 vi conf/distributions
6 ls
7 mkdir incoming
8 ls
9 vi conf/distributions
10 ls incoming/
11 cp /tmp/telegram-cli_1.0.6-1_amd64.deb incoming/
12 reprepro includedeb wheezy incoming/telegram-cli_1.0.6-1_amd64.deb
13 ls
14 ifco
15 ifconfig
16 ip addr show
17 cp /tmp/telegram-cli_1.0.6-1_amd64.deb incoming/
18 reprepro includedeb jessie incoming/telegram-cli_1.0.6-1_amd64.deb
19 cp /tmp/telegram-cli_1.0.6-1-jessie_amd64.deb incoming/
20 reprepro includedeb jessie incoming/telegram-cli_1.0.6-1-jessie_amd64.deb
21 ls
22 cd www/
23 pwd
24 ls
25 vi test.txt
26 ls
27 cd ..
28 ls
29 ls -laR www/
30 ls
31 cd gpg/
32 ls
33 vi mykey.asc
34 gpg --import mykey.asc
35 rm -rf /srv/packages/.gnupg
36 history
37 cd
38 GNUPGHOME=gpg gpg --import mykey.asc
39 ls
40 GNUPGHOME=gpg gpg --import gpg/mykey.asc
41 GNUPGHOME=gpg gpg --list-secret-keys
42 vi gpg/mykey.asc
43 GNUPGHOME=gpg gpg --import gpg/mykey.asc
44 GNUPGHOME=gpg gpg --list-secret-keys
45 GNUPGHOME=gpg gpg --delete-secret-keys 1024D/1C9CF0A7 2048g/E4E9035C
46 GNUPGHOME=gpg gpg --delete-secret-keys 1C9CF0A7 E4E9035C
47 GNUPGHOME=gpg gpg --list-secret-keys
48 GNUPGHOME=gpg gpg --delete-secret-keys F6D289F6
49 GNUPGHOME=gpg gpg --list-secret-keys
50 GNUPGHOME=gpg gpg --list-keys
51 GNUPGHOME=gpg gpg --delete-keys F6D289F6 1C9CF0A7
52 GNUPGHOME=gpg gpg --list-keys
53 GNUPGHOME=gpg gpg --export 61EAB64A --armor
54 GNUPGHOME=gpg gpg --export 61EAB64A --armour
55 GNUPGHOME=gpg gpg --armour --export 61EAB64A
56 GNUPGHOME=gpg gpg --armour --export 61EAB64A > debian.rvmgroup.it.key.asc
57 ls
58 ls -al
59 sudo chmod o- gpg
60 chmod o- gpg
61 GNUPGHOME=gpg gpg --armour --export 61EAB64A
62 ls
63 chmod 700 gpg
64 GNUPGHOME=gpg gpg --armour --export 61EAB64A | xclip
65 GNUPGHOME=gpg gpg --armour --export 61EAB64A
66 ls
67 apt-key add < debian.rvmgroup.it.key.asc
68 cat debian.rvmgroup.it.key.asc
69 mv debian.rvmgroup.it.key.asc www/
70 ls
71 ls logs/packages.jessie.log
72 less logs/packages.jessie.log
73 ls
74 history +
75 history
re