--- xserver-xorg-video-savage-2.2.1.orig/ChangeLog +++ xserver-xorg-video-savage-2.2.1/ChangeLog @@ -1,116 +1,1265 @@ -2006-05-09 Alex Deucher <agd5f@yahoo.com> +commit de3350e7937240686a90e51243e701b51a7f5249 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 16:04:31 2008 -0400 - * man/savage.man: - * src/savage_exa.c: (SavageEXAInit), (SavageDownloadFromScreen): - - add AccelMethod to savage.man - - fix bug 6847 - - add memcpy based DFS - -2006-04-30 Alex Deucher <agd5f@yahoo.com> - - * src/Makefile.am: - * src/savage_accel.c: (SavageSetGBD_M7), (SavageSetGBD_PM), - (SavageSetGBD_2000), (SavageInitAccel): - * src/savage_bci.h: - * src/savage_driver.c: (SavageSetup), (SavagePreInit): - * src/savage_driver.h: - * src/savage_exa.c: (SavageGetCopyROP), (SavageGetCopyROP_PM), - (SavageEXAInit), (SavageEXASync), (SavageSetBD), - (SavagePrepareSolid), (SavageSolid), (SavageDoneSolid), - (SavagePrepareCopy), (SavageCopy), (SavageDoneCopy), - (SavageUploadToScreen), (SavageDownloadFromScreen): - * src/savage_image.c: - * src/savage_video.c: (SavageStopVideo), (SavageVideoSave), - (SavageAllocateMemory), (SavageFreeMemory), (SavagePutImage), - (SavageAllocateSurface), (SavageFreeSurface): - * src/savage_xaa.c: (SavageRestoreAccelState), (SavageXAAInit), - (SavageAccelSync), (SavageHelpPatternROP), (SavageHelpSolidROP), - (SavageSetupForScreenToScreenCopy), - (SavageSubsequentScreenToScreenCopy), (SavageSetupForSolidFill), - (SavageSubsequentSolidFillRect), - (SavageSetupForCPUToScreenColorExpandFill), - (SavageSubsequentScanlineCPUToScreenColorExpandFill), - (SavageSubsequentColorExpandScanline), - (SavageSetupForMono8x8PatternFill), - (SavageSubsequentMono8x8PatternFillRect), - (SavageSetupForColor8x8PatternFill), - (SavageSubsequentColor8x8PatternFillRect), - (SavageSubsequentSolidBresenhamLine), (SavageSetClippingRectangle), - (SavageDisableClipping), (SavageWriteBitmapCPUToScreenColorExpand), - (SavageSetupForImageWrite), (SavageSubsequentImageWriteRect): - - Add EXA support (Solid, Copy, UTS) - -2006-04-07 Adam Jackson <ajax@freedesktop.org> - - * configure.ac: - * src/savage_driver.h: - Bump to 2.1.1 for Xv changes. - -2006-04-07 Aaron Plattner <aplattner@nvidia.com> - - * src/savage_video.c: (SavagePutImage): - Add a DrawablePtr argument to the XV functions to pave the way for - redirected video. - -2006-04-07 Adam Jackson <ajax@freedesktop.org> - - * configure.ac: - * src/savage_dri.c: - * src/savage_driver.h: - * src/savage_hwmc.c: - * src/savage_i2c.c: - Unlibcwrap. Bump server version requirement. Bump to 2.1.0. - -2006-02-08 Luc Verhaegen <libv@skynet.be> - - * src/savage_dri.c: (SAVAGEDRIScreenInit): - * src/savage_driver.c: (SavagePreInit): - * src/savage_driver.h: - - - Remove insane usage of pScrn->clocks. Set maxClock directly. - - Fix trivial and harmless warning in DRI code (FrameBufferBase) - -2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * man/Makefile.am: - Change *man_SOURCES ==> *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin <kem-at-freedesktop-dot-org> - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-20 Adam Jackson <ajax@freedesktop.org> - - * configure.ac: - Bump libdrm dep to 2.0. - -2005-11-29 Adam Jackson <ajax@freedesktop.org> - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org> + no, really, savage 2.2.1 - * configure.ac: - Update package version number for X11R7 RC2 release. +commit 5c0617874a49533f16b97277cd42584abb80f720 +Merge: 97a9d24... a01c9d1... +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 16:03:25 2008 -0400 -2005-11-01 Kevin E. Martin <kem-at-freedesktop-dot-org> + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. +commit 97a9d2476868befc989b7ddb8067ac791bf2672e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 16:01:37 2008 -0400 + + savage 2.2.1 + +commit fd20f5ddc2ef5945a757f6afedff5fb6214b607e +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 16:00:40 2008 -0400 + + Fake sync ranges for panels with no EDID. + + Red Hat bug #243589. + +commit 09c4dcc658b07f2672388eb4ab5fee3ebe190fc9 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed May 21 15:58:24 2008 -0400 + + Don't try to call vbeModeInit(), it doesn't exist and never will. + +commit a01c9d12938f977a4310e0547866f01517059a3e +Author: Dave Airlie <airlied@linux.ie> +Date: Sat May 10 15:06:18 2008 +1000 + + savage/pciaccess: don't try to map aperture larger than region window + +commit 69eca3b8340966874ee3ffdc0d0a3f73de7a816a +Author: Dave Airlie <airlied@linux.ie> +Date: Sat May 10 14:58:14 2008 +1000 + + savage: fix typos in error message + +commit 9cb124b3542c942622a54d0ce429661516b1e2f4 +Author: Alex VillacÃs Lasso <a_villacis@palosanto.com> +Date: Thu Apr 10 12:51:47 2008 -0400 + + EXA upload to screen must honor pitch of the source data + +commit d0cbce17e1d1e99dbecda339c6704b96606b20d3 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 19 15:15:35 2008 -0400 + + savage 2.2.0 + +commit 6adc23cb19bfd331221df8dccb2dc88b8fc77821 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 19 15:12:49 2008 -0400 + + Remove use of deprecated {DE,}ALLOCATE_LOCAL. + +commit 371d8fbae6f077d5a6dd845fad129fa9c7b0a701 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Mar 19 15:06:46 2008 -0400 + + Death to RCS tags. + +commit dc6a410290ab5103812a49273b27e3c72a7b2a98 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Sat Mar 8 23:47:57 2008 +0100 + + Makefile.am: nuke RCS Id + +commit 908b155161ebb6cd506f43a3987e4d146ef5b330 +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Mar 7 17:10:52 2008 +0100 + + fixup pciaccess version detect + +commit eeea6468df31ee770c8d7c9dab4fac7ff0865bba +Author: Alex Villacs Lasso <a_villacis@palosanto.com> +Date: Thu Feb 28 19:32:42 2008 -0500 + + Fix broken downscale past 2:1 - MM8190 and MM8198 can be used together for arbitrary downscale + +commit d838ed93a23b4e9dc438ad17875423e8b90f0015 +Author: Tormod Volden <git.tormod@xoxy.net> +Date: Sun Feb 24 21:46:43 2008 -0500 + + Bug #11139: Remove some dead code. + +commit 583051fce0d39fd2b8b5022016599e88d0af9041 +Author: Alex VillacÃs Lasso <a_villacis@palosanto.com> +Date: Wed Jan 30 21:49:05 2008 -0500 + + [PATCH] Do not wait for vertical retrace anymore on old streams engine. + +commit 52029dede1924c25275a1c6f20f68e98ba210e22 +Author: Alex VillacÃs Lasso <a_villacis@palosanto.com> +Date: Wed Jan 30 21:47:42 2008 -0500 + + [PATCH] Reset lastKnownPitch to 0 right after enabling streams. + +commit efd4ae6fda22a9283663cde23e6deead13130f6f +Author: Alex VillacÃs Lasso <a_villacis@palosanto.com> +Date: Wed Jan 30 21:46:11 2008 -0500 + + [PATCH] Prevent use of BCI for YV12 -> YUY2 conversion from scribbling past the end of the allocated video buffer. + +commit ee5b54a66495e51fb2a27b4ecb5875dae776b3c9 +Author: Alex VillacÃs Lasso <a_villacis@palosanto.com> +Date: Wed Jan 30 21:45:19 2008 -0500 + + [PATCH] BCI can only handle widths that are multiple of 16, so only use BCI for these (for now). + + Small optimizations (use memcpy instead of copy loop). + +commit 1169cb5bd96f7a4ac0deea6d085133d446ec0d6a +Author: Alex VillacÃÂs Lasso <a_villacis@palosanto.com> +Date: Sat Jan 19 12:08:50 2008 -0500 + + Implement driver option IgnoreEDID + + Since some time, savage enforces video-mode and max. pixel clock + validation through EDID, which is great for autoconfiguration, but + prevents users from defining higher screen resolutions, even though the + monitor is capable of it. This patch implements the IgnoreEDID option so + that the EDID monitor information can be explictly disabled. + +commit ce182d1883bba35491858b47291c8240441443d0 +Author: Alex VillacÃÂs Lasso <a_villacis@palosanto.com> +Date: Sat Jan 19 12:06:25 2008 -0500 + + Fix ambiguous operator precedence + + In the modified lines, the logical-not binds first to psav->videoFlags, + not to (psav->videoFlags & VF_STREAMS_ON). If more flags are ever + implemented, they could interfere with this check. More of a preventive + patch than anything else. + +commit 88141fd21214c501cafed73b1bba084b8a2bb929 +Author: Alex VillacÃÂs Lasso <a_villacis@palosanto.com> +Date: Sat Jan 19 12:02:56 2008 -0500 + + Make sure MMIO region is mapped VIDMEM_MMIO, not VIDMEM_FRAMEBUFFER + +commit fd2a598e64a522c028a20444379fa200a5724e62 +Author: Alex Deucher <alex@botch2.(none)> +Date: Sat Jan 19 12:00:16 2008 -0500 + + Fix reversed logic in SavageMapMem() + +commit 9c959f53ca8376aa136a9d434c3383cdb20487c2 +Author: Alex Deucher <alex@botch2.(none)> +Date: Fri Sep 14 20:21:12 2007 -0400 + + fix the build for the non-pci-rework case (compile tested only) + +commit 846a69f70d189c486448df269a512b8d42fab0c2 +Author: Alex Deucher <alex@botch2.(none)> +Date: Fri Sep 14 20:13:33 2007 -0400 + + fix segfault from pScrn->currentMode + + should fix bug 12260 + +commit 53a2088c5590bb96ce9a7ad30d908c7ea1d54027 +Merge: 7da1a03... 0287432... +Author: James Cloos <cloos@jhcloos.com> +Date: Mon Sep 3 06:08:13 2007 -0400 + + Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage + +commit 7da1a03d4b8b40483001b1f6e56dae655a1797f4 +Author: James Cloos <cloos@jhcloos.com> +Date: Mon Sep 3 05:52:43 2007 -0400 + + Add *~ to .gitignore to skip patch/emacs droppings + +commit 0287432c65231460fadff7d8d7b332208e345a31 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Aug 31 13:07:17 2007 -0700 + + Fix odd typo. + +commit 514dc647d108e179965adb1377b1d4c011afa367 +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 30 17:53:11 2007 -0700 + + Update to use new libpciaccess interfaces for mapping with MTRR support. + +commit 1eec792391d9ce9127817107100a53382f167749 +Merge: 4a87cab... ffc5ba7... +Author: Ian Romanick <idr@us.ibm.com> +Date: Thu Aug 23 18:21:37 2007 -0700 + + Merge branch 'pci-rework' + +commit 4a87cab2765df548a3b5d796e19568a2576306b8 +Author: James Cloos <cloos@jhcloos.com> +Date: Thu Aug 23 19:25:53 2007 -0400 + + Rename .cvsignore to .gitignore + +commit ffc5ba7f0b1cdefdcecf6bd47018b6a4924bfc44 +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Aug 22 12:38:14 2007 -0700 + + Merge PCI-rework support and "classic" PCI interface support into one tree + + First pass at merging both trees. So far, this has only been compile + tested. I need to dig out a savage card to put in a system for + testing, so it may take another hour or two. + +commit 68ceead721aeb75b9faed6297407a320a83499e4 +Merge: da23218... bf5e2a5... +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Aug 22 11:45:43 2007 -0700 + + Merge branch 'master' into pci-rework + + Conflicts: + + src/savage_driver.h + +commit da23218b067d9b1808fc1168737c79b3349af09e +Author: Ian Romanick <idr@us.ibm.com> +Date: Wed Aug 22 11:42:47 2007 -0700 + + dos2unix + +commit bf5e2a5d33fbab07bc3606927c58a3a04a5c9b1e +Author: Julien Cristau <jcristau@debian.org> +Date: Fri Aug 17 03:25:48 2007 +0200 + + Include <unistd.h> to get a declaration for usleep() + +commit 83f3db97b107a84d79e21c64039328c05095719e +Author: Alex Deucher <alex@botch2.com> +Date: Thu Aug 16 20:45:12 2007 -0400 + + update for 2.1.3 release + +commit 1f6258c7f4c4073de0bdd72f06c1e94bb6895c73 +Author: Brice Goglin <bgoglin@debian.org> +Date: Tue Aug 7 09:54:47 2007 +0200 + + Define SAVAGE_VERSION* using PACKAGE_VERSION* + +commit b706ffe07fc61281d2dea406f828418f42e3da85 +Author: Alex Deucher <alex@botch2.com> +Date: Thu Jul 12 00:03:13 2007 -0400 + + Unmap mem before freeing driverPrivate + +commit fab88bce3b9f19918bbf1a2b0f57d34113c8381f +Author: Alex Deucher <alex@botch2.com> +Date: Wed Jul 11 23:40:51 2007 -0400 + + Add panel native mode automatically. + + Based on Henry Zhao's code from nv + +commit b126b204d3465700e8c6a1fcc4770f322c8bb7db +Author: Tormod Volden <bugzi06.fdo.tormod@xoxy.net> +Date: Wed Jul 11 21:25:30 2007 -0400 + + Add "DRI" option to enable/disable DRI support + + fixes bug 10746 + +commit 90692b3a123861ca02100f86b4c80f070fd4196d +Author: Alex Deucher <alex@botch2.com> +Date: Wed Jul 11 21:07:47 2007 -0400 + + fix segfault in SavageDoAdjustFrame() on server 1.3 + + tracked down by Tormod Volden, fixes bug 10934 + +commit 7832dcd82046238d5accb55468c65241f0edc6d0 +Author: Alex Deucher <alex@botch2.com> +Date: Wed Jul 11 21:01:03 2007 -0400 + + fix console corruption due to invalid shadow status + + tracked down by Tormod Volden, fixes bug 11237 + +commit 8dd310538df11cc5ff4e8e84920218b819bbae47 +Author: David Nusinow <dnusinow@debian.org> +Date: Wed Jul 11 20:00:25 2007 -0400 + + disable randr when savage rotation is enabled + + fixes bug 7899 + +commit 4b2a0ad8f15e7b11f7c8251fb032b9df4f07ce96 +Author: Nate Bargmann <n0nb@networksplus.net> +Date: Sat May 5 13:35:02 2007 +0200 + + Fixed a markup error. + +commit ff0ee0420bd7c0c1be5bf97e8764f3e974ff5887 +Author: Alex Deucher <alex@botch2.com> +Date: Mon Apr 2 17:32:02 2007 -0400 + + final odds and ends for exa + + I still get blue for solids that should be grey for certain things + (firefox status and navigation bars, certain mouse overs, etc.) + +commit 675ff8177852732c6e9d52464f34d5fe867ac67e +Author: Alex Deucher <alex@botch2.com> +Date: Wed Mar 21 02:14:16 2007 -0400 + + Get Solid() working again + + You have to send color EVERY time. + +commit ee7c53ae2b6e167dd4d6e813bc565e991f6b73e3 +Author: Alex Deucher <alex@botch2.com> +Date: Tue Mar 6 02:28:33 2007 -0500 + + small exa fix ups, remove an errant comment + +commit 3e2d370e291f5f222de88075f1f285446cca0569 +Author: Mikko Rapeli <mikko.rapeli@iki.fi> +Date: Wed Jan 3 21:50:22 2007 -0500 + + fix savage respawn crash + + SavageCloseScreen() unmaps memory, but SavageScreenInit() + never maps it again. + +commit 36c444e80324c82f7d02d9d95372123c923336a0 +Merge: f2191d4... e361a95... +Author: Ian Romanick <idr@us.ibm.com> +Date: Mon Dec 11 13:16:53 2006 -0800 + + Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-savage into pci-rework + + Conflicts: + + src/savage_driver.c + +commit 37240b81daa4ed46c27e439d22b6fd9909dac249 +Author: Alex Deucher <alex@t41p.(none)> +Date: Wed Nov 22 11:56:41 2006 -0500 + + clean up some leftover cruft. + +commit 4f8660473ba079f98f097abd72ce2647c345d7cd +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 23 10:57:35 2006 -0700 + + Strip ^M's out of savage_driver.h + +commit e361a9523394a2f0558f7d2648bf6a43ebe31f2e +Author: Alex Deucher <alex@samba.(none)> +Date: Thu Sep 28 22:02:29 2006 -0400 + + bump to 2.1.2 for new release + +commit a94abe5a59cf526ce0699d8356d239e1984d0907 +Author: Alex Deucher <alex@samba.(none)> +Date: Tue Sep 19 00:09:01 2006 -0400 + + minor exa updates + +commit baa74b10d7a1c304dba2d658e4d1336b7ee7e70e +Author: Alex Deucher <alex@samba.(none)> +Date: Mon Sep 18 22:30:13 2006 -0400 + + fix DRI locking in savage driver. Based on ajax's similar patch. + Thanks to ajax and tilman for locking advice and Pascal Sclafer + for tracking this down. Fixes bug 6357. + +commit bb1eac0b6b0d2ab02bd7b47f3c2e4b3f40e7486f +Author: Alex Deucher <alex@samba.(none)> +Date: Sun Sep 17 17:30:08 2006 -0400 + + re-order SavageMapMem() so that ram detection works again. + +commit f2191d412832312b494f313841d094f87f64a5ff +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 16:49:51 2006 -0700 + + Minimal change set to convert driver to the new PCI interfaces. Enjoy. + +commit 5108d1dd581a6e649f89812affba8481491e1bd7 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 12:21:11 2006 -0700 + + Instead of passing SavagePciChipsets in the p_chip parameter of + xf86ConfigPciEntity, pass RES_SHARED_VGA in the res parameter. + +commit 6ac341e9fd4157a0cdb7fd3d043c136d5799146f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Tue Aug 8 10:28:33 2006 -0700 + + Add some more missing license statements. Trivial whitespace clean-ups. + +commit ee91d006596634d339a853aaaa09b33b74b60235 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Aug 7 17:13:40 2006 -0700 + + DRIINFO_MAJOR_VERSION has be 5 for over a year. Remove the old code. + +commit e4609dcc51f6034393a0b75fa52caa9b3e585d3b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Aug 7 17:13:08 2006 -0700 + + Do a single mapping per BAR. This cleans up the code a bit and paves + the way for the pci-rework branch. The disadvantage is that the + Savage3D puts MMIO and framebuffer in the same BAR. This has to be + fixed-up after the mapping by altering the write-combine setting for + the framebuffer subrange. + +commit 928b82660929eb7dfe42482880abc0203b3860e8 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Aug 7 16:58:06 2006 -0700 + + Remove duplicate register defines. + +commit 31939c4c516124bfca0de7db4278b6b16df5e70f +Author: Ian Romanick <idr@umwelt.(none)> +Date: Mon Aug 7 13:27:48 2006 -0700 + + Introduce the savage_region structure, which is used to track mappable + regions of PCI space. + +commit 3a7f84ac41e93a9395891913cec1c5acb30937d0 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 4 16:30:25 2006 -0700 + + Make a couple local, static arrays const. The RamSavage4 array is not + const because it can be modified for some quirky cards. Neat! + +commit 2f8352df6488476b0c1a46798eca5dd38827444b +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 4 15:57:08 2006 -0700 + + Merge SavageMapMMIO and SavageMapFB into a single, new function called + SavageMapMem. Eliminate the MapBaseDense cruft. + +commit 6f9abbb972834561cd8494a1d4fb47402b285d7d +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 4 15:10:40 2006 -0700 + + Fix line endings (at least, I assume that's why git-diff thinks every + line in the file is chaged). Add missing license statement. Change + SAVAGE_VGAHWMMIO_H to SAVAGE_DRIVER_H. + +commit 3e2980251570a304057579e97ec26bc3fd19f8d7 +Author: Ian Romanick <idr@umwelt.(none)> +Date: Fri Aug 4 14:56:06 2006 -0700 + + Pass the HaveDriverFuncs flag to xf86AddDriver. Make sure the + DriverFuncs pointer is NULL. Delete a duplicate #define. + +commit 876f90e0fe06cedde15eb30e881824f126352bd9 +Author: <alex@samba.(none)> +Date: Thu Jul 20 22:50:43 2006 -0400 + + Make sure CLUTs are enabled + +commit 3814db881be50faf0daf83b45ef23baeeef5b021 +Author: <alex@samba.(none)> +Date: Thu Jul 20 22:25:05 2006 -0400 + + no accel at depth 24 in dualhead mode in MX/IX chips (hardware limitation) + +commit ec4fde5b4b6af410fcbf97062db77cc61eb332aa +Author: <alex@samba.(none)> +Date: Tue Jul 18 00:11:32 2006 -0400 + + make sure to map full FB in dualhead mode. fixes some issues with dualhead. + other dualhead drivers may need this. + +commit 03bb33088d5c905d1c2cf764ba3894405670b9f4 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Wed May 10 02:58:56 2006 +0000 + + - add AccelMethod to savage.man + - fix bug 6847 + - add memcpy based DFS + +commit 6d688c993ec7baf8f00df59764dd3e04bab24e09 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sun Apr 30 17:51:15 2006 +0000 + + - Add exa support (solid, copy, UTS) + +commit ef46fb29088e7cc50c6072d66c6ac1fe5cd398bd +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Apr 8 01:42:34 2006 +0000 + + Bump to 2.1.1 for Xv changes. + +commit efb23e12f1bcae10a324dadc802322238091b48c +Author: Aaron Plattner <aplattner@nvidia.com> +Date: Fri Apr 7 23:13:19 2006 +0000 + + Add a DrawablePtr argument to the XV functions to pave the way for + redirected video. + +commit e423d8649334a62c4657f7633a09f7976be50e34 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Apr 7 20:55:14 2006 +0000 + + Unlibcwrap. Bump server version requirement. Bump to 2.1.0. + +commit bb4fede8dc7741d00014fdb353945b0832599333 +Author: Luc Verhaegen <libv@skynet.be> +Date: Wed Feb 8 14:39:34 2006 +0000 + + Some trivial savage fixes: + - Remove insane usage of pScrn->clocks. Set maxClock directly. + - Fix trivial and harmless warning in DRI code (FrameBufferBase) + +commit 90fb73bc67a87f3b202ba45b326e70759b49e7b1 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Dec 21 02:30:02 2005 +0000 + + Update package version for X11R7 release. + +commit d35a9f882737c904f2b37a9a65cd41c4b1f65396 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Dec 19 16:25:54 2005 +0000 + + Stub COPYING files + +commit 21140974d9c8719dc12327d051b14aab593a0b11 +Author: Kevin E Martin <kem@kem.org> +Date: Thu Dec 15 00:24:18 2005 +0000 + + Update package version number for final X11R7 release candidate. + +commit 37df4e4fd446c140831ea46c1eef67f9a6d97211 +Author: Kevin E Martin <kem@kem.org> +Date: Tue Dec 6 22:48:37 2005 +0000 + + Change *man_SOURCES ==> *man_PRE to fix autotools warnings. + +commit 07f8fc2f431c0db0069dbf79d917aa52317724ac +Author: Kevin E Martin <kem@kem.org> +Date: Sat Dec 3 05:49:35 2005 +0000 + + Update package version number for X11R7 RC3 release. + +commit e927404157b8a65bbbe613bff5d0e03b3b4e078e +Author: Kevin E Martin <kem@kem.org> +Date: Fri Dec 2 02:16:10 2005 +0000 + + Remove extraneous AC_MSG_RESULT. + +commit a99fdf7b614cf167a6e07a05f65c214cf2bd2305 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed Nov 30 18:51:40 2005 +0000 + + Bump libdrm dep to 2.0. + +commit eb0931851b84c60c4e59e16fe09779f6470fe7e3 +Author: Adam Jackson <ajax@nwnk.net> +Date: Tue Nov 29 23:30:02 2005 +0000 + + Only build dlloader modules by default. + +commit 892ee75d88020868a6a244bb4b646d20901e5c39 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Nov 28 22:04:10 2005 +0000 + + Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 + update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) + +commit 2eaf6d5609aec58d7101069afb612821fd1aac73 +Author: Eric Anholt <anholt@freebsd.org> +Date: Mon Nov 21 10:49:17 2005 +0000 + + Add .cvsignores for drivers. + +commit 555d930e6f20e3ac4bb5be47470adad7f04483ad +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 9 21:31:21 2005 +0000 + + Bump version numbers for X11R6.9/X11R7 RC2. + +commit 490cb4b34cfb9e344627db8b05de7876586bf1c2 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 9 21:15:20 2005 +0000 + + Update package version number for X11R7 RC2 release. + +commit 292f552589bbd6e8a98def8eafe4e5c8765e1a34 +Author: Kevin E Martin <kem@kem.org> +Date: Wed Nov 9 07:30:04 2005 +0000 + + Fix DoLoadableServer NO build. + +commit 160edb73b384ef6215a7ae6fc9ecc1431450c1f7 +Author: Kean Johnson <kean@armory.com> +Date: Tue Nov 8 06:33:28 2005 +0000 + + See ChangeLog entry 2005-11-07 for details. + +commit 9f00f678a75fd10865d79cb7b1cc25cae3ffebab +Author: Kevin E Martin <kem@kem.org> +Date: Tue Nov 1 15:08:54 2005 +0000 + + Update pkgcheck depedencies to work with separate build roots. + +commit 4b9d1379ad773585e45bbc0971c878e7774fa34d +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Oct 21 18:40:19 2005 +0000 + + Bug #4829: Remove some useless DRI symbol checks. + +commit 58761bd4d8110694a74875a0c92bf9e7dab62a5a +Author: Kevin E Martin <kem@kem.org> +Date: Wed Oct 19 02:48:04 2005 +0000 + + Update package version number for RC1 release. + +commit 444f8c26875c210808d59cd9d9afebdbb47158ba +Author: Kevin E Martin <kem@kem.org> +Date: Wed Oct 19 02:46:56 2005 +0000 + + lib/Xcomposite/Xcomposite.h + lib/Xft/Imakefile + lib/Xft/Xft.h Update library version numbers to match updated package + versions. + Update driver version numbers for RC1. + +commit 903505b2c8a8e49962bd9b256ebc3a670360f258 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Tue Oct 18 00:01:54 2005 +0000 + + Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro + substitutions to work better with BSD make + +commit e5a0460273ba7a99abf811b603bd273bd02917b5 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Oct 17 22:57:35 2005 +0000 + + More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead + of indirectly + +commit aed94c462d655ca424a2c884bc0ddcdeac222835 +Author: Alan Coopersmith <Alan.Coopersmith@sun.com> +Date: Mon Oct 17 00:09:05 2005 +0000 + + Use sed & cpp to substitute variables in driver man pages + +commit 660f0920a7633f55dd803d7c4f749df7bcb1fbc2 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Sep 24 18:45:45 2005 +0000 + + Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen + stubs from drivers, comment the non-empty ones. + +commit 81b6385f0fa410bc18e735e37e8db62ef29a0d82 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sat Aug 27 16:45:56 2005 +0000 + + - re-add RestoreAccelState() to make XAA happy for dualhead + +commit 2f0a836a7bc6de48e37fdf7014e6b1b8f78851bf +Author: Daniel Stone <daniel@fooishbar.org> +Date: Mon Aug 22 03:44:04 2005 +0000 + + Fix test for DRI headers, bump to 2.0.1. + +commit 04ae3ba94c6e58afbb6c830e191fe9fe658f2cb4 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Thu Aug 18 09:03:48 2005 +0000 + + Update autogen.sh to one that does objdir != srcdir. + +commit 7441aa42e26df500f9355f7f1f33af9c955c30f8 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sat Aug 6 06:51:29 2005 +0000 + + Somehow I missed Bresenham lines when I fixed accel on crtc2. Make sure to + send the new offset there as well. + +commit 6620d141ebdb9dda3b0eb72462893ade0a4d6389 +Author: Ian Romanick <idr@us.ibm.com> +Date: Fri Aug 5 23:04:33 2005 +0000 + + I have resolved this by making all the "Direct rendering disabled" messages + X_WARNING and all the "Direct rendering enabled" messages X_INFO. + Ideally, we need to factor some of this stuff out to common code. There + is a *LOT* of duplication among the *_dri.c files under + programs/Xserver/hw/xfree86/drivers. + I'm trying to clean up as much low hanging fruit as I can and got tired of + waiting for ajax. :P + +commit 6da51e9c6f589ffa78ed6a5da0548eb56ab90b7c +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Aug 4 02:42:10 2005 +0000 + + - fix accel problems on crtc2. It seems the GBD doesn't always update + correctly resulting in incorrect stride and/or offset. Switch the accel + code to use the PBD instead and send the new offset with each command. + Because the offset is always up to date, we no longer need + SavageRestoreAccelState(). + +commit 16d2e7832a8b138e78947896c69537a59124dfec +Author: Kevin E Martin <kem@kem.org> +Date: Fri Jul 29 21:22:44 2005 +0000 + + Various changes preparing packages for RC0: + - Verify and update package version numbers as needed + - Implement versioning scheme + - Change bug address to point to bugzilla bug entry form + - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to + reenable it) + - Fix makedepend to use pkgconfig and pass distcheck + - Update build script to build macros first + - Update modular Xorg version + +commit 593267735819585c87652a62d62ca231a9e8f01b +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Wed Jul 27 21:23:29 2005 +0000 + + Add xf86driproto to dependencies for drivers with DRI support. Patch from + Donnie Berkholz + +commit cacbac692c3725e372e9c25177f4b26d86a8c0d5 +Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> +Date: Tue Jul 26 22:11:46 2005 +0000 + + Build system for savage + +commit c1c5f421dbce58f58b430497a89c73100e17beb8 +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Jul 11 02:29:59 2005 +0000 + + Prep for modular builds by adding guarded #include "config.h" everywhere. + +commit c332dffd52d787025614173ddfedfca62f1ccd63 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jun 25 21:16:56 2005 +0000 + + Bug #3626: _X_EXPORT tags for video and input drivers. + +commit eb107dead1844bfe1b2ca5510c50efd13fe883ef +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu May 19 05:32:16 2005 +0000 + + Disable ScreenToScreenCopy on crtc2 at depth 24. Fixes screen corruption. + +commit 3d8be0cf1ccbbe4e68c5fae92203a152901b2436 +Author: Adam Jackson <ajax@nwnk.net> +Date: Wed May 18 17:47:36 2005 +0000 + + Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version + number of the DRIInfoRec, disambiguating it from the XF86DRI protocol + version number. Modify DRIQueryVersion to return the libdri version + number, which all DDXes were requesting implicitly. Fix the DDXes to + check for the DRIINFO version they were compiled against. + +commit a42d68da8d3905bc21d426b68519ba0d8356ed7b +Author: Egbert Eich <eich@suse.de> +Date: Tue May 17 08:30:00 2005 +0000 + + Set the hardware to 8bit CLUT mode in 8 bpp. We used to flag an + 8 bit DAC to DDX but did not make sure it actually was running in 8 bit + mode. On Savage4 the HW cursor doesn't seem to be truecolor in 8bpp + - not even with the streams engine running. Fix SavageProbeDDC() to load + vbe module and initialize it before using it (Bugzilla #3309). + +commit be455c98276cec6cc881ca0093476e244c765bf8 +Author: Daniel Stone <daniel@fooishbar.org> +Date: Wed Apr 20 12:25:29 2005 +0000 + + Fix includes right throughout the Xserver tree: + change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; + change "foo.h", "extensions/foo.h" and "X11/foo.h" to + <X11/extensions/foo.h> for extension headers, e.g. Xv.h; + change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files. + +commit 4629f974734368bc354bbccaec80b72ec10a66a2 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Thu Apr 14 14:47:21 2005 +0000 + + User reports indicate that both command and vertex DMA on SuperSavages lock + up the engine. Disabling DMA on SuperSavages until someone figures out + how to make it work. + +commit e6fc11c3fbf2b80c29f1c73a1b2175edfb7a63ef +Author: Egbert Eich <eich@suse.de> +Date: Mon Apr 4 10:48:43 2005 +0000 + + Add ROP_NEEDS_SOURCE to Mono8x8PatternFill as S3 chips tend to lock up + without it (Helmut Fahrion). + +commit b6bdfa27c9c84628d1f489a15d09214e920e7d86 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Thu Mar 17 15:34:44 2005 +0000 + + Invalidate 3D hardware state in SavageEnterVT. This fixes 3D applications + running during a suspend-resume cycle. + +commit d2b0d82024da031257e943c424bd5f63cd0474e3 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Thu Mar 17 00:04:19 2005 +0000 + + Fixed PCI ShadowStatus initialization for the case that ShadowStatus is + explicitly enabled in the configuration file. + +commit 8bbfca79a7397e997b875ea8943c1120114904e0 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Wed Mar 16 01:00:38 2005 +0000 + + - small fixups for old streams + - more work on Xv support for savage2000 (still not working 100%) + +commit 689e9535e014b658d0aef2ebf554090226597a4d +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Mar 13 15:24:26 2005 +0000 + + Fixed fallback to PCI mode when AGP initialization fails. + +commit 9e84104d6b0ab8fd49edfa3568511fcd41983dc4 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Mar 13 00:14:02 2005 +0000 + + - Removed lots of dead code. + - Moved driver-private definitions from savage_dri.h to savage_driver.h. + savage_dri.h should only contain the public interface between DDX and + DRI drivers. + - Don't forget to remove the command DMA mapping in SAVAGEDRICloseScreen. + +commit 33033884e9ec07d96c70765132a2be0ebc466299 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Mar 6 01:36:10 2005 +0000 + + - Support for the new DRM version 2.4 with command DMA. + - Added an option "DmaMode" to choose between vertex and command DMA. + - Allow ShadowStatus to be explicitly disabled even with DRI enabled. + - Updated the man page. + +commit 21bf49050a7b868c50831fb3951086fe9c21e8f6 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sat Feb 26 13:56:27 2005 +0000 + + Fixed ShadowStatus handling with DRI: + - always enable ShadowStatus when DRI is enabled + - if DRI initialization fails, reset ShadowStatus to configured setting + - if DRI initialization fails, fall back to ShadowStatus in framebuffer + +commit e1f269bfd24195e96bf6194911430ffc7de4431f +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sat Feb 5 23:57:17 2005 +0000 + + Don't clear the front buffer in SAVAGEDRIInitBuffers. Fixes blackness of + GL-XScreensaver hacks that grab the screen. + +commit 9ae75471d246302a79994bdc71ae7e6a3915b609 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Fri Feb 4 01:14:49 2005 +0000 + + Applied patch (id=1354) by Mike A. Harris from bug #1901: The attached + patch updates a couple of PCI IDs for the Savage driver -- + Debian/Ubuntu/Red Hat/Fedora. + +commit 367d124c4b49ac134a9f2bf8acb6711957ef21c6 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Wed Feb 2 04:58:27 2005 +0000 + + - fix long standing bug in depth 24 that made colors look dithered. The + CLUT was not being switched to 8 bit mode. + +commit dbd65625f1eb3dbb5c45e1fc41e385db45c973ed +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Tue Feb 1 23:20:22 2005 +0000 + + - Changed option ForcePCIMode to option BusType for consistency with other + drivers (radeon) and the DmaType option. + - Changed the type of a few more messages in SavagePreInit. + - Updated the manual page. + - Moved option CrtOnly to a more sensible place in the man page. + +commit 0c5a94f8a342728e43792e01c6df5ff17dbb59c8 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Jan 31 01:41:36 2005 +0000 + + Update the savage manual page: + - Added options AGPSize, DmaType and ForcePCIMode. + - Updated DisableCOB: 3D requires COB, default value is "off", which means + that the COB is enabled. + +commit 37e6666824a771271f60ad12174a29b2ac6b826b +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Jan 31 01:09:27 2005 +0000 + + - Shadow status update thresholds on Savage4 were reversed. Fixed now. + - Fixed cobIndex on Savage2K. It used only a 4K COB so far. Now we have + full 128K. + - Program the shadow status thresholds correctly on Savage2K. + - Savage2K reports used entries in the queue in qword units instead of + dwords. Fixed WaitQueue2K accordingly. + - Event counter 0 is in status word 2 instead of status word 1 on Savage2K. + Fixed ShadowWait accordingly. + - Added a ShadowWaitQueue function that doesn't idle the engine all the + time. This improves 3D animation smoothness with concurrent + 2D activity when shadow status is enabled. + +commit 7712602bccc71210ad4319aaf2bc8e1b15b6a01a +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sun Jan 30 22:26:26 2005 +0000 + + - update comment about tiled surface regs for savage3d + +commit 565d77fe6e5d5357a04ac5612a1d25aa1194cad9 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Jan 30 22:17:15 2005 +0000 + + Added two new options "DmaType" and "ForcePCIMode". + +commit cb406770d1b88ecda3e7dba14f21b2cf90449a93 +Author: Adam Jackson <ajax@nwnk.net> +Date: Thu Jan 27 03:50:46 2005 +0000 + + - Fix tiled framebuffer setup on Savage3D (Alex Deucher) + - Disable building the Savage DRI driver. + +commit d62d010ca8590d99d4150f7b00999e619a6aaac3 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Mon Jan 10 23:11:53 2005 +0000 + + - Support for PCI Savages: on PCI cards don't run SAVAGEDRIAgpInit, add PCI + DMA buffers instead of AGP buffers. Set dma_type properly in + SAVAGEDRIKernelInit. + - Something's still wrong with ShadowStatus on the PCI card I'm testing + here. Probably a DRM issue. + - Fixed error handling. Call SAVAGEDRICloseScreen instead of + DRICloseScreen. + - Added AGP/PCI detection (copied from the radeon driver). + +commit 303bc2a7df00aadc13d747d6c240ca3d693cad4e +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Jan 2 11:24:48 2005 +0000 + + Make 32-bit visuals match the set of visuals supported by the DRI driver. + +commit 0de5e0b27ec95952d65d3bc2611253af702e3f9f +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sat Jan 1 23:42:09 2005 +0000 + + Reenabled SAVAGEDRIInitBuffers and SAVAGEDRIMoveBuffers and fixed lockups + they were causing. InitBuffers now uses the DRM clear command, + MoveBuffers needs to wait for 3D idle. Some related cleanups. + +commit 8fad99f52106c64bf7f5c88b2246313338286f54 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sat Jan 1 20:32:23 2005 +0000 + + Updates to support the new Savage DRM driver (version 2.0.x) which was just + committed to DRM CVS. Cleaned up the interface to the DRI driver. + Bumped the Savage DDX version to 2.0.0 due to incompatible changes in + that interface. + +commit d0e9c3ad1cb9babbe841926c9a373ebe40dfe62c +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sun Dec 12 00:14:32 2004 +0000 + + - only mess with Dynamicclocks on mobility chips (Benh, me) bug 1912 + - fix display detection (Hui Yu) bug 1559 + - Add new option "BIOSHotkeys" to allow the bios to control output + switching (off by default) bug 2000 + - update the savage man page to document the "CrtOnly" option + +commit 2cc15aba0bbb540f5562f04a0d39af1dd8dc7ce8 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Tue Nov 23 05:21:02 2004 +0000 + + - fix and enable HW Cursor on crtc2 + - enable independant CLUT access + +commit d6e5b4641667f438cc4513aa01342c2835f18070 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Tue Nov 23 04:42:37 2004 +0000 + + - fixed tiled framebuffer on savage2000 + +commit 114c3d91262f517ff2a76a5f9d438f4400e9a611 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sun Oct 31 09:48:55 2004 +0000 + + Make the Savage driver work with the dl-loader. + +commit 5b6ce4975f129b9d630eeb514507f6ac83111c6b +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Oct 21 04:31:52 2004 +0000 + + Make sure the overlay is off when switching modes, otherwise you can get a + chip lockup if you switch modes with a video playing + +commit 421efa788e177d91cbe41dedd4f4201c902cbcd5 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Oct 21 03:58:33 2004 +0000 + + when using the overlay for Xv, only enable it when displaying the video + otherwise the overlay breaks on mode changes. + +commit 951ee8825f2efb34dc4350c26dacd458067b5954 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Wed Oct 20 21:30:56 2004 +0000 + + Take doublescan and interlace flags into account when choosing a BIOS mode. + Otherwise it choses modes with double refresh rates for double scan + modes or half refresh rates for interlaced modes. + +commit aed0d07e7ddf045a51f8b1462ad6a5f61dc9e675 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Tue Oct 19 19:35:52 2004 +0000 + + Fix a regression in the CrtOnly option. This was fixed in DRI CVS once but + must have been lost during the port to Xorg CVS. + +commit 352b7566ac11a13bbced74d8a9c8ff944525c097 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sat Oct 16 21:10:40 2004 +0000 + + - fix savage2000, savage3D + - attempt to fix Xv on savage2000 (not there yet) + +commit 16af70368f042d6a5c54e57affe7c2e00f782baf +Author: Alex Deucher <agd5f@yahoo.com> +Date: Mon Oct 11 23:20:26 2004 +0000 + + - fix resume on radeons (bug 1220) + - clean up some old cruft in the savage i2c code + +commit 83fb89c6e8d75b58134f5068b11f2c3016b9daba +Author: Alex Deucher <agd5f@yahoo.com> +Date: Mon Oct 11 03:07:18 2004 +0000 + + Turn off vertical interpolation on "old" engines by default. It's bandwidth + intensive and causes artifacts on one of my savage4s. I added an Xv + attribute, XV_VERTICAL_INTERPOLATION, so users can turn it on and off + on the fly. + +commit 555da078acfc715053715590eed3c7f1253c0d15 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Mon Oct 11 00:36:11 2004 +0000 + + Fix Xv on savages with the "old" streams engine. + +commit 54a78b4d252ba06dd520c5d43ad55b31323408ec +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Oct 7 03:40:46 2004 +0000 + + Require tiled mode for 3D + +commit 4c47495cedaf66d96e92373c0b2b453d2a017190 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Oct 7 02:29:02 2004 +0000 + + fix glDrawPixels on Supersavage + +commit a9c9f97c80b3c80912fa79551755ff81e79dbbe6 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Wed Oct 6 04:20:48 2004 +0000 + + Small update to the savage man page + +commit 640c41b618c61031b1b01f1bd79651e0ddf574ff +Author: Alex Deucher <agd5f@yahoo.com> +Date: Wed Oct 6 03:59:22 2004 +0000 + + Fix setting the fbOffset in the tiled surface registers on supersavages. + +commit 90185e9cd21ea5e5e09955c75fe8bb98b08b2abb +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Tue Oct 5 20:25:55 2004 +0000 + + move this function outside of #ifdef XFree86LOADER. + +commit 6b44184b17d796fca58323807e7df28efe53b57e +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Thu Sep 30 16:04:36 2004 +0000 + + build fix + +commit d88b1abf40905ff9b343b047c34460162017ddfc +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Sep 30 05:31:13 2004 +0000 + + Portability fixes from Matthieu Herrb (bug 1409) + +commit a1ef17bb2cc069511baaefcbe04298c087533d35 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Sep 30 04:59:37 2004 +0000 + + Add Dualhead Support to Mobile savages (MX, IX, Supersavages) Thanks to + Austin Yuan for his help on this. + +commit cc1882207d72ce67b650b69bb490ba809dec53f5 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Tue Sep 28 00:23:21 2004 +0000 + + - Properly support BuildDevelDRIDrivers + - guard XvMC stuff with XF86DRI + +commit fd33023d5ad0b52271bafcdad1c4819c26f3ab91 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Sep 23 23:28:03 2004 +0000 + + small cleanups and corrections + +commit c1c94c202bb2e6a39f32056e7bd3fe7477406d9a +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Sat Sep 18 20:23:32 2004 +0000 + + vbeFree after SavageWriteMode in SavageCloseScreen. + +commit fc8bd5bde48424e47020eae179c8b331ff69595a +Author: Alex Deucher <agd5f@yahoo.com> +Date: Sat Sep 18 13:37:30 2004 +0000 + + Re-add BIOS panel off code for dpms (Felix Kuehling) Fix weird mode problem + on savage4 with dvi and some panels (Felix Kuehling) + +commit b26f6666dce97427e7032984aec3662e35cb2dc6 +Author: Felix Kuehling <fxkuehl@gmx.de> +Date: Fri Sep 17 21:30:38 2004 +0000 + + Fix fb config creation to match fb configs created by DRI drivers built + outside the monolithic Xorg tree. + +commit e904a31f0adbcc7595777e373bcbaf09d2fee597 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Sep 17 03:04:53 2004 +0000 + + Bug #1192: Remove cfb support from drivers where its use is an option. + Delete xf24_32bpp, as s3virge was the last user. Fix up some comments + to refer to fb rather than cfb. + +commit fdffbfbc7f3231e53a5857cc2d8cb5a77e76f936 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Sep 16 23:50:48 2004 +0000 + + Proper GBD setup for savage2000 + CVS : + ---------------------------------------------------------------------- + +commit 0ac19a8436291c9c14b192306c756cb1ad28c9d4 +Author: Alex Deucher <agd5f@yahoo.com> +Date: Thu Sep 16 22:00:48 2004 +0000 + + Merge savage DDX from DRI to xorg and fix conflicts. + +commit 77a543764b11d59217eed223dbd3bbc3ed9222bf +Author: Adam Jackson <ajax@nwnk.net> +Date: Mon Aug 16 09:13:14 2004 +0000 + + Bug #1087: Make sure all the *Weak symbols are documented in the import + list, so the loader knows not to complain about unresolved symbols when + an optional module isn't loaded. This typically manifests as warnings + about fbdevHW symbols when the user isn't using the framebuffer + console. + +commit e918f5f1dc43a42971f6b25ac4424da01fff3070 +Author: Adam Jackson <ajax@nwnk.net> +Date: Sat Jul 31 01:21:19 2004 +0000 + + Change several LoaderSymbol calls introduced by the bug #400 patch to + *Weak() resolver functions. + +commit c18f5801a555b1c1651a9d9cfb4ed141e210effa +Author: Egbert Eich <eich@suse.de> +Date: Fri Jul 30 21:25:26 2004 +0000 + + Add pseudocolor overlay mode. Leave streams engine running at all times to + prevent artefacts during video playback. + Fixed VBE mode list code to work together with reading DDC data using VBE + functions. + Fixed data types to muffle compiler. + Fixed requested size of FIFO for image writes. Fixes temporary lockups. + +commit 81760d382c4921a270715fe9e6b348699353ee01 +Author: Adam Jackson <ajax@nwnk.net> +Date: Fri Jul 30 20:30:54 2004 +0000 + + Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all + framebuffer formats except cfb and the overlay modes should work, and + r128 and radeon need to be loaded from the ati driver (both issues to + be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga + drivers. elfloader users shouldn't be affected. + +commit 057949f434a1c0d751dad5ec3ef154f2feee26ef +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:26:53 2004 +0000 + + DRI trunk-20040613 import + +commit 58aca915bb0a28c6f59a7a6c14b72b034d245035 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:26:53 2004 +0000 + + Initial revision + +commit 2511a34d2733cb50de81085e806f563220a23149 +Author: Eric Anholt <anholt@freebsd.org> +Date: Wed Jun 16 09:23:35 2004 +0000 + + DRI XFree86-4_3_99_12-merge import + +commit b860272eefbe9b72986d669017afd615d6477433 +Author: Egbert Eich <eich@suse.de> +Date: Fri Apr 23 19:44:35 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 106293be3248bc972fdb0f529e7ac8c111000eb7 +Author: Egbert Eich <eich@suse.de> +Date: Sun Mar 14 08:33:31 2004 +0000 + + Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 + +commit 09e37630a35845eee2b7b8807f9c946268f67ee7 +Author: Egbert Eich <eich@suse.de> +Date: Wed Mar 3 12:12:23 2004 +0000 + + Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 + +commit 1bd2d248035acf45691f91a84acdca8d9e122f26 +Author: Egbert Eich <eich@suse.de> +Date: Thu Feb 26 13:35:54 2004 +0000 + + readding XFree86's cvs IDs + +commit f9da586644f9a984fd027d5a6995ef014167860d +Author: Egbert Eich <eich@suse.de> +Date: Thu Feb 26 09:23:23 2004 +0000 + + Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 + +commit 279de3d6150b2e327829ff240702f0bacca7d1ab +Author: Egbert Eich <eich@suse.de> +Date: Thu Jan 29 08:08:36 2004 +0000 + + Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 + +commit 148230e83c55136a893bc7861d2c8d12d1b7dfd8 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Tue Nov 25 19:28:38 2003 +0000 + + XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks + +commit 1b535877d4c7045ff4cf45f3e3c00734b61797d2 +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Nov 14 16:48:55 2003 +0000 + + XFree86 4.3.0.1 + +commit be3817e94d5c31cd15aa4785cb5b0bdefc45141c +Author: Kaleb Keithley <kaleb@freedesktop.org> +Date: Fri Nov 14 16:48:55 2003 +0000 + + Initial revision --- xserver-xorg-video-savage-2.2.1.orig/autogen.sh +++ xserver-xorg-video-savage-2.2.1/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" --- xserver-xorg-video-savage-2.2.1.orig/debian/changelog +++ xserver-xorg-video-savage-2.2.1/debian/changelog @@ -0,0 +1,277 @@ +xserver-xorg-video-savage (1:2.2.1-4) experimental; urgency=low + + * Build against xserver 1.6 rc1. + * Allow parallel builds. + * Run autoreconf on build; add build-deps on automake, libtool and + xutils-dev. + + -- Brice Goglin <bgoglin@debian.org> Tue, 03 Feb 2009 23:07:21 +0100 + +xserver-xorg-video-savage (1:2.2.1-3) experimental; urgency=low + + * Drop patch 02_temporary_revert_pciaccess. + * Build against xserver 1.5. + + -- Julien Cristau <jcristau@debian.org> Mon, 08 Sep 2008 19:32:12 +0100 + +xserver-xorg-video-savage (1:2.2.1-2) unstable; urgency=low + + * Reenable 02_temporary_revert_pciaccess.diff and append all recent + pci-rework changes, closes: #483989. + + -- Brice Goglin <bgoglin@debian.org> Fri, 05 Sep 2008 19:37:51 +0200 + +xserver-xorg-video-savage (1:2.2.1-1) unstable; urgency=low + + [ David Nusinow ] + * Add 03_request_16bit_depth.diff + We set the default depth for savage chips to 16bpp in the xserver + debconfage. This patch has the driver request that depth from the + server during init. If the user doesn't override this depth, it should be + used by the server, thus allowing us to drop this special case from the + debconfage. + + [ Brice Goglin ] + * New upstream release. + * Disable 02_temporary_revert_pciaccess.diff for now since upstream + fixed some related code. + * Remove XS- prefix to Vcs-* fields in debian/rules. + * Bump Standards-Version to 3.7.3, no change needed. + * Run dpkg-shlibdeps with --warnings=6. Drivers reference symbols from + /usr/bin/Xorg and other modules, and that's not a bug, so we want + dpkg-shlibdeps to shut up about symbols it can't find. + + Build-depend on dpkg-dev >= 1.14.17. + + -- Brice Goglin <bgoglin@debian.org> Thu, 22 May 2008 21:07:26 +0200 + +xserver-xorg-video-savage (1:2.1.3-5) unstable; urgency=low + + * Add 02_temporary_revert_pciaccess.diff to temporary revert + all the pci-rework code which does not seem to work even + when disabled, closes: #451074, #451219. + + -- Brice Goglin <bgoglin@debian.org> Thu, 15 Nov 2007 08:19:08 +0100 + +xserver-xorg-video-savage (1:2.1.3-4) unstable; urgency=low + + * Pull upstream up to 9c959f53ca8376aa136a9d434c3383cdb20487c2 + + Fix crash in SavageSwitchMode(), closes: #440839. + * Add upstream URL to debian/copyright. + * Add myself to Uploaders. + + -- Brice Goglin <bgoglin@debian.org> Sun, 11 Nov 2007 15:23:29 +0100 + +xserver-xorg-video-savage (1:2.1.3-3) unstable; urgency=low + + * Upload to unstable + + -- David Nusinow <dnusinow@debian.org> Sun, 16 Sep 2007 15:43:47 -0400 + +xserver-xorg-video-savage (1:2.1.3-2) experimental; urgency=low + + [ Brice Goglin ] + * Drop the obsolete src/savage_image.c from the .diff.gz, + thanks Tormod Volden, closes: #438975. + + [ David Nusinow ] + * Build against X server 1.4 and build-dep on it as well + * Add 01_gen_pci_ids.diff. This patch provides a set of pci id's that this + driver supports so that the server can automatically load it + * Exclude savage_drv.la from dh_install + + -- David Nusinow <dnusinow@debian.org> Thu, 13 Sep 2007 20:40:23 -0400 + +xserver-xorg-video-savage (1:2.1.3-1) unstable; urgency=low + + * New upstream release. + * Fix implicit declaration of usleep() in savage_driver.c. + + -- Julien Cristau <jcristau@debian.org> Fri, 17 Aug 2007 04:14:31 +0200 + +xserver-xorg-video-savage (1:2.1.2-6) unstable; urgency=low + + [ Brice Goglin ] + * Pull more upstream fixes, up to b706ffe07fc61281d2dea406f828418f42e3da85 + + Fix segfault in SavageDoAdjustFrame() on server 1.3, closes: #423485. + + Fix console corruption due to invalid shadow status, closes: #428089. + + Drop 01_savage_driver_disable_randr_on_rotation.diff, integrated + uptream. + + [ Julien Cristau ] + * Add myself to Uploaders, and remove Branden with his permission. + + -- Julien Cristau <jcristau@debian.org> Wed, 18 Jul 2007 03:06:12 +0200 + +xserver-xorg-video-savage (1:2.1.2-5) unstable; urgency=low + + [ Timo Aaltonen ] + * Replaces/Conflicts: xserver-xorg-driver-savage. + + [ Brice Goglin ] + * Pull fixes from upstream up-to 4b2a0ad8f15e7b11f7c8251fb032b9df4f07ce96 + + Drop 02_fix_respawn_crash_regression.diff, applied upstream + + Fix a markup error in savage.4 manpage, thanks Nate Bargmann + (closes: #401643). + * Don't build-dep on libdrm-dev on hurd-i386, thanks to Michael Banck + (closes: #392873). + * Install the upstream changelog. + * Bump Build-Depends: xserver-xorg-dev to >= 2:1.2.99.902 + (needed to let xsfbs get access to serverminver). + * Add XS-Vcs-*. + * Add a link to www.X.org and a reference to the xf86-video-savage + module in the long description. + * Remove Fabio from uploaders with his permission. He's always welcome back. + + -- Julien Cristau <jcristau@debian.org> Sat, 05 May 2007 18:18:59 +0200 + +xserver-xorg-video-savage (1:2.1.2-4) experimental; urgency=low + + * Pull fixes from upstream + * Generate server dependencies automatically from the ABI + + -- David Nusinow <dnusinow@debian.org> Wed, 21 Feb 2007 22:54:33 -0500 + +xserver-xorg-video-savage (1:2.1.2-3) unstable; urgency=medium + + * SavageMamMem -> SavageMapMem in the previous patch. Thanks Mikael + Petersson for reporting the bug, and Jon K Hellan for noticing the fix. + Closes: #405061, #405021 + + -- David Nusinow <dnusinow@debian.org> Sat, 30 Dec 2006 19:07:13 -0500 + +xserver-xorg-video-savage (1:2.1.2-2) unstable; urgency=low + + [ Julien Cristau ] + * Add link to xserver-xorg-core bug script, so that bugreports contain + the user's config and log files. + * Bump dependency on xserver-xorg-core to >= 2:1.1.1-11, as previous + versions don't have the bug script. + * Add patch by Mikko Rapeli <mikko.rapeli@iki.fi> to fix a crash when the + last client exits and the server is respawned, closes: #397084. Thanks, + Mikko! + + [ David Nusinow ] + * Remove duplicate libdrm-dev build-dep + + -- David Nusinow <dnusinow@debian.org> Fri, 29 Dec 2006 19:45:29 -0500 + +xserver-xorg-video-savage (1:2.1.2-1) unstable; urgency=low + + * New upstream release + + Fixes DRI lock handling. Closes: #389794 + + -- David Nusinow <dnusinow@debian.org> Sat, 30 Sep 2006 14:31:03 -0400 + +xserver-xorg-video-savage (1:2.1.1-4) unstable; urgency=low + + * Add build-depends on quilt. Thanks lamont. (closes: #388640) + * Standards version bump to 3.7.2.0. No change needed. + + -- David Nusinow <dnusinow@debian.org> Thu, 21 Sep 2006 22:15:30 -0400 + +xserver-xorg-video-savage (1:2.1.1-3) unstable; urgency=low + + [ Steve Langasek ] + * Upload to unstable + + -- David Nusinow <dnusinow@debian.org> Mon, 18 Sep 2006 19:57:49 -0400 + +xserver-xorg-video-savage (1:2.1.1-2) experimental; urgency=low + + [ Drew Parsons ] + * Provides: xserver-xorg-video-1.0 not xserver-xorg-video. + + [ David Nusinow ] + * Bump xserver (build-)depends epochs to 2: to deal with botched + server upload + + -- David Nusinow <dnusinow@debian.org> Tue, 22 Aug 2006 23:46:39 +0000 + +xserver-xorg-video-savage (1:2.1.1-1) experimental; urgency=low + + [ Andres Salomon ] + * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build; + idempotency fix. + * Run dh_install w/ --list-missing. + + [ David Nusinow ] + * New upstream release + * Bump dependency on xserver-xorg-core to >= 1:1.1.1. Do the same thing for + the build-dep on xserver-xorg-dev. + * Bump debhelper compat to 5 + + -- David Nusinow <dnusinow@debian.org> Tue, 15 Aug 2006 23:28:46 +0000 + +xserver-xorg-video-savage (1:2.0.2.3-4) unstable; urgency=low + + * Upload to modular + + -- David Nusinow <dnusinow@debian.org> Sun, 26 Mar 2006 20:25:53 -0500 + +xserver-xorg-video-savage (1:2.0.2.3-3) experimental; urgency=low + + * Rename .install file so that files actually get installed to the package. + Thanks Peter Eisentraut. (closes: #354848) + + -- David Nusinow <dnusinow@debian.org> Sat, 11 Mar 2006 18:37:06 -0500 + +xserver-xorg-video-savage (1:2.0.2.3-2) experimental; urgency=low + + * Port patches from trunk + + general/099f_savage_driver_disable_randr_on_rotation.diff + + -- David Nusinow <dnusinow@debian.org> Sun, 26 Feb 2006 18:51:40 -0500 + +xserver-xorg-video-savage (1:2.0.2.3-1) experimental; urgency=low + + * First upload to Debian + * Change source package, package, and provides names to denote the + type of driver and that they are for xserver-xorg + + -- David Nusinow <dnusinow@debian.org> Fri, 13 Jan 2006 00:39:54 -0500 + +xserver-xorg-driver-savage (1:2.0.2.3-0ubuntu1) dapper; urgency=low + + * New upstream release. + * Add provides on xserver-xorg-driver. + + -- Daniel Stone <daniel.stone@ubuntu.com> Wed, 4 Jan 2006 20:02:00 +1100 + +xserver-xorg-driver-savage (1:2.0.2.2-0ubuntu1) dapper; urgency=low + + * New upstream release. + + -- Daniel Stone <daniel.stone@ubuntu.com> Mon, 19 Dec 2005 09:10:51 +1100 + +xserver-xorg-driver-savage (1:2.0.2.1-0ubuntu1) dapper; urgency=low + + * New upstream release. + * Bump Build-Depends on libdrm-dev to >> 2.0. + + -- Daniel Stone <daniel.stone@ubuntu.com> Mon, 12 Dec 2005 13:25:58 +1100 + +xserver-xorg-driver-savage (1:2.0.2-0ubuntu2) dapper; urgency=low + + * Add missing Build-Depends (x11proto-core-dev, x11proto-fonts-dev, + x11proto-randr-dev, x11proto-render-dev, libdrm (>> 1.0.5), + x11proto-xf86dri-dev). + + -- Daniel Stone <daniel.stone@ubuntu.com> Mon, 5 Dec 2005 12:57:29 +1100 + +xserver-xorg-driver-savage (1:2.0.2-0ubuntu1) dapper; urgency=low + + * New upstream release. + + -- Daniel Stone <daniel.stone@ubuntu.com> Tue, 22 Nov 2005 13:35:08 +1100 + +xserver-xorg-driver-savage (1:2.0.1.1-1) dapper; urgency=low + + * New upstream release. + + -- Daniel Stone <daniel.stone@ubuntu.com> Tue, 25 Oct 2005 18:36:23 +1000 + +xserver-xorg-driver-savage (1:2.0.1-1) breezy; urgency=low + + * First xserver-xorg-driver-savage release. + + -- Daniel Stone <daniel.stone@ubuntu.com> Wed, 6 Jul 2005 15:48:17 +1000 --- xserver-xorg-video-savage-2.2.1.orig/debian/compat +++ xserver-xorg-video-savage-2.2.1/debian/compat @@ -0,0 +1 @@ +5 --- xserver-xorg-video-savage-2.2.1.orig/debian/control +++ xserver-xorg-video-savage-2.2.1/debian/control @@ -0,0 +1,44 @@ +Source: xserver-xorg-video-savage +Section: x11 +Priority: optional +Maintainer: Debian X Strike Force <debian-x@lists.debian.org> +Uploaders: David Nusinow <dnusinow@debian.org>, Julien Cristau <jcristau@debian.org>, Brice Goglin <bgoglin@debian.org> +Build-Depends: + debhelper (>= 5.0.0), + pkg-config, + xserver-xorg-dev (>= 2:1.5.99.901), + x11proto-video-dev, + x11proto-xext-dev, + x11proto-gl-dev, + libgl1-mesa-dev | libgl-dev, + x11proto-core-dev, + x11proto-fonts-dev, + x11proto-randr-dev, + x11proto-render-dev, + libdrm-dev (>> 2.0) [!hurd-i386], + x11proto-xf86dri-dev, + quilt, + dpkg-dev (>= 1.14.17), + automake, + libtool, + xutils-dev +Standards-Version: 3.7.3 +Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-savage +Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-savage.git + +Package: xserver-xorg-video-savage +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${xserver:Depends} +Provides: ${xviddriver:Provides} +Replaces: xserver-xorg (<< 6.8.2-35), xserver-xorg-driver-savage +Conflicts: xserver-xorg-driver-savage +Description: X.Org X server -- Savage display driver + This package provides the driver for the S3/VIA Savage/ProSavage/Twister family + of chipsets. + . + More information about X.Org can be found at: + <URL:http://www.X.org> + <URL:http://xorg.freedesktop.org> + <URL:http://lists.freedesktop.org/mailman/listinfo/xorg> + . + This package is built from the X.org xf86-video-savage driver module. --- xserver-xorg-video-savage-2.2.1.orig/debian/copyright +++ xserver-xorg-video-savage-2.2.1/debian/copyright @@ -0,0 +1,48 @@ +This package was downloaded from +http://xorg.freedesktop.org/releases/individual/driver/ + +Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- +NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. + + +Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. +Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sub license, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. --- xserver-xorg-video-savage-2.2.1.orig/debian/rules +++ xserver-xorg-video-savage-2.2.1/debian/rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f +# debian/rules for the Debian xserver-xorg-driver-savage package. +# Copyright © 2004 Scott James Remnant <scott@netsplit.com> +# Copyright © 2005 Daniel Stone <daniel@fooishbar.org> +# Copyright © 2005 David Nusinow <dnusinow@debian.org> + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include debian/xsfbs/xsfbs.mk + +CFLAGS = -Wall -g +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build=$(DEB_HOST_GNU_TYPE) +else + confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) +endif + +# kbd_drv.a isn't phenomenally useful; kbd_drv.so more so +confflags += --disable-static + +configure: $(STAMP_DIR)/patch + autoreconf -vfi + +obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure + mkdir -p obj-$(DEB_BUILD_GNU_TYPE) + cd obj-$(DEB_BUILD_GNU_TYPE) && \ + ../configure --prefix=/usr --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info $(confflags) \ + CFLAGS="$(CFLAGS)" + +build: build-stamp +build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status + dh_testdir + cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) + >$@ + +clean: xsfclean + dh_testdir + dh_testroot + rm -f build-stamp + + rm -f config.cache config.log config.status + rm -f */config.cache */config.log */config.status + rm -f conftest* */conftest* + rm -rf autom4te.cache */autom4te.cache + rm -rf obj-* + rm -f $$(find -name Makefile.in) + rm -f aclocal.m4 config.guess config.h.in config.sub configure + rm -f depcomp install-sh ltmain.sh missing mkinstalldirs + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + +# Build architecture-dependent files here. +binary-arch: build install serverabi + dh_testdir + dh_testroot + + dh_installdocs + dh_installchangelogs ChangeLog + dh_install --sourcedir=debian/tmp --list-missing --exclude=savage_drv.la + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps -- --warnings=6 + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-independent files here. +binary-indep: build install +# Nothing to do + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- xserver-xorg-video-savage-2.2.1.orig/debian/watch +++ xserver-xorg-video-savage-2.2.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://xorg.freedesktop.org/releases/individual/driver/ xf86-video-savage-(.*)\.tar\.gz --- xserver-xorg-video-savage-2.2.1.orig/debian/xserver-xorg-video-savage.install +++ xserver-xorg-video-savage-2.2.1/debian/xserver-xorg-video-savage.install @@ -0,0 +1,3 @@ +usr/lib/xorg/modules/drivers/*.so +usr/share/man/man4/* +usr/share/xserver-xorg/pci/* --- xserver-xorg-video-savage-2.2.1.orig/debian/xserver-xorg-video-savage.links +++ xserver-xorg-video-savage-2.2.1/debian/xserver-xorg-video-savage.links @@ -0,0 +1 @@ +usr/share/bug/xserver-xorg-core/script usr/share/bug/xserver-xorg-video-savage/script --- xserver-xorg-video-savage-2.2.1.orig/debian/patches/01_gen_pci_ids.diff +++ xserver-xorg-video-savage-2.2.1/debian/patches/01_gen_pci_ids.diff @@ -0,0 +1,39 @@ +Index: xserver-xorg-video-savage/src/savage.ids +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ xserver-xorg-video-savage/src/savage.ids 2007-08-31 18:03:03.000000000 -0400 +@@ -0,0 +1,23 @@ ++53338A22 ++53338A20 ++53338A21 ++53339102 ++53338C10 ++53338C11 ++53338C12 ++53338C13 ++53338A25 ++53338A26 ++53338D01 ++53338D02 ++53338C22 ++53338C24 ++53338C26 ++53338C2A ++53338C2B ++53338C2C ++53338C2D ++53338C2E ++53338C2F ++53338D03 ++53338D04 +Index: xserver-xorg-video-savage/src/Makefile.am +=================================================================== +--- xserver-xorg-video-savage.orig/src/Makefile.am 2007-08-31 18:03:21.000000000 -0400 ++++ xserver-xorg-video-savage/src/Makefile.am 2007-08-31 18:04:03.000000000 -0400 +@@ -56,3 +56,6 @@ + savage_dri.h \ + savage_dripriv.h + endif ++ ++pcidatadir = $(datadir)/xserver-xorg/pci ++pcidata_DATA = savage.ids --- xserver-xorg-video-savage-2.2.1.orig/debian/patches/03_request_16bit_depth.diff +++ xserver-xorg-video-savage-2.2.1/debian/patches/03_request_16bit_depth.diff @@ -0,0 +1,13 @@ +Index: xserver-xorg-video-savage/src/savage_driver.c +=================================================================== +--- xserver-xorg-video-savage.orig/src/savage_driver.c 2008-05-22 07:53:05.000000000 +0200 ++++ xserver-xorg-video-savage/src/savage_driver.c 2008-05-22 20:55:51.000000000 +0200 +@@ -1292,7 +1292,7 @@ + * We support bpp of 8, 16, and 32. + */ + +- if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support32bppFb)) ++ if (!xf86SetDepthBpp(pScrn, 16, 0, 0, Support32bppFb)) + return FALSE; + else { + int requiredBpp; --- xserver-xorg-video-savage-2.2.1.orig/debian/patches/series +++ xserver-xorg-video-savage-2.2.1/debian/patches/series @@ -0,0 +1,2 @@ +01_gen_pci_ids.diff +03_request_16bit_depth.diff --- xserver-xorg-video-savage-2.2.1.orig/debian/xsfbs/repack.sh +++ xserver-xorg-video-savage-2.2.1/debian/xsfbs/repack.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if ! [ -d debian/prune ]; then + exit 0 +fi + +if [ "x$1" != x--upstream-version ]; then + exit 1 +fi + +version="$2" +filename="$3" + +if [ -z "$version" ] || ! [ -f "$filename" ]; then + exit 1 +fi + +dir="$(pwd)" +tempdir="$(mktemp -d)" + +cd "$tempdir" +tar xf "$dir/$filename" +cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done + +tar czf "$dir/$filename" * +cd "$dir" +rm -rf "$tempdir" +echo "Done pruning upstream tarball" + +exit 0 --- xserver-xorg-video-savage-2.2.1.orig/debian/xsfbs/xsfbs.mk +++ xserver-xorg-video-savage-2.2.1/debian/xsfbs/xsfbs.mk @@ -0,0 +1,293 @@ +#!/usr/bin/make -f + +# Debian X Strike Force Build System (XSFBS): Make portion + +# Copyright 1996 Stephen Early +# Copyright 1997 Mark Eichin +# Copyright 1998-2005, 2007 Branden Robinson +# Copyright 2005 David Nusinow +# +# Licensed under the GNU General Public License, version 2. See the file +# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>. + +# Originally by Stephen Early <sde1000@debian.org> +# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us> +# Modified by Adam Heath <doogie@debian.org> +# Modified by Branden Robinson <branden@debian.org> +# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net> +# Modified by David Nusinow <dnusinow@debian.org> +# Acknowledgements to Manoj Srivastava. + +# Pass $(DH_OPTIONS) into the environment for debhelper's benefit. +export DH_OPTIONS + +# force quilt to not use ~/.quiltrc and to use debian/patches +QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null + +# Set up parameters for the upstream build environment. + +# Determine (source) package name from Debian changelog. +SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \ + | grep '^Source:' | awk '{print $$2}') + +# Determine package version from Debian changelog. +SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \ + | grep '^Version:' | awk '{print $$2}') + +# Determine upstream version number. +UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//') + +# Determine the source version without the epoch for make-orig-tar-gz +NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://') + +# Figure out who's building this package. +BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}}) + +# Find out if this is an official build; an official build has nothing but +# digits, dots, and/or the codename of a release in the Debian part of the +# version number. Anything else indicates an unofficial build. +OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi) + +# Set up parameters for the Debian build environment. + +# Determine our architecture. +BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) +# Work around some old-time dpkg braindamage. +BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH)) +# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy. +ifdef DEB_HOST_ARCH + ARCH:=$(DEB_HOST_ARCH) +else + # dpkg-cross sets the ARCH environment variable; if set, use it. + ifdef ARCH + ARCH:=$(ARCH) + else + ARCH:=$(BUILD_ARCH) + endif +endif + +# $(STAMP_DIR) houses stamp files for complex targets. +STAMP_DIR:=stampdir + +# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place +# their files. +DEBTREEDIR:=$(CURDIR)/debian/tmp + +# All "important" targets have four lines: +# 1) A target name that is invoked by a package-building tool or the user. +# This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart. +# 2) A line delcaring 1) as a phony target (".PHONY:"). +# 3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may +# depend on other targets. +# 4) A line declaring 3) as a member of the $(stampdir_targets) variable; the +# "$(STAMP_DIR)/" prefix is omitted. +# +# This indirection is needed so that the "stamp" files that signify when a rule +# is done can be located in a separate "stampdir". Recall that make has no way +# to know when a goal has been met for a phony target (like "build" or +# "install"). +# +# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@" +# so that the target will not be run again. Removing the file will make Make +# run the target over. + +# All phony targets should be declared as dependencies of .PHONY, even if they +# do not have "($STAMP_DIR)/"-prefixed counterparts. + +# Define a harmless default rule to keep things from going nuts by accident. +.PHONY: default +default: + +# Set up the $(STAMP_DIR) directory. +.PHONY: stampdir +stampdir_targets+=stampdir +stampdir: $(STAMP_DIR)/stampdir +$(STAMP_DIR)/stampdir: + mkdir $(STAMP_DIR) + >$@ + +# Set up the package build directory as quilt expects to find it. +.PHONY: prepare +stampdir_targets+=prepare +prepare: $(STAMP_DIR)/prepare +$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts + >$@ + +.PHONY: log +stampdir_targets+=log +log: $(STAMP_DIR)/log +$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir + mkdir -p $(STAMP_DIR)/log + +# Apply all patches to the upstream source. +.PHONY: patch +stampdir_targets+=patch +patch: $(STAMP_DIR)/patch +$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare + if ! [ `which quilt` ]; then \ + echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \ + exit 1; \ + fi; \ + if $(QUILT) next >/dev/null 2>&1; then \ + echo -n "Applying patches..."; \ + if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \ + cat $(STAMP_DIR)/log/patch; \ + echo "successful."; \ + else \ + cat $(STAMP_DIR)/log/patch; \ + echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \ + exit 1; \ + fi; \ + else \ + echo "No patches to apply"; \ + fi; \ + >$@ + +# Revert all patches to the upstream source. +.PHONY: unpatch +unpatch: $(STAMP_DIR)/log + rm -f $(STAMP_DIR)/patch + @echo -n "Unapplying patches..."; \ + if $(QUILT) applied >/dev/null 2>/dev/null; then \ + if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \ + cat $(STAMP_DIR)/log/unpatch; \ + echo "successful."; \ + else \ + cat $(STAMP_DIR)/log/unpatch; \ + echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \ + exit 1; \ + fi; \ + else \ + echo "nothing to do."; \ + fi + +# Clean the generated maintainer scripts. +.PHONY: cleanscripts +cleanscripts: + rm -f $(STAMP_DIR)/genscripts + rm -f debian/*.config \ + debian/*.postinst \ + debian/*.postrm \ + debian/*.preinst \ + debian/*.prerm + +# Clean the package build tree. +.PHONY: xsfclean +xsfclean: cleanscripts unpatch + dh_testdir + rm -rf .pc + rm -rf $(STAMP_DIR) $(SOURCE_DIR) + rm -rf imports + dh_clean debian/shlibs.local \ + debian/po/pothead + +# Generate the debconf templates POT file header. +debian/po/pothead: debian/po/pothead.in + sed -e 's/SOURCE_VERSION/$(SOURCE_VERSION)/' \ + -e 's/DATE/$(shell date "+%F %X%z"/)' <$< >$@ + +# Update POT and PO files. +.PHONY: updatepo +updatepo: debian/po/pothead + debian/scripts/debconf-updatepo --pot-header=pothead --verbose + +# Remove files from the upstream source tree that we don't need, or which have +# licensing problems. It must be run before creating the .orig.tar.gz. +# +# Note: This rule is for Debian package maintainers' convenience, and is not +# needed for conventional build scenarios. +.PHONY: prune-upstream-tree +prune-upstream-tree: + # Ensure we're in the correct directory. + dh_testdir + grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf + +# Verify that there are no offsets or fuzz in the patches we apply. +# +# Note: This rule is for Debian package maintainers' convenience, and is not +# needed for conventional build scenarios. +.PHONY: patch-audit +patch-audit: prepare unpatch + @echo -n "Auditing patches..."; \ + >$(STAMP_DIR)/log/patch; \ + FUZZY=; \ + while [ -n "$$($(QUILT) next)" ]; do \ + RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\ + case "$$RESULT" in \ + succeeded) \ + echo "fuzzy patch: $$($(QUILT) top)" \ + | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \ + FUZZY=yes; \ + ;; \ + FAILED) \ + echo "broken patch: $$($(QUILT) next)" \ + | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \ + exit 1; \ + ;; \ + esac; \ + done; \ + if [ -n "$$FUZZY" ]; then \ + echo "there were fuzzy patches; please fix."; \ + exit 1; \ + else \ + echo "done."; \ + fi + +# Generate the maintainer scripts. +.PHONY: genscripts +stampdir_targets+=genscripts +genscripts: $(STAMP_DIR)/genscripts +$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir + for FILE in debian/*.config.in \ + debian/*.postinst.in \ + debian/*.postrm.in \ + debian/*.preinst.in \ + debian/*.prerm.in; do \ + if [ -e "$$FILE" ]; then \ + MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \ + sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \ + | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \ + cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \ + sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \ + | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \ + sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \ + -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \ + -e 's/@DEFAULT_DCRESOLUTIONS@/$(DEFAULT_DCRESOLUTIONS)/' \ + <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \ + rm $$MAINTSCRIPT.tmp; \ + fi; \ + done + # Validate syntax of generated shell scripts. + #sh debian/scripts/validate-posix-sh debian/*.config \ + # debian/*.postinst \ + # debian/*.postrm \ + # debian/*.preinst \ + # debian/*.prerm + >$@ + +# Generate the shlibs.local file. +debian/shlibs.local: + cat debian/*.shlibs >$@ + +SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null) +VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null) +INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null) +SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS)) +VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI) +INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI) +ifeq ($(PACKAGE),) +PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control) +endif + +.PHONY: serverabi +serverabi: install +ifeq ($(SERVERMINVERS),) + @echo error: xserver-xorg-dev needs to be installed + @exit 1 +else + echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars + echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars + echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars +endif + +# vim:set noet ai sts=8 sw=8 tw=0: --- xserver-xorg-video-savage-2.2.1.orig/debian/xsfbs/xsfbs.sh +++ xserver-xorg-video-savage-2.2.1/debian/xsfbs/xsfbs.sh @@ -0,0 +1,931 @@ +# $Id$ + +# This is the X Strike Force shell library for X Window System package +# maintainer scripts. It serves to define shell functions commonly used by +# such packages, and performs some error checking necessary for proper operation +# of those functions. By itself, it does not "do" much; the maintainer scripts +# invoke the functions defined here to accomplish package installation and +# removal tasks. + +# If you are reading this within a Debian package maintainer script (e.g., +# /var/lib/dpkg)info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can +# skip past this library by scanning forward in this file to the string +# "GOBSTOPPER". + +SOURCE_VERSION=@SOURCE_VERSION@ +OFFICIAL_BUILD=@OFFICIAL_BUILD@ + +# Use special abnormal exit codes so that problems with this library are more +# easily tracked down. +SHELL_LIB_INTERNAL_ERROR=86 +SHELL_LIB_THROWN_ERROR=74 +SHELL_LIB_USAGE_ERROR=99 + +# old -> new variable names +if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then + DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE" +fi +if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then + DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF" +fi + +# initial sanity checks +if [ -z "$THIS_PACKAGE" ]; then + cat >&2 <<EOF +Error: package maintainer script attempted to use shell library without +definining \$THIS_PACKAGE shell variable. Please report the package name, +version, and the text of this error message to the Debian Bug Tracking System. +Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for +instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the +"doc-debian" package, or install the "reportbug" package and use the command of +the same name to file a report against version $SOURCE_VERSION of this package. +EOF + exit $SHELL_LIB_USAGE_ERROR +fi + +if [ -z "$THIS_SCRIPT" ]; then + cat >&2 <<EOF +Error: package maintainer script attempted to use shell library without +definining \$THIS_SCRIPT shell variable. Please report the package name, +version, and the text of this error message to the Debian Bug Tracking System. +Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for +instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the +"doc-debian" package, or install the "reportbug" package and use the command of +the same name to file a report against version $SOURCE_VERSION of the +"$THIS_PACKAGE" package. +EOF + exit $SHELL_LIB_USAGE_ERROR +fi + +ARCHITECTURE="$(dpkg --print-installation-architecture)" + +if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then + RECONFIGURE="true" +else + RECONFIGURE= +fi + +if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then + FIRSTINST="yes" +fi + +if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then + UPGRADE="yes" +fi + +trap "message;\ + message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\ + message;\ + exit 1" HUP INT QUIT TERM + +reject_nondigits () { + # syntax: reject_nondigits [ operand ... ] + # + # scan operands (typically shell variables whose values cannot be trusted) for + # characters other than decimal digits and barf if any are found + while [ -n "$1" ]; do + # does the operand contain anything but digits? + if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then + # can't use die(), because it wraps message() which wraps this function + echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \ + "possibly malicious garbage \"$1\"" >&2 + exit $SHELL_LIB_THROWN_ERROR + fi + shift + done +} + +reject_whitespace () { + # syntax: reject_whitespace [ operand ] + # + # scan operand (typically a shell variable whose value cannot be trusted) for + # whitespace characters and barf if any are found + if [ -n "$1" ]; then + # does the operand contain any whitespace? + if expr "$1" : "[[:space:]]" > /dev/null 2>&1; then + # can't use die(), because I want to avoid forward references + echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_whitespace() encountered" \ + "possibly malicious garbage \"$1\"" >&2 + exit $SHELL_LIB_THROWN_ERROR + fi + fi +} + +reject_unlikely_path_chars () { + # syntax: reject_unlikely_path_chars [ operand ... ] + # + # scan operands (typically shell variables whose values cannot be trusted) for + # characters unlikely to be seen in a path and which the shell might + # interpret and barf if any are found + while [ -n "$1" ]; do + # does the operand contain any funny characters? + if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then + # can't use die(), because I want to avoid forward references + echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \ + "encountered possibly malicious garbage \"$1\"" >&2 + exit $SHELL_LIB_THROWN_ERROR + fi + shift + done +} + +# Query the terminal to establish a default number of columns to use for +# displaying messages to the user. This is used only as a fallback in the +# event the COLUMNS variable is not set. ($COLUMNS can react to SIGWINCH while +# the script is running, and this cannot, only being calculated once.) +DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true +if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then + DEFCOLUMNS=80 +fi + +message () { + # pretty-print messages of arbitrary length + reject_nondigits "$COLUMNS" + echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2 +} + +observe () { + # syntax: observe message ... + # + # issue observational message suitable for logging someday when support for + # it exists in dpkg + if [ -n "$DEBUG_XORG_PACKAGE" ]; then + message "$THIS_PACKAGE $THIS_SCRIPT note: $*" + fi +} + +warn () { + # syntax: warn message ... + # + # issue warning message suitable for logging someday when support for + # it exists in dpkg; also send to standard error + message "$THIS_PACKAGE $THIS_SCRIPT warning: $*" +} + +die () { + # syntax: die message ... + # + # exit script with error message + message "$THIS_PACKAGE $THIS_SCRIPT error: $*" + exit $SHELL_LIB_THROWN_ERROR +} + +internal_error () { + # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message + message "internal error: $*" + if [ -n "$OFFICIAL_BUILD" ]; then + message "Please report a bug in the $THIS_SCRIPT script of the" \ + "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ + "Tracking System. Include all messages above that mention the" \ + "$THIS_PACKAGE package. Visit " \ + "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \ + "instructions, read the file" \ + "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ + "package, or install the reportbug package and use the command of" \ + "the same name to file a report." + fi + exit $SHELL_LIB_INTERNAL_ERROR +} + +usage_error () { + message "usage error: $*" + message "Please report a bug in the $THIS_SCRIPT script of the" \ + "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \ + "Tracking System. Include all messages above that mention the" \ + "$THIS_PACKAGE package. Visit " \ + "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \ + "instructions, read the file" \ + "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \ + "package, or install the reportbug package and use the command of" \ + "the same name to file a report." + exit $SHELL_LIB_USAGE_ERROR +} + + +maplink () { + # returns what symlink should point to; i.e., what the "sane" answer is + # Keep this in sync with the debian/*.links files. + # This is only needed for symlinks to directories. + # + # XXX: Most of these look wrong in the X11R7 world and need to be fixed. + # If we've stopped using this function, fixing it might enable us to re-enable + # it again and catch more errors. + case "$1" in + /etc/X11/xkb/compiled) echo /var/lib/xkb ;; + /etc/X11/xkb/xkbcomp) echo /usr/X11R6/bin/xkbcomp ;; + /usr/X11R6/lib/X11/app-defaults) echo /etc/X11/app-defaults ;; + /usr/X11R6/lib/X11/fs) echo /etc/X11/fs ;; + /usr/X11R6/lib/X11/lbxproxy) echo /etc/X11/lbxproxy ;; + /usr/X11R6/lib/X11/proxymngr) echo /etc/X11/proxymngr ;; + /usr/X11R6/lib/X11/rstart) echo /etc/X11/rstart ;; + /usr/X11R6/lib/X11/twm) echo /etc/X11/twm ;; + /usr/X11R6/lib/X11/xdm) echo /etc/X11/xdm ;; + /usr/X11R6/lib/X11/xinit) echo /etc/X11/xinit ;; + /usr/X11R6/lib/X11/xkb) echo /etc/X11/xkb ;; + /usr/X11R6/lib/X11/xserver) echo /etc/X11/xserver ;; + /usr/X11R6/lib/X11/xsm) echo /etc/X11/xsm ;; + /usr/bin/X11) echo ../X11R6/bin ;; + /usr/bin/rstartd) echo ../X11R6/bin/rstartd ;; + /usr/include/X11) echo ../X11R6/include/X11 ;; + /usr/lib/X11) echo ../X11R6/lib/X11 ;; + *) internal_error "maplink() called with unknown path \"$1\"" ;; + esac +} + +analyze_path () { + # given a supplied set of pathnames, break each one up by directory and do an + # ls -dl on each component, cumulatively; i.e. + # analyze_path /usr/X11R6/bin -> ls -dl /usr /usr/X11R6 /usr/X11R6/bin + # Thanks to Randolph Chung for this clever hack. + + local f g + + while [ -n "$1" ]; do + reject_whitespace "$1" + g= + message "Analyzing $1:" + for f in $(echo "$1" | tr / \ ); do + if [ -e /$g$f ]; then + ls -dl /$g$f /$g$f.dpkg-* 2> /dev/null || true + g=$g$f/ + else + message "/$g$f: nonexistent; directory contents of /$g:" + ls -l /$g + break + fi + done + shift + done +} + +find_culprits () { + local f p dpkg_info_dir possible_culprits smoking_guns bad_packages package \ + msg + + reject_whitespace "$1" + message "Searching for overlapping packages..." + dpkg_info_dir=/var/lib/dpkg/info + if [ -d $dpkg_info_dir ]; then + if [ "$(echo $dpkg_info_dir/*.list)" != "$dpkg_info_dir/*.list" ]; then + possible_culprits=$(ls -1 $dpkg_info_dir/*.list | egrep -v \ + "(xbase-clients|x11-common|xfs|xlibs)") + if [ -n "$possible_culprits" ]; then + smoking_guns=$(grep -l "$1" $possible_culprits || true) + if [ -n "$smoking_guns" ]; then + bad_packages=$(printf "\\n") + for f in $smoking_guns; do + # too bad you can't nest parameter expansion voodoo + p=${f%*.list} # strip off the trailing ".list" + package=${p##*/} # strip off the directories + bad_packages=$(printf "%s\n%s" "$bad_packages" "$package") + done + msg=$(cat <<EOF +The following packages appear to have file overlaps with the X.Org packages; +these packages are either very old, or in violation of Debian Policy. Try +upgrading each of these packages to the latest available version if possible: +for example, with the command "apt-get install". If no newer version of a +package is available, you will have to remove it; for example, with the command +"apt-get remove". If even the latest available version of the package has +this file overlap, please file a bug against that package with the Debian Bug +Tracking System. You may want to refer the package maintainer to section 12.8 +of the Debian Policy manual. +EOF +) + message "$msg" + message "The overlapping packages are: $bad_packages" + else + message "no overlaps found." + fi + fi + else + message "cannot search; no matches for $dpkg_info_dir/*.list." + fi + else + message "cannot search; $dpkg_info_dir does not exist." + fi +} + +# we require a readlink command or shell function +if ! which readlink > /dev/null 2>&1; then + message "The readlink command was not found. Please install version" \ + "1.13.1 or later of the debianutils package." + readlink () { + # returns what symlink in $1 actually points to + perl -e '$l = shift; exit 1 unless -l $l; $r = readlink $l; exit 1 unless $r; print "$r\n"' "$1" + } +fi + +check_symlink () { + # syntax: check_symlink symlink + # + # See if specified symlink points where it is supposed to. Return 0 if it + # does, and 1 if it does not. + # + # Primarily used by check_symlinks_and_warn() and check_symlinks_and_bomb(). + + local symlink + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "check_symlink() called with wrong number of arguments;" \ + "expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + symlink="$1" + + if [ "$(maplink "$symlink")" = "$(readlink "$symlink")" ]; then + return 0 + else + return 1 + fi +} + +check_symlinks_and_warn () { + # syntax: check_symlinks_and_warn symlink ... + # + # For each argument, check for symlink sanity, and warn if it isn't sane. + # + # Call this function from a preinst script in the event $1 is "upgrade" or + # "install". + + local errmsg symlink + + # validate arguments + if [ $# -lt 1 ]; then + usage_error "check_symlinks_and_warn() called with wrong number of" \ + "arguments; expected at least 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + while [ -n "$1" ]; do + symlink="$1" + if [ -L "$symlink" ]; then + if ! check_symlink "$symlink"; then + observe "$symlink symbolic link points to wrong location" \ + "$(readlink "$symlink"); removing" + rm "$symlink" + fi + elif [ -e "$symlink" ]; then + errmsg="$symlink exists and is not a symbolic link; this package cannot" + errmsg="$errmsg be installed until this" + if [ -f "$symlink" ]; then + errmsg="$errmsg file" + elif [ -d "$symlink" ]; then + errmsg="$errmsg directory" + else + errmsg="$errmsg thing" + fi + errmsg="$errmsg is removed" + die "$errmsg" + fi + shift + done +} + +check_symlinks_and_bomb () { + # syntax: check_symlinks_and_bomb symlink ... + # + # For each argument, check for symlink sanity, and bomb if it isn't sane. + # + # Call this function from a postinst script. + + local problem symlink + + # validate arguments + if [ $# -lt 1 ]; then + usage_error "check_symlinks_and_bomb() called with wrong number of" + "arguments; expected at least 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + while [ -n "$1" ]; do + problem= + symlink="$1" + if [ -L "$symlink" ]; then + if ! check_symlink "$symlink"; then + problem=yes + warn "$symlink symbolic link points to wrong location" \ + "$(readlink "$symlink")" + fi + elif [ -e "$symlink" ]; then + problem=yes + warn "$symlink is not a symbolic link" + else + problem=yes + warn "$symlink symbolic link does not exist" + fi + if [ -n "$problem" ]; then + analyze_path "$symlink" "$(readlink "$symlink")" + find_culprits "$symlink" + die "bad symbolic links on system" + fi + shift + done +} + +font_update () { + # run $UPDATECMDS in $FONTDIRS + + local dir cmd shortcmd x_font_dir_prefix + + x_font_dir_prefix="/usr/share/fonts/X11" + + if [ -z "$UPDATECMDS" ]; then + usage_error "font_update() called but \$UPDATECMDS not set" + fi + if [ -z "$FONTDIRS" ]; then + usage_error "font_update() called but \$FONTDIRS not set" + fi + + reject_unlikely_path_chars "$UPDATECMDS" + reject_unlikely_path_chars "$FONTDIRS" + + for dir in $FONTDIRS; do + if [ -d "$x_font_dir_prefix/$dir" ]; then + for cmd in $UPDATECMDS; do + if which "$cmd" > /dev/null 2>&1; then + shortcmd=${cmd##*/} + observe "running $shortcmd in $dir font directory" + cmd_opts= + if [ "$shortcmd" = "update-fonts-alias" ]; then + cmd_opts=--x11r7-layout + fi + if [ "$shortcmd" = "update-fonts-dir" ]; then + cmd_opts=--x11r7-layout + fi + if [ "$shortcmd" = "update-fonts-scale" ]; then + cmd_opts=--x11r7-layout + fi + $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \ + "failed; font directory data may not" \ + "be up to date" + else + warn "$cmd not found; not updating corresponding $dir font" \ + "directory data" + fi + done + else + warn "$dir is not a directory; not updating font directory data" + fi + done +} + +remove_conffile_prepare () { + # syntax: remove_conffile_prepare filename official_md5sum ... + # + # Check a conffile "filename" against a list of canonical MD5 checksums. + # If the file's current MD5 checksum matches one of the "official_md5sum" + # operands provided, then prepare the conffile for removal from the system. + # We defer actual deletion until the package is configured so that we can + # roll this operation back if package installation fails. + # + # Call this function from a preinst script in the event $1 is "upgrade" or + # "install" and verify $2 to ensure the package is being upgraded from a + # version (or installed over a version removed-but-not-purged) prior to the + # one in which the conffile was obsoleted. + + local conffile current_checksum + + # validate arguments + if [ $# -lt 2 ]; then + usage_error "remove_conffile_prepare() called with wrong number of" \ + "arguments; expected at least 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + shift + + # does the conffile even exist? + if [ -e "$conffile" ]; then + # calculate its checksum + current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//') + # compare it to each supplied checksum + while [ -n "$1" ]; do + if [ "$current_checksum" = "$1" ]; then + # we found a match; move the confffile and stop looking + observe "preparing obsolete conffile $conffile for removal" + mv "$conffile" "$conffile.$THIS_PACKAGE-tmp" + break + fi + shift + done + fi +} + +remove_conffile_lookup () { + # syntax: remove_conffile_lookup package filename + # + # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal + # if it matches the actual file's md5sum. + # + # Call this function when you would call remove_conffile_prepare but only + # want to check against dpkg's status database instead of known checksums. + + local package conffile old_md5sum + + # validate arguments + if [ $# -ne 2 ]; then + usage_error "remove_conffile_lookup() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + package="$1" + conffile="$2" + + if ! [ -e "$conffile" ]; then + return + fi + old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \ + awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')" + if [ -n "$old_md5sum" ]; then + remove_conffile_prepare "$conffile" "$old_md5sum" + fi +} + +remove_conffile_commit () { + # syntax: remove_conffile_commit filename + # + # Complete the removal of a conffile "filename" that has become obsolete. + # + # Call this function from a postinst script after having used + # remove_conffile_prepare() in the preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "remove_conffile_commit() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + # if the temporary file created by remove_conffile_prepare() exists, remove it + if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then + observe "committing removal of obsolete conffile $conffile" + rm "$conffile.$THIS_PACKAGE-tmp" + fi +} + +remove_conffile_rollback () { + # syntax: remove_conffile_rollback filename + # + # Roll back the removal of a conffile "filename". + # + # Call this function from a postrm script in the event $1 is "abort-upgrade" + # or "abort-install" is after having used remove_conffile_prepare() in the + # preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "remove_conffile_rollback() called with wrong number of" \ + "arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + # if the temporary file created by remove_conffile_prepare() exists, move it + # back + if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then + observe "rolling back removal of obsolete conffile $conffile" + mv "$conffile.$THIS_PACKAGE-tmp" "$conffile" + fi +} + +replace_conffile_with_symlink_prepare () { + # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \ + # official_md5sum ... + # + # Check a conffile "oldfilename" against a list of canonical MD5 checksums. + # If the file's current MD5 checksum matches one of the "official_md5sum" + # operands provided, then prepare the conffile for removal from the system. + # We defer actual deletion until the package is configured so that we can + # roll this operation back if package installation fails. Otherwise copy it + # to newfilename and let dpkg handle it through conffiles mechanism. + # + # Call this function from a preinst script in the event $1 is "upgrade" or + # "install" and verify $2 to ensure the package is being upgraded from a + # version (or installed over a version removed-but-not-purged) prior to the + # one in which the conffile was obsoleted. + + local conffile current_checksum + + # validate arguments + if [ $# -lt 3 ]; then + usage_error "replace_conffile_with_symlink_prepare() called with wrong" \ + " number of arguments; expected at least 3, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + oldconffile="$1" + shift + newconffile="$1" + shift + + remove_conffile_prepare "$_oldconffile" "$@" + # If $oldconffile still exists, then md5sums didn't match. + # Copy it to new one. + if [ -f "$oldconffile" ]; then + cp "$oldconffile" "$newconffile" + fi + +} + +replace_conffile_with_symlink_commit () { + # syntax: replace_conffile_with_symlink_commit oldfilename + # + # Complete the removal of a conffile "oldfilename" that has been + # replaced by a symlink. + # + # Call this function from a postinst script after having used + # replace_conffile_with_symlink_prepare() in the preinst. + + local conffile + + # validate arguments + if [ $# -ne 1 ]; then + usage_error "replace_conffile_with_symlink_commit() called with wrong" \ + "number of arguments; expected 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + conffile="$1" + + remove_conffile_commit "$conffile" +} + +replace_conffile_with_symlink_rollback () { + # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename + # + # Roll back the replacing of a conffile "oldfilename" with symlink to + # "newfilename". + # + # Call this function from a postrm script in the event $1 is "abort-upgrade" + # or "abort-install" and verify $2 to ensure the package failed to upgrade + # from a version (or install over a version removed-but-not-purged) prior + # to the one in which the conffile was obsoleted. + # You should have used replace_conffile_with_symlink_prepare() in the + # preinst. + + local conffile + + # validate arguments + if [ $# -ne 2 ]; then + usage_error "replace_conffile_with_symlink_rollback() called with wrong" \ + "number of arguments; expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + oldconffile="$1" + newconffile="$2" + + remove_conffile_rollback "$_oldconffile" + if [ -f "$newconffile" ]; then + rm "$newconffile" + fi +} + +run () { + # syntax: run command [ argument ... ] + # + # Run specified command with optional arguments and report its exit status. + # Useful for commands whose exit status may be nonzero, but still acceptable, + # or commands whose failure is not fatal to us. + # + # NOTE: Do *not* use this function with db_get or db_metaget commands; in + # those cases the return value of the debconf command *must* be checked + # before the string returned by debconf is used for anything. + + local retval + + # validate arguments + if [ $# -lt 1 ]; then + usage_error "run() called with wrong number of arguments; expected at" \ + "least 1, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + "$@" || retval=$? + + if [ ${retval:-0} -ne 0 ]; then + observe "command \"$*\" exited with status $retval" + fi +} + +register_x_lib_dir_with_ld_so () { + # syntax: register_x_lib_dir_with_ld_so + # + # Configure the dynamic loader ld.so to search /usr/X11R6/lib for shared + # libraries. + # + # Call this function from the postinst script of a package that places a + # shared library in /usr/X11R6/lib, before invoking ldconfig. + + local dir ldsoconf + + dir="/usr/X11R6/lib" + ldsoconf="/etc/ld.so.conf" + + # is the line not already present? + if ! fgrep -qsx "$dir" "$ldsoconf"; then + observe "adding $dir directory to $ldsoconf" + echo "$dir" >> "$ldsoconf" + fi +} + +deregister_x_lib_dir_with_ld_so () { + # syntax: deregister_x_lib_dir_with_ld_so + # + # Configure dynamic loader ld.so to not search /usr/X11R6/lib for shared + # libraries, if and only if no shared libaries remain there. + # + # Call this function from the postrm script of a package that places a shared + # library in /usr/X11R6/lib, in the event "$1" is "remove", and before + # invoking ldconfig. + + local dir ldsoconf fgrep_status cmp_status + + dir="/usr/X11R6/lib" + ldsoconf="/etc/ld.so.conf" + + # is the line present? + if fgrep -qsx "$dir" "$ldsoconf"; then + # are there any shared objects in the directory? + if [ "$(echo "$dir"/lib*.so.*.*)" = "$dir/lib*.so.*.*" ]; then + # glob expansion produced nothing, so no shared libraries are present + observe "removing $dir directory from $ldsoconf" + # rewrite the file (very carefully) + set +e + fgrep -svx "$dir" "$ldsoconf" > "$ldsoconf.dpkg-tmp" + fgrep_status=$? + set -e + case $fgrep_status in + 0|1) ;; # we don't actually care if any lines matched or not + *) die "error reading \"$ldsoconf\"; fgrep exited with status" \ + "$fgrep_status" ;; + esac + set +e + cmp -s "$ldsoconf.dpkg-tmp" "$ldsoconf" + cmp_status=$? + set -e + case $cmp_status in + 0) rm "$ldsoconf.dpkg-tmp" ;; # files are identical + 1) mv "$ldsoconf.dpkg-tmp" "$ldsoconf" ;; # files differ + *) die "error comparing \"$ldsoconf.dpkg-tmp\" to \"$ldsoconf\";" \ + "cmp exited with status $cmp_status" ;; + esac + fi + fi +} + +make_symlink_sane () { + # syntax: make_symlink_sane symlink target + # + # Ensure that the symbolic link symlink exists, and points to target. + # + # If symlink does not exist, create it and point it at target. + # + # If symlink exists but is not a symbolic link, back it up. + # + # If symlink exists, is a symbolic link, but points to the wrong location, fix + # it. + # + # If symlink exists, is a symbolic link, and already points to target, do + # nothing. + # + # This function wouldn't be needed if ln had an -I, --idempotent option. + + # Validate arguments. + if [ $# -ne 2 ]; then + usage_error "make_symlink_sane() called with wrong number of arguments;" \ + "expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + # We could just use the positional parameters as-is, but that makes things + # harder to follow. + local symlink target + + symlink="$1" + target="$2" + + if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then + observe "link from $symlink to $target already exists" + else + observe "creating symbolic link from $symlink to $target" + mkdir -p "${target%/*}" "${symlink%/*}" + ln -s -b -S ".dpkg-old" "$target" "$symlink" + fi +} + +migrate_dir_to_symlink () { + # syntax: migrate_dir_to_symlink old_location new_location + # + # Per Debian Policy section 6.5.4, "A directory will never be replaced by a + # symbolic link to a directory or vice versa; instead, the existing state + # (symlink or not) will be left alone and dpkg will follow the symlink if + # there is one." + # + # We have to do it ourselves. + # + # This function moves the contents of old_location, a directory, into + # new_location, a directory, then makes old_location a symbolic link to + # new_location. + # + # old_location need not exist, but if it does, it must be a directory (or a + # symlink to a directory). If it is not, it is backed up. If new_location + # exists already and is not a directory, it is backed up. + # + # This function should be called from a package's preinst so that other + # packages unpacked after this one --- but before this package's postinst runs + # --- are unpacked into new_location even if their payloads contain + # old_location filespecs. + + # Validate arguments. + if [ $# -ne 2 ]; then + usage_error "migrate_dir_to_symlink() called with wrong number of" + "arguments; expected 2, got $#" + exit $SHELL_LIB_USAGE_ERROR + fi + + # We could just use the positional parameters as-is, but that makes things + # harder to follow. + local new old + + old="$1" + new="$2" + + # Is old location a symlink? + if [ -L "$old" ]; then + # Does it already point to new location? + if [ "$(readlink "$old")" = "$new" ]; then + # Nothing to do; migration has already been done. + observe "migration of $old to $new already done" + return 0 + else + # Back it up. + warn "backing up symbolic link $old as $old.dpkg-old" + mv -b "$old" "$old.dpkg-old" + fi + fi + + # Does old location exist, but is not a directory? + if [ -e "$old" ] && ! [ -d "$old" ]; then + # Back it up. + warn "backing up non-directory $old as $old.dpkg-old" + mv -b "$old" "$old.dpkg-old" + fi + + observe "migrating $old to $new" + + # Is new location a symlink? + if [ -L "$new" ]; then + # Does it point the wrong way, i.e., back to where we're migrating from? + if [ "$(readlink "$new")" = "$old" ]; then + # Get rid of it. + observe "removing symbolic link $new which points to $old" + rm "$new" + else + # Back it up. + warn "backing up symbolic link $new as $new.dpkg-old" + mv -b "$new" "$new.dpkg-old" + fi + fi + + # Does new location exist, but is not a directory? + if [ -e "$new" ] && ! [ -d "$new" ]; then + warn "backing up non-directory $new as $new.dpkg-old" + mv -b "$new" "$new.dpkg-old" + fi + + # Create new directory if it does not yet exist. + if ! [ -e "$new" ]; then + observe "creating $new" + mkdir -p "$new" + fi + + # Copy files in old location to new location. Back up any filenames that + # already exist in the new location with the extension ".dpkg-old". + observe "copying files from $old to $new" + if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then + die "error(s) encountered while copying files from $old to $new" + fi + + # Remove files at old location. + observe "removing $old" + rm -r "$old" + + # Create symlink from old location to new location. + make_symlink_sane "$old" "$new" +} + +# vim:set ai et sw=2 ts=2 tw=80: + +# GOBSTOPPER: The X Strike Force shell library ends here.