Commit 8c5e2aee authored by Jonathan Carter's avatar Jonathan Carter
Browse files

Update base-files

parent 41dc8efe
Frequently Asked Questions about base-files
===========================================
* Questions about /etc/issue and /etc/debian_version:
Q. I upgraded my system to the testing distribution and now my /etc/issue
says "buster/sid". Should it not read "buster" or "testing"?
Q. I upgraded my system to the unstable distribution and now my /etc/issue
says "buster/sid". Should it not read "sid" or "unstable"?
A. That would be nice, but it is not possible because of the way the
testing distribution works. Packages uploaded for unstable reach
testing after ten days, provided they are built for every released
architecture, have no RC-bugs and their dependencies may be met in
testing. You should consider the testing and unstable distributions as
two sides of the same coin. Since the base-files package in testing
was initially uploaded for unstable, the only sensible /etc/issue to
have is one that is both valid for testing and unstable, hence
"buster/sid" (or whatever is appropriate).
Q. Why "buster/sid" and not "testing/unstable" as it used to be?
A. The codename is a little bit more informative, as the meaning of
"testing" changes over time.
Q. Ok, but how do I know which distribution I'm running?
A. If you are running testing or unstable, then /etc/debian_version is
not a reliable way to know that anymore. Looking at the contents of
your /etc/apt/sources.list file is probably a much better way.
Q. There is a new point release and I've just upgraded my system.
The /etc/debian_version file now says 8.x but /etc/issue still says 8.
Is this ok?
A. Yes. The release managers asked me not to touch /etc/issue, as that's
a file which is often customized by the user. The /etc/debian_version file,
on the other side, is updated at every point release, so that the exact
Debian version is shown when used by tools like reportbug.
* Other questions:
Q. After upgrading my system recently, I noticed that some files from
base-files do not match the ones which are installed on a fresh install
of squeeze. Should I not be warned about that?
A. Those files are configuration files, so they are completely under
the control of the system admin. The files installed by base-files are
just defaults. Changes in the default files are not important enough
to warn the user, as it is also policy that prompting should be
reduced to a minimum. This is also the reason they are not handled via
dpkg's conffile mechanism.
In either case, if you want to "upgrade" those files, just look at the
postinst for base-files (i.e. /var/lib/dpkg/info/base-files.postinst)
and you will see how they are created and where their master copies are:
install_from_default /usr/share/base-files/dot.profile /root/.profile
install_from_default /usr/share/base-files/dot.bashrc /root/.bashrc
install_from_default /usr/share/base-files/profile /etc/profile
install_from_default /usr/share/base-files/motd /etc/motd
So, if you want your system to be as similar as possible to a newly
installed squeeze system, you might want to sync these files manually.
Note 1: Since base-files version 6.10, /etc/profile is automatically
upgraded if it has not been modified from a previous default.
Note 2: The file /etc/nsswitch.conf has been moved to libc-bin.
Q. Why isn't license "foo" included in common-licenses?
A. I delegate such decisions to the policy group. If you want to
propose a new license you should make a policy proposal to modify the
paragraph in policy saying "Packages distributed under the Apache
license (version 2.0), the Artistic license, the GNU GPL (versions 1,
2, or 3), the GNU LGPL (versions 2, 2.1, or 3), and the GNU FDL
(versions 1.2 or 1.3) should refer to the corresponding files under
/usr/share/common-licenses". The way of doing this is explained in the
debian-policy package. As usual, you should always take a look at
already reported bugs against debian-policy before submitting a new
one.
Q. I upgraded from woody to sarge. Should my system be FHS-compliant now?
A. Achieving FHS compliance by upgrading would be tricky and prone to
error in certain cases, so it is not a goal of base-files, nor it is
planned to be. By default, some "mandatory" directories (like /opt,
/srv or /media) are only created in the first install (performed by
debootstrap), to keep the code as simple as possible, follow the
principle of least surprise on upgrades, and also to give people the
freedom to remove those directories without them being created again
when base-files is upgraded. Therefore, if you are running any sort of
compliance tests, you should do it on newly installed systems only.
Santiago Vila <sanvila@debian.org>
The FHS standard specifies /var/mail as the mail spool, but it also says
/var/mail may be a symbolic link to another directory, and there is no
requirement to physically move the mail spool to this location.
Therefore, no package will move files around from one location to another
on upgrades, and /var/mail will be the real directory only in newly
installed systems.
Since /var/spool/mail has been in use for several years now, we need
also to provide backwards compatibility for some time yet.
So, to summarize:
* New systems (Debian 2.2 or later) will have /var/mail as a real
directory and /var/spool/mail as a symlink to it.
* Upgraded systems will have /var/spool/mail as the real directory
and /var/mail as a symlink to it.
People upgrading from previous releases who prefer the new physical
location /var/mail over the old one may do the required changes in their
systems if they do it with extreme care and know what they are doing. The
packages in charge of ensuring that /var/mail exists (currently, libc6 and
base-files) will not touch it at all if it already exists as a directory
or a symlink.
Santiago Vila <sanvila@debian.org>
bin
boot
dev
etc
etc/default
etc/dpkg/origins
etc/profile.d
etc/skel
etc/update-motd.d
home
lib
proc
root
run
sbin
sys
tmp
usr
usr/bin
usr/games
usr/include
usr/lib
usr/sbin
usr/share
usr/share/base-files
usr/share/common-licenses
usr/share/dict
usr/share/info
usr/share/lintian/overrides
usr/share/man
usr/share/misc
usr/src
var
var/backups
var/cache
var/lib
var/lib/dpkg
var/lib/misc
var/local
var/lock
var/log
var/run
var/spool
var/tmp
usr/share/doc/base-files/README usr/share/doc/base-files/FAQ
usr/share/common-licenses/GFDL-1.3 usr/share/common-licenses/GFDL
usr/share/common-licenses/LGPL-3 usr/share/common-licenses/LGPL
usr/share/common-licenses/GPL-3 usr/share/common-licenses/GPL
#
# Permissions 0700 on /root are intentional as people expect
# the /root directory to be more private than /home/* directories.
#
base-files: non-standard-dir-perm root/ 0700 != 0755
#
# The /etc/os-release symlink is relative on purpose to avoid breaking dracut.
# See Bug #755394 for details.
#
base-files: symlink-should-be-absolute etc/os-release ../usr/lib/os-release
#
# The purpose of having licenses here is precisely to allow
# other packages to reference them.
#
base-files: extra-license-file usr/share/common-licenses/Artistic
base-files: extra-license-file usr/share/common-licenses/BSD
base-files: extra-license-file usr/share/common-licenses/GPL-1
base-files: extra-license-file usr/share/common-licenses/GPL-2
base-files: extra-license-file usr/share/common-licenses/GPL-3
base-files: extra-license-file usr/share/common-licenses/LGPL-2
base-files: extra-license-file usr/share/common-licenses/LGPL-2.1
base-files: extra-license-file usr/share/common-licenses/LGPL-3
/etc/debian_version
/etc/dpkg/origins/aims
/etc/dpkg/origins/debian
/etc/host.conf
/etc/issue
/etc/issue.net
/etc/update-motd.d/10-uname
Package: base-files
Version: 2020.1
Architecture: amd64
Essential: yes
Maintainer: Santiago Vila <sanvila@debian.org>
Installed-Size: 341
Pre-Depends: awk
Breaks: initscripts (<< 2.88dsf-13.3), sendfile (<< 2.1b.20080616-5.2~)
Replaces: base, dpkg (<= 1.15.0), miscutils
Provides: base
Section: admin
Priority: required
Multi-Arch: foreign
Description: Debian base system miscellaneous files
This package contains the basic filesystem hierarchy of a Debian system, and
several important miscellaneous files, such as /etc/debian_version,
/etc/host.conf, /etc/issue, /etc/motd, /etc/profile, and others,
and the text of several common licenses in use on Debian systems.
1f8e31cfd8444f5f51d8bd4601a1df51 usr/lib/os-release
e12f5739f81b08c470f20890304bf53e usr/share/base-files/dot.bashrc
46438b614dcb2175148fa7e0bdc604a4 usr/share/base-files/dot.profile
6db82730e03aaeeecb8fee76b73d96d4 usr/share/base-files/dot.profile.md5sums
f9128f409878ce10d54d06488e3ce136 usr/share/base-files/info.dir
9830e3dbb6a828f2cc824db8db0ceaf7 usr/share/base-files/motd
2255054e61cee1a99dbe893377820dde usr/share/base-files/profile
b8f3a4810345718e2c737d7f4071cca0 usr/share/base-files/profile.md5sums
d7332c00bf5e7b27af5ba5a2fecfb2cb usr/share/base-files/staff-group-for-usr-local
3b83ef96387f14655fc854ddc3c6bd57 usr/share/common-licenses/Apache-2.0
f921793d03cc6d63ec4b15e9be8fd3f8 usr/share/common-licenses/Artistic
3775480a712fc46a69647678acb234cb usr/share/common-licenses/BSD
65d3616852dbf7b1a6d4b53b00626032 usr/share/common-licenses/CC0-1.0
24ea4c7092233849b4394699333b5c56 usr/share/common-licenses/GFDL-1.2
10b9de612d532fdeeb7fe8fcd1435cc6 usr/share/common-licenses/GFDL-1.3
5b122a36d0f6dc55279a0ebc69f3c60b usr/share/common-licenses/GPL-1
b234ee4d69f5fce4486a80fdaf4a4263 usr/share/common-licenses/GPL-2
d32239bcb673463ab874e80d47fae504 usr/share/common-licenses/GPL-3
5f30f0716dfdd0d91eb439ebec522ec2 usr/share/common-licenses/LGPL-2
4fbd65380cdd255951079008b364516c usr/share/common-licenses/LGPL-2.1
e6a600fd5e1d9cbde2d983680233ad02 usr/share/common-licenses/LGPL-3
0c5913925d40b124fb52ce84c5deb3f3 usr/share/common-licenses/MPL-1.1
815ca599c9df247a0c7f619bab123dad usr/share/common-licenses/MPL-2.0
0fffee253bd66cf3c7840e0f46ebe56c usr/share/doc/base-files/README
fbd937e067f0a83fb9422713a6b84a8a usr/share/doc/base-files/README.FHS
04425e75482c1a04cbe6dc378b979969 usr/share/doc/base-files/changelog.gz
c686090b1ff44554e2d6c541280a55b1 usr/share/doc/base-files/copyright
07223424da25c119e376b74f04a1cb2b usr/share/lintian/overrides/base-files
#!/bin/sh
set -e
install_local_dir() {
if [ ! -d $1 ]; then
mkdir -p $1
fi
if [ -f /etc/staff-group-for-usr-local ]; then
chown root:staff $1 2> /dev/null || true
chmod 2775 $1 2> /dev/null || true
fi
}
install_from_default() {
if [ ! -f $2 ]; then
cp -p /usr/share/base-files/$1 $2
fi
}
install_directory() {
if [ ! -d /$1 ]; then
mkdir /$1
chown root:$3 /$1
chmod $2 /$1
fi
}
migrate_directory() {
if [ ! -L $1 ]; then
rmdir $1
ln -s $2 $1
fi
}
update_to_current_default() {
if [ -f $2 ]; then
md5=`md5sum $2 | cut -f 1 -d " "`
if grep -q "$md5" /usr/share/base-files/$1.md5sums; then
if ! cmp -s /usr/share/base-files/$1 $2; then
cp -p /usr/share/base-files/$1 $2
echo Updating $2 to current default.
fi
fi
fi
}
if [ ! -e /etc/dpkg/origins/default ]; then
if [ -e /etc/dpkg/origins/debian ]; then
ln -sf debian /etc/dpkg/origins/default
fi
fi
if [ "$1" = "configure" ] && [ "$2" = "" ]; then
install_from_default dot.profile /root/.profile
install_from_default dot.bashrc /root/.bashrc
install_from_default profile /etc/profile
install_from_default motd /etc/motd
install_directory mnt 755 root
install_directory srv 755 root
install_directory opt 755 root
install_directory etc/opt 755 root
install_directory var/opt 755 root
install_directory media 755 root
install_directory var/mail 2775 mail
if [ ! -L /var/spool/mail ]; then
ln -s ../mail /var/spool/mail
fi
install_directory run/lock 1777 root
migrate_directory /var/run /run
migrate_directory /var/lock /run/lock
install_local_dir /usr/local
install_local_dir /usr/local/share
install_local_dir /usr/local/share/man
install_local_dir /usr/local/bin
install_local_dir /usr/local/games
install_local_dir /usr/local/lib
install_local_dir /usr/local/include
install_local_dir /usr/local/sbin
install_local_dir /usr/local/src
install_local_dir /usr/local/etc
ln -sf share/man /usr/local/man
if [ ! -f /var/log/wtmp ]; then
echo -n>/var/log/wtmp
fi
if [ ! -f /var/log/btmp ]; then
echo -n>/var/log/btmp
fi
if [ ! -f /var/log/lastlog ]; then
echo -n>/var/log/lastlog
fi
chown root:utmp /var/log/wtmp /var/log/btmp /var/log/lastlog
chmod 664 /var/log/wtmp /var/log/lastlog
chmod 660 /var/log/btmp
if [ ! -f /var/run/utmp ]; then
echo -n>/var/run/utmp
fi
chown root:utmp /var/run/utmp
chmod 664 /var/run/utmp
fi
if [ ! -d /var/lib/dpkg ]; then
mkdir -m 755 -p /var/lib/dpkg
fi
if [ ! -f /var/lib/dpkg/status ]; then
echo > /var/lib/dpkg/status
chmod 644 /var/lib/dpkg/status
fi
if [ ! -f /usr/info/dir ] && [ ! -f /usr/share/info/dir ]; then
install_from_default info.dir /usr/share/info/dir
chmod 644 /usr/share/info/dir
fi
if [ "$1" = "configure" ] && [ "$2" != "" ]; then
update_to_current_default profile /etc/profile
update_to_current_default dot.profile /root/.profile
if dpkg --compare-versions "$2" lt-nl "7.7"; then
install_directory mnt 755 root
fi
fi
Vendor: AIMS
Vendor-URL: https://desktop.aims.ac.za/
Vendor: Debian
Vendor-URL: http://www.debian.org/
Bugs: debbugs://bugs.debian.org
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment