-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
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
@benfitzpatrick please take an initial look at this. |
for ( | ||
['{host}', FCM::Admin::Config->instance()->get_trac_host_name()], | ||
['{project}', $self->get_name()], | ||
) { |
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.
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.
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.
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" |
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 is used here and elsewhere as a delimiter, a bit like PROMPT$
. It can probably be any other symbol or none.
One remaining comment: |
. $TEST_SOURCE_DIR/test_header_more | ||
#------------------------------------------------------------------------------- | ||
if ! which svnadmin 1>/dev/null 2>/dev/null; then | ||
skip_all 'svmadin not available' |
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.
A couple more svnadmin
typos
I have done a |
$RUNNER->( | ||
$TRAC_ADMIN->( | ||
"adding TICKET_EDIT_COMMENT permission to authenticated", | ||
qw{permission add}, 'authenticated', qw{TICKET_EDIT_COMMENT}, |
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.
TICKET_EDIT_COMMENT
is not valid in pre-1.0 Trac versions?
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.
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 |
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.
Would anyone configure this differently?
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.
I don't know enough about common practices in LDAP servers to answer the question, hence I have made it configurable.
Fixed also pre-commit usage of `du`.
Admin and hook improvements
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:
fieldTest batteries for hooks, and selected admin utilities.
fcm commit/branch-rm: fix branch owner test to use correct user ID.
Close #30. Close #34.