fpm icon indicating copy to clipboard operation
fpm copied to clipboard

Correctly create device nodes on Linux

Open dividedmind opened this issue 9 years ago • 2 comments

Pointer that used to be passed to xmknod was FFI::MemoryPointer.new(dev), which created an array of dev size. Correctly construct the pointer instead.

Also use Stat#rdev, not #dev (which is the device where the node is in, not which it points to).

dividedmind avatar Oct 05 '16 23:10 dividedmind

Is there a test we can add to cover this? otherwise, I'm not sure how to reproduce any failure that this patch fixes.

jordansissel avatar Oct 05 '16 23:10 jordansissel

This is kinda hard, because you need root to actually execute any of this code.

But try making a package from dir to rpm which includes device files and you'll see the problem. 5 paź 2016 19:20 "Jordan Sissel" [email protected] napisał(a):

Is there a test we can add to cover this? otherwise, I'm not sure how to reproduce any failure that this patch fixes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jordansissel/fpm/pull/1199#issuecomment-251827294, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyRVCatO5k5wDj00eOqMqJyOlv0C3zPks5qxDClgaJpZM4KPYxl .

dividedmind avatar Oct 06 '16 00:10 dividedmind