Browse Source

Added fhs (2.3) - The Filesystem Hierarchy Standard

- package was made by Alejandro and taken from the just_lib svn branch
early
Christian Wiese 17 years ago
parent
commit
0768bc5d74
  1. 42
      base/fhs/fhs-1-root.txt
  2. 50
      base/fhs/fhs-2-usr.txt
  3. 45
      base/fhs/fhs-2-var.txt
  4. 32
      base/fhs/fhs-3-lib.sh
  5. 20
      base/fhs/fhs-4-linux.txt
  6. 28
      base/fhs/fhs-5-usr_local.txt
  7. 24
      base/fhs/fhs-6-lsb.txt
  8. 29
      base/fhs/fhs-8-compatibility.txt
  9. 46
      base/fhs/fhs-9-opensde.txt
  10. 61
      base/fhs/fhs.conf
  11. 33
      base/fhs/fhs.desc

42
base/fhs/fhs-1-root.txt

@ -0,0 +1,42 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-1-root.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# Chapter 3. The Root Filesystem
#
m bin
m boot
m dev
m etc
# lib/ is created later considering arch-based logic
m media
m mnt
m opt
m sbin
m srv
m tmp ugo=rwxt
m usr
m var
m etc/opt
m etc/local
# etc/xml do we want this?
# etc/sgml do we want this?
m home
# lib<qual> are created later considing arch-based logic
m root 0700
# who defined this?
m sbin/init.d

50
base/fhs/fhs-2-usr.txt

@ -0,0 +1,50 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-2-usr.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# Chapter 4.The /usr Hierarchy
#
m usr/bin
m usr/include
# usr/lib/ is created later considering arch-based logic
m usr/local
m usr/sbin
m usr/share
m usr/games
m usr/src
m usr/share/man
m usr/share/man/man1
m usr/share/man/man2
m usr/share/man/man3
m usr/share/man/man4
m usr/share/man/man5
m usr/share/man/man6
m usr/share/man/man7
m usr/share/man/man8
m usr/share/misc
m usr/share/dict
m usr/share/doc
m usr/share/games
m usr/share/info
m usr/share/locale
m usr/share/nls
m usr/share/terminfo
# usr/share/tmac do we want this?
# usr/share/xml do we want this?
# usr/share/sgml do we want this?
m usr/share/zoneinfo

45
base/fhs/fhs-2-var.txt

@ -0,0 +1,45 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-2-var.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# Chapter 5. The /var Hierarchy
#
m var/cache
m var/lib
m var/lib/misc
m var/log
m var/lock
m var/run
m var/spool
# The /var/tmp directory is made available for programs that require
# temporary files or directories that are preserved between system reboots.
m var/tmp ugo=rwxt
# substructures
#
m var/opt
m var/local
m var/games
# optionals
#
m var/account
# var/crash uhm?
m var/mail ugo=rwxt
# var/yp only if NIS?
# others available on 00-dirtree
m var/empty
# var/spool/mqueue do we need it?
# var/lib/pkgtool ../adm what for?

32
base/fhs/fhs-3-lib.sh

@ -0,0 +1,32 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-3-lib.sh
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
lib=
if [ "$SDECFG_MULTILIB" = 1 ]; then
case $arch_machine in
powerpc64|sparc64|x86_64|mips64)
lib=lib64 ;;
esac
fi
for x in '' 'usr/' 'usr/local/'; do
if [ -z "$lib" ]; then
echo "m ${x}lib"
else
echo "m ${x}lib32"
echo "m ${x}lib64"
echo "l ${x}lib $lib"
fi
done

20
base/fhs/fhs-4-linux.txt

@ -0,0 +1,20 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-4-linux.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# linux kernel related
#
m lib/modules
m lib/firmware
m proc
m sys

28
base/fhs/fhs-5-usr_local.txt

@ -0,0 +1,28 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-5-usr_local.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
m usr/local/bin
l usr/local/etc ../../etc/local
# usr/local/games do we want this?
m usr/local/include
# usr/local/lib/ is created later
# usr/local/man is created later
m usr/local/sbin
m usr/local/share
m usr/local/share/man
m usr/local/share/misc
m usr/local/src
l usr/local/man share/man
l usr/local/var ../../var/local

24
base/fhs/fhs-6-lsb.txt

@ -0,0 +1,24 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-6-lsb.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# LSB 3.1 makes some special requests for /etc
m etc/cron.d
m etc/cron.daily
m etc/cron.hourly
m etc/cron.monthly
m etc/cron.weekly
l etc/init.d ../sbin/init.d
m etc/profile.d

29
base/fhs/fhs-8-compatibility.txt

@ -0,0 +1,29 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-8-compatibility.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# Some compatibility links
#
l usr/spool ../var/spool
l usr/tmp ../var/tmp
l usr/opt ../opt
l var/spool/locks ../lock
l var/spool/mail ../mail
l var/state lib
l usr/share/doc/packages .
l usr/info share/info
l usr/man share/man

46
base/fhs/fhs-9-opensde.txt

@ -0,0 +1,46 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs-9-opensde.txt
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# config
#
m etc/conf
# etc/hotplug.d/default uhm? etc/hotplug.d is missing anyway
m etc/skel
# sysvinit (here?!)
#
m etc/rc.d
l etc/rc.d/init.d ../init.d
m etc/rc.d/rcX.d
m etc/rc.d/rc0.d
m etc/rc.d/rc1.d
m etc/rc.d/rc2.d
m etc/rc.d/rc3.d
m etc/rc.d/rc4.d
m etc/rc.d/rc5.d
m etc/rc.d/rc6.d
# For our package management system
#
m var/adm
m var/adm/flists
# var/adm/cksums this is deprecated
m var/adm/md5sums
m var/adm/packages
m var/adm/dependencies
# new
m var/adm/postinstall
# compatibility
l etc/postinstall.d ../var/adm/postinstall

61
base/fhs/fhs.conf

@ -0,0 +1,61 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../fhs/fhs.conf
# Copyright (C) 2006 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# 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; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
srctar=none
createprefix=0
createdocs=0
check_usrlocal=0
makeopt=
makeinstopt=
fhs_create_helper() {
while read cmd name attribute; do
if [ -e "$sysroot/$name" ]; then
echo "Skipping: $name"
# continue
elif [ "$cmd" == "m" ]; then
echo "Creating: $name"
mkdir "$sysroot/$name"
[ -z "$attribute" ] ||
chmod "$attribute" "$sysroot/$name"
elif [ "$cmd" == "l" -a -n "$attribute" ]; then
echo "Symlinking: $name -> $attribute"
ln -s "$attribute" "$sysroot/$name"
else
echo_error "Syntax Error: $cmd $name $attribute"
false
fi
add_flist "$sysroot/$name"
done
}
fhsfiles="$( ls $confdir/fhs-*.{txt,sh} 2> /dev/null | sort )"
fhs_create() {
local file=
for file in $fhsfiles; do
case "$file" in
*.sh) echo "loading $file..." 1>&2
sh $file ;;
*.txt) echo "loading $file..." 1>&2
sed -e '/^[ \t]*$/d;' -e '/^#/d;' $file ;;
esac | fhs_create_helper
done
}
hook_add postmake 5 fhs_create
hook_add postdoc 7 "mkdir -p $root$docdir/; cp -vf $( match_source_file -p fhs ) $root$docdir/"

33
base/fhs/fhs.desc

@ -0,0 +1,33 @@
[COPY] --- SDE-COPYRIGHT-NOTE-BEGIN ---
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch.
[COPY]
[COPY] Filename: package/.../fhs/fhs.desc
[COPY] Copyright (C) 2006 The OpenSDE Project
[COPY]
[COPY] More information can be found in the files COPYING and README.
[COPY]
[COPY] This program is free software; you can redistribute it and/or modify
[COPY] it under the terms of the GNU General Public License as published by
[COPY] the Free Software Foundation; version 2 of the License. A copy of the
[COPY] GNU General Public License can be found in the file COPYING.
[COPY] --- SDE-COPYRIGHT-NOTE-END ---
[I] The Filesystem Hierarchy Standard
[T] The Filesystem Hierarchy Standard (FHS) defines the main
[T] directories and their contents in Linux and other Unix-like
[T] computer operating systems.
[U] http://www.pathname.com/fhs/
[A] The Free Standards Group
[M] Alejandro Mery <amery@opensde.org>
[C] base/system
[L] PublicDomain
[S] Stable
[V] 2.3
[P] X 01-------9 000.000
[D] 1534350155 fhs-2.3.txt.gz http://www.pathname.com/fhs/pub/
Loading…
Cancel
Save