Action disabled: source

Catatan Debianisasi H. Aftian

haftian atau H. Aftian, adalah sebuah utilitas untuk membuat Live USB installer BlankOn Linux dengan dukungan UEFI. Berikutini catatan saya mengemas haftian menjadi sebuah paket debian.

  • Pertama, yang saya lakukan adalah fork repository haftian dari akun pak Mohamad Anwari di GitHub.
  • Install berbagai perkakas yang diperlukan
  sudo apt-get install git-core devscripts build-essential fakeroot \
      debhelper gnupg pbuilder dh-make dpkg-dev ubuntu-dev-tools
  • Clone repository hasil fork tadi ke lokal
  git clone https://github.com/samsulmaarif/haftian.git haftian
  cd haftian
  • Buat skeleton untuk debianisasi
  dh_make -i --createorig -c gpl3 -e hay@samsul.web.id -p haftian_1.0 -n
  • Akan tercipta sebuah direktory baru bernama debian yang berisi beberapa file. Hapus beberapa file yang tidak digunakan.
  rm debian/*.ex
  rm debian/*.EX
  rm debian/README.Debian
  • Edit berkas control, sesuaikan isinya
samsul@studio:~/Dokumen/Projects/git/haftian$ cat debian/control 
Source: haftian
Section: admin
Priority: optional
Maintainer: Samsul Ma'arif <hay@samsul.web.id>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: https://github.com/samsulmaarif/haftian

Package: haftian
Architecture: all
Depends: ${misc:Depends}
Description: An utility to create a BlankOn UEFI bootable USB.
 Creating BlankOn Linux USB installer with UEFI support has never 
 been easier. 
 .
 This tool is a bash script primarly created by Mohammad Anwari 
 a.k.a mdamt a Software Engineer from TNISiber.id and a former 
 BlankOn Developer.
  • Selanjutnya berkas changelog, isinya
samsul@studio:~/Dokumen/Projects/git/haftian$ cat debian/changelog 
haftian (1.0-1blankon0) unstable; urgency=medium

  * Initial Release.

 -- Samsul Ma'arif <hay@samsul.web.id>  Sun, 07 May 2017 00:03:24 +0700
  • Berkas copyright isinya
samsul@studio:~/Dokumen/Projects/git/haftian$ cat debian/copyright 
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: haftian
Source: https://github.com/samsulmaarif/haftian

Files: *
Copyright: 2016 Mohamad Anwari <mdamt@di.blankon.in>
           2017 Samsul Ma'arif <hay@samsul.web.id>
License: GPL-3.0+

Files: debian/*
Copyright: 2017 Samsul Ma'arif <hay@samsul.web.id>
License: GPL-3.0+

License: GPL-3.0+
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 .
 This package is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License
 along with this program. If not, see <https://www.gnu.org/licenses/>.
 .
 On Debian systems, the complete text of the GNU General
 Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
  • Lalu berkas rules, berupa script Makefile sebagai berikut
samsul@studio:~/Dokumen/Projects/git/haftian$ cat  debian/rules 
#!/usr/bin/make -f

data=$(CURDIR)/data.zip
script=$(CURDIR)/haftian
readme=$(CURDIR)/README.md

DEST1=$(CURDIR)/debian/haftian/usr/local/bin/
DEST2=$(CURDIR)/debian/haftian/usr/local/share/haftian/
DEST3=$(CURDIR)/debian/haftian/usr/local/share/doc/haftian/

build: build-stamp

build-stamp: 
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean


install: build clean $(data) $(script) $(readme)
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs


	mkdir -m 755 -p $(DEST1)
	mkdir -m 755 -p $(DEST2)
	mkdir -m 755 -p $(DEST3)


	install -m 666 $(data) $(DEST2) 
	install -m 777 $(script) $(DEST1)
	install -m 666 $(readme) $(DEST3)

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
  • Jalankan juga berintah berikut
  echo "1.0" > debian/source/format
  • Sampai di sini, paket sudah dapat dikemas
  dpkg-buildpackage -rfakeroot
  • Begini output yang muncul di mesin saya
samsul@studio:~/Dokumen/Projects/git/haftian$ dpkg-buildpackage -rfakeroot
dpkg-buildpackage: source package haftian
dpkg-buildpackage: source version 1.0-1blankon0
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Samsul Ma'arif <hay@samsul.web.id>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build haftian
 fakeroot debian/rules clean
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
 dpkg-source -b haftian
dpkg-source: warning: native package version may not have a revision
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building haftian in haftian_1.0-1blankon0.tar.xz
dpkg-source: info: building haftian in haftian_1.0-1blankon0.dsc
 debian/rules build
dh_testdir
touch build-stamp
 fakeroot debian/rules binary
dh_testdir
dh_testroot
rm -f build-stamp
dh_clean
dh_testdir
dh_testroot
dh_prep
dh_installdirs
mkdir -m 755 -p /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/bin/
mkdir -m 755 -p /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/share/haftian/
mkdir -m 755 -p /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/share/doc/haftian/
install -m 666 /home/samsul/Dokumen/Projects/git/haftian/data.zip /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/share/haftian/ 
install -m 777 /home/samsul/Dokumen/Projects/git/haftian/haftian /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/bin/
install -m 666 /home/samsul/Dokumen/Projects/git/haftian/README.md /home/samsul/Dokumen/Projects/git/haftian/debian/haftian/usr/local/share/doc/haftian/
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: membuat paket 'haftian' di dalam '../haftian_1.0-1blankon0_all.deb'.
 dpkg-genchanges  >../haftian_1.0-1blankon0_amd64.changes
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build haftian
dpkg-buildpackage: full upload; Debian-native package (full source is included)
 signfile haftian_1.0-1blankon0.dsc
gpg: skipped "Samsul Ma'arif <hay@samsul.web.id>": No secret key
gpg: dpkg-sign.mYKDYAN8/haftian_1.0-1blankon0.dsc: clearsign failed: No secret key

dpkg-buildpackage: error: failed to sign .dsc and .changes file
  • Muncul pesan error karena saya tidak membuat tanda tangan digital. Meski demikian, paket debian sudah berhasil dibuat yang hasilnya tersimpan di direktori di atasnya. Seperti terlihat di sini
samsul@studio:~/Dokumen/Projects/git/haftian$ ls ../haftian_1.0-1blankon0*
../haftian_1.0-1blankon0_all.deb      ../haftian_1.0-1blankon0_amd64.changes  ../haftian_1.0-1blankon0.tar.gz
../haftian_1.0-1blankon0_amd64.build  ../haftian_1.0-1blankon0.dsc            ../haftian_1.0-1blankon0.tar.xz
  • Paket dapat diinstall dengan
  cd ..
  sudo dpkg -i haftian_1.0-1blankon0_all.deb
  sudo apt-get install -f

Demikian catatan kali ini, semoga bermanfaat. 8-) 8-) 8-)

  • linux/Catatan.Debianisasi.H.Aftian
  • Terakhir diubah: 10 bulan yang lalu
  • (Perubahan eksternal)