DH_MOVETOUSR(1)

πŸ’– DH_MOVETOUSR(1) πŸ’–

okay bestie, welcome to the Debhelper manual, section 1 πŸŽ€ this one's about dh_movetousr and it's lowkey a whole situation, so grab a strawberry drink and let's get into it πŸ“


✨ NAME ✨

dh_movetousr β€” canonicalize location according to merged-/usr πŸ¦‹


✨ SYNOPSIS ✨

dh_movetousr [debhelper options] [--fail-noop | --warn-noop]

✨ DESCRIPTION ✨

So. dh_movetousr is a debhelper program and what it does is it canonicalizes paths inside packages according to merged-/usr. Bestie, shipping aliased paths is known to cause problems with dpkg πŸ’€ so this helper moves all affected files to /usr no matter how they were installed, periodt. The compatibility symlinks make sure converted packages keep working, so don't panic. Oh and heads up: in the process, absolute symbolic links may become relative or vice versa β€” that's just Debian policy section 10.5 doing its thing ✨

okay now the serious part, and I mean it πŸ™ˆ keeping in mind that moving files in this way is known to cause problems. The known problems have been documented at <https://people.debian.org/~helmutg/dep17.html>. For instance, if files have been moved between packages, use of this tool may cause file loss during upgrades (P1) 😭. Most problems can be detected by <https://salsa.debian.org/helmutg/dumat>, which uses the Debian bug tracking for feedback. So it is recommended to upload to experimental when moving files (e.g. using this helper) or restructuring packages that earlier moved files πŸ‘‘. One particular problem that is not being detected is about dpkg-statoverride (P5) πŸ’… β€” please review uses of dpkg-statoverride in maintainer scripts and update them as needed. For these reasons, dh_movetousr is not automatically enabled in e.g. a compatibility level. No cap.

Okay so here's the backport tea β˜•: while we want to move files to /usr in trixie and beyond, we do not want to move them in bookworm and earlier. This poses challenges to backporting packages, because any such moves have to be reverted during the backport. A backport of debhelper to bookworm shall include a stub for this helper doing nothing to achieve this goal 🫢. For packages that do not need to be backported (e.g. packages targeting forky and beyond), consider updating locations instead of using this helper. And when the only affected type of file is systemd units, consider using dh_installsystemd or detecting the unit location from pkgconf --variable=systemdsystemunitdir systemd instead of this helper, as both will work in backports πŸ’–

For further information on the state of the transition refer to <https://wiki.debian.org/UsrMerge>.

And the plot twist: dh_movetousr shall be removed from debhelper during forky+1 is release cycle. Iconic behaviour, honestly.


✨ OPTIONS ✨

  • --fail-noop β€” fail if no files were found in aliased locations and therefore no change has been performed 😀 like, nothing happened, so it's a fail.
  • --warn-noop β€” warn if no files were found in aliased locations and therefore no change has been performed πŸ™ˆ gentler energy, same "nothing happened" info.

✨ EXAMPLES ✨

Enable this tool in a package that uses dh β€” just drop this in your Build-Depends:

  Build-Depends: dh-sequence-movetousr

✨ SEE ALSO ✨


✨ AUTHOR ✨

Helmut Grohne <helmut@subdivi.de> β€” king behaviour, we stan πŸ‘‘


okay that's the whole page bestie, you're literally so good at merged-/usr now πŸ’œ this was debhelper version 14.5ubuntu1, dated 2026-09-21, signing off πŸŽ€βœ¨ πŸ¦‹ no cap fr fr 🌈

πŸ“¦ where this page comes from