Skip to contentSkip to conversation

Document and Generate ofono.conf(5)

PATCH New Grant Erickson 1 participant 4 messages Feb 6, 2025 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Document and Generate ofono.conf(5)

This adds documentation for and auto-generates ofono.conf(5).

Grant Erickson (3):
doc: Initial revision of 'ofono.conf.5.in'.
doc: Add SEE ALSO reference to ofono.conf(5).
build: Add variables and rules for generating ofono.conf(5).

 Makefile.am         | 11 ++++++++++-
 doc/ofono.conf.5.in | 37 +++++++++++++++++++++++++++++++++++++
 doc/ofonod.8        |  3 ++-
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 doc/ofono.conf.5.in
Signature · 1 line
2.45.0
#1 lore raw

PATCH 1/3 doc: Initial revision of 'ofono.conf.5.in'.

Initial revision.

---
 doc/ofono.conf.5.in | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 doc/ofono.conf.5.in
doc/ofono.conf.5.in new file +37 -0
new file mode 100644
index 000000000000..7ce2941ed53e
@@ -0,0 +1,37 @@
+.\" ofono.conf(5) manual page
+.\"
+.\" Copyright (C) 2025 The oFono Authors
+.\"
+.TH "ofono.conf" "5" "2025-02-05" ""
+.SH NAME
+main.conf \- oFono configuration file
+.SH SYNOPSIS
+.B @sysconfdir@/ofono/main.conf
+.SH DESCRIPTION
+.P
+.B main.conf
+is a configuration file for oFono. The configuration file is
+optional but it can be used to set up various aspects of oFono's
+behavior. The location of the file may be changed through use of
+the \fB\-\-config= \fRargument for \fBofonod\fP(8).
+.SH "FILE FORMAT"
+.P
+The configuration file consists of sections (groups) of key-value pairs.
+Lines beginning with a '#' and blank lines are considered comments.
+Sections are started by a header line containing the section enclosed
+in '[' and ']', and ended implicitly by the start of the next section
+or the end of the file. Each key-value pair must be contained in a section.
+.P
+Description of sections and available keys follows:
+.SS [Provision]
+This section is an optional section of the configuration file that
+influences the behavior of Cellular network provisioning.
+.TP
+.BI TagsFilter= tag\fR[,...]
+One or more tag strings to help filter and downselect the desired
+Cellular access point name(s) (APN(s)) when provisioning and/or
+attaching to the network when multiple such APNs exist for a given
+Cellular home network identity (HNI) (that is, mobile country code
+(MCC) + mobile network code (MNC) pair).
+.SH "SEE ALSO"
+.BR ofonod (8)
Signature · 1 line
2.45.0
#2 lore raw

PATCH 2/3 doc: Add SEE ALSO reference to ofono.conf(5).

In reply to Grant Erickson

Add a "SEE ALSO" reference to the newly-added ofono.conf manual reference page.

---
 doc/ofonod.8 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
doc/ofonod.8 +2 -1
index 7bb908cba272..d6164116200c 100644
@@ -28,7 +28,8 @@ Don't run as daemon in background.
 .TP
 .SH SEE ALSO
 .PP
-\&\fIdbus-send\fR\|(1)
+.BR ofono.conf (5), \c
+.BR \ dbus-send (1)
 
 .SH FILES
 .BR /etc/dbus-1/system.d/ofono.conf
Signature · 1 line
2.45.0
#3 lore raw

PATCH 3/3 build: Add variables and rules for generating ofono.conf(5).

In reply to Grant Erickson

This adds variables and rules for auto-generating ofono.conf.5 from ofono.conf.5.in.

---
 Makefile.am | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Makefile.am +10 -1
index 2d198f52a4a0..8ca4eaf16dd5 100644
@@ -832,10 +832,12 @@ endif
 EXTRA_DIST = src/genbuiltin plugins/ofono.rules plugins/ofono-speedup.rules \
 		tools/provisiontool \
 		data/provision.json unit/test-provision.json \
+		doc/ofono.conf.5.in \
 		$(doc_files) $(test_scripts)
 
-dist_man_MANS = doc/ofonod.8
+MANUAL_PAGES = doc/ofono.conf.5 doc/ofonod.8
 
+dist_man_MANS = $(MANUAL_PAGES)
 
 unit_objects =
 
@@ -1038,6 +1040,13 @@ src/builtin.h: src/genbuiltin config.status
 plugins/%.rules:
 	$(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@
 
+do_subst = $(AM_V_GEN)$(SED) \
+		-e 's,[@]sysconfdir[@],$(sysconfdir),g'
+
+%.5 : %.5.in
+	$(AM_V_at)$(MKDIR_P) $(dir $@)
+	$(do_subst) < $< > $@
+
 include/ofono/version.h: include/version.h
 	$(AM_V_at)$(MKDIR_P) include/ofono
 	$(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
Signature · 1 line
2.45.0