- Overview
- Key Features
- Prerequisites
- Getting Started
- Usage
- Workflow Diagram
- Generated Files
- Troubleshooting
- Frequently Asked Questions
- Contributing
- Security
- License
repackageResolve.sh converts the official DaVinci Resolve GNU/Linux .run installer into a Debian-compatible .deb package. The script vendors Resolve’s required legacy libraries inside the package so you can install the editor on modern Debian/Ubuntu systems without downgrading core system libraries while keeping those legacy libraries isolated from the rest of the system.
- Idempotent builds: Skips rebuilding when a matching
.debalready exists (override with--force). - Dependency bundling: Downloads Resolve’s shared-library dependencies and packages them into
opt/resolve/libsto avoid touching host libraries. Libraries that conflict with the system (GLib, Kerberos/OpenSSL stack, etc.) are automatically disabled so they cannot leak into the rest of the system. - Self-contained launcher: Automatically swaps the upstream
resolvebinary for a small wrapper that injectsLD_LIBRARY_PATH=/opt/resolve/libsonly for Resolve itself. - Interactive safeguards: Warns about existing Resolve installations, offers to uninstall, and prompts before installing the freshly built
.deb. - Verbose progress: Color-coded logging with numbered steps so you can follow along.
- Cache-aware: Reuses downloaded dependency
.debfiles between runs (with an option to clear the cache).
- Operating system: Debian, Ubuntu, Pop!_OS, or derivative with
apt. - Required packages:
fakeroot,xz-utils,tar, anddpkg(which providesdpkg-deb). Install them viasudo apt install fakeroot xz-utils tar dpkg. - Privileges: Run the script with
sudo(it configures/opt,/usr, andapt). - Installer: Place the official DaVinci Resolve
.runfile (e.g.,DaVinci_Resolve_18.6.2_Linux.run) in the same directory as the script.
# clone or copy this repository
git clone https://github.com/<you>/resolveRepackage.git
cd resolveRepackage
# place the .run installer beside the script
cp ~/Downloads/DaVinci_Resolve_*_Linux.run .
# ensure the script is executable; run this if it's not already executable
chmod +x repackageResolve.shsudo ./repackageResolve.sh [OPTIONS]| Flag | Description |
|---|---|
-f, --force |
Rebuild the .deb even if a matching version already exists. |
--force-install |
Install the generated .deb even if Resolve seems already installed. |
--clean-cache |
Clear cached dependency archives before bundling. |
-h, --help |
Show usage information and exit. |
The script stores dependency downloads in ${CACHE_ROOT:-$HOME/.cache/resolve-repackage} so subsequent runs are faster. Use --clean-cache if the cache becomes stale or corrupted.
- Checks environment: Confirms root privileges, finds the
.runinstaller, verifies tooling, and prepares the cache directory. - Prep dependencies: Downloads required shared libraries as
.debarchives (download-only) for bundling. - User prompts: Offers to uninstall any prior Resolve installation and asks whether to auto-install the new
.debwhen finished. - Builds the package:
- Extracts the
.runinstaller headlessly with the official installer in--nonrootmode. - Detects the Resolve version from the bundled documentation and creates a Debian staging tree.
- Copies Resolve binaries into
opt/resolveand gathers bundled libs intoopt/resolve/libs(including the downloaded dependency libraries). - Generates the Debian control metadata and
postinstscript, replaces the upstreamresolvebinary with a wrapper, and disables bundled libraries known to clash with the host (GLib, Kerberos/OpenSSL stack, etc.). - Builds the
.debwithfakeroot dpkg-deband emitsdavinci-resolve-studio_<version>_amd64.deb.
- Extracts the
- Optional install: If you consent (or pass
--force-install), installs the package viaapt. - Cleanup: Temporary work directories are removed automatically via a trap handler.
flowchart TD
A[Start Script] --> B[Parse CLI Flags]
B --> C[Check Root Privileges & Tools]
C --> D[Locate .run Installer]
D --> E[Prepare Cache & Resolve Dependencies]
E --> F[Prompt: Uninstall existing Resolve?]
F --> G[Prompt: Auto-install after build?]
G --> H[Headless Extraction]
H --> I[Detect Resolve Version]
I --> J[Stage Debian Tree under /opt/resolve]
J --> K[Gather Bundled Libraries]
K --> L[Bundle External Packages]
L --> M[Disable Conflicting GLib/Kerberos Libs]
M --> N[Create Wrapper + postinst Metadata]
N --> O[Build .deb with fakeroot dpkg-deb]
O --> P{Auto-install?}
P -- Yes --> Q[apt install ./<deb>]
P -- No --> R[Print Manual Install Instructions]
Q --> S[Cleanup Temporary Files]
R --> S[Cleanup Temporary Files]
Detailed map (each item links to the implementation):
- Start Script → parse_args → check_root → check_installer → check_tools
- Prepare dependencies → ensure_bundled_packages
- Prompt for uninstall → prompt_uninstall_and_repackage
- Prompt for auto-install → prompt_install_after_repackage
- Headless extraction & version detection → create_deb_package
- Stage Debian tree & copy assets → create_deb_package
- Bundle external packages → bundle_system_libraries
- Disable conflicting GLib/Kerberos libs → disable_conflicting_libs
- Create wrapper & postinst metadata → create_deb_package
- Build
.deb→ create_deb_package - Optional auto-install → install_package
- Cleanup → cleanup
davinci-resolve-studio_<version>_amd64.deb— the Debian package you can install or distribute.opt/resolveinside the.debcontains Resolve binaries plus bundled libraries underopt/resolve/libs.- Cache directory
${CACHE_ROOT:-$HOME/.cache/resolve-repackage}stores downloaded dependency.debarchives for reuse.
| Issue | Possible Cause | Suggested Fix |
|---|---|---|
No DaVinci Resolve installer (.run) found |
Installer not present in script directory. | Place the .run file alongside repackageResolve.sh and re-run. |
Required tool '<tool>' is not installed |
Missing prerequisite packages. | Install via sudo apt install fakeroot xz-utils tar dpkg. |
Extraction failure (Failed to extract the installer archive) |
Corrupted .run download or insufficient disk space. |
Re-download the installer; ensure adequate disk space. |
| Bundled library warnings | Dependency .deb files missing in cache. |
Check network connectivity; rerun with --clean-cache to refresh. |
Package file '<deb>' not found |
Build skipped because existing package matched; or build failed earlier. | Run with --force to rebuild; inspect prior log output for errors. |
| Installation fails with dependency complaints | Host machine lacks required base packages (libgl1, libx11-6, etc.). |
Install missing packages via sudo apt install <package>. |
Package 'libasound2' has no installation candidate |
Newer Ubuntu/Pop! | |
OS releases virtualize libasound2 (e.g., libasound2t64). |
Pick the T64 variant when prompted, or rerun with the updated script which automatically selects the available variant. | |
Resolve or system binaries fail with undefined symbol errors referencing GLib/OpenSSL/Kerberos |
Older bundled libraries from Resolve were on the dynamic loader path. | The script now disables those copies automatically. If you had a previous install, rename any libglib*, libgio*, libgobject*, libgmodule*, libgthread*, libkrb5*, libk5crypto*, libgssapi_krb5* under /opt/resolve/libs to *.disabled and reinstall with the latest script. |
Upgrading to a new Resolve release is the same as the initial setup:
cd /path/to/resolveRepackage
git pull
cp ~/Downloads/DaVinci_Resolve_*.run .
sudo ./repackageResolve.sh --force --force-install--force ensures the .deb is rebuilt even if the version number hasn’t changed yet, and --force-install skips the prompt and replaces the existing davinci-resolve-studio package in one go. The script automatically handles the wrapper and conflicting libraries on every run, so no manual cleanup is required between upgrades.
Q: Can I run the script without sudo?
No. The script modifies /opt, /usr, and manages apt operations, so elevated privileges are required.
Q: Does the script support the free (non-Studio) Resolve edition?
Yes—adjust PACKAGE_NAME inside the script if you are targeting the free edition.
Q: Where are the temporary working files created?
Under a randomly named directory in /tmp (via mktemp). They are removed automatically unless the script crashes midway.
Q: How do I remove the cached dependency downloads?
Run with the --clean-cache flag or manually delete ${CACHE_ROOT:-$HOME/.cache/resolve-repackage}.
- Fork the repo and create a feature branch.
- Make your changes.
- Run the script end-to-end to ensure the workflow still succeeds.
- Submit a pull request describing your updates.
Bug reports and enhancement ideas are welcome via GitHub issues. See
CONTRIBUTING.md for the validation suite (ShellCheck,
bash -n, gitleaks) and the full pull request process.
Please report vulnerabilities privately through GitHub's Report a vulnerability form rather than public issues. See SECURITY.md for details.
This project is licensed under the GNU General Public License v3.0. See LICENSE for the full text.