Ṣẹda Ibi ipamọ Apo “.deb” ni Sourceforge.net Lilo Irinṣẹ “Reprepro” ni Ubuntu


Refrepro jẹ ọpa laini aṣẹ kekere lati ṣẹda ati ṣakoso awọn ibi ipamọ .deb ni rọọrun, Loni a yoo ṣe afihan bawo ni a ṣe le ṣẹda awọn ibi ipamọ package Debian ni rọọrun nipa lilo atunṣe ati bii gbee si Sourceforge.net nipa lilo pipaṣẹ rsync .

Igbesẹ 1: Fi sori ẹrọ Reprepro ati Key Key

Ni akọkọ, fi gbogbo awọn idii ti o nilo sii, ni lilo pipaṣẹ-gba atẹle wọnyi.

$ sudo apt-get install reprepro gnupg

Bayi o nilo lati ṣe agbejade bọtini gpg nipa lilo gnupg , lati ṣe eyi, lo aṣẹ yii.

$ gpg --gen-key

Yoo beere diẹ ninu awọn ibeere fun ọ, bii iru bọtini ti o fẹ, bawo ni bọtini yẹ ki o jẹ deede, ti o ko ba mọ kini lati dahun, kan tẹ Tẹ fun awọn aṣayan aiyipada (niyanju ).

Nitoribẹẹ, yoo beere fun ọ fun orukọ olumulo ati ọrọ igbaniwọle kan, tọju awọn wọnni ni lokan, nitori a yoo nilo wọn nigbamii.

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

Bayi bọtini rẹ yoo wa ni ipilẹṣẹ, lati Ṣayẹwo ti o ba jẹ bẹ, ṣiṣe aṣẹ yii bi awọn anfani ipilẹ.

$ 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

Igbesẹ 2: Ṣẹda Ibi ipamọ Package ati Kokoro si ilẹ okeere

A yoo bẹrẹ iṣẹ ni bayi lati ṣẹda ibi ipamọ, akọkọ o ni lati ṣẹda diẹ ninu awọn folda, ibi ipamọ wa yoo wa ni itọsọna /var/www/apt , nitorina jẹ ki a ṣẹda awọn folda kan.

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

O ni bayi lati gbe okeere bọtini ti o ṣẹda si folda ibi ipamọ, ṣiṣe.

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

Akiyesi: Rọpo orukọ olumulo pẹlu orukọ olumulo ti o tẹ ni igbesẹ ti o wa loke, ati [imeeli ti o ni aabo] pẹlu imeeli rẹ.

A nilo lati ṣẹda faili kan ti a pe ni\" awọn pinpin " ni inu /var/www/apt/conf .

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

Ṣafikun awọn ila atẹle wọnyi si faili awọn pinpin ki o fi faili naa pamọ.

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

Nigbamii ti, A yoo ni lati ṣẹda igi ifipamọ, lati ṣe eyi, ṣiṣe awọn aṣẹ wọnyẹn.

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

Igbesẹ 3: Ṣafikun Awọn idii si Ibi ipamọ Ti a Ṣẹda Titun

Bayi mura awọn apejọ .deb rẹ lati fi kun si ibi ipamọ. Lọ si itọsọna /var/www/apt , o ni lati ṣe eyi nigbakugba ti o ba fẹ ṣafikun awọn idii.

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

Akiyesi: Rọpo igbẹkẹle pẹlu orukọ coden ti o tẹ sii fun ibi ipamọ ninu faili awọn pinpin, ki o rọpo /home/username/package.deb pẹlu ọna si package, iwọ yoo beere fun ọrọ igbaniwọle lati tẹ.

/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 fi kun package rẹ si ibi ipamọ, lati yọ kuro.

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

Ati pe dajudaju, o nilo lati yipada aṣẹ pẹlu orukọ package rẹ ati orukọ orukọ ibi ipamọ.

Igbese 4: Fi ibi ipamọ si Sourceforge.net

Lati gbe ibi ipamọ si Sourceforge.net , o nilo lati ni akọọlẹ ti n ṣiṣẹ nibẹ dajudaju, ati iṣẹ akanṣe kan, jẹ ki a ro pe o fẹ gbe ibi ipamọ si http:// sourceforge .net/project/myfoo/testrepository nibiti myfoo jẹ orukọ iṣẹ akanṣe rẹ (orukọ UNIX, kii ṣe URL, kii ṣe Akọle naa), ati ibi ipamọ idanwo ni folda ti o fẹ gbe awọn faili si, A yoo ṣe eyi nipa lilo rsync pipaṣẹ.

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

Akiyesi: Rọpo orukọ olumulo pẹlu orukọ olumulo rẹ lori sourceforge.net ati myfoo pẹlu iṣẹ rẹ UNIX-orukọ ati ibi ipamọ idanwo pẹlu folda ti o fẹ lati tọju awọn faili sinu.

Nisisiyi a ti gbe ibi ipamọ rẹ si http://sourceforge.net/projects/myfoo/testrepository , lati ṣafikun rẹ si ẹrọ ti o fi sii, akọkọ o ni lati gbe bọtini ibi ipamọ wọle, yoo wa ni < b> /var/www/apt/key/deb.gpg.key , ṣugbọn iyẹn jẹ ọna agbegbe kan ati pe awọn olumulo fun ibi ipamọ rẹ kii yoo ni anfani lati ṣafikun rẹ si awọn eto wọn, iyẹn ni idi ti a yoo ṣe jẹ akowọle bọtini lati sourceforge.net.

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

O le ṣafikun ibi ipamọ ni irọrun bayi si eto rẹ, ṣii /etc/apt/sources.list ki o fi ila yii kun.

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

Akiyesi: Rọpo myfoo pẹlu iṣẹ rẹ UNIX-Orukọ, igbẹkẹle pẹlu orukọ coden ibi ipamọ rẹ, ibi ipamọ idanwo pẹlu folda ti o gbe awọn faili sinu, ati akọkọ pẹlu awọn paati ibi ipamọ ti o ṣafikun si faili awọn pinpin.

Nigbamii, ṣiṣe atẹle lati ṣe imudojuiwọn akojọ awọn ibi ipamọ.

$ sudo apt-get update

Oriire! Ibi ipamọ rẹ ti n ṣiṣẹ! O le bayi fi awọn idii sii ni rọọrun lati inu rẹ ti o ba fẹ.