본문 바로가기

카테고리 없음

Debian Apt-get Install Source

DistrosectionMainnameglibc-sourceversion2.22-6descriptionGNU C Library: sourcessubsectiondevelwebsitemaintainerMore information about apt-get installAdvanced Package Tool, or APT, is a free software user interface that works with core libraries to handle the installation and removal of software on Debian, Ubuntu and other Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.apt-get is the command-line tool for handling packages, and may be considered the user's 'back-end' to other tools using the APT library.apt-get install is followed by one or more packages desired for installation or upgrading.

InstallDebian Apt-get Install Source

Each package is a package name, not a fully qualified filename. All packages required by the package(s) specified for installation will also be retrieved and installed. The /etc/apt/sources.list file is used to locate the desired packages. If a hyphen is appended to the package name (with no intervening space), the identified package will be removed if it is installed. Similarly a plus sign can be used to designate a package to install. These latter features may be used to override decisions made by apt-get's conflict resolution system.

Contents.IntroductionThis tutorial is based on a held by Margarita Manterola (in collaboration with the ) on 07-May-2011This tutorial is about taking an existing package, re-building it, applying changes to it, and preparing those changes so that you can send them to a bug as a patch.RequirementsYou need very little previous knowledge for this tutorial, just no fear of the command lineTechnical requirements:.You should have a working Debian distribution or a Debian based distribution. You can follow if you need help setting up a Debian Unstable environment.You should have administration rights in this computer (either root or ). Every time that admin rights are needed, we'll include sudo in front. If you don't use sudo, just get the rights whatever way you like.Remember: sudo apt-get install build-essential fakeroot devscriptsconfigure aptOnce you have installed the needed packages, the next thing that you need to do, is make sure that you have some source repositories configured in your computer.Open your /etc/apt/sources.list file and check if you have one or more lines that start with deb-src.deb-src unstable mainThis line is needed in order to work with source packages.If you don't have any deb-src lines, you'll need to add at least one. This is usually achieved by copying one of the existing deb lines and changing it to deb-src. You can do that by running an editor with admin rights ( sudo gedit, sudo kate or sudo vim).Usually, it's a good idea to use unstable as the repository, since you'll be working with the latest version of the package.

Debian Install Apt-get Source

Dpkg-deb: building package `fdupes' in `./fdupes1.50-PR2-3.deb'In your own language. Can be i386, amd64, depending on which architecture you are running your machine on.Once the package has correctly built, the next step is to install this file with:sudo dpkg -i./fdupes1.50-PR2-3.debAfter that, check that the bug is still present, running fdupes -helpEdit the source codeNow, we want to actually fix this bug.Here comes the fun part. When you are trying to fix a package bug, sometimes it will be located in the upstream source, sometimes it will be related to how the program was packaged for Debian. So you'll be editing different files depending on where the problem is.In this particular case, the package uses the tool, a tool to manage patches for the package, so we will make use of that tool.

Other packages use a different tool, called, to manage patches, but we won't be covering that one in this tutorial.To create a new patch, you'll need to do the following. Type:dpatch-edit-patch 80bts585426fixhelp 70bts537138disambiguaterecurse.dpatchThis will start a new shell inside a special environment, where you can edit your files and dpatch will afterwards take care of getting the differences with the original. the first parameter is the name assigned to the new patch: 80bts585426fixhelp. the second parameter is the last patch that should be applied before applying the new one: 70bts537138disambiguaterecurse.dpatchThe name of the patch was chosen to match the pattern already established by the maintainer.Now we need to edit the fdupes.c file.

Install

Go to the line 1066 and delete it. The line says.printf(' teach set of duplicates without prompting the usern');You can edit the file with your preferred editor ( vi fdupes.c, gedit fdupes.c, kate fdupes.c, etc).Once you are done, you should type into the console:exitIt will end the special environment that dpatch created for us, and you'll have a new patch in the debian/patches/ directory. Check it out with:cat debian/patches/80bts585426fixhelp.dpatchIn order for this patch to get applied, you'll need to edit the debian/patches/00list file, and add after the last line.80bts585426fixhelpThe 00list file is the dpatch file that lists all the patches that will be applied. They are applied in order, from the one appearing in the first line, till the one appearing in the last line.Before rebuilding the package with this patch, we want to make our package different from the original one, so that we can afterwards extract the changes in order to send them as a patch to the bug. In order to do this, type:dch -nThis will.add a new entry in the changelog file, maybe with your name (depending on other configurations that we are not going to cover), with the current date,. and open the changelog with the configured command-line editor.In case this is vi, and it's your first time with vi, you can start editing by pressing the Insert key, and after you are finished, you can save an close by pressing: ESC:wqSo, you are editing the changelog file now. What you have to enter in this file is some description of the change that we've made.