Bug 2318425 - Review Request: ollama - Get up and running with Llama 3.2, Mistral, Gemma 2, and other large language models
Summary: Review Request: ollama - Get up and running with Llama 3.2, Mistral, Gemma 2,...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mikel Olasagasti Uranga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2293850 2318427 2318523 2318604 2318618 2318648 2321203 2324351 2324354 2324356 2324362 2328545 2328547
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-13 17:12 UTC by Tom.Rix
Modified: 2025-04-11 13:53 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-04-11 13:53:20 UTC
Type: ---
Embargoed:
mikel: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 8444098 to 8473275 (1.58 KB, patch)
2025-01-06 02:13 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 8473275 to 8499742 (4.78 KB, patch)
2025-01-10 22:08 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 8499742 to 8506897 (1.09 KB, patch)
2025-01-12 16:58 UTC, Fedora Review Service
no flags Details | Diff

Description Tom.Rix 2024-10-13 17:12:44 UTC
A trial build shows there are some dependencies missing

No match for argument: golang(github.com/d4l3k/go-bfloat16)                                                                            
No match for argument: golang(github.com/gin-contrib/cors)                                                                               
  Requires: go-filesystem golang(github.com/gin-gonic/gin)                                                                             
No match for argument: golang(github.com/nlpodyssey/gopickle/pytorch)                                                                  
No match for argument: golang(github.com/nlpodyssey/gopickle/types)                                                                    
No match for argument: golang(github.com/pdevine/tensor)                                                                                 
  No match for argument: golang(github.com/apache/arrow/go/arrow)                                                                        
    No match for argument: golang(github.com/hamba/avro/v2)                                                                            
    No match for argument: golang(github.com/hamba/avro/v2/ocf)                                                                                                                                           
  No match for argument: golang(github.com/chewxy/hm)                                                                                    
    No match for argument: golang(github.com/xtgo/set)                                                                                 
  No match for argument: golang(github.com/chewxy/math32)                                                                                
    No match for argument: golang(go4.org/unsafe/assume-no-moving-gc)                                                                    
  No match for argument: golang(gorgonia.org/vecf32)                                                                                     
     No match for argument: golang(github.com/chewxy/math32)                                                                            
  No match for argument: golang(gorgonia.org/vecf64)                                                                                     
No match for argument: golang(github.com/pdevine/tensor/native)                                                                          
  No match for argument: golang(github.com/x448/float16)



Reproducible: Always

Comment 1 Fedora Review Service 2024-10-13 17:12:54 UTC
Cannot find any valid SRPM URL for this ticket. Common causes are:

- You didn't specify `SRPM URL: ...` in the ticket description
  or any of your comments
- The URL schema isn't HTTP or HTTPS
- The SRPM package linked in your URL doesn't match the package name specified
  in the ticket summary


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 2 Mikel Olasagasti Uranga 2024-10-21 20:26:27 UTC
I can work reviewing the packages. Feel free to join Fedora Golang channel in Matrix if you want to discuss interactively.

For this one, once the deps are ready, should be run as `go2rpm -q --name ollama github.com/ollama/ollama`.

Comment 3 Tom.Rix 2024-12-01 22:29:04 UTC
The WIP Spec : https://trix.fedorapeople.org/golang-github-ollama-ollama.spec

ollama is dependent on installing its runners and other stuff to certain paths relative to the bin/ollama.
Because doing that in %_bindir would not be great, i moved things to _libdir/ollama/ 
Is this ok ?

How does staging the bootstrapped source work with fedpkg?

Comment 4 Mikel Olasagasti Uranga 2024-12-02 08:53:02 UTC
- generate the name with "go2rpm -q --name ollama github.com/ollama/ollama" to create ollama.spec and also change the name of the BZ

- Change this part:

> %ifarch x86_64
> %bcond_without rocm
> %else
> %bcond_with rocm
> %endif

Switch to:

> %bcond rocm 1


- Change this:

> make %{?_smp_mflags}

Switch to:

>%make_build

More context: https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro


- Wildcard bin:

> %{_libdir}/ollama/bin/*

Can you list the all the files?


> ollama is dependent on installing its runners and other stuff to certain paths relative to the bin/ollama.
> Because doing that in %_bindir would not be great, i moved things to _libdir/ollama/ 
> Is this ok ?

I think it's OK, but I suggest to contact packaging.org for more consensus. 

> How does staging the bootstrapped source work with fedpkg?

There are two options:

- Push the spec with boostrap enabled & build it. After push the spec removing the bootstrap bit & build it.
- Create a side tag as explained here https://gitlab.com/fedora/sigs/go/go2rpm/-/merge_requests/13#note_1965122324 and follow steps.

If it's for one package I would go with any of the options, but if it's for multiple packages I would use the second one.

Comment 5 Mikel Olasagasti Uranga 2024-12-02 08:57:16 UTC
> Switch to:
>> %bcond rocm 1

I refer to the style

Comment 6 Tom.Rix 2024-12-02 12:31:30 UTC
Thanks for the responses, I will clean these up.

Comment 7 Tom.Rix 2024-12-24 13:28:25 UTC
Spec URL: https://trix.fedorapeople.org/ollama.spec
SRPM URL: https://trix.fedorapeople.org/ollama-0.4.4-1.fc42.src.rpm

Cleaned up.
Does need to be bootstrapped.

Comment 8 Fedora Review Service 2024-12-24 15:31:42 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8444098
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2318425-ollama/fedora-rawhide-x86_64/08444098-ollama/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 9 Mikel Olasagasti Uranga 2025-01-05 12:53:08 UTC
> %global godocs          docs examples CONTRIBUTING.md README.md SECURITY.md\\\
>                         app/README.md integration/README.md llama/README.md\\\
>                         llama/runner/README.md macapp/README.md


> warning: File listed twice: /usr/share/doc/golang-github-ollama-devel/README.md
> warning: File listed twice: /usr/share/doc/golang-github-ollama-devel/README.md
> warning: File listed twice: /usr/share/doc/golang-github-ollama-devel/README.md
> warning: File listed twice: /usr/share/doc/golang-github-ollama-devel/README.md
> warning: File listed twice: /usr/share/doc/golang-github-ollama-devel/README.md

If you want to install all those README files, you'll need to rename them. You can check one example here: https://src.fedoraproject.org/rpms/golang-k8s-klog2/blob/rawhide/f/golang-k8s-klog2.spec#_44

Comment 10 Tom.Rix 2025-01-06 00:36:37 UTC
Spec URL: https://trix.fedorapeople.org/ollama.spec
SRPM URL: https://trix.fedorapeople.org/ollama-0.4.4-1.fc42.src.rpm

Renamed the docs to get all the readme's
Used your suggestion to improve the building, yeah mock works!

Comment 11 Fedora Review Service 2025-01-06 02:13:05 UTC
Created attachment 2064826 [details]
The .spec file difference from Copr build 8444098 to 8473275

Comment 12 Fedora Review Service 2025-01-06 02:13:07 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8473275
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2318425-ollama/fedora-rawhide-x86_64/08473275-ollama/fedora-review/review.txt

Found issues:

- Documentation size is 1435198 bytes in 107 files. 
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Mikel Olasagasti Uranga 2025-01-09 21:31:14 UTC
I think the spec is correct and will post the review and approval in a separate comment, but before pushing to the repo please change the following cosmetic suggestions:

> BuildRequires:  make
> BuildRequires:  fdupes
> BuildRequires:  gcc-c++

Order alphabetically

> %if %{with rocm}
> BuildRequires:  rocm-comgr-devel
> BuildRequires:  rocm-hip-devel
> BuildRequires:  rocminfo
> BuildRequires:  rocblas-devel
> BuildRequires:  hipblas-devel
> BuildRequires:  rocm-runtime-devel
> BuildRequires:  rocm-compilersupport-macros
> 
> Requires:       rocblas
> Requires:       hipblas
> %endif

Order alphabetically

> # we do not build for gfx940 or gfx941

Can briefly describe why?

> %{_libdir}/ollama/bin/dist/linux-amd64/lib/ollama/runners/{cpu,cpu_avx,cpu_avx2,rocm}/ollama_llama_server
> %{_libdir}/ollama/bin/{ollama,runner}

Can you add a line per entry? it can make things like grep easier.

Comment 14 Mikel Olasagasti Uranga 2025-01-09 21:51:31 UTC
Sorry, I was too fast in my previous comment. There other things to fix also:

> [ ]: Package requires other packages for directories it uses.
>      Note: No known owner of /usr/lib64/ollama/bin/dist/linux-
>      amd64/lib/ollama/runners/cpu, /usr/lib64/ollama/bin/dist/linux-amd64,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/cpu_avx,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/cpu_avx2,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama,
>      /usr/lib64/ollama/bin, /usr/lib64/ollama/bin/dist/linux-amd64/lib,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/rocm,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners,
>      /usr/lib64/ollama/bin/dist
> [ ]: Package must own all directories that it creates.
>      Note: Directories without known owners: /usr/lib64/ollama/bin,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/cpu_avx2,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib,
>      /usr/lib64/ollama/bin/dist, /usr/lib64/ollama/bin/dist/linux-
>      amd64/lib/ollama, /usr/lib64/ollama/bin/dist/linux-
>      amd64/lib/ollama/runners/rocm, /usr/lib64/ollama/bin/dist/linux-
>      amd64/lib/ollama/runners, /usr/lib64/ollama/bin/dist/linux-amd64,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/cpu_avx,
>      /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners/cpu

Check https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/

You may need to add the following to take ownership of the paths:

%dir /usr/lib64/ollama
%dir /usr/lib64/ollama/bin
%dir /usr/lib64/ollama/bin/dist
%dir /usr/lib64/ollama/bin/dist/linux-amd64
%dir /usr/lib64/ollama/bin/dist/linux-amd64/lib
%dir /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama
%dir /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/runners


> Development (unversioned) .so files in -devel subpackage, if present.
>     Note: Unversioned so-files in private %_libdir subdirectory (see
>     attachment). Verify they are not in ld path.

It refers to this path: /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/libggml_rocm.so

> %{_libdir}/ollama/bin/dist/linux-amd64/lib/ollama/libggml_rocm.so
> %{_libdir}/ollama/bin/dist/linux-amd64/lib/ollama/runners/{cpu,cpu_avx,cpu_avx2,rocm}/ollama_llama_server

Should rocm installs be checked with `%if %{with rocm}`?

Comment 15 Tom.Rix 2025-01-10 19:39:18 UTC
Spec URL: https://trix.fedorapeople.org/ollama.spec
SRPM URL: https://trix.fedorapeople.org/ollama-0.4.4-1.fc42.src.rpm

I think I addressed issues raised and did a few other cleanups.

Comment 16 Fedora Review Service 2025-01-10 22:08:45 UTC
Created attachment 2065434 [details]
The .spec file difference from Copr build 8473275 to 8499742

Comment 17 Fedora Review Service 2025-01-10 22:08:47 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8499742
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2318425-ollama/fedora-rawhide-x86_64/08499742-ollama/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 18 Mikel Olasagasti Uranga 2025-01-11 22:17:51 UTC
> %package -n     ollama-doc
> Summary:        Documents for %{name}
> 
> %description -n ollama-doc
> %{summary}

Package is defined, but there is no `%files -n doc` with the doc files. I guess this was created as +1MB warning was reported by fedora-review, but...

> %gopkginstall
> %gopkgfiles

... this creates `golang-github-ollama-devel-0.4.4-1.fc42.noarch.rpm` that is the package that was shipping the documentation.

- If -devel package won't required by any other package, you can remove `%gopkginstall` and `%gopkgfiles` and -devel package won't be created and doc wouldn't be an issue. I think this is the safest option.
- If -devel package will be needed, then by removing example as you did would reduce the size of doc to <1MB and no other changes would be required and -doc package could be removed.

Comment 19 Tom.Rix 2025-01-12 15:24:31 UTC
Spec URL: https://trix.fedorapeople.org/ollama.spec
SRPM URL: https://trix.fedorapeople.org/ollama-0.4.4-1.fc42.src.rpm

Yes, the -docs was because of the fedora-review.
Spec changed to remove the -devel and -docs packages as you suggest.

Comment 20 Fedora Review Service 2025-01-12 16:58:08 UTC
Created attachment 2065707 [details]
The .spec file difference from Copr build 8499742 to 8506897

Comment 21 Fedora Review Service 2025-01-12 16:58:10 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8506897
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2318425-ollama/fedora-rawhide-x86_64/08506897-ollama/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 22 Tom.Rix 2025-01-15 21:34:27 UTC
Is any other action needed from me ?

Comment 23 Mikel Olasagasti Uranga 2025-01-20 17:09:37 UTC
Thanks for you patience Tom.

The final spec addresses all the changes that have been requested.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed

===== MUST items =====

C/C++:
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. No licenses
     found. Please check the source files for licenses manually.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[X]: %build honors applicable compiler flags or justifies otherwise.
[X]: Package contains no bundled libraries without FPC exception.
[X]: Changelog in prescribed format.
[X]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[X]: Package uses nothing in %doc for runtime.
[X]: Package consistently uses macros (instead of hard-coded directory
     names).
[X]: Package is named according to the Package Naming Guidelines.
[X]: Package does not generate any conflict.
[X]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[X]: Requires correct, justified where necessary.
[X]: Spec file is legible and written in American English.
[X]: Package contains systemd file(s) if in need.
[X]: Useful -debuginfo package or justification otherwise.
[X]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 37500 bytes in 8 files.
[X]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: The License field must be a valid SPDX expression.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[X]: Reviewer should test that the package builds in mock.
[X]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[X]: Final provides and requires are sane (see attachments).
[X]: Package functions as described.
[X]: Latest version is packaged.
[X]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[X]: Package should compile and build into binary rpms on all supported
     architectures.
[X]: %check is present and all tests pass.
[X]: Packages should try to preserve timestamps of original installed
     files.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: ollama-0.4.4-1.fc42.x86_64.rpm
          ollama-0.4.4-1.fc42.src.rpm
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpj9r5xzc0')]
checks: 32, packages: 2

ollama.x86_64: W: no-manual-page-for-binary ollama
 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 7 filtered, 0 badness; has taken 1.4 s 




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 0 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 filtered, 0 badness; has taken 0.0 s 
(none): E: there is no installed rpm "ollama".
There are no files to process nor additional arguments.
Nothing to do, aborting.



Unversioned so-files
--------------------
ollama: /usr/lib64/ollama/bin/dist/linux-amd64/lib/ollama/libggml_rocm.so

Source checksums
----------------
https://github.com/ollama/ollama/archive/v0.4.4/ollama-0.4.4.tar.gz :
  CHECKSUM(SHA256) this package     : 330c85a80e32c9a86c6447e130ebbb37e5a915dc7fddb45d0806302923024b7e
  CHECKSUM(SHA256) upstream package : 330c85a80e32c9a86c6447e130ebbb37e5a915dc7fddb45d0806302923024b7e


Requires
--------
ollama (rpmlib, GLIBC filtered):
    hipblas
    ld-linux-x86-64.so.2()(64bit)
    libamdhip64.so.6()(64bit)
    libamdhip64.so.6(hip_4.2)(64bit)
    libamdhip64.so.6(hip_6.0)(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libggml_rocm.so()(64bit)
    libhipblas.so.2()(64bit)
    libm.so.6()(64bit)
    libresolv.so.2()(64bit)
    librocblas.so.4()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.11)(64bit)
    libstdc++.so.6(CXXABI_1.3.13)(64bit)
    libstdc++.so.6(CXXABI_1.3.15)(64bit)
    libstdc++.so.6(CXXABI_1.3.2)(64bit)
    libstdc++.so.6(CXXABI_1.3.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    rocblas
    rtld(GNU_HASH)



Provides
--------
ollama:
    libggml_rocm.so()(64bit)
    ollama
    ollama(x86-64)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/bin/fedora-review --no-colors --prebuilt --rpm-spec --name ollama --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic
Disabled plugins: Haskell, R, Java, Ocaml, C/C++, Python, Perl, SugarActivity, PHP, fonts
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH


Package approved! On import, don't forget to do the following:

- [ ] Add the package to release-monitoring.org
- [ ] Give go-sig privileges (at least commit) on the package
- [ ] Close the review bug by referencing its ID in the rpm changelog and the Bodhi ticket.
- [ ] Consider configuring Packit service to help with maintenance

Comment 24 Fedora Admin user for bugzilla script actions 2025-01-21 13:03:12 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/ollama

Comment 25 Jakub Čajka 2025-01-29 08:54:57 UTC
Package seems to be exclude arched, although it AFAIK should build fine and with basic functions(BLAS/CPU backend) present on all architectures. If there are any serious reasons could you please open tracking issues per architecture support guidelines https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_support after this bug concludes. 

I'm looking at it atm and it seems as rather small changes to spec should enable all of it(conditional dependency on rocm, proper archstring in file paths etc.)

Comment 26 Tom.Rix 2025-01-30 00:11:26 UTC
(In reply to Jakub Čajka from comment #25)
> Package seems to be exclude arched, although it AFAIK should build fine and
> with basic functions(BLAS/CPU backend) present on all architectures. If
> there are any serious reasons could you please open tracking issues per
> architecture support guidelines
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> #_architecture_support after this bug concludes. 
> 
> I'm looking at it atm and it seems as rather small changes to spec should
> enable all of it(conditional dependency on rocm, proper archstring in file
> paths etc.)

I do not have any other the arch hw so i have now way to test or support it.
If you want to provide a patch for an arch you want, please send a pr.
package has been added to the go-sig (iirc), so anyone in it should be able to enhance this package as needed.

Comment 27 Jakub Čajka 2025-01-30 12:16:52 UTC
(In reply to Tom.Rix from comment #26)
> (In reply to Jakub Čajka from comment #25)
> > Package seems to be exclude arched, although it AFAIK should build fine and
> > with basic functions(BLAS/CPU backend) present on all architectures. If
> > there are any serious reasons could you please open tracking issues per
> > architecture support guidelines
> > https://docs.fedoraproject.org/en-US/packaging-guidelines/
> > #_architecture_support after this bug concludes. 
> > 
> > I'm looking at it atm and it seems as rather small changes to spec should
> > enable all of it(conditional dependency on rocm, proper archstring in file
> > paths etc.)
> 
> I do not have any other the arch hw so i have now way to test or support it.
> If you want to provide a patch for an arch you want, please send a pr.
> package has been added to the go-sig (iirc), so anyone in it should be able
> to enhance this package as needed.

That is the reason for the policy :) and should have been caught in the review. When you file the tracking issue we are able to notice the issues and we will help you or just keep it as record why the package is missing on the respective arch. If you are not sure you can reach out to fedora-devel. Here I don't see any reason why this should depart from the Go packaging, target all goarchs. More broadly speaking there are development machines that all Fedora packagers do have access to(it is not only koji or COPR) or we can arrange access to more specific HW.

I have opened PR with all the changes in pagure/dist-git. To note it seems that upstream is reducing CPU centered functionality of the package(stripping blas support, various archful optimizations), but basic CPU support still remains.

I have noticed one more issue that got missed by review, manual stripping of binaries. That goes against the spirit of debuginfo policy(https://docs.fedoraproject.org/en-US/packaging-guidelines/Debuginfo/). If you need minimized binaries do the striping(if not done by debuginfo generation) in the container, image build when you use the package. If that is the case you could consider breaking up this package in to sub packages per the runner type, if you need to squeeze out every bit of size out of it. Assuming that the ollama server can tolerate missing runners.

And last nitpick, offer. Ollama seems to be effectively daemon and could use a systemd integration/unit file. If you think it would be useful I can work on one.


Note You need to log in before you can comment on or make changes to this bug.