Skip to content

opensmtpd: 5.4.5p1 -> 5.7.1p1#9955

Merged
lucabrunox merged 3 commits intoNixOS:masterfrom
gebner:opensmtpd-5.7.1
Oct 2, 2015
Merged

opensmtpd: 5.4.5p1 -> 5.7.1p1#9955
lucabrunox merged 3 commits intoNixOS:masterfrom
gebner:opensmtpd-5.7.1

Conversation

@gebner
Copy link
Member

@gebner gebner commented Sep 20, 2015

OpenSMTPD now supports external filters, which are distributed in a separate opensmtpd-extras package, and usually installed as binaries in /usr/libexec/opensmtpd/filter-*. However they don't work with our package yet since OpenSMTPD looks for them in /nix/store/*-opensmtpd-5.7.1p1/libexec/opensmtpd/, where you can't install them:

    if (asprintf(&path, "%s/filter-%s", PATH_LIBEXEC, prog) == -1) {

Any ideas on how to fix that? Look in /run/current-system/sw/libexec? Add an environment variable?

@the-kenny
Copy link
Contributor

One common solution is patch it for an environment variable, then provide a wrapper-function opensmtp-with-filters or similar that allows you to declaratively specify filters in a build.

@gebner
Copy link
Member Author

gebner commented Sep 26, 2015

Okay, now we patch opensmtpd to read the environment variable OPENSMTPD_PROC_PATH and, if set, look there instead of /nix/store/...-opensmtpd-5.7.1p1/libexec/opensmtpd for the filters.

The nixos module then takes an extra option for the packages that contain filters (no default due to #10039), and passes that as an environment variable to the smtpd daemon.

@gebner
Copy link
Member Author

gebner commented Sep 26, 2015

Now extras are packaged with all dependencies enabled.

@lucabrunox
Copy link
Contributor

Awesome work!

Please check the travis failure. Make sure you enable chroot builds when building packages.

@gebner
Copy link
Member Author

gebner commented Oct 2, 2015

I'm on NixOS, and it works with or without chroot enabled. I have now added the path to libevent to the configure flags, as the was the library which was used from /usr/lib. I hope that this was the only impure reference.

lucabrunox pushed a commit that referenced this pull request Oct 2, 2015
opensmtpd: 5.4.5p1 -> 5.7.1p1
@lucabrunox lucabrunox merged commit 6e792bb into NixOS:master Oct 2, 2015
@lucabrunox
Copy link
Contributor

Travis passed thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants