Bug 6955
| Summary: | add more fields in man - see also | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Mike Lykov <combr> |
| Component: | alternatives | Assignee: | placeholder <placeholder> |
| Status: | NEW --- | QA Contact: | qa-sisyphus |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | at, glebfm, ldv, placeholder |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
Подтверждается на alternatives 0.5.3-alt1: страницы alternatives(7) в пакете нет, хотя все alternatives-*(1) ссылаются на неё в SEE ALSO (doc/*.1.inc), поэтому `man alternatives` ничего не находит.
Патч: doc/alternatives.7 (обзор подсистемы по README — утилиты, формат конфига, файлы, SEE ALSO на все alternatives-*(1)) и установка в Makefile; в спеке нужно добавить `%_man7dir/*` в %files. Применяется к alternatives-0.5.3.tar, рендеринг groff -man проверен.
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ SBINDIR=/usr/sbin
DATADIR=/usr/share/alternatives
MANDIR = /usr/share/man
MAN1DIR = $(MANDIR)/man1
+MAN7DIR = $(MANDIR)/man7
ALTDIR = /etc/alternatives
HELP2MAN1 = help2man -N -s1
@@ -40,6 +41,7 @@ TOUCH_R = touch -r
LIBRARY=list.awk validate.awk functions
PROGRAMS=list manual auto update validate
MAN1PAGES = $(PROGRAMS:%=alternatives-%.1)
+MAN7PAGES = doc/alternatives.7
TARGETS= functions $(MAN1PAGES)
.PHONY: all install install-bin install-lib clean
@@ -63,6 +65,8 @@ install-lib:
install-man:
$(MKDIR_P) -m755 $(DESTDIR)$(MAN1DIR)
$(INSTALL) -p -m644 $(MAN1PAGES) $(DESTDIR)$(MAN1DIR)/
+ $(MKDIR_P) -m755 $(DESTDIR)$(MAN7DIR)
+ $(INSTALL) -p -m644 $(MAN7PAGES) $(DESTDIR)$(MAN7DIR)/
install-cfg:
$(INSTALL) -d $(DESTDIR)$(ALTDIR)/{auto,packages.d,links}
--- /dev/null
+++ b/doc/alternatives.7
@@ -0,0 +1,90 @@
+.TH ALTERNATIVES 7 "2026-09-09" "alternatives" "ALT Linux"
+.SH NAME
+alternatives \- ALT Linux alternatives subsystem
+.SH DESCRIPTION
+It is possible for several programs fulfilling the same or similar
+functions to be installed on a single system at the same time; for
+example, several text editors.
+The alternatives system lets one
+.I generic name
+in the filesystem (say,
+.IR /usr/bin/editor )
+be shared by all files providing interchangeable functionality.
+The subsystem and the system administrator together determine which
+actual file is referenced by the generic name.
+.PP
+Unlike Debian's
+.BR update-alternatives (1),
+the ALT Linux implementation keeps no private database.
+Every package that provides a candidate installs a small config file into
+.I /etc/alternatives/packages.d/
+and the symlinks are (re)built from these files by
+.BR alternatives-update (1),
+which is run automatically by an rpm file trigger whenever such a config
+is installed or removed.
+Each alternative is, at any given time, in one of two modes:
+.B auto
+(the candidate with the greatest weight wins) or
+.B manual
+(the administrator's choice is kept until explicitly changed).
+.SH UTILITIES
+.TP
+.BR alternatives-list (1)
+show the current state of the alternatives (which candidate every generic
+name points to).
+.TP
+.BR alternatives-manual (1)
+switch an alternative into manual mode and select a candidate.
+.TP
+.BR alternatives-auto (1)
+switch an alternative back into auto mode.
+.TP
+.BR alternatives-update (1)
+rebuild the symlinks according to the installed configs and the manual
+settings.
+.TP
+.BR alternatives-validate (1)
+check the installed configs for errors.
+.SH CONFIG FILE FORMAT
+A config file consists of lines with three tab-separated fields:
+.PP
+.RS
+.I generic-name
+.I candidate
+.IR "weight " | " master-generic-name"
+.RE
+.PP
+A candidate whose third field is a number is a
+.I master
+alternative; the greatest weight wins in auto mode.
+A candidate whose third field names another generic name is a
+.I slave
+of that master and follows it, for example:
+.PP
+.RS
+.nf
+/usr/bin/links /usr/bin/links1 10
+/usr/share/man/man1/links.1.gz /usr/share/man/man1/links1.1.gz /usr/bin/links1
+.fi
+.RE
+.SH FILES
+.TP
+.I /etc/alternatives/packages.d/
+configs installed by packages
+.TP
+.I /etc/alternatives/manual
+list of alternatives in manual mode
+.TP
+.I /etc/alternatives/links/
+internal directory with the symlinks to the selected candidates
+.TP
+.I /usr/share/alternatives/
+helper functions and scripts
+.SH SEE ALSO
+.BR alternatives-list (1),
+.BR alternatives-manual (1),
+.BR alternatives-auto (1),
+.BR alternatives-update (1),
+.BR alternatives-validate (1).
+.PP
+.I /usr/share/doc/alternatives-*/README
|

Description
Mike Lykov 2005-05-27 11:05:41 MSD