ഉബുണ്ടുവിലെ Reprepro ടൂൾ ഉപയോഗിച്ച് Sourceforge.net-ൽ ഒരു .deb പാക്കേജ് റിപ്പോസിറ്ററി സൃഷ്ടിക്കുക


.deb റിപ്പോസിറ്ററികൾ എളുപ്പത്തിൽ സൃഷ്uടിക്കുന്നതിനും നിയന്ത്രിക്കുന്നതിനുമുള്ള ഒരു ചെറിയ കമാൻഡ്-ലൈൻ ടൂളാണ് Reprepro, reprepro ഉപയോഗിച്ച് ഒരു ഡെബിയൻ പാക്കേജ് ശേഖരണങ്ങൾ എങ്ങനെ എളുപ്പത്തിൽ സൃഷ്uടിക്കാം, എങ്ങനെയെന്ന് ഇന്ന് നമ്മൾ കാണിക്കും. rsync കമാൻഡ് ഉപയോഗിച്ച് ഇത് Sourceforge.net-ലേക്ക് അപ്uലോഡ് ചെയ്യുക.

ഘട്ടം 1: Reprepro ഇൻസ്റ്റാൾ ചെയ്ത് കീ ജനറേറ്റ് ചെയ്യുക

ആദ്യം, ഇനിപ്പറയുന്ന apt-get കമാൻഡ് ഉപയോഗിച്ച് ആവശ്യമായ എല്ലാ പാക്കേജുകളും ഇൻസ്റ്റാൾ ചെയ്യുക.

$ sudo apt-get install reprepro gnupg

ഇപ്പോൾ നിങ്ങൾ gnupg ഉപയോഗിച്ച് ഒരു gpg കീ സൃഷ്ടിക്കേണ്ടതുണ്ട്, ഇത് ചെയ്യുന്നതിന്, ഈ കമാൻഡ് പ്രയോഗിക്കുക.

$ gpg --gen-key

നിങ്ങൾക്ക് ആവശ്യമുള്ള കീയുടെ തരം, കീ എത്രത്തോളം സാധുതയുള്ളതായിരിക്കണം എന്നിങ്ങനെയുള്ള ചില ചോദ്യങ്ങൾ ഇത് നിങ്ങളോട് ചോദിക്കും, എന്ത് ഉത്തരം നൽകണമെന്ന് നിങ്ങൾക്കറിയില്ലെങ്കിൽ, ഡിഫോൾട്ട് ഓപ്uഷനുകൾക്കായി Enter ക്ലിക്ക് ചെയ്യുക (ശുപാർശ ചെയ്യുന്നത് ).

തീർച്ചയായും, ഇത് നിങ്ങളോട് ഒരു ഉപയോക്തൃനാമവും പാസ്uവേഡും ആവശ്യപ്പെടും, അവ മനസ്സിൽ വയ്ക്കുക, കാരണം ഞങ്ങൾക്ക് അവ പിന്നീട് ആവശ്യമായി വരും.

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

ഇപ്പോൾ നിങ്ങളുടെ കീ ജനറേറ്റ് ചെയ്യപ്പെടും, അങ്ങനെയാണോ എന്ന് പരിശോധിക്കാൻ, ഈ കമാൻഡ് ഒരു റൂട്ട് പ്രത്യേകാവകാശമായി പ്രവർത്തിപ്പിക്കുക.

$ 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: ഒരു പാക്കേജ് ശേഖരണവും കയറ്റുമതി കീയും സൃഷ്ടിക്കുക

റിപ്പോസിറ്ററി സൃഷ്uടിക്കുന്നതിനുള്ള പ്രവർത്തനം ഞങ്ങൾ ഇപ്പോൾ ആരംഭിക്കും, ആദ്യം നിങ്ങൾ കുറച്ച് ഫോൾഡറുകൾ സൃഷ്uടിക്കണം, ഞങ്ങളുടെ ശേഖരം /var/www/apt ഡയറക്uടറിയിലായിരിക്കും, അതിനാൽ നമുക്ക് ചില ഫോൾഡറുകൾ സൃഷ്uടിക്കാം.

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

നിങ്ങൾ സൃഷ്ടിച്ച കീ റിപ്പോസിറ്ററി ഫോൾഡറിലേക്ക് കയറ്റുമതി ചെയ്യേണ്ടതുണ്ട്, പ്രവർത്തിപ്പിക്കുക.

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

ശ്രദ്ധിക്കുക: മുകളിലെ ഘട്ടത്തിൽ നിങ്ങൾ നൽകിയ ഉപയോക്തൃനാമം ഉപയോഗിച്ച് ഉപയോക്തൃനാമം മാറ്റിസ്ഥാപിക്കുക, കൂടാതെ നിങ്ങളുടെ ഇമെയിൽ ഉപയോഗിച്ച് [ഇമെയിൽ പരിരക്ഷിതം].

/var/www/apt/conf ഉള്ളിൽ \distributions എന്ന പേരിൽ ഒരു ഫയൽ നമുക്ക് സൃഷ്ടിക്കേണ്ടതുണ്ട്.

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

ഡിസ്ട്രിബ്യൂഷൻ ഫയലിലേക്ക് ഇനിപ്പറയുന്ന വരികൾ ചേർത്ത് ഫയൽ സേവ് ചെയ്യുക.

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

അടുത്തതായി, ഞങ്ങൾ റിപ്പോസിറ്ററി ട്രീ സൃഷ്ടിക്കേണ്ടതുണ്ട്, ഇത് ചെയ്യുന്നതിന്, ആ കമാൻഡുകൾ പ്രവർത്തിപ്പിക്കുക.

# 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: പുതുതായി സൃഷ്ടിച്ച ശേഖരത്തിലേക്ക് പാക്കേജുകൾ ചേർക്കുക

ഇപ്പോൾ നിങ്ങളുടെ .deb പാക്കേജുകൾ ശേഖരത്തിലേക്ക് ചേർക്കാൻ തയ്യാറാക്കുക. /var/www/apt ഡയറക്uടറിയിലേക്ക് പോകുക, ഓരോ തവണയും പാക്കേജുകൾ ചേർക്കാൻ നിങ്ങൾ ഇത് ചെയ്യണം.

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

ശ്രദ്ധിക്കുക: ഡിസ്ട്രിബ്യൂഷൻ ഫയലിലെ റിപ്പോസിറ്ററിക്കായി നിങ്ങൾ നൽകിയ കോഡ്നാമം വിശ്വസ്ത ഉപയോഗിച്ച് മാറ്റി പകരം പാക്കേജിലേക്കുള്ള പാത ഉപയോഗിച്ച് /home/username/package.deb മാറ്റിസ്ഥാപിക്കുക, നിങ്ങൾ പാസ്uഫ്രെയ്uസ് നൽകാൻ ആവശ്യപ്പെടും.

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

അത് നീക്കം ചെയ്യുന്നതിനായി നിങ്ങളുടെ പാക്കേജ് ശേഖരത്തിലേക്ക് ചേർത്തിരിക്കുന്നു.

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

തീർച്ചയായും, നിങ്ങളുടെ പാക്കേജ് നാമവും റിപ്പോസിറ്ററി കോഡ്നാമവും ഉപയോഗിച്ച് കമാൻഡ് പരിഷ്കരിക്കേണ്ടതുണ്ട്.

ഘട്ടം 4: Repository Sourceforge.net-ലേക്ക് അപ്uലോഡ് ചെയ്യുക

Sourceforge.net എന്നതിലേക്ക് ശേഖരം അപ്uലോഡ് ചെയ്യുന്നതിന്, നിങ്ങൾക്ക് തീർച്ചയായും അവിടെ ഒരു റൺ അക്കൌണ്ടും പ്രവർത്തിക്കുന്ന ഒരു പ്രോജക്uറ്റും ഉണ്ടായിരിക്കണം, http://sourceforge-ലേക്ക് ശേഖരം അപ്uലോഡ് ചെയ്യാൻ നിങ്ങൾ ആഗ്രഹിക്കുന്നുവെന്ന് കരുതുക. .net/projects/myfoo/testrepository ഇവിടെ myfoo നിങ്ങളുടെ പ്രോജക്റ്റ് നാമമാണ് (UNIX നാമം, URL അല്ല, തലക്കെട്ടല്ല), കൂടാതെ testrepository ആണ് നിങ്ങൾ ഫയലുകൾ അപ്uലോഡ് ചെയ്യാൻ ആഗ്രഹിക്കുന്ന ഫോൾഡർ, ഞങ്ങൾ ഇത് rsync ഉപയോഗിച്ച് ചെയ്യും കമാൻഡ്.

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

ശ്രദ്ധിക്കുക: sourceforge.net-ലെ നിങ്ങളുടെ ഉപയോക്തൃനാമം, myfoo എന്നിവ ഉപയോഗിച്ച് നിങ്ങളുടെ പ്രോജക്റ്റ് UNIX-നാമവും ടെസ്റ്റ്uറെപോസിറ്ററിയും ഉപയോഗിച്ച് ഫയലുകൾ സംഭരിക്കാൻ നിങ്ങൾ ആഗ്രഹിക്കുന്ന ഫോൾഡർ ഉപയോഗിച്ച് ഉപയോക്തൃനാമം മാറ്റിസ്ഥാപിക്കുക.

ഇപ്പോൾ നിങ്ങളുടെ റിപ്പോസിറ്ററി http://sourceforge.net/projects/myfoo/testrepository-ലേക്ക് അപ്uലോഡ് ചെയ്uതിരിക്കുന്നു, ഇത് നിങ്ങളുടെ ഇൻസ്റ്റോൾ ചെയ്ത സിസ്റ്റത്തിലേക്ക് ചേർക്കുന്നതിന്, ആദ്യം നിങ്ങൾ റിപ്പോസിറ്ററി കീ ഇറക്കുമതി ചെയ്യണം, അത് <-ൽ ആയിരിക്കും. b>/var/www/apt/key/deb.gpg.key, പക്ഷേ അതൊരു പ്രാദേശിക പാതയാണ്, നിങ്ങളുടെ ശേഖരത്തിനുള്ള ഉപയോക്താക്കൾക്ക് ഇത് അവരുടെ സിസ്റ്റങ്ങളിലേക്ക് ചേർക്കാൻ കഴിയില്ല, അതിനാലാണ് ഞങ്ങൾ sourceforge.net-ൽ നിന്ന് കീ ഇറക്കുമതി ചെയ്യുന്നു.

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

നിങ്ങൾക്ക് ഇപ്പോൾ നിങ്ങളുടെ സിസ്റ്റത്തിലേക്ക് എളുപ്പത്തിൽ റിപ്പോസിറ്ററി ചേർക്കാൻ കഴിയും, /etc/apt/sources.list തുറന്ന് ഈ വരി ചേർക്കുക.

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

ശ്രദ്ധിക്കുക: myfoo എന്നതിന് പകരം നിങ്ങളുടെ പ്രോജക്റ്റ് UNIX-Name, നിങ്ങളുടെ റിപ്പോസിറ്ററി കോഡ്uനാമം, testrepository ഉപയോഗിച്ച് നിങ്ങൾ ഫയലുകൾ അപ്uലോഡ് ചെയ്ത ഫോൾഡർ, പ്രധാനമായി നിങ്ങൾ വിതരണ ഫയലിലേക്ക് ചേർത്ത ശേഖരണ ഘടകങ്ങൾ എന്നിവ ഉപയോഗിച്ച് മാറ്റിസ്ഥാപിക്കുക.

അടുത്തതായി, റിപ്പോസിറ്ററികളുടെ ലിസ്റ്റ് അപ്uഡേറ്റ് ചെയ്യുന്നതിന് ഇനിപ്പറയുന്നത് പ്രവർത്തിപ്പിക്കുക.

$ sudo apt-get update

അഭിനന്ദനങ്ങൾ! നിങ്ങളുടെ ശേഖരം സജീവമാണ്! നിങ്ങൾക്ക് വേണമെങ്കിൽ അതിൽ നിന്ന് എളുപ്പത്തിൽ പാക്കേജുകൾ ഇൻസ്റ്റാൾ ചെയ്യാം.