So you should be back at the shell prompt. As you use vi , always remember that pressing ESC will return you to command mode. So if you get confused, press ESC a couple times and start over.
To use vi , you only need to read Moving around in a file, Section 8. Later sections explain advanced features, but they are not strictly necessary, though often more efficient and less tedious.
To move around in a file, Debian's vi allows you to use the arrow keys. The traditional keys also work, however; they are h for left, j for down, k for up, and l for right. These keys were chosen because they are adjacent on on the home row of the keyboard, and thus easy to type.
Many people use them instead of the arrow keys since they're faster to reach with your fingers. Open the file you created earlier with vi. You should see the text you typed before. Move around the file with the arrow keys or the hjkl keys. If you try to move to far in any direction, vi will beep and refuse to do so; if you want to put text there, you have to use an insertion command like i or a.
Delete and backspace don't work in vi , for historical reasons[ 13 ]. Some vi variants, such as vim will let you use backspace and delete. If you type a number before a command, it will repeat the command that many times. So this will delete 10 characters. This will cause an error, because you've changed the file but haven't saved yet. There are two ways to avoid this; you can :wq , thus writing the file as you quit, or you can quit without saving:.
With an exclamation point, you tell vi that you really mean it, and it should quit even though the file isn't saved. Rebuilding a Debian package starts with getting its source code. The easiest way is to use the apt-get source source-package-name command.
These conditions should already be met if you followed the instructions from the chapter dealing with APT configuration see Section 6. Note, however, that you will be downloading the source packages from the Debian version mentioned in the deb-src line. If you need another version, you may need to download it manually from a Debian mirror or from the web site.
Once everything has been downloaded, it verifies the integrity of the downloaded source packages using dscverify , and it extracts the source package unless the -d or --download-only option is used.
The Debian keyring is needed, unless the option -u is supplied. Making Changes. The source of the package is now available in a directory named after the source package and its version samba The first thing to do is to change the package version number, so that the rebuilt packages can be distinguished from the original packages provided by Debian.
Assuming the current version is This makes the package version number higher than the one provided by Debian, so that the package will easily install as an update to the original package. Such a change is best effected with the dch command Debian CHangelog from the devscripts package. In the simplest cases, the lines concerning the initial configuration. If these commands are not explicitly called, they are probably a side effect of another explicit command, in which case please refer to their documentation to learn more about how to change the default behavior.
In particular, this file contains Build-Depends lines controlling the list of dependencies that must be fulfilled at package build time. These often refer to versions of packages contained in the distribution the source package comes from, but which may not be available in the distribution used for the rebuild.
You need at least a control file with the fields Package , Maintainer , Priority , Architecture , Installed-Size , Version , and any necessary dependency declaration. The script to be executed after installation is called postinst.
Be sure to make it executable. It goes alongside control. If you already have a binary package from another distribution, you can use alien to convert it. First off you need to create a build folder and an archive of your files: tar czvf data. Then you can add independently preinst, postint, prerm and postrm shell scripts to control pre and post install and pre and post remove behaviour of the.
Then you need a debian-binary file: echo 2. In your build folder you should have now these files: debian-binary control. Finally you need ar package to create the. I do a lot of packages, and to do a full one is not a trivial matter.
On a positive note, files and scripts are much less work. You can create such a package, very simply, with a tool known as debreate. I used to just do all my packages the standard way, but after I started using this tool, I will only go back when necessary. See the Debian Wiki on Packaging , maybe equivs see link already satisfies your requirements. Wikipedia's page on the deb file format also includes many useful links. Ran into this with Zimbra 7 on Debian using its Ubuntu packages.
Not sure how I worked around this before, I'm certain I didn't have to do this when I installed this previously! For quick creating of packages you can user checkinstall program. It do a instalation of program, watch changes - and create a deb or rpm package of it.
You can use Alien to convert to. Slackware packages are insanely simple in that they don't really do anything much more than what the OP was asking for namely, copy some files, and run a script.
This would save creating the control file and so on because Alien will generate it. If you are unfamiliar with the Slackware package format, note that your install directory in the tarball will not be installed to the target, and if you want a. Sign up to join this community. In practice, sid may be experiencing issues which makes it undesirable for you to migrate your whole system.
The pbuilder package can help you to cope with this kind of situation. The pbuilder package can help you to access environments of almost any Debian derivative distribution of the same architecture. If your upstream uses a source code management system VCS [70] to maintain their code, you should consider using it as well.
This makes merging and cherry-picking upstream patches much easier. There are several specialized wrapper script packages for Debian package building for each VCS. Use of git-buildpackage is becoming quite popular for Debian Developers to manage Debian packages with the Git server on alioth. See gbp. For testing purposes, you can make a.
Once you are finished with your tuning, remember to rebuild following the proper procedure. You may not be able to upload correctly if you try to upload. Here is a quick summary of how many commands to build packages fit together in the command hierarchy.
There are many ways to do the same thing. This enables your uploaded packages to be accepted to the Debian archives. Alternatively, you can run dquilt pop -a after normal operation. Such details are beyond the scope of this document. Using Git for Debian Packaging.
0コメント