dspinellis / dgsh

Shell supporting pipelines to and from multiple processes
http://www.spinellis.gr/sw/dgsh/
Other
323 stars 23 forks source link

Don’t install documentation #70

Closed lucaswerkmeister closed 7 years ago

lucaswerkmeister commented 7 years ago

Running make install installs a lot of documentation files into $PREFIX/share which, when $PREFIX is /usr, collide with existing files, making it harder to package dgsh. A full list (at least on Arch) is here: https://gist.github.com/lucaswerkmeister/f544a29f77354f5cb4f582c920d54483

Of course, these files can be removed by the packager, but it would be convenient if they weren’t installed in the first place, seeing as they’re not dgsh-specific anyways.

dspinellis commented 7 years ago

I propose to configure the modified Unix tools to install their man pages under /var/tmp/dgsh-share-duplicates and then delete the directory at the end of the installation process (the make install rule). Would that work OK with packaging?

lucaswerkmeister commented 7 years ago

Yeah, that sounds alright to me.

(An alternative solution might be to install the full Bash and coreutils, all in their normal paths (no libtool), and then to say that the dgsh package provides the Bash and coreutils packages (replacing them), but that’s much more heavy-handed.)

dspinellis commented 7 years ago

Thanks for the swift feedback! We'll implement the temporary directory install. We don't yet feel comfortable enough to do the other option.

mfragkoulis commented 7 years ago

Can you please pull and give it a try?

lucaswerkmeister commented 7 years ago

It looks like the build is installing everything into /home/lucas/git/aur/dgsh-git/pkg/dgsh-git//var/tmp/dgsh-share-duplicates/, and then there’s an error right at the end when rm “cannot remove /var/tmp/dgsh-share-duplicates: No such file or directory”. I assume the configured --mandir is taken to be relative to the --prefix.

mfragkoulis commented 7 years ago

Thanks for the feedback! Could you please pull and try again? If it doesn't work, could you please post the complete log?

lucaswerkmeister commented 7 years ago

No, sorry, I got that wrong – now the build tries to remove /usr/var/tmp/dgsh-share-duplicates/, but the doc is still installed into /home/lucas/git/aur/dgsh-git/pkg/dgsh-git//usr/share/…. I keep mixing up build dir and prefix :/

EDIT: Complete log, as requested: https://gist.github.com/lucaswerkmeister/0b0ba840478ca091aecf647fd1085b6d

mfragkoulis commented 7 years ago

OK, how about now? Does it work?

lucaswerkmeister commented 7 years ago

I think the $(PREFIX) shouldn’t be there:

rm -r /home/lucas/git/aur/dgsh-git/pkg/dgsh-git//usr/var/tmp/dgsh-share-duplicates rm: cannot remove '/home/lucas/git/aur/dgsh-git/pkg/dgsh-git//usr/var/tmp/dgsh-share-duplicates': No such file or directory

pkg/dgsh-git/var/tmp/dgsh-share-duplicates/ exists. I’ll remove the $(PREFIX) from the Makefile instruction and let you know if it works.

lucaswerkmeister commented 7 years ago

Yup, build succeeds with this patch:

diff --git a/unix-tools/Makefile b/unix-tools/Makefile
index 20c1312..3cf6bf9 100644
--- a/unix-tools/Makefile
+++ b/unix-tools/Makefile
@@ -115,7 +115,7 @@ install: cat tee make
     install cat $(DESTDIR)$(DGSHPATH)
     install tee $(DESTDIR)$(DGSHPATH)
     ./install-wrapped.sh
-    rm -r $(DESTDIR)$(PREFIX)$(MANDUMPDIR)
+    rm -r $(DESTDIR)$(MANDUMPDIR)

 cat: cat.sh
     install $? $@
mfragkoulis commented 7 years ago

Right! Please pull and it should be ok now. Please confirm so that we can close this.

lucaswerkmeister commented 7 years ago

Sorry, the build succeeds, but there are some more conflicts: /usr/share/doc/bash/STUFF, /usr/share/info/STUFF, and /usr/share/locale/STUFF. Full list: https://gist.github.com/lucaswerkmeister/980de1e9bc5f1577d3877c94d2b60d7f

The configure directives are probably docdir, infodir and localedir (at least, all of these exist in Makefile.in). I’ll try out a new build with that and post the patch if it works.

lucaswerkmeister commented 7 years ago

Alright, with #71 I can fully build and install the package. (Though there’s still a warning: “directory permissions differ on /var/tmp/” – filesystem has 1777, package has 755.)