Making RPM from directory tree?

To RPM guys, I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. 1. Is there GUI app with appropriate fill in boxes? 2. Is there command line utility? In Slackware, it's just "makepkg". Background: I use "netpipes-4.2" a lot. Debian and Slackware have it, but Redhat variants don't. I can use netcat and pipe (and I do), but there are so many variations (ie. nc, netcat, ncat), each with different behaviour and options. I like to use what I'm familiar with. So, I downloaded the source, compiled it, and installed to a directory. Now what?

On 2022-06-11 6:09 p.m., William Park via talk wrote:
To RPM guys,
I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. 1. Is there GUI app with appropriate fill in boxes? 2. Is there command line utility? In Slackware, it's just "makepkg".
You need a "spec" file, which is a single formatted file giving the recipe for building the package for that system. There's a command line utility called "vi" that I've found very helpful when I've had to construct these files. Anthony

I've long found that making linux packages seems to be more complicated than I might have hoped. To build RPMs, you typically use rpmbuild(8) which uses a set pf diretories (SOURCES, SPECS, BUILDROOT, RPMS, ...) to build rpms. But you might have a look at "fpm" - the "effing" package manager. https://github.com/jordansissel/fpm https://www.digitalocean.com/community/tutorials/how-to-use-fpm-to-easily-cr... I find creating RPM repositories relatively simple - createrepo(8) (or possibly createrepo_c(8)) feel straightforward to me. GPG package signing is not too hard. I find deb/apt repositories to be more involved. Hope that helps! John

On Sat, Jun 11, 2022 at 10:49:54PM -0400, John Sellens via talk wrote:
I've long found that making linux packages seems to be more complicated than I might have hoped.
To build RPMs, you typically use rpmbuild(8) which uses a set pf diretories (SOURCES, SPECS, BUILDROOT, RPMS, ...) to build rpms.
But you might have a look at "fpm" - the "effing" package manager.
https://github.com/jordansissel/fpm https://www.digitalocean.com/community/tutorials/how-to-use-fpm-to-easily-cr...
I find creating RPM repositories relatively simple - createrepo(8) (or possibly createrepo_c(8)) feel straightforward to me. GPG package signing is not too hard. I find deb/apt repositories to be more involved.
dpkg-scanpackages can create repos for debian quite easily, although not in the full structure of the official repos which are done with different tools. -- Len Sorensen

Morning,
I find creating RPM repositories relatively simple - createrepo(8) (or possibly createrepo_c(8)) feel straightforward to me. GPG package signing is not too hard. I find deb/apt repositories to be more involved.
dpkg-scanpackages can create repos for debian quite easily, although not in the full structure of the official repos which are done with different tools.
I would be curious what would be the group opinion on flatpak https://flatpak.org/ Seems like it can handle William issue better because it's not forcing structure too hard William

On 2022-06-11 18:09, William Park via talk wrote:
I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. [snip] I use "netpipes-4.2" a lot. Debian and Slackware have it, but Redhat variants don't. [snip] So, I downloaded the source, compiled it, and installed to a directory. Now what?
I used to build and update .rpm packages back when I was using a distro that used RPM for package management. If you aren't creating your own package from scratch the simplest approach is to download and use the .src.rpm file for the package you want to update. You can modify the .spec file with the name of the newer source code file. You will also want a .rpmmacros file which sets the packager name, the build directory, and the temporary directory that will be used by rpmbuild. -- Cheers! Kevin. http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick

I gave up. I installed it to /usr/local. I'll need to keep the tarball around, so that I'll know what files to remove. On 2022-06-12 00:44, Kevin Cozens via talk wrote:
On 2022-06-11 18:09, William Park via talk wrote:
I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. [snip] I use "netpipes-4.2" a lot. Debian and Slackware have it, but Redhat variants don't. [snip] So, I downloaded the source, compiled it, and installed to a directory. Now what?
I used to build and update .rpm packages back when I was using a distro that used RPM for package management. If you aren't creating your own package from scratch the simplest approach is to download and use the .src.rpm file for the package you want to update. You can modify the .spec file with the name of the newer source code file.
You will also want a .rpmmacros file which sets the packager name, the build directory, and the temporary directory that will be used by rpmbuild.

On 2022-06-12 12:35, William Park via talk wrote:
I gave up. I installed it to /usr/local. I'll need to keep the tarball around, so that I'll know what files to remove.
I had another thought. If you can find the package you need from another distro you might be able to use the program called 'alien' to convert the package in to RPM format. It has been a long time since I've thought about the alien program. It would be worth seeing if it can help. -- Cheers! Kevin. http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick

Here is an SRPM for netpipes. In all it took about 15 minutes to find the source and a simple spec file. you can unpack the rpm using "rpm -ivh netpipes-4.2.3.src.rpm" you can go into ~/rpmbuild/SPEC and then build the rpm using "rpmbuild -ba netpipes.spec" On 2022-06-12 12:35, William Park via talk wrote:
I gave up. I installed it to /usr/local. I'll need to keep the tarball around, so that I'll know what files to remove.
On 2022-06-12 00:44, Kevin Cozens via talk wrote:
On 2022-06-11 18:09, William Park via talk wrote:
I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. [snip] I use "netpipes-4.2" a lot. Debian and Slackware have it, but Redhat variants don't. [snip] So, I downloaded the source, compiled it, and installed to a directory. Now what?
I used to build and update .rpm packages back when I was using a distro that used RPM for package management. If you aren't creating your own package from scratch the simplest approach is to download and use the .src.rpm file for the package you want to update. You can modify the .spec file with the name of the newer source code file.
You will also want a .rpmmacros file which sets the packager name, the build directory, and the temporary directory that will be used by rpmbuild.
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || Cell: (416)806-0133 alvin@netvel.net ||

On Sat, 11 Jun 2022 at 18:09, William Park via talk <talk@gtalug.org> wrote:
To RPM guys,
I have a directory tree, created from "make install DESTDIR=...". Now, I want to make RPM package from the tree. Online docs are too verbose and confusing. 1. Is there GUI app with appropriate fill in boxes? 2. Is there command line utility? In Slackware, it's just "makepkg".
Background:
I use "netpipes-4.2" a lot. Debian and Slackware have it, but Redhat variants don't. I can use netcat and pipe (and I do), but there are so many variations (ie. nc, netcat, ncat), each with different behaviour and options. I like to use what I'm familiar with.
So, I downloaded the source, compiled it, and installed to a directory. Now what?
I used to use 'checkinstall' a lot. Whenever I did the "./configure ; make ; make install" dance, I used 'checkinstall' on my predominantly Debian systems. It tracks the created files, and creates a system package. And if I didn't like the product, I could then 'apt purge X' to remove the package I'd made. I rarely used it to move the package to another system, but that usually worked if the other system was the same architecture and same OS. I think 'checkinstall' works on Fedora (it claims to make RPMs), but it doesn't seem to be packaged for it. http://checkinstall.izto.org/ Last bug fix 2016, spectacularly retro website. But it's still packaged in Debian. Not sure this is a path you want to pursue, but it's a program I found very useful for a whole lot of years. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com
participants (8)
-
Alvin Starr
-
Anthony de Boer
-
Giles Orr
-
John Sellens
-
Kevin Cozens
-
Lennart Sorensen
-
William Muriithi
-
William Park