Skip to content

[Software] makedeb - now available on Arch!

I started working on makedeb a bit back - it's purpose is to take PKGBUILDs and convert them into .deb packages that can be installed with APT.

It originally only ran on Debian systems, but I've gotten the necessary stuff thrown together, and I've gotten it to be able to run on Arch.

The goal with porting this to Arch is to help users be able to build for both Arch and Debian from one source (that source being a PKGBUILD).

If I've peaked your interest, you can find makedeb in the AUR from either the stable or alpha release. You can also find the source directly on GitHub.

Edited 14 May 2021. We only hold this version.

276 points37 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
276 · 99% up
Kind
Text
ID
nc10ln

Author

3
posts
20
comments
1
media
View profile

39 comments

How does it address dependency names? As far as I know the package names on Arch and Debian systems can differ.

45 points

Also, you'd presumably be compiling and linking against whatever libraries you have installed on Arch. Even if the Debian system has all the dependencies installed, the binary may not run due to API/ABI breaks.

8 points

This also makes me twitch. Running on debian chroot would probably be the way to go.

6 points

You can check out the makedeb wiki if you'd like to see how things work in a nutshell.

As per what u/DeeBoFour20 mentioned, I'm still working on a solution (for another project) for when binaries are linked against new libraries and everything (I've noticed this being a problem firsthand with the GitHub CLI package). With makedeb itself, I don't really have a solution besides just putting all the needed binaries on a Debian system (which is what my solution is going to entail).

Depending on the dependencies though, sometimes the names will just convert, done and over with. It all just kind of depends on how the program's set up.

Maybe I'll think of a more elegant solution? I'll try to figure something out.

6 points

My reflex suggestion is to first match exact package names, then check this database, and after that, do a search of the package cache with the package name as the search term, presenting the results as a selection menu (a la pacman when a specified package has more than one provider. ttf-font, for example)

If the user selects one of the packages, add it to a local database in the same format as the shipped database for easy contributing. Also, source the local database after the shipped database so that users can specify overrides if desired.

If the package is still not found, then bail. I was thinking about a "not found" menu item that reads user input for a package name, but I think it'll be much safer and easier to force the user to add an entry to the local database instead.

Just a thought, but it popped in my head, so I figured why not :P

5 points

So does this mean I could load something from AUR make a dep out of it and install it on my popos system?

15 points

Yup, I believes that's the motivation behind this.

5 points

I will definetly need to test this. The only reason I love Arch above every other distro is that everything is in the AUR. But I would like to have my laptop to run on a more stable system. But most of the distros leave we with software that is not installable via package manager directly. If this works in like 80-90+% of the cases then I genuinely would pay money for such a tool.

6 points

Do You plan something similar for RPM-based distros like openSUSE, Fedora?

11 points

Sadly not - I just needed something to keep using AUR packages while I was on Ubuntu, and this was the result of that.

makedeb itself just runs makepkg, and then converts the resulting package into a Debian package though. If it helps for you or anyone else, I've packaged makepkg itself as a PKGBUILD, which you could use as a start to building something of the sort.

Edit: The dependencies listed in that PKGBUILD are Debian dependencies - if you're building for something like Fedora or openSUSE, they'll probably need to be modified.

10 points

Well you could just run this to turn the pkgbuild into a .deb. then run alien to turn the .deb into an rpm.

6 points

If there's enough people, a Debian User Repository sourced from the AUR would be dope.

5 points

Sounds useful but only when run on the desired distro like ubuntu or debian. You'll run into all kinds of linking and dependency issues if you make the deb on arch. Same goes for RPMs, that is why there are specific RPMs for specific distros (eg Suse, RHEL etc) and even specific versions.

With that in mind it's still a useful tool as I much prefer the PKGBUILD files for making packages over anything else. Being able to build debs or RPMs with it would be awesome.

2 points

does that mean I can install .deb file in Arch?? (If sound foolish because I am new to linux)

1 points

Lol nope, debtap would work lovely for that.

debtap does what you want - Debian package to Arch. This does the complete opposite - Arch package to Debian.

4 points

Wow, very interesting idea; did you tried it already with something? With kind of software did you succeed?

1 points

I actually have! Besides stuff that just doesn't have any dependencies, I've gotten Google Chrome from the AUR (which is actually sourced from a deb, making a Debian package from an Arch package from a Debian package :D) working just fine, and am actually using it as my way of getting Chrome on my main Ubuntu system.

If you wanna try Chrome too, note that you'll need the makedeb-db package, and you'll need to use the --convertflag when building (I think you'll need to use the alpha package, as I don't think the stable has an up-to-date dependency conversion list).

I've also gotten this working with Matcha GTK Theme and Papirus Icon Theme. There was also a guy on YouTube who got Neofetch working too.

2 points

About Chrome... no, I'd prefer not installing Google stuff on my computer, so I guess I will try on VM with Matcha theme as soon as I can; I don't need it at all, but seems fun. Thanks for your detailed answer.

2 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.