/[packages]/updates/8/x11-server/current/SPECS/x11-server.spec
ViewVC logotype

Contents of /updates/8/x11-server/current/SPECS/x11-server.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2003798 - (show annotations) (download)
Fri Nov 3 10:37:40 2023 UTC (5 months, 3 weeks ago) by ns80
File size: 23299 byte(s)
- backport upstream patches for CVE-2023-5367, CVE-2023-5380 and CVE-2023-5574 (mga#32453)

1 #global gitdate 20151027
2 # temporary build fix:
3 %define _python_bytecompile_build 0
4
5 %bcond_with debug
6 %define enable_builddocs 0
7
8 # Need this for shared objects that reference X Server, or other modules symbols
9 %define _disable_ld_no_undefined 1
10
11 # Alternatives priority for standard libglx.so and mesa libs
12 %define priority 500
13
14 %define rel 4
15 %define subrel 4
16
17 %global __provides_exclude_from %{_datadir}/%{name}-source
18 %global __requires_exclude_from %{_datadir}/%{name}-source
19
20 # Released ABI versions. Have to keep these manually in sync with the
21 # source because rpm is a terrible language.
22 %global ansic_major 0
23 %global ansic_minor 4
24 %global videodrv_major 24
25 %global videodrv_minor 1
26 %global xinput_major 24
27 %global xinput_minor 1
28 %global extension_major 10
29 %global extension_minor 0
30
31 %global pkgname xorg-server
32
33 Name: x11-server
34 Version: 1.20.14
35 Release: %mkrel %rel%{?gitdate:.%{gitdate}}
36 Summary: X11 servers
37 Group: System/X11
38 URL: https://xorg.freedesktop.org
39 %if 0%{?gitdate}
40 Source0: xorg-server-%{gitdate}.tar.xz
41 %else
42 Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.xz
43 Source1: gitignore
44 %endif
45 Source4: 10-quirks.conf
46 Source5: mageia-setup-keyboard-udev
47 Source6: 61-x11-input.rules
48 Source10: xserver.pamd
49 # from RH/FC:
50 # "useful" xvfb-run script
51 Source20: https://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh
52 Source21: https://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.1
53 # for requires generation in drivers
54 Source30: xserver-sdk-abi-requires.release
55 # for finding & loading nvidia and flgrx drivers:
56 Source90: 00-modules.conf
57 License: GPLv2+ and MIT
58
59 # Instructions to setup your repository clone
60 # git://anongit.freedesktop.org/git/xorg/xserver
61 # git checkout origin/server-1.7-branch
62 # git checkout -b mdv-1.7-cherry-picks
63 # git am ../03??-*.patch
64 # git checkout -b mdv-1.7-redhat
65 # git am ../04??-*.patch
66 # git checkout -b mdv-1.7-patches
67 # git am ../09??-*.patch
68
69 # Sync with server-1.20-branch
70 # git format-patch --start-number 100 xorg-server-1.20.3..server-1.20-branch
71 Patch100: 0100-present-Check-for-NULL-to-prevent-crash.patch
72 Patch101: 0101-xf86-Accept-devices-with-the-simpledrm-driver.patch
73
74 # xorg server master branch from 200
75 Patch200: 0200-xfree86-modes-Add-NoOutputInitialSize-option.patch
76 Patch203: 0203-Revert-systemd-logind-Monitor-systemd-logind-going-a.patch
77 Patch204: 0204-dri2-Set-fallback-driver-names-for-Intel-and-AMD-chi.patch
78 # CVE pre-req
79 Patch205: 0205-xkb-switch-to-array-index-loops-to-moving-pointers.patch
80 # ZDI-CAN 16070, CVE-2022-2320
81 Patch206: 0206-xkb-swap-XkbSetDeviceInfo-and-XkbSetDeviceInfoCheck.patch
82 # ZDI-CAN 16062, CVE-2022-2319
83 Patch207: 0207-xkb-add-request-length-validation-for-XkbSetGeometry.patch
84 # CVE-2022-3550
85 Patch208: 0208-xkb-proof-GetCountedString-against-request-length-at.patch
86 # CVE-2022-3551
87 Patch209: 0209-xkb-fix-some-possible-memleaks-in-XkbGetKbdByName.patch
88
89 # Fedora Patches
90 Patch1001: 0001-Xtest-disallow-GenericEvents-in-XTestSwapFakeInput.patch
91 Patch1002: 0002-Xi-return-an-error-from-XI-property-changes-if-verif.patch
92 Patch1003: 0003-Xi-avoid-integer-truncation-in-length-check-of-ProcX.patch
93 Patch1004: 0004-Xi-disallow-passive-grabs-with-a-detail-255.patch
94 Patch1005: 0005-Xext-free-the-screen-saver-resource-when-replacing-i.patch
95 Patch1006: 0006-Xext-free-the-XvRTVideoNotify-when-turning-off-from-.patch
96 Patch1007: 0007-xkb-reset-the-radio_groups-pointer-to-NULL-after-fre.patch
97 Patch1008: 0008-Xext-fix-invalid-event-type-mask-in-XTestSwapFakeInp.patch
98
99 # XXX needs rebase, but also va_gl should probably just be the default
100 # Patch3: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch
101
102 # Submitted upstream, but not going anywhere
103 Patch5: 0001-autobind-GPUs-to-the-screen.patch
104
105 # because the display-managers are not ready yet, do not upstream
106 Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
107
108 # Backports from current stable "server-1.20-branch":
109 # <empty>
110
111 # Backports from "master" upstream:
112 # <empty>
113
114 # Backported Xwayland randr resolution change emulation support
115 Patch501: 0001-dix-Add-GetCurrentClient-helper.patch
116 Patch502: 0002-xwayland-Add-wp_viewport-wayland-extension-support.patch
117 Patch503: 0003-xwayland-Use-buffer_damage-instead-of-surface-damage.patch
118 Patch504: 0004-xwayland-Add-fake-output-modes-to-xrandr-output-mode.patch
119 Patch505: 0005-xwayland-Use-RandR-1.2-interface-rev-2.patch
120 Patch506: 0006-xwayland-Add-per-client-private-data.patch
121 Patch507: 0007-xwayland-Add-support-for-storing-per-client-per-outp.patch
122 Patch508: 0008-xwayland-Add-support-for-randr-resolution-change-emu.patch
123 Patch509: 0009-xwayland-Add-xwlRRModeToDisplayMode-helper-function.patch
124 Patch510: 0010-xwayland-Add-xwlVidModeGetCurrentRRMode-helper-to-th.patch
125 Patch511: 0011-xwayland-Add-vidmode-mode-changing-emulation-support.patch
126 Patch512: 0012-xwayland-xwl_window_should_enable_viewport-Add-extra.patch
127 Patch513: 0013-xwayland-Set-_XWAYLAND_RANDR_EMU_MONITOR_RECTS-prope.patch
128 Patch514: 0014-xwayland-Cache-client-id-for-the-window-manager-clie.patch
129 Patch515: 0015-xwayland-Reuse-viewport-instead-of-recreating.patch
130 Patch516: 0016-xwayland-Recurse-on-finding-the-none-wm-owner.patch
131 Patch517: 0017-xwayland-Make-window_get_none_wm_owner-return-a-Wind.patch
132 Patch518: 0018-xwayland-Check-emulation-on-client-toplevel-resize.patch
133 Patch519: 0019-xwayland-Also-check-resolution-change-emulation-when.patch
134 Patch520: 0020-xwayland-Also-hook-screen-s-MoveWindow-method.patch
135 Patch521: 0021-xwayland-Fix-emulated-modes-not-being-removed-when-s.patch
136 Patch522: 0022-xwayland-Call-xwl_window_check_resolution_change_emu.patch
137 Patch523: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch
138 Patch524: 0024-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch
139 Patch525: 0025-xwayland-Make-window_get_client_toplevel-non-recursi.patch
140
141 # Mageia patches
142 # git format-patch --start-number 900 mdv-1.6.4-redhat..mdv-1.6.4-patches
143 Patch900: 0900-Use-a-X-wrapper-that-uses-pam-and-consolehelper-to-g.patch
144 Patch901: 0901-Don-t-print-information-about-X-Server-being-a-pre-r.patch
145 Patch902: 0902-Take-width-into-account-when-choosing-default-mode.patch
146 Patch903: 0903-LED-behavior-fixes.patch
147 Patch906: 0906-xfree86-need-to-press-Ctrl-Alt-Bksp-twice-to-termina.patch
148
149 # Candidates for dropping:
150 # 902: by pixel, so that X11 choose the best resolution with a better algorithm
151 # 903: Input subsystem has changed *a lot* since this patch was written... I
152 # fear it might break things now
153 # 906: All this patch does is force users to hit ctrl+alt+bksp twice (with
154 # an annoying sound) IF the hotkey is enabled. If the user chooses to
155 # enable ctrk+alt+bksp, why force him to hit twice? OTOH, the sound is
156 # annoying, and it should teach users to not use ctrl+alt+bksp =D
157
158 # Do not crash if Xv is not initialized (patch from xorg-devel ML)
159 # The crash happened when v4l was loaded and xv was not registered,
160 # for example on RV610 with radeon driver
161 Patch4001: 1001-do-not-crash-if-xv-not-initialized.patch
162
163 # (cg) Point the user at the journal rather than a logfile at /dev/null
164 Patch5001: point-user-at-journal-rather-than-dev-null.patch
165
166 # from Suse
167 Patch5009: N_Disable-HW-Cursor-for-cirrus-and-mgag200-kernel-modules.patch
168 Source5010: u_os-connections-Check-for-stale-FDs.patch
169
170 # Security fixes
171 Patch5011: CVE-2023-0494.patch
172 Patch5012: 0001-composite-Fix-use-after-free-of-the-COW.patch
173 Patch5013: CVE-2023-5367.patch
174 Patch5014: CVE-2023-5380.patch
175 Patch5015: CVE-2023-5574.patch
176
177 Requires: %{name}-xorg
178 Requires: %{name}-xdmx
179 Requires: %{name}-xnest
180 Requires: %{name}-xvfb
181
182 # This should be removed when any of the vnc packages provide x11-server-xvnc:
183 Obsoletes: %{name}-xvnc < %{version}-%{release}
184
185 Obsoletes: %{name}-xfake < %{version}-%{release}
186
187 # temp force new gcc
188 BuildRequires: gcc >= 10.1.0-1
189 BuildRequires: binutils >= 1:2.34-10
190 # temp force new glibc
191 BuildRequires: glibc >= 6:2.31-8
192 # nsl bits gone in glibc 2.32, add separate libnsl dep
193 BuildRequires: pkgconfig(libnsl)
194 # rpc bits gone in glibc 2.32, add separate libtirpc dep
195 BuildRequires: pkgconfig(libtirpc)
196
197 BuildRequires: systemtap-sdt-devel
198 BuildRequires: git-core
199 BuildRequires: libpam-devel
200 BuildRequires: pkgconfig(egl)
201 BuildRequires: pkgconfig(fontutil) >= 1.1
202 BuildRequires: pkgconfig(gbm)
203 BuildRequires: pkgconfig(dri)
204 BuildRequires: pkgconfig(gl)
205 BuildRequires: pkgconfig(libudev)
206 BuildRequires: pkgconfig(pciaccess)
207 BuildRequires: pkgconfig(pixman-1) >= 0.9.5
208 BuildRequires: pkgconfig(systemd)
209 BuildRequires: pkgconfig(xau) >= 1.0.0
210 BuildRequires: pkgconfig(xaw7) >= 1.0.1
211 BuildRequires: pkgconfig(xdmcp) >= 1.0.0
212 BuildRequires: pkgconfig(xext) >= 1.1
213 BuildRequires: pkgconfig(xfixes)
214 BuildRequires: pkgconfig(xfont2)
215 BuildRequires: pkgconfig(xi) >= 1.1.3
216 BuildRequires: pkgconfig(xkbfile) >= 1.0.4
217 BuildRequires: pkgconfig(xmu) >= 1.0.0
218 BuildRequires: pkgconfig(xorg-macros) >= 1.10
219 BuildRequires: pkgconfig(xpm) >= 3.5.4.2
220 BuildRequires: pkgconfig(xrender) >= 0.9.4
221 BuildRequires: pkgconfig(xres) >= 1.0.0
222 BuildRequires: pkgconfig(xtrans) >= 1.3.5
223 BuildRequires: pkgconfig(xv)
224 BuildRequires: x11-proto-devel >= 7.7-11
225
226 # for ./hw/xwin/glx/gen_gl_wrappers.py:
227 %define _python_bytecompile_errors_terminate_build 0
228
229 # Probably only needed if we change .l or .y files, but let's have them anyway:
230 BuildRequires: byacc
231 BuildRequires: flex
232
233 # for xkbcomp patch
234 BuildRequires: pkgconfig(libcrypto)
235
236
237 BuildRequires: pkgconfig(dbus-1)
238
239 BuildRequires: pkgconfig(dmx)
240 BuildRequires: pkgconfig(xtst) >= 1.1
241
242 BuildRequires: pkgconfig(wayland-client) >= 1.3.0
243 BuildRequires: pkgconfig(wayland-eglstream-protocols)
244 BuildRequires: pkgconfig(wayland-protocols)
245 BuildRequires: pkgconfig(epoxy)
246 BuildRequires: pkgconfig(xshmfence) >= 1.1
247
248 BuildRequires: pkgconfig(libunwind)
249
250 BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm)
251 BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
252
253 %if %{enable_builddocs}
254 BuildRequires: doxygen
255 BuildRequires: fop
256 BuildRequires: xmlto
257 BuildRequires: pkgconfig(xorg-sgml-doctools)
258 %endif
259
260 %description
261 X.Org X11 X server
262
263
264 %package common
265 Summary: Xorg server common files
266 Group: System/X11
267 License: MIT
268 Provides: XFree86 = 7.0.0
269 Requires: rgb
270 # for 'fixed' and 'cursor' fonts
271 Requires: x11-font-misc-misc
272 Requires: x11-font-cursor-misc
273 Requires: x11-font-alias
274 Requires: x11-data-xkbdata
275 Requires: xkbcomp
276 Requires: udev
277 # else modesetting fails on minimal install:
278 Requires: %{mklibname mesaegl 1}
279 Requires(post): update-alternatives
280 Requires(postun): update-alternatives
281 # nvidia-71xx does not support X.org server >= 1.5
282 Conflicts: x11-driver-video-nvidia71xx < 71.86.09-2
283 # old fglrx does not support X.org server >= 1.7
284 Conflicts: x11-driver-video-fglrx < 8.720
285 # Fix: missing conflicts to allow upgrade from 2008.0 to cooker
286 # http://qa.mandriva.com/show_bug.cgi?id=36651
287 Conflicts: x11-driver-video-nvidia-current <= 100.14.19
288
289
290 Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor}
291 Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor}
292 Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor}
293 Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor}
294 # For proprietary drivers that can support multiple videodrv versions:
295 Provides: xserver-abi(videodrv) = %{videodrv_major}.%{videodrv_minor}
296
297 %description common
298 X server common files
299
300 %package xorg
301 Summary: Xorg X server
302 Group: System/X11
303 License: MIT
304 Requires: x11-server-common = %{version}-%{release}
305 Requires: x11-data-xkbdata > 1.3-5
306 Requires: x11-font-alias
307 Requires: libx11-common
308 Requires: x11-driver-input-libinput
309
310 # minimum libxfont needed for xserver-1.9:
311 Requires: libxfont >= 1.4.2
312
313 %rename glamor
314 %rename x11-driver-video-modesetting
315
316 %description xorg
317 X.org X11 is an open source implementation of the X Window System. It
318 provides the basic low level functionality which full fledged
319 graphical user interfaces (GUIs) such as GNOME and KDE are designed
320 upon.
321
322
323 %package xnest
324 Summary: A nested server
325 Group: System/X11
326 License: MIT
327 Requires: x11-server-common = %{version}-%{release}
328
329 %description xnest
330 Xnest is an X server which has been implemented as an ordinary
331 X application. It runs in a window just like other X applications,
332 but it is an X server itself in which you can run other software. It
333 is a very useful tool for developers who wish to test their
334 applications without running them on their real X server.
335
336
337 %package xdmx
338 Summary: Distributed Multihead X Server and utilities
339 Group: System/X11
340 License: MIT
341 Requires: x11-server-common = %{version}-%{release}
342
343 %description xdmx
344 Xdmx is a proxy X server that provides multi-head support for multiple displays
345 attached to different machines (each of which is running a typical X server).
346 When Xinerama is used with Xdmx, the multiple displays on multiple machines
347 are presented to the user as a single unified screen. A simple application
348 for Xdmx would be to provide multi-head support using two desktop machines,
349 each of which has a single display device attached to it. A complex
350 application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays
351 (each attached to one of 16 computers) into a unified 5120x4096 display.
352
353
354 %package xvfb
355 Summary: A X Windows System virtual framebuffer X server
356 Group: System/X11
357 # xvfb-run is GPLv2, rest is MIT
358 License: MIT and GPLv2
359 Requires: x11-server-common = %{version}-%{release}
360 Requires: xauth
361
362
363 %description xvfb
364 Xvfb (X Virtual Frame Buffer) is an X server that is able to run on
365 machines with no display hardware and no physical input devices.
366 Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does
367 not open any devices, but behaves otherwise as an X display. Xvfb
368 is normally used for testing servers.
369
370
371 %package xephyr
372 Summary: A nested server
373 Group: System/X11
374 License: MIT
375 Requires: x11-server-common = %{version}-%{release}
376
377 %description xephyr
378 Xephyr is an X server which has been implemented as an ordinary
379 X application. It runs in a window just like other X applications,
380 but it is an X server itself in which you can run other software. It
381 is a very useful tool for developers who wish to test their
382 applications without running them on their real X server. Unlike
383 Xnest, Xephyr renders to an X image rather than relaying the
384 X protocol, and therefore supports the newer X extensions like
385 Render and Composite.
386
387
388 %package xwayland
389 Summary: Wayland X Server
390 Group: System/X11
391 License: MIT
392 Requires: x11-server-common = %{version}-%{release}
393
394 %description xwayland
395 Xwayland is an X server for running X clients under Wayland.
396
397 %package devel
398 Summary: SDK for X server driver module development
399 Group: Development/X11
400 License: MIT
401
402 %define oldxorgnamedevel %mklibname xorg-x11
403 Requires: libpixman-1-devel
404 Requires: libpciaccess-devel
405 Requires: libxkbfile-devel
406 Requires: libxext-devel >= 1.1
407 Requires: pkgconfig(xfont2)
408 # pkgconfig file needs dri.pc:
409 Requires: GL-devel
410
411 %description devel
412 The SDK package provides the developmental files which are necessary for
413 developing X server driver modules, and for compiling driver modules
414 outside of the standard X11 source code tree. Developers writing video
415 drivers, input drivers, or other X modules should install this package.
416
417
418 %package source
419 Summary: Xserver source code required to build VNC server (Xvnc)
420 Group: Development/X11
421 License: MIT
422 BuildArch: noarch
423
424 %description source
425 Xserver source code needed to build VNC server (Xvnc)
426
427
428 %prep
429 %autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}}
430 rm -rf .git
431 cp %{SOURCE1} .gitignore
432 # ick
433 %global __scm git
434 %{expand:%__scm_setup_git -q}
435 %autopatch
436
437 # check the ABI in the source against what we expect.
438 getmajor() {
439 grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h |
440 tr '(),' ' ' | awk '{ print $4 }'
441 }
442
443 getminor() {
444 grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h |
445 tr '(),' ' ' | awk '{ print $5 }'
446 }
447
448 test `getmajor ansic` == %{ansic_major}
449 test `getminor ansic` == %{ansic_minor}
450 test `getmajor videodrv` == %{videodrv_major}
451 test `getminor videodrv` == %{videodrv_minor}
452 test `getmajor xinput` == %{xinput_major}
453 test `getminor xinput` == %{xinput_minor}
454 test `getmajor extension` == %{extension_major}
455 test `getminor extension` == %{extension_minor}
456
457
458 %build
459
460 %ifnarch %{ix86} x86_64
461 %global no_int10 --disable-vbe --disable-int10-module
462 %endif
463 %global kdrive --enable-kdrive --enable-xephyr
464 %global xservers --enable-xvfb --enable-xnest %{kdrive} --enable-xorg
465 %global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins"
466 %global dri_flags --enable-dri2 --enable-dri3 --enable-suid-wrapper --enable-glamor
467 %global bodhi_flags --with-vendor-name="%_vendor"
468
469 %if %with debug
470 CFLAGS='-DBUILDDEBUG -O0 -g3' \
471 %endif
472 autoreconf -f -v --install || exit 1
473 %configure %{xservers} \
474 --with-log-dir=%{_logdir} \
475 --enable-dependency-tracking \
476 --enable-xwayland-eglstream \
477 %{?no_int10} --with-int10=x86emu \
478 --with-default-font-path=%{default_font_path} \
479 --with-module-dir=%{_libdir}/xorg/modules \
480 --with-vendor-web="https://bugs.mageia.org" \
481 %if %{with debug}
482 --enable-debug \
483 %else
484 --disable-debug \
485 %endif
486 --with-builderstring="Build ID: %{name} %{version}-%{release}" \
487 --with-os-name="$(hostname -s) $(uname -r)" \
488 --without-dtrace \
489 --disable-xselinux --enable-record --enable-present \
490 --enable-xcsecurity \
491 --enable-config-udev \
492 --disable-strict-compilation \
493 --enable-dpms \
494 --disable-install-setuid \
495 --enable-pam \
496 --enable-dmx \
497 --enable-xwayland \
498 %{dri_flags} %{?bodhi_flags} \
499 --with-sha1=libcrypto \
500
501 pushd include && make xorg-server.h dix-config.h xorg-config.h && popd
502 %make_build
503
504 %install
505 %make_install
506
507 mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input}
508
509 mkdir -p %{buildroot}%{_sysconfdir}/X11/
510 ln -s %{_bindir}/Xorg %{buildroot}%{_sysconfdir}/X11/X
511 ln -sf %{_libexecdir}/Xorg.wrap %{buildroot}%{_bindir}/X
512
513 mkdir -p %{buildroot}%{_sysconfdir}/pam.d
514 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver
515 mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
516 touch %{buildroot}%{_sysconfdir}/security/console.apps/xserver
517
518 mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d
519 install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d
520
521 # make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard
522 # relies on it more or less.
523 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d
524
525 mkdir -p %{buildroot}%{_sysconfdir}/X11/app-defaults
526 mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d
527
528 # move README.compiled outside compiled/ dir, so there won't be any problem with x11-data-xkbdata
529 mv -f %{buildroot}%{_datadir}/X11/xkb/compiled/README.compiled %{buildroot}%{_datadir}/X11/xkb/
530
531 # (anssi) manage proprietary drivers
532 install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL
533 cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL/standard.conf << EOF
534 # This file is knowingly empty since the libraries are in standard search
535 # path. Please do not remove this file.
536 EOF
537 touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf
538
539 mkdir -p %{buildroot}/sbin
540 mkdir -p %{buildroot}/lib/udev/rules.d/
541 install -m 0755 %{SOURCE5} %{buildroot}/sbin/mageia-setup-keyboard
542 install -m 0644 %{SOURCE6} %{buildroot}/lib/udev/rules.d
543
544 install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires
545
546 install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run
547
548 # Make the source package
549 %global xserver_source_dir %{_datadir}/x11-server-source
550 %global inst_srcdir %{buildroot}/%{xserver_source_dir}
551 mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}}
552 mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen}
553 cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in
554 cp {,%{inst_srcdir}/}man/Xserver.man
555 cp {,%{inst_srcdir}/}doc/smartsched
556 cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in
557 cp {,%{inst_srcdir}/}xserver.ent.in
558 cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in
559 cp xkb/README.compiled %{inst_srcdir}/xkb
560 cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86
561
562 install -m 0755 %{SOURCE21} $RPM_BUILD_ROOT%{_mandir}/man1/xvfb-run.1
563 install -m 0644 %{SOURCE90} $RPM_BUILD_ROOT/usr/share/X11/xorg.conf.d/
564
565 find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' |
566 xargs tar cf - | (cd %{inst_srcdir} && tar xf -)
567 find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
568
569 # Remove unwanted files/dirs
570 {
571 find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || :
572 # wtf
573 %ifnarch %{ix86} x86_64
574 rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so
575 %endif
576 }
577
578 %post common
579 %{_sbindir}/update-alternatives \
580 --install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{priority}
581
582 # (anssi)
583 %triggerun common -- %{name}-common < 1.3.0.0-17
584 [ $1 -eq 2 ] || exit 0 # do not run if downgrading
585 current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)"
586 if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then
587 # This an upgrade of a system with no proprietary drivers enabled, update
588 # the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change).
589 %{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
590 else
591 # XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here.
592 %{_sbindir}/update-alternatives --set gl_conf "${current_glconf}"
593 fi
594 true
595
596 %postun common
597 if [ ! -f %{_sysconfdir}/ld.so.conf.d/GL/standard.conf ]; then
598 /usr/sbin/update-alternatives --remove gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
599 fi
600
601 %files
602
603 %files common
604 %dir %{_libdir}/xorg/modules
605 %dir %{_sysconfdir}/X11
606 %dir %{_sysconfdir}/X11/app-defaults
607 %dir %{_sysconfdir}/X11/fontpath.d
608 %dir %{_sysconfdir}/ld.so.conf.d/GL
609 %dir %{_sysconfdir}/X11/xorg.conf.d
610 %ghost %{_sysconfdir}/ld.so.conf.d/GL.conf
611 %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
612 %{_bindir}/gtf
613 %{_bindir}/cvt
614 /sbin/mageia-setup-keyboard
615 /lib/udev/rules.d/61-x11-input.rules
616 %{_bindir}/vdltodmx
617 %{_libdir}/xorg/modules/*
618 %{_libdir}/xorg/protocol.txt
619 %{_datadir}/X11/xkb/README.compiled
620 %{_mandir}/man1/gtf.*
621 %{_mandir}/man1/cvt.*
622 %{_mandir}/man1/vdltodmx.*
623 %{_mandir}/man4/*
624
625 %global Xorgperms %attr(4755, root, root)
626
627 %files xorg
628 %{_bindir}/X
629 %{_bindir}/Xorg
630 %{_libexecdir}/Xorg
631 %{Xorgperms} %{_libexecdir}/Xorg.wrap
632 %attr(4755,root,root)%{_bindir}/Xwrapper
633 %{_sysconfdir}/X11/X
634 %{_sysconfdir}/pam.d/xserver
635 %{_sysconfdir}/security/console.apps/xserver
636 %{_mandir}/man1/Xorg.1*
637 %{_mandir}/man1/Xorg.wrap.1*
638 %{_mandir}/man1/Xserver.1*
639 %{_mandir}/man5/Xwrapper.config.5*
640 %{_mandir}/man5/xorg.conf.5*
641 %{_mandir}/man5/xorg.conf.d.5*
642 %{_datadir}/X11/xorg.conf.d/00-modules.conf
643 %{_datadir}/X11/xorg.conf.d/10-quirks.conf
644
645 %files xnest
646 %{_bindir}/Xnest
647 %{_mandir}/man1/Xnest.1*
648
649 %files xdmx
650 %{_bindir}/Xdmx
651 %{_bindir}/dmx*
652 %{_bindir}/xdmx*
653 %{_mandir}/man1/Xdmx.1*
654 %{_mandir}/man1/dmxtodmx.1*
655 %{_mandir}/man1/xdmxconfig.1*
656
657 %files xvfb
658 %{_bindir}/Xvfb
659 %{_bindir}/xvfb-run
660 %{_mandir}/man1/Xvfb.1*
661 %{_mandir}/man1/xvfb-run.1*
662
663 %files xephyr
664 %{_bindir}/Xephyr
665 %{_mandir}/man1/Xephyr.1*
666
667 %files xwayland
668 %{_bindir}/Xwayland
669
670 %files devel
671 %{_bindir}/xserver-sdk-abi-requires
672 %{_libdir}/pkgconfig/xorg-server.pc
673 %dir %{_includedir}/xorg
674 %{_includedir}/xorg/*.h
675 %{_datadir}/aclocal/xorg-server.m4
676
677 %files source
678 %{xserver_source_dir}

  ViewVC Help
Powered by ViewVC 1.1.30