Обновление сборки пакета с учетом патчей для директорий Solus и русскоязычная документация
All checks were successful
Build / Build project (push) Successful in 45s
All checks were successful
Build / Build project (push) Successful in 45s
This commit is contained in:
parent
05de1a42ee
commit
5ea5af514e
8 changed files with 1257 additions and 6 deletions
102
files/patches/0001-stateless.patch
Normal file
102
files/patches/0001-stateless.patch
Normal file
|
@ -0,0 +1,102 @@
|
|||
diff --git a/include/libisns/paths.h.in b/include/libisns/paths.h.in
|
||||
index c28a3fa..6c585e8 100644
|
||||
--- a/include/libisns/paths.h.in
|
||||
+++ b/include/libisns/paths.h.in
|
||||
@@ -21,4 +21,19 @@
|
||||
|
||||
#define ISCSI_DEFAULT_INITIATORNAME "/etc/iscsi/initiatorname.iscsi"
|
||||
|
||||
+/*
|
||||
+ * From: Alexander Zhirov <azhirov1991@gmail.com>
|
||||
+ * Date: Wed, 07 May 2025 17:29:43 +0300
|
||||
+ * Subject: The default paths to the configuration files have been changed.
|
||||
+ */
|
||||
+
|
||||
+#define ISNS_STATELESS_PATH "/usr/share/defaults"
|
||||
+#define ISNS_STATELESS_ISNSD_CONFIG ISNS_STATELESS_PATH ISNS_ETCDIR "/isnsd.conf"
|
||||
+#define ISNS_STATELESS_ISNSDD_CONFIG ISNS_STATELESS_PATH ISNS_ETCDIR "/isnsdd.conf"
|
||||
+#define ISNS_STATELESS_ISNSADM_CONFIG ISNS_STATELESS_PATH ISNS_ETCDIR "/isnsadm.conf"
|
||||
+
|
||||
+// `isns.registry` is dynamic configuration file -> /etc/isns/isns.registry
|
||||
+
|
||||
+#define ISCSI_STATELESS_INITIATORNAME ISNS_STATELESS_PATH ISCSI_DEFAULT_INITIATORNAME
|
||||
+
|
||||
#endif /* ISNS_CONFIG_H */
|
||||
diff --git a/isnsadm.c b/isnsadm.c
|
||||
index 40a1a46..853779a 100644
|
||||
--- a/isnsadm.c
|
||||
+++ b/isnsadm.c
|
||||
@@ -97,6 +97,9 @@ main(int argc, char **argv)
|
||||
isns_security_t *security = NULL;
|
||||
int c, status;
|
||||
|
||||
+ if (access(opt_configfile, R_OK) != 0)
|
||||
+ opt_configfile = ISNS_STATELESS_ISNSADM_CONFIG;
|
||||
+
|
||||
while ((c = getopt_long(argc, argv, "46Cc:d:hK:k:ls:Vr", options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case '4':
|
||||
@@ -176,7 +179,10 @@ main(int argc, char **argv)
|
||||
/*
|
||||
* Try to read the source name from open-iscsi configuration
|
||||
*/
|
||||
- isns_read_initiatorname(ISCSI_DEFAULT_INITIATORNAME);
|
||||
+ const char *iscsi_default_initiatorname = ISCSI_DEFAULT_INITIATORNAME;
|
||||
+ if (access(iscsi_default_initiatorname, R_OK) != 0)
|
||||
+ iscsi_default_initiatorname = ISCSI_STATELESS_INITIATORNAME;
|
||||
+ isns_read_initiatorname(iscsi_default_initiatorname);
|
||||
}
|
||||
|
||||
isns_init_names();
|
||||
diff --git a/isnsd.c b/isnsd.c
|
||||
index 4031b51..0855a44 100644
|
||||
--- a/isnsd.c
|
||||
+++ b/isnsd.c
|
||||
@@ -64,6 +64,9 @@ main(int argc, char **argv)
|
||||
mtrace();
|
||||
#endif
|
||||
|
||||
+ if (access(opt_configfile, R_OK) != 0)
|
||||
+ opt_configfile = ISNS_STATELESS_ISNSD_CONFIG;
|
||||
+
|
||||
while ((c = getopt_long(argc, argv, "46c:d:fh", options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case '4':
|
||||
@@ -116,7 +119,10 @@ main(int argc, char **argv)
|
||||
* Try to read the source name from open-iscsi configuration,
|
||||
* using the default iniatiator name
|
||||
*/
|
||||
- isns_read_initiatorname(ISCSI_DEFAULT_INITIATORNAME);
|
||||
+ const char *iscsi_default_initiatorname = ISCSI_DEFAULT_INITIATORNAME;
|
||||
+ if (access(iscsi_default_initiatorname, R_OK) != 0)
|
||||
+ iscsi_default_initiatorname = ISCSI_STATELESS_INITIATORNAME;
|
||||
+ isns_read_initiatorname(iscsi_default_initiatorname);
|
||||
}
|
||||
|
||||
isns_init_names();
|
||||
diff --git a/isnsdd.c b/isnsdd.c
|
||||
index c2f42d7..872ee4a 100644
|
||||
--- a/isnsdd.c
|
||||
+++ b/isnsdd.c
|
||||
@@ -105,6 +105,9 @@ main(int argc, char **argv)
|
||||
mtrace();
|
||||
#endif
|
||||
|
||||
+ if (access(opt_configfile, R_OK) != 0)
|
||||
+ opt_configfile = ISNS_STATELESS_ISNSDD_CONFIG;
|
||||
+
|
||||
while ((c = getopt_long(argc, argv, "46c:d:Efhr:", options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case '4':
|
||||
@@ -178,7 +181,10 @@ main(int argc, char **argv)
|
||||
/*
|
||||
* Try to read the source name from open-iscsi configuration
|
||||
*/
|
||||
- isns_read_initiatorname(ISCSI_DEFAULT_INITIATORNAME);
|
||||
+ const char *iscsi_default_initiatorname = ISCSI_DEFAULT_INITIATORNAME;
|
||||
+ if (access(iscsi_default_initiatorname, R_OK) != 0)
|
||||
+ iscsi_default_initiatorname = ISCSI_STATELESS_INITIATORNAME;
|
||||
+ isns_read_initiatorname(iscsi_default_initiatorname);
|
||||
}
|
||||
|
||||
isns_init_names();
|
69
files/patches/0002-fix-paths-man-pages.patch
Normal file
69
files/patches/0002-fix-paths-man-pages.patch
Normal file
|
@ -0,0 +1,69 @@
|
|||
diff --git a/doc/isns_config.5 b/doc/isns_config.5
|
||||
index 1f28a5e..1fa8167 100644
|
||||
--- a/doc/isns_config.5
|
||||
+++ b/doc/isns_config.5
|
||||
@@ -2,10 +2,16 @@
|
||||
.SH NAME
|
||||
isns_config - iSNS configuration file
|
||||
.SH SYNOPSIS
|
||||
+.B /usr/share/defaults/etc/isns/isnsadm.conf
|
||||
+or
|
||||
.B /etc/isns/isnsadm.conf
|
||||
.br
|
||||
+.B /usr/share/defaults/etc/isns/isnsd.conf
|
||||
+or
|
||||
.B /etc/isns/isnsd.conf
|
||||
.br
|
||||
+.B /usr/share/defaults/etc/isns/isnsdd.conf
|
||||
+or
|
||||
.B /etc/isns/isnsdd.conf
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -64,6 +70,8 @@ key.
|
||||
.IP
|
||||
If left empty, the source name is derived from either from the default
|
||||
initiatorname in
|
||||
+.BR /usr/share/defaults/etc/iscsi/initiatorname.iscsi
|
||||
+or
|
||||
.BR /etc/iscsi/initiatorname.iscsi
|
||||
or, failing that, the client's hostname using the
|
||||
.BR IQNPrefix
|
||||
diff --git a/doc/isnsadm.8 b/doc/isnsadm.8
|
||||
index 1980448..8f2e0a8 100644
|
||||
--- a/doc/isnsadm.8
|
||||
+++ b/doc/isnsadm.8
|
||||
@@ -48,6 +48,8 @@ By default,
|
||||
.B isnsadm
|
||||
will take most of its settings from the configuration
|
||||
file
|
||||
+.BR /usr/share/defaults/etc/isns/isnsadm.conf
|
||||
+or
|
||||
.BR /etc/isns/isnsadm.conf ,
|
||||
with the exception of the following options:
|
||||
.TP
|
||||
diff --git a/doc/isnsd.8 b/doc/isnsd.8
|
||||
index 84b3913..03a7adc 100644
|
||||
--- a/doc/isnsd.8
|
||||
+++ b/doc/isnsd.8
|
||||
@@ -20,6 +20,8 @@ By default,
|
||||
.B isnsd
|
||||
will take most of its settings from the configuration
|
||||
file
|
||||
+.BR /usr/share/defaults/etc/isns/isnsd.conf
|
||||
+or
|
||||
.BR /etc/isns/isnsd.conf ,
|
||||
with the exception of the following options:
|
||||
.TP
|
||||
diff --git a/doc/isnsdd.8 b/doc/isnsdd.8
|
||||
index 6088e28..5b07f07 100644
|
||||
--- a/doc/isnsdd.8
|
||||
+++ b/doc/isnsdd.8
|
||||
@@ -25,6 +25,8 @@ By default,
|
||||
.B isnsd
|
||||
will take most of its settings from the configuration
|
||||
file
|
||||
+.BR /usr/share/defaults/etc/isns/isnsdd.conf
|
||||
+or
|
||||
.BR /etc/isns/isnsdd.conf ,
|
||||
with the addition of the following command line options:
|
||||
.TP
|
Loading…
Add table
Add a link
Reference in a new issue