Required to create a package with its own set of modules.
I downloaded the source . However, I did not find guidance on how to collect what I wanted from them.
How to build a deb package from webmin source?
Required to create a package with its own set of modules.
I downloaded the source . However, I did not find guidance on how to collect what I wanted from them.
How to build a deb package from webmin source?
A universal instruction “how to build a package from a git repository” cannot exist in principle. and about webmin specifically, you can take as a basis the source of the package from the debian archives. ten years ago he was there until he was thrown out because of problems.
to take as a basis those source codes of the package that webmin developers publish is useless - they are incorrect and it is impossible to build a package using them - if you download files with the suffixes .tar.gz , .diff and .dsc from the directory with the latest version , then, Attempted unpacking will only get an error:
$ dpkg-source -x webmin*.dsc ... dpkg-source: error: unrecognized file for a v1.0 source package: webmin-1.791.tar.gz even if you manually unpack the archive and apply patches:
$ tar -xf webmin*.tar.gz $ ( cd webmin*/ && cat ../webmin*.diff | patch -p1 ) then we get in the source directory, firstly, the incorrectly named DEBIAN directory (must be debian ), secondly, even after renaming the directory and attempting to build, we will receive a bunch of warnings about the incorrect contents of the debian/changelog and a regular error:
$ dpkg-buildpackage parsechangelog/debian: warning: debian/changelog(l3): unrecognized line ... dpkg-buildpackage: error: unable to determine source changed by if you even fix an incorrect debian/changelog file, then there will be an error about debian/contrl , etc.
if you take the source from the debian archive , they are perfectly unpacked and the packages are safely assembled.
it remains only to update the source code of the webmin itself to the current version, focusing on the relevant part of the beginner developer’s manual debian .
mini webmin assembly instructions
install the necessary packages:
$ sudo apt-get install build-essential devscripts create a directory for the assembly and make it current. for example, ~/src/webmin :
$ mkdir -p ~/src/webmin $ cd ~/src/webmin Download the source code of the old debian package and the current webmin source:
$ wget http://archive.debian.org/debian/pool/main/w/webmin/webmin_1.180-3sarge1.dsc \ http://archive.debian.org/debian/pool/main/w/webmin/webmin_1.180.orig.tar.gz \ http://archive.debian.org/debian/pool/main/w/webmin/webmin_1.180-3sarge1.diff.gz \ https://sourceforge.net/projects/webadmin/files/webmin/1.791/webmin-1.791.tar.gz unpack the package sources:
$ dpkg-source -x webmin_1.180-3sarge1.dsc in the webmin-1.180 directory, execute uupdate -v новая-версия ../архив-с-новой-версией :
$ ( cd webmin-1.180; uupdate -v 1.791 ../webmin-1.791.tar.gz ) In the output there will be reports of non-overlapping patches, which is quite natural - the versions are very different. have to ignore.
in the directory with the new version, run dch to update the debian/changelog file:
$ ( cd webmin-1.791; dch ) in the editor that opens, remove the extra lines if they are added so that the top section looks something like this (the last line, of course, will be different for you):
webmin (1.791-1) UNRELEASED; urgency=medium * New upstream release -- пользователь <пользователь@хост> Fri, 29 Apr 2016 16:50:59 +0000 in the same directory, start building the packages:
$ ( cd webmin-1.791; dpkg-buildpackage -us -uc ) if everything went well, then the output will end with something like this:
... dh_builddeb dh_builddeb: Compatibility levels before 5 are deprecated (level 4 in use) dpkg-deb: building package `webmin' in `../webmin_1.791-1_all.deb'. dh_builddeb: Compatibility levels before 5 are deprecated (level 4 in use) dpkg-deb: building package `webmin-core' in `../webmin-core_1.791-1_all.deb'. dh_builddeb: Compatibility levels before 5 are deprecated (level 4 in use) dpkg-genchanges >../webmin_1.791-1_amd64.changes dpkg-genchanges: including full source code in upload dpkg-source --after-build webmin-1.791 dpkg-buildpackage: full upload (original source is included) The files are in ~/src/webmin :
webmin_1.791-1_all.deb webmin-core_1.791-1_all.deb for the performance of the collected webmin , of course, I can not vouch.
Source: https://ru.stackoverflow.com/questions/518407/
All Articles