From 6be664ac1eff99ce74112583e6a0be2cd98a21b2 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Tue, 11 Sep 2007 14:07:14 +0000 Subject: A number of documentation fixes and preparation of the project website. --- MANIFEST.in | 3 + doc/layman.8.xml | 1024 ++++++++++++++++++++++++++++--------------- ebuild/layman-1.0.99.ebuild | 77 ---- ebuild/layman-1.1.ebuild | 77 ++++ etc/layman.cfg | 5 - layman/config.py | 5 +- 6 files changed, 742 insertions(+), 449 deletions(-) delete mode 100644 ebuild/layman-1.0.99.ebuild create mode 100644 ebuild/layman-1.1.ebuild diff --git a/MANIFEST.in b/MANIFEST.in index 5829965..4d302f8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,6 @@ +include AUTHORS +include ChangeLog +include COPYING include etc/layman.cfg include doc/layman.8 include doc/layman.8.html diff --git a/doc/layman.8.xml b/doc/layman.8.xml index ecd2ec7..c11ad9c 100644 --- a/doc/layman.8.xml +++ b/doc/layman.8.xml @@ -1,6 +1,6 @@ +"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
@@ -8,8 +8,8 @@ - Gunnar - Wrobel + Gunnar + Wrobel
wrobel@gentoo.org @@ -22,33 +22,154 @@ - 2006 + 2006-2007 Gunnar Wrobel
+ Overview + + + + Synopsis + + + + + + + Description + + + + + + + Action flags + + + + + + + Other options + + + + + + + Configuration + + + + + + + Overlay lists + + + + + + + Layman cache + + + + + + + Handling make.conf + + + + + + + Handle overlays + + + + + + + List overlays + + + + + + + Overlay types + + + + + + + Get your overlay published to the world + + + + + + + Examples + + + + + + + Layman files + + + + + + + Reporting bugs + + + +
+ +
Reference - + - layman - February 2006 - Gentoo Linux + layman + September 2007 + layman + 1.1 + + 2006-2007 + Gunnar Wrobel + + + + This is free software. You may redistribute copies of it + under the terms of the GNU General Public License v2 + (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html). + + - layman + layman 8 - layman + layman - manage your local repository of gentoo overlays + manage your local repository of Gentoo overlays - - + + layman -a @@ -60,7 +181,7 @@ - + layman -d @@ -72,7 +193,7 @@ - + layman -s @@ -84,7 +205,19 @@ - + + layman + + -i + --info + + + ALL + overlay + + + + layman -S @@ -92,7 +225,7 @@ - + layman -L @@ -100,7 +233,7 @@ - + layman -l @@ -108,7 +241,7 @@ - + layman -f @@ -116,106 +249,381 @@ - - layman - - -n - --nofetch - - - - - layman - - -k - --nocheck - - - - - layman - - -q - --quiet - - - - - layman - - -Q - --quietness - - 0-4 - - - - - - Description + + Description layman is a script that allows you to - add, remove and update gentoo overlays from a variety of + add, remove and update Gentoo overlays from a variety of sources. - + + WARNING - - WARNING - - layman makes it easy to retrieve and - update overlays for gentoo. In addition it makes it TRIVIAL + layman makes it easy to retrieve and + update overlays for Gentoo. In addition it makes it TRIVIAL to break your system. - + - The main portage tree provides you with high quality ebuilds - that are all maintained by gentoo developers. This will not + The main portage tree provides you with high quality ebuilds + that are all maintained by Gentoo developers. This will not be the case for most of the overlays you can get by using layman. Thus you are removing the security shield that the standard tree provides for you. You should keep that in mind when installing ebuilds from an overlay. - + - To ensure the security of your system you MUST read the + To ensure the security of your system you MUST read the source of the ebuild you are about to install. - + + + + + + + + Options + + + Actions + + List of possible layman actions. + + + + + + + Fetches the remote list of overlays. You will + usually NOT need to explicitely specify this option. The + fetch operation will be performed automatically once you + run the sync, sync-all, or list action. You can prevent + this automatic fetching using the --nofetch option. + + + + + overlay + overlay + + Add the given overlay from the cached remote list to + your locally installed overlays. Specify "ALL" to add + all overlays from the remote list. + + + + + overlay + overlay + + Remove the given overlay from your locally installed + overlays. Specify "ALL" to remove all overlays + + + + + overlay + overlay + + Update the specified overlay. Use "ALL" as + parameter to synchronize all overlays + + + + + overlay + overlay + + Display all available information about the specified overlay. + + + + + + + + Update all overlays. Shortcut for -s ALL. + + + + + + + + List the contents of the remote list. + + + + + + + + List the locally installed overlays. + + + + + + + + + Other options + + List of other available layman options. + + + + + path + path + + Path to an alternative configuration file. + + + + + url + url + + Specifies the location of additional overlay + lists. You can use this flag several times and the + specified urls will get temporarily appended to the list + of urls you specified in your config file. You may also + specify local file URLs by prepending the path with + file://. This option + will only append the URL for this specific layman run - + edit your config file to add a URL permanently. So this + is useful for testing purposes. + + + + + + + + + Prevents layman from + automatically fetching the remote lists of overlays. The + default behaviour for layman is to + update all remote lists if you run the sync, list or + fetch operation. + + + + + + + + Prevents layman from checking + the remote lists of overlays for complete overlay + definitions. The default behaviour for layman is to + reject overlays that do not provide a description or a + contact attribute. + + + + + + + + Makes layman completely quiet. + This option is dangerous: If the processes spawned by + layman when adding or synchronizing overlays require + any input layman will hang without telling you + why. This might happen for example if your overlay + resides in subversion and the SSL certificate of + the server needs acceptance. + + + + + + + + Makes layman more verbose and + you will receive a description of the overlays you can + download. + + + + + + + + Remove color codes from the layman + output. + + + + + LEVEL + LEVEL + + Makes layman less verbose. + Choose a value between 0 and 4 with 0 being completely + quiet. Once you set this below 3, the same warning as + given for --quiet applies. + + + + + LEVEL + LEVEL + + Use this option in combination with + the --add. It will modify the + priority of the added overlay and thus influence the + order of entries in the make.conf file. The lower the + priority, the earlier in the list the entry will be + mentioned. Use a value between 0 and 100. The default + value is 50. + + + + + + + + + + + + Configuration + + layman reads configuration parameters + from the file + /etc/layman/layman.cfg by + default. This file provides seven possible settings. + + + + + + + Directory that will be used to store the overlays + and all additional data layman + needs. The default is + /usr/portage/local/layman. layman + uses a location within the /usr/portage hierarchy instead + of /var in order to + store its data. This decision has been made to support + network filesystems. If you have your portage tree on nfs + or a similar filesystem and several machines access the + same ebuild repository over the net it will be necessary + to also provide all necessary layman + data within the hierarchy of the tree. This way the + overlays will also have to be synced at one location + only. + + + + + + + layman will store the downloaded + global list of overlays here. The default is + %(storage)s/cache.xml. + + + + + + + layman will store the list of + installed overlays here. The default is + %(storage)s/overlays.xml. + + + + + + + This is the portage configuration file that + layman will modify in order to make + the new overlays available within portage. The default + is %(storage)s/make.conf. You could + also specify /etc/make.conf + directly. But that would mean that you have + an external program trying to automatically set + variables within this very central configuration + file. Since I consider that dangerous I prefer having a + very small external file that only contains the setting + for PORTAGE_OVERLAYS. This file is then sourced at the + end of /etc/make.conf. This is the + reason why layman suggests running + "echo "source + /usr/portage/local/layman/make.conf" >> + /etc/make.conf" after it has been + installed. + + + + + + + Specifies the url for the remote list of all + available overlays. The default is + http://www.gentoo.org/proj/en/overlays/layman-global.txt. You + can specify several URLs here (one per line). The + contents will get merged to a single list of + overlays. This allows to add a personal collection of + overlays that are not present in the global list. + + + + + + + Specify your proxy in case you have to use + one. + + + + + + + Set to "yes" if layman should stop + worrying about overlays with missing a contact address or + the description. + + - + - + - Handling overlays + + Handling overlays layman intends to provide easy - maintenance of gentoo overlays while not requiring any - configuration. + maintenance of Gentoo overlays while not requiring any + configuration. - + - Remote overlay lists + Overlay lists - layman allows you to fetch an overlay - without the need to modify any configuration files. In - order for this to be possible the script needs an external - list of possible overlay sources. There will be a - centralized list available here, - but nothing will prevent you from using or publishing your - own list of overlays. The location of the remote lists can - also be modified using the option - when running layman. + layman allows you to fetch an + overlay without the need to modify any configuration + files. In order for this to be possible the script needs an + external list of possible overlay sources. There is a + centralized list available at + but nothing will prevent you from using or publishing your + own list of overlays. The location of the remote lists can + also be modified using the + option when running layman. To get a new overlay added to the central list provided - for layman, send a mail to - overlays@gentoo.org. Gentoo developers may - add their overlay entries directly into the list which can - be accessed over the CVS repository for the Gentoo - website. + for layman, send a mail to + overlays@gentoo.org. Gentoo developers may + add their overlay entries directly into the list which can + be accessed over the CVS repository for the Gentoo + website. You can also use several lists at the same time. Just @@ -225,9 +633,9 @@ layman also allows you to define - local files in this list. Just make sure you prepend these - pathnames in standard URL notation - with file://. + local files in this list. Just make sure you prepend these + pathnames in standard URL notation + with file://. If you need to use a proxy for access to the internet, @@ -237,59 +645,59 @@ environment variable in case you set it. - + - + Local cache layman stores a local copy of the - fetched remote list. It will be stored in - /usr/portage/local/layman/cache.xml - by default. There exists only one such cache file and it - will be overwritten every time you - run layman. + fetched remote list. It will be stored in + /usr/portage/local/layman/cache.xml + by default. There exists only one such cache file and it + will be overwritten every time you + run layman. - + - + Handling <filename>/etc/make.conf</filename> Since layman is designed to - automatically handle the inclusion of overlays into your - system it needs to be able to modify - the PORTDIR_OVERLAY variable in your - /etc/make.conf file. But - /etc/make.conf is a very central and - essential configuration file for a gentoo - system. Automatically modifying this file would be - somewhat dangerous. You can - allow layman to do this by setting - the make_conf variable in the - configuration file to /etc/make.conf. + automatically handle the inclusion of overlays into your + system it needs to be able to modify + the PORTDIR_OVERLAY variable in your + /etc/make.conf file. But + /etc/make.conf is a very central and + essential configuration file for a Gentoo + system. Automatically modifying this file would be + somewhat dangerous. You can + allow layman to do this by setting + the make_conf variable in the + configuration file to /etc/make.conf. A much safer and in fact recommended solution to the - problem is to let layman handle an - external file that only contains - the PORTDIR_OVERLAY variable and is - sourced within the - standard /etc/make.conf file. Just add the following line to the end of your - /etc/make.conf file: + problem is to let layman handle an + external file that only contains + the PORTDIR_OVERLAY variable and is + sourced within the + standard /etc/make.conf file. Just add the following line to the end of your + /etc/make.conf file: source /usr/portage/local/layman/make.conf /usr/portage/local/layman/make.conf - is the default provided in the layman - configuration. Change this filename in case you decide to - store it somewhere else. + is the default provided in the layman + configuration. Change this filename in case you decide to + store it somewhere else. The file does not necessarily need to exist at the - beginning. If it is missing, layman will create it for you. + beginning. If it is missing, layman will create it for you. There is also no need to remove the @@ -298,285 +706,163 @@ this variable and all your old entries will remain in there. - + - + Adding, removing and updating overlays Once a remote list of overlays has been fetched, - layman allows to add overlays from the - remote list to your system. The script will try to fetch - the overlay. If this is successful the overlay information - will be copied from the cache to the list of locally - installed overlays. In addition - layman will modify the - PORTDIR_OVERLAY variable to include the - new overlay path. + layman allows to add overlays from the + remote list to your system. The script will try to fetch + the overlay. If this is successful the overlay information + will be copied from the cache to the list of locally + installed overlays. In addition + layman will modify the + PORTDIR_OVERLAY variable to include the + new overlay path. Removing the overlay with layman will - delete the overlay without leaving any traces behind. + delete the overlay without leaving any traces behind. In order to update all overlays managed by - layman you can run the script with the - option or - the flag. + layman you can run the script with the + option or + the flag. - + - + List overlays layman provides the - and - options to print a list of available respectively - installed overlays. + and + options to print a list of available respectively + installed overlays. Listing will prepend all fully supported overlays - with a green asterisk, all non-official overlays with a - yellow asterisk and all overlays that you will not be able - to use since you do not have the necessary tools installed - with a red asterisk. + with a green asterisk, all non-official overlays with a + yellow asterisk and all overlays that you will not be able + to use since you do not have the necessary tools installed + with a red asterisk. In the default mode layman will be strict about - listing overlays and only present you with overlays that - are fully supported. In addition it will complain about - overlays that are missing a description field or a contact - attribute. This type of behaviour has been added with - layman-1.0.7 and if you'd like to return to the old - behaviour you may use the k option flag or set the nocheck - option in the configuration file. + listing overlays and only present you with overlays that + are fully supported. In addition it will complain about + overlays that are missing a description field or a contact + attribute. This type of behaviour has been added with + layman-1.0.7 and if you'd like to return to the old + behaviour you may use the k option flag or set the nocheck + option in the configuration file. - + - + Overlay types Currently layman supports overlays that - are exported via rsync, - subversion, bzr, - darcs, git, - mercurial or provided - as tar packages. + are exported via rsync, + subversion, bzr, + darcs, git, + mercurial or provided + as tar packages. - - - - - - - Actions - - List of possible layman actions. - - - - - - - Fetches the remote list of overlays. You will - usually NOT need to explicitely specify this option. The - fetch operation will be performed automatically once you - run the sync, sync-all, or list action. You can prevent - this automatic fetching using the --nofetch option. - - - - - overlay - overlay - - Add the given overlay from the cached remote list to - your locally installed overlays. Specify "ALL" to add - all overlays from the remote list. - - - - - overlay - overlay - - Remove the given overlay from your locally installed - overlays. Specify "ALL" to remove all overlays - - - - - overlay - overlay - - Update the specified overlay. Use "ALL" as - parameter to synchronize all overlays - - - - - overlay - overlay - - Display all available information about the specified overlay. - - - - - - - - Update all overlays. Shortcut for -s ALL. - - - - - - - - List the contents of the remote list. - - - - - - - - List the locally installed overlays. - - - - - - - - - Options + + + + + + + Overlay lists + + + + Overlay list format + + + Layman uses a central list of overlays in xml format. The file looks like this: + + An example overlay.xml file + + <?xml version="1.0" ?> + <layman> + <overlays> + <overlay + type = "svn" + src = "https://mydomain.net/svn/myoverlay/" + contact = "me@mydomain.net" + name = "myoverlay"> + + <link> + http://mydomain.net/myoverlay + </link> + + <description> + Contains some of my ebuilds. + </description> + </overlay> + </overlays> + + + - List of available layman options. + - + - - path - path - - Path to an alternative configuration file. - - + Adding an overlay locally - - url - url - - Specifies the location of additional overlay - lists. You can use this flag several times and the - specified urls will get temporarily appended to the list - of urls you specified in your config file. You may also - specify local file urls by prepending the path with - file://. This option will only append the URL for this - specific layman run - edit your config file to add a URL - permanently. So this is useful for testing purposes. - - - - - - - - - Prevents layman from - automatically fetching the remote lists of overlays. The - default behaviour for layman is to - update all remote lists if you run the sync, list or - fetch operation. - - + + Simply create an overlay list in the format described + above and run layman with the + switch. You need to + prepend local file URLs with + file://. + - - - - - Prevents layman from checking - the remote lists of overlays for complete overlay - definitions. The default behaviour for layman is to - reject overlays that do not provide a description or a - contact attribute. - - + - - - - - Makes layman completely quiet. - This option is dangerous: If the processes spawned by - layman when adding or synchronizing overlays require - any input layman will hang without telling you - why. This might happen for example if your overlay - resides in subversion and the SSL certificate of - the server needs acceptance. - - + - - - - - Makes layman more verbose and - you will receive a description of the overlays you can - download. - - + Adding an overlay globally - - - - - Remove color codes from the layman - output. - - + + The global list of overlays used by + layman lies at + http://www.gentoo.org/proj/en/overlays/layman-global.txt. + - - LEVEL - LEVEL - - Makes layman less verbose. - Choose a value between 0 and 4 with 0 being completely - quiet. Once you set this below 3, the same warning as - given for --quiet applies. - - + + All Gentoo developers have access to this location via CVS + and can modify the list of overlays. + - - LEVEL - LEVEL - - Use this option in combination with - the --add. It will modify the - priority of the added overlay and thus influence the - order of entries in the make.conf file. The lower the - priority, the earlier in the list the entry will be - mentioned. Use a value between 0 and 100. The default - value is 50. - - + + If you are not a Gentoo developer but whish to get your + overlay listed you should contact the Gentoo Overlays team + at overlays@gentoo.org. You can also join + #gentoo-overlays on + irc.freenode.net. + - + - + - + - Examples + Examples - + Installing an overlay @@ -585,18 +871,18 @@ wrobel to your list of installed overlays. - + - + Syncing your overlays layman -s ALL This updates all overlays - + - + Performing several actions at the same time @@ -604,13 +890,13 @@ This fetches the remote list and immediately adds two overlays - + - + - + - Files + Files @@ -624,7 +910,17 @@ - + + + + + Reporting bugs + + + Please report bugs you might find at + + +
diff --git a/ebuild/layman-1.0.99.ebuild b/ebuild/layman-1.0.99.ebuild deleted file mode 100644 index f246993..0000000 --- a/ebuild/layman-1.0.99.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/layman-1.0.10.ebuild,v 1.1 2007/01/09 18:01:15 wrobel Exp $ - -inherit eutils distutils - -DESCRIPTION="A python script for retrieving gentoo overlays." -HOMEPAGE="http://projects.gunnarwrobel.de/scripts" -SRC_URI="http://build.pardus.de/downloads/${PF}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" -IUSE="" -S=${WORKDIR}/${PF} - -DEPEND="" -RDEPEND="" - -pkg_setup() { - if has_version dev-util/subversion && built_with_use dev-util/subversion nowebdav; then - eerror "You must rebuild your subversion without the nowebdav USE flag" - die "You must rebuild your subversion without the nowebdav USE flag" - fi -} - -src_install() { - - distutils_src_install - - dodir /etc/layman - cp etc/* ${D}/etc/layman/ - - doman doc/layman.8 - dohtml doc/layman.8.html - -} - -src_test() { - cd ${S} - einfo "Running layman doctests..." - echo - if ! PYTHONPATH="." ${python} layman/tests/dtest.py; then - eerror "DocTests failed - please submit a bug report" - die "DocTesting failed!" - fi -} - -pkg_postinst() { - einfo "You are now ready to add overlays into your system." - einfo - einfo "layman -L" - einfo - einfo "will display a list of available overlays." - einfo - ewarn "Use the -k switch to also list overlays that are" - ewarn "considered less secure." - einfo - elog "Select an overlay and add it using" - einfo - elog "layman -a overlay-name" - einfo - elog "If this is the very first overlay you add with layman," - elog "you need to append the following statement to your" - elog "/etc/make.conf file:" - elog - elog "source /usr/portage/local/layman/make.conf" - elog - elog "If you modify the 'storage' parameter in the layman" - elog "configuration file (/etc/layman/layman.cfg) you will" - elog "need to adapt the path given above to the new storage" - elog "directory." - einfo - ewarn "Please add the 'source' statement to make.conf only AFTER " - ewarn "you added your first overlay. Otherwise portage will fail." - epause 5 -} diff --git a/ebuild/layman-1.1.ebuild b/ebuild/layman-1.1.ebuild new file mode 100644 index 0000000..f246993 --- /dev/null +++ b/ebuild/layman-1.1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/layman/layman-1.0.10.ebuild,v 1.1 2007/01/09 18:01:15 wrobel Exp $ + +inherit eutils distutils + +DESCRIPTION="A python script for retrieving gentoo overlays." +HOMEPAGE="http://projects.gunnarwrobel.de/scripts" +SRC_URI="http://build.pardus.de/downloads/${PF}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="" +S=${WORKDIR}/${PF} + +DEPEND="" +RDEPEND="" + +pkg_setup() { + if has_version dev-util/subversion && built_with_use dev-util/subversion nowebdav; then + eerror "You must rebuild your subversion without the nowebdav USE flag" + die "You must rebuild your subversion without the nowebdav USE flag" + fi +} + +src_install() { + + distutils_src_install + + dodir /etc/layman + cp etc/* ${D}/etc/layman/ + + doman doc/layman.8 + dohtml doc/layman.8.html + +} + +src_test() { + cd ${S} + einfo "Running layman doctests..." + echo + if ! PYTHONPATH="." ${python} layman/tests/dtest.py; then + eerror "DocTests failed - please submit a bug report" + die "DocTesting failed!" + fi +} + +pkg_postinst() { + einfo "You are now ready to add overlays into your system." + einfo + einfo "layman -L" + einfo + einfo "will display a list of available overlays." + einfo + ewarn "Use the -k switch to also list overlays that are" + ewarn "considered less secure." + einfo + elog "Select an overlay and add it using" + einfo + elog "layman -a overlay-name" + einfo + elog "If this is the very first overlay you add with layman," + elog "you need to append the following statement to your" + elog "/etc/make.conf file:" + elog + elog "source /usr/portage/local/layman/make.conf" + elog + elog "If you modify the 'storage' parameter in the layman" + elog "configuration file (/etc/layman/layman.cfg) you will" + elog "need to adapt the path given above to the new storage" + elog "directory." + einfo + ewarn "Please add the 'source' statement to make.conf only AFTER " + ewarn "you added your first overlay. Otherwise portage will fail." + epause 5 +} diff --git a/etc/layman.cfg b/etc/layman.cfg index 51f2e70..b6073e5 100644 --- a/etc/layman.cfg +++ b/etc/layman.cfg @@ -1,10 +1,5 @@ [MAIN] -#----------------------------------------------------------- -# Path to the config directory - -config_dir: /etc/layman - #----------------------------------------------------------- # Defines the directory where overlays should be installed diff --git a/layman/config.py b/layman/config.py index d13806f..597cf2d 100644 --- a/layman/config.py +++ b/layman/config.py @@ -52,11 +52,10 @@ class Config(object): >>> a['overlays'] '\\nhttp://www.gentoo.org/proj/en/overlays/layman-global.txt' >>> sorted(a.keys()) - ['cache', 'config', 'config_dir', 'local_list', 'make_conf', 'nocheck', 'overlays', 'proxy', 'quietness', 'storage'] + ['cache', 'config', 'local_list', 'make_conf', 'nocheck', 'overlays', 'proxy', 'quietness', 'storage'] ''' - self.defaults = {'config_dir': '/etc/layman', - 'config' : '/etc/layman/layman.cfg', + self.defaults = {'config' : '/etc/layman/layman.cfg', 'storage' : '/usr/portage/local/layman', 'cache' : '%(storage)s/cache', 'local_list': '%(storage)s/overlays.xml', -- cgit v1.2.3-1-g7c22