Announcing sailfishos:chum

I still hope we can integrate somehow Chum and OpenRepos. So, it would be sufficient to get packages submitted to Chum and get them reflected in OpenRepos stream automatically. Don’t have such hopes for Jolla Store integration (for some unknown reason).

Question 2: should work, as for any other regular SPEC.

I may have made another error, but it seems to ‘not work’:
https://build.sailfishos.org/package/live_build_log/home:poetaster:imageworks/harbour-simplecrop/3.4.0.24_armv7hl/armv8el

On the other hand, it’s fast :slight_smile:

Make sure you include them as dependencies. Compared to SDK, OBS has a smaller base image, so you get to check your dependencies better. I can see some ls outputs in your build log. According to that, the libs are missing

I don’t get it. libjpeg must be in the base image. I’m copying it FROM the base image :slight_smile: That’s the point. I have to copy them into my app local lib dir to use them in the python lib I use. If I didn’t copy from the base image, I wouldn’t get this build into harbour. It’s a kind of ‘hack’, but it gets the app:

  1. Self contained (cough)
  2. Allowed in harbour.

I do understand that it’s a hack, though.

Add to your SPEC ls /usr/lib and check it. Base images are different for OBS and SDK. So, just add jpeg dependency as a buildrequires

Ah, but then I won’t get into harbour. Or you mean add some logic to the spec to discern between ‘regular and obs build?’

And if the base images are different, what am I developing against? I use the SDK to develop?!

If you add as BuildRequires and then use the same copy trick as you have already. As BuildRequires is different from Requires, Harbour is no problem. Just don’t assume that JPEG is by default in the base image.

Ok, I’m not sure how I do that with system libs since I’ve only ever used BuildRequires with Qt dependencies.

The assumption that libjpeg is in the base image comes from the sailfish os documentation about provided libraries. However, I explicitly copy a specific version. That’s a 3.4 thing, for sure, and generally frowned upon. But it was also the only way I found to get these apps into the jolla store (and good exercise).

No problem. To find “good” dependcy, search for corresponding lib. In case of JPEG, package is libjpeg-turbo-devel. To see what it provides, run

$ sb2 -t SailfishOS-4.1.0.24-aarch64 -m sdk-install -R zypper info --provides libjpeg-turbo-devel
Loading repository data...
Reading installed packages...


Information for package libjpeg-turbo-devel:
--------------------------------------------
Repository     : jolla
Name           : libjpeg-turbo-devel
Version        : 2.0.4+git1-1.2.2.jolla
Arch           : aarch64
Vendor         : meego
Installed Size : 41.9 KiB
Installed      : No
Status         : not installed
Source package : libjpeg-turbo-2.0.4+git1-1.2.2.jolla.src
Summary        : Development tools for programs which will use the libjpeg library
Description    : 
    The libjpeg-devel package includes the header files and documentation
    necessary for developing programs which will manipulate JPEG files using
    the libjpeg library.

    If you are going to develop programs which will manipulate JPEG images,
    you should install libjpeg-devel.  You'll also need to have the libjpeg
    package installed.
Provides       : [5]
    libjpeg-devel
    libjpeg-turbo-devel = 2.0.4+git1-1.2.2.jolla
    libjpeg-turbo-devel(aarch-64) = 2.0.4+git1-1.2.2.jolla
    pkgconfig(libjpeg) = 2.0.4
    pkgconfig(libturbojpeg) = 2.0.4

Notice, that it provides pkgconfig(libjpeg). So, add in your SPEC:

BuildRequires: pkgconfig(libjpeg)
1 Like

Ah, duh. Ok, that’s sort of, ehm, obvious. Thanks!

EDIT: that breaks builds in the SDK: I’m assuming you’re doing something like docker or SSH into the virtual? I’m ‘just’ using the SDK with virtualbox so I’m not sure what the best way to go is.

EDIT2: but I’m also wrong, libjpeg is NOT in: sdk-harbour-rpmvalidator/allowed_libraries.conf at harbour-qa · sailfishos/sdk-harbour-rpmvalidator · GitHub

Ok, in parallel, I’ve got one python heavy (without C deps) app in obs now.

neither of libfreetype nor libtiff work. The packages (on a phone) are found by zypper but adding them as BuildRequires fails in the SDK:

No provider of ‘pkgconfig(libtiff)’ found.
error: Failed build dependencies:
pkgconfig(libtiff) is needed by harbour-simplecrop-1.0-2.armv7hl

EDIT. just noticed that those libraries don’t supply pkgconfig. I need to find development pkgs.

In SDK (will work for OBS also), you can zypper search libtiff for instance. It will give you this :

Loading repository data...
Reading installed packages...

S | Name                | Summary                                                           | Type
--+---------------------+-------------------------------------------------------------------+-----------
  | libtiff             | Library of functions for manipulating TIFF format image files     | package
  | libtiff             | Library of functions for manipulating TIFF format image files     | srcpackage
  | libtiff-debuginfo   | Debug information for package libtiff                             | package
  | libtiff-debugsource | Debug sources for package libtiff                                 | package
  | libtiff-devel       | Development tools for programs which will use the libtiff library | package
  | libtiff-doc         | Documentation for libtiff                                         | package
  | libtiff-tools       | Command-line utility programs for manipulating TIFF files         | package

You need then, BuildRequires: libtiff-devel

I had trid zypper info --provides libtiff without devel. that turned out to be the wrong avenue. adding -devel did it (pkgconfig(libtiff-4)). Thanks!

EDIT: So, adding BuildRequires for the libraries doesn’t help with
# >> install post
install -D -t %{buildroot}/%{_datadir}/%{name}/lib/
%{_libdir}/libjpeg.so.62
%{_libdir}/libopenjp2.so.7
%{_libdir}/libtiff.so.5
%{_libdir}/libfreetype.so.6
%{_libdir}/libwebpdemux.so.2
%{_libdir}/libwebpmux.so.3
%{_libdir}/libwebp.so.7
# << install post

It’s a hack anyway (to fulfill the depends of the python PIL c objects). But it does get imagewoks into harbour. Won’t build on obs:
https://build.sailfishos.org/package/live_build_log/home:poetaster:imageworks/harbour-simplecrop/3.4.0.24_armv7hl/armv8el

Ive edited the first post to add links to our new documentation. For devs not used to OBS, there is the Getting Started document, and for us maintainers, we have a list of checks for submitted packages, s its probably worth devs being familiar with them.

5 Likes

I would like to encourage all chum contributors to add at least one or two lines into the package description on OBS. :smiley:

4 Likes

Just updated mine :slight_smile: I’d still recomend the people install from the Jolla store, though. That’s my priority in testing as I build. Chum will probably be my ‘bleeding edge’ (cough) code in future. That is to say, testing.

The solution was:
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libopenjp2)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(libwebp)
BuildRequires: pkgconfig(libwebpdemux)
BuildRequires: pkgconfig(libwebpmux)

Iterative testing: just leave the ‘release’ tag empty and you can get obs to rebuild on simple changes to the .spec file (thanks rinigus!)

Or you could use chum:testing for the bleeding edge and push it to chum when it’s working acceptably?

1 Like

Of course, that’s what I meant.

There are also some subtle and not so subtle differences between just building in the sdk, tagging in github, uploading to harbour and ‘semi-automated’ builds. I’m not so sure yet.

I also have some more complicated projects which I’ve been ‘faking’ in a sense. For instance, Imageworks has included the PIL library. I’ve just pushed binary library depends (the cpython stuff) into an application library context. I should be building those. …