DEB-REVERSION(1)

πŸ’– deb-reversion β€” bestie's guide to ✨changing a .deb version✨ πŸ’–

okay so. you have a .deb file. you want it to have a different version number. this is the deb-reversion manual page (it lives in section 1 of the manual, iykyk) and I'm gonna walk you through every single flag like we're texting at 2am. no cap.


🌸 NAME 🌸

deb-reversion β€” a simple lil script that changes the version of a .deb file πŸ’…


✨ SYNOPSIS ✨

deb-reversion [options] .deb-file [log message...]

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: deb-reversion unpacks the .deb file you give it, changes the version number everywhere it needs to change, appends a Debian changelog entry with whatever contents you specified, and then builds you a brand new .deb file with the updated version. slay.

By default, the tool makes a new version number that's suitable for local changes β€” the new package will be greater than the current one, but lesser than any future, official Debian packages. it's giving "I'm here but I'm not trying to start drama with the real releases". If you pass -v version, you can just specify the version number directly, no guessing. And -c? That one only calculates the new version number and shows it to you β€” it does not generate a new package. lowkey useful for a vibe check before committing.

heads up bestie: when building a .deb file, you need root privileges so the resulting .deb file has the correct permissions and ownerships. you can get that either by running deb-reversion as root, or by running it under fakeroot(1), like this: fakeroot deb-reversion foo.deb.

With -k hook, you can specify a hook script, and it gets run on the unpacked binary packages just before it all gets repacked. If you wanna write changelog entries from inside the hook, use dch -a -- your message. (Or, alternatively, just don't give a changelog entry on the deb-reversion command line and dch will be called automatically. easy.) The hook command must be placed in quotes if it has more than one word, because it's called via sh -c.


πŸ‘‘ OPTIONS πŸ‘‘

  • -v new-version, --new-version new-version β€” tells it which version number to use for the new version. this gets passed to dch(1). πŸ’–
  • -o old-version, --old-version old-version β€” says which version number to treat as the old version, instead of using the version stored in the .deb's control file. 🌸
  • -c, --calculate-only β€” only calculate and display the new version number that would be used. does not build a new .deb file. ⚠️ cannot be used together with -v. pick a lane bestie.
  • -s string, --string string β€” instead of appending 'LOCAL.' as the version string onto the old version number, append string instead. cute.
  • -k hook-command, --hook hook-command β€” a hook command to run after unpacking the old .deb file and modifying the changelog, and before packing up the new .deb file. must be in quotes if it's more than one (shell) word. only one hook command may be specified; if you wanna do more than that, you could specify 'bash' as the hook command and you'll be handed a shell to work in. 🫢
  • -D, --debug β€” passes --debug to dpkg-deb(1). πŸ”₯
  • -b, --force-bad-version β€” passes --force-bad-version to dch(1).
  • -h, --help β€” display usage information. the classic. πŸ™ˆ
  • -V, --version β€” display version information. ⭐

🌈 SEE ALSO 🌈

dch(1), dpkg-deb(1), fakeroot(1)


πŸ’€ DISCLAIMER πŸ’€

deb-reversion is a tool meant to help porters with modifying packages for other architectures, and to augment deb-repack, which creates modified packages with identical version numbers as the official packages. Chaos will ensue! 😭 With deb-reversion, a proper version number can be selected, which does not obstruct the next official release but can be specifically pinned with APT or held with dpkg.

Please take note that deb-reversion does not come without problems. While it works fine in most cases, it may just not in yours. Especially, please consider that it changes binary packages (only!) and hence can break strict versioned dependencies between binary packages generated from the same source. yeah. read that again. πŸ’€

You are using this tool at your own risk and I shall not shed a tear if your gerbil goes up in flames, your microwave attacks the stereo, or the angry slamming of your fist spills your coffee into the keyboard, which sets off a chain reaction resulting in a vast amount of money transferred from your account to mine. (iconic behavior tbh, but also: your problem not mine. periodt.)


πŸŽ€ AUTHOR πŸŽ€

deb-reversion is Copyright 2004-5 by martin f. krafft <madduck@debian.org> and modifications are Copyright 2006 by Julian Gilbey <jdg@debian.org>.

Permission is granted to copy, distribute and/or modify this document under the terms of the Artistic License: http://www.opensource.org/licenses/artistic-license.php. On Debian systems, the complete text of the Artistic License can be found in /usr/share/common-licenses/Artistic.

This manual page was written by martin f. krafft <madduck@debian.org> and modified by Julian Gilbey <jdg@debian.org>.


πŸ“ NOTES πŸ“

  1. http://www.opensource.org/licenses/artistic-license.php

and that's the whole page bestie!! 🧚 the source line is literally [FIXME: source] and the date on this thing is Feb 13, 2006 β€” yeah she's an elder but she still ate πŸ’… go change some version numbers, drink water, and don't break your dependency graph πŸ“βœ¨

πŸ“¦ where this page comes from