Debian Packages |
Membangunan Lumbung Paket dengan reprepro, ini bisa untuk debian dan turunannya:
- Membuat sebuah akun yang bernama arsip
Tambahkan akun baru:
$ sudo adduser arsip
$ su – arsip
- Install aplikasi-aplikasi pendukung
$ sudo apt-get install reprepro nginx haveged
- Mengenerate Kunci GnuPG untuk paket yang akan ditandatangani.
arsip@repo:~$ gpg --gen-keyCatatan: Ikuti perintah sampai selesai dan hasil dari perintah diatas adalah berkas-berkas yang berada pada ~/.gnupg/
arsip@repo:~$ gpg --gen-keygpg (GnuPG) 1.4.20; Copyright (C) 2015 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? 1RSA keys may be between 1024 and 4096 bits long.What keysize do you want? (2048)Requested keysize is 2048 bitsPlease specify how long the key should be valid.0 = key does not expire<n> = key expires in n days<n>w = key expires in n weeks<n>m = key expires in n months<n>y = key expires in n yearsKey is valid for? (0)Key does not expire at allIs this correct? (y/N) yYou need a user ID to identify your key; the software constructs the user IDfrom the Real Name, Comment and Email Address in this form:"Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"Real name: Belajar RepoEmail address: belajar@emhaye.gaComment: RepositoryYou selected this USER-ID:"Belajar Repo (Repository) <belajar@emhaye.ga>"Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? oYou need a Passphrase to protect your secret key.gpg: gpg-agent is not available in this sessionYou don't want a passphrase - this is probably a *bad* idea!I will do it anyway. You can change your passphrase at any time,using this program with the option "--edit-key".We need to generate a lot of random bytes. It is a good idea to performsome other action (type on the keyboard, move the mouse, utilize thedisks) during the prime generation; this gives the random numbergenerator a better chance to gain enough entropy.......................+++++........+++++We need to generate a lot of random bytes. It is a good idea to performsome other action (type on the keyboard, move the mouse, utilize thedisks) during the prime generation; this gives the random numbergenerator a better chance to gain enough entropy.+++++..+++++gpg: /home/bel/.gnupg/trustdb.gpg: trustdb createdgpg: key 1D8FF8E7 marked as ultimately trustedpublic and secret key created and signed.gpg: checking the trustdbgpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust modelgpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1upub 2048R/1D8FF8E7 2016-05-26Key fingerprint = 9C0E A1C1 41D4 8295 35FE D0E1 116B 0A46 1D8F F8E7uid Belajar Repo (Repository) <belajar@emhaye.ga>sub 2048R/1F828DF8 2016-05-26
- Konfigurasi Nginx
Buat berkas dan tautkan ke /etc/nginx/site-enabled/arsip
$ sudo nano /etc/nginx/site-available/arsipIsi dengan :
server {Lakukan symlink konfigurasi nginx
listen 80;
server_name $DOMAIN;
access_log /var/log/nginx/arsip.access.log;
location / {
root /home/arsip/repo/;
index index.html index.htm;
autoindex on;
}
}
$ sudo ln -s /etc/nginx/site-available/arsip /etc/nginx/site-enabled/arsipRestart Nginx
$ sudo /etc/init.d/nginx restart
- Konfigurasi Reprepro
Buat direktory untuk area kerja reprepro
$ mkdir -p /home/arsip/reprepro/confPeriksa gpg key yang sudah dibuat tadi
$ cd /home/arsip/reprepro/conf
$ gpg --list-keys
/home/bel/.gnupg/pubring.gpg
----------------------------
pub 2048R/1D8FF8E7 2016-05-26
uid Belajar Repo (Repository) <belajar@emhaye.ga>
sub 2048R/1F828DF8 2016-05-26
Export pgp/gpg
$ gpg --armor --output arsip-archive-keyring.gpg --export belajar@emhaye.gaKeguanaan ini untuk didistribusikan ke client atau bisa juga dengan memaketkan dan masukkan ke dalam repo.
Buat berkas distribusi
$ nano distributionsIsi seperti berikut dan disesuaikan dengan kebutuhan
Origin: BlankonBuat berkas Options
Label: Blankon
Codename: nusantara
Suite: nusantara
Components: main restricted extras extras-restricted
UDebComponents: main
Architectures: i386 amd64 source
Version: 1.0
Description: BlankOn 1.0 nusantara
# Jangan kasih "-" di kolom Update, nanti paket2 khas2 akan dihapus
Update: merge.nusantara
SignWith: yes
DebIndices: Packages Release . .gz .bz2 tiffany.py
UDebIndices: Packages . .gz .bz2
DscIndices: Sources Release . .gz .bz2 tiffany.py
Contents: udebs nodebs . .gz
ContentsArchitectures: i386 amd64
ContentsComponents: main restricted extras extras-restricted
ContentsUComponents: main
Log: nusantara.log
--type=dsc changelogs
$ nano optionsIsi dengan
basedir /home/arsip/reprepro
confdir /home/arsip/reprepro/conf
dbdir /home/arsip/reprepro/db
outdir /home/arsip/repo/blankon/
gnupghome /home/arsip/.gnupg
Buat berkas Updates
$ nano updatesIsi dengan
Name: merge.nusantaraUntuk berkas tiffany.py bisa langsung diunduh dari repo github dotovr
Suite: nusantara
VerifyRelease: blindtrust
Method: http://$DOMAIN/blankon
Architectures: i386 amd64 source
Components: main restricted extras extras-restricted
- Cara Penggunaan Repo
a. Update repo
Menjadi Pengguna arsip:
$ sudo su – arsip
Masuk ke reprepro
arsip@repo:$ cd /home/arsip/reprepro/
arsip@repo:$ reprepro -v -v -v update nusantara
b. Membuat berkas indez Packages.gz Source.gz
$ reprepro export nusantara
c. Memasukkab berkas .deb/.Udeb Sources dengan berkas .changes
$ reprepro -C COMPONENT -P PRIORITY -S SECTION include DIST /PATH/TO/PACKAGE.changes
d. Memasuukan paket .deb
$ reprepro -C COMPONENT -P PRIORITY -S SECTION includedeb DIST /PATH/TO/PACKAGE.deb
e. Memasukkan paket debian-installer (udeb)
$ reprepro -C COMPONENT -P PRIORITY -S SECTION includeudeb DIST /PATH/TO/PACKAGE.udeb
f. Memasukkan Kode Sumber
$ reprepro -C COMPONENT -P PRIORITY -S SECTION includedsc DIST /PATH/TO/PACKAGE.dsc
g. Menghapus Paket
$ reprepro remove DIST NAMA_PAKET
h. Membekukan Rilis
Tambahkan opsi ReadOnly dan hilangkan tiffany.py , pada distributions contoh:
Origin: Blankon
Label: Blankon
Codename: nusantara
Suite: nusantara
....
ReadOnly: Yes <-------------
Hasil Pekerjaan:
http://$DOMAIN/blankon/bisa dipasang di /etc/apt/sources.lis
deb http://$DOMAIN/blankon nusantara main restricted extras extras-restricted
deb-src http://$DOMAIN/blankon nusantara main restricted extras extras-restricted
Keterangan:
deb: Binary DebDari client coba lakukan update dan pasang package
deb-src: Source
http://$DOMAIN/blankon : Alamat Repo
nusantara: Dist/Nama Rilis
main: Repo Utama Bebas
restricted: Repo Utama Terbatas Lisensinya
extras: Repo Komunitas
extras-restricted: Repo Komunitas Terbatas Lisensinya
$ sudo apt-get update
$ sudo apt-get install nusantara-keyring
dan install aplikasi-aplikasi lainnya, baik dengan apt-get, aptitude, synaptic atau software
center, jika tidak ada galat/error maka repo sudah siap digunakan.
2 comments
Click here for commentsGagal tidak bisa install
Reply$ sudo apt-get install reprepro nginx haveged
repositori blankon tambora error
Terkait repo blankon tambora silahkan baca milis ada informasi
ReplyConversionConversion EmoticonEmoticon