gsliepen / tinc

a VPN daemon
http://tinc-vpn.org/
Other
1.87k stars 280 forks source link

ARM64 Ubuntu build #407

Open flosoft opened 2 years ago

flosoft commented 2 years ago

It would be great to also have arm64 builds for Ubuntu 22.04 alongside the amd64 ones.

hg commented 2 years ago

I'm thinking we should just move packages to OBS instead of reinventing the wheel. They provide support for lots of distributions and architectures (on real hardware), sign packages and handle 'proper' repositories automatically.

demo:

Setup is a bit contrived. @gsliepen it looks like I can transfer the repository to you (hopefully there are no weird side effects), or you can do it manually (profile setup is needed in both cases):

  1. create an account on https://build.opensuse.org
  2. enable beta features in profile settings
  3. copy this XML to your own profile (fixing usernames and such), or jobs will fail due to missing dependencies
  4. make sure all needed repositories are enabled in your profile (XML may need some further adjustment). The spec works on all currently supported versions of Ubuntu, Debian, SLES/OpenSUSE, and Fedora.
  5. install the CLI (note: the package in PyPI seems to be very old)
  6. update links in tinc.spec and _service
  7. fetch your 'home project' to your own machine: osc checkout home:foobar
  8. copy _service and tinc.spec from my repository (don't forget to change names and links)
  9. add and commit both: osc add * && osc ci -m 'add files'
  10. attach OBS to your github account (docs: one, two, three)
  11. add this thing to the repo (not finished; I'll PR that after OBS is configured)

maybe something else I'm forgetting.

Maintenance should be easy, you just have to toggle checkboxes for new distribution versions once in a while.

This also solves #329.


BTW, the builds are almost reproducible, we can remove build timestamps and make them fully so.

--- /dev/fd/63  2022-06-07 14:14:43.941001412 +0000
+++ /dev/fd/62  2022-06-07 14:14:43.941001412 +0000
@@ -1344,8 +1344,8 @@
  27c70 7778797a 30313233 34353637 38392b2f  wxyz0123456789+/
  27c80 00000000 00000000 00000000 00000000  ................
  27c90 30313233 34353637 38394142 43444546  0123456789ABCDEF
- 27ca0 00312e31 70726531 38003133 3a33313a  .1.1pre18.13:31:
- 27cb0 3135004a 756e2020 37203230 32320000  15.Jun  7 2022..
+ 27ca0 00312e31 70726531 38003134 3a31343a  .1.1pre18.14:14:
+ 27cb0 3330004a 756e2020 37203230 32320000  30.Jun  7 2022..
  27cc0 436f756c 64206e6f 74207265 61642072  Could not read r
  27cd0 616e646f 6d206e75 6d626572 733a2025  andom numbers: %
  27ce0 730a0054 6f6f206d 75636800 496e7661  s..Too much.Inva
fangfufu commented 2 years ago

I think moving to OBS is a great idea. Removing timestamps and making them fully reproducible would be great.

hg commented 2 years ago

Both nightly and stable builds can be supported from the same codebase by branching the main package and replacing this line in _service:

    <param name="revision">@PARENT_TAG@</param>

with this one:

    <param name="revision">1.1</param>

and changing the name in tinc.spec to something like tinc-pre.

I only wish they'd used a more popular SCM instead of re-implementing their own since it's not obvious how it does merging and what to do in case of conflicts.

Which gives us this

for stable builds, and this

for nightly.


As the main developer of tinc you can also (probably) request a top-level project name, so it doesn't have to lie in some obscure 'home project' like it does in my case.

I.e. it can be https://build.opensuse.org/project/show/tinc instead of https://build.opensuse.org/project/show/home:cromulent

Create an account and write to noreply@opensuse.org (yes, that's the correct email).

flosoft commented 6 months ago

hey @hg,

Been using your packages for a while now without any issues, besides a small cosmetic one which is the missing Maintainer field. missing 'Maintainer' field

Any chance of getting that fixed in the package?

hg commented 6 months ago

Sure. It was technically correct, though. I'll keep an eye on it since someone is using it.