编辑:

编辑:

由于可访问性错误我无法使用 Xorg-server 1.13 到 1.15。我看到 CentOS 7 使用1.15.0有没有办法在 CentOS 7 中使用更高版本的 Xorg-server?

软呢帽23有 Xorg-server 1.18.0,考虑到 Fedora 几乎是以后进入 RHEL 和 CentOS 的测试平台,有没有办法在 CentOS 中使用 Fedora 的 Xorg-server?

答案1

如果 rhel 和 fedora 之间的库依赖关系没有改变(机会很小),您可以使用 fedora 软件包,因为 RedHat 7 是基于 Fedora 19 的。

您可以尝试在 RHEL7 机器上从 fedoras srpm 重建必要的软件包。

编辑:

所以我想知道是否可以为 el7 重新编译最新的 xorg (我没有尝试安装 fedora 软件包,因为我怀疑这几乎是一个死胡同)。

令我惊讶的是,我成功做到了。我只将生成的 rpm 安装在 docker 容器中,没有进行任何测试或启动服务器来查看它是否有效。

编辑2:

添加了命令来构建所有 libX 包。我无法重建台面(工作量太大,因为它需要更新的 clang 包和其他一些东西)

这是我用来进行构建的脚本。一切都是在 docker 容器中完成的:

docker run --rm -it _your_container_ bash

#!/bin/bash

rm -f /etc/yum.repos.d/*

# I built packages from rawhide, you should use fedora23 probably
# we need yum-plugin-priorities and priority=1 for srpm repo
# if you use oracle linux, remove centos repo
#  and add oracles ol_latest and ol_optional
cat > /etc/yum.repos.d/extra_repos.repo <<EOF
[fedora_srpm]
#baseurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/23/Everything/source/SRPMS/
baseurl=https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/source/SRPMS/
name=fedora_srpm
enabled=1
gpgcheck=0
priority=1
[centos]
baseurl=http://mirror.centos.org/centos/7/os/x86_64
name=centos
enabled=1
gpgcheck=0
EOF

yum groupinstall "Development Tools" -y
yum install -y yum-utils yum-plugin-priorities rpmdevtools libxcb libpng libfontenc \
  freetype fontconfig ghostscript xmlto java-1.7.0 java-1.7.0-openjdk-devel \
  zziplib cairo poppler xorg-x11-glamor libdrm valgrind mtdev libXvMC xcb-util \
  xorg-x11-server-utils pyparsing opus libiscsi glusterfs-api opus-devel \
  celt051-devel cyrus-sasl-devel celt051 mesa-private-llvm libdmx libXxf86dga \
  xorg-x11-util-macros xorg-x11-proto-devel python-six nss-util nspr nss libaio \
  xorg-x11-xbitmaps libXaw libXpm xorg-sgml-doctools passivetex gl-manpages \
  graphviz chrpath libXres xcb-util-wm xcb-util-keysyms xcb-util-image \
  xcb-util-renderutil rsh xorg-x11-xtrans-devel cmake asciidoc python-mako \
  imake || exit 1

# reinstall locales in docker
yum reinstall -y glibc glibc-common
yum update -y


rpmdev-setuptree
export QA_RPATHS=0x0001

## You will need those extra packages during builds from fedora rawhide
cd && mkdir extras && cd extras

pkg_extra=(libFS mcpp libdrm libevdev libinput spice-protocol spice libunwind wayland libxshmfence xcb-util)
for pkg in ${pkg_extra[@]}; do
  yumdownloader --source $pkg
  yum-builddep -y $pkg-*.fc2*.src.rpm && spectool -g -R $pkg-*.fc2*.src.rpm && rpmbuild --rebuild $pkg-*.fc2*.src.rpm || exit 1
  # we keep installing what we built nutil now for the next builds
  rm -f $pkg-*.fc2*.src.rpm && yum install -y ~/rpmbuild/RPMS/*/*
done


# for xorg server we need libepoxy for which we have to fix the spec file (needs python3 to compile)
yumdownloader --source libepoxy
rpm -i libepoxy*
sed s/python3/python2/g -i ~/rpmbuild/SPECS/libepoxy.spec
yum-builddep -y ~/rpmbuild/SPECS/libepoxy.spec && \
spectool -g -R ~/rpmbuild/SPECS/libepoxy.spec && \
rpmbuild -ba ~/rpmbuild/SPECS/libepoxy.spec || exit 1
rm -f libepoxy* && yum install -y ~/rpmbuild/RPMS/*/libepoxy-*



# Start building xorg
cd && mkdir xorg-x11 && cd xorg-x11

yumdownloader --source xorg-x11-*
# remove packages that complain about x86_64 architecture
rm -f xorg-x11-drv-armsoc* xorg-x11-drv-freedreno* xorg-x11-drv-geode* xorg-x11-drv-omap* xorg-x11-drv-opentegra*

# I couldn't compile xorg-x11-drv-intel, so we will install it later
rm -f xorg-x11-drv-intel-*

## we need those package built and installed first
pkg_order=(xorg-x11-proto-devel xorg-x11-font-utils xorg-x11-fonts xorg-x11-xtrans-devel xorg-x11-server-utils)
for pkg in ${pkg_order[@]}; do
  rpm_name=$pkg-*.src.rpm
  yum-builddep -y $rpm_name && spectool -g -R $rpm_name && rpmbuild --rebuild $rpm_name || exit 1
  rm -f $rpm_name && yum install -y ~/rpmbuild/RPMS/*/$pkg*
done

# drivers need to be compiled for this server version, so we compile and install the server
# remove fedora20 checks and build a package for wayland also
rpm -i xorg-x11-server-*.rpm
sed 's/0%{?fedora} > 20/0%{?el7:1}/g' -i ~/rpmbuild/SPECS/xorg-x11-server.spec
yum-builddep -y ~/rpmbuild/SPECS/xorg-x11-server.spec && \
spectool -g -R ~/rpmbuild/SPECS/xorg-x11-server.spec && \
rpmbuild -ba ~/rpmbuild/SPECS/xorg-x11-server.spec || exit 1
rm -f xorg-x11-server-*.rpm && yum install -y ~/rpmbuild/RPMS/*/*

# those need half of python3 packages for tests, so we disable tests in the spec file
pkg_notests=(xorg-x11-xauth xorg-x11-xbitmaps)
for pkg in ${pkg_notests[@]}; do
  rpm -i $pkg-*.rpm
  sed 's/BuildRequires: cmdtest/#BuildRequires: cmdtest/g' -i ~/rpmbuild/SPECS/$pkg.spec
  sed 's/make check/#make check/g' -i ~/rpmbuild/SPECS/$pkg.spec
  yum-builddep -y ~/rpmbuild/SPECS/$pkg.spec && \
  spectool -g -R ~/rpmbuild/SPECS/$pkg.spec && \
  rpmbuild -ba ~/rpmbuild/SPECS/$pkg.spec || exit 1
  rm -f $pkg-*.rpm && yum install -y ~/rpmbuild/RPMS/*/$pkg-*
done

# compile everything but drivers
ls *.rpm | grep -v 'xorg-x11-drv' | sort | while read pkg;do
  yum-builddep -y $pkg && spectool -g -R $pkg && rpmbuild --rebuild $pkg || exit 1
  rm -f $pkg
done

# build drivers at last
ls xorg-x11-drv*.rpm | sort | while read pkg;do
  yum-builddep -y $pkg && spectool -g -R $pkg && rpmbuild --rebuild $pkg || exit 1
  rm -f $pkg
done

# this conflicts with other packages
yum remove -y xorg-x11-server-debuginfo
# install everything for testing
yum install -y ~/rpmbuild/RPMS/*/* https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/Packages/x/xorg-x11-drv-intel-2.99.917-16.20150729.fc24.x86_64.rpm


# recompile all libX packages
yumdownloader --source libX\*

# fix unpackaged files
rpm -i libXaw-*.rpm
sed 's/%dir %{_pkgdocdir}/%{_pkgdocdir}/' -i ~/rpmbuild/SPECS/libXaw.spec
yum-builddep -y ~/rpmbuild/SPECS/libXaw.spec && \
spectool -g -R ~/rpmbuild/SPECS/libXaw.spec && \
rpmbuild -ba ~/rpmbuild/SPECS/libXaw.spec || exit 1
rm -f libXaw-*.rpm

rpm -i libXt-*.rpm
sed 's/%dir %{_docdir}/%{_docdir}/' -i ~/rpmbuild/SPECS/libXt.spec
yum-builddep -y ~/rpmbuild/SPECS/libXt.spec && \
spectool -g -R ~/rpmbuild/SPECS/libXt.spec && \
rpmbuild -ba ~/rpmbuild/SPECS/libXt.spec || exit 1
rm -f libXt-*.rpm

ls *.rpm | sort | while read pkg;do
  yum-builddep -y $pkg && spectool -g -R $pkg && rpmbuild --rebuild $pkg || exit 1
  rm -f $pkg
done

echo SUCCESS

答案2

我很高兴地报告这一点CentOS 7-1511 使用 Xorg-server 1.17.2,它不会遭受可访问性错误。因此该版本无需修补即可使用。

相关内容