freebsd / freebsd-wifi-build

freebsd-wifi-build
141 stars 59 forks source link

Enh user build #21

Closed pastcompute closed 9 years ago

pastcompute commented 9 years ago

Hiya

These patches allow the freebsd-wifi-build to be run completely as a normal user, without having to become root. It also allows additional items to be added to src.conf without patching freebsd-wifi-build. I also added instructions on how to use the build to include ports into the mfsroot.

If you like I can think of several further improvements I could do, including scripts to resolve dependencies and build ports.

Tested against freebsd-release-10.1.0 and -CURRENT On 10.0.0 I did get it working but I had to hack a few things not in this diff and I haven't needed to go back and use 10.0 again/

erikarn commented 9 years ago

Hi!

interesting! I'd rather integrate fakeroot into the build process rather than having the user run fakeroot themselves.

I'll give this a whirl soon and see what the resulting images look like.

There's a bunch more work to be done to make some of these things optional - I never liked hard-coding /tftpboot for example.

pastcompute commented 9 years ago

Now that you mention it, I can add a ${FAKEROOT} that gets set if running in user build mode and integrate that quite easily, so I'll try and amend this pull request with that soonish.

As an aside, I am new to BSD. With all this use of environment variables, would it be ok to extend the user interface to something like:

path/to/build --as-user carambola2 buildworld (etc)

? Or is that showing my Linux background too much :-) ?

FWIW One thing I was trying to do is not break the default behaviour, not knowing how widely this is used by people. Or do you thing it would it be useful to change the default so it works as a user without having to specify the option?

erikarn commented 9 years ago

I'm happy to make the build setup just use your current user - no need for --as-user. If a user wishes to run it as another user then we can either have them run it as root or as sudo, rather than the build script changing users.

Yes, I'd like to make the fakeroot side of things be the default.

Thanks!

-adrian

On 26 November 2014 at 23:56, Andrew McDonnell notifications@github.com wrote:

Now that you mention it, I can add a ${FAKEROOT} that gets set if running in user build mode and integrate that quite easily, so I'll try and amend this pull request with that soonish.

As an aside, I am new to BSD. With all this use of environment variables, would it be ok to extend the user interface to something like:

path/to/build --as-user carambola2 buildworld (etc)

? Or is that showing my Linux background too much :-) ?

FWIW One thing I was trying to do is not break the default behaviour, not knowing how widely this is used by people. Or do you thing it would it be useful to change the default so it works as a user without having to specify the option?

— Reply to this email directly or view it on GitHub https://github.com/freebsd/freebsd-wifi-build/pull/21#issuecomment-64756654 .

pastcompute commented 9 years ago

@erikarn I updated this pull request to make build as user the default