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

archlinux: update to v2.3.0 #58

Closed
wants to merge 1 commit into from
Closed

Conversation

simaotwx
Copy link

@simaotwx simaotwx commented Apr 9, 2021

No description provided.

@francislavoie
Copy link
Member

@shibumi

@francislavoie
Copy link
Member

francislavoie commented Apr 9, 2021

I think these files aren't actually being used anymore, cause there's now a package here https://archlinux.org/packages/community/x86_64/caddy/

https://github.com/archlinux/svntogit-community/tree/packages/caddy/trunk

@shibumi
Copy link
Contributor

shibumi commented Apr 9, 2021

@francislavoie this is correct. It's actually too difficult for us to sync both repositories. This one here and the arch linux caddy repository. I could continue pushing changes here as well, but I doubt my co-maintainer would do this.

@francislavoie
Copy link
Member

Sounds good. I think we can drop the arch files from this repo, but I very much hope the files in the arch repo do properly inherit the changes that we make here when it comes to the systemd service files and default configuration files. Having this be the same across distros lowers the support burden and reduces possible confusion from users.

@shibumi
Copy link
Contributor

shibumi commented Apr 9, 2021

@francislavoie this will be difficult, because of a few reasons:

  1. CentOS and other "stable" distributions are always behind in terms of systemd and Go versions.
  2. We actuall apply 1-2 patches already: https://github.com/archlinux/svntogit-community/blob/packages/caddy/trunk/override-main-module-version.patch https://github.com/archlinux/svntogit-community/blob/packages/caddy/trunk/use-data-dir-for-autosave.patch
  3. We provide more security settings than other distributions (hardened systemd file, go binaries built with PIE, FULL RELRO and other features, etc).
  4. We ship systemd tmpfiles/sysusers files in our package (other distributions solve these problems via traditional bash hooks). Debian for example has decided that every package needs to be installable on systems without systemd (because of their "init freedom act").

You find all changes here in this directory here: https://github.com/archlinux/svntogit-community/tree/packages/caddy/trunk (the PKGBUILD is basically just a bash script that builds the Arch Linux package).

@francislavoie
Copy link
Member

Thanks for that.

A couple questions while I have you about the existing differences.

  • Why are the XDG_ environment variables being overridden in the service files on arch? i.e. these lines:

    Environment=XDG_DATA_HOME=/var/lib
    Environment=XDG_CONFIG_HOME=/etc
    

    Why not leave it default like on every other platform, having the locations be in the caddy user's $HOME, i.e. /var/lib/caddy/.local/share/caddy and /var/lib/caddy/.config/caddy respectively? This decision means that you needed to introduce a patch that moves the config directory to be the same as the data directory, which breaks the expectation that they should be different locations. Ultimately the effect is inconsequential, but I find it confusing to set XDG_CONFIG_HOME to /etc, then have a patch which changes Caddy's code to not write to /etc (as noted in the patch file, quoting: "We do not want to have any files in /etc being mapped
    writable, not even the /etc/caddy directory")

  • Two days ago, e7752a7 was made, so I hope that this change is reflected in the arch repo to match

I understand the purpose of the other additions to the service files.

@shibumi
Copy link
Contributor

shibumi commented Apr 11, 2021

Two days ago, e7752a7 was made, so I hope that this change is reflected in the arch repo to match

This is definitely something we will follow.

Why are the XDG_ environment variables being overridden in the service files on arch?

I think the commit message speaks pretty much for itself. The autosave.json is more like a state file than a configuration file. The user should not edit the autosave.json file as the path suggests, otherwise it would be in /etc/ like all other configuration files. Furthermore the use of hidden directories adds an unnecessary abstraction layer to the /var/lib/caddy directory.

@francislavoie
Copy link
Member

francislavoie commented May 9, 2021

Alright - I'll close this and delete the archlinux directory from this project, since it's clear it'll be maintained separately from now on.

See 21201de

francislavoie added a commit that referenced this pull request May 9, 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

Successfully merging this pull request may close these issues.

3 participants