Skip to content

Commit 5f072e8

Browse files
pmatilaidmnks
authored andcommitted
Convert + rename philosophy.md to rpm-design(7) man page
Fixes: #3623
1 parent 88a0297 commit 5f072e8

File tree

3 files changed

+168
-171
lines changed

3 files changed

+168
-171
lines changed

docs/man/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(core
55
rpm-macrofile.5 rpm-config.5 rpm-rpmrc.5 rpm-setup-autosign.1
66
rpm-payloadflags.7 rpmbuild-config.5 rpm-queryformat.7 rpm-macros.7
77
rpm-lua.7 rpm-manifest.5 rpm-version.7 rpm-dependency-generators.7
8-
rpm-scriptlets.7
8+
rpm-scriptlets.7 rpm-design.7
99
)
1010
set(extra
1111
rpm-plugins.8 rpm-plugin-prioreset.8 rpm-plugin-syslog.8

docs/man/rpm-design.7.scd

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
RPM-DESIGN(7)
2+
3+
# NAME
4+
rpm-design - RPM design philosophy
5+
6+
# DESCRIPTION
7+
RPM is a general purpose software manager. It has
8+
two major parts: rpmbuild that combines upstream sources with a meta
9+
data and build instructions in a "spec file" and additional files and
10+
patches. It allows to bundle all this up into a source package and
11+
build the software into a binary package. The second part - the rpm
12+
utility - can then install, update or remove the packages after
13+
checking for consistency.
14+
15+
## Design goals
16+
- General purpose software management
17+
- Building from pristine sources
18+
- Unattended operation
19+
- for building packages
20+
- for installing/updating/deleting packages
21+
- Reproducibility of builds and installs
22+
- Verifiability of packages and installed software
23+
24+
## General purpose software management
25+
RPM differs from special purpose package managers - like those
26+
targeting a specific programming language - in trying to not make
27+
assumptions about how software looks like or gets packaged. Packaging
28+
software can be messy and RPM accommodates for that.
29+
30+
It still offers help to create a POSIX-like operation system. Macros
31+
parameterize locations to make the build instructions more generic and
32+
more easily transferable between distributions. Nevertheless RPM
33+
packages are targeting a specific distribution (and release thereof). They are
34+
typically not suited to be installed or even built elsewhere without
35+
tweaking. RPM acknowledges that different distributions have
36+
different goals, resulting in different design decisions. The
37+
specifics of the packages often reflect these.
38+
39+
RPM as a upstream project still tries to keep distributions from
40+
diverging unnecessarily but is aware that these differences are the
41+
reason distributions exist in the first place.
42+
43+
## Rolling out (security) updates quickly
44+
Getting updates installed quickly is one of the main design
45+
goals. Many features and following design decisions are supporting
46+
this goal.
47+
48+
## Packaging dependencies separately
49+
Libraries should be packaged separately and binaries should link to
50+
the version provided by system packages. Static linking is
51+
discouraged. This limits the number of packages that need updates or
52+
re-builds in case of a vulnerability.
53+
54+
## Unattended operation
55+
Package installation and update is unattended and must not require
56+
user interaction. This allows automatically installing security - and
57+
other - updates.
58+
59+
Building the packages also runs unattended. This prevents user input
60+
from changing the output but also makes rebuilding packages - e.g. for
61+
changed dependencies - possible at large scale.
62+
63+
## Clear update path
64+
Each package name creates an update path where packages with the same
65+
name and a newer version (technically Epoch-Version-Release) are an
66+
update for the packages with lower version. Packages are not allowed
67+
to make assumptions on what intermediate packages were installed or
68+
not.
69+
70+
## Bundle Sources, Changes and Build instructions together
71+
Source packages bundle upstream sources, patches and build
72+
instructions into one entity. If changes need to be made everything
73+
needed is available, including a list of packages needed to run the
74+
build.
75+
76+
## Separate Upstream Source from Patches
77+
Source packages are supposed to contain the unaltered upstream sources
78+
in a way that their checksum can be checked. All changes can be done
79+
by applying patches or running build scripts. This makes it easy to
80+
understand what the packager did to the software. This is important to
81+
be able to figure out where issues arise from and to see which issues
82+
are fixed in the package - even if the upstream version is still
83+
vulnerable.
84+
85+
## Support backporting fixes
86+
A distribution often has a different approach to fixing software from an
87+
upstream project. Upstream projects are often content with fixing
88+
their latest release(s). Distribution often support a particular
89+
version of each software and need those to be fixed. The Sources and
90+
Patches approach makes handling this a lot easier (although it is
91+
lately being extended with the use of version control like *git*(1)).
92+
93+
## Allow 3rd party packages
94+
Although RPM is designed to package a whole distribution it explicitly
95+
supports 3rd parties to also provide packages without becoming part of
96+
the distribution and their processes.
97+
98+
Rpmbuild can be run locally without the use of a big build
99+
system. Dependencies are in large part automatic and target libraries
100+
inside the packages instead of relying on conventions like package
101+
names. This way 3rd party packages can be checked for compatibility
102+
beyond them just claiming that they target the distribution in question.
103+
104+
For proprietary softerware nosource packages allow to not ship the
105+
sources but only the build instructions to keep proprietary source
106+
private. They still can be used to generate binary packages in
107+
combination with the sources.
108+
109+
## Handle all system files
110+
RPM takes ownership of all system files and their life cycle. While
111+
packages can copy files in their scriptlets at installation time this
112+
is strongly discouraged. Even files that are not actually shipped can
113+
be added to the package as *%ghost* files to allow RPM to handle
114+
them. All system files and directories should be owned by a package.
115+
116+
Scriptlets should be used sparingly. Most use cases - like updating
117+
caches and indexes - can be dealt with by using a central
118+
filetrigger. Although these files may get altered they still should be
119+
owned by a package.
120+
121+
## Verify files
122+
RPM keeps checksums of all files it maintains. Packages have checksums
123+
and can and should be signed. Files that need to change on disk - like
124+
config files, databases or indexes - can be marked and are treated
125+
differently when being changed. While unchange config files may be
126+
replaced changed ones will be retained or backed up - depending on the
127+
way they have been packaged.
128+
129+
## RPM in the Software handling stack
130+
RPM sees itself as filling specific layers in the software handling
131+
stack. It relies on build systems like make and the upstream provided
132+
build scripts to orchestrate the actual build and passes the acquiring
133+
and selection of the "right" packages up to updaters like *yum*(8), *dnf*(8),
134+
*zypper*(8), etc.
135+
136+
The stack typically looks like this:
137+
- Upstream build scripts using tools like maker, cmake, ant, ...
138+
- rpmbuild for running those via an *rpm-spec*(5) file
139+
- Build systems for installing build dependencies and keeping track of build artifacts
140+
- Package repositories offering binary packages
141+
- Installers/Updaters selecting and downloading packages
142+
- rpm checking for consistency and installing/updating the packages
143+
144+
As such RPM is only a part in a larger set of tools and some users may
145+
never actually interact with RPM directly.
146+
147+
## Levels of control
148+
Most things in RPM can be configured by macros. This allows different
149+
actors to set them and overwrite what was set previously.
150+
151+
Most basic are the defaults delivered by RPM upstream. Distributions
152+
are able to overwrite them by patching or providing new macro
153+
files. Packages can also ship macro files for other packages to use as
154+
BuildRequires. Finally most build related macros can also be
155+
overwritten in the *rpm-spec*(5) file - giving the packager the last word.
156+
157+
There are a few command line options to allow users to influence how
158+
packages are installed but their use is discouraged for the most part
159+
and packages should be installed as they are.
160+
161+
# SEE ALSO
162+
*rpm*(8) *rpmbuild*(1) *rpm-spec*(5) *rpm-macros*(7) *rpm-scriptlets*(7)
163+
164+
*http://www.rpm.org/*

docs/manual/philosophy.md

Lines changed: 3 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -1,172 +1,5 @@
11
---
2-
layout: default
3-
title: rpm.org - RPM's Philosophy
2+
layout: redirected
3+
sitemap: false
4+
redirect_to: ../man/rpm-design.7
45
---
5-
# RPM's Philosophy
6-
7-
RPM is a general purpose software manager. It has
8-
two major parts: rpmbuild that combines upstream sources with a meta
9-
data and build instructions in a "spec file" and additional files and
10-
patches. It allows to bundle all this up into a source package and
11-
build the software into a binary package. The second part - the rpm
12-
utility - can then install, update or remove the packages after
13-
checking for consistency.
14-
15-
RPM differs from special purpose package managers - like those
16-
targeting a specific programming language - in trying to not make
17-
assumptions about how software looks like or gets packaged. Packaging
18-
software can be messy and RPM accommodates for that.
19-
20-
It still offers help to create a POSIX like operation system. Macros
21-
parameterize locations to make the build instructions more generic and
22-
more easily transferable between distributions. Nevertheless RPM
23-
packages are targeting a specific distribution (and release thereof). They are
24-
typically not suited to be installed or even built elsewhere without
25-
tweaking. RPM acknowledges that different distributions have
26-
different goals, resulting in different design decisions. The
27-
specifics of the packages often reflect these.
28-
29-
RPM as a upstream project still tries to keep distributions from
30-
diverging unnecessarily but is aware that these differences are the
31-
reason distributions exist in the first place.
32-
33-
## RPM in the Software handling stack
34-
35-
RPM sees itself as filling specific layers in the software handling
36-
stack. It relies on build systems like make and the upstream provided
37-
build scripts to orchestrate the actual build and passes the acquiring
38-
and selection of the "right" packages up to updaters like yum, dnf,
39-
zypper, etc.
40-
41-
The stack typically looks like this:
42-
43-
* Upstream build scripts using tools like maker, cmake, ant, ...
44-
* rpmbuild for running those via a Spec file
45-
* Build systems for installing build dependencies and keeping track of build artifacts
46-
* Package repositories offering binary packages
47-
* Installers/Updaters selecting and downloading packages
48-
* rpm checking for consistency and installing/updating the packages
49-
50-
As such RPM is only a part in a larger set of tools and some users may
51-
never actually interact with RPM directly.
52-
53-
## Design goals
54-
55-
* General purpose software management
56-
* Building from pristine sources
57-
* Unattended operation
58-
* for building packages
59-
* for installing/updating/deleting packages
60-
* Reproducibility of builds and installs
61-
* Verifiability of packages and installed software
62-
63-
### Rolling out (security) updates quickly
64-
65-
Getting updates installed quickly is one of the main design
66-
goals. Many features and following design decisions are supporting
67-
this goal.
68-
69-
### Packaging dependencies separately
70-
71-
Libraries should be packaged separately and binaries should link to
72-
the version provided by system packages. Static linking is
73-
discouraged. This limits the number of packages that need updates or
74-
re-builds in case of a vulnerability.
75-
76-
### Unattended operation
77-
78-
Package installation and update is unattended and must not require
79-
user interaction. This allows automatically installing security - and
80-
other - updates.
81-
82-
Building the packages also runs unattended. This prevents user input
83-
from changing the output but also makes rebuilding packages - e.g. for
84-
changed dependencies - possible at large scale.
85-
86-
### Clear update path
87-
88-
Each package name creates an update path where packages with the same
89-
name and a newer version (technically Epoch-Version-Release) are an
90-
update for the packages with lower version. Packages are not allowed
91-
to make assumptions on what intermediate packages were installed or
92-
not.
93-
94-
### Bundle Sources, Changes and Build instructions together
95-
96-
Source packages bundle upstream sources, patches and build
97-
instructions into one entity. If changes need to be made everything
98-
needed is available, including a list of packages needed to run the
99-
build.
100-
101-
#### Separate Upstream Source from Patches
102-
103-
Source packages are supposed to contain the unaltered upstream sources
104-
in a way that their checksum can be checked. All changes can be done
105-
by applying patches or running build scripts. This makes it easy to
106-
understand what the packager did to the software. This is important to
107-
be able to figure out where issues arise from and to see which issues
108-
are fixed in the package - even if the upstream version is still
109-
vulnerable.
110-
111-
#### Support back porting fixes
112-
113-
A distribution often has a different approach to fixing software from an
114-
upstream project. Upstream projects are often content with fixing
115-
their latest release(s). Distribution often support a particular
116-
version of each software and need those to be fixed. The Sources and
117-
Patches approach makes handling this a lot easier (although it is
118-
lately being extended with the use of version control like git).
119-
120-
### Allow 3rd party packages
121-
122-
Although RPM is designed to package a whole distribution it explicitly
123-
supports 3rd parties to also provide packages without becoming part of
124-
the distribution and their processes.
125-
126-
Rpmbuild can be run locally without the use of a big build
127-
system. Dependencies are in large part automatic and target libraries
128-
inside the packages instead of relying on conventions like package
129-
names. This way 3rd party packages can be checked for compatibility
130-
beyond them just claiming that they target the distribution in question.
131-
132-
For proprietary softerware nosource packages allow to not ship the
133-
sources but only the build instructions to keep proprietary source
134-
private. They still can be used to generate binary packages in
135-
combination with the sources.
136-
137-
### Handling all system files
138-
139-
RPM takes ownership of all system files and their life cycle. While
140-
packages can copy files in their scriptlets at installation time this
141-
is strongly discouraged. Even files that are not actually shipped can
142-
be added to the package as %ghost files to allow RPM to handle
143-
them. All system files and directories should be owned by a package.
144-
145-
Scriptlets should be used sparingly. Most use cases - like updating
146-
caches and indexes - can be dealt with by using a central
147-
filetrigger. Although these files may get altered they still should be
148-
owned by a package.
149-
150-
### Verify files
151-
152-
RPM keeps checksums of all files it maintains. Packages have checksums
153-
and can and should be signed. Files that need to change on disk - like
154-
config files, databases or indexes - can be marked and are treated
155-
differently when being changed. While unchange config files may be
156-
replaced changed ones will be retained or backed up - depending on the
157-
way they have been packaged.
158-
159-
## Levels of control
160-
161-
Most things in RPM can be configured by macros. This allows different
162-
actors to set them and overwrite what was set previously.
163-
164-
Most basic are the defaults delivered by RPM upstream. Distributions
165-
are able to overwrite them by patching or providing new macro
166-
files. Packages can also ship macro files for other packages to use as
167-
BuildRequires. Finally most build related macros can also be
168-
overwritten in the Spec file - giving the packager the last word.
169-
170-
There are a few command line options to allow users to influence how
171-
packages are installed but their use is discouraged for the most part
172-
and packages should be installed as they are.

0 commit comments

Comments
 (0)