Skip to content

Conversation

@gnadelwartz
Copy link
Contributor

@gnadelwartz gnadelwartz commented Mar 20, 2018

Today its only possible to update webmin at once if a new release is provideded or update complete modules or themes from a WBM file. What's missimg is the posibility to provide patches to modules or themes...

PR #875 for a small but important typo leads me to think (again) about a patch functionality for webmin, see discussion webmin/authentic-theme#1069 with @qooob abbout this topic.

The solution seems to be straigthforward: Implement possibility for incremental updates from WMB files!
This is whats be done by this PR.

Whats in this PR:

  • do not delete old module or theme if patch.info is provided
  • WBM file contains only changed files and patch.info

very simply and IMHO straigthforward ...


What is this useful for:

  • preparing a new release for a small fix is much work, so it's for small fixes that are important for some people but not worth a full release
  • can be used from community to fix for external modules no more maintained, e.g. Commodo WAF Comodo WAF module authentic-theme#1054
    no more need for manual editing module files to make it work.
  • individualisation, e.g. a company want's to have other icons or strings inculding the company name
  • simple to use for not experienced end users like installing an additional module or theme
  • ... (anything else including Webmin hotfixes or scripting by using postinstall.pl)

Why not simply update from repo?

  • dev repo may be broken or have new, but not fully tested functionallty
  • update from repo cannot fix external modules or provide induvidualisation
  • even if @qooob plans to provide an UI, there is a risc for not experiend end users to break things

Content of patch.info:

  • can contain every value allowed for module.info or theme.info, these are processed the same way as of now. e.g. requiring a minimum version of webmin or module or a special perl module:
name=Hotfix for spam
desc=Hotfix for spam
depends=spam/1.881
os_support=!windows


Test it:

  • got to webmin install modules as you would do to install a regular module
  • enter URL https://dealz.rrr.de/webmin/hotfix-spam-1881.tar.gz and hit "Install module"to fix issue from PR PR Update save_report.cgi #875

image

spam/save_report.cgi before

    if (!in{"spam_level_char_def"} && &char_check($in{"spam_level_char"})) {
        push(@adds, "all Level _STARS(".$in{ "spam_level_char"} .")_" );
        }

spam/save_report.cgi after

    if (!$in{"spam_level_char_def"} && &char_check($in{"spam_level_char"})) {
        push(@adds, "all Level _STARS(".$in{ "spam_level_char"} .")_" );
        }
  • exchange grey-theme logos with others, e.g. company provided logo's:
    https://dealz.rrr.de/webmin/company-logos-gray-theme.tar.gz

Original:
image

After (Stressfree Icons):
image

@chris001
Copy link

chris001 commented Mar 20, 2018

Nice feature.

  • Off topic: Your comment, "preparing a new release for a small fix is much work", why isn't the work for preparing a release scripted by a bash script by now?
  • If a bash script does not exist to prepare the release, one should be written, this would save tons of manual work!
  • rpm and deb package builds are also easily scripted in bash!
  • As soon as a bash script is written to automatically prepare the release, then it's quite straightforward for travis to run tests and if they pass, to automatically upload the release to a server directory where the distro package management system will see it, download, and install.

@gnadelwartz
Copy link
Contributor Author

gnadelwartz commented Mar 20, 2018

it's scripted, but you have to do tests for many operation systems for now ...
yes, I know about your proposal for using Travis, but even we use Travis, testing for different OS'es is needed.

@chris001
Copy link

@gnadelwartz
Use the step by step commands in the following 2016 technique to run Travis tests, on every operating system, in a qemu virtual machine, running on top of the Travis-provided Ubuntu 14.04 Trusty sudo full virtual machine, it's simple to run all other operating systems in Travis here on github for free. 👍

This qemu method should be used to run all webmin and virtualmin Travis tests, on every supported operating system, CentOS, Fedora, Debian, Ubuntu 16.04, Scientific, OpenBSD, NetBSD, FreeBSD, etc. 👍

@chris001
Copy link

How to test an application inside any full operating system with docker:

Similar software (same code, used by many many different OS) with complete testing methodology on Travis and testing on many OS and even different kernel versions!:

@gnadelwartz gnadelwartz changed the title provide inceremental updates to webmin by using WBM files provide possibility to patch modules or themes with WBM files Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants