Ubuntu-da Reprepro guralyny ulanyp, Sourceforge.net-de .deb paket ammary dörediň


Reprepro .deb ammarlaryny döretmek we dolandyrmak üçin kiçijik buýruk setiri guraly, bu gün reprepro ulanyp aňsatlyk bilen Debian paket ammarlaryny nädip döretmelidigini we nädip etmelidigini görkezeris. rsync buýrugyny ulanyp, Sourceforge.net-e ýükläň.

1-nji ädim: Reprepro guruň we açary dörediň

Ilki bilen, aşakdaky apt-get buýrugyny ulanyp, ähli zerur paketleri guruň.

$ sudo apt-get install reprepro gnupg

Indi muny etmek üçin bu buýrugy ulanyp, gnupg ulanyp gpg düwmesini döretmeli.

$ gpg --gen-key

Size isleýän açaryňyzyň görnüşi, açaryň näçe wagt dogry bolmalydygy ýaly käbir soraglar berer, näme jogap berjegiňizi bilmeseňiz, deslapky saýlawlar üçin Enter basyň (maslahat berilýär ).

Elbetde, ulanyjy adyny we parolyny soraýar, ýatda saklaň, sebäbi soňrak olara mätäç bolarys.

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

Indi açaryňyz dörediler, munuň bardygyny ýa-da ýokdugyny barlamak üçin bu buýrugy kök artykmaçlygy hökmünde işlediň.

$ 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

2-nji ädim: Paket ammaryny we eksport açaryny dörediň

Ammary döretmek üçin indi işe başlarys, ilki käbir bukjalary döretmeli, ammarymyz /var/www/apt katalogynda bolar, geliň, käbir bukjalary döredeliň.

$ sudo su
# cd /var/www
# mkdir apt
# mkdir -p ./apt/incoming 
# mkdir -p ./apt/conf
# mkdir -p ./apt/key

Indi döreden açaryňyzy ammar bukjasyna eksport etmeli, işlediň.

# gpg --armor --export username [email  >> /var/www/apt/key/deb.gpg.key

Bellik: Ulanyjy adyny ýokardaky ädimde girizen ulanyjy adyňyz bilen we e-poçtaňyz bilen [e-poçta bilen goralan] çalyşyň.

/var/www/apt/conf içinde\ paýlamalar atly bir faýl döretmeli.

# touch /var/www/apt/conf/distributions

Aşakdaky setirleri paýlaýyş faýlyna goşuň we faýly ýazdyryň.

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

Ondan soň, bu buýruklary işletmek üçin ammar agajyny döretmeli bolarys.

# 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'

3-nji ädim: Täze döredilen ammarda paket goşuň

Indi ammara goşuljak .deb paketleriňizi taýýarlaň. /var/www/apt katalogyna giriň, her gezek paket goşmak isläniňizde etmeli.

# cd /var/www/apt
# reprepro --ask-passphrase -Vb . includedeb Trusty /home/ravisaive/packages.deb

Bellik: paýlaýyş faýlyndaky ammar üçin girizen kod adyňyz bilen ygtybarly çalyşyň we paketiň ýoly bilen /home/username/package.deb çalyşyň giriş koduny soramaly.

/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'

Aýyrmak üçin bukjanyňyz ammarda goşulýar.

# reprepro --ask-passphrase -Vb /var/www/apt remove trusty  package.deb

Elbetde, buýrugy paketiňiziň ady we ammar kod ady bilen üýtgetmeli.

4-nji ädim: Ammaryny Sourceforge.net-e ýükläň

Ammaryny Sourceforge.net -e ýüklemek üçin elbetde şol ýerde işleýän hasabyňyz we işleýän taslamaňyz bolmaly, ammary http:// sourceforge ýüklemek isleýärsiňiz öýdýän. .net/projects/myfoo/testrepository bu ýerde myfoo siziň taslama adyňyzdyr (UNIX ady, URL däl, ady däl) we testrepository faýllary ýüklemek isleýän bukjadyr, muny rsync ulanyp ederis buýruk.

# rsync -avP -e ssh /var/www/apt/ [email :/home/frs/project/myfoo/testrepository/

Bellik: Ulanyjy adyny sourceforge.net we myfoo ulanyjy adyňyz bilen UNIX ady we testrepository bilen faýllary saklamak isleýän bukjanyňyz bilen çalyşyň.

Indi ammaryňyza http://sourceforge.net/projects/myfoo/testrepository ýüklenensoň, gurlan ulgamyňyza goşmak üçin ilki bilen ammar açaryny import etmeli bolarsyňyz, ol /var/www/apt/key/deb.gpg.key , ýöne bu ýerli ýol we ammaryňyzdaky ulanyjylar ony öz ulgamlaryna goşup bilmezler, şonuň üçinem bolarys açary sourceforge.net-den import etmek.

$ sudo su
# wget -O - http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key | apt-key add -

Ammaryny indi ulgamyňyza aňsatlyk bilen goşup bilersiňiz, /etc/apt/sources.list açyp, şu setiri goşup bilersiňiz.

deb http://sourceforge.net/projects/myfoo/testrepository/apt/key/deb.gpg.key trusty main

Bellik: Myfoo-ny UNIX-Name taslamaňyz bilen çalyşyň, ammar kod adyňyz bilen ygtybarly, faýllary ýüklän bukjanyňyz bilen testrepository we esasy paýlaýyş faýlyna goşan ammar komponentleriňiz bilen çalşyň.

Ondan soň, ammarlaryň sanawyny täzelemek üçin aşakdakylary işlediň.

$ sudo apt-get update

Gutlaýarys! Ammaryňyz işjeň! Indi isleseňiz paketleri aňsatlyk bilen gurup bilersiňiz.