-
Notifications
You must be signed in to change notification settings - Fork 9
NILFS utilities
License
nilfs-dev/nilfs-utils
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
* Required packages
- libuuid-devel or uuid-dev
- libmount-devel or libmount-dev
- libblkid-devel or libblkid-dev
- libselinux-devel or libselinux1-dev (*1)
*1: required only if supporting SELinux context mount options without
using libmount. By default, libmount is used and support of the
context mount depends on the libmount that distro provides.
* How to compile
$ ./configure
$ make
If /etc/mtab is not a symlink to /proc/self/mounts but a regular file
in the target system, run the configure script with --without-libmount
option:
$ ./configure --without-libmount
This configures the build environment so as to make legacy
mount/umount helpers (mount.nilfs2 and umount.nilfs2), in which the
legacy mtab file is handled properly.
Most modern Linux distributions use libmount by default, and this is
the recommended configuration. This option is primarily intended for
legacy environments or specialized configurations that still rely on a
writable /etc/mtab file.
* Installation path configuration
If your system is a 64-bit architecture and libraries are installed
into /usr/lib64 instead of /usr/lib, change the library directory with
--libdir option:
$ ./configure --libdir=/usr/lib64
If you want to separate the library files into a subdirectory, specify
it as follows, for example:
$ ./configure --libdir=/usr/lib64/nilfs
Modern Linux distributions follow the "UsrMerge" or "Bin-Sbin merge"
schemes. The configure script automatically detects the system
hierarchy and adjusts the installation paths for core binaries
(mkfs.nilfs2, mount.nilfs2, nilfs_cleanerd, etc.):
- Legacy: Installs to /sbin
- UsrMerge: Installs to /usr/sbin
- Bin-Sbin merge (e.g., Fedora Rawhide): Installs to /usr/bin
When installing to /usr/bin, the build system also attempts to create
compatibility symbolic links in /usr/sbin if that directory exists on
the target system.
You can manually override this detection using the following options:
# Force installation into /usr/bin (Bin-Sbin merge style)
$ ./configure --enable-usrmerge=bin
# Force installation into /usr/sbin (UsrMerge style)
$ ./configure --enable-usrmerge=sbin
# Force installation into the traditional /sbin
$ ./configure --disable-usrmerge
By default, if the option is omitted, the script probes the system's
directory configuration to determine the appropriate hierarchy. If
the option is specified without a TYPE (i.e., --enable-usrmerge), it
defaults to "sbin" (/usr/sbin) to align with standard UsrMerge
practices.
Note: This option is significant even when /sbin is a symbolic link to
/usr/sbin (i.e., the physical installation destination is the same).
It ensures that the absolute paths used by the utilities to call other
binaries are consistent with the chosen hierarchy.
* Trouble shooting
If the blkid library in your environment is old and incompatible with
this package, you can use --without-blkid option:
$ ./configure --without-blkid
However, use of this option is normally not recommended because it
disables the safety check of mkfs.nilfs2, which prevents users from
accidentally overwriting an in-use device.
You can compile the legacy mount.nilfs2 and umount.nilfs2 helpers
without support for SELinux context mount options (-o context=<context>,
etc):
$ ./configure --without-libmount --without-selinux
For helpers built with mount library (libmount), support of the
context mount depends on the libmount that distro provides.
If you are having problems due to the missing nilfs2 disk format or
ioctl interface definition file (nilfs2_ondisk.h or nilfs2_api.h,
respectively), try installing the Linux kernel source or header file
package first.
If you still cannot install these files, or if you want to overwrite
them with files from this package, specify the
"--enable-uapi-header-install" option as an argument to the configure
script. This will install the uapi header files included in this
package:
$ ./configure --enable-uapi-header-install
Note that the utility package itself references bundled local header
files, so you don't need to install these files with this option to
build.
* How to get development sources
$ cd your-work-directory
$ git clone https://github.com/nilfs-dev/nilfs-utils.git
Before compiling the development sources, you need to run autogen.sh
script. This is not required for packaged sources unless you changed
the configuration.
$ cd nilfs-utils
$ ./autogen.sh
* Developer's notes
The central resource for nilfs-utils development is the mailing list
(linux-nilfs@vger.kernel.org).
First, please read the following documents (in short, follow Linux
kernel development rules):
https://docs.kernel.org/process/coding-style.html
https://docs.kernel.org/process/submitting-patches.html
Then, check your patches with the patch style checker prior to
submission (scripts/checkpatch.pl) like the following example:
$ ./scripts/checkpatch.pl <patch-file>
...
<patch-file> has no obvious style problems and is ready for submission.
About
NILFS utilities
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published