#1 Split developer documentation into a libsoup-doc.noarch subpackage
Closed 3 years ago by mcrha. Opened 3 years ago by mcrha.

file modified
+33 -4
@@ -1,5 +1,8 @@ 

  %define glib2_version 2.58.0

  

+ # Coverity scan can override this to 0, to skip checking in gtk-doc generated code

+ %{!?with_docs: %global with_docs 1}

+ 

  Name: libsoup

  Version: 2.72.0

  Release: 3%{?dist}
@@ -12,7 +15,9 @@ 

  BuildRequires: gettext

  BuildRequires: glib2-devel >= %{glib2_version}

  BuildRequires: glib-networking

+ %if %{with_docs}

  BuildRequires: gtk-doc

+ %endif

  BuildRequires: krb5-devel

  BuildRequires: meson

  BuildRequires: pkgconfig(gobject-introspection-1.0)
@@ -46,11 +51,29 @@ 

  Libsoup is an HTTP library implementation in C. This package allows

  you to develop applications that use the libsoup library.

  

+ %if %{with_docs}

+ 

+ %package doc

+ Summary: Documentation files for %{name}

+ BuildArch: noarch

+ 

+ %description doc

+ This package contains developer documentation for %{name}.

+ 

+ # %%{with_docs}

+ %endif

+ 

  %prep

  %autosetup -p1

  

  %build

- %meson -Dgtk_doc=true

+ %if %{with_docs}

+ %define gtkdoc_flags -Dgtk_doc=true

+ %else

+ %define gtkdoc_flags -Dgtk_doc=false

+ %endif

+ 

+ %meson %gtkdoc_flags

  %meson_build

  

  %install
@@ -79,14 +102,20 @@ 

  %{_libdir}/pkgconfig/*.pc

  %dir %{_datadir}/gir-1.0

  %{_datadir}/gir-1.0/Soup*2.4.gir

- %dir %{_datadir}/gtk-doc

- %dir %{_datadir}/gtk-doc/html

- %{_datadir}/gtk-doc/html/%{name}-2.4

  %dir %{_datadir}/vala

  %dir %{_datadir}/vala/vapi

  %{_datadir}/vala/vapi/libsoup-2.4.deps

  %{_datadir}/vala/vapi/libsoup-2.4.vapi

  

+ %if %{with_docs}

+ 

+ %files doc

+ %dir %{_datadir}/gtk-doc

+ %dir %{_datadir}/gtk-doc/html

+ %{_datadir}/gtk-doc/html/%{name}-2.4

+ 

+ %endif

+ 

  %changelog

  * Sun Sep 20 2020 Kalev Lember <klember@redhat.com> - 2.72.0-3

  - Try harder to avoid sysprof-devel dependency

Split developer documentation files into a separate package, to avoid
multilib conflicts on the libsoup-devel subpackage. The change will
also follow a usual packaging way of the developer documentation in Fedora.

Why do you need to exclude the docs when building flatpaks? I don't think it's going to make any difference because libsoup is part of the flatpak runtime (which means it's reused from the regular flatpak=0 build and never rebuilt with flatpak=1). I'd rather just leave the flatpak conditionals out.

Also, could you please use a fork when pushing wip branches? It's very difficult to get a private branch removed from regular dist-git once you are done with it.

Otherwise looks fine to me :)

I think that this might not be the right solution (so I would rather hold it) - please take a look at https://bugzilla.redhat.com/show_bug.cgi?id=1915780 (sorry for RH internal link), but there might be something wrong with gtk-doc.

I'd rather just leave the flatpak conditionals out.

Okay, that was a "copy&paste" for the evolution-data-server. I'll drop the flatpak mention there.

Also, could you please use a fork when pushing wip branches?

Hmm, I'm currently "used to" the GNOME GitLab, where is a "delete branch" check and which doesn't work on forks (or maybe it does, I do not know). I'll try to not forget a different workflow here (though I do not propose many patches here, thus I'd probably forget of it soon).

I think that this might not be the right solution...

I see, thanks for the notice and the link. It still can benefit in the split, by not duplicating the files in the -devel packages for each architecture. As I said above, the -doc subpackage is the way Fedora uses for the noarch developer documentation, which is another "benefit" of this change.

If gtk-doc had been fixed, then you might be right that the change is useless now.

I'll update the branch anyway, the maintainer can decide which path to go afterwards. It can be eventually used some time later, in the (distant) future.

1 new commit added

  • Remove Flatpak build related changes (added in error)
3 years ago

Hrm, I'd merge the two commits into one, but I cannot use git push --atomic --force-with-lease here (works on the GNOME GitLab with no problem), I'm getting:

remote: Forced pushes are not allowed
remote: Denied push for ref 'refs/heads/wip/mcrha/doc-subpackage' for user 'mcrha'
remote: All changes have been rejected

I do not see how to reassign this pull request to a different branch (my fork), but I do not want to close this merge request just to replace it with another, because it contains important information.

If approved, I'd commit manually and just close this merge request. Let me know.

Looks good to me. Go for it!

Pull-Request has been closed by mcrha

3 years ago

It's very difficult to get a private branch removed from regular dist-git once you are done with it.

Hrm, I've not been aware of this. You are right, I cannot delete it:

$ git push --delete origin wip/mcrha/doc-subpackage
remote: Branch deletion is not allowed
remote: Denied push for ref 'refs/heads/wip/mcrha/doc-subpackage' for user 'mcrha'
remote: All changes have been rejected
To ssh://pkgs.fedoraproject.org/rpms/libsoup
 ! [remote rejected] wip/mcrha/doc-subpackage (pre-receive hook declined)
error: failed to push some refs to 'ssh://mcrha@pkgs.fedoraproject.org/rpms/libsoup'

What is the procedure to get rid of it, please? May I send an email to Fedora infrastructure list or any other, requesting a delete? Or open a bug against certain component?

I believe you would have to open a releng ticket to get branches removed. I am not sure what the current policy is; it could be that they only remove branches that are fully merged into master.

Oh, I see. I'll figure it out. Thanks.