Wednesday 28 July 2021

createrepo on Ubuntu 20.04

Unfortunately, createrepo command which can create RPM repositories was removed in Ubuntu 20.04 LTS.

It's almost impossible to run package from Ubuntu 18.04 as plenty of dependencies were removed.

Let's try building C based version of createrepo from: 

First of all, install all dependencies:

sudo apt install -y libcurl4-openssl-dev libbz2-dev libxml2-dev libssl-dev zlib1g-dev pkg-config libglib2.0-dev liblzma-dev libsqlite0-dev libsqlite3-dev librpm-dev libzstd-dev python3.9-dev cmake

Then build it:

mkdir createrepo_folder; cd createrepo_folder

git clone

cd createrepo_c;

mkdir build

cd build


make -j 

cp src/createrepo_c  /opt/createrepo

Do test run:
/opt/createrepo /var/public_repositories/
Directory walk started
Directory walk done - 18 packages
Temporary output repo path: /var/public_repositories/.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished
Please do not remove original folder "createrepo_folder" because it has dynamic library needed for app itself. 

No comments :

Post a Comment

Note: only a member of this blog may post a comment.