Dev/Build Documentation/security-misc/easy

From Kicksecure
Jump to navigation Jump to search

The build process of building any of the packages by Kicksecure developers is always very similar. This very wiki page explain how to build package security-misc. By replacing the name of the package security-misc with the name of any other package you might be interested in building, the other package would be build. You have two options.

OR

Get Build Dependencies[edit]

Update your package lists.

Click = Copy Copied to clipboard! sudo apt update

Install from Debian repository.

Click = Copy Copied to clipboard! sudo apt install build-essential devscripts git

Change Directory to Build Folder[edit]

This chapter is recommended for better usability, but is not strictly required. [1]

Create folder ~/security-misc-build.

Click = Copy Copied to clipboard! mkdir -p ~/security-misc-build

Change directory to folder ~/security-misc-build.

Click = Copy Copied to clipboard! cd ~/security-misc-build

Get the Source Code[edit]

Get the the package's source code.

Click = Copy Copied to clipboard! git clone https://github.com/Kicksecure/security-misc.git

Remember it is Kicksecure, not kicksecure! If you are prompted for a username for github, it means you have mistyped the web address.

Change Directory to Source Code Folder[edit]

Get into the package's source code folder because later on package build commands are expected to be run from the root of the source folder.

Click = Copy Copied to clipboard! cd security-misc

Choose Version[edit]

This is optional in case you want to build from master branch.

Do not use version 0.1 but a sensible version number.

Click = Copy Copied to clipboard! git checkout 0.1

Build the Package[edit]

Click = Copy Copied to clipboard! dpkg-buildpackage -b

Build Result[edit]

When a package is build using dpkg-buildpackage the resulting packages will be created in the parent folder. I.e. in this case in the ~/security-misc-build folder.

Click = Copy Copied to clipboard! ls ../

Should show something like this.

security-misc security-misc0.1-1_amd64.buildinfo security-misc0.1-1_amd64.changes

Installation[edit]

Click = Copy Copied to clipboard! sudo dpkg -i ../security-misc_0.1-1_amd64.deb

Clean Up[edit]

Delete temporary files debhelper files in package source folder as well as debhelper artifacts (.deb file etc.) in parent folder.

1) Show extraneous (temporary files debhelper) files.

Click = Copy Copied to clipboard! git clean -ndff

2) NOTE: Read above output carefully if you added files of your own files to that folder.

If that looks good, actually remove.

Click = Copy Copied to clipboard! git clean -dff

3) Delete debhelper artifacts (.deb file etc.) in parent folder.

TODO: document

Footnotes[edit]

  1. When a package is build using dpkg-buildpackage the resulting packages will be created in the parent folder. It's better for usability if this is not the user's home folder since many other files may already reside there. Thereby making the build result files more difficult to find or delete. This is a missing Debian feature. See: dpkg-buildpackage: support output directory other than ..archive.org

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!