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

Added Alpine Linux support #1567

Merged
merged 6 commits into from
Jul 26, 2022
Merged

Conversation

giulio-coa
Copy link
Contributor

@giulio-coa giulio-coa commented Jul 16, 2022

Good version of #1566

I have added the support for Alpine Linux.
The pre-requisites to run Pi-VPN on Alpine are:

  • have bash installed (apk add bash)
  • have busybox-initscripts installed (apk add busybox-initscripts)
  • Obviously, run the scripts as root or have sudo installed (apk add sudo; echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel)

@giulio-coa giulio-coa force-pushed the alpine-support branch 3 times, most recently from 13bb917 to 95d55e2 Compare July 16, 2022 15:43
@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 17, 2022

@MichaIng @4s3ti maybe there is a bug in the test version of Pi-VPN.
The tests only fail on Focal and Bionic distributions and not on Xenial.
The bug don't seems related to any changes I've made.

ciscripts/test.sh Outdated Show resolved Hide resolved
scripts/backup.sh Outdated Show resolved Hide resolved
scripts/openvpn/pivpn.sh Outdated Show resolved Hide resolved
scripts/pivpn Outdated Show resolved Hide resolved
scripts/uninstall.sh Outdated Show resolved Hide resolved
scripts/update.sh Outdated Show resolved Hide resolved
auto_install/install.sh Outdated Show resolved Hide resolved
auto_install/install.sh Outdated Show resolved Hide resolved
auto_install/install.sh Outdated Show resolved Hide resolved
@coolapso
Copy link
Member

@MichaIng @4s3ti maybe there is a bug in the test version of Pi-VPN. The tests only fail on Focal and Bionic distributions and not on Xenial. The bug don't seems related to any changes I've made.

don't think there is any bug ... Just triggered the build and the current test is passing in all OS: https://app.travis-ci.com/github/pivpn/pivpn/builds/253283709 so should yours.

you can see the results of the failing tests by yourself, just click on the details.

here's the error: https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888207#L606-L610

@giulio-coa
Copy link
Contributor Author

@MichaIng @4s3ti maybe there is a bug in the test version of Pi-VPN. The tests only fail on Focal and Bionic distributions and not on Xenial. The bug don't seems related to any changes I've made.

don't think there is any bug ... Just triggered the build and the current test is passing in all OS: https://app.travis-ci.com/github/pivpn/pivpn/builds/253283709 so should yours.

you can see the results of the failing tests by yourself, just click on the details.

here's the error: https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888207#L606-L610

I know, but this error is generated by a piece of code that I haven't touch ...
The only change that I have made on scripts/backup.sh is related to the check of an installed package

auto_install/install.sh Outdated Show resolved Hide resolved
@coolapso
Copy link
Member

@MichaIng @4s3ti maybe there is a bug in the test version of Pi-VPN. The tests only fail on Focal and Bionic distributions and not on Xenial. The bug don't seems related to any changes I've made.

don't think there is any bug ... Just triggered the build and the current test is passing in all OS: https://app.travis-ci.com/github/pivpn/pivpn/builds/253283709 so should yours.
you can see the results of the failing tests by yourself, just click on the details.
here's the error: https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888207#L606-L610

I know, but this error is generated by a piece of code that I haven't touch ... The only change that I have made on scripts/backup.sh is related to the check of an installed package

The reason why is not Failing on Xenial is because the scripts tests run in a different way allowing them to fail, the same error is still there:

https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888457#L487

indeed it seems not related with your changes but for some reason it is happening with your changes, not entirely sure why, and I am in the middle of house move hard for me to pay much attention.

@giulio-coa
Copy link
Contributor Author

giulio-coa commented Jul 17, 2022

@MichaIng @4s3ti maybe there is a bug in the test version of Pi-VPN. The tests only fail on Focal and Bionic distributions and not on Xenial. The bug don't seems related to any changes I've made.

don't think there is any bug ... Just triggered the build and the current test is passing in all OS: https://app.travis-ci.com/github/pivpn/pivpn/builds/253283709 so should yours.
you can see the results of the failing tests by yourself, just click on the details.
here's the error: https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888207#L606-L610

I know, but this error is generated by a piece of code that I haven't touch ... The only change that I have made on scripts/backup.sh is related to the check of an installed package

The reason why is not Failing on Xenial is because the scripts tests run in a different way allowing them to fail, the same error is still there:

https://app.travis-ci.com/github/pivpn/pivpn/jobs/576888457#L487

indeed it seems not related with your changes but for some reason it is happening with your changes, not entirely sure why, and I am in the middle of house move hard for me to pay much attention.

Glad I showed you a bug 😅

@MichaIng
Copy link
Contributor

MichaIng commented Jul 17, 2022

Some failures are related to the invalid user pi. Recent Raspberry Pi OS does not ship with this user anymore (Ubuntu of course never did), but on first boot or via RPi Imager one can create a custom login user manually. Before doing anything with pi, check getent passwd pi > /dev/null first, or handling of any hardcoded user could be removed completely. But again, worth a different PR 😉.

auto_install/install.sh Outdated Show resolved Hide resolved
Copy link
Member

@coolapso coolapso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, And seem you got it passing the CI as well during the weekend.

Will get it merged as soon as @orazioedoardo is happy with the changes. Great job all of you :D

@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 25, 2022

pivpn debug will try to read from /var/log/openvpn.log so you could fallback to grep /var/log/messages or something.

This is still undecided. grep may be fragile, maybe just tell the user to take a look at /var/log/messages

@giulio-coa
Copy link
Contributor Author

This is still undecided. grep may be fragile, maybe just tell the user to take a look at /var/log/messages

What do you think could be the best solution?
What would be the piece of code to add?

@orazioedoardo
Copy link
Member

orazioedoardo commented Jul 26, 2022

What would be the piece of code to add?

You could wrap this around a ${PLAT} check to disable on Alpine for now.

@orazioedoardo
Copy link
Member

The script could download and install apk-autoupdate from git similar to what you do for grepcidr, but for now, I will merge.

@coolapso
Copy link
Member

🎉 This PR is included in version 4.1.0-test.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@coolapso
Copy link
Member

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants