r40936 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40935‎ | r40936 | r40937 >
Date:20:58, 16 September 2008
Author:mark
Status:old
Tags:
Comment:
Initial import of wikimedia-task-search package
Modified paths:
  • /trunk/debs/wikimedia-task-search (added) (history)
  • /trunk/debs/wikimedia-task-search/debian (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/README.Debian (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/changelog (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/compat (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/conffiles (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/control (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/copyright (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/dirs (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/links (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/postinst (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/prerm (added) (history)
  • /trunk/debs/wikimedia-task-search/debian/rules (added) (history)
  • /trunk/debs/wikimedia-task-search/sudoers (added) (history)

Diff [purge]

Index: trunk/debs/wikimedia-task-search/debian/control
@@ -0,0 +1,13 @@
 2+Source: wikimedia-task-search
 3+Section: unknown
 4+Priority: optional
 5+Maintainer: Mark Bergsma <mark@wikimedia.org>
 6+Standards-Version: 3.6.2
 7+Build-Depends: debhelper (>= 4.0.0)
 8+
 9+Package: wikimedia-task-search
 10+Architecture: all
 11+Depends: wikimedia-nis-client, wikimedia-lvs-realserver, openjdk-6-jdk (>= 6b11-2ubuntu2), ant, daemon
 12+Description: Wikimedia search server
 13+ This package depends on all packages needed to setup a standard
 14+ search server.
Index: trunk/debs/wikimedia-task-search/debian/links
Index: trunk/debs/wikimedia-task-search/debian/dirs
@@ -0,0 +1 @@
 2+etc
Index: trunk/debs/wikimedia-task-search/debian/compat
@@ -0,0 +1 @@
 2+4
Index: trunk/debs/wikimedia-task-search/debian/postinst
@@ -0,0 +1,69 @@
 2+#! /bin/sh
 3+# postinst script for wikimedia-task-search
 4+#
 5+# see: dh_installdeb(1)
 6+
 7+set -e
 8+
 9+# summary of how this script can be called:
 10+# * <postinst> `configure' <most-recently-configured-version>
 11+# * <old-postinst> `abort-upgrade' <new version>
 12+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 13+# <new-version>
 14+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 15+# <failed-install-package> <version> `removing'
 16+# <conflicting-package> <version>
 17+# for details, see http://www.debian.org/doc/debian-policy/ or
 18+# the debian-policy package
 19+#
 20+
 21+case "$1" in
 22+ configure)
 23+ # Add a line to /etc/motd describing the task of this server
 24+ if [ -f /etc/motd.tail ]
 25+ then
 26+ MOTDFILE=/etc/motd.tail
 27+ else
 28+ MOTDFILE=/etc/motd
 29+ fi
 30+
 31+ if ! grep -qs "wikimedia-task-search" $MOTDFILE
 32+ then
 33+ echo "$(hostname) is a Wikimedia search server (wikimedia-task-search)." >> $MOTDFILE
 34+
 35+ if [ -f /etc/motd.tail ]
 36+ then
 37+ # Update motd
 38+ uname -snrvm > /var/run/motd
 39+ cat /etc/motd.tail >> /var/run/motd
 40+ fi
 41+ fi
 42+
 43+ echo "Making /a recursively owned by group search, mode g+rw"
 44+ chgrp -R search /a
 45+ chmod -R g+rw /a
 46+
 47+ echo "Touching file /etc/lsearch.conf and making sure it's editable by group search"
 48+ touch /etc/lsearch.conf
 49+ chgrp search /etc/lsearch.conf
 50+ chmod g+rw /etc/lsearch.conf
 51+ ;;
 52+
 53+ abort-upgrade|abort-remove|abort-deconfigure)
 54+
 55+ ;;
 56+
 57+ *)
 58+ echo "postinst called with unknown argument \`$1'" >&2
 59+ exit 1
 60+ ;;
 61+esac
 62+
 63+# dh_installdeb will replace this with shell code automatically
 64+# generated by other debhelper scripts.
 65+
 66+#DEBHELPER#
 67+
 68+exit 0
 69+
 70+
Index: trunk/debs/wikimedia-task-search/debian/prerm
@@ -0,0 +1,56 @@
 2+#! /bin/sh
 3+# prerm script for wikimedia-task-search
 4+#
 5+# see: dh_installdeb(1)
 6+
 7+set -e
 8+
 9+# summary of how this script can be called:
 10+# * <prerm> `remove'
 11+# * <old-prerm> `upgrade' <new-version>
 12+# * <new-prerm> `failed-upgrade' <old-version>
 13+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
 14+# * <deconfigured's-prerm> `deconfigure' `in-favour'
 15+# <package-being-installed> <version> `removing'
 16+# <conflicting-package> <version>
 17+# for details, see http://www.debian.org/doc/debian-policy/ or
 18+# the debian-policy package
 19+
 20+
 21+case "$1" in
 22+ remove|deconfigure)
 23+ # Add a line to /etc/motd describing the task of this server
 24+ if [ -f /etc/motd.tail ]
 25+ then
 26+ MOTDFILE=/etc/motd.tail
 27+ else
 28+ MOTDFILE=/etc/motd
 29+ fi
 30+
 31+ sed -i '/is a.*(wikimedia-task-search).$/d' $MOTDFILE
 32+
 33+ if [ -f /etc/motd.tail ]
 34+ then
 35+ # Update motd
 36+ uname -snrvm > /var/run/motd
 37+ cat /etc/motd.tail >> /var/run/motd
 38+ fi
 39+ ;;
 40+ upgrade)
 41+ ;;
 42+ failed-upgrade)
 43+ ;;
 44+ *)
 45+ echo "prerm called with unknown argument \`$1'" >&2
 46+ exit 1
 47+ ;;
 48+esac
 49+
 50+# dh_installdeb will replace this with shell code automatically
 51+# generated by other debhelper scripts.
 52+
 53+#DEBHELPER#
 54+
 55+exit 0
 56+
 57+
Index: trunk/debs/wikimedia-task-search/debian/changelog
@@ -0,0 +1,5 @@
 2+wikimedia-task-search (1.0) hardy; urgency=low
 3+
 4+ * Initial release
 5+
 6+ -- Mark Bergsma <mark@wikimedia.org> Tue, 16 Sep 2008 20:24:30 +0000
Index: trunk/debs/wikimedia-task-search/debian/conffiles
@@ -0,0 +1 @@
 2+/etc/sudoers
Index: trunk/debs/wikimedia-task-search/debian/copyright
@@ -0,0 +1 @@
 2+Copyright (c) 2008 Mark Bergsma <mark@wikimedia.org>.
Index: trunk/debs/wikimedia-task-search/debian/rules
@@ -0,0 +1,89 @@
 2+#!/usr/bin/make -f
 3+# -*- makefile -*-
 4+# Sample debian/rules that uses debhelper.
 5+# This file was originally written by Joey Hess and Craig Small.
 6+# As a special exception, when this file is copied by dh-make into a
 7+# dh-make output file, you may use that output file without restriction.
 8+# This special exception was added by Craig Small in version 0.37 of dh-make.
 9+
 10+# Uncomment this to turn on verbose mode.
 11+#export DH_VERBOSE=1
 12+
 13+DESTDIR=$(CURDIR)/debian/wikimedia-task-search
 14+
 15+CFLAGS = -Wall -g
 16+
 17+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 18+ CFLAGS += -O0
 19+else
 20+ CFLAGS += -O2
 21+endif
 22+
 23+configure: configure-stamp
 24+configure-stamp:
 25+ dh_testdir
 26+ # Add here commands to configure the package.
 27+
 28+ touch configure-stamp
 29+
 30+
 31+build: build-stamp
 32+
 33+build-stamp: configure-stamp
 34+ dh_testdir
 35+
 36+ touch build-stamp
 37+
 38+clean:
 39+ dh_testdir
 40+ dh_testroot
 41+ rm -f build-stamp configure-stamp
 42+
 43+ dh_clean
 44+
 45+install: build
 46+ dh_testdir
 47+ dh_testroot
 48+ dh_clean -k
 49+ dh_installdirs
 50+ dh_link
 51+
 52+ install -m 0400 sudoers $(DESTDIR)/etc/
 53+
 54+# Build architecture-independent files here.
 55+binary-indep: build install
 56+# We have nothing to do by default.
 57+
 58+# Build architecture-dependent files here.
 59+binary-arch: build install
 60+ dh_testdir
 61+ dh_testroot
 62+ dh_installchangelogs
 63+ dh_installdocs
 64+ dh_installexamples
 65+# dh_install
 66+# dh_installmenu
 67+# dh_installdebconf
 68+# dh_installlogrotate
 69+# dh_installemacsen
 70+# dh_installpam
 71+# dh_installmime
 72+# dh_installinit
 73+ dh_installcron
 74+# dh_installinfo
 75+ dh_installman
 76+ dh_link
 77+ dh_strip
 78+ dh_compress
 79+ dh_fixperms -X sudoers
 80+# dh_perl
 81+# dh_python
 82+# dh_makeshlibs
 83+ dh_installdeb
 84+ dh_shlibdeps
 85+ dh_gencontrol
 86+ dh_md5sums
 87+ dh_builddeb
 88+
 89+binary: binary-indep binary-arch
 90+.PHONY: build clean binary-indep binary-arch binary install configure
Property changes on: trunk/debs/wikimedia-task-search/debian/rules
___________________________________________________________________
Added: svn:executable
191 +
Index: trunk/debs/wikimedia-task-search/debian/README.Debian
@@ -0,0 +1,5 @@
 2+wikimedia-task-search
 3+---------------------
 4+
 5+This package depends on all packages needed to setup a standard
 6+search server.
Index: trunk/debs/wikimedia-task-search/sudoers
@@ -0,0 +1,45 @@
 2+# sudoers file.
 3+#
 4+# *******************************************
 5+# WIKIMEDIA SYSTEM ADMINISTRATORS PLEASE NOTE
 6+# *******************************************
 7+# Please edit /home/config/others/etc/sudoers and copy to /etc on all machines with dshroot
 8+#
 9+# See the sudoers man page for the details on how to write a sudoers file.
 10+#
 11+# vim: sts=0 noet ts=8
 12+
 13+# User alias specification
 14+User_Alias ADMINS = %wikidev
 15+User_Alias WIKIUSER = apache,%wikidev
 16+
 17+# Cmnd alias specification
 18+Cmnd_Alias ADMIN_COMMANDS = \
 19+ /usr/sbin/apache2ctl, \
 20+ /etc/init.d/apache2, \
 21+ /home/wikipedia/sbin/apache-kill-it, \
 22+ /home/wikipedia/sbin/sync-common-it, \
 23+ /home/wikipedia/sbin/sync-common-php, \
 24+ /home/wikipedia/sbin/scap15-2, \
 25+ /home/wikipedia/sbin/unscap-2, \
 26+ /home/wikipedia/sbin/set-group-write2, \
 27+ /usr/bin/renice
 28+
 29+# User privilege specification
 30+root ALL=(ALL) ALL
 31+ADMINS ALL= NOPASSWD: ADMIN_COMMANDS
 32+WIKIUSER ALL=NOPASSWD: /home/wikipedia/sbin/wikiuser_pass_real
 33+
 34+Cmnd_Alias SEARCH = /etc/init.d/lsearchd
 35+rainman ALL=NOPASSWD: SEARCH
 36+
 37+# Uncomment to allow people in group wheel to run all commands
 38+# %wheel ALL=(ALL) ALL
 39+
 40+# Same thing without a password
 41+# %wheel ALL=(ALL) NOPASSWD: ALL
 42+
 43+# Samples
 44+# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 45+# %users localhost=/sbin/shutdown -h now
 46+