meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
cal_sources = files(
|
|
|
|
'cal.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
logger_sources = files(
|
|
|
|
'logger.c',
|
|
|
|
) + \
|
|
|
|
strutils_c + \
|
|
|
|
strv_c
|
|
|
|
|
|
|
|
look_sources = files(
|
|
|
|
'look.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
mcookie_sources = files(
|
|
|
|
'mcookie.c',
|
|
|
|
) + \
|
|
|
|
md5_c
|
|
|
|
|
|
|
|
namei_sources = files(
|
|
|
|
'namei.c',
|
|
|
|
) + \
|
|
|
|
strutils_c + \
|
|
|
|
idcache_c
|
|
|
|
|
|
|
|
whereis_sources = files(
|
|
|
|
'whereis.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
lslocks_sources = files(
|
|
|
|
'lslocks.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
lsblk_sources = files(
|
|
|
|
'lsblk.c',
|
|
|
|
'lsblk-mnt.c',
|
|
|
|
'lsblk-properties.c',
|
|
|
|
'lsblk-devtree.c',
|
|
|
|
'lsblk.h',
|
|
|
|
)
|
|
|
|
|
2021-10-06 11:11:16 +02:00
|
|
|
lsfd_sources = files (
|
|
|
|
'lsfd.c',
|
|
|
|
'lsfd.h',
|
|
|
|
'lsfd-filter.h',
|
|
|
|
'lsfd-filter.c',
|
2021-11-01 04:52:48 +09:00
|
|
|
'lsfd-counter.h',
|
|
|
|
'lsfd-counter.c',
|
lsfd: use constants defined in asm/fctl.h flags field of a fdinfo
Close #1709.
The original code decoded the field using constants defined in
/usr/include/fcntl.h. The constants defined in /usr/include/fcntl.h
was suitable for passing to the kernel as a part of arguments of
system calls like open(2). However, they were not suitable for
decoding the field.
Let's think about decoding 0300000 in
$ cat /proc/157067/fdinfo/3
pos: 0
flags: 0300000
$ lsfd -p 157067 -o+flags -Q -Q 'ASSOC == "3"'
COMMAND PID USER ASSOC MODE TYPE SOURCE MNTID INODE NAME FLAGS
test_mkfds 125128 jet 3 r-- DIR dm-0 96 96 / ???????????????????
The decoded string is printed at ???????????????????.
Quoted from /usr/include/bits/fcntl-linux.h:
#ifndef __O_LARGEFILE
# define __O_LARGEFILE 0100000
#endif
#ifndef __O_DIRECTORY
# define __O_DIRECTORY 0200000
#endif
#ifndef __O_TMPFILE
# define __O_TMPFILE (020000000 | __O_DIRECTORY)
#endif
...
#ifdef __USE_XOPEN2K8
# define O_DIRECTORY __O_DIRECTORY /* Must be a directory. */
...
#endif
...
#ifdef __USE_LARGEFILE64
# define O_LARGEFILE __O_LARGEFILE
#endif
With these constants, 0300000 is decoded as "directory,_tmpfile" or
"largefile,directory,_tmpfile".
Unexpectedly the decoded string has "_tmpfile".
It has "largefile" only when we define __USE_LARGEFILE64 when building
lsfd though it should have "largefile" always.
Quoted from /usr/include/asm-generic/fcntl.h:
#ifndef O_LARGEFILE
#define O_LARGEFILE 00100000
#endif
#ifndef O_DIRECTORY
#define O_DIRECTORY 00200000 /* must be a directory */
#endif
#ifndef __O_TMPFILE
#define __O_TMPFILE 020000000
#endif
The decoded string is "largefile,directory". It doesn't depend on
__USE_LARGEFILE64.
This change adds lsfd-decode-file-flags.c, a new small and isolated
source file, in which lsfd_decode_file_flags(), the function for
decoding the field is defined.
include/c.h includes /usr/include/fcntl.h. Almost all lsfd related
source files includes include/c.h indirectly. On the other hand,
lsfd-decode-file-flags.c includes only /usr/include/asm-generic/fcntl.h
or /usr/include/asm/fcntl.h. So the function can decode the field
expectedly.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2022-06-09 00:32:19 +09:00
|
|
|
'lsfd-decode-file-flags.c',
|
2021-10-06 11:11:16 +02:00
|
|
|
'lsfd-file.c',
|
|
|
|
'lsfd-cdev.c',
|
|
|
|
'lsfd-bdev.c',
|
|
|
|
'lsfd-sock.c',
|
2022-09-21 05:25:49 +09:00
|
|
|
'lsfd-sock.h',
|
|
|
|
'lsfd-sock-xinfo.c',
|
2021-10-06 11:11:16 +02:00
|
|
|
'lsfd-unkn.c',
|
|
|
|
'lsfd-fifo.c',
|
|
|
|
)
|
|
|
|
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
uuidgen_sources = files(
|
|
|
|
'uuidgen.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
uuidparse_sources = files(
|
|
|
|
'uuidparse.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
uuidd_sources = files(
|
|
|
|
'uuidd.c',
|
|
|
|
) + \
|
|
|
|
monotonic_c + \
|
|
|
|
timer_c
|
|
|
|
|
|
|
|
test_uuidd_sources = files(
|
|
|
|
'test_uuidd.c',
|
|
|
|
)
|
|
|
|
|
2022-04-12 15:29:06 +05:00
|
|
|
if build_uuidd and systemd.found()
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
uuidd_service = configure_file(
|
|
|
|
input : 'uuidd.service.in',
|
|
|
|
output : 'uuidd.service',
|
|
|
|
configuration : conf)
|
|
|
|
install_data(
|
|
|
|
uuidd_service,
|
|
|
|
install_dir : systemdsystemunitdir)
|
|
|
|
|
|
|
|
uuidd_socket = configure_file(
|
|
|
|
input : 'uuidd.socket.in',
|
|
|
|
output : 'uuidd.socket',
|
|
|
|
configuration : conf)
|
|
|
|
install_data(
|
|
|
|
uuidd_socket,
|
|
|
|
install_dir : systemdsystemunitdir)
|
|
|
|
endif
|
2022-12-18 18:42:04 +00:00
|
|
|
if build_uuidd and sysvinit
|
|
|
|
uuidd_rc = configure_file(
|
|
|
|
input : 'uuidd.rc.in',
|
|
|
|
output : 'uuidd.rc',
|
|
|
|
configuration : conf)
|
|
|
|
install_data(
|
|
|
|
uuidd_rc,
|
|
|
|
install_mode : 'rwxr-xr-x',
|
|
|
|
install_dir : sysvinitrcdir)
|
|
|
|
endif
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
|
|
|
|
blkid_sources = files(
|
|
|
|
'blkid.c',
|
2021-02-16 18:09:24 +01:00
|
|
|
) + \
|
|
|
|
ismounted_c
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
|
|
|
|
findfs_sources = files(
|
|
|
|
'findfs.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
wipefs_sources = files(
|
|
|
|
'wipefs.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
findmnt_sources = files(
|
|
|
|
'findmnt.c',
|
|
|
|
'findmnt-verify.c',
|
|
|
|
'findmnt.h',
|
|
|
|
)
|
|
|
|
|
|
|
|
kill_sources = files(
|
|
|
|
'kill.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
rename_sources = files(
|
|
|
|
'rename.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
getopt_sources = files(
|
|
|
|
'getopt.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
install_data(
|
2021-02-16 18:09:24 +01:00
|
|
|
'getopt-example.bash',
|
|
|
|
'getopt-example.tcsh',
|
2021-12-30 16:33:33 +01:00
|
|
|
install_dir : docdir,
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
install_mode: 'rwxr-xr-x')
|
|
|
|
|
|
|
|
fincore_sources = files(
|
|
|
|
'fincore.c',
|
|
|
|
)
|
|
|
|
|
|
|
|
hardlink_sources = files(
|
|
|
|
'hardlink.c',
|
2021-03-17 15:42:26 +01:00
|
|
|
) + \
|
2021-11-02 15:48:38 +01:00
|
|
|
monotonic_c + \
|
|
|
|
fileeq_c
|
meson: add second build system
To build: meson build && ninja -C build
To run tests: ninja -C build check
To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install
To install for realz: sudo ninja -C build install
v2:
- Optional items are now based on the 'feature' feature in meson.
Built libraries which are disabled turn into disabler() objects
and also poison any executables which link to them.
What is there:
- building of the binaries and libs and the python module
- installation of binaries, libs, python module, localization files,
man pages, pkgconfig files
- running of tests
- most options to configure build equivalently to the
./configure settings
Partially implemented:
- disabling of stuff when things missing. In the C code, the defines
are all used, so that should be fine. In the build system, some
files should be skipped, but that is probably not always done properly.
Getting this right might require some testing of various build option
combinations to get the details right.
Not implemented:
- static builds of fdisk and other binaries
- things marked with XXX or FIXME
- ???
Differences:
- .la files are not created. They are useless and everybody hates them.
- Requires.private in pkgconfig files are not present in the
autogenerated .pc file. Not sure if they should be there or not. If
necessary, they can be added by hand.
- man pages and systemd units are installed by the install target. Not
sure why 'make install' doesn't do that.
- the split between / and /usr is probably wrong. But it's all pointless
anyway, so maybe we could simplify things but not implementing it at
all under meson?
2020-02-23 19:42:55 +01:00
|
|
|
|
|
|
|
cal_sources = files(
|
|
|
|
'cal.c',
|
|
|
|
)
|
2022-04-11 22:59:27 -06:00
|
|
|
|
|
|
|
pipesz_sources = files(
|
|
|
|
'pipesz.c',
|
|
|
|
)
|
2022-09-24 07:10:51 +09:00
|
|
|
|
|
|
|
fadvise_sources = files(
|
|
|
|
'fadvise.c',
|
|
|
|
)
|
2022-12-24 04:27:04 +00:00
|
|
|
|
|
|
|
waitpid_sources = files(
|
|
|
|
'waitpid.c',
|
|
|
|
)
|