#11626 Koji metadata adjustments for Flatpaks
Closed: Fixed 7 months ago by kevin. Opened 10 months ago by otaylor.

  1. Change app names from <x> to <x>-flatpak

    pkgs=($(koji list-pkgs --tag=f39-flatpak --quiet | awk '{ print $1 }' | grep -E -v -- '-(runtime|sdk)'))
    suffixed_pkgs=($(koji list-pkgs --tag=f39-flatpak --quiet | awk '{ print $1 "-flatpak" }' | grep -E -v -- '-(runtime|sdk)'))
    koji add-pkg --owner=releng f39-flatpak "${suffixed_pkgs[@]}"
    koji add-pkg f39-flatpak "${suffixed_pkgs[@]}"
    koji remove-pkg f39-flatpak "${pkgs[@]}"
    
  2. Set the dist tag in the build tags (See #11624) [EDIT: fixed missing % in dist definition. EDIT: fixed escaping]

    koji edit-tag f39-flatpak-app-build \
            -x rpm.macro.dist='%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}' \
            -x rpm.macro.distcore='.fc%{fedora}app1'
    koji edit-tag f39-flatpak-runtime-build \
            -x rpm.macro.dist='%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}' \
            -x rpm.macro.distcore='.fc%{fedora}runtime'
    
    • %distcore is introduced for rawhide in https://src.fedoraproject.org/rpms/fedora-release/pull-request/275 - for f39, I don't really want to start fooling around with the fedora-release macros at this point, so just doing it locally in these tags.
    • This has .fc%{fedora}app1 not .fc%{fedora}app because we need to rebuild everything in .fc39 because of the arch-adjustment. The idea is that if we need to do mass-rebuilds of Flatpak packages, we use .fc39app1/.fc39app2/... - same idea as .eln%{eln}.
  3. Fix and adjust Flatpak architectures (See #11625)

    for tag in fc39-flatpak-container-build fc39-flatpak-app-build fc39-flatpak-runtime-build fc39-flatpak-runtime-packages fc39-flatpak-app; do
        koji edit-tag $tag --arches="x86_64 aarch64 ppc64le"
    done
    
  4. Add _without_mingw macro to f39-flatpak-app-build - this matches what we did for the flatpak-common module. [EDIT: added]

    koji edit-tag f39-flatpak-app-build \
            -x rpm.macro._without_mingw=1
    

Does anything need to be changed so that future fedpkg request-repo --namespace=flatpaks requests create $NAME-flatpak packages in koji instead of $NAME?

Metadata Update from @phsmoura:
- Issue tagged with: low-gain, low-trouble, ops

10 months ago

Does anything need to be changed so that future fedpkg request-repo --namespace=flatpaks requests create $NAME-flatpak packages in koji instead of $NAME?

Yeah - AFAIK, think the addition is done at:

https://pagure.io/fedora-infra/ansible/blob/main/f/roles/bodhi2/backend/templates/owner-sync-pagure.j2#_385

The bugzilla component addition is done at:

https://pagure.io/fedora-infra/toddlers/blob/main/f/toddlers/plugins/distgit_bugzilla_sync.py#_225

though (we should double check at the next flatpak sig meeting), I think we're doing Flatpak specific bugs in gitlab, and not bugzilla, and don't want $NAME-flatpak bugzilla components.

  1. Change app names from <x> to <x>-flatpak

pkgs=($(koji list-pkgs --tag=f39-flatpak --quiet | awk '{ print $1 }' | grep -E -v -- '-(runtime|sdk)'))
suffixed_pkgs=($(koji list-pkgs --tag=f39-flatpak --quiet | awk '{ print $1 "-flatpak" }' | grep -E -v -- '-(runtime|sdk)'))
koji add-pkg --owner=releng f39-flatpak "${suffixed_pkgs[@]}"
koji add-pkg f39-flatpak "${suffixed_pkgs[@]}"
koji remove-pkg f39-flatpak "${pkgs[@]}"

Done.

  1. Set the dist tag in the build tags (See #11624) [EDIT: fixed missing % in dist definition]

koji edit-tag f39-flatpak-app-build \
-x rpm.macro.dist=''%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}" \
-x rpm.macro.distcore='.fc%{fedora}app1'
koji edit-tag f39-flatpak-runtime-build \
-x rpm.macro.dist=''%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}%{distcore}%{?with_bootstrap:%{__bootstrap}}" \
-x rpm.macro.distcore='.fc%{fedora}runtime'

  • %distcore is introduced for rawhide in https://src.fedoraproject.org/rpms/fedora-release/pull-request/275 - for f39, I don't really want to start fooling around with the fedora-release macros at this point, so just doing it locally in these tags.
  • This has .fc%{fedora}app1 not .fc%{fedora}app because we need to rebuild everything in .fc39 because of the arch-adjustment. The idea is that if we need to do mass-rebuilds of Flatpak packages, we use .fc39app1/.fc39app2/... - same idea as .eln%{eln}.

There is some funny escaping there, I am ending with bash: !?distprefix0:%{?: event not found will debug it later.

  1. Fix and adjust Flatpak architectures (See #11625)

for tag in fc39-flatpak-container-build fc39-flatpak-app-build fc39-flatpak-runtime-build fc39-flatpak-runtime-packages fc39-flatpak-app; do
koji edit-tag $tag --arches="x86_64 aarch64 ppc64le"
done

done

  1. Add _without_mingw macro to f39-flatpak-app-build - this matches what we did for the flatpak-common module. [EDIT: added]

koji edit-tag f39-flatpak-app-build \
-x rpm.macro._without_mingw=1
done

There is some funny escaping there, I am ending with bash: !?distprefix0:%{?: event not found will debug it later.

Edited to fix.

Metadata Update from @humaton:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

10 months ago

Something seems to have gone wrong when adding the -flatpak suffixed packages to koji and now everything has a -flatpak entry and a -flatpak-flatpak entry. E.g. 0ad-flatpak and 0ad-flatpak-flatpak

See https://koji.fedoraproject.org/koji/search?match=glob&type=package&terms=*flatpak

Metadata Update from @kalev:
- Issue status updated to: Open (was: Closed)

10 months ago

Also, new "package" requests are not adding the $NAME-flatpak package to koji:

https://koji.fedoraproject.org/koji/taskinfo?taskID=105215388

$ koji list-pkgs --tag f39-flatpak-updates-candidate
[snip]
fractal-flatpak-flatpak f39-flatpak                              releng         
lokalize-flatpak-flatpak f39-flatpak                              releng         
gmult-flatpak-flatpak   f39-flatpak                              releng         
genius-flatpak-flatpak  f39-flatpak                              releng         
tuxmath-flatpak-flatpak f39-flatpak                              releng         
mkvtoolnix              f39-flatpak                              yselkowitz     
foliate                 f39-flatpak                              harrymichal    
kommit                  f39-flatpak                              yselkowitz     
loupe                   f39-flatpak                              yselkowitz  

I've removed all the flatpak-flatpak ones.

The pkg name added in koji I think will need adjustments in roles/bodhi2/backend/templates/owner-sync-pagure.j2

PR's welcome. ;)

The following new entries still require renaming:

mkvtoolnix              f39-flatpak                              yselkowitz     
foliate                 f39-flatpak                              harrymichal    
kommit                  f39-flatpak                              yselkowitz     
loupe                   f39-flatpak                              yselkowitz     
gbrainy                 f39-flatpak                              yselkowitz     
kirigami-gallery        f39-flatpak                              yselkowitz     

The pkg name added in koji I think will need adjustments in roles/bodhi2/backend/templates/owner-sync-pagure.j2

Attempted at https://pagure.io/fedora-infra/ansible/pull-request/1595

renamed all those packages.

I will try and look at the pr later today, but it might not be until monday.

One more (hopefully last) entry requires fixing, after which https://pagure.io/fedora-infra/ansible/pull-request/1595 should prevent this going forward:

waycheck                f39-flatpak                              yselkowitz     

I have one more too:

snapshot

Log in to comment on this ticket.

Metadata
Boards 1
Ops Status: Backlog
Related Pull Requests
  • #1595 Merged 7 months ago