Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumb question: Should procmail-wrapper.c be modernized? #60

Closed
chris001 opened this issue May 6, 2022 · 22 comments
Closed

Dumb question: Should procmail-wrapper.c be modernized? #60

chris001 opened this issue May 6, 2022 · 22 comments

Comments

@chris001
Copy link
Contributor

chris001 commented May 6, 2022

  1. Why couldn't this tiny, 20 lines of code, one function, simple procmail-wrapper.c program be ported from C to something cross platform and universally compatible with all CPU architectures such as a bash shell script, so that it could finally run on ARM and ARM64 and escape from a seemingly unnecessary requirement of binary compatibility to X86/X86-64?
  2. Or, why isn't it getting compiled from source on the server at install time, so that, again, it could run on any arch including ARM/ARM64 ?
@swelljoe
Copy link
Collaborator

swelljoe commented May 6, 2022

It can run on ARM. It compiles with one command, takes thirty seconds. The issue with ARM support is I simply don't have time right now to maintain/test yet another distro/architecture combination. It's already dozens of repositories.

We are deprecating procmail in Virtualmin 8 (which is, admittedly, a long way off).

@chris001
Copy link
Contributor Author

chris001 commented May 6, 2022

OK so this is actually a devops issue, caused by linux distro forking. How to reduce test workload burden on humans and shift it over to automated Travis test scripts here on github, for the purpose of validating that install script successfully runs to the end, with zero error codes, on all distros. This is painless and easy to setup, it's been done by many projects before already, and should be prioritized, because it'd positively impact the entire dev test and release cycle by getting to play on easy mode.

@swelljoe
Copy link
Collaborator

swelljoe commented May 6, 2022

Are you volunteering to write those tests?

@chris001
Copy link
Contributor Author

chris001 commented May 6, 2022

I'd be game to look into how to get Travis to auto run the test install on each and every OS.
Update: #61
If you activate Travis on this repo, it should run these PR and show whether they work!
Travis is free for open source projects, you just have to request:
"We will be offering an allotment of OSS minutes that will be reviewed and allocated on a case by case basis. Should you want to apply for these credits please open a request with Travis CI support stating that you’d like to be considered for the OSS allotment. Please include:

Your account name and VCS provider (like travis-ci.com/github/[your account name] )
How many credits (build minutes) you’d like to request (should your run out of credits again you can repeat the process to request more or discuss a renewable amount)"

@swelljoe
Copy link
Collaborator

swelljoe commented May 6, 2022

Travis is broken, and will need human intervention from the Travis CI folks, as far as I know. When I turned Virtualmin into an organization it broke the Travis connection and I was unable to get it back.

@swelljoe
Copy link
Collaborator

swelljoe commented May 6, 2022

Note that the existing tests just validate code, they do not run the install script. Running tests here does not test an install, it confirms the code passes some code quality checks.

@chris001
Copy link
Contributor Author

chris001 commented May 7, 2022

Travis is broken, and will need human intervention from the Travis CI folks, as far as I know. When I turned Virtualmin into an organization it broke the Travis connection and I was unable to get it back.

Contact Travis Support because you're a maintainer/member of the Virtualmin github organization.

@chris001
Copy link
Contributor Author

chris001 commented May 7, 2022

Note that the existing tests just validate code, they do not run the install script. Running tests here does not test an install, it confirms the code passes some code quality checks.

Thanks, the PR #61 I made still does that prove, and also creates several OS containers, downloads and runs the install script inside them.

@jcameron
Copy link
Contributor

jcameron commented May 7, 2022

We could actually compile the procmail-wrapper.c file at Virtualmin install time as an alternative to supplying a binary package, in theory..

@chris001
Copy link
Contributor Author

chris001 commented May 7, 2022

We could actually compile the procmail-wrapper.c file at Virtualmin install time as an alternative to supplying a binary package, in theory..

Or, rewrite it in bash shell script so that no compilation would be required? Any tech reason not to? It simply checks arguments, and calls setguid setuid and exec.

@swelljoe
Copy link
Collaborator

swelljoe commented May 7, 2022

Production servers shouldn't have compilers. 🤷‍♂️

@iliajie
Copy link
Contributor

iliajie commented May 7, 2022

Besides, this is not the only one package we need to support ARM.

@chris001
Copy link
Contributor Author

chris001 commented May 7, 2022

@swelljoe @iliajie
I wrote to Travis support and received a reply, they say to do this to reconnect the virtualmin org and its repos to Travis:
"...please sign into your personal user account (on https://www.travis-ci.com ) and then add your missing org (virutalmin) from your profile page, or by following the link:

https://github.com/apps/travis-ci/installations/new
"
Reminder, it's free for open source projects such as this!

@swelljoe
Copy link
Collaborator

swelljoe commented May 7, 2022

Travis CI continues to be broken for Virtualmin repos. I tried multiple times to go through the "activate" and add repos steps and it continues to say "We couldn’t find any active repositories you have access to. You can add repositories by clicking the “Manage repositories on GitHub” button above."

No errors, the repos just never show up. I'm done fighting with Travis again for a while.

@chris001
Copy link
Contributor Author

chris001 commented May 7, 2022

Seems to be an access rights issue. Travis (the website) has to be able to "see" that you're an officially listed "member" of this virtualmin github "organization". I browsed this girhub "organization" and see no names listed. Whoever is the official "owner" of this github organization, needs to click and add you as a "member", and/or manager of this repo, whatever is the high enough access rights to do the adding Travis to this repo here on github and adding the repo to Travis on travis-ci.com also.

@swelljoe
Copy link
Collaborator

swelljoe commented May 7, 2022

I am the owner of the organization, and I have done that. It simply does not work.

@swelljoe
Copy link
Collaborator

swelljoe commented May 7, 2022

This was a problem way back when I converted it to an org. It continues to be a problem. Apparently if they had it setup with user access and then it gets converted to an organization, something just breaks, and there's nothing to be done about it. I don't know.

@chris001
Copy link
Contributor Author

chris001 commented May 8, 2022

That issue had to do with the travis "org to com migration" and was happening back in October however I believe they've gotten it fully under control. If you'd contact Support and paste in your above comment, and the support rep will troubleshoot and guide you right thru the process until successful activation.

@chris001
Copy link
Contributor Author

chris001 commented May 8, 2022

@swelljoe When I hover the mouse over your username/pic here on github, the popup doesn't say anything about "owner of repo" or "manager of organization", just says "committed to this repo". Maybe these ACL access rights to the org and repo, need to be set "visible" for Travis to see you have them, and therefore let you do access restricted things like activate the github Travis app onto all the virtualmin org's repos...?

@swelljoe
Copy link
Collaborator

swelljoe commented May 8, 2022

It sees them, and it allows me to go through the process of adding access via Githubs Apps UI. It looks like it is working (I've done this hundreds of times for a bunch of apps for my other work, this is not unfamiliar terrirory). It just doesn't show them when that's done (several times).

@chris001
Copy link
Contributor Author

chris001 commented May 9, 2022

Let me share the full support message from Erika at Travis just so it'll make more sense:
"Hi Chris,

Thanks for your reply, it looks like from our database virtualmin is a user account, is this correct? If so, please sign into https://www.travis-ci.com/ from the user account "virtualmin". If this is an organizational account, please sign into your personal user account and then add your missing org from your profile page, or by following the link:

https://github.com/apps/travis-ci/installations/new

Best,

--
Erika

Your Friends @travis-ci

Test and Deploy with Confidence.


Travis CI GmbH, Rigaer Str.8, 10247 Berlin, Germany | GF/CEO: Randy Jacops | Contact: | Amtsgericht Charlottenburg, Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648"

Looks like, the problem is, their database thinks "@virtualmin" is still a user account as it used to be, yet you converted it into an org account, so I think you need to contact support and tell them you converted to org, would they convert it to an org account on their side, on their database?

@chris001
Copy link
Contributor Author

chris001 commented May 9, 2022

Update from Travis support:
"Hello Chris,

Thank you for your reply.

It seems the user @swelljoe is the admin of Virtualmin (@virtualmin) GitHub Org on the Travis CI platform. They would need to head over to https://app.travis-ci.com/organizations/virtualmin/migrate and migrate the repository virtualmin-install which would restore the build history from travis-ci.org to travis-ci.com and activate the repository on the Travis CI platform as well.

Hope this helps. Let us know if you have any additional queries, we will gladly help.

Best,
Qasim"

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

No branches or pull requests

4 participants