Current FHS compliance This changeset updates everything to allow for an "unsplit /usr" filesystem hierarchy. The current FHS policy states that /bin /sbin /lib /lib64 should all be symlinks into the corresponding directories under /usr Signed-off-by: Steve Youngs <steve@steveyoungs.com>
Fix nasty bug in chmod, plus minor fixes. * usr/lib/pkgusr/chmod: My idea for converting symbolic chmods into numeric was completely wrong. Rewrite to work on the symbolic directly without converting them. Only reset $@ if it is necessary. Don't call $DAISY_CHAIN via exec. * usr/lib/pkgusr/chgrp: Don't use exec. * usr/lib/pkgusr/chown: Ditto. * usr/lib/pkgusr/mkdir: Ditto. * usr/lib/pkgusr/install (_perms): Fix as per chmod. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Fix a bug that was exposed by the SXEmacs configure script. Under certain conditions a directory could be created with no execute bit set (600 instead of 700). When the chmod wrapper (and install) encounter symbolic permissions they are converted to octal by stat'ing a temp file that was chmod'd with the symbolic perm. Because of the obnoxious and convoluted way that autoconf does things, that chmod had to be called under an exec. This changeset cares for that plus a couple of other tiny things like always testing for root with `id -u' instead of $UID. * usr/lib/pkgusr/chmod: Use id to check for root because $UID cannot be guaranteed to exist. Only remove real options to guard against accidently removing a symbolic perm that begins with a dash. I don't even know if that is possible, I've never used symbolic perms, never will, they're a stupid idea. Create the hack-o-matic file with mktemp and call $DAISY_CHAIN there via exec. * usr/lib/pkgusr/chgrp: Use id for root check. * usr/lib/pkgusr/chown: Ditto. * usr/lib/pkgusr/mkdir: Ditto. * usr/lib/pkgusr/install: Ditto. (_perms): Use mktemp, the same as in the chmod wrapper. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Fix a bunch of little things from the previous changeset. * usr/lib/pkgusr/chgrp: Fix shell quoting. Better test for GIDs vs names * usr/lib/pkgusr/chmod: Fix shell quoting. Fix inf-loop in symbol->octal conversion. * usr/lib/pkgusr/chown: Fix shell quoting. Fix logic in user test. Better tests for UID/GID vs names. * usr/lib/pkgusr/install: Re-factor getopts cmdline parsing. (_dirs): Use $pristinecmd instead of $@, exit if not creating directory. (_leading_dirs): Removed, not needed. (_perms): Better test for symbol vs octal. Call /bin/chmod directly in the hack-o-matic. (_group): Better test for GID vs name (_owner): Better test for UID vs name * usr/lib/pkgusr/mkdir: Remove spurious `fi'. Logged 'install cmd suggestion' had incorrect -g option. * usr/bin/forall_direntries_from (prune_prefixes): Add /usr/lib/pkgusr. Non-pkgusrs are not allowed in this directory anymore. * usr/bin/grep_all_regular_files_for (prune_prefixes): Ditto. * etc/pkgusr/bash_profile (SUPPRESSLOCALEDIR): Typo. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Major overhaul -- most scripts rewritten or updated. * etc/pkgusr/bash_profile (LESSCHARSET): Everything's god-damned UTF-8 these days (PKG_CONFIG_PATH): More readable. (SUPPRESSLOCALEDIR): Add. * etc/pkgusr/handy_funcs (find_pkg_deps): New. (instg): New, for grepping install logs for '*** msg'. (less-or-cat): New, for log viewing, does what it says. (H-pkg): Much nicer format, pipe through less. General tidy up. Convert a lot of tiny functions to aliases, plus added a couple of new ones... ipkg->showinst, gpkg->showgen * etc/pkgusr/skel-package/build (SRCTREE): New. (configure_commands): Use $SRCTREE (update_commands): Use find_pkg_deps() * etc/pkgusr/zsh/zsh-pkgtools (pkgwant): Use grep -w to eliminate false positives. * etc/sudoers.d/99-pkgusr: New. Sudo config to allow pkgusrs to run ldconfig as root. * usr/bin/forall_direntries_from: Update Bastard settings. Make -noleaf optional, default off. Update comments. * usr/bin/grep_all_regular_files_for: Ditto. * usr/bin/list_suspicious_files: Ditto. * usr/bin/header-symbol-search: Update Bastard settings. * usr/bin/library-symbol-search: Ditto. * usr/bin/lesspipe.sh: Get charset from `file -i' to see if strings can be used. * usr/bin/uninstall_package (run): Only remove directories if they are empty. Do NOT let root use this script. * usr/lib/pkgusr/chgrp: Handle cases where chgrp options are used and also where the user is not a member of the group trying to be changed to. Handle both names and GIDs Don't let root use this script. * usr/lib/pkgusr/chmod: Handle cases where chmod options are used and also all set{uid,gid,sticky} bit operations. Don't let root use this script. * usr/lib/pkgusr/chown: Rewrite. Handle all chown scenarios. Don't let root use this script. * usr/lib/pkgusr/mkdir: Comment about the irrelevance to my needs. Don't let root use this script. * usr/lib/pkgusr/update-pkg-project (upd_pkg_deps): New, use it, does what it says. * usr/lib/pkgusr/install: Complete rewrite. Don't let root use this script. * usr/lib/pkgusr/ldconfig: New. Wrapper to run ldconfig via sudo. * installdir.lst: Update. * README: Update. * LFS-pkgusr-hint.txt: Updated to current version of the LFS hint. Signed-off-by: Steve Youngs <steve@sxemacs.org>
Initial git import Signed-off-by: Steve Youngs <steve@sxemacs.org>