Closed Bug 1172968 Opened 9 years ago Closed 9 years ago

Move the scripts we want to keep from contrib/* and place them in scripts/ directory. Remove contrib from repo

Categories

(bugzilla.mozilla.org :: General, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

Details

Attachments

(1 file, 1 obsolete file)

We have a lot of old upstream scripts in contrib/* that we do not use and should not be carrying along in our repo. Most of the scripts we use are on contrib/reorg-tools/*. 

1. Create a scripts/* directory
2. Move any useful scripts in contrib/* and contrib/reorg-tools/* into scripts/
3. Remove contrib/ directory from repo.

dkl
Component: Administration → General
Attached patch 1172968_1.patch (obsolete) — Splinter Review
Attachment #8617428 - Flags: review?(glob)
Comment on attachment 8617428 [details] [diff] [review]
1172968_1.patch

Review of attachment 8617428 [details] [diff] [review]:
-----------------------------------------------------------------

because the push process uses scripts in contrib, this needs to happen in stages:
- a copy of fixperms.pl and clear-memcached.pl needs to stay in contrib
- push out these changes
- file a bug to get fubar to update the push scripts (dev, stage, and prod) to use scripts/ instead of contrib/
- once the push scripts have been updated we can delete contrib/

you'll also need to file a bug to get nagios updated due to nagios_blocker_check.pl moving (ping ashish about that), as well as a bug to inform the DBAs that the location of the sanitizeme.pl script is moving and they will have to update their docs.  finally any docs we have on the wiki or mana that refer to scripts will need to be touched.

::: bzr-update.sh
@@ -6,1 @@
>  output=`bzr pull --overwrite -rtag:$TAG 2>&1`

we don't need the bzr-update.sh script, delete

::: scripts/README
@@ +5,5 @@
> +
> +They may require tweaking if you use them on your own install.  Putting them
> +here to make it easier to collaborate on them and keep them up-to-date.
> +Hopefully Bugzilla upstream will be able to just do this from the web UI
> +eventually.

this file isn't useful, please delete it

::: scripts/bugzilla-queue.suse
@@ +1,1 @@
> +#!/bin/bash

bmo doesn't use suse, delete

::: scripts/convert_date_time_date.pl
@@ +1,1 @@
> +#!/usr/bin/perl -w

this was a one-time migration script, delete

::: scripts/fix_comment_text.pl
@@ +1,1 @@
> +#!/usr/bin/perl

we don't need this script, delete

::: scripts/migrate_crash_signatures.pl
@@ +1,1 @@
> +#!/usr/bin/perl

this was a one-time migration script, delete

::: scripts/migrate_orange_bugs.pl
@@ +1,1 @@
> +#!/usr/bin/perl -wT

this was a one-time migration script, delete

::: scripts/move_dupes_to_invalid.pl
@@ +1,1 @@
> +#!/usr/bin/perl

this was a one-time migration script, delete

::: scripts/verify-user.pl
@@ +1,1 @@
> +#!/usr/bin/perl -wT

what a weird script. delete
Attachment #8617428 - Flags: review?(glob) → review-
Attached patch 1172968_2.patchSplinter Review
(In reply to Byron Jones ‹:glob› from comment #2)
> Comment on attachment 8617428 [details] [diff] [review]
> 1172968_1.patch
> 
> Review of attachment 8617428 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> because the push process uses scripts in contrib, this needs to happen in
> stages:
> - a copy of fixperms.pl and clear-memcached.pl needs to stay in contrib
> - push out these changes

Done. Will commit a new patch after that removes contrib/{fixperms,clear-memcached}.pl after initial push.

> - file a bug to get fubar to update the push scripts (dev, stage, and prod)
> to use scripts/ instead of contrib/
>
> you'll also need to file a bug to get nagios updated due to
> nagios_blocker_check.pl moving (ping ashish about that), as well as a bug to
> inform the DBAs that the location of the sanitizeme.pl script is moving and
> they will have to update their docs.  finally any docs we have on the wiki
> or mana that refer to scripts will need to be touched.

Will file the needed bugs now.

dkl
Attachment #8617428 - Attachment is obsolete: true
Attachment #8628999 - Flags: review?(glob)
Blocks: 1179907
Blocks: 1179910
Comment on attachment 8628999 [details] [diff] [review]
1172968_2.patch

Review of attachment 8628999 [details] [diff] [review]:
-----------------------------------------------------------------

looks sane, full review next week.

moving scripts/issue-api-key.pl will likely impact the mozreview testsuite, make sure they get a heads-up when this is committed.
Comment on attachment 8628999 [details] [diff] [review]
1172968_2.patch

Review of attachment 8628999 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob, with the following to fix on commit..

the mode of all the scripts in your patch is wrong:
> diff --git a/scripts/syncmsandversions.pl b/scripts/syncmsandversions.pl
> new file mode 100644
make sure when you commit this the scripts are all 755.

qa/config/generate_test_data.pl:
> system("perl", "contrib/fixperms.pl");

docker/README.md:
> 2. cd `/c/Users/Username/src/bmo/contrib/docker` (paths under c:\Users are

docs/en/xml/patches.xml:
this file can be deleted

::: jobqueue.pl
@@ +84,4 @@
>  on this Bugzilla installation.
>  
>  If you are using a system that isn't RHEL, Fedora, CentOS, etc., then you
> +may have to modify F<scripts/bugzilla-queue.*> and install it yourself

there's another instance of contrib/bugzilla-queue in this file to fix
Attachment #8628999 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   f70d4ce..b758be1  master -> master

Initial commit complete. Will commit a new patch to remove contrib/* once the dependent bugs give the green light.

glob, do you feel i should leave this bug open and close when the contrib directory is full removed or close this and open a new bug specifically about the final removal part? Personally I have no issue with leaving this one open but if you think it will cause confusion I can go the new bug route.

dkl
Flags: needinfo?(glob)
(In reply to David Lawrence [:dkl] from comment #6)
> glob, do you feel i should leave this bug open and close when the contrib
> directory is full removed or close this and open a new bug specifically
> about the final removal part? Personally I have no issue with leaving this
> one open but if you think it will cause confusion I can go the new bug route.

i'd prefer to see a new bug, because the dependencies will need to be reversed (this bug blocks the other systems, which in turn blocks removing contrib/ completely).
Flags: needinfo?(glob)
i missed contrib/clear-templates.pl, which is called from a help script instead of the push script itself.

To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   18686c6..b46c86a  master -> master
Thanks re: clear-templates.pl New bug 1181143 created to track the final removal of contrib directory.

dkl
No longer blocks: 1179907, 1179910
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.