Re: [voidlinux/void-packages] New package: mbpfan-1.9.1 (#4853)

Toyam Cox at Sun, 02 Oct 2016 12:10:32 -0700
Vaelatern requested changes on this pull request. > @@ -0,0 +1,24 @@ +# Template file for 'mbpfan' +pkgname=mbpfan +version=1.9.1 +revision=1 +only_for_archs="x86_64 i686 x86_64-musl i686-musl" Please add a comment explaining your reasoning for the restriction (about those being the only arches close to possible on the macbookpro). > +only_for_archs="x86_64 i686 x86_64-musl i686-musl" +build_style=gnu-makefile +short_desc="Macbook Pro Fan Control Daemon" +maintainer='noah <nsawyer1993@gmail.com>' +license="GPL-3" +homepage="https://github.com/dgraziotin/mbpfan" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum="a7cf850a393ebfce21427b992436b84cc4b20e1cb8d673d45d2c8b991c69e68c" + +pre_build() { + sed -i 's/sbin/bin/' Makefile +} + +do_install() { + make install +} Not sure why you still have a `do_install()`, can you either remove it or explain why it is necessary?
Pizza-Boy at Sun, 02 Oct 2016 12:55:49 -0700
Alright, I've managed to really goof up the commits on this package somehow, and I don't really know how to clear it. If necessary I could just delete this branch and push the changes again in a new pull request.
Toyam Cox at Sun, 02 Oct 2016 13:20:17 -0700
Please don't.
Toyam Cox at Sun, 02 Oct 2016 13:20:37 -0700
The way to fix is likely to rebase on voidlinux/void-packages master branch
Pizza-Boy at Mon, 03 Oct 2016 07:50:27 -0700
Looks like the rebase fixed everything.
Pizza-Boy at Mon, 03 Oct 2016 07:50:47 -0700
Sorry for the confusion, I'm still figuring out git.
Jürgen Buchmüller at Mon, 03 Oct 2016 08:23:56 -0700
The `make install` does not honor the value of `$DESTDIR`. It installs into `/usr/bin` instead of `$DESTDIR/usr/bin`. See https://travis-ci.org/voidlinux/void-packages/jobs/164653827#L661
Pizza-Boy at Mon, 03 Oct 2016 12:15:10 -0700
Alright, I think I've got it installing to the right location. Whole thing was a real pain in the ass because the Makefile doesn't have any way to change the destination directory by default--just patched it in myself through `sed` commands. Let me know if there's an easier way to do that.
Pizza-Boy at Mon, 03 Oct 2016 12:34:32 -0700
Corrected the file to use `vbin` and `vinstall` instead--think this should be simpler.
Pizza-Boy at Mon, 03 Oct 2016 13:32:14 -0700
So after doing some testing on my system, there appears to be a bug in the 1.9.1 version of mbpfan that causes a buffer overflow error when running tests, doing other things, etc. It looks like it's been reported and fixed upstream in the master git repository, but I didn't want to use that because it seems that stable versions of software are preferred. I know the flag that needs to be changed for gcc (_FORTIFY_SOURCE=2 to _FORTIFY_SOURCE=1), but I'm not sure what the easiest way to do this'd be. Alternatively, we could pull the master repository (but that's not a stable release, technically), which should have this issue patched out, I think. Or maybe write a patch for it.
Pizza-Boy at Mon, 03 Oct 2016 13:45:07 -0700
Alright, setting `nopie` to something turns off the hardening features that cause the issue and make the program install correctly. Would it be alright for a non-hardened package to be installed, or should we pursue a different avenue?
Jürgen Buchmüller at Mon, 03 Oct 2016 14:27:42 -0700
Hardened packages are, of course, preferred, but if it's too much of a hassle I guess we can live with it. There's always a chance that someone takes a look and improves things, once a package is merged.
Jürgen Buchmüller at Mon, 03 Oct 2016 14:27:54 -0700
pullmoll approved this pull request.
Pizza-Boy at Mon, 03 Oct 2016 14:45:57 -0700
I'm sure that someone who knows C++ could write a patch integrating the changes upstream, but I'm not that guy (because I know nothing about C++).
Toyam Cox at Tue, 04 Oct 2016 22:34:07 -0700
Vaelatern requested changes on this pull request. > +pkgname=mbpfan +version=1.9.1 +revision=1 +only_for_archs="x86_64 i686 x86_64-musl i686-musl" #Package is restricted to these arches because it's Macbook-specific and Macbooks only have these arches. +build_style=gnu-makefile +nopie="YES" #Hardening is disabled because it causes buffer overflow errors with this version of mbpfan. A more elegant solution would be patching the source files themselves. +short_desc="Macbook Pro Fan Control Daemon" +maintainer='noah <nsawyer1993@gmail.com>' +license="GPL-3" +homepage="https://github.com/dgraziotin/mbpfan" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum="a7cf850a393ebfce21427b992436b84cc4b20e1cb8d673d45d2c8b991c69e68c" + +do_install() { + vbin bin/mbpfan + vinstall mbpfan.conf 644 etc This implies you need a `conf_files="/etc/mbpfan.conf"` This line should also be `vconf` unless you have a reason.
Toyam Cox at Mon, 10 Oct 2016 13:30:48 -0700
Vaelatern approved this pull request.
Toyam Cox at Mon, 10 Oct 2016 13:31:01 -0700
Merged #4853.