DEBGET(1p)

πŸ“¦ version 1.6, in ubuntu jammy

✨ NAME ✨

debget β€” download source and binary Debian packages. 🫢

(Also hi, this is the DEBGET(1p) page from the User Contributed Perl Documentation corner of the manual, bestie. Grab a snack, we're doing this. πŸ“)


🌈 SYNOPSIS 🌈

debget [switch]... { package | section/package | file.dsc | file.deb }...

πŸ’… DESCRIPTION πŸ’…

So like, debget downloads source and binary Debian packages by name, and then if you want it can unpack them, compile them, and install them. Main character energy, honestly. πŸ”₯

The default vibe is: it downloads the source for packages, it unpacks and builds *.dsc files, and it installs *.deb files. That's just what it does when you don't tell it otherwise. And if you wanna know the nitty-gritty defaults for FTP server names and all that, run debget --help. ✨

Okay and here's the part that's actually lowkey iconic: debget does not need a local copy of the Packages files. Nope. Instead it just lists directories on the FTP site to figure out what versions are out there. No cap. πŸ‘‘

Non-switch arguments are *.dsc files, *.deb files, and package names or section/package β€” like base/dpkg or non-free/games/quake2. πŸ’–

Now, there are exactly two cases where you've got to specify the section:

  • Information about the package isn't in the local available file (the thing dpkg --print-avail shows you), or the info that's there is just wrong. πŸ’€
  • You're downloading a source package that doesn't generate a binary package with the same name. Normally debget figures out the right source package to download based on the dpkg --print-avail output. (Like, if you say download the source for perl-base, it's really gonna download the perl sources. Sneaky but correct.) That's not possible if the source package has no available file entry β€” which is exactly the situation when the source package doesn't generate a binary package of the same name. In that case debget uses the section for the package you specified (perl-base, in this case). And if the section for that package isn't available, or it's not the same as the section for the source package? Then you have to specify the section yourself, bestie. πŸ™ˆ

To handle either of these cases, you just specify the package with the section prepended, the way it would appear in the available file. Eg, base/dpkg or non-free/games/quake2. πŸŽ€


🌸 OPTIONS 🌸

  • --arch arch β€” specify the installation architecture (this is what it uses to find binary packages). The default is whatever dpkg --print-architecture spits out. 🧚
  • -b, --binary β€” download binary packages. Default is ✨not✨ to download them.
  • -B, --nobinary β€” don't download binary packages. This is the default, so it's giving "leave me alone."
  • -u, --build β€” build downloaded source packages. This implies --unpack. --build is off by default, but it gets turned on if you specify any *.dsc or *.deb files on the command line. ⭐
  • --debug β€” turn debugging on. Specify it multiple times for more and more detail. πŸ”
  • --dir dir β€” specify the path to the top of the Debian hierarchy on the primary FTP server.
  • -d dist, --dist dist β€” specify the distribution to download packages from. Default is unstable. You can use the name of any subdirectory in the dists directory in the Debian archive, or experimental (which is special-cased). πŸ’œ
  • --help β€” show the usage message and die. Dramatic? Yes. Useful? Also yes.
  • -h host, --host host β€” specify the host name of the primary FTP server.
  • -i, --install β€” install binary packages. This turns on --unpack and --build, so specifying it will cause debget to install just about everything you mention on the command line. Packages get downloaded, unpacked, built, and installed; *.dsc files get unpacked, built, and installed; and *.deb files get installed. Full send. πŸš€
  • -n, --no β€” go through the motions, but don't actually download any packages. Fake it till you make it. πŸ’…
  • -f, --no-config β€” don't process either /etc/debget.rc or ~/.debget.rc.
  • --no-download-re re β€” don't download files whose name matches the Perl regexp re. You can specify this option multiple times. πŸ”
  • --no-download-tar β€” don't download *.tar.gz files. This is normally used when downloading sources; when you specify it you'll just fetch the *.diff.gz and *.dsc files.
  • --no-dscverify β€” don't run dscverify before unpacking sources. dscverify checks that the .dsc file is signed by a Debian developer and that the MD5 sums and file sizes given in it match the files about to be unpacked. Those are good things, so debget will try to run dscverify by default. The dscverify program lives in the devscripts package. πŸ›‘οΈ
  • -F, --no-user-config β€” don't process ~/.debget.rc.
  • --non-us-dir dir β€” specify the path to the top of the Debian hierarchy for non-US packages.
  • -H host, --non-us-host host β€” specify the host name of the non-US FTP server.
  • -r cmd, --root-build cmd β€” use cmd to become root when building a package from source. The default is the first of fakeroot, sudo, super, or su which is present on the system. πŸ‘‘
  • -R cmd, --root-install cmd β€” use cmd to become root when installing a package. The default is whatever you gave for --root-build if you specified anything, otherwise the first of sudo, super, or su which is present on the system.
  • -s, --source β€” download source packages. This is the default. ✨
  • -S, --nosource β€” don't download source packages. (The default is to download them, fyi.)
  • --unpack β€” unpack downloaded source packages. πŸ“¦
  • -v, --verbose β€” be verbose. Say more words. πŸ—£οΈ
  • --version β€” print the version number and exit.

πŸŽ€ CONFIGURATION FILES πŸŽ€

The default behavior of debget can be modified by the configuration files /etc/debget.rc and ~/.debget.rc β€” unless you modified that with the -f or -F switches, obviously. 😌

These files are processed as Perl code. They can set these variables to control the program (and here's their corresponding switches):

  • $O{'arch'} β€” --arch
  • $O{'binary'} β€” --binary, boolean
  • "{$O{'build'}" β€” --build, boolean
  • $O{'debug'} β€” --debug, integer
  • $O{'dir'} β€” --dir
  • $O{'dist'} β€” --dist
  • $O{'host'} β€” --host
  • $O{'install'} β€” --install, boolean
  • $O{'no'} β€” --no, boolean
  • $O{'no-config'} β€” --no-config, boolean
  • $O{'no-download-re'} β€” --no-download-re, array reference
  • $O{'no-download-tar'} β€” --no-download-tar, boolean
  • $O{'no-dscverify'} β€” --no-dscverify, boolean
  • $O{'no-user-config'} β€” --no-user-config, boolean
  • $O{'non-us-dir'} β€” --non-us-dir
  • $O{'non-us-host'} β€” --non-us-host
  • $O{'root-build'} β€” --root-build
  • $O{'root-install'} β€” --root-install
  • $O{'source'} β€” --source, boolean
  • $O{'unpack'} β€” --unpack, boolean
  • $O{'verbose'} β€” --verbose, boolean

Here's an example configuration file, for the visual learners πŸ¦‹:

$O{'host'} = 'debian.terrabox.com';
$O{'verbose'} = 1;

πŸ’€ BUGS πŸ’€

If you specify --install, all produced binary packages will be installed β€” even the ones you didn't specify on the command line. Eg, if you run debget --install ssh it will install both ssh and ssh-askpass. Not you getting more than you asked for. 😭

Also, the author would like to add a --clean switch which will make the program remove intermediate files. Manifesting it. πŸ™

And: see /usr/share/doc/debget/README.Debian if your transfers are failing because you need to use passive FTP or a proxy. Real ones know. 🌈


πŸ‘€ SEE ALSO πŸ‘€

dselect(8), apt-get(8)


⭐ AVAILABILITY ⭐

The code is licensed under the GNU GPL and distributed as part of Debian. πŸ’œ


🫢 AUTHOR 🫢

Roderick Schertler <roderick@argon.org>


Okay that's the whole page, bestie β€” this was perl v5.24.1, dated 2016-11-21, and it's the DEBGET(1p) manual. Slay, go download something. πŸ’…βœ¨

πŸ“¦ where this page comes from