Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlienConvert

Convert .deb packages to .rpm using an Ubuntu container environment on non-Ubuntu systems (like openSUSE, Fedora, or Arch).

The Concept

alien is an invaluable tool for converting Linux package formats, particularly bridging the gap between Debian-based systems (like Ubuntu) and RPM-based systems. However, installing alien natively on non-Ubuntu distributions can sometimes be problematic due to conflicting dependencies or an overall lack of availability in default repositories.

This project solves that issue by containerizing the alien toolset. Using a rolling release of Ubuntu as the base image, it guarantees that alien and its underlying dependencies are consistently available regardless of your host operating system. All you need is a container runtime like Docker or Podman.

For more background on this setup, read the full article: Converting DEB Packages to RPM Using an Ubuntu Container.

Prerequisites

Ensure you have a container runtime installed on your host system:

  • Podman and Buildah (recommended)
  • Docker

Usage

You can use the container image to convert a file by mapping your local directory to the container and passing the target filename as an environment variable.

Running with Podman/Docker

To convert a package named package.deb located in your current working directory:

# Using Podman
podman run --rm -v $(pwd):/app/AlienConvert -e TARGET=package.deb ghcr.io/thejento/alienconvert:latest

# Using Docker
docker run --rm -v $(pwd):/app/AlienConvert -e TARGET=package.deb ghcr.io/thejento/alienconvert:latest

The resulting .rpm file will be generated in your current working directory.

Setting up an Alias Script (Optional)

To streamline this process, you can create a wrapper script.

  1. Create a script named deb2rpm in a directory in your $PATH (e.g., ~/bin/deb2rpm or /usr/local/bin/deb2rpm):
#!/bin/bash
# Script to convert DEB to RPM using a container

if [ -z "$1" ]; then
  echo "Usage: deb2rpm <deb-file>"
  exit 1
fi

podman run --rm -v $(pwd):/app/AlienConvert -e TARGET="$1" ghcr.io/thejento/alienconvert:latest
# Replace podman with docker if you are using Docker
  1. Make the script executable:
chmod +x ~/bin/deb2rpm
  1. You can now easily convert packages like this:
deb2rpm package.deb

Risks and Limitations

As noted in the article, please be aware of the inherent risks when converting packages between distributions:

  • Library & Dependency Mismatches: RPM and DEB systems often use different naming conventions for system libraries.
  • Pre/Post-installation Scripts: alien might not cleanly translate setup scripts packaged within the DEB file.
  • Security Risks: The integrity and source of converted packages are harder to trace natively.
  • Unsupported Features: Some advanced packaging features are specific to .deb or .rpm and do not translate.

It is highly recommended to avoid converting packages for mission-critical systems or applications that require frequent updates.

CI/CD Pipeline

This repository is configured with a GitHub Action that automatically builds the container image and pushes it to GitHub Container Registry on a regular schedule (monthly) and whenever a new version tag is pushed.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages