Commit 0413a930 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

add current work from sheireen

parents
tmp
var/lock
var/tmp
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 "stretch/sid". Should it not read "stretch" or "testing"?
Q. I upgraded my system to the unstable distribution and now my /etc/issue
says "stretch/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
"stretch/sid" (or whatever is appropriate).
Q. Why "stretch/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/nsswitch.conf /etc/nsswitch.conf
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 is going to be 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
home
lib
lib/systemd/system-preset
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
debian/README
debian/README.FHS
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
This diff is collapsed.
#!/bin/sh
file=$1
md5=`md5sum share/${file} | cut -f 1 -d " "`
if ! grep -q "$md5" share/${file}.md5sums; then
echo Error: share/${file}.md5sums is incomplete.
echo Need to add "$md5" with current version.
exit 1
fi
debian/postinst
debian/copyright
Source: base-files
Section: admin
Priority: required
Maintainer: Lisetta "Sheireen" Ferrero <sheireen@frozenbox.org>
Uploaders: Lorenzo "Palinuro" Faletra <palinuro@frozenbox.org>
Standards-Version: 3.9.8
Build-Depends: debhelper (>= 9)
Package: base-files
Provides: base
Architecture: any
Pre-Depends: awk
Depends: ${misc:Depends}
Essential: yes
Priority: required
Replaces: base, miscutils, dpkg (<= 1.15.0)
Breaks: initscripts (<< 2.88dsf-13.3), sendfile (<< 2.1b.20080616-5.2~)
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.
This is the Parrot #OSNAME# prepackaged version of the Debian Base System
Miscellaneous files. These files were written by Ian Murdock
<imurdock@debian.org> and Bruce Perens <bruce@pixar.com>.
This package was first put together by Bruce Perens <Bruce@Pixar.com>,
from his own sources.
The GNU Public Licenses in /usr/share/common-licenses were taken from
ftp.gnu.org and are copyrighted by the Free Software Foundation, Inc.
The Artistic License in /usr/share/common-licenses is the one coming
from Perl and its SPDX name is "Artistic License 1.0 (Perl)".
Copyright (C) 1995-2011 Software in the Public Interest.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
On Debian #OSNAME# systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
#!/bin/sh
sed -e "s&#OSNAME#&GNU/Linux&" etc/motd | awk 'NR > 2' | md5sum
sed -e "s&#OSNAME#&GNU/Hurd&" etc/motd | awk 'NR > 2' | md5sum
#!/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/#VENDORFILE# ]; then
ln -sf #VENDORFILE# /etc/dpkg/origins/default
fi
fi
if [ "$1" = "configure" ] && [ "$2" = "" ]; then
install_from_default staff-group-for-usr-local \
/etc/staff-group-for-usr-local
install_from_default nsswitch.conf /etc/nsswitch.conf
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 nsswitch.conf /etc/nsswitch.conf
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
if dpkg --compare-versions "$2" lt-nl "6.10"; then
install_from_default staff-group-for-usr-local \
/etc/staff-group-for-usr-local
fi
#!/usr/bin/make -f
OSNAME = "GNU/`uname | sed -e 's/GNU\///'`"
ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
OSNAME=GNU/Linux
endif
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
OSNAME=GNU/Hurd
endif
VENDORFILE = parrot
%:
dh $@
override_dh_auto_build:
sh debian/check-md5sum-etc profile
sh debian/check-md5sum-etc nsswitch.conf
sed -e "s&#OSNAME#&$(OSNAME)&g" debian/copyright.in > debian/copyright
sed -e "s/#VENDORFILE#/$(VENDORFILE)/g" debian/postinst.in > debian/postinst
override_dh_auto_install:
debian/rules install DESTDIR=`pwd`/debian/base-files
override_dh_link:
dh_link -X os-release
override_dh_compress:
dh_compress -X README
override_dh_fixperms:
dh_fixperms
cd debian/base-files && chown root:staff var/local
cd debian/base-files && chmod 755 `find . -type d`
cd debian/base-files && chmod 1777 `cat ../1777-dirs`
cd debian/base-files && chmod 2775 `cat ../2775-dirs`
cd debian/base-files && chmod 700 root
override_dh_builddeb:
dh_builddeb -- -Zgzip
install:
install -p -m 644 etc/* $(DESTDIR)/etc
install -p -m 644 licenses/* $(DESTDIR)/usr/share/common-licenses
install -p -m 644 origins/* $(DESTDIR)/etc/dpkg/origins
install -p -m 644 share/* $(DESTDIR)/usr/share/base-files
install -p -m 644 systemd-preset/* $(DESTDIR)/lib/systemd/system-preset
ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
rmdir $(DESTDIR)/sys
endif
sed -e "s&#OSNAME#&$(OSNAME)&g" share/motd > $(DESTDIR)/usr/share/base-files/motd
sed -e "s&#OSNAME#&$(OSNAME)&g" share/info.dir > $(DESTDIR)/usr/share/base-files/info.dir
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue > $(DESTDIR)/etc/issue
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue.net > $(DESTDIR)/etc/issue.net
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/os-release > $(DESTDIR)/etc/os-release
mv $(DESTDIR)/etc/os-release $(DESTDIR)/usr/lib/os-release
ln -s ../usr/lib/os-release $(DESTDIR)/etc/os-release
sed -e "s&#OSNAME#&$(OSNAME)&g" etc/lsb-release > $(DESTDIR)/etc/lsb-release
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