Skip to content

apache: remove support for Apache 2.2 and CentOS 6#9354

Merged
bmw merged 4 commits intocertbot:2.0.xfrom
alexzorin:apache-remove-2.2-support
Aug 29, 2022
Merged

apache: remove support for Apache 2.2 and CentOS 6#9354
bmw merged 4 commits intocertbot:2.0.xfrom
alexzorin:apache-remove-2.2-support

Conversation

@alexzorin
Copy link
Copy Markdown
Collaborator

For 2.0.

Fixes #8461.

@alexzorin alexzorin added this to the 2.0 milestone Jul 18, 2022
@ohemorange
Copy link
Copy Markdown
Contributor

Based on the wording of the issue, looks like this is meant to be merged into the 2.0 branch -- were you thinking of merging it into master for some particular reason or is it ok to change it?

@alexzorin
Copy link
Copy Markdown
Collaborator Author

Sorry, yes. All the PRs with 2.0 milestones should be targeting the 2.0 branch. Slipped my mind to set it.

Copy link
Copy Markdown
Contributor

@ohemorange ohemorange left a comment

Choose a reason for hiding this comment

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

So, the code here looks good and checks out, other than my one comment. But it might be nice to have someone more familiar with the Apache module give it a pass to see if there are additional places things could be removed from.

arg_var_interpreter: Pattern = re.compile(r"\$\{[^ \}]*}")
fnmatch_chars: Set[str] = {"*", "?", "\\", "[", "]"}

# pylint: disable=unused-argument
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean... if we're doing this for 2.0 anyway, we can just remove version.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did try removing version entirely and things got a little bit curly due to how extensively it is used throughout certbot-apache. I can give it another go, but we can also do it another time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh for reason when looking at this I convinced myself that this was a public signature but we're in _internal here so yeah definitely good with leaving this for now.

@ohemorange ohemorange changed the base branch from master to 2.0.x July 19, 2022 23:35
@ohemorange ohemorange changed the base branch from 2.0.x to master July 20, 2022 00:38
@ohemorange ohemorange changed the base branch from master to 2.0.x July 20, 2022 00:39
Copy link
Copy Markdown
Member

@bmw bmw left a comment

Choose a reason for hiding this comment

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

I found a couple small pieces of additional cleanup we could do, but this otherwise LGTM! If you agree with my suggestions, I can also implement them myself Just let me know if you prefer that.


if self.configurator.version < (2, 4):
config_template_pre = self.CONFIG_TEMPLATE22_PRE
config_template_post = self.CONFIG_TEMPLATE22_POST
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can delete these self.CONFIG_TEMPLATE22* attributes.

if self.get_version() >= (2, 3, 9):
rewrite_rule_args = constants.REWRITE_HTTPS_ARGS_WITH_END
else:
rewrite_rule_args = constants.REWRITE_HTTPS_ARGS
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we shouldn't do more here with constants.REWRITE_HTTPS_ARGS. It's now only used to detect a redirect rule previously created by Certbot for Apache < 2.3.9. Since that's no longer supported, I wonder if we shouldn't:

  1. Move the value of constants.REWRITE_HTTPS_ARGS into constants.OLD_REWRITE_HTTPS_ARGS.
  2. Delete constants.REWRITE_HTTPS_ARGS and all references to it.
  3. We could also rename constants.REWRITE_HTTPS_ARGS_WITH_END to constants.REWRITE_HTTPS_ARGS if we wanted, but I'm not sure that's necessary.

I think this has the effect of cleaning up the code a bit and having Certbot update the old redirect rule to the new format if the user is using Apache 2.4. What do you think?

@alexzorin alexzorin requested a review from bmw August 23, 2022 09:00
Copy link
Copy Markdown
Member

@bmw bmw left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks Alex.

@bmw
Copy link
Copy Markdown
Member

bmw commented Aug 25, 2022

Actually, should we add a changelog entry here? How are we going to make sure changes in the 2.0 branch have a changelog entry for Certbot 2.0?

@alexzorin
Copy link
Copy Markdown
Collaborator Author

I'm open to ideas. I haven't been writing changelog entries for these PRs in an effort to avoid back-to-back merge conflicts when we put it all together. My vague plan was to do it afterwards.

@bmw bmw mentioned this pull request Aug 29, 2022
@bmw
Copy link
Copy Markdown
Member

bmw commented Aug 29, 2022

Works for me! I created #9388 to track that.

@bmw bmw merged commit d8e45c2 into certbot:2.0.x Aug 29, 2022
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.

Remove Apache 2.2 support

3 participants