Own/custom repo - folder layout

Thought I should setup a local repo for the rpms I’ve made - to make it easier to manage, and easier for my nephews to use later on their side.

So, I was thinking something like:

/srv/repo/FooBar/                       # vhost: http://foobar.lan/
            index.html                  # w. basic landing/info page
            browse/                     # browsable/indexlisting
                RPM-GPG-KEY-foobar
                el8/
                el9/
                rpmbuild/               # archives of my rpmbuilds

 

But, then the content of each el8/9. Not really sure how I want it, or what’s to prefer.

                   # same as what rpmbuild creates
                   RPMS/
                        noarch/
                            bar-1.0.0-1.el8.noarch.rpm
                        x86_64/
                            foo-2.0.0-1.el8.x86_64.rpm
                    SRPMS
                        bar-1.0.0-1.el8.noarch.src.rpm
                        foo-2.0.0-1.el8.x86_64.src.rpm

                    # - or -
                    noarch/
                        bar-1.0.0-1.el8.noarch.rpm
                    x86_64/
                        foo-2.0.0-1.el8.x86_64.rpm
                    SRPMS
                        bar-1.0.0-1.el8.noarch.src.rpm
                        foo-2.0.0-1.el8.x86_64.src.rpm

                    # - or -
                    Packages
                        bar-1.0.0-1.el8.noarch.rpm
                        foo-2.0.0-1.el8.x86_64.rpm
                    SRPMS
                        bar-1.0.0-1.el8.noarch.src.rpm
                        foo-2.0.0-1.el8.x86_64.src.rpm

Is there a “standard” way, or is it just to make one after your own taste? Or any other suggestions?

· Eric

I’ve seen directories Packages and repodata on many repositories.
Rocky has has convenient* subdirectories in Packages. See Index of /pub/rocky/9/BaseOS/x86_64/os/Packages/

*Convenient for browsing, more laborious for populating.

1 Like

Thanks! Yes, alphabetic’ish folders are great, but I don’t have that many ones. It’ll maybe be a total of 10-20 rpms in the end. Think I’ve done most of the ones I need, and then there’s a few more.

But, going with “Packages/” and then drop all there is ok. Just thinking if I should divide the “x86_64” and “noarch” ones. One program created 2 different rpms where one was a noarch. Thought maybe it could easier when browsing to se them together (as in recognized by names), but it’s maybe more of a proper way to folder them by arch.

/* There will only be rpms created by/for x86_64, but some of them come out as noarch. */


The “repodata“, etc I assume will go into the el8/ folder, and el9/. Ie. where ever I’ll run createrepo.