2

How can I rename a .deb package that can be uploaded to reprepro?

For example, I have a deb package example-latest.deb which is the latest version, I have created a custom repository so users can download it from there, but there are multiple packages with the same name on the existing ubuntu repos. So basically I want to rename this example-latest.deb to something like myname.deb so users that use my repository can install the package by typing apt install myname

from the deb package, I have ran the following:

changestool myname.changes adddeb myname.deb
changestool myname.changes setdistribution ubuntu
gpg --clearsign myname.changes

and after looking at the myname.changes I see the package is named something like example_2.5.1_all.deb which makes me unable to upload it. I can rename the file to comply with this but then I am not really accomplishing anything.

Anybody knows what is the best way to rename a file?

1 Answer 1

1

First you will need to extract the .deb to a temporary directory (tmpdir).

dpkg-deb -x example-latest.deb tmpdir

Then we are going to pull the control file that is located in the tmpdir/DEBIAN/ folder. This is where you will make your dependency changes.

cd tmpdir
dpkg-deb --control example-latest.deb 

Edit the tmpdir/DEBIAN/control file

vim tmpdir/DEBIAN/control

Change the package name:

packages: myname

After you have edited your control file you will need to repackage your .deb with this command.

dpkg -b tmpdir new-name-of-package.deb

Install the package and then you can run

dpkg -i new-name-of-package.deb
apt install myname

Source: https://forums.linuxmint.com/viewtopic.php?t=35136

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .