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

rpmbuild: drop copr-builder help message #3156

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 42 additions & 34 deletions rpmbuild/bin/copr-builder
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,52 @@ from copr_common.helpers import (
from copr_rpmbuild.helpers import read_config


CMD_HELP = """
You have been entrusted with access to a Copr builder.
Please be responsible.

This is a private computer system, unauthorized access is strictly
prohibited. It is to be used only for Copr-related purposes,
not as your personal computing system.

Please be aware that the legal restrictions for what you can build
in Copr apply here as well.
https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr

You can display more help on how to use the builder by running copr-builder:
$ copr-builder --help

What to do next?
By default, the builder will be destroyed after 30 minutes. Extend
this period with:
$ copr-builder prolong

The selected (in Copr web UI) build was automatically resubmitted,
you can find the process with:
$ ps ax | grep '[c]opr-rpmbuild'

You can reproduce Copr builds on your this machine by running copr-rpmbuild
specified in the builder-live logs. For example:

$ /usr/bin/copr-rpmbuild --verbose --drop-resultdir --srpm --task-url {BUILD_TASK_URL}

The results are produced in `/var/lib/copr-rpmbuild/`. See the
information at the beginning of the builder-live.log on how to
reproduce the build manually.

Once you are finished and don't need the builder anymore,
please return it using:
$ copr-builder release

Happy debugging.
"""


def cmd_help():
"""
Print full instructions for working with the builder instance.
Ideally we would have this in MOTD but that would cause problems in cases
like `if $(ssh stroj cat foo|head -n1) == "foo"`. So instead, we instruct
users to run `copr-builder help` manually.
"""
print(
"You have been entrusted with root access to a Copr builder.\n"
"Please be responsible.\n"
"\n"
"This is a private computer system, unauthorized access is strictly\n"
"prohibited. It is to be used only for Copr-related purposes,\n"
"not as your personal computing system.\n"
"\n"
"Please be aware that the legal restrictions for what you can build\n"
"in Copr apply here as well.\n"
"https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr\n"
"\n"
"You can display more information about the builder using\n"
"`copr-builder show`\n"
"\n"
"What to do next?\n"
"\n"
"By default, the builder will be destroyed after 30 minutes. Extend\n"
"this period with `copr-builder prolong`.\n"
"\n"
"The selected (in Copr web UI) build was automatically resubmitted,\n"
"you can find the process with `ps ax |grep copr-rpmbuild`.\n"
"The results are produced in `/var/lib/copr-rpmbuild/`. See the\n"
"information at the beginning of the builder-live.log on how to\n"
"reproduce the build manually.\n"
"\n"
"Once you are finished and don't need the builder anymore,\n"
"please return it using `copr-builder release`.\n"
"\n"
"Happy debugging."
)
print(CMD_HELP)


class CMDShow:
Expand Down