| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Although most of the codebase already has python3.x compatibility
when running 2to3 more minor changes where found. This commit
includes the changes found when running 2to3 on webapp-config's
codebase.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When webapp-config cleans out a webapp installation it needs to
remove the database entry of the file from it's designated installs
file. If more than one database entry is in the installs file it
should still list the database entry for the webapp that isn't being
removed. The logic is all there in db.py but after the file has
rewritten the entries it doesn't close the file properly and causes
a failure in the check right after the write(), which then unlinks
the installs file and removes the entries from webapp-config's
database.
X-Gentoo-Bug:494520
X-Gentoo-Bug-URL: https://bugs.gentoo.org/494520
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Conflicts:
WebappConfig/db.py
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
is declared.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
X-Gentoo-Bug: 479884
X-Gentoo-Bug-URL: https://bugs.gentoo.org/479884
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
| |
|
|
|
|
|
| |
X-Gentoo-Bug: 282831
X-Gentoo-Bug-URL: https://bugs.gentoo.org/282831
|
|
|
|
|
| |
X-Gentoo-Bug: 428378
X-Gentoo-Bug-URL: https://bugs.gentoo.org/428378
|
|
|
|
|
| |
X-Gentoo-Bug: 432908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/432908
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|