-
farhan
alright...soliciting advice...I was going to write the port for gitstatus.
-
farhan
They have a custom build script which works on FreeBSD. I'm wondering...should I preserve it or try to write a Makefile?
-
farhan
The problem is...damn, this is confusing. Between missing headers and custom dependencies, writing a Makefile might become a serious ordeal
-
farhan
Is it normal to run custom build scripts rather than having a simple, clean Makefile?
-
ivy
i wouldn't say it's "normal" but if the package doesn't provide a makefile and expects you to use their build script, and the script works on freebsd, i would just keep using it
-
farhan
Are there other exmaples of that?
-
ivy
there's not benefit from writing a new build system unless you're going to submit it upstream, and iirc you said this project is defunct upstream
-
ivy
devel/boost-jam
-
farhan
thank you!
-
farhan
btw...seems kinda insecure to have thousands of people running a custom build script on their machines.
-
ivy
no more insecure than using a makefile, which also contains arbitrary shell commands
-
farhan
True, but in theory those shell commands are visible within FreeBSD
-
farhan
whereas a build script can change arbitrarily.
-
ivy
you mean because make prints the commands it runs while building? but you can just prefix the command with '@' to make it not do that
-
farhan
I don't follow you?
-
farhan
lets say I have a package called 'farhan' and it has a custom build script 'buildme.sh'. You can look at MAKE_CMD=buildme.sh and know that buildme.sh is running.
-
farhan
But I can arbitrarily change buildme.sh's contents.
-
ivy
yes, but if your package ships a Makefile, you could arbitrary change the Makefile's contents?
-
ivy
this is why distinfo includes the hash of the dist file, to know it's unchanged from when the maintainer submitted the port
-
farhan
you're right about boost-jam, I might use that as a template.
-
farhan
And...I am not familiar with distinfo, will research.
-
ivy
distinfo is one of the files you submit with your port along with Makefile, pkg-descr, etc., it's described in the porter's handbook
-
farhan
it isn't present with boost-jam
-
farhan
oh yes! I did read about that! Sorry, so many terms/concepts at once and its hard to remember just yet.
-
ivy
no, that's quite odd and i'm not sure why boost-jam doesn't have a distinfo, but almost all other ports do
-
ivy
ah, it's because boost-jam uses the distinfo from boost-all
-
farhan
and you're familiar with gitstatus?
-
ivy
(because it's a part of boost, not a standalone package)
-
ivy
i have never heard of gitstatus before, no
-
dacav
Hi. I just installed dma (DragonFly Mail Agent) on a Debian machine, since I'm already using happily under FreeBSD. I notice that under Debian there's no need to have the configuration files world readable: they are readable by the "mail" group, and /usr/sbin/dma is a setgid executable, having group mail of course
-
dacav
I think it is a good idea. If it actually is so, would it make sense to have the same setup under FreeBSD? Perhaps a default even
-
nimaje
farhan: for the ports framework there is just some command(s) you run to build the project, the default is using make and some other build systems have support via USES, but you can write the do-build target in the port yourself, same with do-install and do-fetch (but you should override that last one only in really rare cases)
-
ivy
dacav: i would be mildly opposed to think, i think setuid executables are bad and if you want something unusual you're better off installing a proper MTA
-
ivy
s/to think/so this
-
dacav
ivy: it is setgid to a 'mail' group
-
ivy
dacav: yes
-
ivy
setuid executables introduce potential security issues to all systems that executable is installed on, but this functionality would only be used by a small subset of systems
-
dacav
why do you think it is bad?
-
dacav
OK, I understand the idea: if an exploit exists on that binary, you get to run arbitrary code with those permission granted
-
ivy
do you know if it's installed this way on DFBSD?
-
dacav
But in this specific case the permissions would be those accorded to the `mail` group, which would be reading of /etc/dma/*
-
dacav
...which is already the case for any user
-
dacav
so my argument is that there's no big risk
-
dacav
I don't know if it is installed this way on DFBSD
-
ivy
dacav: i don't think that is correct, e.g. /var/mail is by default 0775 root:mail, so anyone with gid mail can write arbitrary files there
-
dacav
I don't own a DFBSD system :)
-
ivy
gid mail might also be used for other things i can't think of off hand
-
dacav
I see. Would it make sense to have a different group perhaps? Or would it be too bloaty?
-
ivy
perhaps if we added a new 'dma' group and made dma setgid dma, that would be more reasonable
-
dacav
:)
-
» dacav has got to go :(
-
ivy
dacav: you can find a PR and cc ivy@, i think this is not an unreasonable idea
-
dacav
find a PR?
-
ivy
dacav: however we need to check with DF to make sure the code has been audited for setgid installation
-
ivy
s/find a PR/file a PR
-
dacav
do you mean file a pull request?
-
dacav
ok
-
dacav
I will do that later :)
-
dacav
I never did it
-
ivy
as in file a problem report at
bugs.freebsd.org
-
dacav
Sure enough! I'll be back in the evening! Thanks for your time
-
ivy
when you do that, put ivy⊙fo in the Cc: field
-
AmyMalik
all this MTA talk reminds me I need to patch my qmail-remote executable (-:
-
AmyMalik
FAQ. «are you a time traveller» no.