smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
724 stars 73 forks source link

sudo make install - failing with specified parameters #338

Open heaventwig opened 9 months ago

heaventwig commented 9 months ago

I've downloaded, built, tested, and run the software on a half dozen machines now. And now I'm wanting to make them easier to launch for other users of those machines, besides my admin account. Eg at an upcoming LAN party for my local hackerspace.

So I went to the directory in which I had previously built and verified the software, and ran the following series of commands

make mostly-clean make DESTDIR= PREFIX=/usr/local make DESTDIR= PREFIX=/usr/local models make DESTDIR= PREFIX=/usr/local update-assets sudo make DESTDIR= PREFIX=/usr/local install

And I got this error from the last of those commands: Install: cannot stat 'share/snis/textures/planetary-ring1.png': No such file or directory make: *** [Makefile:1374: install] Error 1

(The first time I got this, I thought maybe it was because a file hadn't yet been assembled by an updated make with the new destdir and prefix variables, which is what led me to rerun the whole thing with those variables set for the making of models and updating of assets, but that didn't fix it.)

smcameron commented 9 months ago

Yeah, the "install" and "uninstall" targets don't get much testing, I'm afraid, since I generally just run things from where they're built.

planetary-ring1.png is an old, unused texture, removed by 1cf651863cea00d1c6c82b5cfe3af1133108533e

This commit should fix the problem you encountered: c541b125df0e900b2f665308fff89e48280b4a5e Remove planetary-ring1.png from Makefile

It's possible there are more problems waiting behind that one though. Let me know how it goes.

Also good luck with the LAN party, hope it goes well. Not enough people are able to manage to play this game as it's meant to be played.

smcameron commented 9 months ago

Oh, BTW, if you do "make update-assets", then you don't need to do "make models", because "update-assets" downloads all the models anyway. That should save you some time.

heaventwig commented 9 months ago

Thank you for making those patches so quickly! The LAN party was a success, our first since COVID shut everything down, and we're talking about doing it again in a few months. For this patch, though - there appear to be more of these missing files. Would it make sense to track them all down, or should I just make a practice of installing from the game user account rather than my admin account?

smcameron commented 9 months ago

It makes sense to track them down, "make install" is supposed to work. I'll take a look into it tomorrow.

smcameron commented 9 months ago

Couple of commits:

I noticed "make uninstall" leaves a bit of trash behind.

smcameron commented 9 months ago

Modified some documentation around "make install"

41e8d2d3c2e4df57cfb6d8f55988170afaf5e700 Added some notes about "make install"

smcameron commented 9 months ago

c09916abde4c8f10cc8c3254403af31538fb3b03 Document "install-assets" makefile target

smcameron commented 9 months ago

2d206d7b34d9dd7f224529913c1ed4666073b1b4 Do not install snis_update_assets.sh via "make install"

make install-assets does that job already.

smcameron commented 9 months ago

I think this should be more or less working now. Let me know if it works for you now.

The procedure should be:

make DESTDIR= PREFIX=/usr/local mostly-clean
make DESTDIR= PREFIX=/usr/local
make DESTDIR= PREFIX=/usr/local update-assets
make DESTDIR= PREFIX=/usr/local install
make DESTDIR= PREFIX=/usr/local install-assets
heaventwig commented 9 months ago

It might be a few days before I'm back at the Lab to blow out a machine and reinstall everything from scratch, but I'll definitely test this.

heaventwig commented 8 months ago

Okay, testing it now I'm finding this error from the "install" step: touch: cannot touch '//usr/local/.canary-in-the-coal-mine.canary': Permission denied

heaventwig commented 8 months ago

sudo fixes it. Then I get a bunch more permission-denied errors when running install-assets. sudo fixes them too.

smcameron commented 8 months ago

Yep, sudo will be needed if installing in someplace like /usr/local, but not needed if installing someplace you already have appropriate permissions to -- in other words, I believe it's working as designed wrt "sudo".

smcameron commented 8 months ago

Thanks for testing it out and reporting your results.