From 1b0d59ccc417e49f178a800ee74279cd77da2182 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:18:25 +0100 Subject: [PATCH] own /usr, /etc, /opt, /var and more directories [release 2.2-17mamba;Sun Oct 20 2013] --- README.md | 3 + filesystem.spec | 201 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 filesystem.spec diff --git a/README.md b/README.md index 0c26202..a16b489 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # filesystem +The filesystem package is one of the basic packages that is installed on an openmamba Linux system. +Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. + diff --git a/filesystem.spec b/filesystem.spec new file mode 100644 index 0000000..b7444c8 --- /dev/null +++ b/filesystem.spec @@ -0,0 +1,201 @@ +%define tty_group 4 + +Name: filesystem +Version: 2.2 +Release: 17mamba +Summary: The basic directory layout for a Linux system +Group: System/Configuration +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.pathname.com/fhs/ +License: Public Domain +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The filesystem package is one of the basic packages that is installed on an openmamba Linux system. +Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. + +%prep -q +%build + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +install -d %{buildroot}/{bin,boot,dev/pts,etc/opt,home,%_lib,mnt,proc} +install -d %{buildroot}/{root,sbin,tmp,usr/local,var,opt,initrd} + +for dirname in %{buildroot}/usr %{buildroot}/usr/local; do + install -d $dirname/{bin,etc,include,%_lib,sbin,share,src} +# ln -s share/{man,doc,info} $dirname + install -d $dirname/share/{dict,doc,info,locale,man,empty} + install -d $dirname/share/{nls,misc,terminfo,zoneinfo} + install -d $dirname/share/man/man{1,2,3,4,5,6,7,8} +done + +install -d %{buildroot}/usr/local/games +#ln -s ../share/man %{buildroot}/usr/local/man +install -d %{buildroot}/usr/local/man + +install -d %{buildroot}/var/{lock,log,mail,run,spool} +install -d %{buildroot}/var/{tmp,opt,cache,%_lib/misc,local} +install -d %{buildroot}/opt/{bin,doc,include,info} +install -d %{buildroot}/opt/{%_lib,man/man{1,2,3,4,5,6,7,8}} +install -d %{buildroot}/var/lock/subsys + +install -d %{buildroot}/media +install -d %{buildroot}/run +install -d %{buildroot}/srv +install -d %{buildroot}/sys + +ln -s ../var/tmp %{buildroot}/usr +ln -s ../mail %{buildroot}/var/spool/mail + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +# Warning: do not execute scripts here, because this +# package shouldn't have any dependency +#%pre +#[ -L /usr/local/man ] && rm -f /usr/local/man || : + +%files +%defattr(-,root,root) +%dir /bin +%dir /boot +%dir /dev +%dir /dev/pts +%dir /etc +%dir /etc/opt +%dir /home +%dir /%_lib +%dir /media +%dir /mnt +%dir /proc +%attr(0750,root,root) %dir /root +%dir /run +%dir /sbin +%dir /srv +%dir /sys +%attr(1777,root,root) %dir /tmp + +%dir /usr +%dir /usr/bin +%dir /usr/etc +%dir /usr/include +%dir /usr/%_lib +%dir /usr/sbin +%dir /usr/src +%dir /usr/share +%dir /usr/share/dict +%dir /usr/share/doc +%dir /usr/share/empty +%dir /usr/share/info +%dir /usr/share/locale +%dir /usr/share/man +%dir /usr/share/man/man* +%dir /usr/share/nls +%dir /usr/share/misc +%dir /usr/share/terminfo +%dir /usr/share/zoneinfo + +%dir /usr/local +%dir /usr/local/bin +%dir /usr/local/etc +%dir /usr/local/games +%dir /usr/local/include +%dir /usr/local/%_lib +%dir /usr/local/man +%dir /usr/local/sbin +%dir /usr/local/share +%dir /usr/local/share/dict +%dir /usr/local/share/doc +%dir /usr/local/share/info +%dir /usr/local/share/locale +%dir /usr/local/share/man +%dir /usr/local/share/man/man* +%dir /usr/local/share/misc +%dir /usr/local/share/nls +%dir /usr/local/share/terminfo +%dir /usr/local/share/zoneinfo +%dir /usr/local/src + +%dir /var +%dir /var/cache +%dir /var/%_lib/misc +%dir /var/local +%attr(0755,root,root) /var/lock/subsys +%dir /var/log +%dir /var/mail +%dir /var/opt +%attr(1755,root,root) %dir /var/run +%dir /var/spool +/var/spool/mail +%attr(1777,root,root) %dir /var/tmp + +%dir /opt +%dir /opt/bin +%dir /opt/doc +%dir /opt/include +%dir /opt/info +%dir /opt/%_lib +/opt/man/man* + +/usr/tmp + +%changelog +* Sun Oct 20 2013 Silvan Calarco 2.2-17mamba +- own /usr, /etc, /opt, /var and more directories + +* Thu Jul 19 2012 Silvan Calarco 2.2-16mamba +- create /var/spool/mail symlink to /var/mail for standard location compatibility + +* Sat Apr 30 2011 Silvan Calarco 2.2-15mamba +- added /run directory (see http://lwn.net/Articles/436012/) + +* Tue Feb 01 2011 Silvan Calarco 2.2-14mamba +- remove obsolete dir /initrd +- fix files list to remove rpm 5 warnings + +* Sun May 18 2008 Silvan Calarco 2.2-13mamba +- specfile updated + +* Thu Sep 15 2005 Silvan Calarco 2.2-12qilnx +- add /sys directory + +* Thu Aug 04 2005 Silvan Calarco 2.2-11qilnx +- remove %pre script so that the package doesn't depend on /bin/sh + +* Mon Apr 04 2005 Davide Madrisan 2.2-10qilnx +- make /usr/local/man a directory to avoid the error "cpio: rename failed" + on a system where the directory already exists +- added /media and /srv directories + +* Thu Mar 31 2005 Davide Madrisan 2.2-9qilnx +- added games and man in `/usr/local' (FHS 2.3 requirement) + +* Thu Apr 29 2004 Silvan Calarco 2.2-8qilnx +- set tty by groupid, not name because in install phase group cannot be resolved + +* Fri Apr 09 2004 Silvan Calarco 2.2-7qilnx +- fixed /var/tmp permissions + +* Fri Apr 09 2004 Silvan Calarco 2.2-6qilnx +- changed /var/lock and /var/run permissions + +* Tue May 27 2003 Alessandro Ramazzina 2.2-5qilnx +- added /usr/share/empty to the files list + +* Tue May 27 2003 Alessandro Ramazzina 2.2-4qilnx +- added /usr/share/empty + +* Tue Apr 23 2003 Silvan Calarco 2.2-3qilnx +- added /var/lock/subsys + +* Tue Apr 23 2003 Silvan Calarco 2.2-2qilnx +- added /initrd + +* Tue Apr 14 2003 Silvan Calarco 2.2-1qilnx +- first build