Change wrapper dependency -- depend on wrapper from XFree86-4-Server. Don't

install server with setuid bit.  Various fixed from XFree86-4 port.

Submitted by:	taguchi@tohoku.iij.ad.jp (XFree86-4-* maintainer)
This commit is contained in:
Satoshi Asami 2000-11-03 11:08:12 +00:00
parent 1070a9f5d2
commit 08882f6b5f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=34721
12 changed files with 162 additions and 12 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.0.1
PORTREVISION= 1
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= ${PORTVERSION}
@ -15,6 +16,8 @@ DISTFILES= X401src-1.tgz
MAINTAINER= taguchi@tohoku.iij.ad.jp
RUN_DEPENDS= Xwrapper:${PORTSDIR}/x11/wrapper
XFREE86_VERSION= 4
USE_IMAKE= YES
DIST_SUBDIR= xc
@ -93,10 +96,14 @@ ExtendedInputDevices?= YES
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
pre-everything:
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
# ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
do-configure:
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure
post-install:
[ -x ${PREFIX}/bin/Xwrapper ] && ( cd ${PREFIX}/bin ; ${LN} -sf Xwrapper X )
${CHMOD} a-s ${PREFIX}/bin/XFree86
.include <bsd.port.mk>

View File

@ -29,9 +29,9 @@ configure () {
# It's good for FreeBSD ports/packages system.
echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF
# I want to set this line.
# but the probrem is too deep. not yet done.
# echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# Now, We can use this configuration.
# Thanks, Trevor Johnson <trevor@jpj.net>
echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# disable some configs: there are not used this ports
for i in \

View File

@ -7,6 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.0.1
PORTREVISION= 1
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= ${PORTVERSION}
@ -15,6 +16,8 @@ DISTFILES= X401src-1.tgz
MAINTAINER= taguchi@tohoku.iij.ad.jp
RUN_DEPENDS= Xwrapper:${PORTSDIR}/x11/wrapper
XFREE86_VERSION= 4
USE_IMAKE= YES
DIST_SUBDIR= xc
@ -93,10 +96,14 @@ ExtendedInputDevices?= YES
.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
pre-everything:
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
# ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
do-configure:
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure
post-install:
[ -x ${PREFIX}/bin/Xwrapper ] && ( cd ${PREFIX}/bin ; ${LN} -sf Xwrapper X )
${CHMOD} a-s ${PREFIX}/bin/XFree86
.include <bsd.port.mk>

View File

@ -29,9 +29,9 @@ configure () {
# It's good for FreeBSD ports/packages system.
echo "#define NothingOutsideProjectRoot YES" >> $LOCALDEF
# I want to set this line.
# but the probrem is too deep. not yet done.
# echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# Now, We can use this configuration.
# Thanks, Trevor Johnson <trevor@jpj.net>
echo "#define InstallXserverSetUID NO" >> $LOCALDEF
# disable some configs: there are not used this ports
for i in \

View File

@ -7,7 +7,7 @@
PORTNAME= libraries
PORTVERSION= 4.0.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XFREE}
MASTER_SITE_SUBDIR= ${PORTVERSION}

View File

@ -0,0 +1,11 @@
--- config/cf/Server.tmpl.orig Fri Feb 18 08:23:07 2000
+++ config/cf/Server.tmpl Sat Oct 28 10:09:07 2000
@@ -41,7 +41,7 @@
#ifndef SetUIDServerTarget
#if InstallServerSetUID
#define SetUIDServerTarget(server,subdirs,objects,libs,syslibs) @@\
-ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(INSTUIDFLAGS))
+ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(INSTBINFLAGS))
#else
#define SetUIDServerTarget ServerTarget
#endif

View File

@ -0,0 +1,11 @@
--- programs/xdm/config/xdm-conf.cpp.orig Wed Sep 6 17:05:53 2000
+++ programs/xdm/config/xdm-conf.cpp Wed Sep 6 17:06:03 2000
@@ -5,7 +5,7 @@
DisplayManager.keyFile: XDMDIR/xdm-keys
DisplayManager.servers: XDMDIR/Xservers
DisplayManager.accessFile: XDMDIR/Xaccess
-DisplayManager.willing: su nobody -c XDMDIR/Xwilling
+DisplayManager.willing: su -fm nobody -c XDMDIR/Xwilling
! All displays should use authorization, but we cannot be sure
! X terminals will be configured that way, so by default
! use authorization only for local displays :0, :1, etc.

View File

@ -0,0 +1,41 @@
*** programs/Xserver/hw/xfree86/input/mouse/mouse.c.orig Sat Jul 1 01:39:02 2000
--- programs/Xserver/hw/xfree86/input/mouse/mouse.c Fri Sep 22 11:30:18 2000
***************
*** 584,591 ****
{ 0xc0, 0x00, 0x00, 0x00, 6, 0x00, 0xff, MPF_NONE }, /* NetScroll */
/* Bus Mouse */
{ 0xf8, 0x80, 0x00, 0x00, 5, 0x00, 0xff, MPF_NONE }, /* BusMouse */
! /* Auto */
! { 0xf8, 0x80, 0x00, 0x00, 5, 0x00, 0xff, MPF_NONE }, /* dummy entry */
};
/*
--- 584,591 ----
{ 0xc0, 0x00, 0x00, 0x00, 6, 0x00, 0xff, MPF_NONE }, /* NetScroll */
/* Bus Mouse */
{ 0xf8, 0x80, 0x00, 0x00, 5, 0x00, 0xff, MPF_NONE }, /* BusMouse */
! { 0xf8, 0x80, 0x00, 0x00, 5, 0x00, 0xff, MPF_NONE }, /* Auto */
! { 0xf8, 0x80, 0x00, 0x00, 8, 0x00, 0xff, MPF_NONE }, /* SysMouse */
};
/*
*** programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c.orig Sat Feb 12 21:45:41 2000
--- programs/Xserver/hw/xfree86/os-support/bsd/bsd_mouse.c Fri Sep 22 11:30:18 2000
***************
*** 165,171 ****
--- 165,179 ----
mode.rate = rate > 0 ? rate : -1;
mode.resolution = res > 0 ? res : -1;
mode.accelfactor = -1;
+ #if defined(__FreeBSD__)
+ /*
+ * As the FreeBSD sysmouse driver defaults to protocol level 0 everytime
+ * it is opened we enforce protocol level 1 again at this point.
+ */
+ mode.level = 1;
+ #else
mode.level = -1;
+ #endif
ioctl(pInfo->fd, MOUSE_SETMODE, &mode);
}
#endif

View File

@ -0,0 +1,25 @@
*** programs/Xserver/hw/xfree86/common/xf86pciBus.c Tue Jun 20 21:38:23 2000
--- programs/Xserver/hw/xfree86/common/xf86pciBus.c Tue Jul 11 10:00:11 2000
***************
*** 1207,1216 ****
(*p_size)++;
(*p_base) = H2B(tag,range.rBegin,type);
- #ifdef DEBUG
ErrorF("New PCI res %i base: 0x%lx, size: 0x%lx, type %s\n",
res_n,(*p_base),(1 << (*p_size)),type | ResMem ? "Mem" : "Io");
- #endif
if (res_n != 0xff) {
pciWriteLong(tag,PCI_CMD_BASE_REG + res_n * sizeof(CARD32),
--- 1207,1214 ----
***************
*** 1724,1730 ****
resPtr tmp, avoid = NULL;
if (!pvp->validate) continue;
- avoid = xf86DupResList(pciAvoidRes);
NonSys = xf86DupResList(Sys);
m = n;
while ((pvp1 = xf86PciVideoInfo[m++])) {
--- 1722,1727 ----

View File

@ -0,0 +1,50 @@
diff -u lib/X11.orig/omGeneric.c lib/X11/omGeneric.c
--- lib/X11.orig/omGeneric.c Tue Feb 29 12:09:04 2000
+++ lib/X11/omGeneric.c Tue Oct 31 17:01:34 2000
@@ -1129,6 +1129,7 @@
if(font_set->vrotate == (VRotate)NULL)
return (-1);
+ memset(vrotate, 0x00, sizeof(VRotateRec) * sub_num);
for(i = 0 ; i < sub_num ; i++) {
vrotate[i].charset_name = font_set->substitute[i].name;
vrotate[i].side = font_set->substitute[i].side;
diff -u lib/X11.orig/omText.c lib/X11/omText.c
--- lib/X11.orig/omText.c Sun May 9 19:50:42 1999
+++ lib/X11/omText.c Tue Oct 31 17:01:43 2000
@@ -196,12 +196,9 @@
* *always* contain good data. We should probably remove
* the check for "fd->font", but we won't :-) -- jjw/pma (HP)
*/
- if(fd == (FontData) NULL ||
- (font = fs->font) == (XFontStruct *) NULL){
-
- if((font = fd->font) == (XFontStruct *) NULL)
- break;
- }
+ if ((font = fs->font) == (XFontStruct *) NULL)
+ if (fd != (FontData) NULL) font = fd->font;
+ if (font == (XFontStruct *) NULL) break;
switch(oc->core.orientation) {
case XOMOrientation_LTR_TTB:
diff -u lib/X11.orig/omTextEsc.c lib/X11/omTextEsc.c
--- lib/X11.orig/omTextEsc.c Sun May 9 19:50:42 1999
+++ lib/X11/omTextEsc.c Tue Oct 31 17:01:49 2000
@@ -151,12 +151,9 @@
is_xchar2b, FONTSCOPE);
if(ptr_len <= 0)
break;
- if(fd == (FontData) NULL ||
- (font = fd->font) == (XFontStruct *) NULL) {
-
- if((font = font_set->font) == (XFontStruct *) NULL)
- break;
- }
+ if ((font = font_set->font) == (XFontStruct *) NULL)
+ if (fd != (FontData) NULL) font = fd->font;
+ if (font == (XFontStruct *) NULL) break;
switch(oc->core.orientation) {
case XOMOrientation_LTR_TTB:

View File

@ -11,8 +11,6 @@ CATEGORIES= x11
MAINTAINER= trevor@FreeBSD.org
RUN_DEPENDS= XFree86:${PORTSDIR}/x11-servers/XFree86-4-Server
NO_WRKSUBDIR= yes
USE_X_PREFIX= yes

View File

@ -5,5 +5,5 @@ if [ "X$2" != "XPOST-INSTALL" ]; then
fi
/bin/ln -sf ${PKG_PREFIX}/bin/Xwrapper ${PKG_PREFIX}/bin/X
/bin/chmod -s ${PKG_PREFIX}/bin/XFree86
[ -x ${PKG_PREFIX}/bin/XFree86 ] && /bin/chmod -s ${PKG_PREFIX}/bin/XFree86
/bin/chmod +s ${PKG_PREFIX}/bin/Xwrapper