.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "APT-SRC 1p" .TH APT-SRC 1p "2021-01-10" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" apt\-src \- manage debian source package trees .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBapt-src\fR [\fIoptions\fR] \fIcommand\fR .PP \&\fBapt-src\fR [\fIoptions\fR] \fIinstall|remove\fR pkg1 [pkg2 ...] .PP \&\fBapt-src\fR \fIlocation\fR pkg .SH "DESCRIPTION" .IX Header "DESCRIPTION" apt-src is a command line interface for downloading, installing, upgrading, and tracking debian source packages. It can be run as a normal user, or as root. .PP Unlike binary packages, source packages are not installed into a canonical location. Instead, they are \*(L"installed\*(R" by unpacking their source tree into a directory, which can be anywhere you wish. A source package can be installed multiple times, in different locations. This program manages source packages installed in this way, and provides querying facilities to help find where a source package is installed. .PP Unless the \-h or \-\-help option is given one of the commands below must be present. .IP "update" 4 .IX Item "update" Update the lists of available packages. Identical to apt-get update, really, and must be run as root in the default configuration. .IP "install" 4 .IX Item "install" Install the named source package or packages into the current directory. If a package in the current directory is already installed, it will attempt to upgrade it. .Sp This command will accept the names of binary packages, or source packages. Just like with apt-get install, you can prefix the name with =version or /release to specify what version to install or what release to take the source from. .Sp It will make sure that the build-dependencies of the source package are satisfied. .Sp If the \-\-location option is given, the source package will be installed or upgraded into the given location instead of the current directory. .Sp If the \-\-build option is given, each newly installed or upgraded package will be compiled. .IP "upgrade" 4 .IX Item "upgrade" Upgrade all installed source packages, or, if the \-\-location or \-\-here options are used, update only source packages in the specified directory. .Sp If the \-\-patch option is given (the default), apt-src will attempt to generate a patch containing any local changes made to the source package, and will apply this patch to the updated tree. This will allow your local changes to be preserved across package upgrades, but it may not always work, and you might sometimes have to merge in your changes by hand. .Sp If the \-\-build option is given, each newly installed or upgraded package will be compiled. .IP "remove" 4 .IX Item "remove" Remove the named source package or packages. The \-\-location and \-\-here options may be used to only remove packages in a particular directory. .IP "build" 4 .IX Item "build" Build the specified source or sources. If the source is not installed yet, it will first be installed. .IP "clean" 4 .IX Item "clean" Clean the trees of the named source package or packages. The \-\-location and \&\-\-here options may be used to only clean packages in a particular directory. .IP "import" 4 .IX Item "import" Use this option to let apt-src know about an existing, unpacked source tree. Besides the name under which it should be imported, you must specify the location of the source tree (with \-\-location), and you may need to tell the version of the source (with \-\-version). Don't expect the build command to work on this source, unless it has a debian/ directory. .IP "list" 4 .IX Item "list" With no other parameters, it will list all installed source packages; their status, and the directory they are installed in. If a package's name is given, it will display only installed instances of that source package. If the \&\-\-location or \-\-here options are used, they will limit the list to packages in the specified directory. .IP "location" 4 .IX Item "location" Takes a single parameter; the name of a source package. If the package is installed, it will return the root of the package's source tree. .Sp This command can be used when you need to include files from another source package, or something like that. For example: .Sp .Vb 1 \& \-I\`apt\-src location pkg\` .Ve .IP "version" 4 .IX Item "version" Takes a single parameter; the name of a source package. If the package is installed, it will return the version of the package that is installed. .IP "name" 4 .IX Item "name" Takes a single parameter; the name of a source package (may be specified with regexps). Returns the name of the source package installed matching that name, if any. .SH "OPTIONS" .IX Header "OPTIONS" All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the defaults file by using something like \&\-f\-,\-\-no\-f, \-f=no or several other variations. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Show this help text. .IP "\fB\-b\fR, \fB\-\-build\fR, \fB\-\-compile\fR" 4 .IX Item "-b, --build, --compile" Build source packages after installing or upgrading them. Configuration Item: APT::Src::Compile. .IP "\fB\-i\fR, \fB\-\-installdebs\fR" 4 .IX Item "-i, --installdebs" Install packages after building sources. Implies \-\-build. Configuration Item: APT::Src::InstallDebs .Sp Note that if multiple packages are generated from a single source package, they will all be installed. .IP "\fB\-p\fR, \fB\-\-patch\fR" 4 .IX Item "-p, --patch" Try to patch local changes into new source tree when upgrading. On by default, use \-\-no\-p to disable. Configuration Item: APT::Src::Patch. .IP "\fB\-l\fR, \fB\-\-location\fR" 4 .IX Item "-l, --location" Specify a directory; only operate on packages in that directory. Configuration Item: APT::Src::Location. .IP "\fB\-c\fR, \fB\-\-cwd\fR, \fB\-\-here\fR" 4 .IX Item "-c, --cwd, --here" Only operate on packages in the current directory. Configuration Item: APT::Src::Here. .IP "\fB\-\-upstream\-version\fR" 4 .IX Item "--upstream-version" Only of use with the version command; makes it omit the debian version number from the version of the package output. .IP "\fB\-k\fR, \fB\-\-keep\-built\fR" 4 .IX Item "-k, --keep-built" Do not delete .debs and other built files after installing them with the \&\-\-installdebs option. Configuration Item: APT::Src::KeepBuilt .IP "\fB\-n\fR, \fB\-\-no\-delete\-source\fR" 4 .IX Item "-n, --no-delete-source" Do not delete source files when removing source package. Configuration Item: APT::Src:NoDeleteSource .IP "\fB\-\-version\fR" 4 .IX Item "--version" Specify a source tree version. Of use with the import command. .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 .IX Item "-q, --quiet" Direct all command output to /dev/null unless a command fails to run as expected. Configuration item: APT::Src::Quiet .IP "\fB\-t\fR, \fB\-\-trace\fR" 4 .IX Item "-t, --trace" Output each command as it is run. Configuration item: APT::Src::Trace .PP In addition to the above options, some less-used configuration items may only be specified in the config files, /etc/apt/apt.conf and ~/.apt\-src/config. They are: .IP "APT::Src::BuildCommand" 4 .IX Item "APT::Src::BuildCommand" The command to use to build a tree. Run in the tree to build, it defaults to \&\*(L"dpkg-buildpackage \-b \-us \-uc\*(R", with \*(L"\-rfakeroot\*(R" appended for non-root users. .IP "APT::Src::RootCommand" 4 .IX Item "APT::Src::RootCommand" The command to use if a non-root user needs to become root. This is used for, example, to satisfy build-deps. sudo is a good choice and the default. If you want to use su, you'll need to set it to \*(L"su \-c\*(R". .IP "APT::Src::BuildDeps" 4 .IX Item "APT::Src::BuildDeps" Controls whether apt-src makes sure a source package's build dependencies are installed when installing or upgrading it. Defaults to true, if you turn it off, packages may fail to build due to missing build dependencies. .SH "NOTE ON NAMES" .IX Header "NOTE ON NAMES" You can use either binary package names, or source package names when installing a new source package. .PP The rest of the time, when dealing with already installed packages, you currently have to use the source package names (this may later changes). However, you may use regexps as part of the names. .SH "ENVIRONMENT" .IX Header "ENVIRONMENT" This program sets \s-1APT_SRC_BUILD\s0 when it is building a package. .SH "EXAMPLES" .IX Header "EXAMPLES" To install the source to pine to /usr/src, build it, and install the resulting debs: .PP .Vb 1 \& apt\-src install \-\-location=/usr/src \-i pine .Ve .PP To track changes to said installed pine source package, and install debs whenever a new version comes out: .PP .Vb 1 \& apt\-src install \-i pine .Ve .PP To install a local copy of package foo, which you are going to apply a local patch to: .PP .Vb 4 \& apt\-src install foo \& cd foo\-version \& patch <~/my\-foo\-patch \& apt\-src build \-\-installdebs foo .Ve .PP To upgrade your local copy of foo, bringing your patch forward, and building and installing new debs: .PP .Vb 1 \& apt\-src install \-i foo .Ve .PP To import the source tree in /usr/src/linux, which you unpacked from a ftp.kernel.org tarball (or from the kernel-source package) into apt-src, so it knows about it: .PP .Vb 1 \& apt\-src import kernel \-\-location=/usr/src/linux \-\-version=2.4.18 .Ve .PP In a debian/rules of a kernel module package that needs to figure out if it is being built by apt-src, and if so set the \s-1KVERS, KSRC.\s0 and \s-1KDREV\s0 variables that make-kpkg normally sets: .PP .Vb 5 \& ifdef APT_SRC_BUILD \& KDREV=$(shell apt\-src version kernel\e(\-source.\e*\e)\e?) \& KSRC=$(shell apt\-src location kernel\e(\-source.\e*\e)\e?) \& KVERS=$(shell apt\-src name kernel\e(\-source.\e*\e)\e? | sed s/kernel\-source\-//) \& endif .Ve .SH "FILES" .IX Header "FILES" .IP "/etc/apt/sources.list" 4 .IX Item "/etc/apt/sources.list" Locations to fetch packages from. .IP "~/.apt\-src/status" 4 .IX Item "~/.apt-src/status" apt-src's status file, lists installed packages. .IP "/etc/apt/apt.conf" 4 .IX Item "/etc/apt/apt.conf" Global config file for apt-src (and apt). .IP "~/.apt\-src/config" 4 .IX Item "~/.apt-src/config" Per-user config file for apt-src. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBapt\-get\fR\|(8), \fBsources.list\fR\|(5), \fBdpkg\-source\fR\|(1) .SH "AUTHOR" .IX Header "AUTHOR" Copyright 2002 Joey Hess .PP This is free software; see the \s-1GNU\s0 General Public Licence version 2 or later for copying conditions. There is \s-1NO\s0 warranty.