Opened 11 years ago

Last modified 10 years ago

#1255 new Defect

Installation makefile loftily wants to install stuff to /etc ... Nope!

Reported by: Bluefin Tuna Owned by: romw
Priority: Undetermined Milestone: Undetermined
Component: Client - Build Version: 7.0.64
Keywords: Cc:

Description

Don't know how to solve this, but the installation makefile from the source distro thinks it has license to install to /etc.

DESTDIR in this case is unset (would anything else make sense? Looking at the code below, where DESTDIR is partially missing, no) and sysconfdir is "/etc".

install-exec-hook:
        chmod +x boinc-client
        $(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d
        $(INSTALL) -b $(srcdir)/boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client
        if [ -d /etc/sysconfig ] ; then \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \
        elif [ -d /etc/default ] ; then \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir)/default ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/default/boinc-client ; \
        else \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir) ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/boinc-client.conf ; \
        fi

The above is not even being run with root permission in my case (instead it is run by user 'boinc'), so simply fails and must be commented out.

Anyway, things are no longer handled that way in Fedora 17. Startup/shutdown operations are now done by via systemd, not init.

For example, httpd is started via a symlink

/etc/systemd/system/multi-user.target.wants/httpd.service

pointing to

/usr/lib/systemd/system/httpd.service

Does the boinc client drop its privileges from root to some specified user? Not sure about that.

Anyway, this needs an overhaul.

Change History (4)

comment:1 Changed 11 years ago by Christian Beer

Component: UndeterminedClient - Setup
Owner: set to romw

This seems to be the install script for Debian. Could you please cite the file you took this snippet from? As far as I know is the normal BOINC Installer (a bash script) creating a directory at the current working directory and does not install anything.

A little more information on your specific commands would be helpful.

comment:2 Changed 11 years ago by Bluefin Tuna

Hi

Sorry about that - I didn't realize there might be several possibilities.

What I'm running here is the "Makefile" (generated from) the source repository. More precisely:

On a Fedora 17 installation:

  1. Grab the git repo
  2. ./_autosetup
  3. ./configure CXXFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common" --disable-server --prefix=/home/boinc/boinc_${VERSION}
  4. make (some errors occur but these are fixed quickly)
  5. make install

At point 5, the "client/scripts/Makefile" tries to install the startup/shutdown hooks to "/etc".

Well, one can work around easily of course, but it's still a weird thing to do.

Best regards,

-- David

comment:3 Changed 11 years ago by Christian Beer

Component: Client - SetupClient - Build

I don't know if make install is supported anymore, I never used it to install the client. I change the Component to Clint - Build and see what davea thinks of this.

comment:4 Changed 10 years ago by Bluefin Tuna

This can still be found in 7.2.9 in $BOINC_GIT_CLONE/client/scripts/Makefile:

install-exec-hook:
        chmod +x boinc-client
        $(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d
        $(INSTALL) -b $(srcdir)/boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client
        if [ -d /etc/sysconfig ] ; then \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \
        elif [ -d /etc/default ] ; then \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir)/default ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/default/boinc-client ; \
        else \
          $(INSTALL) -d $(DESTDIR)$(sysconfdir) ; \
          $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/boinc-client.conf ; \
        fi
Note: See TracTickets for help on using tickets.