Now we know how to package scripts to deb files, let's have a look at making our own meta-packages for Kali.
It's a quick way of configuring a custom system, or setting up a lot of machines without a lof of work. Simply create a repo, make a couple of meta-packages, and drink coffee while APT takes care of the rest :)
First let's install devscripts package, we'll need it.
apt install devscripts
Next we clone the kali-meta package from the official Kali git repo.
git clone git://gitlab.com/kalilinux/packages/kali-meta
Cloning into 'kali-meta'...
remote: Counting objects: 998, done.
remote: Compressing objects: 100% (809/809), done.
remote: Total 998 (delta 365), reused 0 (delta 0)
Receiving objects: 100% (998/998), 179.90 KiB | 570.00 KiB/s, done.
Resolving deltas: 100% (365/365), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
So, it bitches about "unable to checkout. Let's fix that.
cd kali-meta/
git checkout kali/master
Branch 'kali/master' set up to track remote branch 'kali/master' from 'origin'.
Switched to a new branch 'kali/master'
root@xeon:~/kali-meta#
We need to change the /debian/control file. Here's an example file
root@xeon:~/kali-meta# tail -n 14 debian/control
Package: kali-linux-multimedia
Architecture: any
Depends: ${misc:Depends},
kali-linux,
ardour,
tap-plugins,
Description: Ardour and multimedia
This is Kali Linux, the most advanced penetration testing and security
auditing distribution.
.
This will install Ardour DAW and TAP-Plugins.
Now we bump the version number. We use dch for that, and edit the debian/changelog file
root@xeon:~/kali-meta# dch --local nx
root@xeon:~/kali-meta# head -n 5 debian/changelog
kali-meta (2018.3.2nx) UNRELEASED; urgency=medium
* Added kali-linux-multimedia
-- nx <This email address is being protected from spambots. You need JavaScript enabled to view it.> fri, 13 Mar 2020 09:40:10 -0600
And let's build a package with
dpkg-buildpackage -us -uc -b
That should be it :)