Skip to content

Commit 1975d7e

Browse files
committed
documentation update WRT underscore to dash change in arguments
Fixes: fedora-copr#1099
1 parent aef7d30 commit 1975d7e

File tree

14 files changed

+45
-45
lines changed

14 files changed

+45
-45
lines changed

beaker-tests/Regression/frontend/setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ sudo tar -xf /vagrant/frontend-files.tar -C /
3232
echo "*:*:coprdb:copr-fe:coprpass" > ~/.pgpass
3333
chmod 600 ~/.pgpass
3434
psql -U copr-fe coprdb < /setup-user.sql
35-
sudo copr-frontend create_chroot fedora-24-x86_64
35+
sudo copr-frontend create-chroot fedora-24-x86_64
3636
' frontend
3737
rm $COPRROOTDIR/frontend-files.tar

copr-setup.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Frontend:
6969
- cd /usr/share/copr/coprs_frontend
7070
- configure DB first - see DB section below
7171
# for develop setup do:
72-
COPR_CONFIG=/etc/copr/copr_devel.conf ./manage.py create_db --alembic alembic.ini
72+
COPR_CONFIG=/etc/copr/copr_devel.conf ./manage.py create-db --alembic alembic.ini
7373
# for production setup do:
74-
./manage.py create_db --alembic alembic.ini
74+
./manage.py create-db --alembic alembic.ini
7575

7676
- for developing you can run:
7777
./manage.py runserver -t <FQDN>
@@ -80,7 +80,7 @@ COPR_CONFIG=/etc/copr/copr_devel.conf ./manage.py create_db --alembic alembic.in
8080
- for production is used ProductionConfig from coprs_frontend/coprs/config.py
8181

8282
- Add chroots. E.g:
83-
su - copr-fe -c './manage.py create_chroot fedora-18-x86_64 fedora-18-i386'
83+
su - copr-fe -c './manage.py create-chroot fedora-18-x86_64 fedora-18-i386'
8484

8585

8686
DB config
@@ -97,7 +97,7 @@ SQLite
9797
This will use sqlite db file in /var/lib/copr/data/copr.db (manage.py will create that file)
9898
- Note that you have to either create db as copr-fe user or you have to run:
9999
chown copr-fe:copr-fe /var/lib/copr/data/copr.db
100-
after you run "./manage.py create_db --alembic alembic.ini"
100+
after you run "./manage.py create-db --alembic alembic.ini"
101101

102102
PostgreSQL
103103
~~~~~~~~~~
@@ -128,7 +128,7 @@ PGPASSWORD=coprpass psql -a -U copr-fe coprdb
128128
PGPASSWORD=coprpass psql -a -h localhost -U copr-fe coprdb
129129

130130
Then run:
131-
"./manage.py create_db --alembic alembic.ini"
131+
"./manage.py create-db --alembic alembic.ini"
132132

133133
Upgrade
134134
=======
@@ -141,7 +141,7 @@ Make yourself admin
141141

142142
Run:
143143
cd /usr/share/copr/coprs_frontend/
144-
./manage.py alter_user --admin msuchy
144+
./manage.py alter-user --admin msuchy
145145

146146
Then navigate to:
147147
http://your.copr.fqdn/admin
@@ -151,11 +151,11 @@ Add new chroot
151151

152152
First create new chroots:
153153

154-
python manage.py create_chroot fedora-24-i386 fedora-24-x86_64
154+
python manage.py create-chroot fedora-24-i386 fedora-24-x86_64
155155

156156
And then copy data from rawhide into them:
157157

158-
python manage.py rawhide_to_release fedora-rawhide-i386 fedora-24-i386
158+
python manage.py rawhide-to-release fedora-rawhide-i386 fedora-24-i386
159159
# similarly for fedora-24-x86_64
160160

161161
DEBUGGING

doc/how_to_delete_outdated_chroots.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To briefly summarize it, first, it is required to mark a chroot as EOL (aka outd
2424

2525
::
2626

27-
copr-frontend alter_chroot --action eol fedora-25-x86_64
27+
copr-frontend alter-chroot --action eol fedora-25-x86_64
2828

2929
It doesn't matter whether the chroot is currently activated or deactivated, using ``--action eol``
3030
always deactivates it. More importantly, for every related ``CoprChroot`` it generates a ``delete_after`` timestamp
@@ -40,24 +40,24 @@ project owners are going to be notified, but rather all project admins.
4040

4141
::
4242

43-
copr-frontend notify_outdated_chroots --dry-run
43+
copr-frontend notify-outdated-chroots --dry-run
4444

4545
When working on a non-production instance and wanting to really send the emails, filter the recipients to just yourself
4646
or team members. Any *real* users shouldn't be contacted from devel instances!
4747

4848
::
4949

50-
copr-frontend notify_outdated_chroots --dry-run -e [email protected]
50+
copr-frontend notify-outdated-chroots --dry-run -e [email protected]
5151

5252
If this command prints that it would notify just the expected people (which were specified with the ``-e`` parameter),
5353
then it is safe to run it without ``--dry-run`` parameter.
5454

5555
::
5656

57-
copr-frontend notify_outdated_chroots -e [email protected]
57+
copr-frontend notify-outdated-chroots -e [email protected]
5858

5959

60-
When the notification about a particular copr chroot is sent and then the ``notify_outdated_chroots`` command
60+
When the notification about a particular copr chroot is sent and then the ``notify-outdated-chroots`` command
6161
is executed again, it will not send the notification for the second time. It is designed to be daily executed via Cron
6262
and it needs to avoid spamming the people over and over again. Therefore when a notification is sent, a timestamp when
6363
to send a next one is stored to the ``delete_notify`` column. In a case that this logic needs to be suppressed,
@@ -72,18 +72,18 @@ all the chroots for which this applies, use this command.
7272

7373
::
7474

75-
copr-frontend delete_outdated_chroots --dry-run
75+
copr-frontend delete-outdated-chroots --dry-run
7676

7777
To really delete them (i.e. creating an action which will delete the chroot directory on the backend),
7878
run the command without ``--dry-run`` parameter.
7979

8080
::
8181

82-
copr-frontend delete_outdated_chroots
82+
copr-frontend delete-outdated-chroots
8383

8484
When deleting the chroot (creating an action to delete the data on the backend), the ``delete_after``
85-
and ``delete_notify`` columns are set to NULL and therefore ``notify_outdated_chroots``
86-
and ``delete_outdated_chroots`` commands don't see the chroot anymore.
85+
and ``delete_notify`` columns are set to NULL and therefore ``notify-outdated-chroots``
86+
and ``delete-outdated-chroots`` commands don't see the chroot anymore.
8787

8888

8989
Automatization

doc/how_to_manage_chroots.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Chroots can be easily managed with these few commands.
1414

1515
::
1616

17-
copr-frontend create_chroot <name>
18-
copr-frontend alter_chroot --action activate <name>
19-
copr-frontend alter_chroot --action deactivate <name>
20-
copr-frontend branch_fedora <new-branched-version>
21-
copr-frontend rawhide_to_release <rawhide-chroot> <newly-created-chroot>
17+
copr-frontend create-chroot <name>
18+
copr-frontend alter-chroot --action activate <name>
19+
copr-frontend alter-chroot --action deactivate <name>
20+
copr-frontend branch-fedora <new-branched-version>
21+
copr-frontend rawhide-to-release <rawhide-chroot> <newly-created-chroot>
2222

2323
However, `enablement process upon Fedora branching <#branching-process>`_ and also
2424
`chroot deactivation when Fedora reaches it's EOL phase <#eol-deactivation-process>`_, are not that simple.
@@ -36,20 +36,20 @@ chroot.
3636
So **immediately** after Fedora branching (for exmaple to version **31**), you
3737
want to do this (the command takes a very long time, be prepared)::
3838

39-
copr-frontend branch_fedora 31
39+
copr-frontend branch-fedora 31
4040

4141
This command creates ``fedora-31-*`` chroots from corresponding
4242
``fedora-rawhide-*`` chroots, and it also copies (duplicates/forks) latest
4343
successful rawhide package builds into the new chroots. This can be done
4444
manually for each architecture by::
4545

46-
copr-frontend create_chroot fedora-31-x86_64 --deactivated
47-
copr-frontend rawhide_to_release fedora-rawhide-x86_64 fedora-31-x86_64
46+
copr-frontend create-chroot fedora-31-x86_64 --deactivated
47+
copr-frontend rawhide-to-release fedora-rawhide-x86_64 fedora-31-x86_64
4848

4949
From the manual steps you can see that the new chroots are **deactivated** at
5050
the beginning.
5151

52-
It's important to do ``rawhide_to_release`` as soon as possible, because right
52+
It's important to do ``rawhide-to-release`` as soon as possible, because right
5353
after branching action - Fedora Rawhide starts to live it's own separate life -
5454
and the builds in Rawhide become more and more incompatible with the branched
5555
Fedora. So - if we copied the packages later - the branched chroot in copr
@@ -67,11 +67,11 @@ and in which version of the :code:`mock-core-configs` package they were added. I
6767
on builders, you should keep the chroots deactivated for now and continue later.
6868

6969
But the sooner we can enable the new chroots, the better -- all the builds that
70-
happened in the time window between ``rawhide_to_release`` and chroot enablement
70+
happened in the time window between ``rawhide-to-release`` and chroot enablement
7171
will be missed in the branched chroot later (users will have to rebuild them
7272
manually). So as soon as it is possible, do::
7373

74-
copr-frontend alter_chroot --action activate \
74+
copr-frontend alter-chroot --action activate \
7575
fedora-31-x86_64 fedora-31-i386 fedora-31-ppc64le fedora-31-aarch64
7676

7777
When everything is done, `send an information email to a mailing list <#mailing-lists>`_.
@@ -88,7 +88,7 @@ comfortably deal with it. It can be done like this
8888

8989
::
9090

91-
copr-frontend alter_chroot --action eol fedora-25-x86_64 fedora-25-i386 fedora-25-ppc64le
91+
copr-frontend alter-chroot --action eol fedora-25-x86_64 fedora-25-i386 fedora-25-ppc64le
9292

9393
After running such command, no data are going to be removed. All repositories for the chroot are preserved. It is just
9494
disabled and users can't build new packages in it anymore.

docker/frontend/files/usr/bin/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export LANG=en_US.UTF-8
77
chown -R copr-fe:copr-fe /var/log/copr-frontend
88
chown -R copr-fe:copr-fe /usr/share/copr
99

10-
cd /usr/share/copr/coprs_frontend/ && sudo -u copr-fe copr-frontend create_db --alembic alembic.ini
11-
sudo -u copr-fe copr-frontend create_chroot \
10+
cd /usr/share/copr/coprs_frontend/ && sudo -u copr-fe copr-frontend create-db --alembic alembic.ini
11+
sudo -u copr-fe copr-frontend create-chroot \
1212
$(ls /etc/mock/{fedora,epel}-*-{i386,x86_64}.cfg |xargs -I{} -n1 basename {} .cfg)
1313

1414
# selinux: make data dir writeable for httpd

frontend/conf/cron.daily/copr-frontend

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
# daily. Don't edit this file manually, it is automatically updated with
55
# copr-frontend.rpm.
66

7-
runuser -c '/usr/share/copr/coprs_frontend/manage.py vacuum_graphs' - copr-fe
8-
runuser -c '/usr/share/copr/coprs_frontend/manage.py clean_expired_projects' - copr-fe
9-
runuser -c '/usr/share/copr/coprs_frontend/manage.py clean_old_builds' - copr-fe
7+
runuser -c '/usr/share/copr/coprs_frontend/manage.py vacuum-graphs' - copr-fe
8+
runuser -c '/usr/share/copr/coprs_frontend/manage.py clean-expired-projects' - copr-fe
9+
runuser -c '/usr/share/copr/coprs_frontend/manage.py clean-old-builds' - copr-fe

frontend/conf/cron.daily/copr-frontend-optional

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
# Optional Copr frontend tasks to be executed daily.
44

5-
#runuser -c 'copr-frontend notify_outdated_chroots' - copr-fe
6-
#runuser -c 'copr-frontend delete_outdated_chroots' - copr-fe
5+
#runuser -c 'copr-frontend notify-outdated-chroots' - copr-fe
6+
#runuser -c 'copr-frontend delete-outdated-chroots' - copr-fe
77
#/usr/libexec/copr_dump_db.sh /var/lib/copr/data/db_dumps/

frontend/conf/cron.hourly/copr-frontend

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# hourly. Don't edit this file manually, it is automatically updated with
55
# copr-frontend.rpm.
66

7-
runuser -c '/usr/share/copr/coprs_frontend/manage.py update_indexes_quick 120 &> /dev/null' - copr-fe
8-
runuser -c '/usr/share/copr/coprs_frontend/manage.py update_graphs &> /dev/null' - copr-fe
7+
runuser -c '/usr/share/copr/coprs_frontend/manage.py update-indexes-quick 120 &> /dev/null' - copr-fe
8+
runuser -c '/usr/share/copr/coprs_frontend/manage.py update-graphs &> /dev/null' - copr-fe

frontend/coprs_frontend/commands/branch_fedora.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717
def branch_fedora(fedora_version, branch=None):
1818
"""
19-
Branch fedora-rawhide-* chroots to fedora-N* and execute rawhide_to_release
19+
Branch fedora-rawhide-* chroots to fedora-N* and execute rawhide-to-release
2020
on them
2121
"""
2222
rawhide_chroots = coprs_logic.MockChrootsLogic.get_from_name(

frontend/coprs_frontend/commands/create_chroot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create_chroot_function(chroot_names, branch=None, activated=True):
5050
)
5151
@click.option(
5252
"--activated/--deactivated",
53-
help="Activate the chroot later, manually by `alter_chroot`",
53+
help="Activate the chroot later, manually by `alter-chroot`",
5454
default=True
5555
)
5656
def create_chroot(chroot_names, branch=None, activated=True):

frontend/coprs_frontend/commands/create_sqlite_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"""
77
Create the sqlite DB file (not the tables).
8-
Used for alembic, "create_db" does this automatically.
8+
Used for alembic, "create-db" does this automatically.
99
"""
1010

1111
def create_sqlite_file_function():

frontend/coprs_frontend/commands/rawhide_to_release.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def rawhide_to_release(rawhide_chroot, dest_chroot):
2222
mock_chroot = coprs_logic.MockChrootsLogic.get_from_name(dest_chroot).first()
2323
if not mock_chroot:
2424
print("Given chroot does not exist. Please run:")
25-
print(" sudo python3 manage.py create_chroot {}".format(dest_chroot))
25+
print(" sudo python3 manage.py create-chroot {}".format(dest_chroot))
2626
return
2727

2828
mock_rawhide_chroot = coprs_logic.MockChrootsLogic.get_from_name(rawhide_chroot).first()

frontend/coprs_frontend/coprs/views/coprs_ns/coprs_general.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def copr_forks(copr):
905905

906906
@coprs_ns.route("/update_search_index/", methods=["POST"])
907907
def copr_update_search_index():
908-
subprocess.call(['/usr/share/copr/coprs_frontend/manage.py', 'update_indexes_quick', '1'])
908+
subprocess.call(['/usr/share/copr/coprs_frontend/manage.py', 'update-indexes-quick', '1'])
909909
return "OK"
910910

911911

frontend/coprs_frontend/run/copr-gdpr-sar.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Read more: http://fedora-infra-docs.readthedocs.io/en/latest/sysadmin-guide/sops/gdpr_sar.html
55
# Playbook: https://infrastructure.fedoraproject.org/cgit/ansible.git/tree/playbooks/manual/gdpr/sar.yml
66
# Usage: SAR_USERNAME=someusername copr-gdpr-sar.sh
7-
copr-frontend dump_user $SAR_USERNAME
7+
copr-frontend dump-user $SAR_USERNAME

0 commit comments

Comments
 (0)