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

Create an OpenBSD package (port) of GoatCounter #517

Closed
cavoirom opened this issue Sep 18, 2021 · 6 comments
Closed

Create an OpenBSD package (port) of GoatCounter #517

cavoirom opened this issue Sep 18, 2021 · 6 comments

Comments

@cavoirom
Copy link

cavoirom commented Sep 18, 2021

Because OpenBSD does not have GoatCounter port yet, I want to create one.

I would like to ask if I'm allowed to do so?

Is there any suggestion for me?

The plan will look like:

  • Port name: goatcounter
  • Version: 2.0.4 (taken from tag)
  • User data will be located at: /var/goatcounter
  • Have a configuration file for GoatCounter Arguments at /etc/goatcounter.conf
  • How about the License?
@arp242
Copy link
Owner

arp242 commented Sep 18, 2021

I would like to ask if I'm allowed to do so?

Of course; you don't need my permission for that 🙃

How about the License?

GoatCounter uses the EUPL, see the LICENSE file.

Have a configuration file for GoatCounter Arguments at /etc/goatcounter.conf

It's been quite a while since I last used OpenBSD, but I think using goatcounter_args="..." in /etc/rc.conf should be sufficient? But maybe things changed in the last few years.

@qbit
Copy link

qbit commented Sep 18, 2021

@cavoirom you can use portgen go zgo.at/goatcounter (which is in /usr/ports/infrastructure/bin) to generate a mostly complete port. Take a look at the net/headscale port for an example of how to handle files in etc and rc scripts.

Here is a link to the portgen man page: https://man.openbsd.org/portgen

Let me know if you have any questions!

@cavoirom
Copy link
Author

@qbit thanks for your suggestion, it took me a day to figure out how to create a Go port. I note some useful link here in case others like me search for it:

I finally could create a port (need test) for GoatCounter. I will send it to ports@openbsd.org for comment and suggestion.

I have some questions:

  • I want to create new user & group for goatcounter daemon, I added @newgroup & @newuser to pkg/PLIST. Does it correct?
  • I want to create a directory in /var/goatcounter to store sqlite database, I added @sample /var/goatcounter/, I don't know if it's correct or not?

@arp242 is it possible to publish the latest tag 2.0.4 to Go package repository? I found the latest version is 1.4.2, and the port is based on that version.

@arp242
Copy link
Owner

arp242 commented Sep 19, 2021

Is it possible to publish the latest tag 2.0.4 to Go package repository? I found the latest version is 1.4.2, and the port is based on that version.

I think you're running in to the issue that the tag is v2.x, but the module doesn't use that. I ran in to the same issue some time ago in another project.

I'll get it updated in the next few days.

@cavoirom
Copy link
Author

cavoirom commented Oct 14, 2021

Hi @arp242, do you have chance to update GoatCounter's latest version in Go repository?

@arp242
Copy link
Owner

arp242 commented Dec 1, 2021

I fixed it some time ago, but had to create a new tagged release. I just did so, and should be good now.

@arp242 arp242 closed this as completed Dec 1, 2021
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

3 participants