--- usepackage-1.8.orig/usepackage.1 +++ usepackage-1.8/usepackage.1 @@ -0,0 +1,346 @@ +.TH USE 1 "$Date: 2005/12/11 16:42:09 $" "Usepackage" "User Commands" +.SH NAME +usepackage \- +.I Usepackage +Environment Manager +.SH SYNOPSIS +See +.IR use(1) . +.SH DESCRIPTION +.I Usepackage +is an environment management program. It is based on the principle of +.I packages +\- collections of executables that share a common set of necessary +environment variables, such as PATH, MANPATH or LD_LIBRARY_PATH. +.PP +For each given +.IR package , +.B use +sources the appropriate environment information into the current shell. +The environment information is specified in packages files, see +.IR PACKAGES . +.PP +The +.B usepackage +executable is the backend program used to generate environment information +suitable for sourcing into a running shell. The +.B use +frontend should be invoked to actually effect changes to the environment, +see +.IR use(1) . +.SS OPTIONS +.TP +.I \-v +Output verbose information to the standard error stream. +.TP +.I \-s +Silence warnings for un-matched packages. This is useful in a shell +.I rc +script when a package is known not to be available on all architectures that +the shell is used on, see +.IR PACKAGES . +.TP +.I \-c +Force +.I csh +style environment output. +.TP +.I \-b +Force bourne shell style environment output. +.TP +.I \-f file +Specify an alternate initial configuration file, see +.IR PACKAGES . +.TP +.I \-l +List available packages and groups, see +.IR ANNOTATIONS +and +.IR GROUPS . +.SH PACKAGES +.I Usepackage +reads package environment information from the configuration file as follows: +.SS LOAD ORDER +When +.I Usepackage +starts up, it loads an initial configuration file, the name of this file may +be given on the command line (see +.IR OPTIONS ), +otherwise it defaults to the builtin name "usepackage.conf" (see +.IR FILES ). +This file is located by searching along a path which defaults to: +.PP +.nf + /usr/etc:~:. +.fi +.PP +This path may be overridden with the PACKAGES_PATH environment variable +(see +.IR ENVIRONMENT ). +A packages file may contain inclusion directives which cause the sourcing of +other files at given points. An inclusion directive looks like: +.PP +.nf + (include file-name) +.fi +.PP +The same location mechanism is used to find "file-name" as for the initial +configuration file. A package file name may also be given as an absolute file +name or may be shell-style user directory, tilde (~), relative. +.SS SYNTAX +A package file consists of comments, delimited by a leading hash (#), +or package definitions of the form: +.PP +.nf + package [arch [os [version [host [shell]]]]] + [<= requires ...] : setting [, setting ...] ; +.fi +.PP +The +.IR package , +.IR arch , +.IR os , +.IR version , +.IR host , +and +.I shell +parts may be simple shell-style patterns of the form: +.TP 15 +* +matches anything. +.TP +foo* +matches "foo", "foobar" etc. +.TP +{foo,bar} +matches "foo" or "bar". +.PP +The +.I requires +list specifies the names of other packages which must be sourced into the +environment before the settings for this package are processed. +.PP +A +.I setting +is either a variable definition (as described below) or a section of text +to be directly evaluated in the shell, delimited with +.IR <[ +and +.IR ]> , +for example: +.PP +.nf + <[ /usr/local/bin/test-init ]> +.fi +.PP +When +.I Usepackage +searches for the definition for a particular package, it compares each line +in the packages file against the name of the package given (package) and +system-dependant information for the execution host, as obtained by +.IR uname (2). +This information is the hardware implementation (platform), the operating +system name (os), the operating system version (version) and the hostname +(host). Comparisons are case-insensitive. If a match is obtained then the +given variable definitions and script sections are processed to modify the +environment. A variable definition may have one of the following forms: +.PP +.nf + var-name = "string" + var-name = path-list + var-name += path-list + var-name += "string" +.fi +.PP +The first sets the given variable to a literal string value, the +second sets the given variable to a path list, the third prepends the +current value of a variable with the given path list, and the fourth +interprets the literal string as a path list and prepends it to the current +value of the variable. Path lists are colon (:) separated lists of +directories and may contain shell-style tilde (~), user-relative, directories +which will be expanded automatically (except when the path list is given as a +literal string). When pre-pending paths to a variable, duplicate paths are +removed from the original value first. +.PP +In addition, +.I Usepackage +can optionally test for the existence of paths before setting or adding them +to variables. This is done with the test form of the above operators: +.PP +.nf + var-name ?= path-list + var-name ?+= path-list + var-name ?+= "string" +.fi +.PP +These operate as per the definitions above, but will ignore path components +that don't exist. +.SS GROUPS +In addition to the package definitions in a packages file, there may also be +group definitions. These have the following syntax: +.PP +.nf + group := package [, package ...] ; +.fi +.PP +.I Usepackage +searches for a given package name in the defined groups first, if the given +name matchs a group name then the packages defined as part of that group are +sourced into the environment together. A group definition may not reference +other groups and may not contain patterns. +.SS ANNOTATIONS +In order to give useful package information to the user, annotations may be +placed in the packages file that give summaries of packages. These annotations +have the form: +.PP +.nf + >> name : "description" << +.fi +.PP +.I Usepackage +collects these annotations together and displays them when called with the +.I -l +flag, see +.IR OPTIONS . +These annotations have no impact on the package mechanism and need not +necessarily be beside or correspond to the package definitions (although +this is the sensible way to arrange things). +.SS EXAMPLE +The following fragment of a packages file illustrates the main features: +.PP +.nf + # GNU software is available everywhere: + + >> GNU : "The GNU project software" << + + GNU : PATH += /usr/local/gnu/bin, + MANPATH += /usr/local/gnu/man ; + + # CVS requires RCS which is found in the GNU package, but + # is only available on SPARC Solaris machines: + + >> CVS : "Concurrent Versions System revision control" << + + CVS sun4* SunOS 5.* <= GNU : + CVSROOT = /usr/src/cvsroot, + CVSEDITOR = "vi", + PATH += /usr/local/cvs/bin, + MANPATH += /usr/local/cvs/man ; + + # User bin directories (Solaris will run SunOS 4 binaries): + # (Only added to the path if the directories actually exist) + + >> user : "User's own programs" << + + user sun4* SunOS : PATH ?+= ~/bin/sun4 ; + user sun4* SunOS 5.* : PATH ?+= ~/bin/solaris ; + user alpha OSF : PATH ?+= ~/bin/alpha ; + + # Special function for zsh: + + >> zsh-function : "Special zsh function" << + + zsh-function * * * * zsh : + <[ hello() { echo "Hello World!"; } ]> ; + + # include standard packages: + + (include packages.standard) + + # security hole: + + dot : PATH += . ; + + # groups: + + user-setup := standard, user ; + programmer-setup := standard, CVS, user, dot ; +.fi +.PP +Note the use of Operating System version numbers to distinguish between +SunOS 4 and Solaris (SunOS 5), the use of "sun4*" to match the multiple +different platform versions of SPARC machines (sun4m, sun4c, etc.) and the +fact that package "user" on a SPARC Solaris machine will match both of the +first two lines of the "user" package section, resulting in the "solaris" +directory and the "sun4" directory being added into the PATH. +.PP +Assuming the appropriate shell setup script has been sourced - see +.IR use(1) +- then the following command will cause the CVS environment (including the +GNU environment) to be sourced: +.PP +.nf + $ use CVS +.fi +.PP +Note that on a DEC Alpha machine, this will generate a warning like: +.PP +.nf + $ use CVS + warning: no match for package `CVS' on this host. +.fi +.PP +In a shell script which is executed on a number of different platforms (such +as the shell startup script). These warnings may be silenced (see +.IR OPTIONS ). +.SH FILES +.TP 15 +.SB /usr/share/usepackage/usepackage.conf +The default master packages file. +.TP +.SB /usr/share/usepackage/use.csh +Shell setup for csh and derivatives. +.TP +.SB /usr/share/usepackage/use.bsh +Shell setup for bourne shell and derivatives. +.TP +.SB /usr/share/usepackage/use.ksh +Shell setup for ksh. +.TP +.SB /usr/bin/usepackage +The underlying +.I Usepackage +executable. +.SH ENVIRONMENT +Other than the reading and re-definition of environment variables for package +setup, +.B use +also uses the following environment variables for user configuration: +.TP 15 +.SB PACKAGES_PATH +Colon-separated path list giving the directories to search for configuration +files. Shell-style tilde (~) user-directory escapes are expanded. +.TP +.SB HOME +If present in the environment, this is used to provide the expansion for +the tilde (~) user-directory. +.TP +.SB SHELL +If present in the environment, the last path component of this is used for +shell matching (see +.IR SYNTAX ) +and detecting the style of environment output that should be used (see +.IR OPTIONS ). +.SH COPYRIGHT +.nf +Usepackage Environment Manager +Copyright (C) 1995-2005 Jonathan Hogg +.fi +.PP +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. +.PP +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. +.PP +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +.SH SEE ALSO +use(1), csh(1), sh(1), ksh(1), env(1), environ(5), getenv(3C), uname(1), +uname(2) + --- usepackage-1.8.orig/debian/compat +++ usepackage-1.8/debian/compat @@ -0,0 +1 @@ +7 --- usepackage-1.8.orig/debian/rules +++ usepackage-1.8/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + + +config.status: configure + dh_testdir + ./configure $(CROSS) --sysconfdir=/etc/usepackage --prefix=/usr --mandir=\$${prefix}/share/man CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + +build: build-stamp + +build-stamp: config.status + dh_testdir + $(MAKE) + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/usepackage install + + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- usepackage-1.8.orig/debian/docs +++ usepackage-1.8/debian/docs @@ -0,0 +1,2 @@ +NEWS +README --- usepackage-1.8.orig/debian/copyright +++ usepackage-1.8/debian/copyright @@ -0,0 +1,34 @@ +This package was debianized by Miguelangel Jose Freitas Loreto on +Sun, 21 Dec 2008 19:45:18 -0430. + +It was downloaded from http://sourceforge.net/projects/usepackage/ + +Upstream Author: + + Jonathan Hogg + +Copyright: + + Copyright (C) 1995-2005 Jonathan Hogg + +License: + + This package 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 package 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. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, Miguelangel Jose Freitas Loreto and +is licensed under the GPL, see above. --- usepackage-1.8.orig/debian/changelog +++ usepackage-1.8/debian/changelog @@ -0,0 +1,45 @@ +usepackage (1.8-1) unstable; urgency=low + + * New upstream release + * New maintainer. (Closes: #495158) + * Fix debian/watch fails to report upstream's version (Closes: #450385) + * Update Standards-Version to 3.8.0 + + -- Miguelangel Jose Freitas Loreto Sun, 04 Jan 2009 14:55:31 -0430 + +usepackage (1.6.3-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix building with sudo, patch by Thiemo Seufer (Closes: #495136) + + -- Moritz Muehlenhoff Fri, 22 Aug 2008 20:55:41 +0200 + +usepackage (1.6.3-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Sat, 5 Apr 2003 20:23:07 -0800 + +usepackage (1.6.2-2) unstable; urgency=low + + * moved usepackage.conf from /usr/etc/ to /etc/usepackage/ + + -- Luca Filipozzi Fri, 12 Jul 2002 12:37:41 -0700 + +usepackage (1.6.2-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Mon, 17 Jun 2002 21:10:51 -0700 + +usepackage (1.6-2) unstable; urgency=low + + * debian/control: added build dep on flex and bison (Closes: Bug#148709) + + -- Luca Filipozzi Sun, 2 Jun 2002 21:12:27 -0700 + +usepackage (1.6-1) unstable; urgency=low + + * Initial Release. + + -- Luca Filipozzi Sun, 26 May 2002 22:44:34 -0700 --- usepackage-1.8.orig/debian/control +++ usepackage-1.8/debian/control @@ -0,0 +1,26 @@ +Source: usepackage +Section: utils +Priority: extra +Maintainer: Miguelangel Jose Freitas Loreto +Build-Depends: debhelper (>= 7), autotools-dev, bison, flex +Standards-Version: 3.8.0 +Homepage: http://sourceforge.net/projects/usepackage/ + +Package: usepackage +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: utility to manage environment variables from within dotfiles + Usepackage is a tool for managing the Unix environment for a multi-tool, + multi-platform site. It is designed to simplify login scripts and allow + administrators to control users' environments centrally. This tool should be + considered primarily designed for sites where users have to deal with a number + of different tools, or versions of tools, that are installed in different + locations and require environment variables to be set. This is particularly a + problem for developers, or anyone who has to manage a large toolset across + multiple platforms (e.g. different versions of the Sun JDK which require + various environment variables to be set correctly). One or more central + configuration files control a number of different "packages" and their + associated environment and dependencies for different platforms (this includes + the standard PATH, MANPATH, and LD_LIBRARY_PATH variables). A single user + command, use, can be invoked to source the appropriate environment information + into the users' current shell. --- usepackage-1.8.orig/debian/watch +++ usepackage-1.8/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/usepackage/usepackage-([\d].[\d])\.tar\.gz