Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the need to invoke mknod using FFI.
This removes fpm's direct use of FFI and removes `ffi` as a direct dependency. For #1795 Cases: * A unix socket. * A named pipe * A charDev should now fail (like /dev/tty) * A blockDev should now fail (like /dev/sda1) NOTE: In this change, chardev and blockdev support have been removed. These "copies" previously were just calling `mknod` with identical mode, basically copying the `mode` from stat(2) to mknod(2). Exceptions are now thrown for chardev and blockdev. Test cases: # Try to package a named pipe. % mkfifo /tmp/z.pipe % bundle exec bin/fpm -s dir -t rpm -n example /tmp/z.pipe Created package {:path=>"example-1.0-1.x86_64.rpm"} % rpm -qlvp example-1.0-1.x86_64.rpm prw-rw-r-- 1 root root 0 Jun 17 22:40 /tmp/z.pipe # Create the unix socket % nc -lU /tmp/z.sock # Package it into an rpm % bin/fpm -s dir -t rpm -n example /tmp/z.sock |& less {:timestamp=>"2021-06-17T22:33:27.780347-0700", :message=>"Created package", :path=>"example-1.0-1.x86_64.rpm"} # Verify the file is of socket type ('s' at beginning of file mode % rpm -qlvp example-1.0-1.x86_64.rpm srwxrwxr-x 1 root root 0 Jun 17 22:33 /tmp/z.sock
- Loading branch information