{"id":418052,"date":"2024-06-30T01:56:09","date_gmt":"2024-06-30T01:56:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=418052"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T01:56:09","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=418052","title":{"rendered":"<span>Make first deb-src package by example cri-o<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ep\/-f\/9k\/ep-f9khpe6f1dfbi340z2fyl9w8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ep\/-f\/9k\/ep-f9khpe6f1dfbi340z2fyl9w8.png\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"overview\">Overview<\/h2>\n<p>  <\/p>\n<p>Once every true-linux engineer gets a trouble: there is no any software in his distro or it&#8217;s built without needed options. I am keen on the phrase: &#171;Only source control gives you freedom&#187;.<\/p>\n<p>  <\/p>\n<p>Of course, you can build this software on your computer without any src-packages, directly (with simplification: configure, make, make install). But it&#8217;s a non-reproducible solution, also hard for distribution.<\/p>\n<p>  <\/p>\n<p>The better way is to make distro-aligned package that can be built if needed and that produces lightly distributed binary-packages. It&#8217;s about debian-source packages(debian,ubuntu,etc), pkgbuild (for arch), ebuild for gentoo, src-rpm for red hat-based, and many others.<\/p>\n<p>  <\/p>\n<p>I will use <a href=\"https:\/\/cri-o.io\/\" rel=\"nofollow noopener noreferrer\">cri-o<\/a> like a specimen.<\/p>\n<p>  <\/p>\n<p>Before reading the text below I strongly recommend to get familiarized with the official Debian policy manual placed <a href=\"https:\/\/www.debian.org\/doc\/debian-policy\/\" rel=\"nofollow noopener noreferrer\">here<\/a> and debhelper <a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/debhelper.7.html\" rel=\"nofollow noopener noreferrer\">manpage<\/a>.<\/p>\n<p>  <\/p>\n<p>Also you will be required to setup some variables like DEBMAIL and DEBFULLNAME for proper data in changelog and other places.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"theory\">Theory<\/h2>\n<p>  <\/p>\n<p>Everything looks pretty simple. You should make a source-package with a source code, instructions how to build, patches, control files and some additional files that you may need.<\/p>\n<p>  <\/p>\n<p>I will not try to describe all potential variants, you can find them in debian policy. I see no pros to retype debian manuals.<br \/>  I would like to highlight only crucial files:<\/p>\n<p>  <\/p>\n<ul>\n<li>control: file with mandatory information like package name, version, source, checksums, other data<\/li>\n<li>rules: make-file with instructions how to build software<\/li>\n<li>patches \u2014 directory with your patches for software. According to using quilt patch management system, you must have this directory with series file or build will fail.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"git-interaction-schema\">Git interaction schema<\/h2>\n<p>  <\/p>\n<p>Ok, this part is important. Usually in articles authors write how-to build package only once. But information on how-to maintain it, how to produce new versions again, again and again is missing.<\/p>\n<p>  <\/p>\n<p>I prefer to use such tips:<\/p>\n<p>  <\/p>\n<ul>\n<li>store ready src-deb and binary-deb in repo (everybody does it)<\/li>\n<li>make separate git for your debian-dir with files for source-package<\/li>\n<li>create and use additional target in rules:<br \/> \n<ul>\n<li>src-clean to clean &#171;vanilla&#187; source codes<\/li>\n<li>src-get to get &#171;vanilla&#187; source codes from original package git<\/li>\n<li>build-clean, to clean binary packages(useful for development and testing process)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>Therefore there are 2 gits:<\/p>\n<p>  <\/p>\n<ul>\n<li>original software git, called vanilla<\/li>\n<li>your git with debian dir for package creation<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"environment-preparation\">Environment preparation<\/h2>\n<p>  <\/p>\n<p>First of all, you need to prepare your DEBMAIL and DEBFULLNAME vars. You can do it in ~\/.bashrc<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">sed -i '\/DEBEMAIL\/d' ~\/.bashrc sed -i '\/DEBFULLNAME\/d' ~\/.bashrc  cat &lt;&lt; EOF | tee -a ~\/.bashrc 2>\/dev\/null DEBEMAIL=\"skif@skif-web.ru\" DEBFULLNAME=\"Alexey Lukyanchuk\" export DEBEMAIL DEBFULLNAME EOF  source ~\/.bashrc<\/code><\/pre>\n<p>  <\/p>\n<p>Second step is config for quilt:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cat &lt;&lt; EOF |tee  ~\/.quiltrc 2>\/dev\/null QUILT_PATCHES=debian\/patches QUILT_NO_DIFF_INDEX=1 QUILT_NO_DIFF_TIMESTAMPS=1 QUILT_REFRESH_ARGS=\"-p ab\" QUILT_DIFF_ARGS=\"--color=auto\" # If you want some color when using `quilt diff`. QUILT_PATCH_OPTS=\"--reject-format=unified\" QUILT_COLORS=\"diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33\" EOF<\/code><\/pre>\n<p>  <\/p>\n<p>And I detest visual mode in vim, so<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">touch ~\/.vimrc sed -i '\/^set mouse\/d' ~\/.vimrc echo \"set mouse-=a\" >> ~\/.vimrc<\/code><\/pre>\n<p>  <\/p>\n<p>And don&#8217;t forget to setup your git variables. Full explanation may be found <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Getting-Started-First-Time-Git-Setup\" rel=\"nofollow noopener noreferrer\">here<\/a>, I will do it in fast way:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">git config --global user.email \"skif@skif-web.ru\" git config --global user.name \"Alexey Lukyanchuk\"<\/code><\/pre>\n<p>  <\/p>\n<p>If we talk about Debian, you need to install some dependencies:<\/p>\n<p>  <\/p>\n<ul>\n<li>build-essential<\/li>\n<li>debmake<\/li>\n<li>quilt<\/li>\n<li>devscripts<\/li>\n<\/ul>\n<p>  <\/p>\n<p>I will do all work in podman container because it&#8217;s comfortable and provides clear environment. Thus \/volume dir is a dir with my project.<\/p>\n<p>  <\/p>\n<h2 id=\"prepare-src-package\">Prepare src package<\/h2>\n<p>  <\/p>\n<p>I will split creation process into some steps. I will use &#171;debmake&#187; program with some arguments.<\/p>\n<p>  <\/p>\n<h3 id=\"skeleton\">Skeleton<\/h3>\n<p>  <\/p>\n<p>Ok, now I need to create skeleton of my future source package. The simple way to do it is &#171;debmake&#187; program.<\/p>\n<p>  <\/p>\n<p>First of all you need to download source code of software and and make archive with original source code. Usually you can find recommendations to download archive and rename it. I prefer to use git directly because sometimes you need to make packages for internal software of your company (which means accessible git but optional http archive):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd \/volume git clone -b v1.26.0 --single-branch https:\/\/github.com\/cri-o\/cri-o.git .\/cri-o<\/code><\/pre>\n<p>  <\/p>\n<p>This nice command will clone only single version of sources instead of cloning all git.<\/p>\n<p>  <\/p>\n<p>Now I will create skeleton by using debmake tool. It can recognize package name version, but sometime something goes wrong. So, I will help a little bit:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cd cri-o debmake -u 1.26.0 -r 1 -t<\/code><\/pre>\n<p>  <\/p>\n<p>This command will produce some files:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ls -1 ..\/ cri-o cri-o-v1.26.0 cri-o-v1.26.0.tar.gz cri-o_v1.26.0.orig.tar.gz<\/code><\/pre>\n<p>  <\/p>\n<p>cri-o-v1.26.0 it&#8217;s a dir with source code and debian dir.<br \/>  cri-o-v1.26.0.tar.gz is a arch with software source code only.<br \/>  cri-o_v1.26.0.orig.tar.gz is a symlink to cri-o-v1.26.0.tar.gz<\/p>\n<p>  <\/p>\n<p>I want to continue work in cri-o dir because it&#8217;s more effective in feature, so, I will move debian dir from cri-o-1.26 to cri-o:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cp -r ..\/cri-o-v1.26.0\/debian .\/<\/code><\/pre>\n<p>  <\/p>\n<p>Now you can see minimum and sufficient set of files. I don&#8217;t want to plunge into theory (everything is descried in debian policy document), so, let&#8217;s work.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">ls debian\/ README.Debian  changelog  control  copyright  patches  rules  source  tests  upstream  watch<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"control\">Control<\/h3>\n<p>  <\/p>\n<p>First of all, I want transform control file to proper state. Initial version looks pretty good as an example but not for production:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">Source: cri-o Section: unknown Priority: optional Maintainer: Alexey Lukyanchuk &lt;skif@skif-web.ru> Build-Depends: debhelper-compat (= 13) Standards-Version: 4.5.1 Homepage: &lt;insert the upstream URL, if relevant> Rules-Requires-Root: no  Package: cri-o Architecture: any Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends} Description: auto-generated package by debmake  This Debian binary package was auto-generated by the  debmake(1) command provided by the debmake package.<\/code><\/pre>\n<p>  <\/p>\n<p>You can find list of Sections <a href=\"https:\/\/packages.debian.org\/unstable\/\" rel=\"nofollow noopener noreferrer\">here<\/a>. I want to use &#171;utils&#187;.<\/p>\n<p>  <\/p>\n<p>Let&#8217;s make proper control file:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">Source: cri-o Section: utils Priority: optional Maintainer: Alexey Lukyanchuk &lt;skif@skif-web.ru> Build-Depends: debhelper-compat (= 13),                golang (>=1.19),                golang-github-containers-common,                libbtrfs-dev,                libgpgme-dev,                libseccomp-dev,                pkg-config Standards-Version: 4.5.1 Homepage: https:\/\/github.com\/cri-o\/cri-o Vcs-Git: https:\/\/github.com\/skif-web\/cri-o-deb.git Vcs-Browser: https:\/\/github.com\/skif-web\/cri-o-deb Rules-Requires-Root: no  Package: cri-o Architecture: any Multi-Arch: foreign Depends: ${misc:Depends}, ${shlibs:Depends} Description: auto-generated package by debmake  This Debian binary package was auto-generated by the  debmake(1) command provided by the debmake package. <\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"patches\">Patches<\/h3>\n<p>  <\/p>\n<p>In process of build I got trouble with btrfs. I found solution <a href=\"https:\/\/github.com\/zhsj\/moby\/commit\/039389769569b27c1c4ec311c948beba3f791e05\" rel=\"nofollow noopener noreferrer\">here<\/a>.<br \/>  Full usage of quilt is well described in debian article <a href=\"https:\/\/wiki.debian.org\/UsingQuilt\" rel=\"nofollow noopener noreferrer\">here<\/a>.<br \/>  Ok, let&#8217;s see, how to add patch to source code in debian quilt style:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\"># apply existing patches $ quilt push -a No series file found # make new patch $ quilt new 0001-fix-btrfs-build-error.patch Patch debian\/patches\/0001-fix-btrfs-build-error.patch is now on top # add file to patch $ quilt add vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go  File ca added to patch debian\/patches\/0001-fix-btrfs-build-error.patch $ vim vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go # update patch from changed sources $ quilt refresh Refreshed patch debian\/patches\/0001-fix-btrfs-build-error.patch # make proper header for patch $ quilt header -e --dep3 Replaced header of patch debian\/patches\/0001-fix-btrfs-build-error.patch # un-apply changes from source code $ quilt pop -a Removing patch debian\/patches\/0001-fix-btrfs-build-error.patch Restoring vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go  No patches applied<\/code><\/pre>\n<p>  <\/p>\n<p>And now I can show result \u2014 ready patch:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$cat debian\/patches\/0001-fix-btrfs-build-error.patch Description: build fix (btrfs driver error) Author: Shengjing Zhu &lt;zhsj@debian.org> --- This patch header follows DEP-3: http:\/\/dep.debian.net\/deps\/dep3\/ Index: containers-common\/vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go =================================================================== --- containers-common.orig\/vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go +++ containers-common\/vendor\/github.com\/containers\/storage\/drivers\/btrfs\/btrfs.go @@ -383,7 +383,7 @@ func subvolLimitQgroup(path string, size         defer closeDir(dir)          var args C.struct_btrfs_ioctl_qgroup_limit_args -       args.lim.max_referenced = C.__u64(size) +       args.lim.max_rfer = C.__u64(size)         args.lim.flags = C.BTRFS_QGROUP_LIMIT_MAX_RFER         _, _, errno := unix.Syscall(unix.SYS_IOCTL, getDirFd(dir), C.BTRFS_IOC_QGROUP_LIMIT,                 uintptr(unsafe.Pointer(&amp;args))) $cat debian\/patches\/series  # You must remove unused comment lines for the released package. 0001-fix-btrfs-build-error.patch<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"additional-files-to-clean\">Additional files to clean<\/h3>\n<p>  <\/p>\n<p>In this package I got a surprise: Makefile of cri-o produce crio.conf. It breaks build process because it&#8217;s assessed like local source changes:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">dpkg-source: info: local changes detected, the modified files are:  cri-o\/crio.conf<\/code><\/pre>\n<p>  <\/p>\n<p>The simplest way to resolve it \u2014 add this file to remove it on clean target in debian\/rules file. Create file debian\/clean and add any path that must be removed by dh_clean:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ cat debian\/clean  crio.conf<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"add-extra-targets-for-comfortable-maintaining\">Add extra targets for comfortable maintaining<\/h3>\n<p>  <\/p>\n<p>Well, now we come to my favorite part \u2014 add functions to get vanilla sources new versions. Let&#8217;s see my rules:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#!\/usr\/bin\/make -f # You must remove unused comment lines for the released package. #export DH_VERBOSE = 1 #export DEB_BUILD_MAINT_OPTIONS = hardening=+all #export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed  mkfile_path:= $(abspath $(lastword $(MAKEFILE_LIST))) debdir_path:= $(shell dirname ${mkfile_path}) pkgdir_path:= $(shell dirname ${debdir_path}) version:=$(shell dpkg-parsechangelog -SVersion -l ${debdir_path}\/changelog) vanillaVersion:=$(shell echo ${version}|awk -F\\- '{print $$1}') tmp_dir:= $(shell mktemp -d --tmpdir=${pkgdir_path}) pkgrootdir_path:= $(shell dirname ${pkgdir_path}) pkgdir_selfname:=$(shell basename ${pkgdir_path})  %:     PREFIX=\/usr dh $@  # override_dh_auto_install: #   dh_auto_install -- prefix=\/usr  #override_dh_install: #   dh_install --list-missing -X.pyc -X.pyo  src-clean:     find ${pkgdir_path} -maxdepth 1 -mindepth 1 -not -name debian -a -not -name .git -exec rm -rf  {} \\;  src-get: src-clean     $(eval tmp_dir := $(shell mktemp -d --tmpdir=${pkgdir_path}))     git clone -b v${vanillaVersion} --single-branch https:\/\/github.com\/cri-o\/cri-o.git ${tmp_dir}\/     rm -rf ${tmp_dir}\/.git     mv ${tmp_dir}\/* ${pkgdir_path}\/     rm -rf ${tmp_dir}     debmake -t  build-clean:     find ${pkgrootdir_path} -name ${pkgdir_selfname}_* -o -name ${pkgdir_selfname}-*|xargs rm -rf   .PHONY: get-src src-clean build-clean<\/code><\/pre>\n<p>  <\/p>\n<p>First of all, I have added vars to get version of packages and software from changelog. It&#8217;s beautiful practice that guarantees alignment between sources and packages. And my targets src-clean and src-get remove downloaded sources and get new version from git.<\/p>\n<p>  <\/p>\n<p>And now to get new version I should make 3 steps:<\/p>\n<p>  <\/p>\n<ul>\n<li>make -f debian\/rules src-clean \u2014 to clean old sources<\/li>\n<li>add new version to changelog (with dch tool)<\/li>\n<li>make -f debian\/riles src-get \u2014 to get software sources new version <\/li>\n<li>make -f debian\/riles build-clean \u2014 to remove artifacts like bin packages, support files.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"add-tests\">Add tests<\/h3>\n<p>  <\/p>\n<p>After that lintian reveals next problem: no tests. I have writtten smoke test.<br \/>  More complete explanation of tests may be found <a href=\"https:\/\/people.debian.org\/~eriberto\/README.package-tests.html\" rel=\"nofollow noopener noreferrer\">here<\/a>.<\/p>\n<p>  <\/p>\n<p>There are 2 files that provide test suite:<\/p>\n<p>  <\/p>\n<ul>\n<li>debian\/tests\/control enumerates metadata<\/li>\n<li>debian\/tests\/smoke is one of the tests<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">$ cat debian\/tests\/control  Tests: smoke $ cat debian\/tests\/smoke  Test-Command: \/usr\/local\/bin\/crio -v<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"copyright\">Copyright<\/h3>\n<p>  <\/p>\n<p>Now we need to edit copyright file in debian dir. Debmake-tool creates it by scanning sources, but we need to change some lines in the beginning. I will change header to this state:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">Format: https:\/\/www.debian.org\/doc\/packaging-manuals\/copyright-format\/1.0\/ Upstream-Name: cri-o Upstream-Contact: https:\/\/github.com\/cri-o\/cri-o Source: https:\/\/github.com\/cri-o\/cri-o.git<\/code><\/pre>\n<p>  <\/p>\n<p>Explanation of this file you can find <a href=\"https:\/\/www.debian.org\/doc\/packaging-manuals\/copyright-format\/1.0\/\" rel=\"nofollow noopener noreferrer\">here<\/a><\/p>\n<p>  <\/p>\n<h3 id=\"readmedebian\">Readme.debian<\/h3>\n<p>  <\/p>\n<p>This file provides any extra difference between original package and your Debian version. I have not done any changes, so, I have removed it.<\/p>\n<p>  <\/p>\n<h3 id=\"lintian\">Lintian<\/h3>\n<p>  <\/p>\n<p>Lintian is a tool to check your package. I will add small fix to avoid &#171;initial-upload-closes-no-bugs&#187; error. This error says that initial upload does not close bugs, but it looks very logic, does not it?<br \/>  So, I have added debian\/cri-o.lintian-overrides file:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ cat debian\/cri-o.lintian-overrides cri-o: initial-upload-closes-no-bugs<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"build-src-package\">Build src package<\/h2>\n<p>  <\/p>\n<p>Ok, now we have ready control file, build instructions in rules file. Now we need to make release in changelog.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">dch -r --distribution testing ignored vim debian\/changelog $ cat debian\/changelog cri-o (1.26.0-1) testing; urgency=low    * Initial release.    -- Alexey Lukyanchuk &lt;skif@skif-web.ru>  Wed, 04 Jan 2023 11:10:46 +0300<\/code><\/pre>\n<p>  <\/p>\n<p>We are ready to build source package. I prefer to use debuild tool:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">debuild -us -uc -S<\/code><\/pre>\n<p>  <\/p>\n<p>And after some magic we will see ready files:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ls -1 ..\/ cri-o cri-o-1.26.0 cri-o-1.26.0.tar.gz cri-o-v1.26.0 cri-o-v1.26.0.tar.gz cri-o_1.26.0-1.debian.tar.xz cri-o_1.26.0-1.dsc cri-o_1.26.0-1_amd64.build cri-o_1.26.0-1_amd64.buildinfo cri-o_1.26.0-1_amd64.changes cri-o_1.26.0-1_amd64.deb cri-o_1.26.0-1_source.build cri-o_1.26.0-1_source.buildinfo cri-o_1.26.0-1_source.changes cri-o_1.26.0.orig.tar.gz cri-o_v1.26.0.orig.tar.gz<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"build-binary-package-and-check\">Build binary package and check<\/h2>\n<p>  <\/p>\n<p>Ok, now we can build binary package. Simple way to do it \u2014 use debuild again:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">debuild -us -uc<\/code><\/pre>\n<p>  <\/p>\n<p>And now you can find cri-o_1.26.0-1_amd64.deb in parent dir (\/volume);<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ ls -1 \/volume\/*.deb \/volume\/cri-o_1.26.0-1_amd64.deb<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"store-changes-in-git\">Store changes in git<\/h2>\n<p>  <\/p>\n<p>Now we come to important thing \u2014 how to compare source version and debian package version. I mean \u2014 how to be sure that you have cloned proper version of debian-dir from your repo?<br \/>  I prefer to use tags. It&#8217;s universal way that can find needed commit in branch, by commit, elsewhere.<\/p>\n<p>  <\/p>\n<p>Also don&#8217;t forget to run dh_clean before commit, it will clean temporary files of build system and debhelper:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">make -f debian\/rules src-clean dh_clean<\/code><\/pre>\n<p>  <\/p>\n<p>Now I can make commit (git add, git commit,git push&#8230;) and set tag. I will set tag RC because I am not sure that it&#8217;s release version. I am going to use such naming convince:<\/p>\n<p>  <\/p>\n<ul>\n<li>version before release: v${version}-rc${number}<\/li>\n<li>release version: v$(version)-release<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"bash\">$ git tag -a v1.26.0-rc0  $ git tag                  v1.26.0-rc0<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"tips-and-tricks\">Tips and tricks<\/h2>\n<p>  <\/p>\n<ul>\n<li>Make your own podman image, it&#8217;s faster<\/li>\n<li>Use this <a href=\"https:\/\/packages.debian.org\/\" rel=\"nofollow noopener noreferrer\">page<\/a>. Here you can find large amount of information:<br \/> \n<ul>\n<li>does package exist in Debian<\/li>\n<li>what is source package for this binary package<\/li>\n<li>which package provides file<\/li>\n<li>etc<\/li>\n<\/ul>\n<\/li>\n<li>If you want to add new package to Debian, check this list if requests <a href=\"https:\/\/www.debian.org\/devel\/wnpp\/requested\" rel=\"nofollow noopener noreferrer\">here<\/a><\/li>\n<li>General &#171;Developer corner&#187; of <a href=\"https:\/\/www.debian.org\/devel\/\" rel=\"nofollow noopener noreferrer\">Debian community<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"chapter-and-verses\">Chapter and verses<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/cri-o.io\/\" rel=\"nofollow noopener noreferrer\">Cri-o homepage<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/doc\/debian-policy\" rel=\"nofollow noopener noreferrer\">debian policy<\/a><br \/>  <a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/debhelper.7.html\" rel=\"nofollow noopener noreferrer\">Debhelper manual<\/a><br \/>  <a href=\"https:\/\/wiki.debian.org\/UsingQuilt\" rel=\"nofollow noopener noreferrer\">Quilt usage <\/a><br \/>  <a href=\"https:\/\/people.debian.org\/~eriberto\/README.package-tests.html\" rel=\"nofollow noopener noreferrer\">Debian package test suite<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/doc\/packaging-manuals\/copyright-format\/1.0\/\" rel=\"nofollow noopener noreferrer\">Copyright format<\/a><br \/>  <a href=\"https:\/\/packages.debian.org\/\" rel=\"nofollow noopener noreferrer\">Useful information about debian pakages<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/devel\/wnpp\/requested\" rel=\"nofollow noopener noreferrer\">List of requests for packages to add in Debian<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/devel\" rel=\"nofollow noopener noreferrer\">Debian devloper corner<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/doc\/manuals\/developers-reference\" rel=\"nofollow noopener noreferrer\">Debian developer reference<\/a><br \/>  <a href=\"https:\/\/www.debian.org\/doc\/manuals\/maint-guide\/\" rel=\"nofollow noopener noreferrer\">Debian maintainers guide<\/a><br \/>  <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Getting-Started-First-Time-Git-Setup\" rel=\"nofollow noopener noreferrer\">Git first time setup<\/a><br \/>  <a href=\"https:\/\/git-scm.com\/book\/en\/v2\/Git-Basics-Tagging\" rel=\"nofollow noopener noreferrer\">Git basic tagging<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/709568\/\"> https:\/\/habr.com\/ru\/articles\/709568\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ep\/-f\/9k\/ep-f9khpe6f1dfbi340z2fyl9w8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ep\/-f\/9k\/ep-f9khpe6f1dfbi340z2fyl9w8.png\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"overview\">Overview<\/h2>\n<p>  <\/p>\n<p>Once every true-linux engineer gets a trouble: there is no any software in his distro or it&#8217;s built without needed options. I am keen on the phrase: &#171;Only source control gives you freedom&#187;.<\/p>\n<p>  <\/p>\n<p>Of course, you can build this software on your computer without any src-packages, directly (with simplification: configure, make, make install). But it&#8217;s a non-reproducible solution, also hard for distribution.<\/p>\n<p>  <\/p>\n<p>The better way is to make distro-aligned package that can be built if needed and that produces lightly distributed binary-packages. It&#8217;s about debian-source packages(debian,ubuntu,etc), pkgbuild (for arch), ebuild for gentoo, src-rpm for red hat-based, and many others.<\/p>\n<p>  <\/p>\n<p>I will use <a href=\"https:\/\/cri-o.io\/\" rel=\"nofollow noopener noreferrer\">cri-o<\/a> like a specimen.<\/p>\n<p>  <\/p>\n<p>Before reading the text below I strongly recommend to get familiarized with the official Debian policy manual placed <a href=\"https:\/\/www.debian.org\/doc\/debian-policy\/\" rel=\"nofollow noopener noreferrer\">here<\/a> and debhelper <a href=\"https:\/\/man7.org\/linux\/man-pages\/man7\/debhelper.7.html\" rel=\"nofollow noopener noreferrer\">manpage<\/a>.<\/p>\n<p>  <\/p>\n<p>Also you will be required to setup some variables like DEBMAIL and DEBFULLNAME for proper data in changelog and other places.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-418052","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/418052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418052"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/418052\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=418052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=418052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}