summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* WebappConfig/config.py: Fixes spacing issue in --help output.Devan Franchini2014-01-241-1/+1
|
* WebappConfig/db.py: Slightly alters prune_database() algorithm.Devan Franchini2014-01-241-3/+1
| | | | | | | | | | | | When the prune_database() function checks to see if a webapp is installed in the directory the database says it's supposed to be installed in it originally checked to see if a .webapp file existed in the directory. But due to the fact that a .webapp file could exist in a directory and not be the webapp that is listed as installed in that directory it was decided that checking the existance of the .webapp-<webapp>-<version> file would be better as it confirms that a webapp exists in that directory and it is the webapp that it is supposed to be.
* doc/webapp-config.8.xml: Improves man page synopsis.Devan Franchini2014-01-241-0/+12
| | | | | | | | | | | | | | Improvements done to the synopsis of webapp-config include the following: including the --copy, --soft, and --secure flags with the synopsis for the -U flag to indicate to the user that these flags are also usable with this flag. Adding the necessary opts app-name and app-version for the -C flag to indicate to users that these two args are necessary when uninstalling a webapp. And adding the --secure flag to the synopsis for the -C flag to indicate that it is an optional arg if the --secure flag is used with the -I flag or -U flag. X-Gentoo-Bug: 496568 X-Gentoo-Bug-URL: https://bugs.gentoo.org/496568
* WebappConfig/content.py: Nulls doctest code in add() function.Devan Franchini2014-01-241-18/+18
| | | | | | | | | Due to the variable nature of the output in the add() function in content.py it was dicussed that the best decision would be to disable the failing doctest code and prevent it from causing failures. X-Gentoo-Bug: 430010 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010
* WebappConfig/ebuild.py: Nulls doctest code in run_var()Devan Franchini2014-01-241-23/+23
| | | | | | | | | | | | Due to the variable nature of the output of the run_var() function it is unrealistic to create doctest code that will not fail a test. This is mainly due to the fact that there are particular variables that may never be the same on any two user's systems. It has been decided that the best solution would be to simply "comment out" the doctest code to prevent it from running and causing failures. X-Gentoo-Bug: 430010 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010
* WebappConfig/config.py: Uses maybe_get() function instead of get().Devan Franchini2014-01-241-3/+1
| | | | | | | | | | | | | | | This changes the use of the get() function in the split_hostname() function in favor of the maybe_get() function. This change still allows vhost_subdomain_# variables to be set in /etc/vhosts/webapp-config without the risk of it being overwritten except due to the use of the maybe_get() function it will no longer give warnings to the user if a vhost_subdomain_# variable is not found. This is ideal because it removes the need of masking the warning in the get() function. X-Gentoo-Bug: 300250 X-Gentoo-Bug-URL: https://bugs.gentoo.org/300250 X-Gentoo-Bug: 349491 X-Gentoo-Bug-URL: https://bugs.gentoo.org/349491
* WebappConfig/config.py: Prevents overwriting config variables.Devan Franchini2014-01-241-1/+4
| | | | | | | | | | | | | | | | | | When setting vhost_subdomain_# variables in /etc/vhosts/webapp-config they have a possibility of being overwritten by the split_hostname() function. To see this happen you should set vhost_subdomain_1 to a value and try and use it as a variable in your config file. This will then get overwritten by your vhost_hostname. This commit will prevent that from occuring while also having the get() method ignore the inexistence of a vhost_subdomain_# variable in your config file, due to the fact that if the variable does exist it will be used, and if the variable does not exist then it will get overwritten by a piece of vhost_hostname that is separated by the "." delimiter. X-Gentoo-Bug: 300250 X-Gentoo-Bug-URL: https://bugs.gentoo.org/300250 X-Gentoo-Bug: 349491 X-Gentoo-Bug-URL: https://bugs.gentoo.org/349491
* WebappConfig/db.py: Removes printing of 'action' when calling prune_database().Devan Franchini2014-01-241-1/+0
|
* WebappConfig/config.py: Cleans whitespace.Devan Franchini2014-01-241-1/+1
|
* WebappConfig/{db,config}.py: Adds support for prune-database() function.Devan Franchini2014-01-242-16/+43
| | | | | | | | | This renames the prune-db() function to prune-database() as well as adding a command line option to call the function and implements it in config.py. X-Gentoo-Bug: 490090 X-Gentoo-Bug-URL: https://bugs.gentoo.org/490090
* WebappConfig/db.py: Adds prune_db() function.Devan Franchini2014-01-241-0/+37
| | | | | | | | | This function will check for "stray" webapp installation entries in the installs files located in /var/db/webapps/<package name>/<version>. This function is not implemented yet. X-Gentoo-Bug: 490090 X-Gentoo-Bug-URL: https://bugs.gentoo.org/490090
* WebappConfig/ebuild.py Restores changes done by previous commit.Devan Franchini2014-01-011-18/+18
|
* WebappConfig/ebuild.py: Alters doctest output to default values.Devan Franchini2013-12-311-18/+18
| | | | | | | | | | On line 232 on ebuild.py the testing of the documentation was failing due to not returning full variables and instead returning a varaible along with "..." in the place of any part of a variable that can change. The placement of the "..." was causing the doctest to fail upon emerge. X-Gentoo-Bug: 430010 X-Gentoo-Bug-URL: https://bugs.gentoo.org/430010
* AUTHORS: Stuart Herbert's email is probably still validAnthony G. Basile2013-10-311-1/+1
|
* Bump to version 1.521.52Anthony G. Basile2013-10-312-8/+8
|
* WebappConfig/config.py: Modifies default interpolation style.Devan Franchini2013-10-291-25/+29
| | | | | | | | | | | Due to python3.2 using one interpolation style when running ConfigParser it was necessary to change the interpolation style to the Extended Interpolation style which allows ConfigParser to interpolate such variables that follow the style of ${} in config.py and the config file in /etc/vhosts/webapp-config. For total backwards compatibility we also needed to change the interpolation style being used in config.py because it was using a Basic Interpolation style of %(variable)s. This change has been tested with both python3.2 and python2.7.
* WebappConfig/db.py: Removes cherry-pick message in db.py.Devan Franchini2013-10-281-2/+0
|
* WebappConfig/db.py converts keys dictionary to sorted list.Devan Franchini2013-10-281-4/+4
| | | | | Conflicts: WebappConfig/db.py
* WebappConfig/db.py: Encodes entry output for .webapp-<app>-<version>.Devan Franchini2013-10-281-1/+1
| | | | | | This encodes the variable entry in utf-8 when writing to a .webapp-<app>-<version> file, due to previous errors where str did not support the buffer interface.
* WebappConfig/dotconfig.py: Encodes .webapp info in utf-8 when writing.Devan Franchini2013-10-281-2/+1
|
* WebappConfig/content.py: Encodes md5 content in utf-8 when writing.Devan Franchini2013-10-281-1/+1
|
* WebappConfig/compat.py: Alters warped compat file from cherry-picking.Devan Franchini2013-10-281-10/+0
|
* WebappConfig/config.py: Corrects get() function arguments.Devan Franchini2013-10-281-2/+2
| | | | | | Adds *args, and **kwargs for the wrapper get() function in config.py in order to add the correct arguments necessary for the get() function in the ConfigParser class.
* WebappConfig/compat.py: Revamps create_md5() function.Devan Franchini2013-10-281-1/+6
| | | | | | | | | | | | This second revamp changes the way in which python is opening the file to create an md5 hash of. Upon calling the open() function it opens the file to read it, or as a binary. This allows for consistent behavior when trying to open either a binary file, or a text file to hash. This method is also much cleaner and sufficient for forward and backwards compatibility. Conflicts: WebappConfig/compat.py
* WebappConfig/db.py: Converts keys.packages.keys() into a list.Devan Franchini2013-10-091-1/+1
| | | | | | | When webapp-cleaner -C <webapp> on python3.2+ an error will arise which says that 'dict_keys' object has no attribute 'sort'. To fix this issue we set the keys to a list. This allows the keys to be properly sorted without error. Tested in python3.2 and python2.7.
* WebappConfig/content.py: returns value from create_md5 to prevent nulls.Devan Franchini2013-09-261-1/+1
|
* WebappConfig/content.py: Fixed inconsistent tab in file where create_md5() ↵Devan Franchini2013-09-251-1/+1
| | | | is declared.
* WebappConfig/db.py: Converts dict_keys into a list to allow sorting.Devan Franchini2013-09-241-1/+1
| | | | | | | | | | When appending the --list-installs flag to webapp-config and using python3.2+ you will receive an error declaring: "AttributeError: 'dict_keys' object has no attribute 'sort'". By setting keys as a list you are then able to list your webapp-config installs without getting any errors. This has also been tested on python2.7. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/content.py: Adds use of create_md5() function.Devan Franchini2013-09-241-2/+2
| | | | | | | This update adds the use of compat.py into content.py and makes use of the create_md5() function. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/compat.py: Adds compatibility check for file_md5().Devan Franchini2013-09-241-0/+27
| | | | | | | | | | | When the file_md5() function is called in python3.2+ a hash file is supposed to be created, and on a if an object is unicode, it needs to be encoded prior to hashing. In order to do this, a file called compat.py has a function in it called create_md5(); this function checks the hexidecimal python version and based on the version, either encodes the file before it hashes, or simply returns the md5 hash. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/permissions.py: Corrected syntax for eval() function.Devan Franchini2013-09-241-1/+1
| | | | | | | | | | | | When the permissions octal was being passed to the eval() function they were previously not being evaluated with python3.2 due to the fact that the octal value was not being declared as an octal. To fix this, it was simply stated that the octal value was one by appending '0o' to the values being piped into the eval() function. X-GENTOO-BUG: 481298 X-GENTOO-BUG-URL: https://bugs.gentoo.org/481298 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Webappconfig/{config.py,worker.py}: Adds configurable --copy option.Devan Franchini2013-08-243-7/+7
| | | | | | | | | | | | | | | | This allows for altering the value of vhost_link_type in /etc/vhosts/webapp-config to copy files by default when installing a webapp as opposed to soft-linking or hard-linking. This patch also repairs the previous damage in which the behavior of the --copy flag was being ignored; due to the fact that the boolean g_copy was not being passed down throughout the program because of the extra --cp flag. Man page alterations have also been made to reflect the removal of the --cp flag in the program. X-Gentoo-Bug: 231482 X-Gentoo-Bug-URL: https://bugs.gentoo.org/231482 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/config.py: fix indentationManuel Rüger2013-08-061-1/+1
| | | | | | | X-Gentoo-Bug: 479884 X-Gentoo-Bug-URL: https://bugs.gentoo.org/479884 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Bump to version 1.511.51Anthony G. Basile2013-08-034-44/+3
|
* WebappConfig/content.py: use hashlib instead of md5 moduleNico Baggus2013-08-031-2/+2
| | | | | X-Gentoo-Bug: 282831 X-Gentoo-Bug-URL: https://bugs.gentoo.org/282831
* WebappConfig/wrapper.py: fix paludis supportcmue812013-08-031-3/+3
| | | | | X-Gentoo-Bug: 428378 X-Gentoo-Bug-URL: https://bugs.gentoo.org/428378
* WebappConfig/{config.py,server.py}: set server uid/gid in the configVincent Brillault2013-08-033-15/+61
| | | | | X-Gentoo-Bug: 432908 X-Gentoo-Bug-URL: https://bugs.gentoo.org/432908
* Webappconfig/config.py: Adds check for package name and versionDevan Franchini2013-08-031-2/+15
| | | | | | | | | | This check is done in the run() function if self.work == "clean" to avoid uninstalling a webapp if the package name and version being listed exist, but aren't the ones located in the .webapp in the specified directory taken from the -d flag. X-Gentoo-Bug: 461410 X-Gentoo-Bug-URL: https://bugs.gentoo.org/461410
* WebappConfig/{db,filetype,permissions}.py: code cleanupVincent Brillault2013-04-223-11/+19
| | | | | | | | | | | | | | 1) Add a __str__ method on class PermissionMap for debugging. 2) Fix a wrong debug mesasge in WebappSource. 3) Replace __fix(i).strip() by __fix(i) in FileType since __fix already strip the input. 4) Add missing cases in FileType comments Thanks Devan Franchini <twitch153@hotmail.com> for testing. X-Gentoo-Bug: 231482 X-Gentoo-Bug-URL: https://bugs.gentoo.org/231482 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* doc/webapp-config.8.xml: fix unpaired tagAnthony G. Basile2013-03-291-0/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/{config,worker}.py: add option to copy filesDevan Franchini2013-03-293-4/+66
| | | | | | | | | | | This adds an option to copy the webapp files rather than hardlink them even if they are on the same filesystem. While this takes up more disk space, it allows one to modify different instances of webapp installations without affecting other instances. X-Gentoo-Bug: 231482 X-Gentoo-Bug-URL: https://bugs.gentoo.org/231482 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/wrapper.py: do not use portage.root to retrive $ROOTDevan Franchini2013-03-231-1/+1
| | | | | | | | | On a prefix system, portage.root equals portage.settings['EROOT'] and not portage.settings['ROOT'], but we need the latter. X-Gentoo-Bug: 434894 X-Gentoo-Bug-URL: https://bugs.gentoo.org/434894 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/worker.py: correct permissions for server-owned dirsVincent Brillault2013-03-131-0/+2
| | | | | | | | | | | | | | | app-admin/webapp-config uses 'os.makedirs(dst_dir, perm(0x755))' to create new directories without any 'os.chown' after. If the configuration contains 'vhost_perms_serverowned_dir="0775"' or vhost_perms_serverowned_dir="g+w" those permissions will be filtered with the default python umask which is '022', resulting in a '0755' permission instead of a '0775' one. Thanks Devan Franchini <twitch153@hotmail.com> for testing. X-Gentoo-Bug: 434894 X-Gentoo-Bug-URL: https://bugs.gentoo.org/434894 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/ebuild.py: don't ignore vhost_config_dir valueChristian Affolter2013-03-091-1/+1
| | | | | | | | Thanks Devan Franchini <twitch153@hotmail.com> for testing. X-Gentoo-Bug: 438276 X-Gentoo-Bug-URL: https://bugs.gentoo.org/438276 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* WebappConfig/db.py: do not leave behind stray install filesEray Aslan2013-02-111-0/+2
| | | | | | | | | Thanks Devan Franchini <twitch153@hotmail.com> for testing. X-Gentoo-Bug: 213130 X-Gentoo-Bug-URL: https://bugs.gentoo.org/213130 Reported-by: Priit Laes <plaes@plaes.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Include current version of the eclass in repoAnthony G. Basile2012-07-131-0/+580
|
* Do not use cmp() for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2012-06-292-13/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Update WebappConfig.version.WCVERSION.Arfrever Frehtes Taifersar Arahesis2012-06-291-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Delete obsolete __version__ attributes.Arfrever Frehtes Taifersar Arahesis2012-06-2912-23/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Update configparser imports for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2012-06-291-16/+23
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>