-
Notifications
You must be signed in to change notification settings - Fork 83
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
Upgrade to Ubuntu 22.04 build container #317
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@@ -24,7 +24,7 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version} | |||
# TODO: If re-enable, fix the matcher for Java 11 | |||
# Requires: java >= 1:1.8.0 | |||
Requires: procps | |||
PreReq: /usr/sbin/groupadd /usr/sbin/useradd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was deprecated
@@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version} | |||
# TODO: Fix the query for Java 11 if it is reenabled | |||
# Requires: java >= 1:1.8.0 | |||
Requires: procps | |||
PreReq: /usr/sbin/groupadd /usr/sbin/useradd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was deprecated
@@ -71,10 +71,10 @@ rm -rf "%{buildroot}" | |||
%__install -D -m0755 "%{SOURCE7}" "%{buildroot}%{_datadir}/%{name}/migrate" | |||
|
|||
%pre | |||
/usr/sbin/groupadd -r %{name} &>/dev/null || : | |||
/usr/bin/getent group %{name} &>/dev/null || /usr/sbin/groupadd -r %{name} &>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the recommended method for adding a group depending on if it exists or not
# SUSE version had -o here, but in Fedora -o isn't allowed without -u | ||
/usr/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \ | ||
-d "%{workdir}" %{name} &>/dev/null || : | ||
/usr/bin/getent passwd %{name} &>/dev/null || /usr/sbin/useradd -g %{name} -s /bin/false -r -c "@@SUMMARY@@" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the recommended method for adding a user depending on if it exists or not
# on the server | ||
# shellcheck disable=SC2029 | ||
ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'" | ||
ssh "${SSH_OPTS[@]}" "$PKGSERVER" createrepo_c --update -o "'$RPM_WEBDIR'" "'$RPMDIR/'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not seem that $PKGSERVER
has createrepo_c
installed, which is a prerequisite to the successful deployment of this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
I thought that all was happenning inside the container here, and that the SSH steps were only for basic operation on this VM. You just caught that my assumptions were false.
This machine is puppet managed:
- https://github.com/jenkins-infra/jenkins-infra/blob/production/manifests/site.pp#L66-L69
- https://github.com/jenkins-infra/jenkins-infra/blob/production/dist/role/manifests/pkg.pp#L6
- https://github.com/jenkins-infra/jenkins-infra/blob/production/dist/profile/manifests/pkgrepo.pp#L20-L23
But it is still Ubuntu 18.04 :'(
Since I haven't checked: is there a way to add createrepo_c
on 18.04?
If no, could we use a Docker container for this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no, could we use a Docker container for this instead?
It is just software. You can do anything you want, if you write the code.
In the short term, I suggest upgrading the box to Ubuntu 22.04.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the short term, I suggest upgrading the box to Ubuntu 22.04.
(edited message)
This machine also hosts the Update Center: its not an easy task and would require unplanned effort for now.
Not that I would not want, but that would be a huge context switch for the team meaning we would have to plan it for next week: it's not a short term solution alas :'(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just switch back to createrepo and symlink it in the container, it’s API compatible as far as I understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, I don't think createrepo is even needed in the docker container?
It is only executed over SSH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jenkins-infra/helpdesk#2982 for info
nice work on the test framework @basil! The tests caught 2 issues (since fixed):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
Downstream of:
see jenkins-infra/release#202