From 531039d15c3fe34fcd373d0923e0c7a34786c58c Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Wed, 21 Sep 2022 09:33:56 -0700 Subject: Use meson as the main build system (#365) * Build: Add an iscsiuio 'build_date.sh' script This is currently unused, but will be used by meson to build the "build_date.[ch]" files used by iscsiuio. * Build: have git ignore file '.setup' I commonly use this file for shell aliases/functions. * Add framework to support building using meson. This adds the ability to use meson/ninja to build open-iscsi and iscsiuio, rather than the current system that uses 'autoconf' for iscsiuio and uses 'make' for everything else. The old make/autoconf system is left in place, for now, but deprecated, including a warning about that when running 'make all' or 'make user' from the top-level. * utils/build: enhance iscsi-iname to generate prefix Added new "-g/--generate-iname-prefix" argument to generate the InitiatorName= prefix. Also, updated iscsi-iname to use getopts. Also, use the new option from meson. * git/meson: remove 'builddir' from ignored files The build directory can be called anything. Suggested by: Eli Schwartz * iscsiuio build: fix new build_date.sh script Fixed several issues: - fix option handling for "-S" - fix epoch date handling from env (noticed by Eli Schwartz) - remove debug statements * iscsiuio meson: warn when not creating a symlink for iscsiuio * meson: install man pages more efficiently We don't need to specify path or subdirectory * iscsiuio meson: remove unused source date epoch option This option was never used, since we pass this info from the environment. * meson: no need to set libdir: default is fine * iscsiuio meson: no need to add c_args: already there * Don't generate initiatorname when cross-building (#367) Let it be generated by the iscsi-init service. Signed-off-by: TIAN Yuanhao * Set ISCSI_CONFIG_ROOT by meson Signed-off-by: TIAN Yuanhao * Set LOCK_DIR from home_dir to lock_dir Signed-off-by: TIAN Yuanhao * Install iface.example to db_root/ifaces Signed-off-by: TIAN Yuanhao Signed-off-by: TIAN Yuanhao Co-authored-by: TIAN Yuanhao <78596099+tianyuanhao@users.noreply.github.com> Co-authored-by: TIAN Yuanhao --- meson_options.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 meson_options.txt (limited to 'meson_options.txt') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..b76f044 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,20 @@ +# options for meson build system +option('systemddir', type: 'string', value: '/usr/lib/systemd', + description: 'Systemd directory [/usr/lib/systemd], if systemd used') +option('no_systemd', type: 'boolean', value: false, + description: 'Do not use systemd') +option('source_date_epoch', type: 'string', value: 'NONE', + description: 'Set the Build Source Date (for iscsiuio), for repeatable builds') +# these are in the 'sysconfigdir' (/etc by default) unless overridden +option('homedir', type: 'string', value: 'iscsi', + description: 'Set the HOME directory [/etc/iscsi]') +option('dbroot', type: 'string', value: 'iscsi', + description: 'Set the DATABASE root directory [/etc/iscsi]') +option('lockdir', type: 'string', value: '/run/lock/iscsi', + description: 'Set the LOCK_DIR directory [/run/lock/iscsi]') +option('rulesdir', type: 'string', value: 'udev/rules.d', + description: 'Set the directory where udev rules go [/etc/udev/rules.d]') +# to be able to put binaries in /sbin or /usr/sbin, since +# older version of meson do not allow overriding sbindir +option('iscsi_sbindir', type: 'string', value: '/usr/sbin', + description: 'Set the directory where our binaries go [/usr/sbin]') -- cgit v1.2.1