-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init script and installer #2
base: master
Are you sure you want to change the base?
Conversation
Hi. Aside from apt-get, I don't know much about software installation, but I believe a common approach is to
as normal user then
as root. I imagine the rule here is to do the least operation as possible as root. This is not an absolute rule anyway. The install script copies needed files into their destination directories. This is where I lack knowledge, and it may even depend on distributions, I don't know. I think it is /usr/local on Debian systems. I did the checkout and the make as normal user. Now if I install as root, I'm allowing the automatic startup of a file owned by a normal user (myself). Not good. Moreover, if I now make as root, the file is not modified and still belongs to my normal user. If I make clean then make as root, the file belongs to root, which is safe. If the steps proposed by Trystan here are followed strictly
then there is no direct security issue. But if I'm a curious user and want to do the git and compilation steps as user before doing anything, I'm endangering my system when executing the install script. It may be a cleaner approach to do the installation as a copy in /usr/local, but again I let you judge, I'm no guru. Just wanted to bring your attention on this. Please forgive me if this is misplaced. |
It may be worse than I thought. When executing make as root, the extraction of the microhttpd archive is executed as root. By default, when extracting with any user, the ownership of extracted files belongs to the user. Apparently, with root user, as an exception, the ownership is preserved. See man tar:
My understanding is that when doing make and install as root, extracted microhttpd files are owned by user and group whose UID and GID correspond to the owner (or perhaps the creator of the archive, I don't know) on the system where the tar was made. This can be any random user/group on the local machine. The -no-same-owner flag could be used, but I think the clean way would be to make as user, then copy as root to a more appropriate location. I think this location is /usr/local. See here, for instance. My suggestion is to
(I didn't check what libmicrohttp is and what it is used for.) |
Hi Jerome. I've already added autotools support (make/make install) in the upstream branch, but Trystan hasn't merged it yet. The plan was to build some .deb packages but I haven't had time so far. The autotools build removes the bundled libmicrohttpd altogether because most recent distributions should have a new enough version in their repositories, so you can just apt-get install it. Mike |
Great.I didn't see that. Indeed, I have libmicrohttpd10 version 0.9.20 available. I'll have a look at your install script. Thanks. |
Hi. I tried to install using the new install procedure and I don't get it working. On a fresh Wheezy, I installed packages libmicrohttpd1, autotools-dev, automake and autoconf. Not sure all of these are required. Now, I don't know what to do. Are README and INSTALL files accurate ?
I tried autoreconf and now I got a configure file
Anything I'm doing wrong ? Or is it known not to work ? |
@jerome-github I got the same message but was able to get it working after installing pkg-config. I'm doing autoreconf -i
./configure
make all
checkinstall However you'll still have to setup the user timestore and create the directory /var/lib/timestore: mkdir /var/lib/timestore
adduser timestore
chown timestore /var/lib/timestore |
here's the init script and installer as discussed