Skip to content

Commit 115e005

Browse files
rdmarkandylemin
authored andcommitted
meson: error out if no writable CNID backend selected for compilation, GitHub #2449
Since the last backend is read-only, we want to error out rather than automatically selecting it as the default CNID backend in the absence of any other backend You can still force the last backend as default with -Dwith-cnid-default-backend if you absolutely want to (but I cannot see when this would be useful) This effectively introduces a hard build dependency on at least one of the three database libraries: bdb, mysql, or sqlite
1 parent 298ce48 commit 115e005

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ These are the libraries that are hard requirements for netatalk.
5050

5151
### CNID Backend Requirements
5252

53-
One or more of the below is required to build the respective CNID backend.
53+
At least one CNID backend is required for netatalk to function.
5454

5555
| Package | Backend | Details |
5656
|--------------|---------|---------|

doc/manual/Installation.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,26 @@ packages that can be installed to enhance Netatalk's functionality.
7676

7777
#### CNID database backends
7878

79-
At least one of the below database libraries is required
80-
to power the CNID scheme of your choice.
81-
Without one of these, only the *last* backend will be available
82-
which operates in read-only mode and therefore not recommended
83-
for daily use.
79+
At least one of the below database libraries is required to power the CNID scheme of your choice.
8480

8581
- Berkeley DB
8682

87-
The default dbd CNID backend for netatalk uses Berkeley DB to store
88-
unique file identifiers. At the time of writing you need at least
89-
version 4.6.
83+
The default *dbd* (*Database Daemon*) CNID backend for netatalk uses Berkeley DB to store
84+
unique file identifiers.
9085

91-
The recommended version is 5.3, the final release under the permissive
92-
Sleepycat license, and therefore the most widely distributed version.
86+
The recommended Berekeley DB version is 5.3, while versions 4.6 and later should work as well.
87+
Version 6 and later should generally be avoided due to licensing issues.
9388

94-
- MySQL or MariaDB
89+
- MySQL Client or MariaDB Client
9590

9691
By leveraging a MySQL-compatible client library, netatalk can be built
97-
with a MySQL CNID backend that is highly scalable and reliable.
92+
with the *mysql* CNID backend that is highly scalable and reliable.
9893
The administrator has to provide a separate database instance for use with
9994
this backend.
10095

10196
- SQLite v3
10297

103-
The SQLite library version 3 enables the SQLite CNID backend
98+
The SQLite library version 3 enables the *sqlite* CNID backend
10499
which is an alternative zero-configuration backend.
105100

106101
### Optional third-party software

meson.build

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,9 @@ if default_backend == ''
623623
elif use_mysql_backend
624624
default_backend = 'mysql'
625625
elif use_last_backend
626-
default_backend = 'last'
626+
error(
627+
'No writable CNID backend selected for compilation; need at least one of dbd, sqlite or mysql',
628+
)
627629
else
628630
error('No CNID backends selected for compilation')
629631
endif

0 commit comments

Comments
 (0)