Oħloq Repożitorju tal-Pakketti .deb f'Sourceforge.net Uża Għodda Reprepro f'Ubuntu
Reprepro hija għodda żgħira tal-linja tal-kmand biex toħloq u timmaniġġja repożitorji .deb faċilment, Illum se nkunu qed nuru kif toħloq repożitorji tal-pakketti Debian faċilment bl-użu ta' repropro u kif ittellah fuq Sourceforge.net billi tuża kmand rsync.
Pass 1: Installa Reprepro u Iġġenera Ċavetta
L-ewwel, installa l-pakketti kollha meħtieġa, billi tuża l-kmand apt-get li ġej.
$ sudo apt-get install reprepro gnupg
Issa trid tiġġenera ċavetta gpg billi tuża gnupg, biex tagħmel dan, applika dan il-kmand.
$ gpg --gen-key
Se jistaqsik xi mistoqsijiet, bħat-tip taċ-ċavetta li trid, kemm għandha tkun valida ċ-ċavetta, jekk ma tafx x'għandek twieġeb, ikklikkja Daħħal għall-għażliet awtomatiċi (rakkomandati ).
Naturalment, se jitloblek username u password, żommhom f'moħħok, għax ikollna bżonnhom aktar tard.
gpg (GnuPG) 1.4.14; Copyright (C) 2013 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Please select what kind of key you want: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) Your selection? RSA keys may be between 1024 and 4096 bits long. What keysize do you want? (2048) Requested keysize is 2048 bits Please specify how long the key should be valid. 0 = key does not expire = key expires in n days w = key expires in n weeks m = key expires in n months y = key expires in n years Key is valid for? (0) Key does not expire at all Is this correct? (y/N) Y You need a user ID to identify your key; the software constructs the user ID from the Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) <[email >" Real name: ravisaive Email address: [email Comment: tecmint You selected this USER-ID: "Ravi Saive (tecmint) <[email >" Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O You need a Passphrase to protect your secret key. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. +++++ gpg: key 2EB446DD marked as ultimately trusted public and secret key created and signed. gpg: checking the trustdb gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u pub 2048R/2EB446DD 2014-06-24 Key fingerprint = D222 B1C9 342E 5911 02B1 9147 3BD6 7918 2EB4 46DD uid Ravi Saive (tecmint) <[email > sub 2048R/7EF2F750 2014-06-24
Issa ċ-ċavetta tiegħek se tiġi ġġenerata, biex Iċċekkja jekk iva, mexxi dan il-kmand bħala privileġġi tal-għeruq.
$ sudo gpg --list-keys
/home/ravisaive/.gnupg/pubring.gpg ---------------------------------- pub 2048R/2EB446DD 2014-06-24 uid ravisaive (tecmint) <[email > sub 2048R/7EF2F750 2014-06-24
Pass 2: Oħloq Repożitorju tal-Pakketti u Ċavetta ta' Esportazzjoni
Nibdew ix-xogħol issa biex noħolqu r-repożitorju, l-ewwel trid toħloq xi folders, ir-repożitorju tagħna se jkun fid-direttorju /var/www/apt, allura ejja noħolqu xi folders.
$ sudo su # cd /var/www # mkdir apt # mkdir -p ./apt/incoming # mkdir -p ./apt/conf # mkdir -p ./apt/key
Issa għandek tesporta ċ-ċavetta li ħloqt fil-folder tar-repożitorju, mexxi.
# gpg --armor --export username [email >> /var/www/apt/key/deb.gpg.key
Nota: Ibdel l-isem tal-utent bl-isem tal-utent li daħħalt fil-pass t'hawn fuq, u [email bl-email tiegħek.
Għandna bżonn noħolqu fajl imsejjaħ \distribuzzjonijiet” ġewwa /var/www/apt/conf.
# touch /var/www/apt/conf/distributions
Żid dawn il-linji li ġejjin mal-fajl tad-distribuzzjonijiet u ssejvja l-fajl.
Origin: (yourname) Label: (name of repository) Suite: (stable or unstable) Codename: (the codename for the distribution you are using, like trusty) Version: (the version for the distribution you are using, like 14.04) Architectures: (the repository packages architecture, like i386 or amd64) Components: (main restricted universe multiverse) Description: (Some information about the repository) SignWith: yes
Sussegwentement, Ikollna noħolqu s-siġra tar-repożitorju, biex tagħmel dan, mexxi dawk il-kmandi.
# reprepro --ask-passphrase -Vb /var/www/apt export
Created directory "/var/www/apt/db" Exporting Trusty... Created directory "/var/www/apt/dists" Created directory "/var/www/apt/dists/Trusty" Created directory "/var/www/apt/dists/Trusty/universe" Created directory "/var/www/apt/dists/Trusty/universe/binary-i386" FF5097B479C8220C ravisaive (tecmint) <[email > needs a passphrase Please enter passphrase: Successfully created '/var/www/apt/dists/Trusty/Release.gpg.new' FF5097B479C8220C ravisaive (tecmint) <[email > needs a passphrase Please enter passphrase: Successfully created '/var/www/apt/dists/Trusty/InRelease.new'
Pass 3: Żid Pakketti ma' Repożitorju Maħluq Ġodda
Issa ħejji l-pakketti .deb tiegħek biex jiżdiedu mar-repożitorju. Mur fid-direttorju /var/www/apt, trid tagħmel dan kull darba li trid iżżid pakketti.
# cd /var/www/apt # reprepro --ask-passphrase -Vb . includedeb Trusty /home/ravisaive/packages.deb
Nota: Ibdel trusty bl-isem tal-kodiċi li daħħalt għar-repożitorju fil-fajl tad-distribuzzjonijiet, u ibdel /home/username/package.deb bit-triq għall-pakkett, int se tintalab biex tidħol il-passphrase.
/home/ravisaive/packages.deb : component guessed as 'universe' Created directory "./pool" Created directory "./pool/universe" Created directory "./pool/universe/o" Created directory "./pool/universe/o/ojuba-personal-lock" Exporting indices... FF5097B479C8220C ravisaive (tecmint) <[email > needs a passphrase Please enter passphrase: Successfully created './dists/Trusty/Release.gpg.new' FF5097B479C8220C ravisaive (tecmint) <[email > needs a passphrase Please enter passphrase: Successfully created './dists/Trusty/InRelease.new'
Il-pakkett tiegħek huwa miżjud mar-repożitorju, biex jitneħħa.
# reprepro --ask-passphrase -Vb /var/www/apt remove trusty package.deb
U ovvjament, għandek bżonn timmodifika l-kmand bl-isem tal-pakkett tiegħek u l-isem tal-kodiċi tar-repożitorju.
Pass 4: Tella' Repożitorju għal Sourceforge.net
Biex ittella’ r-repożitorju fuq Sourceforge.net, jeħtieġ li jkollok kont qed jaħdem hemm naturalment, u proġett li qed jaħdem, ejja nassumu li trid ittella’ r-repożitorju fuq http://sourceforge .net/projects/myfoo/testrepositoryfejn myfoo huwa l-isem tal-proġett tiegħek (isem UNIX, mhux URL, mhux it-Titolu), u testrepository huwa l-folder fejn trid ittella’ l-fajls fih, Aħna se nagħmlu dan billi tuża rsync kmand.
# rsync -avP -e ssh /var/www/apt/ [email :/home/frs/project/myfoo/testrepository/
Nota: Ibdel l-isem tal-utent bl-isem tal-utent tiegħek fuq sourceforge.net u myfoo mal-proġett tiegħek UNIX-name u testrepository bil-folder li trid taħżen il-fajls fih.
Issa dak ir-repożitorju tiegħek jittella' fuq http://sourceforge.net/projects/myfoo/testrepository, biex iżżidha mas-sistema installata tiegħek, l-ewwel trid timporta ċ-ċavetta tar-repożitorju, tkun f'< b>/var/www/apt/key/deb.gpg.key, iżda dik hija triq lokali u l-utenti għar-repożitorju tiegħek mhux se jkunu jistgħu jżiduha mas-sistemi tagħhom, għalhekk aħna se nkunu timporta ċ-ċavetta minn sourceforge.net.
$ sudo su # wget -O - http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key | apt-key add -
Tista' żżid ir-repożitorju faċilment issa mas-sistema tiegħek, tiftaħ /etc/apt/sources.list u żid din il-linja.
deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main
Nota: Ibdel myfoo mal-proġett tiegħek UNIX-Name, trusty bl-isem tal-kodiċi tar-repożitorju tiegħek, testrepository bil-folder li tella’ l-fajls fih, u main mal-komponenti tar-repożitorju li żidt fil-fajl tad-distribuzzjonijiet.
Sussegwentement, mexxi wara biex taġġorna l-lista tar-repożitorji.
$ sudo apt-get update
Prosit! Ir-repożitorju tiegħek huwa attiv! Issa tista 'tinstalla pakketti faċilment minnha jekk trid.