Skip to content
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

Make it easy to configure (the build), build, and install #9

Open
jlmuir opened this issue Jul 8, 2019 · 4 comments · May be fixed by #107
Open

Make it easy to configure (the build), build, and install #9

jlmuir opened this issue Jul 8, 2019 · 4 comments · May be fixed by #107
Milestone

Comments

@jlmuir
Copy link

jlmuir commented Jul 8, 2019

It would be great to make it easy to configure (the build), build, and install notqmail. Doing all that by hand is a pain right now. Amitai Schleier has done an excellent job of automating all of that in pkgsrc with the qmail-run package, but obviously that requires using pkgsrc, and I worry that that is a big enough barrier to entry for some people that they won't consider notqmail.

Even though I'm not a big fan of Autotools, being able to do ./configure && make && make install is pretty convenient, and a lot of package management systems support it. If not actually Autotools, it could be an Autotools workalike. (Or something else, I suppose, even though not as standard as the Autotools interface, assuming it requires running just a few commands, would really be a big improvement.)

This would also increase the chance of notqmail being included in other OS package repositories (e.g., Homebrew, RHEL, Ubuntu, Arch, Gentoo, Alpine, etc.) which would also be a big plus. It's certainly convenient for someone intending a production deployment, but it's also convenient for someone wishing to try it out.

Lastly, this would make it easier for someone writing a tutorial. There are a number of tutorials on the Internet on how to install and configure software X on operating system Y. For example, DigitalOcean seems to host a number of these (not surprisingly since I assume they hope people will use their services for hosting), and a Google search (e.g., how install postfix rhel) will often find them. When a tutorial author can write, e.g., "First, install Postfix: # yum install postfix," that's really easy compared to what they'd have to write without a binary package being available in the OS's package repository.

@DerDakon
Copy link
Member

DerDakon commented Jul 8, 2019

I could offer a CMakeLists.txt, I just have to dig it out.

@alanpost
Copy link
Contributor

alanpost commented Jul 8, 2019

There is no strict requirement to use autotools to have a configure script, as you observe they can be written by hand with a compatible interface. I have another build that doesn't use autotools but I did decide to include a configure script, written by hand. It supports --prefix, DESTDIR, and the usual environment variables. In that build the step is strictly optional, the build works without running it, but if you do run it the build uses the information recorded by the script.

I agree having a configure script is a basic expectation, it can be made optional for those who want to continue hand-modifying conf-* files, and there is no strict reason it must be generated by autotools. Since I have a codebase where I concluded the same as @jlmuir here regarding the utility of such a thing, I +1.

@schmonz
Copy link
Member

schmonz commented Jul 8, 2019

From the issues and PRs raised so far, I'd order the list of top impediments to vendor packaging like so:

  1. UIDs and GIDs from the build host hardcoded into binaries
  2. Not knowing that placing a handful of symlinks in /var/qmail solves FHS/hier(7) compatibility
  3. Lack of support for DESTDIR-style staging area

As a packager, I'd guess other packagers are also accustomed to dealing with exceptions to ./configure && make && make install, and as such I'd call this a distant fourth. But there's no question it removes a barrier, so if it's easy, non-invasive, and optional (like @alanpost's implementation), it will definitely help and I'm all for it.

@mbhangui
Copy link
Contributor

mbhangui commented Jul 9, 2019

There isn't a script requirement for using autotools for other distros like linux & it's variants. If one is building RPM or debian packages, one just have to put the correct command to compile, the correct command to build and the correct command to install the entire binary+config in a staging dirctory defined by DESTDIR env variable.
Yes ./configure is so much popular in the GNU world, that one can put configure that does nothing but configures the conf- files in the qmail source directory. The make command will compile like before. However, make install will not install the binaries because install is a target that compiles the 'install' binary. But one can also put 'make setup' in the RPM spec file, debian rules file to achieve the installation goal.

@alanpost alanpost added this to the 1.08 milestone Jul 22, 2019
@DerDakon DerDakon linked a pull request Oct 17, 2019 that will close this issue
@schmonz schmonz modified the milestones: 1.09, 1.90 Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants