Using Ocean container

Prerequisite

Download and connect to the Ocean container.

You may want to share a local directory to the Ocean container to get RPMS locally :

mkdir $HOME/my_ocean_repository
docker run --rm -it -v $HOME/my_ocean_repository:/tmp/my_repo  --privileged ocean-container:latest
cd /root/ocean

Choose target Ocean version

Ocean versions can be found by listing git repository branches :

git branch -r
  origin/2.9
  origin/3.4
  origin/3.8

Switch to the branch against you want to build :

git chekckout -b 3.8 origin/3.8

You are now ready to build your repository.

Setup repository destination

You can choose your destination repository by setting up working_repo parameter in the local.conf file inside Ocean project directory :

echo "working_repo: /tmp/my_repo" >local.conf

Add optional repositories

If you need extra repositories to build your packages you can add additional repositories to Ocean by modifying local.conf:

cat >>local.conf <<EOF
repos:
    awesome_repo:
        url:      https://somewhere.web/repository/
        priority: 90
EOF

Build and publish Ocean rpms

Now you are ready to build your own Ocean repository with one command :

rift build --publish [packages]

You can specify none, one or more package on the command line. It will generate a fully functional repository with the packages you specified or the whole packages if you didn’t.

Exit Ocean container and get your packages

You can now use you repository located here :

# Outside Ocean container
cd $HOME/my_ocean_repository
find $HOME/my_ocean_repository/
x86_64
x86_64/repodata
x86_64/repodata/repomd.xml
x86_64/repodata/c2a1e1e2d6ba6e7ce96ad05c071d7731523c0fcf652598fb6aac2dd68e702d0b-filelists.xml.zst
x86_64/repodata/44c9e5e1030adef260a578fe1f2daea07562dbda7ad6ff5400b28edf092a2307-other.xml.zst
x86_64/repodata/ed9a8b1d25ede4dc3e989505a94243d096b0fd8086f69f79c749b3d62cbffb98-primary.xml.zst
...
SRPMS
SRPMS/repodata
SRPMS/repodata/repomd.xml
SRPMS/repodata/92a0c9185c40c980cf4eb145a2aa82076a7cf0a02e2874a0aed4f8c5cd26e6f9-other.xml.zst
SRPMS/repodata/07d8eb1e3767143a1d2feae26242ed181457e5e5ae8b6d11837103393b09e318-filelists.xml.zst
SRPMS/repodata/df65af4eafaa81f99621691af9ea50ae750d47beb6457b8a1f483fb76d620e69-primary.xml.zst
...