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

Admin and hook improvements #129

Merged
merged 14 commits into from
Jul 7, 2014
Merged

Conversation

matthewrmshin
Copy link
Member

Improve hook installation.
Write, store and housekeep hook logs at $REPOS/log/.
Clean options for hook installation.
Install svnperms.conf from repository root.
TZ=UTC for all hook scripts.

Improve diagnostics for hooks.
Custom configuations per repositories, not executables.
Configurable pre-revprop-change permissions.
Hooks to work best under Subversion 1.8+.
Add modified svnperms.py in distribution.
Trac 0.12+ changeset added and modified notification.

Trac URL template.
Trac comment edit permission.

Fix usage of FCM_CONF_PATH for admin.
Improve documentation and logic for admin configuration.

Get user info via LDAP or traditional Unix password file.
Use UUID to generate initial svnserve passwords
fcm-add-svn-repos-and-trac-env: new admin command.
fcm-add-svn-repos: new admin command
fcm-manage-trac-env-session: new admin command

pre-commit: block branch create with bad owner

post-commit-bg: rename repository dump.
post-commit-bg: branch owner notification

post-* hooks: configurable notification From: field

Test batteries for hooks, and selected admin utilities.

fcm commit/branch-rm: fix branch owner test to use correct user ID.

Close #30. Close #34.

@matthewrmshin matthewrmshin added this to the next release milestone Jun 9, 2014
@matthewrmshin matthewrmshin self-assigned this Jun 9, 2014
@matthewrmshin matthewrmshin modified the milestones: next-release, 2014.06 Jun 10, 2014
Improve hook installation.
Write, store and housekeep hook logs at `$REPOS/log/`.
Clean options for hook installation.
Install `svnperms.conf` from repository root.
TZ=UTC for all hook scripts.

Improve diagnostics for hooks.
Custom configuations per repositories, not executables.
Configurable `pre-revprop-change` permissions.
Hooks to work best under Subversion 1.8+.
Add modified `svnperms.py` in distribution.
Trac 0.12+ changeset added and modified notification.

Trac URL template.
Trac comment edit permission.

Fix usage of FCM_CONF_PATH for admin.
Improve documentation and logic for admin configuration.

Get user info via LDAP or traditional Unix password file.
Use UUID to generate initial svnserve passwords
fcm-add-svn-repos-and-trac-env: new admin command.
fcm-add-svn-repos: new admin command
fcm-manage-trac-env-session: new admin command

pre-commit: block branch create with bad owner

post-commit-bg: rename repository dump.
post-commit-bg: branch owner notification

post-* hooks: configurable notification `From:` field

Test batteries for hooks, and selected admin utilities.

fcm commit/branch-rm: fix branch owner test to use correct user ID.
Use final directory instead of system temporary directory as work area.
Also:
* fcm-daily-update: manage password files only if relevant.
* fcm-rpmbuild: install fcm wrapper at /usr/bin
@matthewrmshin
Copy link
Member Author

@benfitzpatrick please take an initial look at this.

for (
['{host}', FCM::Admin::Config->instance()->get_trac_host_name()],
['{project}', $self->get_name()],
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit surprised that named-token string formatting isn't built into Perl - the
nearest I can find is CPAN's Text:Template.

Copy link
Member Author

Choose a reason for hiding this comment

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

Mason and Poet are the main framework for this sort of things, but like most things in Perl, they are not standard libraries.

Instead of `svnlook cat` and complex pipe logic.
Also fixes some style issues with embedded SQL statements.
local RET_CODE=0
local NOW=$(date -u +%FT%H:%M:%SZ)
local AUTHOR=$(svnlook author -r "$REV" "$REPOS")
echo "$NOW+ $REV by $AUTHOR"
Copy link
Contributor

Choose a reason for hiding this comment

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

+?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is used here and elsewhere as a delimiter, a bit like PROMPT$. It can probably be any other symbol or none.

@benfitzpatrick
Copy link
Contributor

One remaining comment:
#129 (comment)
otherwise looks OK from a first pass. I'll scan through it again as well.

. $TEST_SOURCE_DIR/test_header_more
#-------------------------------------------------------------------------------
if ! which svnadmin 1>/dev/null 2>/dev/null; then
skip_all 'svmadin not available'
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple more svnadmin typos

@matthewrmshin
Copy link
Member Author

I have done a git grep svm and fixed all the typos.

$RUNNER->(
$TRAC_ADMIN->(
"adding TICKET_EDIT_COMMENT permission to authenticated",
qw{permission add}, 'authenticated', qw{TICKET_EDIT_COMMENT},
Copy link
Contributor

Choose a reason for hiding this comment

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

TICKET_EDIT_COMMENT is not valid in pre-1.0 Trac versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sort-of. 0.12 probably supports it. It should not matter.
N.B. I believe the setting will simply get ignored by early versions of Trac.

## The DN in the LDAP server that is the base for a search
# ldap_basedn =
## The attributes for UID, common name and email in the LDAP directory
# ldap_attrs = uid cn mail
Copy link
Contributor

Choose a reason for hiding this comment

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

Would anyone configure this differently?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know enough about common practices in LDAP servers to answer the question, hence I have made it configurable.

benfitzpatrick added a commit that referenced this pull request Jul 7, 2014
Admin and hook improvements
@benfitzpatrick benfitzpatrick merged commit 205f236 into metomi:master Jul 7, 2014
@matthewrmshin matthewrmshin deleted the hooks branch July 7, 2014 13:37
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.

fcm branch naming should use subversion account name hook: log for each run
2 participants