Date: Mon, 14 Jan 2002 12:24:53 -0500 (EST) From: Joe Clarke <marcus@marcuscom.com> To: Maxim Sobolev <sobomax@FreeBSD.org> Cc: gnome@FreeBSD.org Subject: Re: [Fwd: Testers wanted for pre-build RC2 GNOME packages] Message-ID: <20020114120105.D72753-300000@shumai.marcuscom.com> In-Reply-To: <3C430EB4.88AA5A8D@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, 14 Jan 2002, Maxim Sobolev wrote: > Joe Clarke wrote: > > > > GDM will fail to install since the user isn't created. An error is > > printed out first for the user, then for the group. So, if the user is a > > complete newbie to GNOME, they will try the pkg_add three times before > > success. What about this patch to gdm's pkg-req. This way, the will have > > to do the pkg_add on gdm at most twice (unless the can't read ;-) ). > > The better option is to tweak package to create those entries > automagically. Any takers? Sure, I've already done it based on mysql-server. I just didn't know if GDM should be responsible for creating those entries. You need to remove pkg-req for the attached patches to work. Joe > > Thank you a lot for your help, Joe! > > -Maxim > > > > > Joe > > > > On Mon, 14 Jan 2002, Maxim Sobolev wrote: > > > > > OOPS, my bad - misspelled your e-mail. > > > > > > -Maxim > > > > > > -------- Original Message -------- > > > Subject: Testers wanted for pre-build RC2 GNOME packages > > > Date: Mon, 14 Jan 2002 16:22:27 +0200 > > > From: Maxim Sobolev <sobomax@FreeBSD.ORG> > > > Organization: Vega International Capital > > > To: gnome@FreeBSD.ORG > > > CC: marcus@marciscom.com, john_m_cooper@yahoo.com, ports@FreeBSD.ORG > > > > > > Hi folks, > > > > > > Release Engineering team has prepared the set of packages for the > > > second 4.5 Release Candidate. I would like to ask people with > > > sufficient bandwidth to test how well gnome metaport could be > > > installed with `pkg_add -r' to avoid unfortunate situation we had with > > > 4.4 pre-built GNOME packages. Unfortunately, due to the lack of > > > bandwidth I can't do the testing by myself. > > > > > > Set of packages is available at > > > ftp://releng4.freebsd.org/pub/FreeBSD/ports/i386/packages-4.5-RC2 - > > > you probably have to tweak /usr/src/usr.sbin/pkg_install/add/main.c to > > > use correct URL. To test it properly you'll need to delete all > > > installed packages (tar up /usr/X11R6 and /usr/local, delete those > > > dirs and move /var/db/pkg out of the way), and then do `pkg_add -r > > > gnome' using hacked pkg_add binary. After the testing is done, you > > > could easily restore your previous set of packages by deleting > > > /usr/X11R6, /usr/local /var/db/pkg, unpacking archived /usr/X11R6 and > > > /usr/local and moving old /var/db/pkg back. > > > > > > Please report your success or failure to gnome@FreeBSD.org. > > > > > > Thanks! > > > > > > -Maxim > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-gnome" in the body of the message > > > > > > > > > > ---------------------------------------------------------------------- > > Name: patch-pkg-req > > patch-pkg-req Type: Plain Text (TEXT/PLAIN) > > Encoding: BASE64 > > [-- Attachment #2 --] --- Makefile.orig Mon Jan 14 12:09:31 2002 +++ Makefile Mon Jan 14 12:21:34 2002 @@ -36,12 +36,10 @@ 's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \ s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g' +post-install: .if !defined(BATCH) && !defined(PACKAGE_BUILDING) -pre-install: - @${SH} ${PKGREQ} ${PKGNAME} INSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif - -post-install: @${INSTALL_SCRIPT} ${WRKSRC}/config/gnomerc ${PREFIX}/etc/gdm @${CHOWN} -R 91:91 ${PREFIX}/share/gnome/gdm ${PREFIX}/etc/gdm @${CAT} ${PKGMESSAGE} [-- Attachment #3 --] --- pkg-install.orig Mon Jan 14 12:12:24 2002 +++ pkg-install Mon Jan 14 12:09:27 2002 @@ -1,7 +1,39 @@ #!/bin/sh -if [ "$2" = "POST-INSTALL" -o -n "${PACKAGE_BUILDING}" ]; then - exit 0 +if [ -n "${PACKAGE_BUILDING}" ]; then + exit 0 +fi + +if [ "$2" = "POST-INSTALL" ]; then + USER=gdm + GROUP=${USER} + UID=91 + GID=${UID} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d "/nonexistent" -s /sbin/nologin -c "GNOME Display Manager" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + exit 0 fi /usr/bin/dialog --yesno "GDM may contain vulnerabilities leading local root compromise, and it is reported widely with various security sites and groups. It is not recommended that this port be installed in public environment. Do you wish to accept the security risk and build GDM anyway?" 10 60 || /usr/bin/false
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020114120105.D72753-300000>
