https://bugzilla.redhat.com/show_bug.cgi?id=1912335
--- Comment #5 from Olivier Fourdan ofourdan@redhat.com --- Thanks for the review!
(In reply to Neal Gompa from comment #4)
This entire strategy is wrong. The source code for the X server software is hosted on a GitLab instance[1], so you can follow the standard guidelines for snapshot packaging[2].
Done.
Please note that I used:
https://gitlab.freedesktop.org/xorg/%%7Bpkgname%7D/-/archive/%%7Bcommit%7D/%...
instead of the suggested:
https://gitlab.freedesktop.org/xorg/xserver/-/archive/%%7Bcommit%7D/%%7Bname...
because of the difference between the name and the actual package name upstream (that's a bit pecular, as the name is "xorg-x11-server-Xwayland" whereas the project upstream is "xserver" so I prefer using the latter as the source name).
Version: 1.20.99 Release: 1%{?gitdate:.%{gitdate}}%{?dist}
Please use proper snapshot versioning: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/ #_snapshots
Done, version/release is now:
Summary: Xwayland Name: xorg-x11-server-Xwayland Version: 1.20.99 Release: 1.%{gitdate}git%{shortcommit}%{?dist}
BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
Please reformat these to be one BR per line, so that it's easily diffable.
Done
[…]
Just change this to "%autosetup -S git_am %{?gitdate:-n xserver-%{commit}}"
Done, I used:
%autosetup -S git_am %{?gitdate:-n %{pkgname}-%{commit}}
Obsoletes: Xwayland < %{version}-%{release} [...] Obsoletes: Xwayland-devel < %{version}-%{release}
These packages do not exist in Fedora, so this doesn't need to be present.
Sure, done.
# X.org requires lazy relocations to work. %undefine _hardened_build %undefine _strict_symbol_defs_build [...] export CFLAGS="$RPM_OPT_FLAGS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1" export CXXFLAGS="$RPM_OPT_FLAGS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1" export LDFLAGS="$RPM_LD_FLAGS -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
This seems to be the wrong way to enable lazy relocations, per the build flags documentation[3]. Please take a look and see if the guidance provided there works.
Actually, none of this should be needed for Xwayland which does not load any DDX at runtime, so I just removed the whole lot.
Updates spec/src.rpm (with new versioning) here:
Spec URL: https://ofourdan.fedorapeople.org/xorg-x11-server-Xwayland/xorg-x11-server-X... SRPM URL: https://ofourdan.fedorapeople.org/xorg-x11-server-Xwayland/xorg-x11-server-X...